Exemple #1
0
    def testTransformation(self):

        atoms = UBI.ca
        coords = UBI.getCoords()
        matrix = eye(4)
        moveAtoms(atoms, by=matrix, ag=True)
        assert_equal(UBI._getCoords(), coords)
Exemple #2
0
    def testByArgument(self):

        atoms = UBI
        offset = ones(3) * 10.
        coords = atoms.getCoords()
        moveAtoms(atoms, by=offset)
        assert_equal(atoms._getCoords(), coords + offset)
    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)
Exemple #5
0
    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)
    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)