Пример #1
0
    def getPhi(self):
        """  compute PHI C(i-1),N(i),CA(i),c(i)  """
        if self.getPrevious() is not None:
            from mglutil.math.torsion import torsion
            prevResidueAtoms = self.getPrevious().atoms
            names = prevResidueAtoms.name
            idx= names.index('C')
            at1 = prevResidueAtoms[idx]            

            names = self.atoms.name
            idx=names.index('N') ; at2 = self.atoms[idx]
            idx=names.index('CA'); at3 = self.atoms[idx]
            idx=names.index('C') ; at4 = self.atoms[idx]

            self.phi = torsion(at1.coords, at2.coords,
                                     at3.coords, at4.coords)
        return self.phi
Пример #2
0
    def getPsi(self):
        """  compute PSI N(i),CA(i),C(i),N(i+1) """
        if self.getNext() is not None:
            from mglutil.math.torsion import torsion
            names = self.atoms.name
            idx=names.index('N') ; at1 = self.atoms[idx]
            idx=names.index('CA'); at2 = self.atoms[idx]
            idx=names.index('C') ; at3 = self.atoms[idx]
            nextResidueAtoms = self.getNext().atoms
            names = nextResidueAtoms.name
            idx= names.index('N')
            at4 = nextResidueAtoms[idx]            

            self.psi = torsion(at1.coords, at2.coords,
                                     at3.coords, at4.coords)

        return self.psi