@@ -0,0 +1,1861 @@
+package etomica.data.meter;%0A%0Aimport etomica.box.Box;%0Aimport etomica.simulation.Simulation;%0Aimport etomica.space.Space;%0Aimport etomica.space.Vector;%0Aimport etomica.space3d.Space3D;%0Aimport etomica.species.Species;%0Aimport etomica.species.SpeciesSpheresMono;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0A/**%0A * Created by andrew on 6/15/17.%0A */%0Apublic class MeterRMSDTest %7B%0A    Box box;%0A    MeterRMSD meter;%0A    double EPSILON = 1e-8;%0A    %0A    @Before%0A    public void setUp() throws Exception %7B%0A        Space space = Space3D.getInstance();%0A        Simulation sim = new Simulation(space);%0A        box = new Box(space);%0A        sim.addBox(box);%0A        Vector L = space.makeVector();%0A        L.E(10);%0A        box.getBoundary().setBoxSize(L);%0A        Species species = new SpeciesSpheresMono(sim, space);%0A        sim.addSpecies(species);%0A        box.setNMolecules(species, 1);%0A        meter = new MeterRMSD(box, space);%0A    %7D%0A    %0A    @Test%0A    public void testGetDataAsScalar() throws Exception %7B%0A        Vector p = box.getLeafList().getAtom(0).getPosition();%0A        assertEquals(meter.getDataAsScalar(), 0, EPSILON);%0A        %0A        // move a full box length without apply PBC to atom%0A        for (double x = 0.5; x %3C 18.5; x++) %7B%0A            p.setX(0, x);%0A            assertEquals(meter.getDataAsScalar(), x, EPSILON);%0A        %7D%0A        %0A        // move atom back through the origin and more than a full box length%0A        // in the negative direction.  apply PBC each time.  PBC applied%0A        // first time causes atom to just 2 box lengths in a single step.%0A        for (double x = 18.5; x %3E -18.5; x--) %7B%0A            p.setX(0, x);%0A            Vector shift = box.getBoundary().centralImage(p);%0A            p.PE(shift);%0A            assertEquals(meter.getDataAsScalar(), Math.abs(x), EPSILON);%0A        %7D%0A    %7D%0A%7D

add test for RMSD meter