Skip to content

Commit

Permalink
Added real trajectory test
Browse files Browse the repository at this point in the history
  • Loading branch information
jdetle committed May 7, 2016
1 parent 9142426 commit 730bc3d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions testsuite/MDAnalysisTests/analysis/test_hbonds.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import itertools
import warnings

from MDAnalysisTests.datafiles import PDB_helix, PSF, DCD
from MDAnalysisTests.datafiles import PDB_helix, GRO, XTC


class TestHydrogenBondAnalysis(TestCase):
Expand Down Expand Up @@ -74,8 +74,12 @@ def test_generate_table(self):
assert_array_equal(h.table.donor_resid, self.values['donor_resid'])
assert_array_equal(h.table.acceptor_resnm, self.values['acceptor_resnm'])

# TODO: Expand tests because the following ones are a bit superficial
# because we should really run them on a trajectory
@staticmethod
def test_true_traj():
u = MDAnalysis.Universe(GRO, XTC)
h = MDAnalysis.analysis.hbonds.HydrogenBondAnalysis(u,'protein','resname ASP', distance=3.0, angle=120.0)
h.run()
assert_equal(len(h.timeseries), 10)

def test_count_by_time(self):
h = self._run()
Expand Down

0 comments on commit 730bc3d

Please sign in to comment.