Source code for promod3.pipeline.run_engine
'''Everything sticked together to build models using ProMod3
'''
import ost
from promod3 import loop
[docs]def BuildFromRawModel(raw_model, structure_db=None, fragment_db=None,
torsion_sampler=None):
'''Build a model starting with a
:class:`RawModel <promod3.rawmodel.RawModelingResult>`.
:param raw_model: The prepared template coordinates loaded with the input
alignment.
:type raw_model: :class:`~promod3.rawmodel.RawModelingResult`
:param structure_db: The structural database. Loads the default one shipped
with |project| if omitted.
:type structure_db: :class:`~promod3.loop.StructureDB`
:param fragment_db: A fragment database coupled to the *structure_db*.
Loads the default one shipped with |project| if omitted.
:type fragment_db: :class:`~promod3.loop.FragDB`
:param torsion_sampler: A sampler for torsion angles. Loads the default one
shipped with |project| if omitted.
:type torsion_sampler: :class:`~promod3.loop.TorsionSampler`
EXAMPLE: obtain raw model, build model
:return: Delivers the model as an |ost_s| entity.
:rtype: :class:`Entity <ost.mol.EntityHandle>`
'''
ost.LogVerbose("Starting modelling based on a raw model")
# a bit of setup
if structure_db == None:
structure_db = loop.LoadStructureDB()
if fragment_db == None:
fragment_db = loop.LoadFragDB()
if torsion_sampler == None:
torsion_sampler = loop.LoadTorsionSamplerCoil()
scorer = loop.SetupBackboneScorer(raw_model)
# step 1: close small deletions in the raw model
ost.LogVerbose("Trying to close small deletions.")
raw_model.CloseSmallDeletions(scorer)
return raw_model.model
__all__ = ('BuildProMod3Model')
# LocalWords: BuildProMod ProMod sticked ost promod BuildFromRawModel param
# LocalWords: RawModel rtype bool LoadStructureDB LogVerbose LoadFragDB
# LocalWords: LoadTorsionSamplerCoil SetupBackboneScorer
# LocalWords: CloseSmallDeletions