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_LIBcompounds (
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:
a1 (
ost.mol.AtomView
/ost.mol.AtomHandle
) – First atom that defines bonda2 (
ost.mol.AtomView
/ost.mol.AtomHandle
) – Second atom that defines bondstereo_data (
dict
) – Stereochemistry data, use return value ofGetDefaultStereoData()
if not given. If you call this function repeatedly, you really should provide stereo_data!stereo_link_data (
dict
) – Stereochemistry data, use return value ofGetDefaultStereoLinkData()
if not given. If you call this function repeatedly, you really should provide stereo_link_data!
- 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:
a1 (
ost.mol.AtomView
/ost.mol.AtomHandle
) – First atom that defines anglea2 (
ost.mol.AtomView
/ost.mol.AtomHandle
) – Second atom that defines anglea3 (
ost.mol.AtomView
/ost.mol.AtomHandle
) – Third atom that defines anglestereo_data (
dict
) – Stereochemistry data, use return value ofGetDefaultStereoData()
if not given. If you call this function repeatedly, you really should provide stereo_data!stereo_link_data (
dict
) – Stereochemistry data, use return value ofGetDefaultStereoLinkData()
if not given. If you call this function repeatedly, you really should provide stereo_link_data!
- 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:
a1 (
ost.mol.AtomHandle
)a2 (
ost.mol.AtomHandle
)dist (
float
)tolerated_dist (
float
)
- 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:
a1 (
ost.mol.AtomHandle
)a2 (
ost.mol.AtomHandle
)length (
float
)exp_length (
float
)std (
float
)
- 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:
a1 (
ost.mol.AtomHandle
)a2 (
ost.mol.AtomHandle
)a3 (
ost.mol.AtomHandle
)angle (
float
)exp_angle (
float
)std (
float
)
- 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 atomsvdw_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 asdict
, 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 interactdisulfid_tolerance – The respective tolerance
- Returns:
A
list
ofClashInfo
- 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 bondsstereo_data (
dict
) – Stereochemistry data, use return value ofGetDefaultStereoData()
if not given.stereo_link_data (
dict
) – Stereochemistry data, use return value ofGetDefaultStereoLinkData()
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 anglesstereo_data (
dict
) – Stereochemistry data, use return value ofGetDefaultStereoData()
if not given.stereo_link_data (
dict
) – Stereochemistry data, use return value ofGetDefaultStereoLinkData()
if not given.tolerance (
int
) – Angles that devaiate more than tolerance times standard deviation from expected mean are considered bad
- Returns:
list
ofAngleViolationInfo
- StereoCheck(ent, stereo_data=None, stereo_link_data=None)¶
Remove atoms with stereochemical problems
Selects for peptide/nucleotides and calls
GetClashes()
,GetBadBonds()
andGetBadAngles()
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:
ent (
ost.mol.EntityHandle
/ost.mol.EntityView
) – Entity to be stereocheckedstereo_data (
dict
) – Stereochemistry data, use return value ofGetDefaultStereoData()
if not given.stereo_link_data (
dict
) – Stereochemistry data, use return value ofGetDefaultStereoLinkData()
if not given.
- Returns:
Tuple with four elements: 1)
ost.mol.EntityView
of ent processed as described above 2) Return value ofGetClashes()
3) return value ofGetBadBonds()
4) return value ofGetBadAngles()
- GetDefaultStereoData()¶
Get default stereo data derived from CCP4 MON_LIB
Used as default if not provided in
GetBadBonds()
,GetBadAngles()
andStereoCheck()
.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()
andStereoCheck()
.