Skip to content
Snippets Groups Projects
Select Git revision
  • acd13c3d0d1458513228b3bcba48dd66f621a9f3
  • master default protected
  • develop protected
  • cmake_boost_refactor
  • ubuntu_ci
  • mmtf
  • non-orthogonal-maps
  • no_boost_filesystem
  • data_viewer
  • 2.11.1
  • 2.11.0
  • 2.10.0
  • 2.9.3
  • 2.9.2
  • 2.9.1
  • 2.9.0
  • 2.8.0
  • 2.7.0
  • 2.6.1
  • 2.6.0
  • 2.6.0-rc4
  • 2.6.0-rc3
  • 2.6.0-rc2
  • 2.6.0-rc
  • 2.5.0
  • 2.5.0-rc2
  • 2.5.0-rc
  • 2.4.0
  • 2.4.0-rc2
29 results

init.py

Blame
  • test_io_pdb.py 828 B
    import unittest
    from ost import *
    
    class TestPDB(unittest.TestCase):
      def setUp(self):
        pass
    
      def test_compnd_parser(self):
        e=io.LoadPDB('testfiles/pdb/compnd.pdb', restrict_chains="A")
        self.assertEquals(e.GetChainCount(), 1)
        ch = e.FindChain("A");
        self.assertEquals(ch.GetIntProp("mol_id"), 1)
    
    class TestPDB(unittest.TestCase):
      def setUp(self):
        pass
    
      def test_compnd_parser(self):
        profiles=io.IOProfiles()
        profiles['NO_FEAS_CHECK']=io.IOProfile(bond_feasibility_check=False)
            
        e=io.LoadPDB('testfiles/pdb/simple_defective.pdb', restrict_chains="A",profile='NO_FEAS_CHECK')
        
        res=e.FindResidue('A',3)
            
        self.assertTrue(mol.BondExists(res.FindAtom("CA"),res.FindAtom("CB")))
        
    if __name__== '__main__':
      from ost import testutils
      testutils.RunTests()