stereochemistry – Stereochemistry Checks

Note

This is a new implementation of the stereochemistry checks, introduced in OpenStructure 2.4, with support for nucleotides. The previous stereochemistry checks that come with Mariani et al. are considered deprecated.

StereoDataFromMON_LIB(mon_lib_path, compounds=None)

Parses stereochemistry parameters from CCP4 MON_LIB

CCP4 MON_LIB 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 library to read cif files.

Parameters:
  • mon_lib_path (str) – Path to CCP4 MON_LIB

  • compounds (list) – Compounds to parse - parses proteinogenic amino acids and nucleotides if not given.

Returns:

dict with stereochemistry parameters

GetBondParam(a1, a2, stereo_data=None, stereo_link_data=None)

Returns mean and standard deviation for bond

Parameters:
Returns:

tuple with mean and standard deviation. Values are None if respective bond is not found in stereo_data

GetAngleParam(a1, a2, a3, stereo_data=None, stereo_link_data=None)

Returns mean and standard deviation for angle

Parameters:
Returns:

tuple with mean and standard deviation. Values are None if respective angle is not found in stereo_data

class ClashInfo(a1, a2, dist, tolerated_dist)

Object to hold info on clash

Constructor arguments are available as attributes:

ToJSON(decimals=3)

Return JSON serializable dict

Atoms are represented by a string in format: <chain_name>.<resnum>.<resnum_inscode>.<atom_name>

class BondViolationInfo(a1, a2, length, exp_length, std)

Object to hold info on bond violation

Constructor arguments are available as attributes:

ToJSON(decimals=3)

Return JSON serializable dict

Atoms are represented by a string in format: <chain_name>.<resnum>.<resnum_inscode>.<atom_name>

class AngleViolationInfo(a1, a2, a3, angle, exp_angle, std)

Object to hold info on angle violation

Constructor arguments are available as attributes:

ToJSON(decimals=3)

Return JSON serializable dict

Atoms are represented by a string in format: <chain_name>.<resnum>.<resnum_inscode>.<atom_name>

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.

Parameters:
  • ent (ost.mol.EntityHandle/ost.mol.EntityView) – Entity for which you want to identify clashing atoms

  • vdw_radii (dict) – 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 dict, where they key are elements (capitalized) and value the respective radii in Angstrom.

  • tolerance – Tolerance value

  • disulfid_dist (float) – Summed vdw radius that is used if two Sulfurs that can potentially build a disulfid bond interact

  • disulfid_tolerance – The respective tolerance

Returns:

A list of ClashInfo

GetBadBonds(ent, stereo_data=None, stereo_link_data=None, tolerance=12)

Identify unrealistic bonds

Parameters:
  • ent (ost.mol.EntityHandle/ost.mol.EntityView) – Entity for which you want to identify unrealistic bonds

  • stereo_data (dict) – Stereochemistry data, use return value of GetDefaultStereoData() if not given.

  • stereo_link_data (dict) – Stereochemistry data, use return value of GetDefaultStereoLinkData() if not given.

  • tolerance (int) – Bonds that devaiate more than tolerance times standard deviation from expected mean are considered bad

Returns:

list BondViolationInfo

GetBadAngles(ent, stereo_data=None, stereo_link_data=None, tolerance=12)

Identify unrealistic angles

Parameters:
  • ent (ost.mol.EntityHandle/ost.mol.EntityView) – Entity for which you want to identify unrealistic angles

  • stereo_data (dict) – Stereochemistry data, use return value of GetDefaultStereoData() if not given.

  • stereo_link_data (dict) – Stereochemistry data, use return value of GetDefaultStereoLinkData() if not given.

  • tolerance (int) – Angles that devaiate more than tolerance times standard deviation from expected mean are considered bad

Returns:

list of AngleViolationInfo

StereoCheck(ent, stereo_data=None, stereo_link_data=None)

Remove atoms with stereochemical problems

Selects for peptide/nucleotides and calls GetClashes(), GetBadBonds() and 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.

Parameters:
Returns:

Tuple with four elements: 1) ost.mol.EntityView of ent processed as described above 2) Return value of GetClashes() 3) return value of GetBadBonds() 4) return value of GetBadAngles()

GetDefaultStereoData()

Get default stereo data derived from CCP4 MON_LIB

Used as default if not provided in GetBadBonds(), GetBadAngles() and StereoCheck().

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

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 GetBadBonds(), GetBadAngles() and StereoCheck().

Search

Enter search terms or a module, class or function name.

Contents

Documentation is available for the following OpenStructure versions:

dev / (Currently viewing 2.8) / 2.7 / 2.6 / 2.5 / 2.4 / 2.3.1 / 2.3 / 2.2 / 2.1 / 2.0 / 1.9 / 1.8 / 1.7.1 / 1.7 / 1.6 / 1.5 / 1.4 / 1.3 / 1.2 / 1.11 / 1.10 / 1.1

This documentation is still under heavy development!
If something is missing or if you need the C++ API description in doxygen style, check our old documentation for further information.