OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Data Structures | Functions
ost.mol.alg.stereochemistry Namespace Reference

Data Structures

class  ClashInfo
 
class  BondViolationInfo
 
class  AngleViolationInfo
 

Functions

def StereoDataFromMON_LIB
 
def GetBondParam
 
def GetAngleParam
 
def GetClashes
 
def GetBadBonds
 
def GetBadAngles
 
def StereoCheck
 
def GetDefaultStereoData
 
def GetDefaultStereoLinkData
 

Function Documentation

def ost.mol.alg.stereochemistry.GetAngleParam (   a1,
  a2,
  a3,
  stereo_data = None,
  stereo_link_data = None 
)
Returns mean and standard deviation for angle

:param a1: First atom that defines angle
:type a1: :class:`ost.mol.AtomView`/:class:`ost.mol.AtomHandle`
:param a2: Second atom that defines angle
:type a2: :class:`ost.mol.AtomView`/:class:`ost.mol.AtomHandle`
:param a3: Third atom that defines angle
:type a3: :class:`ost.mol.AtomView`/:class:`ost.mol.AtomHandle`
:param stereo_data: Stereochemistry data, use return value of
                    :func:`GetDefaultStereoData` if not given.
                    If you call this function repeatedly, you
                    really should provide *stereo_data*!
:type stereo_data: :class:`dict`
:param stereo_link_data: Stereochemistry data, use return value of
                         :func:`GetDefaultStereoLinkData` if not given.
                         If you call this function repeatedly, you
                         really should provide *stereo_link_data*!
:type stereo_link_data: :class:`dict`
:returns: :class:`tuple` with mean and standard deviation. Values are None
          if respective angle is not found in *stereo_data*

Definition at line 298 of file stereochemistry.py.

def ost.mol.alg.stereochemistry.GetBadAngles (   ent,
  stereo_data = None,
  stereo_link_data = None,
  tolerance = 12 
)
Identify unrealistic angles

:param ent: Entity for which you want to identify unrealistic angles
:type ent: :class:`ost.mol.EntityHandle`/:class:`ost.mol.EntityView`
:param stereo_data: Stereochemistry data, use return value of
                    :func:`GetDefaultStereoData` if not given.
:type stereo_data: :class:`dict`
:param stereo_link_data: Stereochemistry data, use return value of
                         :func:`GetDefaultStereoLinkData` if not given.
:type stereo_link_data: :class:`dict`
:param tolerance: Angles that devaiate more than *tolerance* times standard
                  deviation from expected mean are considered bad
:type tolerance: :class:`int`
:returns: :class:`list` of :class:`AngleViolationInfo`

Definition at line 554 of file stereochemistry.py.

def ost.mol.alg.stereochemistry.GetBadBonds (   ent,
  stereo_data = None,
  stereo_link_data = None,
  tolerance = 12 
)
Identify unrealistic bonds

:param ent: Entity for which you want to identify unrealistic bonds
:type ent: :class:`ost.mol.EntityHandle`/:class:`ost.mol.EntityView`
:param stereo_data: Stereochemistry data, use return value of
                    :func:`GetDefaultStereoData` if not given.
:type stereo_data: :class:`dict`
:param stereo_link_data: Stereochemistry data, use return value of
                         :func:`GetDefaultStereoLinkData` if not given.
:type stereo_link_data: :class:`dict`
:param tolerance: Bonds that devaiate more than *tolerance* times standard
                  deviation from expected mean are considered bad
:type tolerance: :class:`int`
:returns: :class:`list` :class:`BondViolationInfo`

Definition at line 519 of file stereochemistry.py.

def ost.mol.alg.stereochemistry.GetBondParam (   a1,
  a2,
  stereo_data = None,
  stereo_link_data = None 
)
Returns mean and standard deviation for bond

:param a1: First atom that defines bond
:type a1: :class:`ost.mol.AtomView`/:class:`ost.mol.AtomHandle`
:param a2: Second atom that defines bond
:type a2: :class:`ost.mol.AtomView`/:class:`ost.mol.AtomHandle`
:param stereo_data: Stereochemistry data, use return value of
                    :func:`GetDefaultStereoData` if not given.
                    If you call this function repeatedly, you
                    really should provide *stereo_data*!
:type stereo_data: :class:`dict`
:param stereo_link_data: Stereochemistry data, use return value of
                         :func:`GetDefaultStereoLinkData` if not given.
                         If you call this function repeatedly, you
                         really should provide *stereo_link_data*!
:type stereo_link_data: :class:`dict`
:returns: :class:`tuple` with mean and standard deviation. Values are None
          if respective bond is not found in *stereo_data*

Definition at line 248 of file stereochemistry.py.

def ost.mol.alg.stereochemistry.GetClashes (   ent,
  vdw_radii = None,
  tolerance = 1.5,
  disulfid_dist = 2.03,
  disulfid_tolerance = 1.0 
)
Identifies clashing atoms

