Exemplo n.º 1
0
 def rtrans(self, tform, coords):
     """apply random translation to both coords and transformation object"""
     xyz = _utils.random_translation()
     self.policy.translate(coords, xyz)
     tform.translate(xyz)
Exemplo n.º 2
0
 def rtrans(self, tform, coords):
     """apply random translation to both coords and transformation object"""
     xyz = _utils.random_translation()
     self.policy.translate(coords, xyz)
     tform.translate(xyz)
Exemplo n.º 3
0
    def test_apply_translation(self):
        rot = _utils.random_translation()

        _utils.translate(self.x2, rot)
        self.tform.apply_translation(self.x, rot)
        self.assertLess(np.abs(self.x - self.x2).max(), 1e-3)
Exemplo n.º 4
0
    def test_apply_translation(self):
        rot = _utils.random_translation()

        _utils.translate(self.x2, rot)
        self.tform.apply_translation(self.x, rot)
        self.assertLess(np.abs(self.x - self.x2).max(), 1e-3)