<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <title>Modelling Pipeline — ProMod3 3.2.0 documentation</title> <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/language_data.js"></script> <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML"></script> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="Model Checking" href="model_checking.html" /> <link rel="prev" title="modelling - Protein Modelling" href="index.html" /> <link rel="stylesheet" href="../_static/custom.css" type="text/css" /> <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" /> </head><body> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="modelling-pipeline"> <h1>Modelling Pipeline<a class="headerlink" href="#modelling-pipeline" title="Permalink to this headline">¶</a></h1> <p>A protein homology modelling pipeline has the following main steps:</p> <ul class="simple"> <li><p>Build a raw model from the template (see <a class="reference internal" href="#promod3.modelling.BuildRawModel" title="promod3.modelling.BuildRawModel"><code class="xref py py-func docutils literal notranslate"><span class="pre">BuildRawModel()</span></code></a> function)</p></li> <li><p>Perform loop modelling to close (or remove) all gaps (see functions <a class="reference internal" href="#promod3.modelling.CloseSmallDeletions" title="promod3.modelling.CloseSmallDeletions"><code class="xref py py-func docutils literal notranslate"><span class="pre">CloseSmallDeletions()</span></code></a>, <a class="reference internal" href="#promod3.modelling.RemoveTerminalGaps" title="promod3.modelling.RemoveTerminalGaps"><code class="xref py py-func docutils literal notranslate"><span class="pre">RemoveTerminalGaps()</span></code></a>, <a class="reference internal" href="#promod3.modelling.MergeGapsByDistance" title="promod3.modelling.MergeGapsByDistance"><code class="xref py py-func docutils literal notranslate"><span class="pre">MergeGapsByDistance()</span></code></a>, <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByDatabase()</span></code></a>, <a class="reference internal" href="#promod3.modelling.FillLoopsByMonteCarlo" title="promod3.modelling.FillLoopsByMonteCarlo"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByMonteCarlo()</span></code></a>, <a class="reference internal" href="#promod3.modelling.CloseLargeDeletions" title="promod3.modelling.CloseLargeDeletions"><code class="xref py py-func docutils literal notranslate"><span class="pre">CloseLargeDeletions()</span></code></a> or <a class="reference internal" href="#promod3.modelling.CloseGaps" title="promod3.modelling.CloseGaps"><code class="xref py py-func docutils literal notranslate"><span class="pre">CloseGaps()</span></code></a> that calls all these functions using predefined heuristics)</p></li> <li><p>Build sidechains (see <a class="reference internal" href="#promod3.modelling.BuildSidechains" title="promod3.modelling.BuildSidechains"><code class="xref py py-func docutils literal notranslate"><span class="pre">BuildSidechains()</span></code></a> function)</p></li> <li><p>Minimize energy of final model using molecular mechanics (see <a class="reference internal" href="#promod3.modelling.MinimizeModelEnergy" title="promod3.modelling.MinimizeModelEnergy"><code class="xref py py-func docutils literal notranslate"><span class="pre">MinimizeModelEnergy()</span></code></a> function)</p></li> </ul> <p>The last steps to go from a raw model to a final model can easily be executed with the <a class="reference internal" href="#promod3.modelling.BuildFromRawModel" title="promod3.modelling.BuildFromRawModel"><code class="xref py py-func docutils literal notranslate"><span class="pre">BuildFromRawModel()</span></code></a> function. If you want to run and tweak the internal steps, you can start with the following code and adapt it to your purposes:</p> <div class="highlight-default notranslate" id="modelling-steps-example"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">ost</span> <span class="k">import</span> <span class="n">io</span> <span class="kn">from</span> <span class="nn">promod3</span> <span class="k">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span> <span class="c1"># setup</span> <span class="n">merge_distance</span> <span class="o">=</span> <span class="mi">4</span> <span class="n">fragment_db</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadFragDB</span><span class="p">()</span> <span class="n">structure_db</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadStructureDB</span><span class="p">()</span> <span class="n">torsion_sampler</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadTorsionSamplerCoil</span><span class="p">()</span> <span class="c1"># get raw model</span> <span class="n">tpl</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">LoadPDB</span><span class="p">(</span><span class="s1">'data/1crn_cut.pdb'</span><span class="p">)</span> <span class="n">aln</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">LoadAlignment</span><span class="p">(</span><span class="s1">'data/1crn.fasta'</span><span class="p">)</span> <span class="n">aln</span><span class="o">.</span><span class="n">AttachView</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">tpl</span><span class="o">.</span><span class="n">CreateFullView</span><span class="p">())</span> <span class="n">mhandle</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">BuildRawModel</span><span class="p">(</span><span class="n">aln</span><span class="p">)</span> <span class="c1"># we're not modelling termini</span> <span class="n">modelling</span><span class="o">.</span><span class="n">RemoveTerminalGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span> <span class="c1"># perform loop modelling to close all gaps</span> <span class="n">modelling</span><span class="o">.</span><span class="n">CloseGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">merge_distance</span><span class="p">,</span> <span class="n">fragment_db</span><span class="p">,</span> <span class="n">structure_db</span><span class="p">,</span> <span class="n">torsion_sampler</span><span class="p">)</span> <span class="c1"># build sidechains</span> <span class="n">modelling</span><span class="o">.</span><span class="n">BuildSidechains</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">merge_distance</span><span class="p">,</span> <span class="n">fragment_db</span><span class="p">,</span> <span class="n">structure_db</span><span class="p">,</span> <span class="n">torsion_sampler</span><span class="p">)</span> <span class="c1"># minimize energy of final model using molecular mechanics</span> <span class="n">modelling</span><span class="o">.</span><span class="n">MinimizeModelEnergy</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span> <span class="c1"># check final model and report issues</span> <span class="n">modelling</span><span class="o">.</span><span class="n">CheckFinalModel</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span> <span class="c1"># extract final model</span> <span class="n">final_model</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span> <span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">final_model</span><span class="p">,</span> <span class="s1">'model.pdb'</span><span class="p">)</span> </pre></div> </div> <div class="section" id="build-raw-modelling-handle"> <h2>Build Raw Modelling Handle<a class="headerlink" href="#build-raw-modelling-handle" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="promod3.modelling.ModellingHandle"> <em class="property">class </em><code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">ModellingHandle</code><a class="headerlink" href="#promod3.modelling.ModellingHandle" title="Permalink to this definition">¶</a></dt> <dd><p>Handles the result for structure model building and provides high-level methods to turn an initial raw model (see <a class="reference internal" href="#promod3.modelling.BuildRawModel" title="promod3.modelling.BuildRawModel"><code class="xref py py-func docutils literal notranslate"><span class="pre">BuildRawModel()</span></code></a>) into a complete protein model by removing any existing gaps.</p> <dl class="attribute"> <dt id="promod3.modelling.ModellingHandle.model"> <code class="sig-name descname">model</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.model" title="Permalink to this definition">¶</a></dt> <dd><p>The resulting model. This includes one chain per target chain (in the same order as the sequences in <a class="reference internal" href="#promod3.modelling.ModellingHandle.seqres" title="promod3.modelling.ModellingHandle.seqres"><code class="xref py py-attr docutils literal notranslate"><span class="pre">seqres</span></code></a>) and (if they were included) a chain named ‘_’ for ligands. You can therefore access <cite>model.chains</cite> items and <a class="reference internal" href="#promod3.modelling.ModellingHandle.seqres" title="promod3.modelling.ModellingHandle.seqres"><code class="xref py py-attr docutils literal notranslate"><span class="pre">seqres</span></code></a> items with the same indexing and the optional ligand chain follows afterwards.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">EntityHandle</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingHandle.gaps"> <code class="sig-name descname">gaps</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.gaps" title="Permalink to this definition">¶</a></dt> <dd><p>List of gaps in the model that could not be copied from the template. These gaps may be the result of insertions/deletions in the alignment or due to missing or incomplete backbone coordinates in the template structure. Gaps of different chains are appended one after another.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference internal" href="gap_handling.html#promod3.modelling.StructuralGapList" title="promod3.modelling.StructuralGapList"><code class="xref py py-class docutils literal notranslate"><span class="pre">StructuralGapList</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingHandle.seqres"> <code class="sig-name descname">seqres</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.seqres" title="Permalink to this definition">¶</a></dt> <dd><p>List of sequences with one <a class="reference external" href="https://www.openstructure.org/docs/2.2/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">SequenceHandle</span></code></a> for each chain of the target protein.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference external" href="https://www.openstructure.org/docs/2.2/seq/base/seq/#ost.seq.SequenceList" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">SequenceList</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingHandle.profiles"> <code class="sig-name descname">profiles</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.profiles" title="Permalink to this definition">¶</a></dt> <dd><p>List of profiles with one <a class="reference external" href="https://www.openstructure.org/docs/2.2/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ost.seq.ProfileHandle</span></code></a> for each chain of the target protein (same order as in <a class="reference internal" href="#promod3.modelling.ModellingHandle.seqres" title="promod3.modelling.ModellingHandle.seqres"><code class="xref py py-attr docutils literal notranslate"><span class="pre">seqres</span></code></a>). Please note, that this attribute won’t be set by simply calling <a class="reference internal" href="#promod3.modelling.BuildFromRawModel" title="promod3.modelling.BuildFromRawModel"><code class="xref py py-func docutils literal notranslate"><span class="pre">BuildFromRawModel()</span></code></a>. You have to fill it manually or even better by the convenient function <a class="reference internal" href="#promod3.modelling.SetSequenceProfiles" title="promod3.modelling.SetSequenceProfiles"><code class="xref py py-func docutils literal notranslate"><span class="pre">SetSequenceProfiles()</span></code></a>, to ensure consistency with the seqres.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> of <a class="reference external" href="https://www.openstructure.org/docs/2.2/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ost.seq.ProfileHandle</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingHandle.psipred_predictions"> <code class="sig-name descname">psipred_predictions</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.psipred_predictions" title="Permalink to this definition">¶</a></dt> <dd><p>List of predictions with one <a class="reference internal" href="../loop/structure_db.html#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal notranslate"><span class="pre">promod3.loop.PsipredPrediction</span></code></a> for each chain of the target protein (same order as in <a class="reference internal" href="#promod3.modelling.ModellingHandle.seqres" title="promod3.modelling.ModellingHandle.seqres"><code class="xref py py-attr docutils literal notranslate"><span class="pre">seqres</span></code></a>). Please note, that this attribute won’t be set by simply calling <a class="reference internal" href="#promod3.modelling.BuildFromRawModel" title="promod3.modelling.BuildFromRawModel"><code class="xref py py-func docutils literal notranslate"><span class="pre">BuildFromRawModel()</span></code></a>. You have to fill it manually or even better by the convenient function <a class="reference internal" href="#promod3.modelling.SetPsipredPredictions" title="promod3.modelling.SetPsipredPredictions"><code class="xref py py-func docutils literal notranslate"><span class="pre">SetPsipredPredictions()</span></code></a>, to ensure consistency with the seqres.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> of <a class="reference internal" href="../loop/structure_db.html#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal notranslate"><span class="pre">PsipredPrediction</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingHandle.backbone_scorer_env"> <code class="sig-name descname">backbone_scorer_env</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.backbone_scorer_env" title="Permalink to this definition">¶</a></dt> <dd><p>Backbone score environment attached to this handle. A default environment is set with <a class="reference internal" href="#promod3.modelling.SetupDefaultBackboneScoring" title="promod3.modelling.SetupDefaultBackboneScoring"><code class="xref py py-func docutils literal notranslate"><span class="pre">SetupDefaultBackboneScoring()</span></code></a> when needed. Additional information can be added to the environment before running the pipeline steps.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference internal" href="../scoring/backbone_score_env.html#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal notranslate"><span class="pre">BackboneScoreEnv</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingHandle.backbone_scorer"> <code class="sig-name descname">backbone_scorer</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.backbone_scorer" title="Permalink to this definition">¶</a></dt> <dd><p>Backbone scorer container attached to this handle. A default set of scorers is initialized with <a class="reference internal" href="#promod3.modelling.SetupDefaultBackboneScoring" title="promod3.modelling.SetupDefaultBackboneScoring"><code class="xref py py-func docutils literal notranslate"><span class="pre">SetupDefaultBackboneScoring()</span></code></a> when needed.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer" title="promod3.scoring.BackboneOverallScorer"><code class="xref py py-class docutils literal notranslate"><span class="pre">BackboneOverallScorer</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingHandle.all_atom_scorer_env"> <code class="sig-name descname">all_atom_scorer_env</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.all_atom_scorer_env" title="Permalink to this definition">¶</a></dt> <dd><p>All atom environment attached to this handle for scoring. A default environment is set with <a class="reference internal" href="#promod3.modelling.SetupDefaultAllAtomScoring" title="promod3.modelling.SetupDefaultAllAtomScoring"><code class="xref py py-func docutils literal notranslate"><span class="pre">SetupDefaultAllAtomScoring()</span></code></a> when needed. This environment is for temporary work only and is only updated to score loops. It is not to be updated when loops are chosen and added to the final model.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal notranslate"><span class="pre">AllAtomEnv</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingHandle.all_atom_scorer"> <code class="sig-name descname">all_atom_scorer</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.all_atom_scorer" title="Permalink to this definition">¶</a></dt> <dd><p>All atom scorer container attached to this handle. A default set of scorers is initialized with <a class="reference internal" href="#promod3.modelling.SetupDefaultAllAtomScoring" title="promod3.modelling.SetupDefaultAllAtomScoring"><code class="xref py py-func docutils literal notranslate"><span class="pre">SetupDefaultAllAtomScoring()</span></code></a> when needed.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference internal" href="../scoring/all_atom_scorers.html#promod3.scoring.AllAtomOverallScorer" title="promod3.scoring.AllAtomOverallScorer"><code class="xref py py-class docutils literal notranslate"><span class="pre">AllAtomOverallScorer</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingHandle.all_atom_sidechain_env"> <code class="sig-name descname">all_atom_sidechain_env</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.all_atom_sidechain_env" title="Permalink to this definition">¶</a></dt> <dd><p>All atom environment attached to this handle for sidechain reconstruction. A default environment is set with <a class="reference internal" href="#promod3.modelling.SetupDefaultAllAtomScoring" title="promod3.modelling.SetupDefaultAllAtomScoring"><code class="xref py py-func docutils literal notranslate"><span class="pre">SetupDefaultAllAtomScoring()</span></code></a> when needed.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal notranslate"><span class="pre">AllAtomEnv</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingHandle.sidechain_reconstructor"> <code class="sig-name descname">sidechain_reconstructor</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.sidechain_reconstructor" title="Permalink to this definition">¶</a></dt> <dd><p>A sidechain reconstructor to add sidechains to loops prior to all atom scoring. A default one is set with <a class="reference internal" href="#promod3.modelling.SetupDefaultAllAtomScoring" title="promod3.modelling.SetupDefaultAllAtomScoring"><code class="xref py py-func docutils literal notranslate"><span class="pre">SetupDefaultAllAtomScoring()</span></code></a> when needed.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference internal" href="sidechain_reconstruction.html#promod3.modelling.SidechainReconstructor" title="promod3.modelling.SidechainReconstructor"><code class="xref py py-class docutils literal notranslate"><span class="pre">SidechainReconstructor</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingHandle.fragger_handles"> <code class="sig-name descname">fragger_handles</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.fragger_handles" title="Permalink to this definition">¶</a></dt> <dd><p>Optional attribute which is set in <a class="reference internal" href="#promod3.modelling.SetFraggerHandles" title="promod3.modelling.SetFraggerHandles"><code class="xref py py-meth docutils literal notranslate"><span class="pre">SetFraggerHandles()</span></code></a>. Use <code class="xref py py-meth docutils literal notranslate"><span class="pre">hasattr()</span></code> to check if it’s available. If it’s set, it is used in <a class="reference internal" href="#promod3.modelling.BuildFromRawModel" title="promod3.modelling.BuildFromRawModel"><code class="xref py py-meth docutils literal notranslate"><span class="pre">BuildFromRawModel()</span></code></a>.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> of <a class="reference internal" href="algorithms.html#promod3.modelling.FraggerHandle" title="promod3.modelling.FraggerHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">FraggerHandle</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingHandle.modelling_issues"> <code class="sig-name descname">modelling_issues</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.modelling_issues" title="Permalink to this definition">¶</a></dt> <dd><p>Optional attribute which is set in <a class="reference internal" href="#promod3.modelling.AddModellingIssue" title="promod3.modelling.AddModellingIssue"><code class="xref py py-meth docutils literal notranslate"><span class="pre">AddModellingIssue()</span></code></a>. Use <code class="xref py py-meth docutils literal notranslate"><span class="pre">hasattr()</span></code> to check if it’s available. If it’s set, it can be used to check issues which occurred in <a class="reference internal" href="#promod3.modelling.BuildFromRawModel" title="promod3.modelling.BuildFromRawModel"><code class="xref py py-meth docutils literal notranslate"><span class="pre">BuildFromRawModel()</span></code></a> (see <a class="reference internal" href="#promod3.modelling.MinimizeModelEnergy" title="promod3.modelling.MinimizeModelEnergy"><code class="xref py py-meth docutils literal notranslate"><span class="pre">MinimizeModelEnergy()</span></code></a> and <a class="reference internal" href="#promod3.modelling.CheckFinalModel" title="promod3.modelling.CheckFinalModel"><code class="xref py py-meth docutils literal notranslate"><span class="pre">CheckFinalModel()</span></code></a> for details).</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> of <a class="reference internal" href="#promod3.modelling.ModellingIssue" title="promod3.modelling.ModellingIssue"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingIssue</span></code></a></p> </dd> </dl> </dd></dl> <dl class="method"> <dt id="promod3.modelling.ModellingHandle.Copy"> <code class="sig-name descname">Copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ModellingHandle.Copy" title="Permalink to this definition">¶</a></dt> <dd><p>Generates a deep copy. Everything will be copied over to the returned <a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>, except the potentially set scoring members <a class="reference internal" href="#promod3.modelling.ModellingHandle.backbone_scorer" title="promod3.modelling.ModellingHandle.backbone_scorer"><code class="xref py py-attr docutils literal notranslate"><span class="pre">backbone_scorer</span></code></a>, <a class="reference internal" href="#promod3.modelling.ModellingHandle.backbone_scorer_env" title="promod3.modelling.ModellingHandle.backbone_scorer_env"><code class="xref py py-attr docutils literal notranslate"><span class="pre">backbone_scorer_env</span></code></a>, <a class="reference internal" href="#promod3.modelling.ModellingHandle.all_atom_scorer_env" title="promod3.modelling.ModellingHandle.all_atom_scorer_env"><code class="xref py py-attr docutils literal notranslate"><span class="pre">all_atom_scorer_env</span></code></a>, <a class="reference internal" href="#promod3.modelling.ModellingHandle.all_atom_scorer" title="promod3.modelling.ModellingHandle.all_atom_scorer"><code class="xref py py-attr docutils literal notranslate"><span class="pre">all_atom_scorer</span></code></a>, <a class="reference internal" href="#promod3.modelling.ModellingHandle.all_atom_sidechain_env" title="promod3.modelling.ModellingHandle.all_atom_sidechain_env"><code class="xref py py-attr docutils literal notranslate"><span class="pre">all_atom_sidechain_env</span></code></a> and <a class="reference internal" href="#promod3.modelling.ModellingHandle.sidechain_reconstructor" title="promod3.modelling.ModellingHandle.sidechain_reconstructor"><code class="xref py py-attr docutils literal notranslate"><span class="pre">sidechain_reconstructor</span></code></a>.</p> <dl class="field-list simple"> <dt class="field-odd">Returns</dt> <dd class="field-odd"><p>A deep copy of the current handle</p> </dd> <dt class="field-even">Return type</dt> <dd class="field-even"><p><a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a></p> </dd> </dl> </dd></dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.BuildRawModel"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">BuildRawModel</code><span class="sig-paren">(</span><em class="sig-param">aln</em>, <em class="sig-param">chain_names=None</em>, <em class="sig-param">include_ligands=False</em>, <em class="sig-param">spdbv_style=False</em>, <em class="sig-param">aln_preprocessing='default'</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.BuildRawModel" title="Permalink to this definition">¶</a></dt> <dd><p>Builds a raw (pseudo) model from the alignment. Can either take a single alignment handle or an alignment handle list. Every list item is treated as a single chain in the final raw model.</p> <p>Each alignment handle must contain exactly two sequences and the second sequence is considered the template sequence, which must have a <a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">EntityView</span></code></a> attached.</p> <p>Before extracting the coordinates, the alignments are pre-processed according to <em>aln_preprocessing</em>.</p> <p>This is a basic protein core modelling algorithm that copies backbone coordinates based on the sequence alignment. For matching residues, the side chain coordinates are also copied. Gaps are ignored. Hydrogen an deuterium atoms are not copied into the model.</p> <p>The function tries to reuse as much as possible from the template. Modified residues are treated as follows:</p> <blockquote> <div><ul class="simple"> <li><p>Selenium methionine residues are converted to methionine</p></li> <li><p>Side chains which contain all atoms of the parent amino acid, e.g. phosphoserine are copied as a whole with the modifications stripped off.</p></li> </ul> </div></blockquote> <p>Residues with missing backbone atoms and D-peptides are generally skipped and treated as gaps. Missing Cbeta atoms in backbone are ok and reconstructed. If all residues are skipped (e.g. Calpha traces), we report an error and return an empty model.</p> <p>Residue numbers are set such that missing residue in gaps are honoured and subsequent loop modelling can insert new residues without having to renumber. <strong>The numbering of residues starts for every chain with the value 1</strong>.</p> <p>The returned <a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a> stores the obtained raw model as well as information about insertions and deletions in the gaps list.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>aln</strong> (<a class="reference external" href="https://www.openstructure.org/docs/2.2/seq/base/seq/#ost.seq.AlignmentHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">AlignmentHandle</span></code></a> / <code class="xref py py-class docutils literal notranslate"><span class="pre">AlignmentList</span></code>) – Single alignment handle for raw model with single chain or list of alignment handles for raw model with multiple chains.</p></li> <li><p><strong>include_ligands</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – True, if we wish to include ligands in the model. This searches for ligands in all OST handles of the views attached to the alignments. Ligands are identified with the <cite>ligand</cite> property in the handle (set by OST based on HET records) or by the chain name ‘_’ (as set in SMTL). All ligands are added to a new chain named ‘_’.</p></li> <li><p><strong>chain_names</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a> / <a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a>) – If set, this overrides the default chain naming (chains are consecutively named according to characters in ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz’). If <em>aln</em> is of type <a class="reference external" href="https://www.openstructure.org/docs/2.2/seq/base/seq/#ost.seq.AlignmentHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ost.seq.AlignmentHandle</span></code></a>, <em>chain_names</em> is expected to be a <a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>. If <em>aln</em> is of type <code class="xref py py-class docutils literal notranslate"><span class="pre">ost.seq.AlignmentList</span></code>, <em>chain_names</em> is expected to be a <a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a> of same size as <em>aln</em> or a <a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>. For the latter case, chains will consecutively named according to characters in <em>chain_names</em>.</p></li> <li><p><strong>spdbv_style</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – True, if we need a model in the old SPDBV style.</p></li> <li><p><strong>aln_preprocessing</strong> – Calls <a class="reference internal" href="#promod3.modelling.PullTerminalDeletions" title="promod3.modelling.PullTerminalDeletions"><code class="xref py py-meth docutils literal notranslate"><span class="pre">promod3.modelling.PullTerminalDeletions()</span></code></a> if set to ‘default’. Can be disabled when set to False.</p></li> </ul> </dd> <dt class="field-even">Returns</dt> <dd class="field-even"><p>Raw (pseudo) model from the alignment.</p> </dd> <dt class="field-odd">Return type</dt> <dd class="field-odd"><p><a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a></p> </dd> <dt class="field-even">Raises</dt> <dd class="field-even"><p>A <a class="reference external" href="https://docs.python.org/3.7/library/exceptions.html#RuntimeError" title="(in Python v3.7)"><code class="xref py py-exc docutils literal notranslate"><span class="pre">RuntimeError</span></code></a> when:</p> <ul class="simple"> <li><p>the alignments do not have two sequences</p></li> <li><p>the second sequence does not have an attached structure</p></li> <li><p>the residues of the template structure do not match with the alignment sequence (note that you can set an “offset” (see <a class="reference external" href="https://www.openstructure.org/docs/2.2/seq/base/seq/#ost.seq.AlignmentHandle.SetSequenceOffset" title="(in OpenStructure v2.2.0)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">SetSequenceOffset()</span></code></a>) for the template sequence (but not for the target))</p></li> <li><p>the target sequence has a non-zero offset (cannot be honored as the resulting model will always start its residue numbering at 1)</p></li> </ul> </dd> </dl> </dd></dl> </div> <div class="section" id="the-default-pipeline"> <h2>The Default Pipeline<a class="headerlink" href="#the-default-pipeline" title="Permalink to this headline">¶</a></h2> <dl class="function"> <dt id="promod3.modelling.BuildFromRawModel"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">BuildFromRawModel</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">use_amber_ff=False</em>, <em class="sig-param">extra_force_fields=[]</em>, <em class="sig-param">model_termini=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.BuildFromRawModel" title="Permalink to this definition">¶</a></dt> <dd><p>Build a model starting with a raw model (see <a class="reference internal" href="#promod3.modelling.BuildRawModel" title="promod3.modelling.BuildRawModel"><code class="xref py py-func docutils literal notranslate"><span class="pre">BuildRawModel()</span></code></a>).</p> <p>This function implements a recommended pipeline to generate complete models from a raw model. The steps are shown in detail in the code example <a class="reference internal" href="#modelling-steps-example"><span class="std std-ref">above</span></a>. If you wish to use your own pipeline, you can use that code as a starting point for your own custom modelling pipeline. For reproducibility, we recommend that you keep copies of custom pipelines.</p> <p>To adapt the scoring used during loop closing, you can call <a class="reference internal" href="#promod3.modelling.SetupDefaultBackboneScoring" title="promod3.modelling.SetupDefaultBackboneScoring"><code class="xref py py-func docutils literal notranslate"><span class="pre">SetupDefaultBackboneScoring()</span></code></a> and <a class="reference internal" href="#promod3.modelling.SetupDefaultAllAtomScoring" title="promod3.modelling.SetupDefaultAllAtomScoring"><code class="xref py py-func docutils literal notranslate"><span class="pre">SetupDefaultAllAtomScoring()</span></code></a> and adapt the default scoring members. Alternatively, you can setup the scoring manually, but you must ensure consistency yourself!</p> <p>By default, a simple backbone dihedral sampling is performed when entering Monte Carlo. If <em>mhandle</em> has a list of <a class="reference internal" href="algorithms.html#promod3.modelling.FraggerHandle" title="promod3.modelling.FraggerHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">FraggerHandle</span></code></a> objects attached as “fragger_handles” attribute, the sampling will be performed with structural fragments. To ensure consistency, the fragger handles should be attached using <a class="reference internal" href="#promod3.modelling.SetFraggerHandles" title="promod3.modelling.SetFraggerHandles"><code class="xref py py-meth docutils literal notranslate"><span class="pre">SetFraggerHandles()</span></code></a>. But be aware of increased runtime due to the fragment search step.</p> <p>If the function fails to close all gaps, it will produce a warning and return an incomplete model.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – The prepared template coordinates loaded with the input alignment.</p></li> <li><p><strong>use_amber_ff</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – if True, use the AMBER force field instead of the def. CHARMM one (see <a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/mm/forcefield/#ost.mol.mm.LoadAMBERForcefield" title="(in OpenStructure v2.2.0)"><code class="xref py py-func docutils literal notranslate"><span class="pre">ost.mol.mm.LoadAMBERForcefield()</span></code></a> and <a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/mm/forcefield/#ost.mol.mm.LoadCHARMMForcefield" title="(in OpenStructure v2.2.0)"><code class="xref py py-func docutils literal notranslate"><span class="pre">ost.mol.mm.LoadCHARMMForcefield()</span></code></a>). Both do a similarly good job without ligands (CHARMM slightly better), but you will want to be consistent with the optional force fields in <cite>extra_force_fields</cite>.</p></li> <li><p><strong>extra_force_fields</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> of <a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/mm/forcefield/#ost.mol.mm.Forcefield" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ost.mol.mm.Forcefield</span></code></a>) – Additional list of force fields to use if a (ligand) residue cannot be parametrized with the default force field. The force fields are tried in the order as given and ligands without an existing parametrization are skipped.</p></li> <li><p><strong>model_termini</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – The default modelling pipeline in ProMod3 is optimized to generate a gap-free model of the region in the target sequence(s) that is covered with template information. Terminal extensions without template coverage are negelected. You can activate this flag to enforce a model of the 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.</p></li> </ul> </dd> <dt class="field-even">Returns</dt> <dd class="field-even"><p>Delivers the model as an OST entity.</p> </dd> <dt class="field-odd">Return type</dt> <dd class="field-odd"><p><a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Entity</span></code></a></p> </dd> </dl> </dd></dl> </div> <div class="section" id="modelling-steps"> <h2>Modelling Steps<a class="headerlink" href="#modelling-steps" title="Permalink to this headline">¶</a></h2> <dl class="function"> <dt id="promod3.modelling.SetupDefaultBackboneScoring"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">SetupDefaultBackboneScoring</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.SetupDefaultBackboneScoring" title="Permalink to this definition">¶</a></dt> <dd><p>Setup scorers and environment for meddling with backbones. This one is already tailored towards a certain modelling job. The scorers added (with their respective keys) are:</p> <ul class="simple"> <li><p>“cb_packing”: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.CBPackingScorer" title="promod3.scoring.CBPackingScorer"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBPackingScorer</span></code></a></p></li> <li><p>“cbeta”: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.CBetaScorer" title="promod3.scoring.CBetaScorer"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBetaScorer</span></code></a></p></li> <li><p>“reduced”: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.ReducedScorer" title="promod3.scoring.ReducedScorer"><code class="xref py py-class docutils literal notranslate"><span class="pre">ReducedScorer</span></code></a></p></li> <li><p>“clash”: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.ClashScorer" title="promod3.scoring.ClashScorer"><code class="xref py py-class docutils literal notranslate"><span class="pre">ClashScorer</span></code></a></p></li> <li><p>“hbond”: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.HBondScorer" title="promod3.scoring.HBondScorer"><code class="xref py py-class docutils literal notranslate"><span class="pre">HBondScorer</span></code></a></p></li> <li><p>“torsion”: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.TorsionScorer" title="promod3.scoring.TorsionScorer"><code class="xref py py-class docutils literal notranslate"><span class="pre">TorsionScorer</span></code></a></p></li> <li><p>“pairwise”: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.PairwiseScorer" title="promod3.scoring.PairwiseScorer"><code class="xref py py-class docutils literal notranslate"><span class="pre">PairwiseScorer</span></code></a></p></li> </ul> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – The modelling handle. This will set the properties <a class="reference internal" href="#promod3.modelling.ModellingHandle.backbone_scorer" title="promod3.modelling.ModellingHandle.backbone_scorer"><code class="xref py py-attr docutils literal notranslate"><span class="pre">backbone_scorer</span></code></a> and <a class="reference internal" href="#promod3.modelling.ModellingHandle.backbone_scorer_env" title="promod3.modelling.ModellingHandle.backbone_scorer_env"><code class="xref py py-attr docutils literal notranslate"><span class="pre">backbone_scorer_env</span></code></a> of <cite>mhandle</cite>.</p> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.IsBackboneScoringSetUp"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">IsBackboneScoringSetUp</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.IsBackboneScoringSetUp" title="Permalink to this definition">¶</a></dt> <dd><dl class="field-list simple"> <dt class="field-odd">Returns</dt> <dd class="field-odd"><p>True, if <a class="reference internal" href="#promod3.modelling.ModellingHandle.backbone_scorer" title="promod3.modelling.ModellingHandle.backbone_scorer"><code class="xref py py-attr docutils literal notranslate"><span class="pre">backbone_scorer</span></code></a> and <a class="reference internal" href="#promod3.modelling.ModellingHandle.backbone_scorer_env" title="promod3.modelling.ModellingHandle.backbone_scorer_env"><code class="xref py py-attr docutils literal notranslate"><span class="pre">backbone_scorer_env</span></code></a> of <cite>mhandle</cite> are set.</p> </dd> <dt class="field-even">Return type</dt> <dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a></p> </dd> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle to check.</p> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.SetupDefaultAllAtomScoring"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">SetupDefaultAllAtomScoring</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.SetupDefaultAllAtomScoring" title="Permalink to this definition">¶</a></dt> <dd><p>Setup scorers and environment to perform all atom scoring. This one is already tailored towards a certain modelling job, where we reconstruct sidechains for loop candidates and score them. The scorers added (with their respective keys) are:</p> <ul class="simple"> <li><p>“aa_interaction”: <a class="reference internal" href="../scoring/all_atom_scorers.html#promod3.scoring.AllAtomInteractionScorer" title="promod3.scoring.AllAtomInteractionScorer"><code class="xref py py-class docutils literal notranslate"><span class="pre">AllAtomInteractionScorer</span></code></a></p></li> <li><p>“aa_packing”: <a class="reference internal" href="../scoring/all_atom_scorers.html#promod3.scoring.AllAtomPackingScorer" title="promod3.scoring.AllAtomPackingScorer"><code class="xref py py-class docutils literal notranslate"><span class="pre">AllAtomPackingScorer</span></code></a></p></li> <li><p>“aa_clash”: <a class="reference internal" href="../scoring/all_atom_scorers.html#promod3.scoring.AllAtomClashScorer" title="promod3.scoring.AllAtomClashScorer"><code class="xref py py-class docutils literal notranslate"><span class="pre">AllAtomClashScorer</span></code></a></p></li> </ul> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – The modelling handle. This will set the properties <a class="reference internal" href="#promod3.modelling.ModellingHandle.all_atom_scorer_env" title="promod3.modelling.ModellingHandle.all_atom_scorer_env"><code class="xref py py-attr docutils literal notranslate"><span class="pre">all_atom_scorer_env</span></code></a>, <a class="reference internal" href="#promod3.modelling.ModellingHandle.all_atom_scorer" title="promod3.modelling.ModellingHandle.all_atom_scorer"><code class="xref py py-attr docutils literal notranslate"><span class="pre">all_atom_scorer</span></code></a>, <a class="reference internal" href="#promod3.modelling.ModellingHandle.all_atom_sidechain_env" title="promod3.modelling.ModellingHandle.all_atom_sidechain_env"><code class="xref py py-attr docutils literal notranslate"><span class="pre">all_atom_sidechain_env</span></code></a> and <a class="reference internal" href="#promod3.modelling.ModellingHandle.sidechain_reconstructor" title="promod3.modelling.ModellingHandle.sidechain_reconstructor"><code class="xref py py-attr docutils literal notranslate"><span class="pre">sidechain_reconstructor</span></code></a>.</p> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.IsAllAtomScoringSetUp"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">IsAllAtomScoringSetUp</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.IsAllAtomScoringSetUp" title="Permalink to this definition">¶</a></dt> <dd><dl class="field-list simple"> <dt class="field-odd">Returns</dt> <dd class="field-odd"><p>True, if <a class="reference internal" href="#promod3.modelling.ModellingHandle.all_atom_scorer_env" title="promod3.modelling.ModellingHandle.all_atom_scorer_env"><code class="xref py py-attr docutils literal notranslate"><span class="pre">all_atom_scorer_env</span></code></a>, <a class="reference internal" href="#promod3.modelling.ModellingHandle.all_atom_scorer" title="promod3.modelling.ModellingHandle.all_atom_scorer"><code class="xref py py-attr docutils literal notranslate"><span class="pre">all_atom_scorer</span></code></a>, <a class="reference internal" href="#promod3.modelling.ModellingHandle.all_atom_sidechain_env" title="promod3.modelling.ModellingHandle.all_atom_sidechain_env"><code class="xref py py-attr docutils literal notranslate"><span class="pre">all_atom_sidechain_env</span></code></a> and <a class="reference internal" href="#promod3.modelling.ModellingHandle.sidechain_reconstructor" title="promod3.modelling.ModellingHandle.sidechain_reconstructor"><code class="xref py py-attr docutils literal notranslate"><span class="pre">sidechain_reconstructor</span></code></a> of <cite>mhandle</cite> are set.</p> </dd> <dt class="field-even">Return type</dt> <dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a></p> </dd> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle to check.</p> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.InsertLoop"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">InsertLoop</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">bb_list</em>, <em class="sig-param">start_resnum</em>, <em class="sig-param">chain_idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.InsertLoop" title="Permalink to this definition">¶</a></dt> <dd><p>Insert loop into model and ensure consistent updating of scoring environments. Note that we do not update <a class="reference internal" href="#promod3.modelling.ModellingHandle.all_atom_scorer_env" title="promod3.modelling.ModellingHandle.all_atom_scorer_env"><code class="xref py py-attr docutils literal notranslate"><span class="pre">all_atom_scorer_env</span></code></a> as that one is meant to be updated only while scoring. To clear a gap while inserting a loop, use the simpler <a class="reference internal" href="gap_handling.html#promod3.modelling.InsertLoopClearGaps" title="promod3.modelling.InsertLoopClearGaps"><code class="xref py py-meth docutils literal notranslate"><span class="pre">InsertLoopClearGaps()</span></code></a>.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle on which to apply change.</p></li> <li><p><strong>bb_list</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal notranslate"><span class="pre">BackboneList</span></code></a>) – Loop to insert (backbone only).</p></li> <li><p><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Res. number defining the start position in the SEQRES.</p></li> <li><p><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Index of chain the loop belongs to.</p></li> </ul> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.RemoveTerminalGaps"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">RemoveTerminalGaps</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.RemoveTerminalGaps" title="Permalink to this definition">¶</a></dt> <dd><p>Removes terminal gaps without modelling them (just removes them from the list of gaps). This is useful for pipelines which lack the possibility to properly model loops at the termini.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle on which to apply change.</p> </dd> <dt class="field-even">Returns</dt> <dd class="field-even"><p>Number of gaps which were removed.</p> </dd> <dt class="field-odd">Return type</dt> <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a></p> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.ReorderGaps"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">ReorderGaps</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ReorderGaps" title="Permalink to this definition">¶</a></dt> <dd><p>Reorders all gaps to ensure sequential order by performing lexicographical comparison on the sequence formed by chain index of the gap and start residue number.</p> </dd></dl> <dl class="function"> <dt id="promod3.modelling.MergeMHandle"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">MergeMHandle</code><span class="sig-paren">(</span><em class="sig-param">source_mhandle</em>, <em class="sig-param">target_mhandle</em>, <em class="sig-param">source_chain_idx</em>, <em class="sig-param">target_chain_idx</em>, <em class="sig-param">start_resnum</em>, <em class="sig-param">end_resnum</em>, <em class="sig-param">transform</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.MergeMHandle" title="Permalink to this definition">¶</a></dt> <dd><p>Merges the specified stretch of <strong>source_mhandle</strong> into <strong>target_mhandle</strong> by replacing all structural information and gaps in the stretch <strong>start_resnum</strong> and <strong>end_resnum</strong> (inclusive). The residues specified by <strong>start_resnum</strong> and <strong>end_resnum</strong> must be valid in the source_mhandle, i.e. not be enclosed by a gap. If a gap encloses <strong>start_resnum</strong> or <strong>end_resnum</strong> in the <strong>target_mhandle</strong>, the gap gets replaced by a shortened version not including the part overlapping with the defined stretch. If there is any scoring set up (backbone or all atom), the according environments get updated in <strong>target_mhandle</strong>.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>source_mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Source of structural information and gaps</p></li> <li><p><strong>target_mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Structural information and gaps will be copied in here</p></li> <li><p><strong>source_chain_idx</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – This is the chain where the info comes from</p></li> <li><p><strong>target_chain_idx</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – This is the chain where the info goes to</p></li> <li><p><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – First residue of the copied stretch</p></li> <li><p><strong>end_resnum</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Last residue of the copied stretch</p></li> <li><p><strong>transform</strong> (<a class="reference external" href="https://www.openstructure.org/docs/2.2/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ost.geom.Mat4</span></code></a>) – Transformation to be applied to all atom positions when they’re copied over</p></li> </ul> </dd> <dt class="field-even">Raises</dt> <dd class="field-even"><p>A <a class="reference external" href="https://docs.python.org/3.7/library/exceptions.html#RuntimeError" title="(in Python v3.7)"><code class="xref py py-exc docutils literal notranslate"><span class="pre">RuntimeError</span></code></a> when:</p> <ul class="simple"> <li><p>the chain indices are invalid</p></li> <li><p>the SEQRES of the specified chains do not match</p></li> <li><p>the start and end residue numbers are invalid or when the residues at the specified positions in the <strong>source_mhandle</strong> do not exist</p></li> <li><p>a gap in the <strong>source_mhandle</strong> encloses the residues specified by <strong>start_resnum</strong> and <strong>end_resnum</strong></p></li> </ul> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.SetSequenceProfiles"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">SetSequenceProfiles</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">profiles</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.SetSequenceProfiles" title="Permalink to this definition">¶</a></dt> <dd><p>Sets the <a class="reference internal" href="#promod3.modelling.ModellingHandle.profiles" title="promod3.modelling.ModellingHandle.profiles"><code class="xref py py-attr docutils literal notranslate"><span class="pre">sequence</span> <span class="pre">profiles</span></code></a> of <strong>mhandle</strong> while ensuring consistency with the <a class="reference internal" href="#promod3.modelling.ModellingHandle.seqres" title="promod3.modelling.ModellingHandle.seqres"><code class="xref py py-attr docutils literal notranslate"><span class="pre">seqres</span></code></a>.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Will have the profiles attached afterwards</p></li> <li><p><strong>profiles</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> of <a class="reference external" href="https://www.openstructure.org/docs/2.2/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ost.seq.ProfileHandle</span></code></a>) – The sequence profiles to attach</p></li> </ul> </dd> <dt class="field-even">Raises</dt> <dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3.7/library/exceptions.html#ValueError" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ValueError</span></code></a> when the given <strong>profiles</strong> are not consistent with seqres in <strong>mhandle</strong></p> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.SetPsipredPredictions"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">SetPsipredPredictions</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">predictions</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.SetPsipredPredictions" title="Permalink to this definition">¶</a></dt> <dd><p>Sets the <a class="reference internal" href="#promod3.modelling.ModellingHandle.psipred_predictions" title="promod3.modelling.ModellingHandle.psipred_predictions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">predictions</span></code></a> of <strong>mhandle</strong> while ensuring consistency with the <a class="reference internal" href="#promod3.modelling.ModellingHandle.seqres" title="promod3.modelling.ModellingHandle.seqres"><code class="xref py py-attr docutils literal notranslate"><span class="pre">seqres</span></code></a>.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Will have the predictions attached afterwards</p></li> <li><p><strong>predictions</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> of <a class="reference internal" href="../loop/structure_db.html#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal notranslate"><span class="pre">PsipredPrediction</span></code></a>) – The predictions to attach</p></li> </ul> </dd> <dt class="field-even">Raises</dt> <dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3.7/library/exceptions.html#ValueError" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ValueError</span></code></a> when the given <strong>predictions</strong> are not consistent with seqres in <strong>mhandle</strong></p> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.SetFraggerHandles"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">SetFraggerHandles</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">fragger_handles</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.SetFraggerHandles" title="Permalink to this definition">¶</a></dt> <dd><p>Sets <a class="reference internal" href="#promod3.modelling.ModellingHandle.fragger_handles" title="promod3.modelling.ModellingHandle.fragger_handles"><code class="xref py py-attr docutils literal notranslate"><span class="pre">fragger_handles</span></code></a> in <em>mhandle</em> while ensuring consistency with the <a class="reference internal" href="#promod3.modelling.ModellingHandle.seqres" title="promod3.modelling.ModellingHandle.seqres"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ModellingHandle.seqres</span></code></a>.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Will have the fragger handles attached afterwards</p></li> <li><p><strong>fragger_handles</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> of <a class="reference internal" href="algorithms.html#promod3.modelling.FraggerHandle" title="promod3.modelling.FraggerHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">FraggerHandle</span></code></a>) – The fragger handles to attach</p></li> </ul> </dd> <dt class="field-even">Raises</dt> <dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3.7/library/exceptions.html#ValueError" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ValueError</span></code></a> when the given <em>fragger_handles</em> are not consistent with seqres in <em>mhandle</em></p> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.CloseGaps"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">CloseGaps</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">merge_distance=4</em>, <em class="sig-param">fragment_db=None</em>, <em class="sig-param">structure_db=None</em>, <em class="sig-param">torsion_sampler=None</em>, <em class="sig-param">fragger_handles=None</em>, <em class="sig-param">chain_idx=None</em>, <em class="sig-param">resnum_range=None</em>, <em class="sig-param">length_dep_weights=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.CloseGaps" title="Permalink to this definition">¶</a></dt> <dd><p>Tries to close all gaps in a model, except termini. It will go through following steps:</p> <ul class="simple"> <li><p>Try to close small deletions by relaxing them (see <a class="reference internal" href="#promod3.modelling.CloseSmallDeletions" title="promod3.modelling.CloseSmallDeletions"><code class="xref py py-func docutils literal notranslate"><span class="pre">CloseSmallDeletions()</span></code></a>)</p></li> <li><p>Iteratively merge gaps up to a distance <strong>merge_distance</strong> (see <a class="reference internal" href="#promod3.modelling.MergeGapsByDistance" title="promod3.modelling.MergeGapsByDistance"><code class="xref py py-func docutils literal notranslate"><span class="pre">MergeGapsByDistance()</span></code></a>) and try to fill them with a database approach (see <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByDatabase()</span></code></a>)</p></li> <li><p>Try to fill remaining gaps using a Monte Carlo approach (see <a class="reference internal" href="#promod3.modelling.FillLoopsByMonteCarlo" title="promod3.modelling.FillLoopsByMonteCarlo"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByMonteCarlo()</span></code></a>)</p></li> <li><p>Large deletions get closed using a last resort approach (see <a class="reference internal" href="#promod3.modelling.CloseLargeDeletions" title="promod3.modelling.CloseLargeDeletions"><code class="xref py py-func docutils literal notranslate"><span class="pre">CloseLargeDeletions()</span></code></a>)</p></li> </ul> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle on which to apply change.</p></li> <li><p><strong>merge_distance</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Max. merge distance when performing the database approach</p></li> <li><p><strong>fragment_db</strong> (<a class="reference internal" href="../loop/structure_db.html#promod3.loop.FragDB" title="promod3.loop.FragDB"><code class="xref py py-class docutils literal notranslate"><span class="pre">FragDB</span></code></a>) – Database for searching fragments in database approach, must be consistent with provided <strong>structure_db</strong>. A default is loaded if None.</p></li> <li><p><strong>structure_db</strong> (<a class="reference internal" href="../loop/structure_db.html#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal notranslate"><span class="pre">StructureDB</span></code></a>) – Structure db from which the <strong>fragment_db</strong> gets it’s structural information. A default is loaded if None.</p></li> <li><p><strong>torsion_sampler</strong> (<a class="reference internal" href="../loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal notranslate"><span class="pre">promod3.loop.TorsionSampler</span></code></a>) – Used as parameter for <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByDatabase()</span></code></a> and <a class="reference internal" href="#promod3.modelling.FillLoopsByMonteCarlo" title="promod3.modelling.FillLoopsByMonteCarlo"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByMonteCarlo()</span></code></a> A default one is loaded if None.</p></li> <li><p><strong>fragger_handles</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a>) – A list of <a class="reference internal" href="algorithms.html#promod3.modelling.FraggerHandle" title="promod3.modelling.FraggerHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">promod3.modelling.FraggerHandle</span></code></a> objects for each chain in <strong>mhandle</strong>. If provided, fragments will be used for sampling when the <a class="reference internal" href="#promod3.modelling.FillLoopsByMonteCarlo" title="promod3.modelling.FillLoopsByMonteCarlo"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByMonteCarlo()</span></code></a> gets executed.</p></li> <li><p><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – If not None, only gaps from chain with given index get processed</p></li> <li><p><strong>resnum_range</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#tuple" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a> containing two <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – If not None, only gaps within this resnum range get processed.</p></li> <li><p><strong>length_dep_weights</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – <a class="reference internal" href="loop_candidates.html#promod3.modelling.ScoringWeights" title="promod3.modelling.ScoringWeights"><code class="xref py py-class docutils literal notranslate"><span class="pre">ScoringWeights</span></code></a> provides different sets of weights that have been trained on different loop subsets. If this flag is true, the length dependent weights are used to close loops with database / Monte Carlo.</p></li> </ul> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.CloseSmallDeletions"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">CloseSmallDeletions</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">max_extension=9</em>, <em class="sig-param">clash_thresh=1.0</em>, <em class="sig-param">e_thresh=200</em>, <em class="sig-param">use_scoring_extender=True</em>, <em class="sig-param">use_full_extender=True</em>, <em class="sig-param">chain_idx=None</em>, <em class="sig-param">resnum_range=None</em>, <em class="sig-param">ff_lookup=None</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.CloseSmallDeletions" title="Permalink to this definition">¶</a></dt> <dd><p>Close small deletions by relaxing neighbouring residues.</p> <p>Small deletions in the template from the target-template alignment have a good chance to be bridged just by relaxing neighbours around a tiny gap. Before diving into the more demanding tasks in modeling, those may be closed already in the raw-model. After closure some checks are done to see if the solution is stereochemically sensible.</p> <p>Closed gaps are removed from <code class="xref py py-attr docutils literal notranslate"><span class="pre">mhandle.gaps</span></code>.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">ost</span> <span class="k">import</span> <span class="n">io</span><span class="p">,</span> <span class="n">seq</span> <span class="kn">from</span> <span class="nn">promod3</span> <span class="k">import</span> <span class="n">modelling</span> <span class="c1"># setup</span> <span class="n">tpl</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">LoadPDB</span><span class="p">(</span><span class="s1">'data/gly.pdb'</span><span class="p">)</span> <span class="n">aln</span> <span class="o">=</span> <span class="n">seq</span><span class="o">.</span><span class="n">CreateAlignment</span><span class="p">(</span><span class="n">seq</span><span class="o">.</span><span class="n">CreateSequence</span><span class="p">(</span><span class="s1">'trg'</span><span class="p">,</span> <span class="s1">'GGGG-GGGG'</span><span class="p">),</span> <span class="n">seq</span><span class="o">.</span><span class="n">CreateSequence</span><span class="p">(</span><span class="s1">'tpl'</span><span class="p">,</span> <span class="s1">'GGGGAGGGG'</span><span class="p">))</span> <span class="n">aln</span><span class="o">.</span><span class="n">AttachView</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">tpl</span><span class="o">.</span><span class="n">CreateFullView</span><span class="p">())</span> <span class="n">mhandle</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">BuildRawModel</span><span class="p">(</span><span class="n">aln</span><span class="p">)</span> <span class="c1"># close small deletion</span> <span class="nb">print</span><span class="p">(</span><span class="s1">'Number of gaps before: </span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">))</span> <span class="n">modelling</span><span class="o">.</span><span class="n">CloseSmallDeletions</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span> <span class="nb">print</span><span class="p">(</span><span class="s1">'Number of gaps after: </span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">))</span> </pre></div> </div> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle on which to apply change.</p></li> <li><p><strong>max_extension</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Maximal number of gap extension steps to perform (see <a class="reference internal" href="gap_handling.html#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">GapExtender</span></code></a>)</p></li> <li><p><strong>clash_thresh</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#float" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a>) – Threshold for the backbone clash score. Acceptance means being lower than this.</p></li> <li><p><strong>e_thresh</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#float" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a>) – Potential energy should be lower than this.</p></li> <li><p><strong>use_scoring_extender</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – True = use <a class="reference internal" href="gap_handling.html#promod3.modelling.ScoringGapExtender" title="promod3.modelling.ScoringGapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">ScoringGapExtender</span></code></a> instead of <a class="reference internal" href="gap_handling.html#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">GapExtender</span></code></a>. The gap is penalized according as 0.8*length + sum(helices) + sum(sheets). For the scondary-structure-penalty to work, the model-template must have the appropriate information before <a class="reference internal" href="#promod3.modelling.BuildRawModel" title="promod3.modelling.BuildRawModel"><code class="xref py py-func docutils literal notranslate"><span class="pre">BuildRawModel()</span></code></a> is called (e.g. with <a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/alg/molalg/#ost.mol.alg.AssignSecStruct" title="(in OpenStructure v2.2.0)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ost.mol.alg.AssignSecStruct()</span></code></a>).</p></li> <li><p><strong>use_full_extender</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – True = use <a class="reference internal" href="gap_handling.html#promod3.modelling.FullGapExtender" title="promod3.modelling.FullGapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">FullGapExtender</span></code></a> instead of of <a class="reference internal" href="gap_handling.html#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">GapExtender</span></code></a>. Also works in combination with <cite>use_scoring_extender</cite>. This allows the gap extender to skip neighboring gaps and to correctly handle gaps close to termini.</p></li> <li><p><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – If not None, only gaps from chain with given index get processed</p></li> <li><p><strong>resnum_range</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#tuple" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a> containing two <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – If not None, only gaps within this resnum range get processed.</p></li> <li><p><strong>ff_lookup</strong> (<a class="reference internal" href="../loop/mm_system_creation.html#promod3.loop.ForcefieldLookup" title="promod3.loop.ForcefieldLookup"><code class="xref py py-class docutils literal notranslate"><span class="pre">promod3.loop.ForcefieldLookup</span></code></a>) – Forcefield to parametrize <a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal notranslate"><span class="pre">promod3.loop.BackboneList</span></code></a> in <a class="reference internal" href="loop_closing.html#promod3.modelling.BackboneRelaxer" title="promod3.modelling.BackboneRelaxer"><code class="xref py py-class docutils literal notranslate"><span class="pre">promod3.modelling.BackboneRelaxer</span></code></a>. If set to None, the one returned by <a class="reference internal" href="../loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetDefault" title="promod3.loop.ForcefieldLookup.GetDefault"><code class="xref py py-func docutils literal notranslate"><span class="pre">promod3.loop.ForcefieldLookup.GetDefault()</span></code></a> gets used.</p></li> </ul> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.MergeGapsByDistance"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">MergeGapsByDistance</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">distance</em>, <em class="sig-param">chain_idx=None</em>, <em class="sig-param">resnum_range=None</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.MergeGapsByDistance" title="Permalink to this definition">¶</a></dt> <dd><p>Merge 2 neighbouring gaps by deleting residues in-between.</p> <p>Check if two neighbouring gaps are at max. <em>distance</em> residues apart from each other. Then delete the residues and store a new gap spanning the whole stretch of original gaps and the deleted region. Original gaps will be removed. Stem residues count to the gap, so <strong>A-A-A</strong> has a distance of 0.</p> <p>IMPORTANT: we assume here that <em>mhandle</em> stores gaps sequentially. Non-sequential gaps are ignored!</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">ost</span> <span class="k">import</span> <span class="n">io</span><span class="p">,</span> <span class="n">seq</span> <span class="kn">from</span> <span class="nn">promod3</span> <span class="k">import</span> <span class="n">modelling</span> <span class="c1"># setup</span> <span class="n">tpl</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">LoadPDB</span><span class="p">(</span><span class="s1">'data/1crn_cut.pdb'</span><span class="p">)</span> <span class="n">seq_trg</span> <span class="o">=</span> <span class="s1">'TTCCPSIVARSNFNVCRLPGTPEAICATGYTCIIIPGATCPGDYAN'</span> <span class="n">seq_tpl</span> <span class="o">=</span> <span class="s1">'TTCCPSIVARSNFNVCRLPGTPEA----G--CIIIPGATCPGDYAN'</span> <span class="n">aln</span> <span class="o">=</span> <span class="n">seq</span><span class="o">.</span><span class="n">CreateAlignment</span><span class="p">(</span><span class="n">seq</span><span class="o">.</span><span class="n">CreateSequence</span><span class="p">(</span><span class="s1">'trg'</span><span class="p">,</span> <span class="n">seq_trg</span><span class="p">),</span> <span class="n">seq</span><span class="o">.</span><span class="n">CreateSequence</span><span class="p">(</span><span class="s1">'tpl'</span><span class="p">,</span> <span class="n">seq_tpl</span><span class="p">))</span> <span class="n">aln</span><span class="o">.</span><span class="n">AttachView</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">tpl</span><span class="o">.</span><span class="n">CreateFullView</span><span class="p">())</span> <span class="n">mhandle</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">BuildRawModel</span><span class="p">(</span><span class="n">aln</span><span class="p">)</span> <span class="c1"># merge gaps</span> <span class="nb">print</span><span class="p">(</span><span class="s1">'Number of gaps before: </span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">))</span> <span class="n">modelling</span><span class="o">.</span><span class="n">MergeGapsByDistance</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="nb">print</span><span class="p">(</span><span class="s1">'Number of gaps after: </span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">))</span> </pre></div> </div> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle on which to apply change.</p></li> <li><p><strong>distance</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – The max. no. of residues between two gaps up to which merge happens.</p></li> <li><p><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – If not None, only gaps from chain with given index get processed</p></li> <li><p><strong>resnum_range</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#tuple" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a> containing two <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – If not None, two gaps only get merged if they’re both in this resnum range.</p></li> </ul> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.FillLoopsByDatabase"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">FillLoopsByDatabase</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">fragment_db</em>, <em class="sig-param">structure_db</em>, <em class="sig-param">torsion_sampler=None</em>, <em class="sig-param">max_loops_to_search=40</em>, <em class="sig-param">min_loops_required=4</em>, <em class="sig-param">max_res_extension=-1</em>, <em class="sig-param">extended_search=True</em>, <em class="sig-param">use_scoring_extender=True</em>, <em class="sig-param">use_full_extender=True</em>, <em class="sig-param">score_variant=0</em>, <em class="sig-param">ring_punch_detection=1</em>, <em class="sig-param">chain_idx=None</em>, <em class="sig-param">resnum_range=None</em>, <em class="sig-param">max_num_all_atom=0</em>, <em class="sig-param">clash_thresh=-1</em>, <em class="sig-param">length_dep_weights=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.FillLoopsByDatabase" title="Permalink to this definition">¶</a></dt> <dd><p>Try to fill up loops from a structural database.</p> <p>Usually this will extend the gaps a bit to match candidates from the database. Do not expect a gap being filled in between its actual stem residues. This function cannot fill gaps at C- or N-terminal.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">ost</span> <span class="k">import</span> <span class="n">io</span><span class="p">,</span> <span class="n">seq</span> <span class="kn">from</span> <span class="nn">promod3</span> <span class="k">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span> <span class="c1"># setup</span> <span class="n">tpl</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">LoadPDB</span><span class="p">(</span><span class="s1">'data/1crn_cut.pdb'</span><span class="p">)</span> <span class="n">seq_trg</span> <span class="o">=</span> <span class="s1">'TTCCPSIVARSNFNVCRLPGTPEAICATYTGCIIIPGATCPGDYAN'</span> <span class="n">seq_tpl</span> <span class="o">=</span> <span class="s1">'TTCCPSIVARSNFNVCRLPGTPEA------GCIIIPGATCPGDYAN'</span> <span class="n">aln</span> <span class="o">=</span> <span class="n">seq</span><span class="o">.</span><span class="n">CreateAlignment</span><span class="p">(</span><span class="n">seq</span><span class="o">.</span><span class="n">CreateSequence</span><span class="p">(</span><span class="s1">'trg'</span><span class="p">,</span> <span class="n">seq_trg</span><span class="p">),</span> <span class="n">seq</span><span class="o">.</span><span class="n">CreateSequence</span><span class="p">(</span><span class="s1">'tpl'</span><span class="p">,</span> <span class="n">seq_tpl</span><span class="p">))</span> <span class="n">aln</span><span class="o">.</span><span class="n">AttachView</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">tpl</span><span class="o">.</span><span class="n">CreateFullView</span><span class="p">())</span> <span class="n">mhandle</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">BuildRawModel</span><span class="p">(</span><span class="n">aln</span><span class="p">)</span> <span class="c1"># close gaps</span> <span class="nb">print</span><span class="p">(</span><span class="s1">'Number of gaps before: </span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">))</span> <span class="n">modelling</span><span class="o">.</span><span class="n">FillLoopsByDatabase</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadFragDB</span><span class="p">(),</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadStructureDB</span><span class="p">(),</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadTorsionSamplerCoil</span><span class="p">())</span> <span class="nb">print</span><span class="p">(</span><span class="s1">'Number of gaps after: </span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">))</span> </pre></div> </div> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle on which to apply change.</p></li> <li><p><strong>fragment_db</strong> (<a class="reference internal" href="../loop/structure_db.html#promod3.loop.FragDB" title="promod3.loop.FragDB"><code class="xref py py-class docutils literal notranslate"><span class="pre">FragDB</span></code></a>) – A fragment database coupled to the <em>structure_db</em>.</p></li> <li><p><strong>structure_db</strong> (<a class="reference internal" href="../loop/structure_db.html#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal notranslate"><span class="pre">StructureDB</span></code></a>) – Backbone/profile data.</p></li> <li><p><strong>torsion_sampler</strong> (<a class="reference internal" href="../loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal notranslate"><span class="pre">TorsionSampler</span></code></a>) – A sampler for torsion angles. A default one is loaded if None.</p></li> <li><p><strong>max_loops_to_search</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Define how many candidates are ‘enough’ to be evaluated per loop. The actual found candidates may be more (if we found ‘enough’) or less (if not enough candidates exist) of this number.</p></li> <li><p><strong>min_loops_required</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Define how many candidates we require to close the loop. If we did not find at least this number of candidates for a gap, we skip it without closing. Can be set to <code class="docutils literal notranslate"><span class="pre">max_loops_to_search</span></code> (or equivalently to -1) to enforce that we only close gaps for which we found enough candidates.</p></li> <li><p><strong>max_res_extension</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Only allow this number of residues to be added to the gaps when extending. If set to <strong>-1</strong>, any number of residues can be added (as long as the <cite>fragment_db</cite> allows it).</p></li> <li><p><strong>extended_search</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – True = more loop candidates are considered. The candidate search is done less precisely (see <a class="reference internal" href="loop_candidates.html#promod3.modelling.LoopCandidates.FillFromDatabase" title="promod3.modelling.LoopCandidates.FillFromDatabase"><code class="xref py py-meth docutils literal notranslate"><span class="pre">FillFromDatabase()</span></code></a>). The candidates are still scored and evaluated the same though (only more of them considered).</p></li> <li><p><strong>use_scoring_extender</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – True = use <a class="reference internal" href="gap_handling.html#promod3.modelling.ScoringGapExtender" title="promod3.modelling.ScoringGapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">ScoringGapExtender</span></code></a> instead of <a class="reference internal" href="gap_handling.html#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">GapExtender</span></code></a>. See <a class="reference internal" href="#promod3.modelling.CloseSmallDeletions" title="promod3.modelling.CloseSmallDeletions"><code class="xref py py-func docutils literal notranslate"><span class="pre">CloseSmallDeletions()</span></code></a>.</p></li> <li><p><strong>use_full_extender</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – True = use <a class="reference internal" href="gap_handling.html#promod3.modelling.FullGapExtender" title="promod3.modelling.FullGapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">FullGapExtender</span></code></a> instead of <a class="reference internal" href="gap_handling.html#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">GapExtender</span></code></a>. See <a class="reference internal" href="#promod3.modelling.CloseSmallDeletions" title="promod3.modelling.CloseSmallDeletions"><code class="xref py py-func docutils literal notranslate"><span class="pre">CloseSmallDeletions()</span></code></a>.</p></li> <li><p><strong>score_variant</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – <p>How to score loop candidates. Options:</p> <ul> <li><p><strong>0</strong>: put frame of backbone residues enclosing all candidates and score frame. This will also “score” non-modelled residues!</p></li> <li><p><strong>1</strong>: score candidates directly</p></li> <li><p><strong>2</strong>: like <strong>1</strong> but penalize length of candidate</p></li> </ul> </p></li> <li><p><strong>ring_punch_detection</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – <p>How to deal with ring punchings. Options:</p> <ul> <li><p><strong>0</strong>: not at all (fastest)</p></li> <li><p><strong>1</strong>: check for punchings with existing rings</p></li> <li><p><strong>2</strong>: check incl. sidechain for loop cand.</p></li> </ul> </p></li> <li><p><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – If not None, only gaps from chain with given index get processed</p></li> <li><p><strong>resnum_range</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#tuple" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a> containing two <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – If not None, only gaps within this resnum range get processed</p></li> <li><p><strong>max_num_all_atom</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – If > 0, we prefilter loop candidates based on non-all-atom-scores and apply all atom scoring to the best <em>max_num_all_atom</em> candidates. If desired, <em>5</em> is a good value here (larger values give only numerical improvement). With <em>5</em>, this will be approx. 2x slower than without and will give a slight improvement in loop selection.</p></li> <li><p><strong>clash_thresh</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#float" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a>) – If > 0, we only keep loop candidates which have a backbone clash score lower than this.</p></li> <li><p><strong>length_dep_weights</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – <a class="reference internal" href="loop_candidates.html#promod3.modelling.ScoringWeights" title="promod3.modelling.ScoringWeights"><code class="xref py py-class docutils literal notranslate"><span class="pre">ScoringWeights</span></code></a> provides different sets of weights that have been trained on different loop subsets. If this flag is true, the length dependent weights are used to select the final loops.</p></li> </ul> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.FillLoopsByMonteCarlo"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">FillLoopsByMonteCarlo</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">torsion_sampler=None</em>, <em class="sig-param">max_loops_to_search=6</em>, <em class="sig-param">max_extension=30</em>, <em class="sig-param">mc_num_loops=2</em>, <em class="sig-param">mc_steps=5000</em>, <em class="sig-param">use_scoring_extender=True</em>, <em class="sig-param">use_full_extender=True</em>, <em class="sig-param">score_variant=0</em>, <em class="sig-param">ring_punch_detection=1</em>, <em class="sig-param">fragger_handles=None</em>, <em class="sig-param">chain_idx=None</em>, <em class="sig-param">resnum_range=None</em>, <em class="sig-param">length_dep_weights=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.FillLoopsByMonteCarlo" title="Permalink to this definition">¶</a></dt> <dd><p>Try to fill up loops with Monte Carlo sampling.</p> <p>This is meant as a “last-resort” approach when it is not possible to fill the loops from the database with <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByDatabase()</span></code></a>. This will extend the gaps (up to <em>max_extension</em> times) a bit to allow for more loop candidates to be found.</p> <p>The loops are modelled by either sampling the dihedral angles or (if <em>fragger_handles</em> is given) <a class="reference internal" href="../loop/structure_db.html#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal notranslate"><span class="pre">Fragger</span></code></a> lists. The latter is only used if the gap length is >= the length of fragments stored.</p> <p>This function cannot fill gaps at C- or N-terminal.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">ost</span> <span class="k">import</span> <span class="n">io</span><span class="p">,</span> <span class="n">seq</span> <span class="kn">from</span> <span class="nn">promod3</span> <span class="k">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span> <span class="c1"># setup</span> <span class="n">tpl</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">LoadPDB</span><span class="p">(</span><span class="s1">'data/1crn_cut.pdb'</span><span class="p">)</span> <span class="n">seq_trg</span> <span class="o">=</span> <span class="s1">'TTCCPSIVARSNFNVCRLPGTPEAICATYTGCIIIPGATCPGDYAN'</span> <span class="n">seq_tpl</span> <span class="o">=</span> <span class="s1">'TTCCPSIVARSNFNVCRLPGTPEA------GCIIIPGATCPGDYAN'</span> <span class="n">aln</span> <span class="o">=</span> <span class="n">seq</span><span class="o">.</span><span class="n">CreateAlignment</span><span class="p">(</span><span class="n">seq</span><span class="o">.</span><span class="n">CreateSequence</span><span class="p">(</span><span class="s1">'trg'</span><span class="p">,</span> <span class="n">seq_trg</span><span class="p">),</span> <span class="n">seq</span><span class="o">.</span><span class="n">CreateSequence</span><span class="p">(</span><span class="s1">'tpl'</span><span class="p">,</span> <span class="n">seq_tpl</span><span class="p">))</span> <span class="n">aln</span><span class="o">.</span><span class="n">AttachView</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">tpl</span><span class="o">.</span><span class="n">CreateFullView</span><span class="p">())</span> <span class="n">mhandle</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">BuildRawModel</span><span class="p">(</span><span class="n">aln</span><span class="p">)</span> <span class="c1"># close gaps</span> <span class="nb">print</span><span class="p">(</span><span class="s1">'Number of gaps before: </span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">))</span> <span class="n">modelling</span><span class="o">.</span><span class="n">FillLoopsByMonteCarlo</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadTorsionSamplerCoil</span><span class="p">())</span> <span class="nb">print</span><span class="p">(</span><span class="s1">'Number of gaps after: </span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">))</span> </pre></div> </div> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle on which to apply change.</p></li> <li><p><strong>torsion_sampler</strong> (<a class="reference internal" href="../loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal notranslate"><span class="pre">TorsionSampler</span></code></a>) – A sampler for torsion angles. A default one is loaded if None.</p></li> <li><p><strong>max_loops_to_search</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Define how many candidates are ‘enough’ to be evaluated per loop.</p></li> <li><p><strong>max_extension</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Maximal number of gap extension steps to perform (see <a class="reference internal" href="gap_handling.html#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">GapExtender</span></code></a>)</p></li> <li><p><strong>mc_num_loops</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Number of loop candidates to consider for each extended gap (see <a class="reference internal" href="loop_candidates.html#promod3.modelling.LoopCandidates.FillFromMonteCarloSampler" title="promod3.modelling.LoopCandidates.FillFromMonteCarloSampler"><code class="xref py py-meth docutils literal notranslate"><span class="pre">FillFromMonteCarloSampler()</span></code></a>)</p></li> <li><p><strong>mc_steps</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Number of MC steps to perform for each loop candidate (see <a class="reference internal" href="loop_candidates.html#promod3.modelling.LoopCandidates.FillFromMonteCarloSampler" title="promod3.modelling.LoopCandidates.FillFromMonteCarloSampler"><code class="xref py py-meth docutils literal notranslate"><span class="pre">FillFromMonteCarloSampler()</span></code></a>)</p></li> <li><p><strong>use_scoring_extender</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – True = use <a class="reference internal" href="gap_handling.html#promod3.modelling.ScoringGapExtender" title="promod3.modelling.ScoringGapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">ScoringGapExtender</span></code></a> instead of <a class="reference internal" href="gap_handling.html#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">GapExtender</span></code></a>. See <a class="reference internal" href="#promod3.modelling.CloseSmallDeletions" title="promod3.modelling.CloseSmallDeletions"><code class="xref py py-func docutils literal notranslate"><span class="pre">CloseSmallDeletions()</span></code></a>.</p></li> <li><p><strong>use_full_extender</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – True = use <a class="reference internal" href="gap_handling.html#promod3.modelling.FullGapExtender" title="promod3.modelling.FullGapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">FullGapExtender</span></code></a> instead of <a class="reference internal" href="gap_handling.html#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">GapExtender</span></code></a>. See <a class="reference internal" href="#promod3.modelling.CloseSmallDeletions" title="promod3.modelling.CloseSmallDeletions"><code class="xref py py-func docutils literal notranslate"><span class="pre">CloseSmallDeletions()</span></code></a>.</p></li> <li><p><strong>score_variant</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – How to score loop candidates (AllAtom not supported). See <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByDatabase()</span></code></a>.</p></li> <li><p><strong>ring_punch_detection</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – How to deal with ring punchings. See <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByDatabase()</span></code></a>.</p></li> <li><p><strong>fragger_handles</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> of <a class="reference internal" href="algorithms.html#promod3.modelling.FraggerHandle" title="promod3.modelling.FraggerHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">FraggerHandle</span></code></a>) – Either None (no fragger sampling used) or one fragger handle for each chain in <em>mhandle</em>.</p></li> <li><p><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – If not None, only gaps from chain with given index get processed</p></li> <li><p><strong>resnum_range</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#tuple" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a> containing two <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – If not None, only gaps within this resnum range get processed</p></li> <li><p><strong>length_dep_weights</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – <a class="reference internal" href="loop_candidates.html#promod3.modelling.ScoringWeights" title="promod3.modelling.ScoringWeights"><code class="xref py py-class docutils literal notranslate"><span class="pre">ScoringWeights</span></code></a> provides different sets of weights that have been trained on different loop subsets. If this flag is true, the length dependent weights are used to select the final loops.</p></li> </ul> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.CloseLargeDeletions"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">CloseLargeDeletions</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">structure_db</em>, <em class="sig-param">linker_length=8</em>, <em class="sig-param">num_fragments=500</em>, <em class="sig-param">use_scoring_extender=True</em>, <em class="sig-param">use_full_extender=True</em>, <em class="sig-param">chain_idx=None</em>, <em class="sig-param">resnum_range=None</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.CloseLargeDeletions" title="Permalink to this definition">¶</a></dt> <dd><p>Try to close large deletions.</p> <p>This is meant as a “last-resort” approach. In some cases you cannot close very large deletions simply because the two parts separated by a deletion are too far apart. The idea is to sample a linker region and always move the whole chain towards the n-terminus.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle on which to apply change.</p></li> <li><p><strong>structure_db</strong> (<a class="reference internal" href="../loop/structure_db.html#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal notranslate"><span class="pre">StructureDB</span></code></a>) – The database from which to extract fragments for the linker region.</p></li> <li><p><strong>linker_length</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Desired length (in residues w/o stems) for the linker. This may be shorter if extender cannot extend further.</p></li> <li><p><strong>num_fragments</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Number of fragments to sample the linker.</p></li> <li><p><strong>use_scoring_extender</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – True = use <a class="reference internal" href="gap_handling.html#promod3.modelling.ScoringGapExtender" title="promod3.modelling.ScoringGapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">ScoringGapExtender</span></code></a> instead of <a class="reference internal" href="gap_handling.html#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">GapExtender</span></code></a>. See <a class="reference internal" href="#promod3.modelling.CloseSmallDeletions" title="promod3.modelling.CloseSmallDeletions"><code class="xref py py-func docutils literal notranslate"><span class="pre">CloseSmallDeletions()</span></code></a>.</p></li> <li><p><strong>use_full_extender</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – True = use <a class="reference internal" href="gap_handling.html#promod3.modelling.FullGapExtender" title="promod3.modelling.FullGapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">FullGapExtender</span></code></a> instead of <a class="reference internal" href="gap_handling.html#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal notranslate"><span class="pre">GapExtender</span></code></a>. See <a class="reference internal" href="#promod3.modelling.CloseSmallDeletions" title="promod3.modelling.CloseSmallDeletions"><code class="xref py py-func docutils literal notranslate"><span class="pre">CloseSmallDeletions()</span></code></a>.</p></li> <li><p><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – If not None, only gaps from chain with given index get processed</p></li> <li><p><strong>resnum_range</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#tuple" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a> containing two <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – If not None, only gaps within this resnum range get processed</p></li> </ul> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.ModelTermini"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">ModelTermini</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">torsion_sampler</em>, <em class="sig-param">fragger_handles=None</em>, <em class="sig-param">mc_num_loops=20</em>, <em class="sig-param">mc_steps=5000</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ModelTermini" title="Permalink to this definition">¶</a></dt> <dd><p>Try to model termini with Monte Carlo sampling.</p> <p>Use with care! This is an experimental feature which will increase coverage but we do not assume that the resulting termini are of high quality!</p> <p>The termini are modelled by either sampling the dihedral angles or (if <em>fragger_handles</em> is given) <a class="reference internal" href="../loop/structure_db.html#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal notranslate"><span class="pre">Fragger</span></code></a> lists. The latter is only used if the gap length is >= the length of fragments stored.</p> <p>Terminal gaps of length 1 are ignored by this function!</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">ost</span> <span class="k">import</span> <span class="n">io</span><span class="p">,</span> <span class="n">seq</span> <span class="kn">from</span> <span class="nn">promod3</span> <span class="k">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span> <span class="c1"># setup</span> <span class="n">tpl</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">LoadPDB</span><span class="p">(</span><span class="s1">'data/gly.pdb'</span><span class="p">)</span> <span class="n">seq_trg</span> <span class="o">=</span> <span class="s1">'AAAAGGGGGGGGGGGGGGGGGGGGAAAAAA'</span> <span class="n">seq_tpl</span> <span class="o">=</span> <span class="s1">'----GGGGGGGGGGGGGGGGGGGG------'</span> <span class="n">aln</span> <span class="o">=</span> <span class="n">seq</span><span class="o">.</span><span class="n">CreateAlignment</span><span class="p">(</span><span class="n">seq</span><span class="o">.</span><span class="n">CreateSequence</span><span class="p">(</span><span class="s1">'trg'</span><span class="p">,</span> <span class="n">seq_trg</span><span class="p">),</span> <span class="n">seq</span><span class="o">.</span><span class="n">CreateSequence</span><span class="p">(</span><span class="s1">'tpl'</span><span class="p">,</span> <span class="n">seq_tpl</span><span class="p">))</span> <span class="n">aln</span><span class="o">.</span><span class="n">AttachView</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">tpl</span><span class="o">.</span><span class="n">CreateFullView</span><span class="p">())</span> <span class="n">mhandle</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">BuildRawModel</span><span class="p">(</span><span class="n">aln</span><span class="p">)</span> <span class="c1"># close gaps</span> <span class="nb">print</span><span class="p">(</span><span class="s1">'Number of gaps before: </span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">))</span> <span class="n">modelling</span><span class="o">.</span><span class="n">ModelTermini</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadTorsionSamplerCoil</span><span class="p">())</span> <span class="nb">print</span><span class="p">(</span><span class="s1">'Number of gaps after: </span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">))</span> </pre></div> </div> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle on which to apply change.</p></li> <li><p><strong>torsion_sampler</strong> (<a class="reference internal" href="../loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal notranslate"><span class="pre">TorsionSampler</span></code></a>) – A sampler for torsion angles.</p></li> <li><p><strong>fragger_handles</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> of <a class="reference internal" href="algorithms.html#promod3.modelling.FraggerHandle" title="promod3.modelling.FraggerHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">FraggerHandle</span></code></a>) – Either None (no fragger sampling used) or one fragger handle for each chain in <em>mhandle</em>.</p></li> <li><p><strong>mc_num_loops</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Number of loop candidates to consider for each terminal gap (see <a class="reference internal" href="loop_candidates.html#promod3.modelling.LoopCandidates.FillFromMonteCarloSampler" title="promod3.modelling.LoopCandidates.FillFromMonteCarloSampler"><code class="xref py py-meth docutils literal notranslate"><span class="pre">FillFromMonteCarloSampler()</span></code></a>)</p></li> <li><p><strong>mc_steps</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Number of MC steps to perform for each loop candidate (see <a class="reference internal" href="loop_candidates.html#promod3.modelling.LoopCandidates.FillFromMonteCarloSampler" title="promod3.modelling.LoopCandidates.FillFromMonteCarloSampler"><code class="xref py py-meth docutils literal notranslate"><span class="pre">FillFromMonteCarloSampler()</span></code></a>)</p></li> </ul> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.BuildSidechains"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">BuildSidechains</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">merge_distance=4</em>, <em class="sig-param">fragment_db=None</em>, <em class="sig-param">structure_db=None</em>, <em class="sig-param">torsion_sampler=None</em>, <em class="sig-param">rotamer_library=None</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.BuildSidechains" title="Permalink to this definition">¶</a></dt> <dd><p>Build sidechains for model.</p> <p>This is a wrapper for <a class="reference internal" href="sidechain_reconstruction.html#promod3.modelling.ReconstructSidechains" title="promod3.modelling.ReconstructSidechains"><code class="xref py py-func docutils literal notranslate"><span class="pre">promod3.modelling.ReconstructSidechains()</span></code></a>, followed by a check for ring punches. If ring punches are found it introduces gaps for the residues with punched rings and tries to fill them with <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByDatabase()</span></code></a> with <em>ring_punch_detection=2</em>.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle on which to apply change.</p></li> <li><p><strong>merge_distance</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Used as parameter for <a class="reference internal" href="#promod3.modelling.MergeGapsByDistance" title="promod3.modelling.MergeGapsByDistance"><code class="xref py py-func docutils literal notranslate"><span class="pre">MergeGapsByDistance()</span></code></a> if ring punches are found.</p></li> <li><p><strong>fragment_db</strong> (<a class="reference internal" href="../loop/structure_db.html#promod3.loop.FragDB" title="promod3.loop.FragDB"><code class="xref py py-class docutils literal notranslate"><span class="pre">FragDB</span></code></a>) – Used as parameter for <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByDatabase()</span></code></a> if ring punches are found. A default one is loaded if None.</p></li> <li><p><strong>structure_db</strong> (<a class="reference internal" href="../loop/structure_db.html#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal notranslate"><span class="pre">StructureDB</span></code></a>) – Used as parameter for <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByDatabase()</span></code></a> if ring punches are found. A default one is loaded if None.</p></li> <li><p><strong>torsion_sampler</strong> (<a class="reference internal" href="../loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal notranslate"><span class="pre">TorsionSampler</span></code></a>) – Used as parameter for <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal notranslate"><span class="pre">FillLoopsByDatabase()</span></code></a> if ring punches are found. A default one is loaded if None.</p></li> <li><p><strong>rotamer_library</strong> (<a class="reference internal" href="../sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib" title="promod3.sidechain.RotamerLib"><code class="xref py py-class docutils literal notranslate"><span class="pre">RotamerLib</span></code></a> or <a class="reference internal" href="../sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal notranslate"><span class="pre">BBDepRotamerLib</span></code></a>) – Used as parameter for <code class="xref py py-func docutils literal notranslate"><span class="pre">modelling.ReconstructSidechains()</span></code>, a default one is loaded if None.</p></li> </ul> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.MinimizeModelEnergy"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">MinimizeModelEnergy</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">max_iterations=12</em>, <em class="sig-param">max_iter_sd=20</em>, <em class="sig-param">max_iter_lbfgs=10</em>, <em class="sig-param">use_amber_ff=False</em>, <em class="sig-param">extra_force_fields=[]</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.MinimizeModelEnergy" title="Permalink to this definition">¶</a></dt> <dd><p>Minimize energy of final model using molecular mechanics.</p> <p>Uses <a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/mm/molmm/#module-ost.mol.mm" title="(in OpenStructure v2.2.0)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ost.mol.mm</span></code></a> to perform energy minimization. It will iteratively (at most <em>max_iterations</em> times):</p> <ul class="simple"> <li><p>run up to <em>max_iter_sd</em> minimization iter. of a steepest descend method</p></li> <li><p>run up to <em>max_iter_lbfgs</em> minimization iter. of a Limited-memory Broyden-Fletcher-Goldfarb-Shanno method</p></li> <li><p>abort if no stereochemical problems found</p></li> </ul> <p>The idea is that we don’t want to minimize “too much”. So, we iteratively minimize until there are no stereochemical problems and not more.</p> <p>To speed things up, this can run on multiple CPU threads by setting the env. variable <code class="docutils literal notranslate"><span class="pre">PM3_OPENMM_CPU_THREADS</span></code> to the number of desired threads. If the variable is not set, 1 thread will be used by default.</p> <p>If the starting model is so bad that the energy is NaN or Inf from the start (happens if atoms are on top of each other or almost), the energy minimization is aborted. This issue is logged and added as a major issue to <a class="reference internal" href="#promod3.modelling.ModellingHandle.modelling_issues" title="promod3.modelling.ModellingHandle.modelling_issues"><code class="xref py py-attr docutils literal notranslate"><span class="pre">modelling_issues</span></code></a> of <em>mhandle</em>.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle on which to apply change.</p></li> <li><p><strong>max_iterations</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Max. number of iterations for SD+LBFGS</p></li> <li><p><strong>max_iter_sd</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Max. number of iterations within SD method</p></li> <li><p><strong>max_iter_lbfgs</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – Max. number of iterations within LBFGS method</p></li> <li><p><strong>use_amber_ff</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>) – if True, use the AMBER force field instead of the def. CHARMM one (see <a class="reference internal" href="#promod3.modelling.BuildFromRawModel" title="promod3.modelling.BuildFromRawModel"><code class="xref py py-meth docutils literal notranslate"><span class="pre">BuildFromRawModel()</span></code></a>).</p></li> <li><p><strong>extra_force_fields</strong> (<a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> of <a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/mm/forcefield/#ost.mol.mm.Forcefield" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ost.mol.mm.Forcefield</span></code></a>) – Additional list of force fields to use (see <a class="reference internal" href="#promod3.modelling.BuildFromRawModel" title="promod3.modelling.BuildFromRawModel"><code class="xref py py-meth docutils literal notranslate"><span class="pre">BuildFromRawModel()</span></code></a>).</p></li> </ul> </dd> <dt class="field-even">Returns</dt> <dd class="field-even"><p>The model including all oxygens as used in the minimizer.</p> </dd> <dt class="field-odd">Return type</dt> <dd class="field-odd"><p><a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Entity</span></code></a></p> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.CheckFinalModel"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">CheckFinalModel</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.CheckFinalModel" title="Permalink to this definition">¶</a></dt> <dd><p>Performs samity checks on final models and reports problems.</p> <p>Issues are logged and tracked in <a class="reference internal" href="#promod3.modelling.ModellingHandle.modelling_issues" title="promod3.modelling.ModellingHandle.modelling_issues"><code class="xref py py-attr docutils literal notranslate"><span class="pre">modelling_issues</span></code></a> of <em>mhandle</em>. Major issues:</p> <ul class="simple"> <li><p>Chains with less than 3 residues (usually due to bad templates).</p></li> <li><p>Incomplete models (i.e. some gaps couldn’t be closed). One issue is created per unclosed gap and the stems of the gap are added to the issue.</p></li> <li><p>Complete models with sequence mismatches (should never happen).</p></li> <li><p>Residues with rings which have been punched by another bond.</p></li> </ul> <p>Minor issues:</p> <ul class="simple"> <li><p>Remaining stereo-chemical problems after energy minimization. The affected residues will have the boolean property “stereo_chemical_problem_backbone” set to True, if the problem affects backbone atoms.</p></li> </ul> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Modelling handle for which to perform checks.</p> </dd> </dl> </dd></dl> <dl class="class"> <dt id="promod3.modelling.ModellingIssue"> <em class="property">class </em><code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">ModellingIssue</code><span class="sig-paren">(</span><em class="sig-param">text</em>, <em class="sig-param">severity</em>, <em class="sig-param">residue_list=[]</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ModellingIssue" title="Permalink to this definition">¶</a></dt> <dd><dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>text</strong> – Sets <a class="reference internal" href="#promod3.modelling.ModellingIssue.text" title="promod3.modelling.ModellingIssue.text"><code class="xref py py-attr docutils literal notranslate"><span class="pre">text</span></code></a>.</p></li> <li><p><strong>severity</strong> – Sets <a class="reference internal" href="#promod3.modelling.ModellingIssue.severity" title="promod3.modelling.ModellingIssue.severity"><code class="xref py py-attr docutils literal notranslate"><span class="pre">severity</span></code></a>.</p></li> <li><p><strong>residue_list</strong> – Sets <a class="reference internal" href="#promod3.modelling.ModellingIssue.residue_list" title="promod3.modelling.ModellingIssue.residue_list"><code class="xref py py-attr docutils literal notranslate"><span class="pre">residue_list</span></code></a>.</p></li> </ul> </dd> </dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingIssue.text"> <code class="sig-name descname">text</code><a class="headerlink" href="#promod3.modelling.ModellingIssue.text" title="Permalink to this definition">¶</a></dt> <dd><p>Description of issue.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#str" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingIssue.severity"> <code class="sig-name descname">severity</code><a class="headerlink" href="#promod3.modelling.ModellingIssue.severity" title="Permalink to this definition">¶</a></dt> <dd><p>Severity of issue.</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference internal" href="#promod3.modelling.ModellingIssue.Severity" title="promod3.modelling.ModellingIssue.Severity"><code class="xref py py-class docutils literal notranslate"><span class="pre">Severity</span></code></a></p> </dd> </dl> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingIssue.residue_list"> <code class="sig-name descname">residue_list</code><a class="headerlink" href="#promod3.modelling.ModellingIssue.residue_list" title="Permalink to this definition">¶</a></dt> <dd><p>List of residues affected by issue (or empty list if global issue).</p> <dl class="field-list simple"> <dt class="field-odd">Type</dt> <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#list" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> of <a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ResidueHandle</span></code></a> / <a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/base/entity/#ost.mol.ResidueView" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ResidueView</span></code></a></p> </dd> </dl> </dd></dl> <dl class="class"> <dt id="promod3.modelling.ModellingIssue.Severity"> <em class="property">class </em><code class="sig-name descname">Severity</code><a class="headerlink" href="#promod3.modelling.ModellingIssue.Severity" title="Permalink to this definition">¶</a></dt> <dd><p>Enumerates severities.</p> <dl class="attribute"> <dt id="promod3.modelling.ModellingIssue.Severity.MAJOR"> <code class="sig-name descname">MAJOR</code><em class="property"> = 10</em><a class="headerlink" href="#promod3.modelling.ModellingIssue.Severity.MAJOR" title="Permalink to this definition">¶</a></dt> <dd><p>Major issues like MM-failures, incomplete models and ring punches.</p> </dd></dl> <dl class="attribute"> <dt id="promod3.modelling.ModellingIssue.Severity.MINOR"> <code class="sig-name descname">MINOR</code><em class="property"> = 0</em><a class="headerlink" href="#promod3.modelling.ModellingIssue.Severity.MINOR" title="Permalink to this definition">¶</a></dt> <dd><p>Minor issues like remaining stereo-chemistry problems after MM.</p> </dd></dl> </dd></dl> <dl class="method"> <dt id="promod3.modelling.ModellingIssue.is_major"> <code class="sig-name descname">is_major</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ModellingIssue.is_major" title="Permalink to this definition">¶</a></dt> <dd><dl class="field-list simple"> <dt class="field-odd">Returns</dt> <dd class="field-odd"><p>True if this is a major issue.</p> </dd> <dt class="field-even">Return type</dt> <dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a></p> </dd> </dl> </dd></dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.AddModellingIssue"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">AddModellingIssue</code><span class="sig-paren">(</span><em class="sig-param">mhandle</em>, <em class="sig-param">text</em>, <em class="sig-param">severity</em>, <em class="sig-param">residue_list=[]</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.AddModellingIssue" title="Permalink to this definition">¶</a></dt> <dd><p>Adds a new <a class="reference internal" href="#promod3.modelling.ModellingIssue" title="promod3.modelling.ModellingIssue"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingIssue</span></code></a> to <a class="reference internal" href="#promod3.modelling.ModellingHandle.modelling_issues" title="promod3.modelling.ModellingHandle.modelling_issues"><code class="xref py py-attr docutils literal notranslate"><span class="pre">modelling_issues</span></code></a> in <em>mhandle</em>.</p> <p>If <em>mhandle</em> doesn’t contain the <a class="reference internal" href="#promod3.modelling.ModellingHandle.modelling_issues" title="promod3.modelling.ModellingHandle.modelling_issues"><code class="xref py py-attr docutils literal notranslate"><span class="pre">modelling_issues</span></code></a> attribute yet, it is added.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><ul class="simple"> <li><p><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModellingHandle</span></code></a>) – Will have the issue added to.</p></li> <li><p><strong>text</strong> – Sets <a class="reference internal" href="#promod3.modelling.ModellingIssue.text" title="promod3.modelling.ModellingIssue.text"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ModellingIssue.text</span></code></a>.</p></li> <li><p><strong>severity</strong> – Sets <a class="reference internal" href="#promod3.modelling.ModellingIssue.severity" title="promod3.modelling.ModellingIssue.severity"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ModellingIssue.severity</span></code></a>.</p></li> <li><p><strong>residue_list</strong> – Sets <a class="reference internal" href="#promod3.modelling.ModellingIssue.residue_list" title="promod3.modelling.ModellingIssue.residue_list"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ModellingIssue.residue_list</span></code></a>.</p></li> </ul> </dd> </dl> </dd></dl> </div> <div class="section" id="alignment-fiddling"> <h2>Alignment Fiddling<a class="headerlink" href="#alignment-fiddling" title="Permalink to this headline">¶</a></h2> <dl class="function"> <dt id="promod3.modelling.DeleteGapCols"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">DeleteGapCols</code><span class="sig-paren">(</span><em class="sig-param">aln</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.DeleteGapCols" title="Permalink to this definition">¶</a></dt> <dd><p>Deletes alignment columns that only contain gaps.</p> <p>Columns that only contain gaps (‘-‘) are removed. If no such column can be identified, the input alignment gets returned. A new alignment gets constructed otherwise. The sequences of the new alignment retain name, offset and the potentially attached <a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ost.mol.EntityView</span></code></a> from the original sequences.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><p><strong>aln</strong> (<a class="reference external" href="https://www.openstructure.org/docs/2.2/seq/base/seq/#ost.seq.AlignmentHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ost.seq.AlignmentHandle</span></code></a>) – Input alignment</p> </dd> <dt class="field-even">Returns</dt> <dd class="field-even"><p>The processed alignment</p> </dd> <dt class="field-odd">Return type</dt> <dd class="field-odd"><p><a class="reference external" href="https://www.openstructure.org/docs/2.2/seq/base/seq/#ost.seq.AlignmentHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ost.seq.AlignmentHandle</span></code></a></p> </dd> </dl> </dd></dl> <dl class="function"> <dt id="promod3.modelling.PullTerminalDeletions"> <code class="sig-prename descclassname">promod3.modelling.</code><code class="sig-name descname">PullTerminalDeletions</code><span class="sig-paren">(</span><em class="sig-param">aln</em>, <em class="sig-param">min_terminal_anchor_size=4</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.PullTerminalDeletions" title="Permalink to this definition">¶</a></dt> <dd><p>Fixes deletions close to termini.</p> <p>Some alignment tools may produce alignments with deletions close to the termini. For example:</p> <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>SEQRES: A-----BCDE... ATOMSEQ: ABCDEFGHIJ... </pre></div> </div> <p>where A is the anchor residue. The default loop modelling pipeline would keep the position of A fixed and start to omit structural information from B, C, … until it is able to resolve the deletion. If the anchor is very short, a shift typically results in a better model:</p> <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>SEQRES: -----ABCDE... ATOMSEQ: ABCDEFGHIJ... </pre></div> </div> <p>This function checks whether the gap closest to any termini is a deletion (one or several ‘-‘ in the first sequence) and estimates the anchor size (number of aligned residues towards the respective termini from that gap). If the anchor size is smaller than <em>min_terminal_anchor_size</em>, a shift is applied and the deletion removed.</p> <p>This is done iteratively, until no deletion can be removed anymore.</p> <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>SEQRES: A-B--CDEF... ATOMSEQ: ABCDEFGHI... </pre></div> </div> <p>becomes</p> <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>SEQRES: ---ABCDEF... ATOMSEQ: ABCDEFGHI... </pre></div> </div> <p>given a <em>min_terminal_anchor_size</em>>2. If no shift can be performed, the input alignment gets returned. A new alignment gets constructed otherwise. The sequences of the new alignment retain name, offset and the potentially attached <a class="reference external" href="https://www.openstructure.org/docs/2.2/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ost.mol.EntityView</span></code></a> from the original sequences.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><p><strong>aln</strong> (<a class="reference external" href="https://www.openstructure.org/docs/2.2/seq/base/seq/#ost.seq.AlignmentHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ost.seq.AlignmentHandle</span></code></a>) – Input alignment</p> </dd> <dt class="field-even">Returns</dt> <dd class="field-even"><p>The processed alignment</p> </dd> <dt class="field-odd">Return type</dt> <dd class="field-odd"><p><a class="reference external" href="https://www.openstructure.org/docs/2.2/seq/base/seq/#ost.seq.AlignmentHandle" title="(in OpenStructure v2.2.0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ost.seq.AlignmentHandle</span></code></a></p> </dd> </dl> </dd></dl> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h1 class="logo"><a href="../index.html">ProMod3</a></h1> <h3>Navigation</h3> <ul class="current"> <li class="toctree-l1 current"><a class="reference internal" href="../users.html">Users</a><ul class="current"> <li class="toctree-l2"><a class="reference internal" href="../gettingstarted.html">Getting Started</a></li> <li class="toctree-l2"><a class="reference internal" href="../actions/index.html">ProMod3 Actions</a></li> <li class="toctree-l2"><a class="reference internal" href="../buildsystem.html">Building ProMod3</a></li> <li class="toctree-l2"><a class="reference internal" href="../container/index.html">ProMod3 and Containers</a></li> <li class="toctree-l2 current"><a class="reference internal" href="index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">modelling</span></code> - Protein Modelling</a></li> <li class="toctree-l2"><a class="reference internal" href="../sidechain/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sidechain</span></code> - Sidechain Modelling</a></li> <li class="toctree-l2"><a class="reference internal" href="../scoring/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">scoring</span></code> - Loop Scoring</a></li> <li class="toctree-l2"><a class="reference internal" href="../loop/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">loop</span></code> - Loop Handling</a></li> <li class="toctree-l2"><a class="reference internal" href="../core/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">core</span></code> - ProMod3 Core Functionality</a></li> <li class="toctree-l2"><a class="reference internal" href="../core/setcompoundschemlib.html"><code class="xref py py-func docutils literal notranslate"><span class="pre">SetCompoundsChemlib()</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="../user_contributions.html">Contributing</a></li> </ul> </li> </ul> <ul> <li class="toctree-l1"><a class="reference internal" href="../developers.html">Developers</a></li> <li class="toctree-l1"><a class="reference internal" href="../license.html">License</a></li> <li class="toctree-l1"><a class="reference internal" href="../references.html">References</a></li> <li class="toctree-l1"><a class="reference internal" href="../changelog.html">Changelog</a></li> </ul> <div class="relations"> <h3>Related Topics</h3> <ul> <li><a href="../index.html">Documentation overview</a><ul> <li><a href="../users.html">Documentation For Users</a><ul> <li><a href="index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">modelling</span></code> - Protein Modelling</a><ul> <li>Previous: <a href="index.html" title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">modelling</span></code> - Protein Modelling</a></li> <li>Next: <a href="model_checking.html" title="next chapter">Model Checking</a></li> </ul></li> </ul></li> </ul></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3 id="searchlabel">Quick search</h3> <div class="searchformwrapper"> <form class="search" action="../search.html" method="get"> <input type="text" name="q" aria-labelledby="searchlabel" /> <input type="submit" value="Go" /> </form> </div> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="footer"> ©2013-2020, SIB - Swiss Institute of Bioinformatics and Biozentrum - University of Basel. | Powered by <a href="http://sphinx-doc.org/">Sphinx 2.1.2</a> & <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a> | <a href="../_sources/modelling/pipeline.rst.txt" rel="nofollow">Page source</a> </div> </body> </html>