Exemple #1
0
 def calculate_results(self):
   ref_crds = []
   crds = []
   for ref_residue, residue in zip(self.ref_soup.residues(), self.soup.residues()):
     if residue.type not in data.solvent_res_types:
       if residue.has_atom('CA'):
         ref_crds.append(ref_residue.atom('CA').pos.copy())
         crds.append(residue.atom('CA').pos.copy())
   center = v3.get_center(crds)
   crds = [c - center for c in crds]
   ref_center = v3.get_center(ref_crds)
   ref_crds = [c - ref_center for c in ref_crds]
   rmsd_val, transform_ref_to_this = rmsd.calc_rmsd_rot(ref_crds, crds)
   ref_crds = [v3.transform(transform_ref_to_this, c) for c in ref_crds]
   return [v3.distance(crd, ref_crd) for crd, ref_crd in zip(crds, ref_crds)]
Exemple #2
0
 def calculate_results(self):
     ref_crds = []
     crds = []
     for ref_residue, residue in zip(self.ref_soup.residues(),
                                     self.soup.residues()):
         if residue.type not in data.solvent_res_types:
             if residue.has_atom('CA'):
                 ref_crds.append(ref_residue.atom('CA').pos.copy())
                 crds.append(residue.atom('CA').pos.copy())
     center = v3.get_center(crds)
     crds = [c - center for c in crds]
     ref_center = v3.get_center(ref_crds)
     ref_crds = [c - ref_center for c in ref_crds]
     rmsd_val, transform_ref_to_this = rmsd.calc_rmsd_rot(ref_crds, crds)
     ref_crds = [v3.transform(transform_ref_to_this, c) for c in ref_crds]
     return [
         v3.distance(crd, ref_crd) for crd, ref_crd in zip(crds, ref_crds)
     ]
Exemple #3
0
 def transform(self, matrix):
   """
   Transforms the pos vector by a v3.transform matrix.
   """
   new_pos = v3.transform(matrix, self.pos)
   v3.set_vector(self.pos, new_pos)
Exemple #4
0
 def transform(self, matrix):
   new_pos = v3.transform(matrix, self.pos)
   v3.set_vector(self.pos, new_pos)
Exemple #5
0
 def transform(self, matrix):
     new_pos = v3.transform(matrix, self.pos)
     v3.set_vector(self.pos, new_pos)