Skip to content

Commit

Permalink
Revert "changed argument from relative tolerance to absolute toleranc…
Browse files Browse the repository at this point in the history
…e in numpy.testing.allclose"

This reverts commit 75375a8.
  • Loading branch information
yickysan committed Mar 31, 2023
1 parent 7154ac2 commit 6c040de
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions testsuite/MDAnalysisTests/analysis/test_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def _assert_rmsd(self, reference, fitted, frame, desired, weights=None):
fitted.trajectory[frame]
rmsd = rms.rmsd(reference.atoms.positions, fitted.atoms.positions,
superposition=True)
assert_allclose(rmsd, desired, atol=1e-5,
assert_allclose(rmsd, desired, rtol=1e-5,
err_msg="frame {0:d} of fit does not have "
"expected RMSD".format(frame))

Expand Down Expand Up @@ -450,29 +450,29 @@ def test_average_structure(self, universe, reference):
ref, rmsd = _get_aligned_average_positions(self.ref_files, reference)
avg = align.AverageStructure(universe, reference).run()
assert_allclose(avg.results.universe.atoms.positions, ref,
atol=1e-04)
rtol=1e-04)
assert avg.results.rmsd == pytest.approx(rmsd)

def test_average_structure_mass_weighted(self, universe, reference):
ref, rmsd = _get_aligned_average_positions(self.ref_files, reference, weights='mass')
avg = align.AverageStructure(universe, reference, weights='mass').run()
assert_allclose(avg.results.universe.atoms.positions, ref,
atol=1e-04)
rtol=1e-04)
assert avg.results.rmsd == pytest.approx(rmsd)

def test_average_structure_select(self, universe, reference):
select = 'protein and name CA and resid 3-5'
ref, rmsd = _get_aligned_average_positions(self.ref_files, reference, select=select)
avg = align.AverageStructure(universe, reference, select=select).run()
assert_allclose(avg.results.universe.atoms.positions, ref,
atol=1e-04)
rtol=1e-04)
assert avg.results.rmsd == pytest.approx(rmsd)

def test_average_structure_no_ref(self, universe):
ref, rmsd = _get_aligned_average_positions(self.ref_files, universe)
avg = align.AverageStructure(universe).run()
assert_allclose(avg.results.universe.atoms.positions, ref,
atol=1e-04)
rtol=1e-04)
assert avg.results.rmsd == pytest.approx(rmsd)

def test_average_structure_no_msf(self, universe):
Expand All @@ -498,7 +498,7 @@ def test_average_structure_ref_frame(self, universe):
avg = align.AverageStructure(universe, ref_frame=ref_frame).run()

assert_allclose(avg.results.universe.atoms.positions, ref,
atol=1e-04)
rtol=1e-04)
assert avg.results.rmsd == pytest.approx(rmsd)

def test_average_structure_in_memory(self, universe):
Expand Down

0 comments on commit 6c040de

Please sign in to comment.