@@ -0,0 +1,1172 @@
+package etomica.cavity;%0A%0Aimport etomica.data.meter.MeterRDF;%0Aimport etomica.space.Boundary;%0Aimport etomica.space.Space;%0A%0A/**%0A * Meter collects RDF but is hardcoded to look at only those atoms that are%0A * overlapping.%0A */%0Apublic class MeterCavity extends MeterRDF %7B%0A%0A    protected final P2HardSphereCavity p2;%0A%0A    public MeterCavity(Space space, P2HardSphereCavity p2) %7B%0A        super(space);%0A        this.p2 = p2;%0A    %7D%0A%0A    public void actionPerformed() %7B%0A        if (p2.pairedAtom1 == null) return;%0A        if (rData != xDataSource.getData() %7C%7C%0A                data.getLength() != rData.getLength() %7C%7C%0A                xDataSource.getXMax() != xMax) %7B%0A            reset();%0A        %7D%0A%0A        double xMaxSquared = xMax * xMax;%0A        iterator.setBox(box);%0A        iterator.reset();%0A        Boundary boundary = box.getBoundary();%0A        // iterate over all pairs%0A        dr.Ev1Mv2(p2.pairedAtom1.getPosition(), p2.pairedAtom2.getPosition());%0A        boundary.nearestImage(dr);%0A        double r2 = dr.squared();%0A        if (r2 %3C xMaxSquared) %7B%0A            int index = xDataSource.getIndex(Math.sqrt(r2));%0A            gSum%5Bindex%5D++;%0A        %7D%0A        callCount++;%0A    %7D%0A%7D%0A

add MeterRDF subclass that measures only paired atoms