A clash between two non-bonded atoms is defined as their distance d being
below the sum of their vdw radii with some subtracted tolerance value.

The default values are not very sensitive.

:param ent: Entity for which you want to identify clashing atoms
:type ent: :class:`ost.mol.EntityHandle`/:class:`ost.mol.EntityView`
:param vdw_radii: Element based van der Waals radii. Only atoms of these
                  elements will be considered. If not given, default values
                  for all elements occuring in proteins/nucleotides are
                  used. Must be provided as :class:`dict`, where they key
                  are elements (capitalized) and value the respective radii
                  in Angstrom.
:type vdw_radii: :class:`dict`
:param tolerance: Tolerance value
:param disulfid_dist: Summed vdw radius that is used if two Sulfurs that can
                      potentially build a disulfid bond interact
:type disulfid_dist: :class:`float`
:param disulfid_tolerance: The respective tolerance
:type disulfid_dist: :class:`float`
:returns: A :class:`list` of :class:`ClashInfo`

Definition at line 446 of file stereochemistry.py.

def ost.mol.alg.stereochemistry.GetDefaultStereoData ( )
Get default stereo data derived from CCP4 MON_LIB

Used as default if not provided in :func:`GetBadBonds`, :func:`GetBadAngles`
and :func:`StereoCheck`.

MON_LIB is licensed under GNU LESSER GENERAL PUBLIC LICENSE Version 3.
Consult the latest CCP4 for the full license text.

Definition at line 674 of file stereochemistry.py.

def ost.mol.alg.stereochemistry.GetDefaultStereoLinkData ( )
Get default stereo data for links between compounds

Hardcoded from arbitrary sources, see comments in the code.

:returns: Data for peptide bonds, nucleotide links and disulfid bonds that
          are used as default if not provided in :func:`GetBadBonds`,
          :func:`GetBadAngles` and :func:`StereoCheck`.

Definition at line 688 of file stereochemistry.py.

def ost.mol.alg.stereochemistry.StereoCheck (   ent,
  stereo_data = None,
  stereo_link_data = None 
)
Remove atoms with stereochemical problems

Selects for peptide/nucleotides and calls :func:`GetClashes`,
:func:`GetBadBonds` and :func:`GetBadAngles` with default
parameters.

* Amino acids: Remove full residue if backbone atom is involved in
  stereochemistry issue ("N", "CA", "C", "O"). Remove sidechain if any of
  the sidechain atoms is involved in stereochemistry issues.
* Nucleotides: Remove full residue if backbone atom is involved in
  stereochemistry issue ("P", "OP1", "OP2", "OP3", "O5'", "C5'", "C4'",
  "C3'", "C2'", "C1'", "O4'", "O3'", "O2'"). Remove sidechain (base) if any
  of the sidechain atoms is involved in stereochemistry issues.

:param ent: Entity to be stereochecked
:type ent: :class:`ost.mol.EntityHandle`/:class:`ost.mol.EntityView`
:param stereo_data: Stereochemistry data, use return value of
                    :func:`GetDefaultStereoData` if not given.
:type stereo_data: :class:`dict`
:param stereo_link_data: Stereochemistry data, use return value of
                         :func:`GetDefaultStereoLinkData` if not given.
:type stereo_link_data: :class:`dict`
:returns: Tuple with four elements: 1) :class:`ost.mol.EntityView` of
          *ent* processed as described above 2) Return value of
          :func:`GetClashes` 3) return value of :func:`GetBadBonds`
          4) return value of :func:`GetBadAngles`

Definition at line 589 of file stereochemistry.py.

def ost.mol.alg.stereochemistry.StereoDataFromMON_LIB (   mon_lib_path,
  compounds = None 
)
Parses stereochemistry parameters from CCP4 MON_LIB

CCP4 `MON_LIB <https://www.ccp4.ac.uk/html/mon_lib.html>`_ contains
data on ideal bond lengths/angles for compounds.

Original data (several updates in the meantime) come from:

* Amino acid bond lengths and angles: Engh and Huber, Acta Cryst.
  A47, 392-400 (1991).
* Purine and pyrimidine bond lengths and angles: O. Kennard & R. Taylor
  (1982), J. Am. Soc. Chem. vol. 104, pp. 3209-3212.
* Sugar-phosphate backbone bond lengths and bond angles: W. Saenger’s
  Principles of Nucleic Acid Structure (1983), Springer-Verlag, pp. 70,86.

This function adds a dependency to the
`gemmi <https://github.com/project-gemmi/gemmi/>`_ library to read cif
files.

:param mon_lib_path: Path to CCP4 MON_LIB
:type mon_lib_path: :class:`str`
:param compounds: Compounds to parse - parses proteinogenic amino acids
                  and nucleotides if not given.
:type compounds: :class:`list`
:returns: :class:`dict` with stereochemistry parameters

Definition at line 183 of file stereochemistry.py.