Exemple #1
0
 def is_intact(self):
     """Checks whether the backbone is complete."""
     if not is_backbone_intact(self.resi1, mode="3'") or \
         not is_backbone_intact(self.resi2, mode="5'") or \
         not are_residues_connected(self.resi1, self.resi2) or \
         not is_phosphate_intact(self.resi2) or \
         is_backbone_congested(self.resi1, mode="3'") or \
         is_backbone_congested(self.resi2, mode="5'"):
         return False
     return True
 def test_is_backbone_congested(self):
     """Check whether backbone atoms clash into rest of the structure."""
     resi = RNAResidue(self.chain.child_list[2])
     self.assertFalse(is_backbone_congested(resi))
     # now check a structure where the backbone clashes into O2'
     chain=PDBParser().get_structure('test_struc', BB_MESSED_UP)[0].child_list[0]
     resi = RNAResidue(chain[('H_c  ', 32, ' ')])
     self.assertTrue(is_backbone_congested(resi))
     resi = RNAResidue(chain[(' ', 33, ' ')])
     self.assertTrue(is_backbone_congested(resi))
Exemple #3
0
 def write_resi_status(self, resi):
     log.write_message('Status of residue: %s' % resi.identifier)
     if is_backbone_intact(resi):
         log.write_message('\tbackbone  OK')
     else:
         log.write_message('\tbackbone  INTERRUPTED')
     if is_phosphate_intact(resi):
         log.write_message('\tphosphate OK')
     else:
         log.write_message('\tphosphate BROKEN')
     if is_backbone_congested(resi):
         log.write_message('\tclashes   OCCUR')
     else:
         log.write_message('\clashes   OK')