@@ -0,0 +1,1723 @@
+package etomica.cavity;%0A%0Aimport etomica.box.Box;%0Aimport etomica.data.DataProcessorForked;%0Aimport etomica.data.IData;%0Aimport etomica.data.IDataInfo;%0Aimport etomica.data.types.DataDouble;%0Aimport etomica.data.types.DataGroup;%0Aimport etomica.units.dimensions.Null;%0Aimport etomica.units.dimensions.Pressure;%0A%0A/**%0A * DataProcessor that determines g(sigma) from P (measured with the virial)%0A */%0Apublic class DataProcessorPContactG extends DataProcessorForked %7B%0A%0A    protected final DataGroup data = new DataGroup(new DataDouble%5B%5D%7Bnew DataDouble(), new DataDouble(), new DataDouble()%7D);%0A    protected final Box box;%0A%0A    public DataProcessorPContactG(Box box) %7B%0A        this.box = box;%0A        DataDouble.DataInfoDouble subDataInfo = new DataDouble.DataInfoDouble(%22stuff%22, Null.DIMENSION);%0A        dataInfo = new DataGroup.DataInfoGroup(%22pressure%22, Pressure.DIMENSION, new IDataInfo%5B%5D%7BsubDataInfo, subDataInfo, subDataInfo%7D);%0A        dataInfo.addTag(tag);%0A    %7D%0A%0A    @Override%0A    protected IData processData(IData inputData) %7B%0A        double rho = box.getLeafList().size() / box.getBoundary().volume();%0A        double gsigma = inputData.getValue(0);%0A        // g(sigma) = (p/rho - 1) 1.5 / (pi rho)%0A        // p = rho + (2/3) pi rho%5E2 g(sigma)%0A        ((DataDouble) data.getData(0)).x = rho * (1 + 2.0 / 3.0 * Math.PI * rho * gsigma);%0A        gsigma = inputData.getValue(1);%0A        ((DataDouble) data.getData(1)).x = rho * (1 + 2.0 / 3.0 * Math.PI * rho * gsigma);%0A        double e = inputData.getValue(2);%0A        ((DataDouble) data.getData(2)).x = rho * 2.0 / 3.0 * Math.PI * rho * e;%0A        return data;%0A    %7D%0A%0A    @Override%0A    protected IDataInfo processDataInfo(IDataInfo inputDataInfo) %7B%0A        return dataInfo;%0A    %7D%0A%7D%0A

Add new data processor to compute P from g(sigma)