Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProMod3
Manage
Activity
Members
Plan
Jira
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
ProMod3
Commits
88750af1
Commit
88750af1
authored
6 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
document the base class concept in monte carlo sampling
parent
d73a080c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modelling/doc/monte_carlo.rst
+102
-4
102 additions, 4 deletions
modelling/doc/monte_carlo.rst
with
102 additions
and
4 deletions
modelling/doc/monte_carlo.rst
+
102
−
4
View file @
88750af1
...
@@ -30,7 +30,46 @@ Sampler Object
...
@@ -30,7 +30,46 @@ Sampler Object
The sampler objects can be used to generate initial conformations and
The sampler objects can be used to generate initial conformations and
propose new conformations for a sequence of interest. They build the basis
propose new conformations for a sequence of interest. They build the basis
for any Monte Carlo sampling pipeline.
for any Monte Carlo sampling pipeline. You can either use one of the
provided samplers or any object that implements the functionality of
:class:`SamplerBase`.
.. class:: SamplerBase
Abstract base class defining the functions that must be implemented by any
sampler.
.. method:: Initialize(bb_list)
Supposed to initialize structural information from scratch. The sequence
of the generated :class:`promod3.loop.BackboneList` is taken from *bb_list*.
:param bb_list: Passed by reference, so the resulting
:class:`promod3.loop.BackboneList` is assigned to this
parameter. Sequence / length stay the same.
:type bb_list: :class:`promod3.loop.BackboneList`
:returns: None
.. method:: ProposeStep(actual_positions, proposed_positions)
Takes current positions and proposes a new conformation. There is no
guarantee on maintining any special RT state. The :ref:`mc-closer-object`
is supposed to sort that out.
:param actual_positions: Starting point, must not change when calling this
function.
:param proposed_positions: Passed by reference, so the resulting
:class:`promod3.loop.BackboneList` is assigned to
this parameter.
:type actual_positions: :class:`promod3.loop.BackboneList`
:type proposed_positions: :class:`promod3.loop.BackboneList`
:returns: None
.. class:: PhiPsiSampler(sequence, torsion_sampler, n_stem_phi=-1.0472,\
.. class:: PhiPsiSampler(sequence, torsion_sampler, n_stem_phi=-1.0472,\
c_stem_psi=-0.78540, prev_aa='A', next_aa='A', seed=0)
c_stem_psi=-0.78540, prev_aa='A', next_aa='A', seed=0)
...
@@ -237,7 +276,32 @@ After the proposal of new conformations by the sampler objects, the
...
@@ -237,7 +276,32 @@ After the proposal of new conformations by the sampler objects, the
conformations typically have to undergo some structural changes, so they
conformations typically have to undergo some structural changes, so they
fit to a given environment. This can either be structural changes, that
fit to a given environment. This can either be structural changes, that
the stems of the sampled conformation overlap with given stem residues or
the stems of the sampled conformation overlap with given stem residues or
or simple stem superposition in case of terminal sampling.
or simple stem superposition in case of terminal sampling. You can either
use any of the provided closers or any object that implements the
functionality of :class:`CloserBase`.
.. class:: CloserBase
Abstract base class defining the functions that must be implemented by any
closer.
.. method:: Close(actual_positions, closed_positions)
Takes current positions and proposes a new conformation that fits to a
given environment.
:param actual_positions: Starting point, must not change when calling this
function.
:param closed_positions: Passed by reference, so the resulting
:class:`promod3.loop.BackboneList` is assigned to
this parameter.
:type actual_positions: :class:`promod3.loop.BackboneList`
:type closed_positions: :class:`promod3.loop.BackboneList`
:returns: Whether closing procedure was successful
:rtype: :class:`bool`
.. class:: CCDCloser(n_stem, c_stem, sequence, torsion_sampler, seed)
.. class:: CCDCloser(n_stem, c_stem, sequence, torsion_sampler, seed)
...
@@ -361,8 +425,25 @@ Scorer Object
...
@@ -361,8 +425,25 @@ Scorer Object
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
The scorer asses a proposed conformation and are intended to return a pseudo
The scorer asses a proposed conformation and are intended to return a pseudo
energy, the lower the better.
energy, the lower the better. You can either use the provided scorer or any
object implementing the functionality defined in :class:`ScorerBase`.
.. class:: ScorerBase
Abstract base class defining the functions that must be implemented by any
scorer.
.. method:: GetScore(bb_list)
Takes coordinates and spits out a score given some internal structural
environment.
:param bb_list: Coordinates to be scored
:type bb_list: :class:`promod3.loop.BackboneList`
:returns: The score
:rtype: :class:`float`
.. class:: LinearScorer(scorer, scorer_env, start_resnum, num_residues,\
.. class:: LinearScorer(scorer, scorer_env, start_resnum, num_residues,\
chain_idx, linear_weights)
chain_idx, linear_weights)
...
@@ -412,7 +493,24 @@ Cooler Object
...
@@ -412,7 +493,24 @@ Cooler Object
The cooler objects control the temperature of the Monte Carlo trajectory.
The cooler objects control the temperature of the Monte Carlo trajectory.
They're intended to deliver steadily decreasing temperatures with calls
They're intended to deliver steadily decreasing temperatures with calls
to their GetTemperature function.
to their GetTemperature function. You can either use the provided cooler
or any object implementing the functionality defined in
:class:`CoolerBase`.
.. class:: CoolerBase
Abstract base class defining the functions that must be implemented by any
cooler.
.. method:: GetTemperature()
:returns: The Temperature
:rtype: :class:`float`
.. method:: Reset()
Resets to original state, so a new Monte Carlo trajectory can be generated
.. class:: ExponentialCooler(change_frequency, start_temperature, cooling_factor)
.. class:: ExponentialCooler(change_frequency, start_temperature, cooling_factor)
...
...
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