From c27d449d4ac5de1da8f5b6a5663ad2be3ca19894 Mon Sep 17 00:00:00 2001 From: Gabriel Studer <gabriel.studer@unibas.ch> Date: Mon, 23 Dec 2024 11:23:58 +0100 Subject: [PATCH] expose keep_sidechains flag in promod3.modelling.BuildSidechains --- modelling/pymod/_pipeline.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modelling/pymod/_pipeline.py b/modelling/pymod/_pipeline.py index db7fc2ad..1302bcf5 100644 --- a/modelling/pymod/_pipeline.py +++ b/modelling/pymod/_pipeline.py @@ -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() -- GitLab