def _test_o3po5_angle(self):
     """Checks whether the O3'-P-O5' angle is OK."""
     bb = PhosphateBuilder(self.resi1, self.resi2)
     bb.build()
     amin, amax = GeometryStandards.angles["X:O3',X+1:P,X+1:O5'"][0]
     angle = calc_angle(self.resi1["O3'"].get_vector(),
                        self.resi2["P"].get_vector(),
                        self.resi2["O5'"].get_vector())
     self.assertTrue(amin < math.degrees(angle) < amax)
 def _test_o5c5c4_angle(self):
     """Checks whether the O5'-C5'-C4' angle is OK."""
     bb = PhosphateBuilder(self.resi1, self.resi2)
     bb.build()
     amin, amax = GeometryStandards.angles["X:O5',X:C5',X:C4'"][0]
     angle = calc_angle(self.resi2["O5'"].get_vector(),
                        self.resi2["C5'"].get_vector(),
                        self.resi2["C4'"].get_vector())
     self.assertTrue(amin < math.degrees(angle) < amax)
 def test_build_backbone_atomnames(self):
     """Checks whether the P+O5' atoms are constructed."""
     bb = PhosphateBuilder(self.resi1, self.resi2)
     bb.build()
     self.assertTrue(self.resi2['P'])
     self.assertTrue(self.resi2["O5'"])
     self.assertEqual(self.resi2["P"].fullname, ' P')
     self.assertEqual(self.resi2["O5'"].fullname, " O5'")
     self.assertEqual(self.resi2["P"].element, 'P')
     self.assertEqual(self.resi2["O5'"].element, "O")
Esempio n. 4
0
 def build_suites(self):
     """Tries different combinations of starting angles."""
     log.write_message(".. trying %i different suite torsion combinations."\
         %(len(TORSIONS)-1))
     for torsions in TORSIONS[1:]:
         self.run_fccd(torsions=torsions, threshold=0.2, \
             maxit=100)
         phosb = PhosphateBuilder(self.resi1, self.resi2)
         phosb.add_op12()
         if self.is_intact(): return
 def _test_op1op2_geometry(self):
     """Checks whether the OP1 and OP2 geometry is OK."""
     bb = PhosphateBuilder(self.resi1, self.resi2)
     bb.build()
     self.assertTrue(1.2 < self.resi2['P'] - self.resi2['OP1'] < 1.8)
     self.assertTrue(1.2 < self.resi2['P'] - self.resi2['OP2'] < 1.8)
     self.assertTrue(self.resi2['OP1'] - self.resi2['OP2'] > 1.5)
     self.assertTrue(self.resi2['OP1'] - self.resi2["O5'"] > 1.5)
     self.assertTrue(self.resi2['OP2'] - self.resi2["O5'"] > 1.5)
     self.assertTrue(self.resi2['OP1'] - self.resi1["O3'"] > 1.5)
     self.assertTrue(self.resi2['OP2'] - self.resi1["O3'"] > 1.5)
 def _test_build_po3_distance(self):
     """Checks whether the P-O3' distance is OK."""
     bb = PhosphateBuilder(self.resi1, self.resi2)
     bb.build()
     low, high = GeometryStandards.bonds["X:O3',X+1:P"][0]
     self.assertTrue(low <= (self.resi2["P"] - self.resi1["O3'"]) <= high)
 def _test_build_o5p_distance(self):
     """Checks whether the O5'-P distance is OK."""
     bb = PhosphateBuilder(self.resi1, self.resi2)
     bb.build()
     low, high = GeometryStandards.bonds["X:P,X:O5'"][0]
     self.assertTrue(low <= (self.resi2["O5'"] - self.resi2["P"]) <= high)
 def test_build_op1op2(self):
     """Checks whether the OP1 and OP2 atoms are constructed."""
     bb = PhosphateBuilder(self.resi1, self.resi2)
     bb.build()
     self.assertTrue(self.resi2.child_dict.get('OP1'))
     self.assertTrue(self.resi2.child_dict.get("OP2"))
 def test_build_backbone(self):
     """Checks whether the P+O5' atoms are constructed."""
     bb = PhosphateBuilder(self.resi1, self.resi2)
     bb.build()
     self.assertTrue(self.resi2.child_dict.get('P'))
     self.assertTrue(self.resi2.child_dict.get("O5'"))
Esempio n. 10
0
 def test_build_backbone_connection(self):
     """Checks whether two residues are properly connected."""
     bb = PhosphateBuilder(self.resi1, self.resi2)
     bb.build()
     self.assertTrue(are_residues_connected(self.resi1, self.resi2))
Esempio n. 11
0
 def build_fccd(self):
     """Tries to remodel a suite without O3'."""
     log.write_message(".. remodeling suite between O3' and C4'.")
     self.run_fccd()
     phosb = PhosphateBuilder(self.resi1, self.resi2)
     phosb.add_op12()
Esempio n. 12
0
 def build_phosphate(self):
     """tries to remodel the phosphate."""
     log.write_message('.. remodeling phosphate.')
     phosb = PhosphateBuilder(self.resi1, self.resi2)
     phosb.build()