-
Studer Gabriel authoredStuder Gabriel authored
:mod:`mol.alg <ost.mol.alg>` -- Algorithms for Structures
Local Distance Test scores (lDDT, DRMSD)
Object containing the stereo-chemical properties read form stereochmical_props.txt file.
param bond_table: | Sets :attr:`bond_table` |
---|---|
param angle_table: | Sets :attr:`angle_table` |
param nonbonded_table: | Sets :attr:`nonbonded_table` |
Object to compute lDDT scores using :func:`LocalDistDiffTest` as in Mariani et al..
Example usage.
#! /bin/env python
"""Run lDDT from within script."""
from ost.io import LoadPDB
from ost.mol.alg import (CleanlDDTReferences,
lDDTSettings, lDDTScorer)
ent_full = LoadPDB('3ia3', remote=True)
model_view = ent_full.Select('cname=A')
references = [ent_full.Select('cname=C')]
#
# Initialize settings with default parameters and print them
settings = lDDTSettings()
settings.PrintParameters()
# Clean up references
CleanlDDTReferences(references)
#
# Calculate lDDT
scorer = lDDTScorer(references=references, model=model_view, settings=settings)
print("Global score:", scorer.global_score)
scorer.PrintPerResidueStats()
param references: | Sets :attr:`references` |
---|---|
param model: | Sets :attr:`model` |
param settings: | Sets :attr:`settings` |
Object containing enough information to uniquely identify an atom in a structure.
param chain: | A string containing the name of the chain to which the atom belongs |
---|---|
param residue_number: | The number of the residue to which the atom belongs |
type residue_number: | :class:`~ost.mol.ResNum` |
param residue_name: | A string containing the name of the residue to which the atom belongs |
param atom_name: | A string containing the name of the atom |
Dictionary-like object containing the list of interatomic distances that originate from a single residue to be checked during a run of the Local Distance Difference Test algorithm (key = pair of :class:`UniqueAtomIdentifier`, value = pair of floats representing min and max distance observed in the structures used to build the map).
Dictionary-like object containing all the :class:`~ost.mol.alg.ResidueRDMap` objects related to all the residues (key = :class:`~ost.mol.ResNum`, value = :class:`ResidueRDMap`).
:mod:`qsscoring <ost.mol.alg.qsscoring>` -- Quaternary Structure (QS) scores
Steric Clashes
The following function detects steric clashes in atomic structures. Two atoms are clashing if their euclidian distance is smaller than a threshold value (minus a tolerance offset).
This object is returned by the :func:`FilterClashes` function, and contains information about the clashes detected by the function.
This object contains all the information relative to a single clash detected by the :func:`FilterClashes` function
This object is returned by the :func:`CheckStereoChemistry` function, and contains information about bond lengths and planar angle widths in the structure that diverge from the parameters tabulated by Engh and Huber in the International Tables of Crystallography. Only elements that diverge from the tabulated value by a minimumnumber of standard deviations (defined when the CheckStereoChemistry function is called) are reported.
This object contains all the information relative to a single detected violation of stereo-chemical parameters in a bond length
This object contains all the information relative to a single detected violation of stereo-chemical parameters in a planar angle width
Object containing information about clashing distances between non-bonded atoms
Object containing stereo-chemical information about bonds and angles. For each item (bond or angle in a specific residue), stores the mean and standard deviation
Superposing structures
Algorithms on Structures
The accessibility algorithm enum specifies the algorithm used by the respective tools. Available are:
NACCESS, DSSP
Result object for the membrane detection algorithm described below
Trajectory Analysis
This is a set of functions used for basic trajectory analysis such as extracting positions, distances, angles and RMSDs. The organization is such that most functions have their counterpart at the individual :class:`frame level <ost.mol.CoordFrame>` so that they can also be called on one frame instead of the whole trajectory.
All these functions have a "stride" argument that defaults to stride=1, which is used to skip frames in the analysis.
:mod:`helix_kinks <ost.mol.alg.helix_kinks>` -- Algorithms to calculate Helix Kinks
:mod:`trajectory_analysis <ost.mol.alg.trajectory_analysis>` -- DRMSD, pairwise distances and more
:mod:`structure_analysis <ost.mol.alg.structure_analysis>` -- Functions to analyze structures
Mapping functions
The following functions help to convert one residue into another by reusing as much as possible from the present atoms. They are mainly meant to map from standard amino acid to other standard amino acids or from modified amino acids to standard amino acids.
Molecular Checker (Molck)
Programmatic usage
Molecular Checker (Molck) could be called directly from the code using Molck function:
#! /bin/env python
"""Run Molck with Python API.
This is an exemplary procedure on how to run Molck using Python API which is
equivalent to the command line:
molck <PDB PATH> --rm=hyd,oxt,nonstd,unk \
--fix-ele --out=<OUTPUT PATH> \
--complib=<PATH TO compounds.chemlib>
"""
from ost.io import LoadPDB, SavePDB
from ost.mol.alg import MolckSettings, Molck
from ost.conop import CompoundLib
pdbid = "<PDB PATH>"
lib = CompoundLib.Load("<PATH TO compounds.chemlib>")
# Using Molck function
ent = LoadPDB(pdbid)
ms = MolckSettings(rm_unk_atoms=True,
rm_non_std=True,
rm_hyd_atoms=True,
rm_oxt_atoms=True,
rm_zero_occ_atoms=False,
colored=False,
map_nonstd_res=False,
assign_elem=True)
Molck(ent, lib, ms)
SavePDB(ent, "<OUTPUT PATH>")
It can also be split into subsequent commands for greater controll:
#! /bin/env python
"""Run Molck with Python API.
This is an exemplary procedure on how to run Molck using Python API which is
equivalent to the command line:
molck <PDB PATH> --rm=hyd,oxt,nonstd,unk \
--fix-ele --out=<OUTPUT PATH> \
--complib=<PATH TO compounds.chemlib>
"""
from ost.io import LoadPDB, SavePDB
from ost.mol.alg import (RemoveAtoms, MapNonStandardResidues,
CleanUpElementColumn)
from ost.conop import CompoundLib
pdbid = "<PDB PATH>"
lib = CompoundLib.Load("<PATH TO compounds.chemlib>")
map_nonstd = False
# Using function chain
ent = LoadPDB(pdbid)
if map_nonstd:
MapNonStandardResidues(lib=lib, ent=ent)
RemoveAtoms(lib=lib,
ent=ent,
rm_unk_atoms=True,
rm_non_std=True,
rm_hyd_atoms=True,
rm_oxt_atoms=True,
rm_zero_occ_atoms=False,
colored=False)
CleanUpElementColumn(lib=lib, ent=ent)
SavePDB(ent, "<OUTPUT PATH>")
API
Warning
The API here is set such that the functions modify the passed structure ent in-place. If this is not ok, please work on a copy of the structure.