Skip to content
Snippets Groups Projects
Commit 8ef94647 authored by Valerio Mariani's avatar Valerio Mariani
Browse files

Refactored unittests for feasibility check

parent 8a18bea2
No related branches found
No related tags found
No related merge requests found
...@@ -18,12 +18,19 @@ class TestPDB(unittest.TestCase): ...@@ -18,12 +18,19 @@ class TestPDB(unittest.TestCase):
def test_compnd_parser(self): def test_compnd_parser(self):
profiles=io.IOProfiles() profiles=io.IOProfiles()
profiles['FEAS_CHECK']=io.IOProfile(bond_feasibility_check=True) profiles['FEAS_CHECK']=io.IOProfile(bond_feasibility_check=True)
profiles['NO_FEAS_CHECK']=io.IOProfile(bond_feasibility_check=False)
e=io.LoadPDB('testfiles/pdb/simple_defective.pdb', restrict_chains="A",profile='FEAS_CHECK') e1=io.LoadPDB('testfiles/pdb/simple_defective.pdb', restrict_chains="A",profile='FEAS_CHECK')
e2=io.LoadPDB('testfiles/pdb/simple_defective.pdb', restrict_chains="A",profile='NO_FEAS_CHECK')
ed=io.LoadPDB('testfiles/pdb/simple_defective.pdb', restrict_chains="A")
res=e.FindResidue('A',3) res1=e1.FindResidue('A',3)
res2=e2.FindResidue('A',3)
self.assertFalse(mol.BondExists(res.FindAtom("CA"),res.FindAtom("CB"))) resd=ed.FindResidue('A',3)
self.assertFalse(mol.BondExists(res1.FindAtom("CA"),res1.FindAtom("CB")))
self.assertTrue(mol.BondExists(res2.FindAtom("CA"),res2.FindAtom("CB")))
self.assertTrue(mol.BondExists(resd.FindAtom("CA"),resd.FindAtom("CB")))
if __name__== '__main__': if __name__== '__main__':
from ost import testutils from ost import testutils
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment