From 1590a8f0a89207695d974c5e2a63b94616ec8a7e Mon Sep 17 00:00:00 2001 From: Gabriel Studer <gabriel.studer@unibas.ch> Date: Thu, 4 Mar 2021 08:36:53 +0100 Subject: [PATCH] Remove requirement of terminal gaps having length > 1 in ModelTermini --- modelling/pymod/_closegaps.py | 4 +--- modelling/pymod/_pipeline.py | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modelling/pymod/_closegaps.py b/modelling/pymod/_closegaps.py index 5fdf7a44..337c281b 100644 --- a/modelling/pymod/_closegaps.py +++ b/modelling/pymod/_closegaps.py @@ -1275,8 +1275,6 @@ def ModelTermini(mhandle, torsion_sampler, fragger_handles=None, *fragger_handles* is given) :class:`~promod3.loop.Fragger` lists. The latter is only used if the gap length is >= the length of fragments stored. - Terminal gaps of length 1 are ignored by this function! - .. literalinclude:: ../../../tests/doc/scripts/modelling_model_termini.py :param mhandle: Modelling handle on which to apply change. @@ -1302,7 +1300,7 @@ def ModelTermini(mhandle, torsion_sampler, fragger_handles=None, prof = core.StaticRuntimeProfiler.StartScoped(prof_name) # get terminal gaps (copies as we'll clear them as we go) - terminal_gaps = [g.Copy() for g in mhandle.gaps if g.IsTerminal() and g.length > 1] + terminal_gaps = [g.Copy() for g in mhandle.gaps if g.IsTerminal()] if len(terminal_gaps) > 0: ost.LogInfo("Trying to model %d terminal gap(s)." % len(terminal_gaps)) else: diff --git a/modelling/pymod/_pipeline.py b/modelling/pymod/_pipeline.py index 44b2ef01..a4b5e870 100644 --- a/modelling/pymod/_pipeline.py +++ b/modelling/pymod/_pipeline.py @@ -531,7 +531,7 @@ def BuildFromRawModel(mhandle, use_amber_ff=False, extra_force_fields=list(), full target sequence(s). The terminal parts will be modelled with a crude Monte Carlo approach. Be aware that the accuracy of those termini is likely to be - limited. Termini of length 1 won't be modelled. + limited. :type model_termini: :class:`bool` @@ -571,7 +571,7 @@ def BuildFromRawModel(mhandle, use_amber_ff=False, extra_force_fields=list(), if model_termini: ModelTermini(mhandle, torsion_sampler, fragger_handles=fragger_handles) - RemoveTerminalGaps(mhandle) # length=1 ignored above + RemoveTerminalGaps(mhandle) # build sidechains BuildSidechains(mhandle, merge_distance, fragment_db, -- GitLab