def testTransformation(self): atoms = UBI.ca coords = UBI.getCoords() matrix = eye(4) moveAtoms(atoms, by=matrix, ag=True) assert_equal(UBI._getCoords(), coords)
def testByArgument(self): atoms = UBI offset = ones(3) * 10. coords = atoms.getCoords() moveAtoms(atoms, by=offset) assert_equal(atoms._getCoords(), coords + offset)
def testToArgument(self): atoms = UBI.ca coords = UBI.getCoords() center = atoms._getCoords().mean(0) moveAtoms(atoms, to=zeros(3), ag=True) assert_equal(UBI._getCoords(), coords - center)