Skip to content

Commit

Permalink
[test_COM_utils.TestUnwrapping.test_COM_dist_wo_unwrapping_wo_subtrac…
Browse files Browse the repository at this point in the history
…t_wo_periodic] assert equal with 7 decimals only
  • Loading branch information
gph82 authored Jan 2, 2025
1 parent 692d947 commit 53b8dbb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_COM_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ def test_COM_dist_wo_unwrapping_wo_subtract_wo_periodic(self):
COM2 = np.array([0 + 0, 0 + 5, 0 + 0]) / 2 / 10 # [0. 0.25 0. ]
D12 = np.linalg.norm(COM1 - COM2)

np.testing.assert_array_equal(D12,
geom2COMdist(self.geom, [[0, 1]],
subtract_max_radii=False, low_mem=True, periodic=False,
per_residue_unwrap=False))
np.testing.assert_almost_equal(D12,
geom2COMdist(self.geom, [[0, 1]],
subtract_max_radii=False, low_mem=True, periodic=False,
per_residue_unwrap=False).squeeze())

def test_COM_dist_wo_unwrapping_wo_subtract_w_periodic(self):
# PBCs
Expand Down Expand Up @@ -278,4 +278,4 @@ def test_COM_dist_w_unwrapping_w_subtract_low_and_hi_mem(self):
per_residue_unwrap=True))

if __name__ == '__main__':
unittest.main()
unittest.main()

0 comments on commit 53b8dbb

Please sign in to comment.