Skip to content
Snippets Groups Projects
Commit 51b2d269 authored by Gerardo Tauriello's avatar Gerardo Tauriello
Browse files

SCHWED-1270: started doc for scoring module.

parent 4428d722
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,8 @@ set (DOC_TEST_SCRIPTS
scripts/loop_fragger.py
scripts/loop_torsion_sampler.py
scripts/scoring_main.py
scripts/modelling_all.py
scripts/modelling_steps.py
scripts/modelling_merge_gaps_by_distance.py
......
from ost import io, seq
from promod3 import loop, scoring
# load data
ent = io.LoadPDB("data/1CRN.pdb")
ent_seq = seq.SequenceFromChain('A', ent.FindChain('A'))
# setup score environment linked to entity
score_env = scoring.BackboneScoreEnv(ent_seq)
score_env.SetInitialEnvironment(ent)
# setup scorers attached to that env.
clash_scorer = scoring.ClashScorer()
clash_scorer.AttachEnvironment(score_env)
cbeta_scorer = scoring.LoadCBetaScorer()
cbeta_scorer.AttachEnvironment(score_env)
# get backbone list to be scored
# (here extracted from the structure, but it could be anything)
ev = ent.Select("rnum >= 23 and rnum <= 30")
bb_seq = ''.join([r.one_letter_code for r in ev.residues])
bb_res = [r.handle for r in ev.residues]
bb_list = loop.BackboneList(bb_seq, bb_res)
# score it (note that 23 is the starting res. num.)
print "Clash-Score", clash_scorer.CalculateScore(bb_list, 23)
print "CBeta-Score", cbeta_scorer.CalculateScore(bb_list, 23)
......@@ -285,6 +285,12 @@ class DocTests(unittest.TestCase):
################################################################
def testScoringMain(self):
# just check that it doesn't crash
self.checkPMRun('scoring_main.py', [], 0)
################################################################
def testModellingAll(self):
# run it
self.checkPMRun('modelling_all.py', [], 0)
......
......@@ -13,7 +13,8 @@ Contents:
actions/index
buildsystem
modelling/index
loop/index
sidechain/index
scoring/index
loop/index
core/index
core/setcompoundschemlib
set(LOOP_RST
index.rst
torsion_sampler.rst
loop_closing.rst
backbone.rst
backbone_loop_score.rst
monte_carlo.rst
structure_db.rst
load_loop_objects.rst
helper_classes.rst
index.rst
torsion_sampler.rst
loop_closing.rst
backbone.rst
backbone_loop_score.rst
monte_carlo.rst
structure_db.rst
load_loop_objects.rst
helper_classes.rst
)
add_doc_source(NAME loop RST ${LOOP_RST})
set(SCORING_RST
index.rst
backbone_score_env.rst
backbone_scorers.rst
)
add_doc_source(NAME scoring RST ${SCORING_RST})
Backbone Score Environment
================================================================================
.. currentmodule:: promod3.scoring
Backbone Scorers
================================================================================
.. currentmodule:: promod3.scoring
:mod:`~promod3.scoring` - Loop Scoring
================================================================================
.. module:: promod3.scoring
:synopsis: Loop Scoring
.. currentmodule:: promod3.scoring
Tools and algorithms to score loops.
The scoring system is split between an environment which contains positional
information and a scorer which evaluates a loop.
This example shows how we load a structure, setup a score environment and a few
scorers. The scorers are then used to evaluate the quality of a loop.
.. literalinclude:: ../../../tests/doc/scripts/scoring_main.py
Contents:
.. toctree::
:maxdepth: 2
Backbone Score Environment <backbone_score_env>
Backbone Scorers <backbone_scorers>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment