package etomica.virial;

import etomica.data.IData;

public class ClusterWeightSumWall implements ClusterWeight {
	
	public ClusterWeightSumWall(MeterVirialExternalFieldOverlapRho meter, int pointCount ) {
		this.meter = meter; 
		this.pointCount = pointCount;
		
	}
	
	public ClusterAbstract makeCopy() {
		
		return new ClusterWeightSumWall(meter, pointCount);
	}

	public int pointCount() {
		
		return pointCount;
	}

	public double value(BoxCluster box) {
		meter.setBox(box);
		IData idata = meter.getData();
		double sumwall = 0;
		for (int i=1; i<idata.getLength()-1; i++) {
			sumwall +=Math.abs(idata.getValue(i));
		}
		
		return sumwall;
	}

	public void setTemperature(double temperature) {
		
		
	}
	private final MeterVirialExternalFieldOverlapRho meter;
	private final int pointCount;
}

@@ -165,27 +165,32 @@
 FieldOverlap
-Rho
+Confined
  meter, int 
@@ -519,139 +519,50 @@
 ;%0A%09%09
-double sumwall = 0;%0A%09%09for (int i=1; i%3Cidata.getLength()-1; i++) %7B%0A%09%09%09sumwall +=Math.abs(idata.getValue(i));%0A%09%09%7D%0A%09%09%0A%09%09return sumwall
+return idata.getValue(idata.getLength()-1)
 ;%0A%09%7D
@@ -672,11 +672,16 @@
 rlap
-Rho
+Confined
  met

change to confined sys