class TestTrajectoryChangesMethods(unittest.TestCase): def setUp(self): from analyze_changed_distances import TrajectoryChanges self.trj_changes = TrajectoryChanges('all_pairs', 'serial') self.lam = 16 def test_selection_pair(self): changes_AB = self.trj_changes.changes( self.lam, selection_pair=('chain A and resid 1 to 10', 'chain A and resid 11 to 20')) assertRawChangesDict(changes_AB) def test_atom_pairs(self): changes_specific_atoms = self.trj_changes.changes( self.lam, atom_pairs=[('(A)ASP-1:CA', '(A)SER-20:CA'), ('(A)ALA-2:CA', '(A)PRO-19:CA')]) assertRawChangesDict(changes_specific_atoms) def test_residue_pairs(self): changes_specific_residues = self.trj_changes.changes( self.lam, residue_pairs=[('(A)ASP-1', '(A)SER-20'), ('(A)ALA-2', '(A)PRO-19')]) assertRawChangesDict(changes_specific_residues)
class TestTrajectoryChangesMethods(unittest.TestCase): def setUp(self): from analyze_changed_distances import TrajectoryChanges self.trj_changes = TrajectoryChanges('all_pairs', 'serial') self.lam = 16 def test_selection_pair(self): changes_AB = self.trj_changes.changes(self.lam, selection_pair=('chain A and resid 1 to 10', 'chain A and resid 11 to 20')) assertRawChangesDict(changes_AB) def test_atom_pairs(self): changes_specific_atoms = self.trj_changes.changes(self.lam, atom_pairs=[('(A)ASP-1:CA', '(A)SER-20:CA'), ('(A)ALA-2:CA', '(A)PRO-19:CA')]) assertRawChangesDict(changes_specific_atoms) def test_residue_pairs(self): changes_specific_residues = self.trj_changes.changes(self.lam, residue_pairs=[('(A)ASP-1', '(A)SER-20'), ('(A)ALA-2', '(A)PRO-19')]) assertRawChangesDict(changes_specific_residues)
class TestPlotting(unittest.TestCase): def setUp(self): from analyze_changed_distances import TrajectoryChanges self.trj_changes = TrajectoryChanges('all_pairs', 'serial') self.lam = 16 def test_plotDistance(self): self.trj_changes.plotDistance(('(A)ASP-1:CA', '(A)SER-20:CA'), lam=self.lam) def test_matrixPlotChange(self): changes = self.trj_changes.changes(self.lam) v = changes.values()[0] self.trj_changes.matrixPlotChange(v, lam=self.lam)
def setUp(self): from analyze_changed_distances import TrajectoryChanges trj_changes = TrajectoryChanges('all_pairs', 'serial') self.changes = trj_changes.changes(16)
def test_changes(self): from analyze_changed_distances import TrajectoryChanges trj_changes = TrajectoryChanges('all_pairs', 'serial') changes_16 = trj_changes.changes(16) assertRawChangesDict(changes_16)