Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidercruz committed Jul 6, 2018
1 parent f3e74c9 commit 5ed599f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testsuite/MDAnalysisTests/transformations/test_rotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_rotateby_atomgroup_cog_pbc(rotate_universes):
center_pos = selection.center_of_geometry(pbc=True)
matrix = rotation_matrix(np.deg2rad(angle), vector, center_pos)[:3, :3]
ref.positions = np.dot(ref.positions, matrix)
transformed = rotateby(angle, vector, ag=selection, center='geometry', pbc=True)(trans)
transformed = rotateby(angle, vector, ag=selection, center='geometry', wrap=True)(trans)
assert_array_almost_equal(transformed.positions, ref.positions, decimal=6)

def test_rotateby_atomgroup_com_pbc(rotate_universes):
Expand All @@ -136,7 +136,7 @@ def test_rotateby_atomgroup_com_pbc(rotate_universes):
center_pos = selection.center_of_mass(pbc=True)
matrix = rotation_matrix(np.deg2rad(angle), vector, center_pos)[:3, :3]
ref.positions = np.dot(ref.positions, matrix)
transformed = rotateby(angle, vector, ag=selection, center='mass', pbc=True)(trans)
transformed = rotateby(angle, vector, ag=selection, center='mass', wrap=True)(trans)
assert_array_almost_equal(transformed.positions, ref.positions, decimal=6)

def test_rotateby_bad_ag(rotate_universes):
Expand Down Expand Up @@ -169,7 +169,7 @@ def test_rotateby_bad_pbc(rotate_universes):
angle = 90
vector = [0, 0, 1]
with pytest.raises(ValueError):
rotateby(angle, vector, ag = ag, pbc=True)(ts)
rotateby(angle, vector, ag = ag, wrap=True)(ts)

def test_rotateby_bad_center(rotate_universes):
# this universe as a box size zero
Expand Down

0 comments on commit 5ed599f

Please sign in to comment.