Skip to content
Snippets Groups Projects
Commit c27d449d authored by Studer Gabriel's avatar Studer Gabriel
Browse files

expose keep_sidechains flag in promod3.modelling.BuildSidechains

parent fddea94a
No related branches found
No related tags found
No related merge requests found
......@@ -183,7 +183,7 @@ def _GetSimEntity(sim):
def BuildSidechains(mhandle, merge_distance=4, fragment_db=None,
structure_db=None, torsion_sampler=None,
rotamer_library=None):
rotamer_library=None, keep_sidechains=True):
'''Build sidechains for model.
This is a wrapper for :func:`promod3.modelling.ReconstructSidechains`,
......@@ -213,7 +213,12 @@ def BuildSidechains(mhandle, merge_distance=4, fragment_db=None,
:func:`modelling.ReconstructSidechains`, a default
one is loaded if None.
:type rotamer_library: :class:`~promod3.sidechain.RotamerLib` or
:class:`~promod3.sidechain.BBDepRotamerLib`
:class:`~promod3.sidechain.BBDepRotamerLib`
:param keep_sidechains: Used as parameter for
:func:`~promod3.modelling.ReconstructSidechains`,
controls if complete sidechains in *mhandle* should
be kept and not re-modelled.
:type keep_sidechains: :class:`bool`
'''
prof = core.StaticRuntimeProfiler.StartScoped('pipeline::BuildSidechains')
ost.LogInfo("Rebuilding sidechains.")
......@@ -246,7 +251,7 @@ def BuildSidechains(mhandle, merge_distance=4, fragment_db=None,
FillLoopsByDatabase(mhandle, fragment_db, structure_db,
torsion_sampler, ring_punch_detection=2)
# re-build sidechains
ReconstructSidechains(mhandle.model, keep_sidechains=True,
ReconstructSidechains(mhandle.model, keep_sidechains=keep_sidechains,
rotamer_library=rotamer_library)
# restore gaps
mhandle.gaps = StructuralGapList()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment