rotomericStats
index
rotomericStats.py


 
Module that analyzes the rotomeric states of a given ensemble. 

 
Classes
       
RotomericStats

 
class RotomericStats
   
 

 
  Methods defined here:
RotomericStates(s, atomCoordList)

 
__init__(s)

 
A class to analyze the rotomeric states of a given ensemble
-----dictionarie used in the class----------
torStatCnt  :dict of the form X[UID][State]=count
             where X[UID] is a dictionary
             and X[UID][State] another dictionary
RotAngleName:dict of the from X[UID]=angleName which is a List of tuple
             of the form [('CHI1',('N', 'CA', 'CB', 'OG')),
                          ('CHI2',('CA','CB', 'OG', 'HG'))]
torStateIndex:dict of the form X[UID][State]=Index which is a
              list of integers that stores the structure index
              value in the atomCoordinates List.
scTorsionAtoms: a dict of the form
               X['SER'] = [('CHI1',('N', 'CA', 'CB', 'OG')),
                           ('CHI2',('CA','CB', 'OG', 'HG'))]           
binAngle(s, uid, resType, taName, val)

 
creates a dict named angleBins
angleBins[uid][torsionangleName] : contains the angle value 
         corresponding to the torsionangleName
                                   
binAngleState(s, index)

 
creates two dict:
   torStateCnt: dict of the form X[UID][State]=count
                where X[UID] is a dictionary
                and X[UID][State] another dictionary
   torStateIndx:dict of the form X[UID][State]=Index which is a
                list of integers that stores the structure index
                value in the atomCoordinates List. 
binAngles(s, filename)

 
Takes in a set of pdb filename and analyze the
rotomerics state of each pdb file. The result is
written in the file name [filename].angles
circularStat(s, l)

 
Added by Robin A Thottungal
Calculates the average of Circular Data(in this case angles)
Reference Book: Statistical analysis of circular data by
N. I. Fisher [ISBN:0521350182] 
getAngles(s, resType, resid, segid)

 
Given a residue, the method returns the rotomerics state
definition for the residue. 
getBin(s, resType, taname, val)

 
Given the residue type and torsion angle name, the method finds out
the states in which the torsion angle can exit and return the angle
that is closest to the val.
getBranch(s, theta1, theta2)

 
return the branch number n such that n*2*PI+theta1-theta2 is
minimal
getscTorsionAtoms(s, resname)

 
linearAverage(s, l)

 
# linearAverage / linearDeviation does not give correct answer
# for circular data always. Use circularStat() instead..
linearDeviation(s, l)

 

 
Data
        __package__ = None
argv = ['/home/schwitrs/xplor-bzr/bin/xplor', '/home/schwitrs/xplor/python/xplorDoc.py', '-w', 'xplor', 'ivm', 'monteCarlo', 'trace', 'trajFile', 'selectLogic', 'selectTools', 'xplorInit', 'vmdInter', 'checkWrap', 'hybridMC', 'atomAction', 'potCosAngleRatio', 'rdcPotTools', 'simulationTools', 'shapePotTools', 'pck2xplor', ...]
binData = {'ASN_CHI2': (('0', 0), ('180', 180)), 'ASP_CHI2': (('0', 0), ('180', 180)), 'GLN_CHI3': (('0', 0), ('180', 180)), 'GLU_CHI3': (('0', 0), ('180', 180)), 'HIS_CHI2': (('+90', 90), ('-90', -90)), 'PHE_CHI2': (('+90', 90), ('-90', -90)), 'TRP_CHI2': (('+90', 90), ('-90', -90)), 'TYR_CHI2': (('+90', 90), ('-90', -90))}
pi = 3.1415926535897931
scTorsionAtoms = {'ALA': [], 'ARG': [('CHI1', ('N', 'CA', 'CB', 'CG')), ('CHI2', ('CA', 'CB', 'CG', 'CD')), ('CHI3', ('CB', 'CG', 'CD', 'NE')), ('CHI4', ('CG', 'CD', 'NE', 'CZ'))], 'ASN': [('CHI1', ('N', 'CA', 'CB', 'CG')), ('CHI2', ('CA', 'CB', 'CG', 'OD1'))], 'ASP': [('CHI1', ('N', 'CA', 'CB', 'CG')), ('CHI2', ('CA', 'CB', 'CG', 'OD1'))], 'CYS': [('CHI1', ('N', 'CA', 'CB', 'SG'))], 'GLN': [('CHI1', ('N', 'CA', 'CB', 'CG')), ('CHI2', ('CA', 'CB', 'CG', 'CD')), ('CHI3', ('CB', 'CG', 'CD', 'OE1'))], 'GLU': [('CHI1', ('N', 'CA', 'CB', 'CG')), ('CHI2', ('CA', 'CB', 'CG', 'CD')), ('CHI3', ('CB', 'CG', 'CD', 'OE1'))], 'GLY': [], 'HIS': [('CHI1', ('N', 'CA', 'CB', 'CG')), ('CHI2', ('CA', 'CB', 'CG', 'ND1'))], 'ILE': [('CHI1', ('N', 'CA', 'CB', 'CG1')), ('CHI21', ('CA', 'CB', 'CG1', 'CD1'))], ...}