Skip to content

Commit

Permalink
Tested saving
Browse files Browse the repository at this point in the history
  • Loading branch information
jdetle committed Jul 8, 2016
1 parent f051b47 commit 8b3d00a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions testsuite/MDAnalysisTests/analysis/test_rms.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class TestRMSD(object):
def setUp(self):
self.universe = MDAnalysis.Universe(GRO, XTC)
self.tempdir = tempdir.TempDir()
self.outfile = os.path.join(self.tempdir.name, 'rmsd.xtc')
self.outfile = os.path.join(self.tempdir.name, 'rmsd.npy')

def tearDown(self):
del self.universe
Expand All @@ -151,7 +151,15 @@ def test_rmsd_single_frame(self):
RMSD = MDAnalysis.analysis.rms.RMSD(self.universe, select='name CA')
RMSD.run(start=5, stop=6)


def test_rmsd_save(self):
RMSD = MDAnalysis.analysis.rms.RMSD(self.universe, select='name CA')
RMSD.run()
RMSD.save(self.outfile)
saved_file = np.load(self.outfile)
test_rmsds = np.load(rmsdArray)
assert_almost_equal(saved_file, test_rmsds, 5,
err_msg="error: rmsd profile should match test " +
"values")

class TestRMSF(TestCase):
def setUp(self):
Expand Down

0 comments on commit 8b3d00a

Please sign in to comment.