Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
aca26f51
Commit
aca26f51
authored
6 years ago
by
Rafal Gumienny
Browse files
Options
Downloads
Patches
Plain Diff
docs: SCHWED-3121 Update lDDT examples
parent
18dcd749
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/mol/alg/doc/lddt.rst
+34
-14
34 additions, 14 deletions
modules/mol/alg/doc/lddt.rst
modules/mol/alg/doc/molalg.rst
+24
-2
24 additions, 2 deletions
modules/mol/alg/doc/molalg.rst
with
58 additions
and
16 deletions
modules/mol/alg/doc/lddt.rst
+
34
−
14
View file @
aca26f51
...
...
@@ -198,11 +198,16 @@ One can replicate the binary using simple python script:
CheckStructure,
LocalDistDiffTest,
GetlDDTPerResidueStats,
PrintlDDTPerResidueStats)
from ost.io import StereoChemicalParamsReader
PrintlDDTPerResidueStats,
ResidueNamesMatch)
from ost.io import ReadStereoChemicalPropsFile
model_path = "Path to your model pdb file"
reference_path = "Path to your reference pdb file"
structural_checks = True
bond_tolerance = 12
angle_tolerance = 12
cutoffs = [0.5, 1.0, 2.0, 4.0]
#
# Load model and prepare its view
model = LoadPDB(model_path)
...
...
@@ -220,29 +225,44 @@ One can replicate the binary using simple python script:
CleanlDDTReferences(references)
#
# Prepare residue map from references
rdmap = PreparelDDTGlobalRDMap(references, settings)
rdmap = PreparelDDTGlobalRDMap(references,
cutoffs=cutoffs,
sequence_separation=0,
radius=15)
#
# This part is optional and it depends on our settings parameter
if settings.structural_checks:
stereochemical_parameters = StereoChemicalParamsReader(
settings.parameter_file_path)
stereochemical_parameters.Read()
if structural_checks:
stereochemical_parameters = ReadStereoChemicalPropsFile()
CheckStructure(ent=model_view,
bond_table=stereochemical_parameters.bond_table,
angle_table=stereochemical_parameters.angle_table,
nonbonded_table=stereochemical_parameters.nonbonded_table,
bond_tolerance=settings.bond_tolerance,
angle_tolerance=settings.angle_tolerance)
bond_tolerance=bond_tolerance,
angle_tolerance=angle_tolerance)
#
# Check consistency
is_cons = ResidueNamesMatch(model_view, references[0], True)
print "Consistency check: ", "OK" if is_cons else "ERROR"
#
# Calculate lDDT
LocalDistDiffTest(model_view, references, rdmap, settings)
LocalDistDiffTest(model_view,
references,
rdmap,
settings)
#
# Get the local scores
local_scores = GetlDDTPerResidueStats(model, rdmap, settings)
local_scores = GetlDDTPerResidueStats(model_view,
rdmap,
structural_checks,
settings.label)
#
# Pring local scores
PrintlDDTPerResidueStats(local_scores, settings)
PrintlDDTPerResidueStats(local_scores, structural_checks, len(cutoffs))
Similar effect could be obtained using lDDTScorer. See :class:`~ost.mol.alg.lDDTScorer`
for a simple example.
Th
is
can be useful when we already have an models and references already
read
in the memory and we do not want run the binary.
Th
e Python API
can be useful when we already have an models and references already
read
in the memory and we do not want run the binary.
Please refere to specific function documentation for more details.
This diff is collapsed.
Click to expand it.
modules/mol/alg/doc/molalg.rst
+
24
−
2
View file @
aca26f51
...
...
@@ -548,11 +548,33 @@ Local Distance Test scores (lDDT, DRMSD)
Object to compute lDDT scores.
Example usage
with pre-prepared references
.
Example usage.
.. code:: python
import ost
#! /bin/env python
"""Run lDDT from within script."""
from ost.io import LoadPDB
from ost.mol.alg import (CleanlDDTReferences,
lDDTSettings, lDDTScorer)
from ost.io import ReadStereoChemicalPropsFile
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`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment