diff --git a/modelling/doc/monte_carlo.rst b/modelling/doc/monte_carlo.rst index 9a0b6f5eef70a0bbe18b2ec804d6c78aed932b36..91281f7328832e647308ccd36f629b0da5213e75 100644 --- a/modelling/doc/monte_carlo.rst +++ b/modelling/doc/monte_carlo.rst @@ -30,7 +30,46 @@ Sampler Object The sampler objects can be used to generate initial conformations and 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,\ 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 conformations typically have to undergo some structural changes, so they fit to a given environment. This can either be structural changes, that 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) @@ -361,8 +425,25 @@ Scorer Object -------------------------------------------------------------------------------- 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,\ chain_idx, linear_weights) @@ -412,7 +493,24 @@ Cooler Object The cooler objects control the temperature of the Monte Carlo trajectory. 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)