def test_can_transform_atoms(self, mock_trim): atom = Atom("C", 20, 30, 50) atom.transform([[1, 0, 0], [0, 0.7071, -0.7071], [0, 0.7071, 0.7071]], trim=12) self.assertEqual(atom._x, 20) self.assertAlmostEqual(atom._y, -14.142, delta=3) self.assertAlmostEqual(atom._z, 56.569, delta=3) mock_trim.assert_called_with(12)
def test_can_transform_atoms_and_specify_trim(self, mock_trim): atom = Atom("C", 20, 30, 50) atom.transform([[1, 0, 0], [0, 0.7, -0.7], [0, 0.7, 0.7]], trim=1) mock_trim.assert_called_with(1)