diff --git a/loop/doc/structure_db.rst b/loop/doc/structure_db.rst
index 459b6a13fb9b352d5a2527c850d84fc7aedd20f7..d0af15cb30e81a8e8f9610de2531ec2833e516c1 100644
--- a/loop/doc/structure_db.rst
+++ b/loop/doc/structure_db.rst
@@ -752,9 +752,6 @@ arbitrary linear combination of following components:
Allow read/write access (with [*id*]) to fragger object with given ID.
-.. autoclass:: FraggerHandle
- :members:
-
The PsipredPrediction class
--------------------------------------------------------------------------------
diff --git a/loop/pymod/CMakeLists.txt b/loop/pymod/CMakeLists.txt
index a7a6bbf507277cc0ca060ba7eadae7b7527bc9be..734a9a538c00f6feff3d275839508c0f15ad5916 100644
--- a/loop/pymod/CMakeLists.txt
+++ b/loop/pymod/CMakeLists.txt
@@ -16,7 +16,6 @@ set(LOOP_CPP
set(LOOP_PYMOD
__init__.py
- _fragger.py
)
pymod(NAME loop CPP ${LOOP_CPP} PY ${LOOP_PYMOD})
diff --git a/loop/pymod/__init__.py b/loop/pymod/__init__.py
index ee8324a960641022d626998c19e4de91f1ca39d4..fc70505fd93e0ec4f2cfe0b6286935732beb3457 100644
--- a/loop/pymod/__init__.py
+++ b/loop/pymod/__init__.py
@@ -2,4 +2,4 @@
# geom needed for export_backbone
from ost import geom
from _loop import *
-from _fragger import *
+
diff --git a/modelling/doc/algorithms.rst b/modelling/doc/algorithms.rst
index 7a0c8be6f5d85f55ebde1039500c92f74a9e501d..e38de593b9bbb75c228287fd22bdf395285538ba 100644
--- a/modelling/doc/algorithms.rst
+++ b/modelling/doc/algorithms.rst
@@ -213,8 +213,14 @@ subsets of positions.
De Novo Modelling
--------------------------------------------------------------------------------
-ProMod3 provides algorithms for sampling and fragment detection. Here we provide
-a convenient function to combine the functionalities into an example pipeline
+ProMod3 provides algorithms for sampling and fragment detection.
+Here we provide an object, that facilitates fragment detection and caching,
+as well as a convenient function to combine the functionalities into an
+example pipeline.
+
+.. autoclass:: FraggerHandle
+ :members:
+
.. autofunction:: GenerateDeNovoTrajectories
diff --git a/modelling/pymod/CMakeLists.txt b/modelling/pymod/CMakeLists.txt
index 78ee6a047345e90cd8c9721cfe9510f1fd38ad56..09d856ed425ceff0042c2ef66d8bcaf57ebb89a6 100644
--- a/modelling/pymod/CMakeLists.txt
+++ b/modelling/pymod/CMakeLists.txt
@@ -20,6 +20,7 @@ set(MODELLING_PYMOD
_pipeline.py
_ring_punches.py
_denovo.py
+ _fragger_handle.py
)
pymod(NAME modelling
diff --git a/modelling/pymod/__init__.py b/modelling/pymod/__init__.py
index bff7496f49588cb6c0b33eecf9895573669fd262..e92e7ff5e6f8290b8edc42c57e1fec420c99d2e0 100644
--- a/modelling/pymod/__init__.py
+++ b/modelling/pymod/__init__.py
@@ -5,3 +5,4 @@ from _molprobity import *
from _pipeline import *
from _ring_punches import *
from _denovo import *
+from _fragger_handle import *
diff --git a/modelling/pymod/_closegaps.py b/modelling/pymod/_closegaps.py
index fcfd8d5ff6c2781cb0ca1f39286bb6b1a6053d6f..40d2dc1e6434c216e5ee522ef21a7cb0028d9a6b 100644
--- a/modelling/pymod/_closegaps.py
+++ b/modelling/pymod/_closegaps.py
@@ -888,7 +888,7 @@ def FillLoopsByMonteCarlo(mhandle, torsion_sampler, max_loops_to_search=6,
:param fragger_handles: Either None (no fragger sampling used) or one
fragger handle for each chain in *mhandle*.
- :type fragger_handles: :class:`list` of :class:`~promod3.loop.FraggerHandle`
+ :type fragger_handles: :class:`list` of :class:`~promod3.modelling.FraggerHandle`
:param chain_idx: If not None, only gaps from chain with given index get
processed
@@ -1090,7 +1090,7 @@ def CloseGaps(mhandle, merge_distance=4, fragment_db=None, structure_db=None,
and :func:`FillLoopsByMonteCarlo` A default one is
loaded if None.
:type torsion_sampler: :class:`promod3.loop.TorsionSampler`
- :param fragger_handles: A list of :class:`promod3.loop.FraggerHandle`
+ :param fragger_handles: A list of :class:`promod3.modelling.FraggerHandle`
objects for each chain in **mhandle**.
If provided, fragments will be used for
sampling when the :func:`FillLoopsByMonteCarlo`
@@ -1178,7 +1178,7 @@ def ModelTermini(mhandle, torsion_sampler, fragger_handles=None,
:param fragger_handles: Either None (no fragger sampling used) or one
fragger handle for each chain in *mhandle*.
- :type fragger_handles: :class:`list` of :class:`~promod3.loop.FraggerHandle`
+ :type fragger_handles: :class:`list` of :class:`~promod3.modelling.FraggerHandle`
:param mc_num_loops: Number of loop candidates to consider for each terminal gap
(see :meth:`~LoopCandidates.FillFromMonteCarloSampler`)
diff --git a/modelling/pymod/_denovo.py b/modelling/pymod/_denovo.py
index 15510c0e4bf333cc90321964c9e6b1929764481f..94a06c8ca623df214a99c9f88e3cf8ab474a2292 100644
--- a/modelling/pymod/_denovo.py
+++ b/modelling/pymod/_denovo.py
@@ -36,8 +36,10 @@ def GenerateDeNovoTrajectories(sequence,
:param fragment_handler: You can provide already initialized fragments.
If you pass this parameter, **profile** and
**psipred_prediction** get neglected and do
- not influence the fragment search...
- :type fragment_handler: :class:`promod3.loop.FraggerHandle`
+ not influence the fragment search, the
+ ones you initialized **fragment_handler** with
+ get used instead.
+ :type fragment_handler: :class:`promod3.modelling.FraggerHandle`
:param scorer: Scorer doing the backbone scoring. If not provided, a
default one gets loaded with default objects with
@@ -71,9 +73,9 @@ def GenerateDeNovoTrajectories(sequence,
if fragment_handler == None:
# we first have to build our own handler
- fragment_handler = loop.FraggerHandle(sequence,
- profile = profile,
- psipred_pred = psipred_prediction)
+ fragment_handler = modelling.FraggerHandle(sequence,
+ profile = profile,
+ psipred_pred = psipred_prediction)
fragger_list = fragment_handler.GetList()
if scorer == None:
diff --git a/loop/pymod/_fragger.py b/modelling/pymod/_fragger_handle.py
similarity index 96%
rename from loop/pymod/_fragger.py
rename to modelling/pymod/_fragger_handle.py
index 84d6ce428a619c2ef43a04f2ccfefd911f1ee6d1..3f5bc038311270695decbdf46c99bde90476427e 100644
--- a/loop/pymod/_fragger.py
+++ b/modelling/pymod/_fragger_handle.py
@@ -1,8 +1,6 @@
'''Python functionality to generate fraggers.'''
-# internal
-from _loop import *
-# external
+from promod3.loop import *
from ost.conop import OneLetterCodeToResidueName
from ost import seq
@@ -145,7 +143,7 @@ class FraggerHandle:
* Sequence Profile Score
* Structure Profile Score
- The FraggerHandle internally uses the :class:`FraggerMap` for caching. You
+ The FraggerHandle internally uses the :class:`promod3.loop.FraggerMap` for caching. You
can therefore request fragments for a certain position several times and the
search is performed only once. This also allows to save the FraggerHandle to
disk. When loading the FraggerHandle again, you need to provide all parameters
@@ -158,7 +156,7 @@ class FraggerHandle:
:param profile: Sequence profile for this chain.
:type profile: :class:`ost.seq.ProfileHandle`
:param psipred_pred: Psipred prediction for this chain.
- :type psipred_pred: :class:`ost.seq.PsipredPrediction`
+ :type psipred_pred: :class:`promod3.loop.PsipredPrediction`
:param fragment_length: Length (num. residues) of fragments to be extracted.
:type fragment_length: :class:`int`
:param fragments_per_position: Number of fragments to be extracted at each
@@ -168,13 +166,13 @@ class FraggerHandle:
at a given position will have RMSD below `rmsd_thresh`.
:type rmsd_thresh: :class:`float`
:param structure_db: Source of structural data
- :type structure_db: :class:`StructureDB`
+ :type structure_db: :class:`promod3.loop.StructureDB`
:param torsion_sampler_coil: Torsion sampler for coil residues.
- :type torsion_sampler_coil: :class:`TorsionSampler`
+ :type torsion_sampler_coil: :class:`promod3.loop.TorsionSampler`
:param torsion_sampler_helix: Torsion sampler for helical residues.
- :type torsion_sampler_helix: :class:`TorsionSampler`
+ :type torsion_sampler_helix: :class:`promod3.loop.TorsionSampler`
:param torsion_sampler_extended: Torsion sampler for extended residues.
- :type torsion_sampler_extended: :class:`TorsionSampler`
+ :type torsion_sampler_extended: :class:`promod3.loop.TorsionSampler`
'''
def __init__(self,
sequence,