Пример #1
0
 def test_chains(self):
     """compares contacts diff chains"""
     self.input_file = os.path.join('data', '1A1X.pdb')  # one chain
     self.input_structure = PDBParser(open(self.input_file))
     res = contact.contacts_xtra(self.input_structure)
     self.assertTrue(res == {})
     self.input_file = os.path.join('data', '2E12.pdb')  # one chain
     self.input_structure = PDBParser(open(self.input_file))
     res = contact.contacts_xtra(self.input_structure)
     self.assertTrue(res)
     self.assertFloatEqual(\
     res[('2E12', 0, 'B', ('THR', 17, ' '), ('OG1', ' '))]['CONTACTS']\
     [('2E12', 0, 'A', ('ALA', 16, ' '), ('CB', ' '))][0], 5.7914192561064004)
Пример #2
0
 def test_chains(self):
     """compares contacts diff chains"""
     self.input_file = os.path.join('data', '1A1X.pdb') # one chain
     self.input_structure = PDBParser(open(self.input_file))
     res = contact.contacts_xtra(self.input_structure)
     self.assertTrue(res == {})
     self.input_file = os.path.join('data', '2E12.pdb') # one chain
     self.input_structure = PDBParser(open(self.input_file))
     res = contact.contacts_xtra(self.input_structure)
     self.assertTrue(res)
     self.assertFloatEqual(\
     res[('2E12', 0, 'B', ('THR', 17, ' '), ('OG1', ' '))]['CONTACTS']\
     [('2E12', 0, 'A', ('ALA', 16, ' '), ('CB', ' '))][0], 5.7914192561064004)
Пример #3
0
 def test_symmetry(self):
     """compares contacts diff symmetry mates"""
     self.input_file = os.path.join('data', '2E12.pdb')  # one chain
     self.input_structure = PDBParser(open(self.input_file))
     res = contact.contacts_xtra(self.input_structure, \
                                 symmetry_mode='uc',
                                 contact_mode='diff_sym')
     self.assertTrue(res)
     self.assertFloatEqual(\
     res[('2E12', 0, 'B', ('GLU', 77, ' '), ('OE2', ' '))]['CONTACTS']\
        [('2E12', 0, 'B', ('GLU', 57, ' '), ('OE2', ' '))][0], \
        5.2156557833123873)
Пример #4
0
 def test_symmetry(self):
     """compares contacts diff symmetry mates"""
     self.input_file = os.path.join('data', '2E12.pdb') # one chain
     self.input_structure = PDBParser(open(self.input_file))
     res = contact.contacts_xtra(self.input_structure, \
                                 symmetry_mode='uc',
                                 contact_mode='diff_sym')
     self.assertTrue(res)
     self.assertFloatEqual(\
     res[('2E12', 0, 'B', ('GLU', 77, ' '), ('OE2', ' '))]['CONTACTS']\
        [('2E12', 0, 'B', ('GLU', 57, ' '), ('OE2', ' '))][0], \
        5.2156557833123873)