def test_is_phosphate_intact(self):
     """Check whether OP1 and OP2 are in place"""
     chain=PDBParser().get_structure('test_struc',BB_MESSED_UP)[0].child_list[0]
     resi1 = RNAResidue(chain[('H_c  ', 32, ' ')])
     resi2 = RNAResidue(chain[(' ', 33, ' ')])
     self.assertTrue(is_phosphate_intact(resi1))
     self.assertFalse(is_phosphate_intact(resi2))
Esempio n. 2
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
Esempio n. 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')