From 648153c3bda8445bbb60e168408253c6c0838e3b Mon Sep 17 00:00:00 2001
From: Gerardo Tauriello <gerardo.tauriello@unibas.ch>
Date: Wed, 27 Sep 2017 15:31:09 +0200
Subject: [PATCH] SCHWED-2641: updated doc/html

---
 doc/html/_modules/index.html                  |   50 +-
 doc/html/_modules/promod3.html                |   21 +-
 doc/html/_modules/promod3/core/helper.html    |    8 +-
 .../_modules/promod3/core/pm3argparse.html    |  599 ++--
 doc/html/_modules/promod3/loop/_fragger.html  |  424 ---
 .../promod3/modelling/_closegaps.html         |  924 ++++--
 .../_modules/promod3/modelling/_denovo.html   |  207 ++
 .../promod3/modelling/_fragger_handle.html    |  439 +++
 .../promod3/modelling/_molprobity.html        |  205 ++
 .../_modules/promod3/modelling/_pipeline.html |  340 +-
 .../modelling/_reconstruct_sidechains.html    |  620 ++++
 .../promod3/modelling/_ring_punches.html      |   45 +-
 .../sidechain/_reconstruct_sidechains.html    |  454 ---
 doc/html/_modules/test_actions.html           |    8 +-
 doc/html/_sources/actions/index.txt           |  116 +
 doc/html/_sources/buildsystem.txt             |   55 +-
 doc/html/_sources/cmake/index.txt             |    9 +-
 doc/html/_sources/contributing.txt            |  573 ++--
 doc/html/_sources/core/geometry.txt           |  141 +
 doc/html/_sources/core/index.txt              |    9 +-
 doc/html/_sources/core/runtime_profiling.txt  |   73 +
 doc/html/_sources/dev_setup.txt               |  238 ++
 doc/html/_sources/developers.txt              |    1 +
 doc/html/_sources/gettingstarted.txt          |   12 +-
 doc/html/_sources/loop/all_atom.txt           |  657 ++++
 doc/html/_sources/loop/backbone.txt           |  668 ++--
 .../_sources/loop/backbone_loop_score.txt     |  817 -----
 doc/html/_sources/loop/helper_classes.txt     |  543 ----
 doc/html/_sources/loop/index.txt              |   25 +-
 doc/html/_sources/loop/load_loop_objects.txt  |   32 +-
 doc/html/_sources/loop/loop_closing.txt       |  218 --
 doc/html/_sources/loop/mm_system_creation.txt |  807 +++++
 doc/html/_sources/loop/structure_db.txt       |  513 +--
 doc/html/_sources/loop/torsion_sampler.txt    |  167 +-
 doc/html/_sources/modelling/algorithms.txt    |  152 +
 doc/html/_sources/modelling/gap_handling.txt  |  313 ++
 doc/html/_sources/modelling/index.txt         |  484 +--
 .../_sources/modelling/loop_candidates.txt    |  569 ++++
 doc/html/_sources/modelling/loop_closing.txt  |  373 +++
 .../_sources/modelling/model_checking.txt     |   29 +
 .../{loop => modelling}/monte_carlo.txt       |  235 +-
 doc/html/_sources/modelling/pipeline.txt      |  409 +++
 .../modelling/sidechain_reconstruction.txt    |  220 ++
 doc/html/_sources/portableIO.txt              |   34 +-
 .../_sources/scoring/all_atom_scorers.txt     |  306 ++
 .../_sources/scoring/backbone_score_env.txt   |  265 ++
 .../_sources/scoring/backbone_scorers.txt     |  772 +++++
 doc/html/_sources/scoring/index.txt           |   24 +
 doc/html/_sources/sidechain/disulfid.txt      |   89 +-
 doc/html/_sources/sidechain/frame.txt         |  139 +-
 doc/html/_sources/sidechain/graph.txt         |  288 +-
 doc/html/_sources/sidechain/index.txt         |   90 +-
 doc/html/_sources/sidechain/loading.txt       |   10 +-
 doc/html/_sources/sidechain/rotamer.txt       |  793 ++---
 .../sidechain/rotamer_constructor.txt         |  251 ++
 doc/html/_sources/sidechain/rotamer_id.txt    |   57 +-
 doc/html/_sources/sidechain/rotamer_lib.txt   |  134 +-
 .../_sources/sidechain/sidechain_settings.txt |  193 --
 .../sidechain/subrotamer_optimizer.txt        |   45 +
 doc/html/_sources/users.txt                   |    4 +-
 doc/html/actions/index.html                   |  210 ++
 doc/html/actions/index_dev.html               |   14 +-
 doc/html/buildsystem.html                     |   59 +-
 doc/html/changelog.html                       |   12 +-
 doc/html/cmake/index.html                     |   21 +-
 doc/html/contributing.html                    |  520 ++-
 doc/html/core/geometry.html                   |  365 +++
 doc/html/core/helper.html                     |   16 +-
 doc/html/core/index.html                      |   15 +-
 doc/html/core/pm3argparse.html                |  244 +-
 doc/html/core/runtime_profiling.html          |  219 ++
 doc/html/core/setcompoundschemlib.html        |   12 +-
 doc/html/dev_setup.html                       |  311 ++
 doc/html/developers.html                      |   38 +-
 doc/html/genindex.html                        | 2784 ++++++++++++-----
 doc/html/gettingstarted.html                  |   25 +-
 doc/html/index.html                           |   15 +-
 doc/html/loop/all_atom.html                   | 1361 ++++++++
 doc/html/loop/backbone.html                   |  855 +++--
 doc/html/loop/backbone_loop_score.html        | 1227 --------
 doc/html/loop/helper_classes.html             | 1010 ------
 doc/html/loop/index.html                      |  157 +-
 doc/html/loop/load_loop_objects.html          |   58 +-
 doc/html/loop/loop_closing.html               |  371 ---
 doc/html/loop/mm_system_creation.html         | 1611 ++++++++++
 doc/html/loop/structure_db.html               |  724 +++--
 doc/html/loop/torsion_sampler.html            |  166 +-
 doc/html/modelling/algorithms.html            |  430 +++
 doc/html/modelling/gap_handling.html          |  671 ++++
 doc/html/modelling/index.html                 | 1369 +-------
 doc/html/modelling/loop_candidates.html       | 1123 +++++++
 doc/html/modelling/loop_closing.html          |  666 ++++
 doc/html/modelling/model_checking.html        |  301 ++
 doc/html/{loop => modelling}/monte_carlo.html |  413 +--
 doc/html/modelling/pipeline.html              | 1245 ++++++++
 .../modelling/sidechain_reconstruction.html   |  458 +++
 doc/html/objects.inv                          |  Bin 3892 -> 6138 bytes
 doc/html/portableIO.html                      |   50 +-
 doc/html/py-modindex.html                     |   15 +-
 doc/html/scoring/all_atom_scorers.html        |  592 ++++
 doc/html/scoring/backbone_score_env.html      |  511 +++
 doc/html/scoring/backbone_scorers.html        | 1214 +++++++
 doc/html/scoring/index.html                   |  168 +
 doc/html/search.html                          |    8 +-
 doc/html/searchindex.js                       |    2 +-
 doc/html/sidechain/disulfid.html              |  120 +-
 doc/html/sidechain/frame.html                 |  184 +-
 doc/html/sidechain/graph.html                 |  393 ++-
 doc/html/sidechain/index.html                 |  143 +-
 doc/html/sidechain/loading.html               |   30 +-
 doc/html/sidechain/rotamer.html               |  896 ++----
 doc/html/sidechain/rotamer_constructor.html   |  400 +++
 doc/html/sidechain/rotamer_id.html            |   19 +-
 doc/html/sidechain/rotamer_lib.html           |  188 +-
 doc/html/sidechain/sidechain_settings.html    |  533 ----
 doc/html/sidechain/subrotamer_optimizer.html  |  144 +
 doc/html/users.html                           |   65 +-
 117 files changed, 27177 insertions(+), 13890 deletions(-)
 delete mode 100644 doc/html/_modules/promod3/loop/_fragger.html
 create mode 100644 doc/html/_modules/promod3/modelling/_denovo.html
 create mode 100644 doc/html/_modules/promod3/modelling/_fragger_handle.html
 create mode 100644 doc/html/_modules/promod3/modelling/_molprobity.html
 create mode 100644 doc/html/_modules/promod3/modelling/_reconstruct_sidechains.html
 delete mode 100644 doc/html/_modules/promod3/sidechain/_reconstruct_sidechains.html
 create mode 100644 doc/html/_sources/actions/index.txt
 create mode 100644 doc/html/_sources/core/geometry.txt
 create mode 100644 doc/html/_sources/core/runtime_profiling.txt
 create mode 100644 doc/html/_sources/dev_setup.txt
 create mode 100644 doc/html/_sources/loop/all_atom.txt
 delete mode 100644 doc/html/_sources/loop/backbone_loop_score.txt
 delete mode 100644 doc/html/_sources/loop/helper_classes.txt
 delete mode 100644 doc/html/_sources/loop/loop_closing.txt
 create mode 100644 doc/html/_sources/loop/mm_system_creation.txt
 create mode 100644 doc/html/_sources/modelling/algorithms.txt
 create mode 100644 doc/html/_sources/modelling/gap_handling.txt
 create mode 100644 doc/html/_sources/modelling/loop_candidates.txt
 create mode 100644 doc/html/_sources/modelling/loop_closing.txt
 create mode 100644 doc/html/_sources/modelling/model_checking.txt
 rename doc/html/_sources/{loop => modelling}/monte_carlo.txt (65%)
 create mode 100644 doc/html/_sources/modelling/pipeline.txt
 create mode 100644 doc/html/_sources/modelling/sidechain_reconstruction.txt
 create mode 100644 doc/html/_sources/scoring/all_atom_scorers.txt
 create mode 100644 doc/html/_sources/scoring/backbone_score_env.txt
 create mode 100644 doc/html/_sources/scoring/backbone_scorers.txt
 create mode 100644 doc/html/_sources/scoring/index.txt
 create mode 100644 doc/html/_sources/sidechain/rotamer_constructor.txt
 delete mode 100644 doc/html/_sources/sidechain/sidechain_settings.txt
 create mode 100644 doc/html/_sources/sidechain/subrotamer_optimizer.txt
 create mode 100644 doc/html/actions/index.html
 create mode 100644 doc/html/core/geometry.html
 create mode 100644 doc/html/core/runtime_profiling.html
 create mode 100644 doc/html/dev_setup.html
 create mode 100644 doc/html/loop/all_atom.html
 delete mode 100644 doc/html/loop/backbone_loop_score.html
 delete mode 100644 doc/html/loop/helper_classes.html
 delete mode 100644 doc/html/loop/loop_closing.html
 create mode 100644 doc/html/loop/mm_system_creation.html
 create mode 100644 doc/html/modelling/algorithms.html
 create mode 100644 doc/html/modelling/gap_handling.html
 create mode 100644 doc/html/modelling/loop_candidates.html
 create mode 100644 doc/html/modelling/loop_closing.html
 create mode 100644 doc/html/modelling/model_checking.html
 rename doc/html/{loop => modelling}/monte_carlo.html (58%)
 create mode 100644 doc/html/modelling/pipeline.html
 create mode 100644 doc/html/modelling/sidechain_reconstruction.html
 create mode 100644 doc/html/scoring/all_atom_scorers.html
 create mode 100644 doc/html/scoring/backbone_score_env.html
 create mode 100644 doc/html/scoring/backbone_scorers.html
 create mode 100644 doc/html/scoring/index.html
 create mode 100644 doc/html/sidechain/rotamer_constructor.html
 delete mode 100644 doc/html/sidechain/sidechain_settings.html
 create mode 100644 doc/html/sidechain/subrotamer_optimizer.html

diff --git a/doc/html/_modules/index.html b/doc/html/_modules/index.html
index c1ed878e..d84823c7 100644
--- a/doc/html/_modules/index.html
+++ b/doc/html/_modules/index.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Overview: module code &mdash; ProMod3 0 documentation</title>
+    <title>Overview: module code &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -37,54 +37,78 @@
           <div class="body" role="main">
             
   <h1>All modules for which code is available</h1>
-<ul><li><a href="BBDepRotamerLib.html">BBDepRotamerLib</a></li>
-<li><a href="Backbone.html">Backbone</a></li>
+<ul><li><a href="AllAtomEnv.html">AllAtomEnv</a></li>
+<li><a href="AllAtomInteractionScorer.html">AllAtomInteractionScorer</a></li>
+<li><a href="AllAtomOverallScorer.html">AllAtomOverallScorer</a></li>
+<li><a href="AllAtomPackingScorer.html">AllAtomPackingScorer</a></li>
+<li><a href="AllAtomPositions.html">AllAtomPositions</a></li>
+<li><a href="AllAtomRelaxer.html">AllAtomRelaxer</a></li>
+<li><a href="AminoAcidLookup.html">AminoAcidLookup</a></li>
+<li><a href="BBDepRotamerLib.html">BBDepRotamerLib</a></li>
 <li><a href="BackboneList.html">BackboneList</a></li>
-<li><a href="BackboneLoopScorer.html">BackboneLoopScorer</a></li>
+<li><a href="BackboneOverallScorer.html">BackboneOverallScorer</a></li>
 <li><a href="BackboneRelaxer.html">BackboneRelaxer</a></li>
+<li><a href="BackboneScoreEnv.html">BackboneScoreEnv</a></li>
+<li><a href="CBPackingScorer.html">CBPackingScorer</a></li>
+<li><a href="CBetaScorer.html">CBetaScorer</a></li>
 <li><a href="CCD.html">CCD</a></li>
 <li><a href="CCDCloser.html">CCDCloser</a></li>
 <li><a href="DirtyCCDCloser.html">DirtyCCDCloser</a></li>
+<li><a href="DiscoContainer.html">DiscoContainer</a></li>
 <li><a href="ExponentialCooler.html">ExponentialCooler</a></li>
 <li><a href="FRMRotamer.html">FRMRotamer</a></li>
 <li><a href="FRMRotamerGroup.html">FRMRotamerGroup</a></li>
+<li><a href="ForcefieldLookup.html">ForcefieldLookup</a></li>
 <li><a href="FragDB.html">FragDB</a></li>
 <li><a href="Fragger.html">Fragger</a></li>
 <li><a href="FraggerMap.html">FraggerMap</a></li>
 <li><a href="FragmentSampler.html">FragmentSampler</a></li>
-<li><a href="Frame.html">Frame</a></li>
 <li><a href="FrameResidue.html">FrameResidue</a></li>
 <li><a href="FullGapExtender.html">FullGapExtender</a></li>
 <li><a href="GapExtender.html">GapExtender</a></li>
-<li><a href="Graph.html">Graph</a></li>
+<li><a href="HBondScorer.html">HBondScorer</a></li>
 <li><a href="KIC.html">KIC</a></li>
 <li><a href="KICCloser.html">KICCloser</a></li>
 <li><a href="LinearScorer.html">LinearScorer</a></li>
-<li><a href="LoopCandidate.html">LoopCandidate</a></li>
 <li><a href="LoopCandidates.html">LoopCandidates</a></li>
+<li><a href="MmSystemCreator.html">MmSystemCreator</a></li>
+<li><a href="ModellingHandle.html">ModellingHandle</a></li>
 <li><a href="Particle.html">Particle</a></li>
 <li><a href="PhiPsiSampler.html">PhiPsiSampler</a></li>
 <li><a href="PsipredPrediction.html">PsipredPrediction</a></li>
 <li><a href="RRMRotamer.html">RRMRotamer</a></li>
 <li><a href="RRMRotamerGroup.html">RRMRotamerGroup</a></li>
+<li><a href="ReducedScorer.html">ReducedScorer</a></li>
+<li><a href="RotamerGraph.html">RotamerGraph</a></li>
 <li><a href="RotamerLib.html">RotamerLib</a></li>
 <li><a href="RotamerLibEntry.html">RotamerLibEntry</a></li>
+<li><a href="SCWRLRotamerConstructor.html">SCWRLRotamerConstructor</a></li>
+<li><a href="SSAgreementScorer.html">SSAgreementScorer</a></li>
+<li><a href="ScoreContainer.html">ScoreContainer</a></li>
 <li><a href="ScoringGapExtender.html">ScoringGapExtender</a></li>
+<li><a href="ScoringWeights.html">ScoringWeights</a></li>
 <li><a href="ShiftExtension.html">ShiftExtension</a></li>
+<li><a href="SidechainReconstructor.html">SidechainReconstructor</a></li>
 <li><a href="SoftSampler.html">SoftSampler</a></li>
+<li><a href="StaticRuntimeProfiler.html">StaticRuntimeProfiler</a></li>
 <li><a href="StructuralGap.html">StructuralGap</a></li>
 <li><a href="StructureDB.html">StructureDB</a></li>
 <li><a href="TorsionSampler.html">TorsionSampler</a></li>
+<li><a href="TorsionScorer.html">TorsionScorer</a></li>
 <li><a href="promod3.html">promod3</a></li>
-<ul><li><a href="promod3/core/helper.html">promod3.core.helper</a></li>
+<ul><li><a href="promod3/core/_core.html">promod3.core._core</a></li>
+<li><a href="promod3/core/helper.html">promod3.core.helper</a></li>
 <li><a href="promod3/core/pm3argparse.html">promod3.core.pm3argparse</a></li>
-<li><a href="promod3/loop/_fragger.html">promod3.loop._fragger</a></li>
 <li><a href="promod3/loop/_loop.html">promod3.loop._loop</a></li>
 <li><a href="promod3/modelling/_closegaps.html">promod3.modelling._closegaps</a></li>
+<li><a href="promod3/modelling/_denovo.html">promod3.modelling._denovo</a></li>
+<li><a href="promod3/modelling/_fragger_handle.html">promod3.modelling._fragger_handle</a></li>
 <li><a href="promod3/modelling/_modelling.html">promod3.modelling._modelling</a></li>
+<li><a href="promod3/modelling/_molprobity.html">promod3.modelling._molprobity</a></li>
 <li><a href="promod3/modelling/_pipeline.html">promod3.modelling._pipeline</a></li>
+<li><a href="promod3/modelling/_reconstruct_sidechains.html">promod3.modelling._reconstruct_sidechains</a></li>
 <li><a href="promod3/modelling/_ring_punches.html">promod3.modelling._ring_punches</a></li>
-<li><a href="promod3/sidechain/_reconstruct_sidechains.html">promod3.sidechain._reconstruct_sidechains</a></li>
+<li><a href="promod3/scoring/_scoring.html">promod3.scoring._scoring</a></li>
 <li><a href="promod3/sidechain/_sidechain.html">promod3.sidechain._sidechain</a></li>
 </ul><li><a href="test_actions.html">test_actions</a></li>
 </ul>
@@ -118,7 +142,7 @@
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/_modules/promod3.html b/doc/html/_modules/promod3.html
index 52436a00..afe7472f 100644
--- a/doc/html/_modules/promod3.html
+++ b/doc/html/_modules/promod3.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>promod3 &mdash; ProMod3 0 documentation</title>
+    <title>promod3 &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="Module code" href="index.html" />
    
   
@@ -39,7 +39,10 @@
             
   <h1>Source code for promod3</h1><div class="highlight"><pre>
 <span class="c"># enable access to loop and modelling via &quot;import promod3&quot;</span>
+<span class="kn">import</span> <span class="nn">promod3.core</span>
+<span class="kn">import</span> <span class="nn">promod3.sidechain</span>
 <span class="kn">import</span> <span class="nn">promod3.loop</span>
+<span class="kn">import</span> <span class="nn">promod3.scoring</span>
 <span class="kn">import</span> <span class="nn">promod3.modelling</span>
 
 <span class="c"># load compounds library</span>
@@ -58,6 +61,13 @@
 <span class="sd">    :param path_to_chemlib: Points to the file to be loaded.</span>
 <span class="sd">    :type path_to_chemlib: :class:`str`</span>
 <span class="sd">    &quot;&quot;&quot;</span>
+    <span class="k">if</span> <span class="ow">not</span> <span class="n">path_to_chemlib</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">path_to_chemlib</span><span class="p">):</span>
+        <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s">&quot;Invalid path to chemlib &#39;&quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">path_to_chemlib</span><span class="p">)</span>
+                           <span class="o">+</span> <span class="s">&quot;&#39; specified!</span><span class="se">\n</span><span class="s">A compounds library must either be &quot;</span>
+                           <span class="o">+</span> <span class="s">&quot;set at compile-time (&#39;compounds.chemlib&#39; file in &quot;</span>
+                           <span class="o">+</span> <span class="s">&quot;$OST_ROOT/share or below) or set in OST with &quot;</span>
+                           <span class="o">+</span> <span class="s">&quot;ost.conop.SetDefaultLib before importing any &quot;</span>
+                           <span class="o">+</span> <span class="s">&quot;promod3 module!&quot;</span><span class="p">)</span>
     <span class="n">compound_lib_path</span> <span class="o">=</span> <span class="n">path_to_chemlib</span>
     <span class="n">compound_lib</span> <span class="o">=</span> <span class="n">conop</span><span class="o">.</span><span class="n">CompoundLib</span><span class="o">.</span><span class="n">Load</span><span class="p">(</span><span class="n">compound_lib_path</span><span class="p">)</span>
     <span class="n">conop</span><span class="o">.</span><span class="n">SetDefaultLib</span><span class="p">(</span><span class="n">compound_lib</span><span class="p">)</span>
@@ -95,7 +105,8 @@
     <span class="n">SetProMod3SharedDataPath</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">promod3_root</span><span class="p">,</span> <span class="s">&quot;share&quot;</span><span class="p">,</span> <span class="s">&quot;promod3&quot;</span><span class="p">))</span>
 
 <span class="c"># set version</span>
-<span class="n">__version__</span> <span class="o">=</span> <span class="s">&quot;1.0.0&quot;</span>
+<span class="n">__version__</span> <span class="o">=</span> <span class="s">&quot;1.0.2&quot;</span>
+<span class="n">__version_extended__</span> <span class="o">=</span> <span class="s">&quot;1.0.2 (develop|db050d8)&quot;</span>
 
 <span class="n">__all__</span> <span class="o">=</span> <span class="p">(</span><span class="s">&#39;SetCompoundsChemlib&#39;</span><span class="p">,</span> <span class="s">&#39;GetProMod3SharedDataPath&#39;</span><span class="p">,</span>
            <span class="s">&#39;SetProMod3SharedDataPath&#39;</span><span class="p">)</span>
@@ -136,7 +147,7 @@
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/_modules/promod3/core/helper.html b/doc/html/_modules/promod3/core/helper.html
index 6905c84c..2d072bfc 100644
--- a/doc/html/_modules/promod3/core/helper.html
+++ b/doc/html/_modules/promod3/core/helper.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>promod3.core.helper &mdash; ProMod3 0 documentation</title>
+    <title>promod3.core.helper &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../../../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../../../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../../../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../../../index.html" />
     <link rel="up" title="promod3" href="../../promod3.html" />
    
   
@@ -232,7 +232,7 @@
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/_modules/promod3/core/pm3argparse.html b/doc/html/_modules/promod3/core/pm3argparse.html
index db0f4066..e0fe000d 100644
--- a/doc/html/_modules/promod3/core/pm3argparse.html
+++ b/doc/html/_modules/promod3/core/pm3argparse.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>promod3.core.pm3argparse &mdash; ProMod3 0 documentation</title>
+    <title>promod3.core.pm3argparse &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../../../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../../../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../../../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../../../index.html" />
     <link rel="up" title="promod3" href="../../promod3.html" />
    
   
@@ -61,16 +61,20 @@
     <span class="sd">&quot;&quot;&quot;Unpack a file to a tmp file if gzipped.</span>
 <span class="sd">    &quot;&quot;&quot;</span>
     <span class="n">helper</span><span class="o">.</span><span class="n">FileExists</span><span class="p">(</span><span class="n">msg_prefix</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="n">filename</span><span class="p">)</span>
-    <span class="n">zip_fh</span> <span class="o">=</span> <span class="n">gzip</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
-    <span class="n">unzip_str</span> <span class="o">=</span> <span class="n">zip_fh</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
-    <span class="n">zip_fh</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+    <span class="k">try</span><span class="p">:</span>
+        <span class="n">zip_fh</span> <span class="o">=</span> <span class="n">gzip</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
+        <span class="n">unzip_str</span> <span class="o">=</span> <span class="n">zip_fh</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
+        <span class="n">zip_fh</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+    <span class="k">except</span> <span class="ne">IOError</span><span class="p">,</span> <span class="n">ioe</span><span class="p">:</span>
+        <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="n">msg_prefix</span> <span class="o">+</span> <span class="s">&quot; gzip file &#39;&quot;</span> <span class="o">+</span> <span class="n">filename</span> <span class="o">+</span>
+                               <span class="s">&quot;&#39; cannot be opened: &quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">ioe</span><span class="p">),</span> <span class="mi">14</span><span class="p">)</span>
     <span class="n">unzip_file</span> <span class="o">=</span> <span class="n">tempfile</span><span class="o">.</span><span class="n">NamedTemporaryFile</span><span class="p">(</span><span class="n">mode</span><span class="o">=</span><span class="s">&#39;w&#39;</span><span class="p">,</span> <span class="n">suffix</span><span class="o">=</span><span class="n">suffix</span><span class="p">)</span>
     <span class="n">unzip_file</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">unzip_str</span><span class="p">)</span>
     <span class="n">unzip_file</span><span class="o">.</span><span class="n">flush</span><span class="p">()</span>
     <span class="k">return</span> <span class="n">unzip_file</span>
 
 <span class="k">def</span> <span class="nf">_CheckJSONAlnSeqKeyType</span><span class="p">(</span><span class="n">key_name</span><span class="p">,</span> <span class="n">val_type</span><span class="p">,</span> <span class="n">json_aln</span><span class="p">,</span> <span class="n">seqtype</span><span class="p">,</span> <span class="n">json_source</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;Check a key/ value in a sequence exists and is of certain type.</span>
+    <span class="sd">&#39;&#39;&#39;Check a key/value in a sequence exists and is of certain type.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
     <span class="k">if</span> <span class="n">key_name</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">json_aln</span><span class="p">[</span><span class="n">seqtype</span><span class="p">]</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
         <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="s">&quot;JSON &#39;alignmentlist&#39; &#39;</span><span class="si">%s</span><span class="s">&#39; &quot;</span> <span class="o">%</span> <span class="n">seqtype</span><span class="o">+</span>
@@ -90,21 +94,6 @@
                                <span class="s">&quot;&#39;</span><span class="si">%s</span><span class="s">&#39; is not a &quot;</span> <span class="o">%</span> <span class="n">json_source</span><span class="o">+</span>
                                <span class="s">&quot;</span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">val_type</span><span class="p">),</span> <span class="mi">28</span><span class="p">)</span>
 
-<span class="k">def</span> <span class="nf">_CreateNewAln</span><span class="p">(</span><span class="n">trg_name</span><span class="p">,</span> <span class="n">trg_seq</span><span class="p">,</span> <span class="n">trg_start</span><span class="p">,</span> <span class="n">trg_end</span><span class="p">,</span> <span class="n">tpl_name</span><span class="p">,</span> <span class="n">tpl_seq</span><span class="p">,</span>
-                  <span class="n">tpl_offset</span><span class="p">):</span>
-    <span class="c"># iternal function to makes things easier in other places, pylint ignored</span>
-    <span class="c">#pylint: disable=too-many-arguments</span>
-    <span class="sd">&#39;&#39;&#39;Produce a new target-template alignment</span>
-<span class="sd">    &#39;&#39;&#39;</span>
-    <span class="n">new_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="n">trg_name</span><span class="p">,</span>
-                                                    <span class="n">trg_seq</span><span class="p">[</span><span class="n">trg_start</span><span class="p">:</span><span class="n">trg_end</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="n">tpl_name</span><span class="p">,</span> <span class="n">tpl_seq</span><span class="p">))</span>
-    <span class="n">new_aln</span><span class="o">.</span><span class="n">SetSequenceRole</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="s">&#39;TARGET&#39;</span><span class="p">)</span>
-    <span class="n">new_aln</span><span class="o">.</span><span class="n">SetSequenceRole</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s">&#39;TEMPLATE&#39;</span><span class="p">)</span>
-    <span class="n">new_aln</span><span class="o">.</span><span class="n">SetSequenceOffset</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">tpl_offset</span><span class="p">)</span>
-    <span class="k">return</span> <span class="n">new_aln</span>
-
 <span class="k">def</span> <span class="nf">_GetAlnFromJSON</span><span class="p">(</span><span class="n">json_object</span><span class="p">,</span> <span class="n">json_source</span><span class="p">):</span>
     <span class="sd">&quot;&quot;&quot;Create alignments from a JSON object.</span>
 
@@ -144,14 +133,17 @@
                                         <span class="n">json_source</span><span class="p">)</span>
         <span class="n">_CheckJSONAlnSeqKeyType</span><span class="p">(</span><span class="s">&#39;offset&#39;</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="n">json_aln</span><span class="p">,</span> <span class="s">&#39;template&#39;</span><span class="p">,</span>
                                 <span class="n">json_source</span><span class="p">)</span>
-
-        <span class="k">yield</span> <span class="n">_CreateNewAln</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">json_aln</span><span class="p">[</span><span class="s">&#39;target&#39;</span><span class="p">][</span><span class="s">&#39;name&#39;</span><span class="p">])</span><span class="o">.</span><span class="n">strip</span><span class="p">(),</span>
-                            <span class="nb">str</span><span class="p">(</span><span class="n">json_aln</span><span class="p">[</span><span class="s">&#39;target&#39;</span><span class="p">][</span><span class="s">&#39;seqres&#39;</span><span class="p">]),</span>
-                            <span class="mi">0</span><span class="p">,</span>
-                            <span class="nb">len</span><span class="p">(</span><span class="n">json_aln</span><span class="p">[</span><span class="s">&#39;target&#39;</span><span class="p">][</span><span class="s">&#39;seqres&#39;</span><span class="p">]),</span>
-                            <span class="nb">str</span><span class="p">(</span><span class="n">json_aln</span><span class="p">[</span><span class="s">&#39;template&#39;</span><span class="p">][</span><span class="s">&#39;name&#39;</span><span class="p">])</span><span class="o">.</span><span class="n">strip</span><span class="p">(),</span>
-                            <span class="nb">str</span><span class="p">(</span><span class="n">json_aln</span><span class="p">[</span><span class="s">&#39;template&#39;</span><span class="p">][</span><span class="s">&#39;seqres&#39;</span><span class="p">]),</span>
-                            <span class="n">json_aln</span><span class="p">[</span><span class="s">&#39;template&#39;</span><span class="p">][</span><span class="s">&#39;offset&#39;</span><span class="p">])</span>
+        <span class="c"># create and yield alignment</span>
+        <span class="n">trg_name</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">json_aln</span><span class="p">[</span><span class="s">&#39;target&#39;</span><span class="p">][</span><span class="s">&#39;name&#39;</span><span class="p">])</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
+        <span class="n">trg_seq</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">json_aln</span><span class="p">[</span><span class="s">&#39;target&#39;</span><span class="p">][</span><span class="s">&#39;seqres&#39;</span><span class="p">])</span>
+        <span class="n">tpl_name</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">json_aln</span><span class="p">[</span><span class="s">&#39;template&#39;</span><span class="p">][</span><span class="s">&#39;name&#39;</span><span class="p">])</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
+        <span class="n">tpl_seq</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">json_aln</span><span class="p">[</span><span class="s">&#39;template&#39;</span><span class="p">][</span><span class="s">&#39;seqres&#39;</span><span class="p">])</span>
+        <span class="n">new_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="n">trg_name</span><span class="p">,</span> <span class="n">trg_seq</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="n">tpl_name</span><span class="p">,</span> <span class="n">tpl_seq</span><span class="p">))</span>
+        <span class="n">new_aln</span><span class="o">.</span><span class="n">SetSequenceRole</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="s">&#39;TARGET&#39;</span><span class="p">)</span>
+        <span class="n">new_aln</span><span class="o">.</span><span class="n">SetSequenceRole</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s">&#39;TEMPLATE&#39;</span><span class="p">)</span>
+        <span class="n">new_aln</span><span class="o">.</span><span class="n">SetSequenceOffset</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">json_aln</span><span class="p">[</span><span class="s">&#39;template&#39;</span><span class="p">][</span><span class="s">&#39;offset&#39;</span><span class="p">])</span>
+        <span class="k">yield</span> <span class="n">new_aln</span>
 
 <span class="k">def</span> <span class="nf">_GetJSONOBject</span><span class="p">(</span><span class="n">json_input</span><span class="p">):</span>
     <span class="sd">&quot;&quot;&quot;Get a JSON object out of a string which may be an object or a path.</span>
@@ -167,6 +159,7 @@
 <span class="sd">    As returnvalue we only use JSON objects.</span>
 <span class="sd">    &quot;&quot;&quot;</span>
     <span class="k">if</span> <span class="n">json_input</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">!=</span> <span class="s">&#39;{&#39;</span><span class="p">:</span>
+        <span class="n">helper</span><span class="o">.</span><span class="n">FileExists</span><span class="p">(</span><span class="s">&quot;JSON Alignment&quot;</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="n">json_input</span><span class="p">)</span>
         <span class="n">is_gz</span> <span class="o">=</span> <span class="n">helper</span><span class="o">.</span><span class="n">FileGzip</span><span class="p">(</span><span class="s">&quot;JSON alignment&quot;</span><span class="p">,</span> <span class="mi">13</span><span class="p">,</span> <span class="n">json_input</span><span class="p">)</span>
         <span class="n">readfile</span> <span class="o">=</span> <span class="n">json_input</span>
         <span class="k">if</span> <span class="n">is_gz</span><span class="p">:</span>
@@ -200,38 +193,10 @@
                                    <span class="s">&quot;could not be decoded: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">vae</span><span class="o">.</span><span class="n">message</span><span class="p">,</span> <span class="mi">23</span><span class="p">)</span>
     <span class="k">return</span> <span class="n">json_object</span>
 
-<span class="k">def</span> <span class="nf">_GetTrgNameSeqFile</span><span class="p">(</span><span class="n">argstr</span><span class="p">):</span>
-    <span class="sd">&quot;&quot;&quot;Sort out what is target name and what is the sequence file name.</span>
-
-<span class="sd">    With only two items in the argument string to &#39;--fasta&#39; we allow arbitrary</span>
-<span class="sd">    orders. So we have to check for the &#39;trg:&#39; prefix. With this, sequence files</span>
-<span class="sd">    names may not start with &#39;trg:&#39;.</span>
-<span class="sd">    &quot;&quot;&quot;</span>
-    <span class="k">if</span> <span class="n">argstr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&#39;trg:&#39;</span><span class="p">):</span>
-        <span class="n">trgname</span> <span class="o">=</span> <span class="n">argstr</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">4</span><span class="p">:]</span>
-        <span class="n">seqfile</span> <span class="o">=</span> <span class="n">argstr</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
-    <span class="k">elif</span> <span class="n">argstr</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&#39;trg:&#39;</span><span class="p">):</span>
-        <span class="n">trgname</span> <span class="o">=</span> <span class="n">argstr</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="mi">4</span><span class="p">:]</span>
-        <span class="n">seqfile</span> <span class="o">=</span> <span class="n">argstr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
-    <span class="k">else</span><span class="p">:</span>
-        <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="s">&quot;&#39;--fasta </span><span class="si">%s</span><span class="s">&#39; requires &quot;</span> <span class="o">%</span> <span class="s">&#39; &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">argstr</span><span class="p">)</span><span class="o">+</span>
-                               <span class="s">&quot;one argument prefixed with &#39;trg:&#39; marking &quot;</span><span class="o">+</span>
-                               <span class="s">&quot;the target sequence name&quot;</span><span class="p">,</span> <span class="mi">11</span><span class="p">)</span>
-    <span class="c"># check that &#39;trg:&#39; has a string attached</span>
-    <span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">trgname</span><span class="p">):</span>
-        <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="s">&quot;&#39;--fasta </span><span class="si">%s</span><span class="s">&#39; requires &quot;</span> <span class="o">%</span> <span class="s">&#39; &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">argstr</span><span class="p">)</span><span class="o">+</span>
-                               <span class="s">&quot;argument &#39;trg:&#39; defining the &quot;</span><span class="o">+</span>
-                               <span class="s">&quot;target sequence name, empty one &quot;</span><span class="o">+</span>
-                               <span class="s">&quot;found: &#39;</span><span class="si">%s</span><span class="s">&#39;&quot;</span> <span class="o">%</span> <span class="s">&#39; &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">argstr</span><span class="p">),</span> <span class="mi">14</span><span class="p">)</span>
+<span class="k">def</span> <span class="nf">_FetchAlnFromFile</span><span class="p">(</span><span class="n">seqfile</span><span class="p">,</span> <span class="n">allow_multitemplate</span><span class="p">,</span> <span class="n">format</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;Read alignment from seqfile and return it.&quot;&quot;&quot;</span>
+    <span class="n">argstr</span> <span class="o">=</span> <span class="s">&quot;&#39;--&quot;</span> <span class="o">+</span> <span class="n">format</span> <span class="o">+</span> <span class="s">&quot; &quot;</span> <span class="o">+</span> <span class="n">seqfile</span> <span class="o">+</span> <span class="s">&quot;&#39;&quot;</span>
     <span class="n">helper</span><span class="o">.</span><span class="n">FileExists</span><span class="p">(</span><span class="s">&quot;Alignment&quot;</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="n">seqfile</span><span class="p">)</span>
-
-    <span class="k">return</span> <span class="n">trgname</span><span class="p">,</span> <span class="n">seqfile</span>
-
-<span class="k">def</span> <span class="nf">_FetchAlnFromFastaOpt</span><span class="p">(</span><span class="n">argstr</span><span class="p">):</span>
-    <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Dissasemble an argument to &#39;--fasta&#39; into an alignment and return.</span>
-<span class="sd">    &quot;&quot;&quot;</span>
-    <span class="n">trgname</span><span class="p">,</span> <span class="n">seqfile</span> <span class="o">=</span> <span class="n">_GetTrgNameSeqFile</span><span class="p">(</span><span class="n">argstr</span><span class="p">)</span>
     <span class="c"># checking if alignment file has &#39;gz&#39; extension</span>
     <span class="n">is_gz</span> <span class="o">=</span> <span class="n">helper</span><span class="o">.</span><span class="n">FileGzip</span><span class="p">(</span><span class="s">&quot;Alignment&quot;</span><span class="p">,</span> <span class="mi">13</span><span class="p">,</span> <span class="n">seqfile</span><span class="p">)</span>
     <span class="c"># loading the alignment, switch for gzip</span>
@@ -240,90 +205,152 @@
         <span class="n">unzip_file</span> <span class="o">=</span> <span class="n">_TmpForGZip</span><span class="p">(</span><span class="n">seqfile</span><span class="p">,</span> <span class="s">&#39;.fas&#39;</span><span class="p">,</span> <span class="s">&quot;Alignment&quot;</span><span class="p">)</span>
         <span class="n">readfile</span> <span class="o">=</span> <span class="n">unzip_file</span><span class="o">.</span><span class="n">name</span>
     <span class="k">try</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="n">readfile</span><span class="p">,</span> <span class="n">format</span><span class="o">=</span><span class="s">&quot;fasta&quot;</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="n">readfile</span><span class="p">,</span> <span class="n">format</span><span class="o">=</span><span class="n">format</span><span class="p">)</span>
     <span class="k">except</span> <span class="ne">Exception</span><span class="p">,</span> <span class="n">exc</span><span class="p">:</span> <span class="c">#pylint: disable=broad-except</span>
-        <span class="k">if</span> <span class="n">exc</span><span class="o">.</span><span class="n">message</span> <span class="o">==</span> <span class="s">&#39;Bad FASTA file: File is empty&#39;</span><span class="p">:</span>
-            <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="s">&quot;&#39;--fasta </span><span class="si">%s</span><span class="s">&#39; &quot;</span> <span class="o">%</span> <span class="s">&#39; &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">argstr</span><span class="p">)</span><span class="o">+</span>
-                                   <span class="s">&quot;refers to an empty file or its in the &quot;</span><span class="o">+</span>
-                                   <span class="s">&quot;wrong format.&quot;</span><span class="p">,</span> <span class="mi">15</span><span class="p">)</span>
-        <span class="k">elif</span> <span class="n">exc</span><span class="o">.</span><span class="n">message</span> <span class="o">==</span> <span class="s">&#39;sequences have different lengths&#39;</span><span class="p">:</span>
-            <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="s">&quot;&#39;--fasta </span><span class="si">%s</span><span class="s">&#39;: &quot;</span> <span class="o">%</span> <span class="s">&#39; &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">argstr</span><span class="p">)</span><span class="o">+</span>
-                                   <span class="s">&quot;sequences in the alignment &quot;</span><span class="o">+</span>
-                                   <span class="s">&quot;have different length.&quot;</span><span class="p">,</span> <span class="mi">18</span><span class="p">)</span>
+        <span class="k">if</span> <span class="n">exc</span><span class="o">.</span><span class="n">message</span> <span class="ow">in</span> <span class="p">[</span><span class="s">&#39;Bad FASTA file: File is empty&#39;</span><span class="p">,</span>
+                           <span class="s">&#39;Bad CLUSTAL file: File is empty&#39;</span><span class="p">]:</span>
+            <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="n">argstr</span> <span class="o">+</span>  <span class="s">&quot; refers to an empty file or &quot;</span> <span class="o">+</span>
+                                   <span class="s">&quot;its in the wrong format.&quot;</span><span class="p">,</span> <span class="mi">15</span><span class="p">)</span>
         <span class="k">else</span><span class="p">:</span>
-            <span class="k">raise</span>
+            <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="n">argstr</span> <span class="o">+</span> <span class="s">&quot;: error when reading alignment &quot;</span><span class="o">+</span>
+                                   <span class="s">&quot;file: &quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">exc</span><span class="p">),</span> <span class="mi">18</span><span class="p">)</span>
     <span class="k">finally</span><span class="p">:</span>
         <span class="k">if</span> <span class="n">is_gz</span><span class="p">:</span>
             <span class="n">unzip_file</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
-    <span class="c"># checking the alignment: only 2 sequences allowed, target name must be</span>
-    <span class="c"># the name of one of the sequences</span>
-    <span class="n">nos</span> <span class="o">=</span> <span class="n">aln</span><span class="o">.</span><span class="n">GetCount</span><span class="p">()</span>
-    <span class="k">if</span> <span class="n">nos</span> <span class="o">&gt;</span> <span class="mi">2</span><span class="p">:</span>
-        <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="s">&quot;&#39;--fasta </span><span class="si">%s</span><span class="s">&#39; points to &quot;</span> <span class="o">%</span> <span class="s">&#39; &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">argstr</span><span class="p">)</span><span class="o">+</span>
-                               <span class="s">&quot;an alignment with more than 2 sequences.&quot;</span><span class="p">,</span>
-                               <span class="mi">16</span><span class="p">)</span>
-    <span class="n">fst_seq</span> <span class="o">=</span> <span class="n">aln</span><span class="o">.</span><span class="n">GetSequence</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
-    <span class="n">snd_seq</span> <span class="o">=</span> <span class="n">aln</span><span class="o">.</span><span class="n">GetSequence</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
-    <span class="k">if</span> <span class="n">fst_seq</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> <span class="o">==</span> <span class="n">trgname</span><span class="p">:</span>
-        <span class="n">new_aln</span> <span class="o">=</span> <span class="n">_AssembleTrgTplAln</span><span class="p">(</span><span class="n">fst_seq</span><span class="p">,</span> <span class="n">snd_seq</span><span class="p">)</span>
-    <span class="k">elif</span> <span class="n">snd_seq</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> <span class="o">==</span> <span class="n">trgname</span><span class="p">:</span>
-        <span class="n">new_aln</span> <span class="o">=</span> <span class="n">_AssembleTrgTplAln</span><span class="p">(</span><span class="n">snd_seq</span><span class="p">,</span> <span class="n">fst_seq</span><span class="p">)</span>
-    <span class="k">else</span><span class="p">:</span>
-        <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="s">&quot;&#39;--fasta </span><span class="si">%s</span><span class="s">&#39; does not &quot;</span> <span class="o">%</span> <span class="s">&#39; &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">argstr</span><span class="p">)</span><span class="o">+</span>
-                               <span class="s">&quot;define a target name found in the &quot;</span><span class="o">+</span>
-                               <span class="s">&quot;alignment.&quot;</span><span class="p">,</span> <span class="mi">17</span><span class="p">)</span>
-    <span class="k">return</span> <span class="n">seqfile</span><span class="p">,</span> <span class="n">new_aln</span>
+    <span class="c"># checking the alignment</span>
+    <span class="k">if</span> <span class="n">aln</span><span class="o">.</span><span class="n">GetCount</span><span class="p">()</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
+        <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="n">argstr</span> <span class="o">+</span> <span class="s">&quot; points to an alignment with only &quot;</span> <span class="o">+</span>
+                               <span class="s">&quot;1 sequence.&quot;</span><span class="p">,</span> <span class="mi">16</span><span class="p">)</span>
+    <span class="k">if</span> <span class="n">aln</span><span class="o">.</span><span class="n">GetCount</span><span class="p">()</span> <span class="o">&gt;</span> <span class="mi">2</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">allow_multitemplate</span><span class="p">:</span>
+        <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="n">argstr</span> <span class="o">+</span> <span class="s">&quot; points to an alignment with more &quot;</span> <span class="o">+</span>
+                               <span class="s">&quot;than 2 sequences and we do not allow this.&quot;</span><span class="p">,</span> <span class="mi">16</span><span class="p">)</span>
+    <span class="c"># identify target</span>
+    <span class="n">target_idx</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span>
+    <span class="n">sequences</span> <span class="o">=</span> <span class="p">[(</span><span class="n">s</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">strip</span><span class="p">(),</span><span class="n">s</span><span class="o">.</span><span class="n">string</span><span class="p">)</span> <span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="n">aln</span><span class="o">.</span><span class="n">sequences</span><span class="p">]</span>
+    <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">s</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">sequences</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">s</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="ow">in</span> <span class="p">[</span><span class="s">&#39;trg&#39;</span><span class="p">,</span> <span class="s">&#39;target&#39;</span><span class="p">]:</span>
+            <span class="k">if</span> <span class="n">target_idx</span> <span class="o">&gt;=</span> <span class="mi">0</span><span class="p">:</span>
+                <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="n">argstr</span> <span class="o">+</span> <span class="s">&quot;: multiple targets found!&quot;</span><span class="p">,</span> <span class="mi">17</span><span class="p">)</span>
+            <span class="n">target_idx</span> <span class="o">=</span> <span class="n">i</span>
+    <span class="c"># reshuffle</span>
+    <span class="k">if</span> <span class="n">target_idx</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
+        <span class="n">sequences</span><span class="o">.</span><span class="n">insert</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">sequences</span><span class="p">[</span><span class="n">target_idx</span><span class="p">])</span>
+        <span class="k">del</span> <span class="n">sequences</span><span class="p">[</span><span class="n">target_idx</span><span class="o">+</span><span class="mi">1</span><span class="p">]</span>
+    <span class="c"># generate alignment</span>
+    <span class="n">new_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="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="n">sequences</span><span class="p">:</span>
+        <span class="n">new_aln</span><span class="o">.</span><span class="n">AddSequence</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="n">s</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">s</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
+    <span class="n">new_aln</span><span class="o">.</span><span class="n">SetSequenceRole</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="s">&#39;TARGET&#39;</span><span class="p">)</span>
+    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">new_aln</span><span class="o">.</span><span class="n">GetCount</span><span class="p">()):</span>
+        <span class="n">new_aln</span><span class="o">.</span><span class="n">SetSequenceRole</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="s">&#39;TEMPLATE&#39;</span><span class="p">)</span>
 
-<span class="k">def</span> <span class="nf">_AssembleTrgTplAln</span><span class="p">(</span><span class="n">target</span><span class="p">,</span> <span class="n">template</span><span class="p">):</span>
-    <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Internal function: Assemble a target-template alignment without leading/</span>
-<span class="sd">    final gaps in the target sequence. Set the offset for the template sequence.</span>
-<span class="sd">    &quot;&quot;&quot;</span>
-    <span class="c"># count leading gaps to get the start position</span>
-    <span class="n">start</span> <span class="o">=</span> <span class="mi">0</span>
-    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">target</span><span class="o">.</span><span class="n">length</span><span class="p">):</span>
-        <span class="k">if</span> <span class="n">target</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">!=</span> <span class="s">&#39;-&#39;</span><span class="p">:</span>
-            <span class="n">start</span> <span class="o">=</span> <span class="n">i</span>
-            <span class="k">break</span>
-    <span class="c"># get rid of closing gaps at the end</span>
-    <span class="n">end</span> <span class="o">=</span> <span class="n">target</span><span class="o">.</span><span class="n">length</span>
-    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">target</span><span class="o">.</span><span class="n">length</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">):</span>
-        <span class="k">if</span> <span class="n">target</span><span class="p">[</span><span class="n">i</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="s">&#39;-&#39;</span><span class="p">:</span>
-            <span class="n">end</span> <span class="o">=</span> <span class="n">i</span>
-            <span class="k">break</span>
-    <span class="c"># assemble template sequence</span>
-    <span class="n">tpl_str</span> <span class="o">=</span> <span class="s">&#39;&#39;</span>
-    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">start</span><span class="p">,</span> <span class="n">end</span><span class="p">):</span>
-        <span class="n">tpl_str</span> <span class="o">+=</span> <span class="n">template</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
-    <span class="k">return</span> <span class="n">_CreateNewAln</span><span class="p">(</span><span class="n">target</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">strip</span><span class="p">(),</span> <span class="nb">str</span><span class="p">(</span><span class="n">target</span><span class="p">),</span> <span class="n">start</span><span class="p">,</span> <span class="n">end</span><span class="p">,</span>
-                         <span class="n">template</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">strip</span><span class="p">(),</span> <span class="n">tpl_str</span><span class="p">,</span> <span class="n">start</span><span class="p">)</span>
-
-
-<span class="k">class</span> <span class="nc">PM3StoreOnceAction</span><span class="p">(</span><span class="n">argparse</span><span class="o">.</span><span class="n">Action</span><span class="p">):</span>
-    <span class="sd">&quot;&quot;&quot;Action for argument parsing to prevent multiple calls to an option.</span>
-<span class="sd">    &quot;&quot;&quot;</span>
-    <span class="c">#pylint: disable=too-few-public-methods</span>
-    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
-        <span class="nb">super</span><span class="p">(</span><span class="n">PM3StoreOnceAction</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
-    <span class="k">def</span> <span class="nf">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parser</span><span class="p">,</span> <span class="n">namespace</span><span class="p">,</span> <span class="n">values</span><span class="p">,</span> <span class="n">option_string</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
-        <span class="k">if</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">namespace</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">dest</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
-            <span class="k">raise</span> <span class="n">argparse</span><span class="o">.</span><span class="n">ArgumentError</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s">&#39;may only be used once.&#39;</span><span class="p">)</span>
-        <span class="nb">setattr</span><span class="p">(</span><span class="n">namespace</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">dest</span><span class="p">,</span> <span class="n">values</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">new_aln</span>
+
+<span class="k">def</span> <span class="nf">_LoadPDB</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;Load PDB file from filename and return it.&quot;&quot;&quot;</span>
+    <span class="n">argstr</span> <span class="o">=</span> <span class="s">&quot;&#39;--pdb &quot;</span> <span class="o">+</span> <span class="n">filename</span> <span class="o">+</span> <span class="s">&quot;&#39;&quot;</span>
+    <span class="n">helper</span><span class="o">.</span><span class="n">FileExists</span><span class="p">(</span><span class="s">&quot;PDB Structure&quot;</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="n">filename</span><span class="p">)</span>
+    <span class="k">try</span><span class="p">:</span>
+        <span class="n">ent</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="n">filename</span><span class="p">)</span>
+    <span class="k">except</span> <span class="ne">Exception</span><span class="p">,</span> <span class="n">exc</span><span class="p">:</span> <span class="c">#pylint: disable=broad-except</span>
+        <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="n">argstr</span> <span class="o">+</span> <span class="s">&quot;: failure to parse PDB file: &quot;</span> <span class="o">+</span>
+                               <span class="nb">str</span><span class="p">(</span><span class="n">exc</span><span class="p">),</span> <span class="mi">33</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ent</span>
+
+<span class="k">def</span> <span class="nf">_LoadEntity</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;Load generic structure file from filename and return it.&quot;&quot;&quot;</span>
+    <span class="n">argstr</span> <span class="o">=</span> <span class="s">&quot;&#39;--entity &quot;</span> <span class="o">+</span> <span class="n">filename</span> <span class="o">+</span> <span class="s">&quot;&#39;&quot;</span>
+    <span class="n">helper</span><span class="o">.</span><span class="n">FileExists</span><span class="p">(</span><span class="s">&quot;Structure&quot;</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="n">filename</span><span class="p">)</span>
+    <span class="k">try</span><span class="p">:</span>
+        <span class="n">ent</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">LoadEntity</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
+    <span class="k">except</span> <span class="ne">Exception</span><span class="p">,</span> <span class="n">exc</span><span class="p">:</span> <span class="c">#pylint: disable=broad-except</span>
+        <span class="k">if</span> <span class="n">exc</span><span class="o">.</span><span class="n">message</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&#39;no suitable entity io handler found&#39;</span><span class="p">):</span>
+            <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="n">argstr</span> <span class="o">+</span> <span class="s">&quot;: not a supported format &quot;</span> <span class="o">+</span>
+                                   <span class="nb">str</span><span class="p">(</span><span class="n">exc</span><span class="p">),</span> <span class="mi">34</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="n">argstr</span> <span class="o">+</span> <span class="s">&quot;: failure to parse PDB file: &quot;</span> <span class="o">+</span>
+                                   <span class="nb">str</span><span class="p">(</span><span class="n">exc</span><span class="p">),</span> <span class="mi">33</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">ent</span>
+
+<span class="k">def</span> <span class="nf">_GetChains</span><span class="p">(</span><span class="n">structures</span><span class="p">,</span> <span class="n">structure_sources</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;Get chain id to entity view (single chain) mapping (dict).&quot;&quot;&quot;</span>
+    <span class="c"># IDs: (file_base = base file name with no extensions)</span>
+    <span class="c"># - file_base.chain_name</span>
+    <span class="c"># - file_base (iff only one chain in file)</span>
+    <span class="c"># - chain_name (iff only one file)</span>
+    <span class="c"># - note: single entry with key &#39;UNIQUE&#39; created if only one chain in total!</span>
+    <span class="n">chain_entities</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
+    <span class="n">single_file</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">structure_sources</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span>
+    <span class="c"># parse structures</span>
+    <span class="k">for</span> <span class="n">file_name</span><span class="p">,</span> <span class="n">ent</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">structure_sources</span><span class="p">,</span> <span class="n">structures</span><span class="p">):</span>
+        <span class="c"># get pure file name with no extension</span>
+        <span class="n">file_base</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">file_name</span><span class="p">)</span>
+        <span class="n">file_split</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">splitext</span><span class="p">(</span><span class="n">file_base</span><span class="p">)</span>
+        <span class="k">if</span> <span class="n">file_split</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;.gz&#39;</span><span class="p">:</span>
+            <span class="n">file_base</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">splitext</span><span class="p">(</span><span class="n">file_split</span><span class="p">[</span><span class="mi">0</span><span class="p">])[</span><span class="mi">0</span><span class="p">]</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">file_base</span> <span class="o">=</span> <span class="n">file_split</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
+        <span class="c"># get chainnames</span>
+        <span class="n">prot</span> <span class="o">=</span> <span class="n">ent</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;peptide=True&quot;</span><span class="p">)</span>
+        <span class="n">single_chain</span> <span class="o">=</span> <span class="n">prot</span><span class="o">.</span><span class="n">chain_count</span> <span class="o">==</span> <span class="mi">1</span>
+        <span class="n">chain_names</span> <span class="o">=</span> <span class="p">[</span><span class="n">ch</span><span class="o">.</span><span class="n">name</span> <span class="k">for</span> <span class="n">ch</span> <span class="ow">in</span> <span class="n">prot</span><span class="o">.</span><span class="n">chains</span><span class="p">]</span>
+        <span class="c"># fill dict</span>
+        <span class="k">if</span> <span class="n">single_file</span> <span class="ow">and</span> <span class="n">single_chain</span><span class="p">:</span>
+            <span class="n">chain_entities</span><span class="p">[</span><span class="s">&#39;UNIQUE&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">prot</span>
+        <span class="k">elif</span> <span class="n">single_chain</span><span class="p">:</span>
+            <span class="n">chain_entities</span><span class="p">[</span><span class="n">file_base</span> <span class="o">+</span> <span class="s">&#39;.&#39;</span> <span class="o">+</span> <span class="n">chain_names</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span> <span class="o">=</span> <span class="n">prot</span>
+            <span class="n">chain_entities</span><span class="p">[</span><span class="n">file_base</span><span class="p">]</span> <span class="o">=</span> <span class="n">prot</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="k">for</span> <span class="n">chain_name</span> <span class="ow">in</span> <span class="n">chain_names</span><span class="p">:</span>
+                <span class="n">ch_ent</span> <span class="o">=</span> <span class="n">prot</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;cname=&quot;</span> <span class="o">+</span> <span class="n">chain_name</span><span class="p">)</span>
+                <span class="n">chain_entities</span><span class="p">[</span><span class="n">file_base</span> <span class="o">+</span> <span class="s">&#39;.&#39;</span> <span class="o">+</span> <span class="n">chain_name</span><span class="p">]</span> <span class="o">=</span> <span class="n">ch_ent</span>
+                <span class="k">if</span> <span class="n">single_file</span><span class="p">:</span>
+                    <span class="n">chain_entities</span><span class="p">[</span><span class="n">chain_name</span><span class="p">]</span> <span class="o">=</span> <span class="n">ch_ent</span>
+    <span class="k">return</span> <span class="n">chain_entities</span>
+
+<span class="k">def</span> <span class="nf">_AttachViewsToAln</span><span class="p">(</span><span class="n">aln</span><span class="p">,</span> <span class="n">chain_entities</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;Attach views to tpl. sequences in aln according to sequence names.&quot;&quot;&quot;</span>
+    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">aln</span><span class="o">.</span><span class="n">GetCount</span><span class="p">()):</span>
+        <span class="n">seq_name</span> <span class="o">=</span> <span class="n">aln</span><span class="o">.</span><span class="n">GetSequence</span><span class="p">(</span><span class="n">i</span><span class="p">)</span><span class="o">.</span><span class="n">GetName</span><span class="p">()</span>
+        <span class="c"># extract offset</span>
+        <span class="n">my_split</span> <span class="o">=</span> <span class="n">seq_name</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s">&#39;|&#39;</span><span class="p">)</span>
+        <span class="n">tpl_id</span> <span class="o">=</span> <span class="n">my_split</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
+        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">my_split</span><span class="p">)</span> <span class="o">==</span> <span class="mi">2</span> <span class="ow">and</span> <span class="n">my_split</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span><span class="o">.</span><span class="n">isdigit</span><span class="p">():</span>
+            <span class="c"># set offset</span>
+            <span class="n">tpl_offset</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">my_split</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">())</span>
+            <span class="c"># mismatch with existing one?</span>
+            <span class="n">old_offset</span> <span class="o">=</span> <span class="n">aln</span><span class="o">.</span><span class="n">GetSequenceOffset</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
+            <span class="k">if</span> <span class="n">old_offset</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="ow">and</span> <span class="n">old_offset</span> <span class="o">!=</span> <span class="n">tpl_offset</span><span class="p">:</span>
+                <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="s">&quot;Inconsistent offsets between seq. name&quot;</span><span class="o">+</span>
+                                       <span class="s">&quot; and seq. in alignment for &quot;</span> <span class="o">+</span> <span class="n">seq_name</span><span class="p">,</span>
+                                       <span class="mi">42</span><span class="p">)</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="n">aln</span><span class="o">.</span><span class="n">SetSequenceOffset</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">tpl_offset</span><span class="p">)</span>
+        <span class="k">elif</span> <span class="nb">len</span><span class="p">(</span><span class="n">my_split</span><span class="p">)</span> <span class="o">==</span> <span class="mi">2</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">my_split</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span><span class="o">.</span><span class="n">isdigit</span><span class="p">():</span>
+            <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="s">&quot;Non-integer offset defined in seq. name &quot;</span><span class="o">+</span>
+                                   <span class="n">seq_name</span><span class="p">,</span> <span class="mi">43</span><span class="p">)</span>
+        <span class="k">elif</span> <span class="nb">len</span><span class="p">(</span><span class="n">my_split</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">2</span><span class="p">:</span>
+            <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="s">&quot;Too many &#39;|&#39; in seq. name &quot;</span> <span class="o">+</span> <span class="n">seq_name</span><span class="p">,</span> <span class="mi">44</span><span class="p">)</span>
+        <span class="c"># identify chain and attach view</span>
+        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">chain_entities</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</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="n">i</span><span class="p">,</span> <span class="n">chain_entities</span><span class="p">[</span><span class="s">&#39;UNIQUE&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">CreateFullView</span><span class="p">())</span>
+        <span class="k">elif</span> <span class="n">chain_entities</span><span class="o">.</span><span class="n">has_key</span><span class="p">(</span><span class="n">tpl_id</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="n">i</span><span class="p">,</span> <span class="n">chain_entities</span><span class="p">[</span><span class="n">tpl_id</span><span class="p">]</span><span class="o">.</span><span class="n">CreateFullView</span><span class="p">())</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="s">&quot;Could not find chain with ID &quot;</span> <span class="o">+</span> <span class="n">tpl_id</span> <span class="o">+</span>
+                                   <span class="s">&quot; (should be &lt;FILE&gt;.&lt;CHAIN&gt;) to attach to&quot;</span><span class="o">+</span>
+                                   <span class="s">&quot; sequence named &quot;</span> <span class="o">+</span> <span class="n">seq_name</span><span class="p">,</span> <span class="mi">45</span><span class="p">)</span>
 
 <div class="viewcode-block" id="PM3ArgumentParser"><a class="viewcode-back" href="../../../core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser">[docs]</a><span class="k">class</span> <span class="nc">PM3ArgumentParser</span><span class="p">(</span><span class="n">argparse</span><span class="o">.</span><span class="n">ArgumentParser</span><span class="p">):</span>
     <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    This class is a child of :class:`argparse.ArgumentParser`. It provides a</span>
-<span class="sd">    set of standard arguments which can be activated, rather than added via the</span>
-<span class="sd">    traditional way. This helps keeping up a common naming scheme throughout</span>
-<span class="sd">    all |project| actions. As a real extension, this subclass provides checking</span>
-<span class="sd">    of input parameters on :meth:`Parse`. Beside</span>
+<span class="sd">    This class is a child of :class:`argparse.ArgumentParser`. It provides a set</span>
+<span class="sd">    of standard arguments which can be activated with :meth:`Add*` methods and</span>
+<span class="sd">    then assembled with :meth:`AssembleParser`. This helps keeping up a common</span>
+<span class="sd">    naming scheme throughout all |project| actions. As a real extension, this</span>
+<span class="sd">    subclass provides checking of input parameters on :meth:`Parse`. Besides</span>
 <span class="sd">    this, everything you can do with a &#39;real&#39; :class:`~argparse.ArgumentParser`</span>
 <span class="sd">    instance is possible here.</span>
 
-<span class="sd">    A note on exit codes: if :meth:`~pm3argparse.PM3ArgumentParser.Parse` is</span>
-<span class="sd">    called on unrecognised arguments, the script exits with a code 2 by</span>
-<span class="sd">    :class:`argparse.ArgumentParser.parse_args()`.</span>
-
 <span class="sd">    Attributes beyond :class:`argparse.ArgumentParser`:</span>
 
 <span class="sd">    .. attribute:: action</span>
@@ -356,9 +383,9 @@
         <span class="n">argparse</span><span class="o">.</span><span class="n">ArgumentParser</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">prog</span><span class="o">=</span><span class="n">prog</span><span class="p">,</span>
                                          <span class="n">description</span><span class="o">=</span><span class="n">description</span><span class="p">,</span>
                                          <span class="n">formatter_class</span><span class="o">=</span>\
-                                         <span class="n">argparse</span><span class="o">.</span><span class="n">ArgumentDefaultsHelpFormatter</span><span class="p">)</span>
+                                         <span class="n">argparse</span><span class="o">.</span><span class="n">RawDescriptionHelpFormatter</span><span class="p">)</span>
         <span class="bp">self</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="n">action</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">activate</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">activate</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span>
 </div>
     <span class="k">def</span> <span class="nf">_print_message</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">message</span><span class="p">,</span> <span class="nb">file</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
         <span class="c">#pylint: disable=redefined-builtin</span>
@@ -379,17 +406,24 @@
 
 <div class="viewcode-block" id="PM3ArgumentParser.Parse"><a class="viewcode-back" href="../../../core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser.Parse">[docs]</a>    <span class="k">def</span> <span class="nf">Parse</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">args</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Parse an argument string.</span>
+<span class="sd">        Parse an argument string. See :meth:`Add*` methods.</span>
+
+<span class="sd">        Options/arguments added by default: ``-h/--help`` shows usage.</span>
+
+<span class="sd">        General exit codes:</span>
+
+<span class="sd">        * 1 - an unhandled exception was raised</span>
+<span class="sd">        * 2 - arguments cannot be parsed or required arguments are missing</span>
 
 <span class="sd">        :param args: The argument string. As default |sysargv|_ is used.</span>
 <span class="sd">        :type args: :class:`list`</span>
 
-<span class="sd">        :returns: :class:`promod3.core.pm3argparse.PM3OptionsNamespace`.</span>
+<span class="sd">        :returns: Namespace filled with attributes (see :meth:`Add*` methods).</span>
 <span class="sd">        &quot;&quot;&quot;</span>
         <span class="n">opts</span> <span class="o">=</span> <span class="n">PM3OptionsNamespace</span><span class="p">()</span>
         <span class="bp">self</span><span class="o">.</span><span class="n">parse_args</span><span class="p">(</span><span class="n">args</span><span class="o">=</span><span class="n">args</span><span class="p">,</span> <span class="n">namespace</span><span class="o">=</span><span class="n">opts</span><span class="p">)</span>
 
-        <span class="n">opts</span><span class="o">.</span><span class="n">PostProcess</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">activate</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span>
+        <span class="n">opts</span><span class="o">.</span><span class="n">PostProcess</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">activate</span><span class="p">)</span>
         <span class="k">return</span> <span class="n">opts</span>
 </div>
 <div class="viewcode-block" id="PM3ArgumentParser.AssembleParser"><a class="viewcode-back" href="../../../core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser.AssembleParser">[docs]</a>    <span class="k">def</span> <span class="nf">AssembleParser</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
@@ -400,155 +434,252 @@
 <span class="sd">        :meth:`AssembleParser` will put everything in place, in the right order</span>
 <span class="sd">        and with the right constraints.</span>
 <span class="sd">        &quot;&quot;&quot;</span>
-        <span class="k">if</span> <span class="s">&#39;ALIGNMENT&#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">activate</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
+        <span class="k">if</span> <span class="s">&#39;ALIGNMENT&#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">activate</span><span class="p">:</span>
             <span class="bp">self</span><span class="o">.</span><span class="n">_AssembleAlignment</span><span class="p">()</span>
+        <span class="k">if</span> <span class="s">&#39;STRUCTURE&#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">activate</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_AssembleStructure</span><span class="p">()</span>
 </div>
-<div class="viewcode-block" id="PM3ArgumentParser.AddAlignment"><a class="viewcode-back" href="../../../core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser.AddAlignment">[docs]</a>    <span class="k">def</span> <span class="nf">AddAlignment</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<div class="viewcode-block" id="PM3ArgumentParser.AddAlignment"><a class="viewcode-back" href="../../../core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser.AddAlignment">[docs]</a>    <span class="k">def</span> <span class="nf">AddAlignment</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">allow_multitemplate</span><span class="o">=</span><span class="bp">False</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;Commandline options for alignments.</span>
 
-<span class="sd">        Add everything needed to load alignments to the argument parser. Creates</span>
-<span class="sd">        several options/ arguments and adds some checks for post processing.</span>
-<span class="sd">        This method only adds a flag to the parser to add alignment options on</span>
-<span class="sd">        :meth:`AssembleParser`. Depending on which options you activate, things</span>
-<span class="sd">        need to be added in a different order or have other constraints.</span>
+<span class="sd">        Activate everything needed to load alignments to the argument parser.</span>
+<span class="sd">        Command line arguments are then added in :meth:`AssembleParser` and the</span>
+<span class="sd">        input is post processed and checked in :meth:`Parse`.</span>
 
-<span class="sd">        Options/ arguments added:</span>
+<span class="sd">        :param allow_multitemplate: enable support for multitemplate alignments</span>
+<span class="sd">        :type allow_multitemplate:  :class:`bool`</span>
 
-<span class="sd">        * ``-f/ --fasta trg:&lt;NAME&gt; &lt;FILE&gt;`` - describing a target-template</span>
-<span class="sd">          alignment with ``trg:`` marking the target sequence inside</span>
-<span class="sd">          :file:`&lt;FILE&gt;`. The order of arguments is arbitrary which means file</span>
-<span class="sd">          names starting with :file:`trg:` will not work.</span>
+<span class="sd">        Options/arguments added:</span>
 
-<span class="sd">        * ``-j/ --json &lt;OBJECT&gt;|&lt;FILE&gt;`` - target-template alignments in JSON</span>
-<span class="sd">          format. Either an object string or a file name. The string variant is</span>
-<span class="sd">          limited to how many characters your command line can gobble.</span>
+<span class="sd">        * ``-f/--fasta &lt;FILE&gt;`` - Target-template alignment in FASTA format.</span>
+<span class="sd">          Target sequence is either named &quot;trg&quot; or &quot;target&quot; or the first</span>
+<span class="sd">          sequence is used. File can be plain or gzipped.</span>
 
-<span class="sd">        Exit codes related to alignment input:</span>
+<span class="sd">        * ``-c/--clustal &lt;FILE&gt;`` - Target-template alignment in CLUSTAL format.</span>
+<span class="sd">          Target sequence is either named &quot;trg&quot; or &quot;target&quot; or the first</span>
+<span class="sd">          sequence is used. File can be plain or gzipped.</span>
 
-<span class="sd">        * 11 - no prefix ``trg:`` found for an argument to ``--fasta``</span>
+<span class="sd">        * ``-j/--json &lt;OBJECT&gt;|&lt;FILE&gt;`` - Alignments provided as JSON</span>
+<span class="sd">          file/object. File can be plain or gzipped.</span>
 
-<span class="sd">        * 12 - a given alignment file does not exist</span>
+<span class="sd">        See :ref:`here &lt;promod-build-model&gt;` for details on the file formats.</span>
 
-<span class="sd">        * 13 - never raised (parameter for checking gzip files)</span>
+<span class="sd">        Attributes added to the namespace returned by :meth:`Parse`:</span>
 
-<span class="sd">        * 14 - empty target name found (``trg:``)</span>
+<span class="sd">        * :attr:`fasta` - filled with the input of the ``--fasta`` option, a</span>
+<span class="sd">          :class:`list` of :class:`str` (filenames).</span>
 
-<span class="sd">        * 15 - found an empty alignment file</span>
+<span class="sd">        * :attr:`clustal` - filled with the input of the ``--clustal`` option, a</span>
+<span class="sd">          :class:`list` of :class:`str` (filenames).</span>
 
-<span class="sd">        * 16 - alignment with more than 2 sequences found</span>
+<span class="sd">        * :attr:`json` - filled with the input of the ``--json`` option, a</span>
+<span class="sd">          :class:`list` of :class:`str`, where each string may be a filename</span>
+<span class="sd">          or a JSON object string.</span>
 
-<span class="sd">        * 17 - target sequence name not found in alignment</span>
+<span class="sd">        * :attr:`alignments` - :class:`ost.AlignmentList`, same order as given.</span>
+<span class="sd">          First sequence of the alignment is the target sequence, if in doubt,</span>
+<span class="sd">          check for sequence roles ``TARGET`` or ``TEMPLATE``</span>
 
-<span class="sd">        * 18 - sequences in the alignment have different length</span>
+<span class="sd">        * :attr:`aln_sources` - :class:`list` of :class:`str` with the original</span>
+<span class="sd">          source(s) of the alignment: may be filename(s) or JSON strings.</span>
 
-<span class="sd">        * 19 - problem with a JSON formatted file handed over to ``--json``</span>
+<span class="sd">        Exit codes related to alignment input:</span>
 
+<span class="sd">        * 12 - a given alignment file does not exist</span>
+<span class="sd">        * 13 - never raised (parameter for checking gzip files)</span>
+<span class="sd">        * 14 - gzip file cannot be opened</span>
+<span class="sd">        * 15 - found an empty alignment file</span>
+<span class="sd">        * 16 - unsupported number of sequences in alignment: only 1 sequence or</span>
+<span class="sd">          (unless *allow_multitemplate* = True) more than 2 sequences</span>
+<span class="sd">        * 17 - mutliple target sequences found in alignment</span>
+<span class="sd">        * 18 - error when reading fasta/clustal file</span>
+<span class="sd">        * 19 - problem with a JSON formatted file handed over to ``--json``</span>
 <span class="sd">        * 20 - JSON file could not be decoded into a JSON object</span>
-
 <span class="sd">        * 21 - JSON object has no &#39;alignmentlist&#39; key</span>
+<span class="sd">        * 22 - JSON object has no &#39;target&#39;/&#39;template&#39; in the &#39;alignmentlist&#39;</span>
+<span class="sd">        * 23 - JSON string could not be decoded</span>
+<span class="sd">        * 24 - JSON object &#39;alignmentlist&#39; does not point to a list</span>
+<span class="sd">        * 25 - JSON object &#39;alignmentlist&#39; member is not a dictionary</span>
+<span class="sd">        * 26 - JSON object &#39;alignmentlist&#39; &#39;target&#39;/&#39;template&#39; does not point</span>
+<span class="sd">          to a dictionary</span>
+<span class="sd">        * 27 - JSON  object &#39;alignmentlist&#39; &#39;target&#39;/&#39;template&#39; does not have</span>
+<span class="sd">          a needed key</span>
+<span class="sd">        * 28 - JSON  object &#39;alignmentlist&#39; &#39;target&#39;/&#39;template&#39; has a value of</span>
+<span class="sd">          wrong type</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">activate</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s">&#39;ALIGNMENT&#39;</span><span class="p">)</span>
+        <span class="k">if</span> <span class="n">allow_multitemplate</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">activate</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s">&#39;ALLOW_MULTITEMPLATE&#39;</span><span class="p">)</span>
+</div>
+<div class="viewcode-block" id="PM3ArgumentParser.AddStructure"><a class="viewcode-back" href="../../../core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser.AddStructure">[docs]</a>    <span class="k">def</span> <span class="nf">AddStructure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">attach_views</span><span class="o">=</span><span class="bp">False</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;Commandline options for structures.</span>
 
-<span class="sd">        * 22 - JSON object has no &#39;target&#39;/ &#39;template&#39; in the &#39;alignmentlist&#39;</span>
+<span class="sd">        Activate everything needed to load alignments to the argument parser.</span>
+<span class="sd">        Command line arguments are then added in :meth:`AssembleParser` and the</span>
+<span class="sd">        input is post processed and checked in :meth:`Parse`.</span>
 
-<span class="sd">        * 23 - JSON string could not be decoded</span>
+<span class="sd">        :param attach_views: if True: attach views to alignments. Requires call</span>
+<span class="sd">                             to :meth:`AddAlignment`. Chains for each sequence</span>
+<span class="sd">                             are identified based on the sequence name of the</span>
+<span class="sd">                             templates in the alignments (see </span>
+<span class="sd">                             :ref:`here &lt;promod-build-model&gt;` for details).</span>
+<span class="sd">        :type attach_views:  :class:`bool`</span>
 
-<span class="sd">        * 24 - JSON object &#39;alignmentlist&#39; does not point to a list</span>
+<span class="sd">        Options/arguments added:</span>
 
-<span class="sd">        * 25 - JSON object &#39;alignmentlist&#39; member is not a dictionary</span>
+<span class="sd">        * ``-p/--pdb &lt;FILE&gt;`` - Structure in PDB format. File can be plain or</span>
+<span class="sd">          gzipped.</span>
 
-<span class="sd">        * 26 - JSON object &#39;alignmentlist&#39; &#39;target&#39;/ &#39;template&#39; does not point</span>
-<span class="sd">               to a dictionary</span>
+<span class="sd">        * ``-e/--entity &lt;FILE&gt;`` - Structure in any format readable by the</span>
+<span class="sd">          :meth:`ost.io.LoadEntity` method. Format is chosen by file ending.</span>
+<span class="sd">          Recognized File Extensions: .ent, .pdb, .ent.gz, .pdb.gz, .cif, .cif.gz.</span>
 
-<span class="sd">        * 27 - JSON  object &#39;alignmentlist&#39; &#39;target&#39;/ &#39;template&#39; does not have</span>
-<span class="sd">               a needed key</span>
+<span class="sd">        Notes:</span>
 
-<span class="sd">        * 28 - JSON  object &#39;alignmentlist&#39; &#39;target&#39;/ &#39;template&#39; has a value of</span>
-<span class="sd">               wrong type</span>
+<span class="sd">        * one of the inputs must be given and only one type of input acceptable</span>
 
-<span class="sd">        Attributes added to the namespace returned by</span>
-<span class="sd">        :meth:`Parse`:</span>
+<span class="sd">        * callable multiple times (structures appended in given order)</span>
 
-<span class="sd">        * :attr:`fasta` - filled with the input of the ``--fasta`` option, a</span>
-<span class="sd">                          :class:`list` with multiple :class:`list` objects</span>
+<span class="sd">        Attributes added to the namespace returned by :meth:`Parse`:</span>
 
-<span class="sd">        * :attr:`json` - argument of the ``--json`` option, :class:`str`. May</span>
-<span class="sd">                         be a filename of a JSON object string.</span>
+<span class="sd">        * :attr:`pdb` - filled with the input of the ``--pdb`` option, a</span>
+<span class="sd">          :class:`list` of :class:`str` (filenames).</span>
 
-<span class="sd">        * :attr:`alignments` - :class:`ost.AlignmentList`, same order as</span>
-<span class="sd">                               :attr:`fasta`, likely to **not** follow the order</span>
-<span class="sd">                               of JSON input; first sequence of the alignment is</span>
-<span class="sd">                               the target sequence, if in doubt, check for</span>
-<span class="sd">                               sequence roles ``TARGET`` or ``TEMPLATE``</span>
+<span class="sd">        * :attr:`entity` - filled with the input of the ``--entity`` option, a</span>
+<span class="sd">          :class:`list` of :class:`str` (filenames).</span>
 
-<span class="sd">        * :attr:`aln_sources` - the original source of the alignment, may be</span>
-<span class="sd">                                filename(s) or a string in JSON format,</span>
-<span class="sd">                                :class:`list` of all sources</span>
+<span class="sd">        * :attr:`structures` - :class:`list` of :class:`ost.EntityHandle`, same</span>
+<span class="sd">          order as given.</span>
+
+<span class="sd">        * :attr:`structure_sources` - :class:`list` of :class:`str` with the</span>
+<span class="sd">          original filenames of the structures.</span>
+
+<span class="sd">        Exit codes related to alignment input:</span>
+
+<span class="sd">        * 32 - a given structure file does not exist</span>
+<span class="sd">        * 33 - failure to read a given structure file</span>
+<span class="sd">        * 34 - file ending is not a supported format</span>
+
+<span class="sd">        Exit codes if *attach_views* = True:</span>
+
+<span class="sd">        * 41 - attach_views used without adding alignments</span>
+<span class="sd">        * 42 - inconsistent offsets between seq. name and seq. in alignment</span>
+<span class="sd">        * 43 - non-integer offset defined in seq. name</span>
+<span class="sd">        * 44 - too many &quot;|&quot; in seq. name</span>
+<span class="sd">        * 45 - chain to attach to sequence could not be identified</span>
 <span class="sd">        &quot;&quot;&quot;</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">activate</span><span class="p">[</span><span class="s">&#39;ALIGNMENT&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">1</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">activate</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s">&#39;STRUCTURE&#39;</span><span class="p">)</span>
+        <span class="k">if</span> <span class="n">attach_views</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">activate</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s">&#39;ATTACH_VIEWS&#39;</span><span class="p">)</span>
 </div>
     <span class="k">def</span> <span class="nf">_AssembleAlignment</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-        <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Actually add alignment arguments/ options</span>
-<span class="sd">        &quot;&quot;&quot;</span>
+        <span class="sd">&quot;&quot;&quot;Actually add alignment arguments/options.&quot;&quot;&quot;</span>
         <span class="n">aln_grp</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">add_mutually_exclusive_group</span><span class="p">(</span><span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
-        <span class="c"># FastA input: - always pairwise alignments</span>
-        <span class="c">#              - callable multiple times</span>
-        <span class="c">#              - goes by &#39;trg:&lt;SEQNAME&gt; &lt;FILE&gt;&#39;</span>
-        <span class="c">#              - excludes JSON file/ object</span>
-        <span class="c">#              - leading whitespaces of FastA headers will be deleted</span>
-        <span class="n">aln_grp</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s">&#39;-f&#39;</span><span class="p">,</span> <span class="s">&#39;--fasta&#39;</span><span class="p">,</span> <span class="n">nargs</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;append&#39;</span><span class="p">,</span>
-                             <span class="n">metavar</span><span class="o">=</span><span class="p">(</span><span class="s">&#39;trg:&lt;NAME&gt;&#39;</span><span class="p">,</span> <span class="s">&#39;&lt;FILE&gt;&#39;</span><span class="p">),</span>
-                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;Pairwise alignment in FastA format, needs &#39;</span><span class="o">+</span>
-                             <span class="s">&#39;to declare what is the target sequence.&#39;</span><span class="p">)</span>
-        <span class="c"># JSON input: - right as string or file</span>
-        <span class="c">#             - object starts with {, so not allowed for files</span>
-        <span class="c">#             - callable only ONCE: should include everything needed</span>
-        <span class="c">#             - fields/ objects used: ...</span>
-        <span class="c">#             - goes by &#39;--json &lt;OBJECT&gt;|&lt;FILE&gt;&#39;</span>
-        <span class="c">#             - excludes &#39;--fasta&#39;</span>
-        <span class="c">#             - leading whitespaces of sequence names will be deleted</span>
+        <span class="c"># fasta input</span>
+        <span class="n">aln_grp</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s">&#39;-f&#39;</span><span class="p">,</span> <span class="s">&#39;--fasta&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="p">(</span><span class="s">&#39;&lt;FILE&gt;&#39;</span><span class="p">),</span>
+                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;Target-template alignment in FASTA format. &#39;</span><span class="o">+</span>
+                             <span class="s">&#39;Target sequence is either named &quot;trg&quot; or &#39;</span><span class="o">+</span>
+                             <span class="s">&#39;&quot;target&quot; or the first sequence is used. &#39;</span><span class="o">+</span>
+                             <span class="s">&#39;File can be plain or gzipped.&#39;</span><span class="p">,</span>
+                             <span class="n">action</span><span class="o">=</span><span class="s">&#39;append&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="nb">list</span><span class="p">())</span>
+        <span class="c"># clustal input</span>
+        <span class="n">aln_grp</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s">&#39;-c&#39;</span><span class="p">,</span> <span class="s">&#39;--clustal&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="p">(</span><span class="s">&#39;&lt;FILE&gt;&#39;</span><span class="p">),</span>
+                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;Target-template alignment in CLUSTAL format. &#39;</span><span class="o">+</span>
+                             <span class="s">&#39;Target sequence is either named &quot;trg&quot; or &#39;</span><span class="o">+</span>
+                             <span class="s">&#39;&quot;target&quot; or the first sequence is used. &#39;</span><span class="o">+</span>
+                             <span class="s">&#39;File can be plain or gzipped.&#39;</span><span class="p">,</span>
+                             <span class="n">action</span><span class="o">=</span><span class="s">&#39;append&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="nb">list</span><span class="p">())</span>
+        <span class="c"># JSON input</span>
         <span class="n">aln_grp</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s">&#39;-j&#39;</span><span class="p">,</span> <span class="s">&#39;--json&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&#39;&lt;OBJECT&gt;|&lt;FILE&gt;&#39;</span><span class="p">,</span>
-                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;Alignments provided as JSON file/ object.&#39;</span><span class="p">,</span>
-                             <span class="n">action</span><span class="o">=</span><span class="n">PM3StoreOnceAction</span><span class="p">)</span>
+                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;Alignments provided as JSON file/object. &#39;</span><span class="o">+</span>
+                             <span class="s">&#39;File can be plain or gzipped.&#39;</span><span class="p">,</span>
+                             <span class="n">action</span><span class="o">=</span><span class="s">&#39;append&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="nb">list</span><span class="p">())</span>
+
+    <span class="k">def</span> <span class="nf">_AssembleStructure</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;Actually add structure arguments/options.&quot;&quot;&quot;</span>
+        <span class="n">aln_grp</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">add_mutually_exclusive_group</span><span class="p">(</span><span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+        <span class="c"># pdb input</span>
+        <span class="n">aln_grp</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s">&#39;-p&#39;</span><span class="p">,</span> <span class="s">&#39;--pdb&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="p">(</span><span class="s">&#39;&lt;FILE&gt;&#39;</span><span class="p">),</span>
+                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;Structure in PDB format. &#39;</span><span class="o">+</span>
+                             <span class="s">&#39;File can be plain or gzipped.&#39;</span><span class="p">,</span>
+                             <span class="n">action</span><span class="o">=</span><span class="s">&#39;append&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="nb">list</span><span class="p">())</span>
+        <span class="c"># any OST entity</span>
+        <span class="n">aln_grp</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s">&#39;-e&#39;</span><span class="p">,</span> <span class="s">&#39;--entity&#39;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="p">(</span><span class="s">&#39;&lt;FILE&gt;&#39;</span><span class="p">),</span>
+                             <span class="n">help</span><span class="o">=</span><span class="s">&quot;Structure in any format readable by OST&#39;s &quot;</span><span class="o">+</span>
+                             <span class="s">&quot;io.LoadEntity method. Format is chosen by file &quot;</span><span class="o">+</span>
+                             <span class="s">&quot;ending. Recognized File Extensions: .ent, .pdb, &quot;</span><span class="o">+</span>
+                             <span class="s">&quot;.ent.gz, .pdb.gz, .cif, .cif.gz.&quot;</span><span class="p">,</span>
+                             <span class="n">action</span><span class="o">=</span><span class="s">&#39;append&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="nb">list</span><span class="p">())</span>
 </div>
 <span class="k">class</span> <span class="nc">PM3OptionsNamespace</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
     <span class="c"># class will grow, so for the moment pylint is ignored</span>
     <span class="c">#pylint: disable=too-few-public-methods</span>
-    <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    This one is mainly for internal use. You can use it like everything that</span>
-<span class="sd">    comes out of :meth:`argparse.ArgumentParser.parse_args`. Attributes are</span>
-<span class="sd">    added regarding how you assembled your argument parser.</span>
+    <span class="sd">&quot;&quot;&quot;Output of :meth:`PM3ArgumentParser.Parse`.</span>
+
+<span class="sd">    Like output of :meth:`argparse.ArgumentParser.parse_args` with additional</span>
+<span class="sd">    functions for convenience.</span>
 <span class="sd">    &quot;&quot;&quot;</span>
     <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="k">pass</span>
 
     <span class="k">def</span> <span class="nf">PostProcess</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">activated</span><span class="p">):</span>
-        <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Post processing of activated option packs.</span>
-<span class="sd">        &quot;&quot;&quot;</span>
+        <span class="sd">&quot;&quot;&quot;Post processing of activated option packs.&quot;&quot;&quot;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">allow_multitemplate</span> <span class="o">=</span> <span class="s">&#39;ALLOW_MULTITEMPLATE&#39;</span> <span class="ow">in</span> <span class="n">activated</span>
         <span class="k">if</span> <span class="s">&#39;ALIGNMENT&#39;</span> <span class="ow">in</span> <span class="n">activated</span><span class="p">:</span>
             <span class="bp">self</span><span class="o">.</span><span class="n">_PostProcessAlignment</span><span class="p">()</span>
+        <span class="k">if</span> <span class="s">&#39;STRUCTURE&#39;</span> <span class="ow">in</span> <span class="n">activated</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_PostProcessStructure</span><span class="p">()</span>
+        <span class="k">if</span> <span class="s">&#39;ATTACH_VIEWS&#39;</span> <span class="ow">in</span> <span class="n">activated</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_AttachViews</span><span class="p">()</span>
 
     <span class="k">def</span> <span class="nf">_PostProcessAlignment</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="c">#pylint: disable=no-member</span>
         <span class="c">#pylint: disable=attribute-defined-outside-init</span>
-        <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Doing some extra work after parsing.</span>
-<span class="sd">        &quot;&quot;&quot;</span>
+        <span class="sd">&quot;&quot;&quot;Get alignments from command line input.&quot;&quot;&quot;</span>
         <span class="bp">self</span><span class="o">.</span><span class="n">aln_sources</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
         <span class="bp">self</span><span class="o">.</span><span class="n">alignments</span> <span class="o">=</span> <span class="n">seq</span><span class="o">.</span><span class="n">AlignmentList</span><span class="p">()</span>
-        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">fasta</span><span class="p">:</span>
-            <span class="k">for</span> <span class="n">src</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">fasta</span><span class="p">:</span>
-                <span class="n">seqfile</span><span class="p">,</span> <span class="n">new_aln</span> <span class="o">=</span> <span class="n">_FetchAlnFromFastaOpt</span><span class="p">(</span><span class="n">src</span><span class="p">)</span>
-                <span class="bp">self</span><span class="o">.</span><span class="n">alignments</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">new_aln</span><span class="p">)</span>
-                <span class="bp">self</span><span class="o">.</span><span class="n">aln_sources</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">seqfile</span><span class="p">)</span>
-            <span class="k">return</span>
-        <span class="c"># Now for JSON input. Since one of the options needs to be given and</span>
-        <span class="c"># we already checked for FastA, no need to open a new branch, here.</span>
-        <span class="c"># decide if file or object</span>
-        <span class="n">json_obj</span> <span class="o">=</span> <span class="n">_GetJSONOBject</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
-        <span class="k">for</span> <span class="n">aln</span> <span class="ow">in</span> <span class="n">_GetAlnFromJSON</span><span class="p">(</span><span class="n">json_obj</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">json</span><span class="p">):</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">alignments</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">aln</span><span class="p">)</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">aln_sources</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">json</span><span class="p">)</span>
+        <span class="c"># parse fasta files</span>
+        <span class="k">for</span> <span class="n">src</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">fasta</span><span class="p">:</span>
+            <span class="n">new_aln</span> <span class="o">=</span> <span class="n">_FetchAlnFromFile</span><span class="p">(</span><span class="n">src</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">allow_multitemplate</span><span class="p">,</span> <span class="s">&quot;fasta&quot;</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">alignments</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">new_aln</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">aln_sources</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">src</span><span class="p">)</span>
+        <span class="c"># parse clustal files</span>
+        <span class="k">for</span> <span class="n">src</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">clustal</span><span class="p">:</span>
+            <span class="n">new_aln</span> <span class="o">=</span> <span class="n">_FetchAlnFromFile</span><span class="p">(</span><span class="n">src</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">allow_multitemplate</span><span class="p">,</span> <span class="s">&quot;clustal&quot;</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">alignments</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">new_aln</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">aln_sources</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">src</span><span class="p">)</span>
+        <span class="c"># parse JSON input</span>
+        <span class="k">for</span> <span class="n">src</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">json</span><span class="p">:</span>
+            <span class="n">json_obj</span> <span class="o">=</span> <span class="n">_GetJSONOBject</span><span class="p">(</span><span class="n">src</span><span class="p">)</span>
+            <span class="k">for</span> <span class="n">aln</span> <span class="ow">in</span> <span class="n">_GetAlnFromJSON</span><span class="p">(</span><span class="n">json_obj</span><span class="p">,</span> <span class="n">src</span><span class="p">):</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">alignments</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">aln</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">aln_sources</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">src</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">_PostProcessStructure</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="c">#pylint: disable=attribute-defined-outside-init</span>
+        <span class="sd">&quot;&quot;&quot;Get structures from command line input.&quot;&quot;&quot;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">structures</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">structure_sources</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+        <span class="c"># parse pdb files</span>
+        <span class="k">for</span> <span class="n">src</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">pdb</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">structures</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">_LoadPDB</span><span class="p">(</span><span class="n">src</span><span class="p">))</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">structure_sources</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">src</span><span class="p">)</span>
+        <span class="c"># parse generic structures</span>
+        <span class="k">for</span> <span class="n">src</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">entity</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">structures</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">_LoadEntity</span><span class="p">(</span><span class="n">src</span><span class="p">))</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">structure_sources</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">src</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">_AttachViews</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;Attach views to tpl. sequences according to sequence names.&quot;&quot;&quot;</span>
+        <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s">&#39;structures&#39;</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s">&#39;alignments&#39;</span><span class="p">)):</span>
+            <span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="s">&quot;Need to have structures and alignments to &quot;</span><span class="o">+</span>
+                                   <span class="s">&quot;attach views.&quot;</span><span class="p">,</span> <span class="mi">41</span><span class="p">)</span>
+        <span class="c"># get chain id to entity view (single chain) mapping (dict)</span>
+        <span class="n">chain_entities</span> <span class="o">=</span> <span class="n">_GetChains</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">structures</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">structure_sources</span><span class="p">)</span>
+        <span class="c"># go through all templates in all alignments</span>
+        <span class="k">for</span> <span class="n">aln</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">alignments</span><span class="p">:</span>
+            <span class="n">_AttachViewsToAln</span><span class="p">(</span><span class="n">aln</span><span class="p">,</span> <span class="n">chain_entities</span><span class="p">)</span>
+
 
 <span class="c">#  LocalWords:  param attr prog argparse ArgumentParser bool sys os init str</span>
 <span class="c">#  LocalWords:  progattr descattr argpinit argv formatter meth args namespace</span>
@@ -595,7 +726,7 @@
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/_modules/promod3/loop/_fragger.html b/doc/html/_modules/promod3/loop/_fragger.html
deleted file mode 100644
index 62ec47cd..00000000
--- a/doc/html/_modules/promod3/loop/_fragger.html
+++ /dev/null
@@ -1,424 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    
-    <title>promod3.loop._fragger &mdash; ProMod3 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">
-      var DOCUMENTATION_OPTIONS = {
-        URL_ROOT:    '../../../',
-        VERSION:     '0',
-        COLLAPSE_INDEX: false,
-        FILE_SUFFIX: '.html',
-        HAS_SOURCE:  true
-      };
-    </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>
-    <link rel="top" title="ProMod3 0 documentation" href="../../../index.html" />
-    <link rel="up" title="promod3" href="../../promod3.html" />
-   
-  
-  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
-
-  </head>
-  <body role="document">  
-
-    <div class="document">
-      <div class="documentwrapper">
-        <div class="bodywrapper">
-          <div class="body" role="main">
-            
-  <h1>Source code for promod3.loop._fragger</h1><div class="highlight"><pre>
-<span class="sd">&#39;&#39;&#39;Python functionality to generate fraggers.&#39;&#39;&#39;</span>
-
-<span class="c"># internal</span>
-<span class="kn">from</span> <span class="nn">_loop</span> <span class="kn">import</span> <span class="o">*</span>
-<span class="c"># external</span>
-<span class="kn">from</span> <span class="nn">ost.conop</span> <span class="kn">import</span> <span class="n">OneLetterCodeToResidueName</span>
-
-<span class="k">def</span> <span class="nf">_AssembleTorsionSamplers</span><span class="p">(</span><span class="n">psipred_pred</span><span class="p">,</span>
-                             <span class="n">torsion_sampler_coil</span><span class="p">,</span>
-                             <span class="n">torsion_sampler_helix</span><span class="p">,</span>
-                             <span class="n">torsion_sampler_extended</span><span class="p">):</span>
-
-    <span class="n">samplers</span> <span class="o">=</span> <span class="p">[</span><span class="n">torsion_sampler_coil</span><span class="p">]</span><span class="o">*</span><span class="nb">len</span><span class="p">(</span><span class="n">psipred_pred</span><span class="p">)</span>
-    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">psipred_pred</span><span class="p">)):</span>
-        <span class="k">if</span> <span class="n">psipred_pred</span><span class="o">.</span><span class="n">GetPrediction</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">==</span> <span class="s">&#39;H&#39;</span> <span class="ow">and</span> <span class="n">psipred_pred</span><span class="o">.</span><span class="n">GetConfidence</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">&gt;=</span> <span class="mi">6</span><span class="p">:</span>
-            <span class="n">samplers</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">torsion_sampler_helix</span>  
-        <span class="k">if</span> <span class="n">psipred_pred</span><span class="o">.</span><span class="n">GetPrediction</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">==</span> <span class="s">&#39;E&#39;</span> <span class="ow">and</span> <span class="n">psipred_pred</span><span class="o">.</span><span class="n">GetConfidence</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">&gt;=</span> <span class="mi">6</span><span class="p">:</span>
-            <span class="n">samplers</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">torsion_sampler_extended</span>
-    <span class="k">return</span> <span class="n">samplers</span>
-
-<span class="k">def</span> <span class="nf">_GenerateFragger</span><span class="p">(</span><span class="n">prof</span><span class="p">,</span><span class="n">psipred_pred</span><span class="p">,</span>
-                     <span class="n">num_fragments</span><span class="p">,</span>
-                     <span class="n">rmsd_thresh</span><span class="p">,</span>
-                     <span class="n">ss_agreement_weight</span><span class="p">,</span>
-                     <span class="n">sequence_profile_weight</span><span class="p">,</span>
-                     <span class="n">structure_profile_weight</span><span class="p">,</span>
-                     <span class="n">torsion_weight</span><span class="p">,</span>
-                     <span class="n">aa_before</span><span class="p">,</span>
-                     <span class="n">aa_after</span><span class="p">,</span>
-                     <span class="n">structure_db</span><span class="p">,</span>
-                     <span class="n">torsion_sampler_coil</span><span class="p">,</span>
-                     <span class="n">torsion_sampler_helix</span><span class="p">,</span>
-                     <span class="n">torsion_sampler_extended</span><span class="p">):</span>
-    
-    <span class="n">torsion_samplers</span> <span class="o">=</span> <span class="n">_AssembleTorsionSamplers</span><span class="p">(</span><span class="n">psipred_pred</span><span class="p">,</span>
-                                                <span class="n">torsion_sampler_coil</span><span class="p">,</span>
-                                                <span class="n">torsion_sampler_helix</span><span class="p">,</span>
-                                                <span class="n">torsion_sampler_extended</span><span class="p">)</span>
-
-    <span class="n">fragger</span> <span class="o">=</span> <span class="n">Fragger</span><span class="p">(</span><span class="n">prof</span><span class="o">.</span><span class="n">sequence</span><span class="p">)</span>
-    <span class="n">fragger</span><span class="o">.</span><span class="n">AddSSAgreeParameters</span><span class="p">(</span><span class="n">ss_agreement_weight</span><span class="p">,</span><span class="n">psipred_pred</span><span class="p">)</span>
-    <span class="n">fragger</span><span class="o">.</span><span class="n">AddSequenceProfileParameters</span><span class="p">(</span><span class="n">sequence_profile_weight</span><span class="p">,</span><span class="n">prof</span><span class="p">)</span>
-    <span class="n">fragger</span><span class="o">.</span><span class="n">AddStructureProfileParameters</span><span class="p">(</span><span class="n">structure_profile_weight</span><span class="p">,</span><span class="n">prof</span><span class="p">)</span>
-    <span class="n">fragger</span><span class="o">.</span><span class="n">AddTorsionProbabilityParameters</span><span class="p">(</span><span class="n">torsion_weight</span><span class="p">,</span><span class="n">torsion_samplers</span><span class="p">,</span>
-                                            <span class="n">aa_before</span><span class="p">,</span><span class="n">aa_after</span><span class="p">)</span>
-
-    <span class="n">fragger</span><span class="o">.</span><span class="n">Fill</span><span class="p">(</span><span class="n">structure_db</span><span class="p">,</span><span class="n">rmsd_thresh</span><span class="p">,</span><span class="n">num_fragments</span><span class="p">)</span>
-
-    <span class="k">return</span> <span class="n">fragger</span>
-
-
-<span class="k">def</span> <span class="nf">GenerateFragger</span><span class="p">(</span><span class="n">prof</span><span class="p">,</span> <span class="n">psipred_pred</span><span class="p">,</span> 
-                    <span class="n">num_fragments</span> <span class="o">=</span> <span class="mi">100</span><span class="p">,</span>
-                    <span class="n">rmsd_thresh</span> <span class="o">=</span> <span class="mf">0.0</span><span class="p">,</span> 
-                    <span class="n">ss_agreement_weight</span> <span class="o">=</span> <span class="mf">1.0</span><span class="p">,</span> 
-                    <span class="n">sequence_profile_weight</span> <span class="o">=</span> <span class="mf">0.8</span><span class="p">,</span> 
-                    <span class="n">structure_profile_weight</span> <span class="o">=</span> <span class="mf">2.0</span><span class="p">,</span>
-                    <span class="n">torsion_weight</span> <span class="o">=</span> <span class="mf">13.0</span><span class="p">,</span>
-                    <span class="n">aa_before</span> <span class="o">=</span> <span class="s">&quot;ALA&quot;</span><span class="p">,</span>
-                    <span class="n">aa_after</span> <span class="o">=</span> <span class="s">&quot;ALA&quot;</span><span class="p">,</span>
-                    <span class="n">structure_db</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
-                    <span class="n">torsion_sampler_coil</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
-                    <span class="n">torsion_sampler_helix</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
-                    <span class="n">torsion_sampler_extended</span> <span class="o">=</span> <span class="bp">None</span><span class="p">):</span>
-
-    <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">prof</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">psipred_pred</span><span class="p">):</span>
-        <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s">&quot;Length of profile must be consistent with Psipred!&quot;</span><span class="p">)</span>
-
-    <span class="k">if</span> <span class="n">structure_db</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
-        <span class="n">structure_db</span> <span class="o">=</span> <span class="n">LoadStructureDB</span><span class="p">()</span>
-
-    <span class="k">if</span> <span class="n">torsion_sampler_coil</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
-        <span class="n">torsion_sampler_coil</span> <span class="o">=</span> <span class="n">LoadTorsionSamplerCoil</span><span class="p">()</span>
-
-    <span class="k">if</span> <span class="n">torsion_sampler_helix</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
-        <span class="n">torsion_sampler_helix</span> <span class="o">=</span> <span class="n">LoadTorsionSamplerHelical</span><span class="p">()</span>
-
-    <span class="k">if</span> <span class="n">torsion_sampler_extended</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
-        <span class="n">torsion_sampler_extended</span> <span class="o">=</span> <span class="n">LoadTorsionSamplerExtended</span><span class="p">()</span>
-
-    <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">aa_before</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
-        <span class="c">#seems to be a one_letter_code, let&#39;s try our best</span>
-        <span class="n">aa_before</span> <span class="o">=</span> <span class="n">OneLetterCodeToResidueName</span><span class="p">(</span><span class="n">aa_before</span><span class="p">)</span>
-
-    <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">aa_after</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
-        <span class="c">#seems to be a one_letter_code, let&#39;s try our best</span>
-        <span class="n">aa_after</span> <span class="o">=</span> <span class="n">OneLetterCodeToResidueName</span><span class="p">(</span><span class="n">aa_after</span><span class="p">)</span>
-
-    <span class="k">return</span> <span class="n">_GenerateFragger</span><span class="p">(</span><span class="n">prof</span><span class="p">,</span> <span class="n">psipred_pred</span><span class="p">,</span> 
-                            <span class="n">num_fragments</span><span class="p">,</span>
-                            <span class="n">rmsd_thresh</span><span class="p">,</span> 
-                            <span class="n">ss_agreement_weight</span><span class="p">,</span> 
-                            <span class="n">sequence_profile_weight</span><span class="p">,</span> 
-                            <span class="n">structure_profile_weight</span><span class="p">,</span>
-                            <span class="n">torsion_weight</span><span class="p">,</span>
-                            <span class="n">aa_before</span><span class="p">,</span>
-                            <span class="n">aa_after</span><span class="p">,</span>
-                            <span class="n">structure_db</span><span class="p">,</span>
-                            <span class="n">torsion_sampler_coil</span><span class="p">,</span>
-                            <span class="n">torsion_sampler_helix</span><span class="p">,</span>
-                            <span class="n">torsion_sampler_extended</span><span class="p">)</span>
-
-
-<span class="k">def</span> <span class="nf">GenerateFraggerList</span><span class="p">(</span><span class="n">prof</span><span class="p">,</span> <span class="n">psipred_pred</span><span class="p">,</span>
-                        <span class="n">fragment_length</span> <span class="o">=</span> <span class="mi">9</span><span class="p">,</span>
-                        <span class="n">fragments_per_position</span> <span class="o">=</span> <span class="mi">100</span><span class="p">,</span>
-                        <span class="n">rmsd_thresh</span> <span class="o">=</span> <span class="mf">0.0</span><span class="p">,</span> 
-                        <span class="n">ss_agreement_weight</span> <span class="o">=</span> <span class="mf">1.0</span><span class="p">,</span> 
-                        <span class="n">sequence_profile_weight</span> <span class="o">=</span> <span class="mf">0.8</span><span class="p">,</span> 
-                        <span class="n">structure_profile_weight</span> <span class="o">=</span> <span class="mf">2.0</span><span class="p">,</span>
-                        <span class="n">torsion_weight</span> <span class="o">=</span> <span class="mf">13.0</span><span class="p">,</span>
-                        <span class="n">structure_db</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
-                        <span class="n">torsion_sampler_coil</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
-                        <span class="n">torsion_sampler_helix</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
-                        <span class="n">torsion_sampler_extended</span> <span class="o">=</span> <span class="bp">None</span><span class="p">):</span>
-
-
-    <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">prof</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">psipred_pred</span><span class="p">):</span>
-        <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s">&quot;Length of profile must be consistent with Psipred!&quot;</span><span class="p">)</span>
-
-    <span class="k">if</span> <span class="n">structure_db</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
-        <span class="n">structure_db</span> <span class="o">=</span> <span class="n">LoadStructureDB</span><span class="p">()</span>
-
-    <span class="k">if</span> <span class="n">torsion_sampler_coil</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
-        <span class="n">torsion_sampler_coil</span> <span class="o">=</span> <span class="n">LoadTorsionSamplerCoil</span><span class="p">()</span>
-
-    <span class="k">if</span> <span class="n">torsion_sampler_helix</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
-        <span class="n">torsion_sampler_helix</span> <span class="o">=</span> <span class="n">LoadTorsionSamplerHelical</span><span class="p">()</span>
-
-    <span class="k">if</span> <span class="n">torsion_sampler_extended</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
-        <span class="n">torsion_sampler_extended</span> <span class="o">=</span> <span class="n">LoadTorsionSamplerExtended</span><span class="p">()</span>
-
-    <span class="n">sequence</span> <span class="o">=</span> <span class="n">prof</span><span class="o">.</span><span class="n">sequence</span>
-    <span class="n">num_positions</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">sequence</span><span class="p">)</span> <span class="o">-</span> <span class="n">fragment_length</span> <span class="o">+</span> <span class="mi">1</span>
-
-    <span class="n">fragger_list</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
-
-    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">num_positions</span><span class="p">):</span>
-
-        <span class="n">aa_before</span> <span class="o">=</span> <span class="s">&quot;ALA&quot;</span>
-        <span class="n">aa_after</span> <span class="o">=</span> <span class="s">&quot;ALA&quot;</span>
-
-        <span class="k">if</span> <span class="n">i</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-            <span class="n">aa_before</span> <span class="o">=</span> <span class="n">OneLetterCodeToResidueName</span><span class="p">(</span><span class="n">sequence</span><span class="p">[</span><span class="n">i</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
-
-        <span class="k">if</span> <span class="n">i</span> <span class="o">+</span> <span class="n">fragment_length</span> <span class="o">&lt;</span> <span class="nb">len</span><span class="p">(</span><span class="n">sequence</span><span class="p">):</span>
-            <span class="n">aa_after</span> <span class="o">=</span> <span class="n">OneLetterCodeToResidueName</span><span class="p">(</span><span class="n">sequence</span><span class="p">[</span><span class="n">i</span><span class="o">+</span><span class="n">fragment_length</span><span class="p">])</span>
-
-        <span class="n">sub_prof</span> <span class="o">=</span> <span class="n">prof</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">i</span><span class="o">+</span><span class="n">fragment_length</span><span class="p">)</span>
-        <span class="n">sub_psipred_pred</span> <span class="o">=</span> <span class="n">psipred_pred</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">i</span><span class="o">+</span><span class="n">fragment_length</span><span class="p">)</span>
-
-        <span class="n">fragger</span> <span class="o">=</span> <span class="n">_GenerateFragger</span><span class="p">(</span><span class="n">sub_prof</span><span class="p">,</span> <span class="n">sub_psipred_pred</span><span class="p">,</span> 
-                                   <span class="n">fragments_per_position</span><span class="p">,</span>
-                                   <span class="n">rmsd_thresh</span><span class="p">,</span> 
-                                   <span class="n">ss_agreement_weight</span><span class="p">,</span> 
-                                   <span class="n">sequence_profile_weight</span><span class="p">,</span> 
-                                   <span class="n">structure_profile_weight</span><span class="p">,</span>
-                                   <span class="n">torsion_weight</span><span class="p">,</span>
-                                   <span class="n">aa_before</span><span class="p">,</span>
-                                   <span class="n">aa_after</span><span class="p">,</span>
-                                   <span class="n">structure_db</span><span class="p">,</span>
-                                   <span class="n">torsion_sampler_coil</span><span class="p">,</span>
-                                   <span class="n">torsion_sampler_helix</span><span class="p">,</span>
-                                   <span class="n">torsion_sampler_extended</span><span class="p">)</span>
-
-        <span class="n">fragger_list</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">fragger</span><span class="p">)</span>
-
-    <span class="k">return</span> <span class="n">fragger_list</span>
-
-<div class="viewcode-block" id="FraggerHandle"><a class="viewcode-back" href="../../../loop/structure_db.html#promod3.loop.FraggerHandle">[docs]</a><span class="k">class</span> <span class="nc">FraggerHandle</span><span class="p">:</span>
-    <span class="sd">&#39;&#39;&#39;Handler for Fragger objects linked to a specific chain.</span>
-
-<span class="sd">    Fragments are chosen by a combined score of SSAgree, TorsionProbability,</span>
-<span class="sd">    SequenceProfile and StructureProfile (see :class:`Fragger` for details).</span>
-
-<span class="sd">    :param prof: Sequence profile for this chain.</span>
-<span class="sd">    :type prof:  :class:`ost.seq.ProfileHandle`</span>
-<span class="sd">    :param psipred_pred: Psipred prediction for this chain.</span>
-<span class="sd">    :type psipred_pred:  :class:`ost.seq.PsipredPrediction`</span>
-<span class="sd">    :param fragment_length: Length (num. residues) of fragments to be extracted.</span>
-<span class="sd">    :type fragment_length:  :class:`int`</span>
-<span class="sd">    :param fragments_per_position: Number of fragments to be extracted at each</span>
-<span class="sd">                                   position.</span>
-<span class="sd">    :type fragments_per_position:  :class:`int`</span>
-<span class="sd">    :param rmsd_thresh: To guarantee structural diversity, no pair of fragments</span>
-<span class="sd">                        at a given position will have RMSD below `rmsd_thresh`.</span>
-<span class="sd">    :type rmsd_thresh:  :class:`float`</span>
-<span class="sd">    :param ss_agreement_weight: Linear weight for SSAgree score.</span>
-<span class="sd">    :type ss_agreement_weight:  :class:`float`</span>
-<span class="sd">    :param sequence_profile_weight: Linear weight for SequenceProfile score.</span>
-<span class="sd">    :type sequence_profile_weight:  :class:`float`</span>
-<span class="sd">    :param structure_profile_weight: Linear weight for StructureProfile score.</span>
-<span class="sd">    :type structure_profile_weight:  :class:`float`</span>
-<span class="sd">    :param torsion_weight: Linear weight for TorsionProbability score.</span>
-<span class="sd">    :type torsion_weight:  :class:`float`</span>
-<span class="sd">    :param structure_db: Source of structural data</span>
-<span class="sd">    :type structure_db:  :class:`StructureDB`</span>
-<span class="sd">    :param torsion_sampler_coil: Torsion sampler for coil residues.</span>
-<span class="sd">    :type torsion_sampler_coil:  :class:`TorsionSampler`</span>
-<span class="sd">    :param torsion_sampler_helix: Torsion sampler for helical residues.</span>
-<span class="sd">    :type torsion_sampler_helix:  :class:`TorsionSampler`</span>
-<span class="sd">    :param torsion_sampler_extended: Torsion sampler for extended residues.</span>
-<span class="sd">    :type torsion_sampler_extended:  :class:`TorsionSampler`</span>
-<span class="sd">    &#39;&#39;&#39;</span>
-    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">prof</span><span class="p">,</span> <span class="n">psipred_pred</span><span class="p">,</span>
-                 <span class="n">fragment_length</span> <span class="o">=</span> <span class="mi">9</span><span class="p">,</span>
-                 <span class="n">fragments_per_position</span> <span class="o">=</span> <span class="mi">100</span><span class="p">,</span>
-                 <span class="n">rmsd_thresh</span> <span class="o">=</span> <span class="mf">0.0</span><span class="p">,</span> 
-                 <span class="n">ss_agreement_weight</span> <span class="o">=</span> <span class="mf">1.0</span><span class="p">,</span> 
-                 <span class="n">sequence_profile_weight</span> <span class="o">=</span> <span class="mf">0.8</span><span class="p">,</span> 
-                 <span class="n">structure_profile_weight</span> <span class="o">=</span> <span class="mf">2.0</span><span class="p">,</span>
-                 <span class="n">torsion_weight</span> <span class="o">=</span> <span class="mf">13.0</span><span class="p">,</span>
-                 <span class="n">structure_db</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
-                 <span class="n">torsion_sampler_coil</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
-                 <span class="n">torsion_sampler_helix</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
-                 <span class="n">torsion_sampler_extended</span> <span class="o">=</span> <span class="bp">None</span><span class="p">):</span>
-        <span class="c"># check</span>
-        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">prof</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">psipred_pred</span><span class="p">):</span>
-            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s">&quot;Length of profile must be consistent with Psipred!&quot;</span><span class="p">)</span>
-        <span class="c"># keep all objects</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">prof</span> <span class="o">=</span> <span class="n">prof</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">psipred_pred</span> <span class="o">=</span> <span class="n">psipred_pred</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">fragment_length</span> <span class="o">=</span> <span class="n">fragment_length</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">fragments_per_position</span> <span class="o">=</span> <span class="n">fragments_per_position</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">rmsd_thresh</span> <span class="o">=</span> <span class="n">rmsd_thresh</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">ss_agreement_weight</span> <span class="o">=</span> <span class="n">ss_agreement_weight</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">sequence_profile_weight</span> <span class="o">=</span> <span class="n">sequence_profile_weight</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">structure_profile_weight</span> <span class="o">=</span> <span class="n">structure_profile_weight</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">torsion_weight</span> <span class="o">=</span> <span class="n">torsion_weight</span>
-        <span class="k">if</span> <span class="n">structure_db</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">structure_db</span> <span class="o">=</span> <span class="n">LoadStructureDB</span><span class="p">()</span>
-        <span class="k">else</span><span class="p">:</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">structure_db</span> <span class="o">=</span> <span class="n">structure_db</span>
-        <span class="k">if</span> <span class="n">torsion_sampler_coil</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_coil</span> <span class="o">=</span> <span class="n">LoadTorsionSamplerCoil</span><span class="p">()</span>
-        <span class="k">else</span><span class="p">:</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_coil</span> <span class="o">=</span> <span class="n">torsion_sampler_coil</span>
-        <span class="k">if</span> <span class="n">torsion_sampler_helix</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_helix</span> <span class="o">=</span> <span class="n">LoadTorsionSamplerHelical</span><span class="p">()</span>
-        <span class="k">else</span><span class="p">:</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_helix</span> <span class="o">=</span> <span class="n">torsion_sampler_helix</span>
-        <span class="k">if</span> <span class="n">torsion_sampler_extended</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_extended</span> <span class="o">=</span> <span class="n">LoadTorsionSamplerExtended</span><span class="p">()</span>
-        <span class="k">else</span><span class="p">:</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_extended</span> <span class="o">=</span> <span class="n">torsion_sampler_extended</span>
-        <span class="c"># extract stuff</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">sequence</span> <span class="o">=</span> <span class="n">prof</span><span class="o">.</span><span class="n">sequence</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">samplers</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_coil</span><span class="p">]</span> <span class="o">*</span> <span class="nb">len</span><span class="p">(</span><span class="n">psipred_pred</span><span class="p">)</span>
-        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">psipred_pred</span><span class="p">)):</span>
-            <span class="k">if</span> <span class="n">psipred_pred</span><span class="o">.</span><span class="n">GetPrediction</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">==</span> <span class="s">&#39;H&#39;</span> \
-               <span class="ow">and</span> <span class="n">psipred_pred</span><span class="o">.</span><span class="n">GetConfidence</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">&gt;=</span> <span class="mi">6</span><span class="p">:</span>
-                <span class="bp">self</span><span class="o">.</span><span class="n">samplers</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_helix</span>  
-            <span class="k">if</span> <span class="n">psipred_pred</span><span class="o">.</span><span class="n">GetPrediction</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">==</span> <span class="s">&#39;E&#39;</span> \
-               <span class="ow">and</span> <span class="n">psipred_pred</span><span class="o">.</span><span class="n">GetConfidence</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">&gt;=</span> <span class="mi">6</span><span class="p">:</span>
-                <span class="bp">self</span><span class="o">.</span><span class="n">samplers</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_extended</span>
-        <span class="c"># prepare map</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">fragger_map</span> <span class="o">=</span> <span class="n">FraggerMap</span><span class="p">()</span>
-
-<div class="viewcode-block" id="FraggerHandle.Get"><a class="viewcode-back" href="../../../loop/structure_db.html#promod3.loop.FraggerHandle.Get">[docs]</a>    <span class="k">def</span> <span class="nf">Get</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">frag_pos</span><span class="p">):</span>
-        <span class="sd">&#39;&#39;&#39;Get fragger for sequence at index frag_pos..frag_pos+frag_length-1.</span>
-
-<span class="sd">        :param frag_pos: Start-index (note that sequence-indexing starts at 0)</span>
-<span class="sd">        :type frag_pos:  :class`int`</span>
-<span class="sd">        :return: A :class:`Fragger` object.</span>
-<span class="sd">        :raises: :exc:`~exceptions.ValueError` if index out-of-bounds.</span>
-<span class="sd">        &#39;&#39;&#39;</span>
-        <span class="c"># this is for ranges (i.e. last touched index is end_pos-1)</span>
-        <span class="n">end_pos</span> <span class="o">=</span> <span class="n">frag_pos</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">fragment_length</span>
-        <span class="c"># check</span>
-        <span class="k">if</span> <span class="n">frag_pos</span> <span class="o">&lt;</span> <span class="mi">0</span> <span class="ow">or</span> <span class="n">end_pos</span> <span class="o">&gt;</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">sequence</span><span class="p">):</span>
-            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s">&quot;Invalid fragment position &quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">))</span>
-        <span class="c"># get</span>
-        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">fragger_map</span><span class="o">.</span><span class="n">Contains</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">):</span>
-            <span class="c"># get aa_before</span>
-            <span class="k">if</span> <span class="n">frag_pos</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-                <span class="n">olc</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sequence</span><span class="p">[</span><span class="n">frag_pos</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
-            <span class="k">else</span><span class="p">:</span>
-                <span class="n">olc</span> <span class="o">=</span> <span class="s">&#39;A&#39;</span>
-            <span class="n">aa_before</span> <span class="o">=</span> <span class="n">OneLetterCodeToResidueName</span><span class="p">(</span><span class="n">olc</span><span class="p">)</span>
-            <span class="c"># get aa_after</span>
-            <span class="k">if</span> <span class="n">end_pos</span> <span class="o">&lt;</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">sequence</span><span class="p">):</span>
-                <span class="n">olc</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sequence</span><span class="p">[</span><span class="n">end_pos</span><span class="p">]</span>
-            <span class="k">else</span><span class="p">:</span>
-                <span class="n">olc</span> <span class="o">=</span> <span class="s">&#39;A&#39;</span>
-            <span class="n">aa_after</span> <span class="o">=</span> <span class="n">OneLetterCodeToResidueName</span><span class="p">(</span><span class="n">olc</span><span class="p">)</span>
-            <span class="c"># get subsets of profiles, psipred and samplers</span>
-            <span class="n">sub_prof</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">prof</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">,</span> <span class="n">end_pos</span><span class="p">)</span>
-            <span class="n">sub_pp</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">psipred_pred</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">,</span> <span class="n">end_pos</span><span class="p">)</span>
-            <span class="n">sub_ts</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">samplers</span><span class="p">[</span><span class="n">frag_pos</span><span class="p">:</span><span class="n">end_pos</span><span class="p">]</span>
-            <span class="c"># get fragger</span>
-            <span class="n">fragger</span> <span class="o">=</span> <span class="n">Fragger</span><span class="p">(</span><span class="n">sub_prof</span><span class="o">.</span><span class="n">sequence</span><span class="p">)</span>
-            <span class="n">fragger</span><span class="o">.</span><span class="n">AddSSAgreeParameters</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ss_agreement_weight</span><span class="p">,</span> <span class="n">sub_pp</span><span class="p">)</span>
-            <span class="n">fragger</span><span class="o">.</span><span class="n">AddSequenceProfileParameters</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">sequence_profile_weight</span><span class="p">,</span>
-                                                 <span class="n">sub_prof</span><span class="p">)</span>
-            <span class="n">fragger</span><span class="o">.</span><span class="n">AddStructureProfileParameters</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">structure_profile_weight</span><span class="p">,</span>
-                                                  <span class="n">sub_prof</span><span class="p">)</span>
-            <span class="n">fragger</span><span class="o">.</span><span class="n">AddTorsionProbabilityParameters</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">torsion_weight</span><span class="p">,</span> <span class="n">sub_ts</span><span class="p">,</span>
-                                                    <span class="n">aa_before</span><span class="p">,</span> <span class="n">aa_after</span><span class="p">)</span>
-            <span class="n">fragger</span><span class="o">.</span><span class="n">Fill</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">structure_db</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">rmsd_thresh</span><span class="p">,</span>
-                         <span class="bp">self</span><span class="o">.</span><span class="n">fragments_per_position</span><span class="p">)</span>
-            <span class="c"># keep cached</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">fragger_map</span><span class="p">[</span><span class="n">frag_pos</span><span class="p">]</span> <span class="o">=</span> <span class="n">fragger</span>
-        <span class="c"># get it back</span>
-        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">fragger_map</span><span class="p">[</span><span class="n">frag_pos</span><span class="p">]</span>
-</div>
-<div class="viewcode-block" id="FraggerHandle.GetList"><a class="viewcode-back" href="../../../loop/structure_db.html#promod3.loop.FraggerHandle.GetList">[docs]</a>    <span class="k">def</span> <span class="nf">GetList</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">pos_start</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">pos_end</span><span class="o">=-</span><span class="mi">1</span><span class="p">):</span>
-        <span class="sd">&#39;&#39;&#39;Get List of fragments covering sequence indices pos_start..pos_end.</span>
-
-<span class="sd">        This will return an empty list if range is smaller than fragment_length.</span>
-
-<span class="sd">        :param pos_start: Start-index (note that sequence-indexing starts at 0)</span>
-<span class="sd">        :type pos_start:  :class`int`</span>
-<span class="sd">        :param pos_end: End-index or -1 if it should go to the sequence-end.</span>
-<span class="sd">        :type pos_end:  :class`int`</span>
-<span class="sd">        :return: A :class:`list` of :class:`Fragger` objects.</span>
-<span class="sd">        :raises: :exc:`~exceptions.ValueError` if indices out-of-bounds.</span>
-<span class="sd">        &#39;&#39;&#39;</span>
-        <span class="k">if</span> <span class="n">pos_end</span> <span class="o">==</span> <span class="o">-</span><span class="mi">1</span><span class="p">:</span>
-            <span class="n">pos_end</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">sequence</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span>
-        <span class="n">fragger_list</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
-        <span class="k">for</span> <span class="n">frag_pos</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">pos_start</span><span class="p">,</span> <span class="n">pos_end</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">fragment_length</span> <span class="o">+</span> <span class="mi">2</span><span class="p">):</span>
-            <span class="n">fragger_list</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">Get</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">))</span>
-        <span class="k">return</span> <span class="n">fragger_list</span>
-</div>
-<div class="viewcode-block" id="FraggerHandle.SaveCached"><a class="viewcode-back" href="../../../loop/structure_db.html#promod3.loop.FraggerHandle.SaveCached">[docs]</a>    <span class="k">def</span> <span class="nf">SaveCached</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filename</span><span class="p">):</span>
-        <span class="sd">&#39;&#39;&#39;Save cached fraggers.&#39;&#39;&#39;</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">fragger_map</span><span class="o">.</span><span class="n">Save</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
-</div>
-<div class="viewcode-block" id="FraggerHandle.LoadCached"><a class="viewcode-back" href="../../../loop/structure_db.html#promod3.loop.FraggerHandle.LoadCached">[docs]</a>    <span class="k">def</span> <span class="nf">LoadCached</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filename</span><span class="p">):</span>
-        <span class="sd">&#39;&#39;&#39;Load fragger objects stored with :meth:`SaveCached`.</span>
-<span class="sd">        Note that here we require that the same structure db is set as was</span>
-<span class="sd">        used when `filename` was saved.&#39;&#39;&#39;</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">fragger_map</span> <span class="o">=</span> <span class="n">FraggerMap</span><span class="o">.</span><span class="n">Load</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">structure_db</span><span class="p">)</span>
-
-<span class="c"># these methods will be exported into module</span></div></div>
-<span class="n">__all__</span> <span class="o">=</span> <span class="p">(</span><span class="s">&#39;GenerateFragger&#39;</span><span class="p">,</span> <span class="s">&#39;GenerateFraggerList&#39;</span><span class="p">,</span> <span class="s">&#39;FraggerHandle&#39;</span><span class="p">,)</span>
-</pre></div>
-
-          </div>
-        </div>
-      </div>
-      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
-        <div class="sphinxsidebarwrapper"><div class="relations">
-<h3>Related Topics</h3>
-<ul>
-  <li><a href="../../../index.html">Documentation overview</a><ul>
-  <li><a href="../../index.html">Module code</a><ul>
-  <li><a href="../../promod3.html">promod3</a><ul>
-  </ul></li>
-  </ul></li>
-  </ul></li>
-</ul>
-</div>
-<div id="searchbox" style="display: none" role="search">
-  <h3>Quick search</h3>
-    <form class="search" action="../../../search.html" method="get">
-      <input type="text" name="q" />
-      <input type="submit" value="Go" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    <p class="searchtip" style="font-size: 90%">
-    Enter search terms or a module, class or function name.
-    </p>
-</div>
-<script type="text/javascript">$('#searchbox').show(0);</script>
-        </div>
-      </div>
-      <div class="clearer"></div>
-    </div>
-    <div class="footer">
-      &copy;2016, Bienchen.
-      
-      |
-      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
-      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
-      
-    </div>
-
-    
-
-    
-  </body>
-</html>
\ No newline at end of file
diff --git a/doc/html/_modules/promod3/modelling/_closegaps.html b/doc/html/_modules/promod3/modelling/_closegaps.html
index 8485d699..f563a24b 100644
--- a/doc/html/_modules/promod3/modelling/_closegaps.html
+++ b/doc/html/_modules/promod3/modelling/_closegaps.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>promod3.modelling._closegaps &mdash; ProMod3 0 documentation</title>
+    <title>promod3.modelling._closegaps &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../../../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../../../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../../../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../../../index.html" />
     <link rel="up" title="promod3" href="../../promod3.html" />
    
   
@@ -44,17 +44,66 @@
 <span class="sd">&#39;&#39;&#39;</span>
 
 <span class="c"># internal</span>
-<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span><span class="p">,</span> <span class="n">sidechain</span>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span><span class="p">,</span> <span class="n">core</span><span class="p">,</span> <span class="n">scoring</span>
 <span class="kn">from</span> <span class="nn">_modelling</span> <span class="kn">import</span> <span class="o">*</span>
 <span class="kn">from</span> <span class="nn">_ring_punches</span> <span class="kn">import</span> <span class="o">*</span>
+<span class="kn">from</span> <span class="nn">_reconstruct_sidechains</span> <span class="kn">import</span> <span class="o">*</span>
 <span class="c"># external</span>
 <span class="kn">import</span> <span class="nn">ost</span>
 <span class="kn">import</span> <span class="nn">sys</span>
 
+<span class="c">###############################################################################</span>
+<span class="c"># loop candidate selection setup</span>
+<span class="k">def</span> <span class="nf">_GetBestLC</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">loop_candidates</span><span class="p">,</span> <span class="n">start_resnum</span><span class="p">,</span> <span class="n">chain_idx</span><span class="p">,</span>
+               <span class="n">db_scores</span><span class="p">,</span> <span class="n">max_num_all_atom</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
+    <span class="c"># returns (min_idx, min_score)</span>
+
+    <span class="c"># dummy check</span>
+    <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">loop_candidates</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
+        <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s">&quot;Need at least 1 candidate to choose from!&quot;</span><span class="p">)</span>
+    
+    <span class="c"># setup weights</span>
+    <span class="n">with_db</span> <span class="o">=</span> <span class="p">(</span><span class="ow">not</span> <span class="n">db_scores</span><span class="o">.</span><span class="n">IsEmpty</span><span class="p">())</span>
+    <span class="n">with_aa</span> <span class="o">=</span> <span class="p">(</span><span class="n">max_num_all_atom</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span>
+    <span class="n">weights</span> <span class="o">=</span> <span class="n">ScoringWeights</span><span class="o">.</span><span class="n">GetWeights</span><span class="p">(</span><span class="n">with_db</span><span class="p">,</span> <span class="n">with_aa</span><span class="p">)</span>
+
+    <span class="c"># setup all scores object (we collect needed scores there)</span>
+    <span class="n">all_scores</span> <span class="o">=</span> <span class="n">db_scores</span><span class="o">.</span><span class="n">Copy</span><span class="p">()</span>  <span class="c"># copy to avoid changing db_scores</span>
+
+    <span class="c"># add backbone scores</span>
+    <span class="n">loop_candidates</span><span class="o">.</span><span class="n">CalculateBackboneScores</span><span class="p">(</span><span class="n">all_scores</span><span class="p">,</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">backbone_scorer</span><span class="p">,</span>
+                                            <span class="n">start_resnum</span><span class="p">,</span> <span class="n">chain_idx</span><span class="p">)</span>
+
+    <span class="c"># add all atom scores?</span>
+    <span class="k">if</span> <span class="n">with_aa</span><span class="p">:</span>
+        <span class="c"># get best ones based on previous scores</span>
+        <span class="n">non_aa_weights</span> <span class="o">=</span> <span class="n">ScoringWeights</span><span class="o">.</span><span class="n">GetWeights</span><span class="p">(</span><span class="n">with_db</span><span class="p">,</span> <span class="bp">False</span><span class="p">)</span>
+        <span class="n">non_aa_scores</span> <span class="o">=</span> <span class="n">all_scores</span><span class="o">.</span><span class="n">LinearCombine</span><span class="p">(</span><span class="n">non_aa_weights</span><span class="p">)</span>
+        <span class="n">arg_sorted_scores</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">([(</span><span class="n">v</span><span class="p">,</span><span class="n">i</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">v</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">non_aa_scores</span><span class="p">)])</span>
+        <span class="n">min_indices</span> <span class="o">=</span> <span class="p">[</span><span class="n">i</span> <span class="k">for</span> <span class="n">v</span><span class="p">,</span><span class="n">i</span> <span class="ow">in</span> <span class="n">arg_sorted_scores</span><span class="p">[:</span><span class="n">max_num_all_atom</span><span class="p">]]</span>
+        <span class="c"># extract relevant loop candidates and scores</span>
+        <span class="n">aa_loop_candidates</span> <span class="o">=</span> <span class="n">loop_candidates</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">min_indices</span><span class="p">)</span>
+        <span class="n">all_scores</span> <span class="o">=</span> <span class="n">all_scores</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">min_indices</span><span class="p">)</span>
+        <span class="c"># add all atom scores</span>
+        <span class="n">aa_loop_candidates</span><span class="o">.</span><span class="n">CalculateAllAtomScores</span><span class="p">(</span><span class="n">all_scores</span><span class="p">,</span> <span class="n">mhandle</span><span class="p">,</span>
+                                                  <span class="n">start_resnum</span><span class="p">,</span> <span class="n">chain_idx</span><span class="p">)</span>
+
+    <span class="c"># get / return best</span>
+    <span class="n">scores</span> <span class="o">=</span> <span class="n">all_scores</span><span class="o">.</span><span class="n">LinearCombine</span><span class="p">(</span><span class="n">weights</span><span class="p">)</span>
+    <span class="n">min_score</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="n">scores</span><span class="p">)</span>
+    <span class="n">min_idx</span> <span class="o">=</span> <span class="n">scores</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="n">min_score</span><span class="p">)</span>
+    <span class="c"># translate to original indexing for all atom</span>
+    <span class="k">if</span> <span class="n">with_aa</span><span class="p">:</span>
+        <span class="n">min_idx</span> <span class="o">=</span> <span class="n">min_indices</span><span class="p">[</span><span class="n">min_idx</span><span class="p">]</span>
+    <span class="k">return</span> <span class="p">(</span><span class="n">min_idx</span><span class="p">,</span> <span class="n">min_score</span><span class="p">)</span>
+
 <span class="c">###############################################################################</span>
 <span class="c"># helper functions</span>
 <span class="k">def</span> <span class="nf">_GetGapExtender</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">actual_gap</span><span class="p">,</span> <span class="n">use_scoring_extender</span><span class="p">,</span>
-                    <span class="n">use_full_extender</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">max_length</span><span class="o">=-</span><span class="mi">1</span><span class="p">):</span>
+                    <span class="n">use_full_extender</span><span class="p">,</span> <span class="n">max_length</span><span class="o">=-</span><span class="mi">1</span><span class="p">):</span>
+    <span class="c"># DO NOT USE full ext. with max_len = -1 as this can use LOTS of memory</span>
+    <span class="k">if</span> <span class="n">use_full_extender</span> <span class="ow">and</span> <span class="n">max_length</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">:</span>
+        <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s">&quot;Cannot use neg. max_length with full extender!&quot;</span><span class="p">)</span>
     <span class="c"># return appropriate gap extender</span>
     <span class="n">actual_chain_idx</span> <span class="o">=</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">GetChainIndex</span><span class="p">()</span>
     <span class="k">if</span> <span class="n">use_scoring_extender</span><span class="p">:</span>
@@ -72,9 +121,7 @@
                                       <span class="n">mhandle</span><span class="o">.</span><span class="n">seqres</span><span class="p">[</span><span class="n">actual_chain_idx</span><span class="p">],</span>
                                       <span class="n">max_length</span><span class="p">)</span>
         <span class="k">else</span><span class="p">:</span>
-            <span class="k">return</span> <span class="n">ScoringGapExtender</span><span class="p">(</span><span class="n">actual_gap</span><span class="p">,</span> <span class="mf">0.8</span><span class="p">,</span>
-                                      <span class="n">extender_penalties</span><span class="p">,</span>
-                                      <span class="n">mhandle</span><span class="o">.</span><span class="n">seqres</span><span class="p">[</span><span class="n">actual_chain_idx</span><span class="p">])</span>
+            <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s">&quot;Cannot use ScoringGapExtender w/o max_length.&quot;</span><span class="p">)</span>
     <span class="k">else</span><span class="p">:</span>
         <span class="k">if</span> <span class="n">use_full_extender</span><span class="p">:</span>
             <span class="k">return</span> <span class="n">FullGapExtender</span><span class="p">(</span><span class="n">actual_gap</span><span class="p">,</span>
@@ -84,19 +131,18 @@
             <span class="k">return</span> <span class="n">GapExtender</span><span class="p">(</span><span class="n">actual_gap</span><span class="p">,</span>
                                <span class="n">mhandle</span><span class="o">.</span><span class="n">seqres</span><span class="p">[</span><span class="n">actual_chain_idx</span><span class="p">])</span>
 
-<span class="k">def</span> <span class="nf">_GetWeights</span><span class="p">():</span>
-    <span class="c"># weights optimized by Niklaus Johner</span>
-    <span class="n">weights</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
-    <span class="n">weights</span><span class="p">[</span><span class="s">&quot;hbond&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">1</span>
-    <span class="n">weights</span><span class="p">[</span><span class="s">&quot;clash&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">0.08880086</span>
-    <span class="n">weights</span><span class="p">[</span><span class="s">&quot;torsion&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">0.69712072</span>
-    <span class="n">weights</span><span class="p">[</span><span class="s">&quot;reduced&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">2.13535565</span>
-    <span class="n">weights</span><span class="p">[</span><span class="s">&quot;cbeta&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">3.59177335</span>
-    <span class="n">weights</span><span class="p">[</span><span class="s">&quot;cb_packing&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">1.17280667</span>
-    <span class="k">return</span> <span class="n">weights</span>
-
-<span class="k">def</span> <span class="nf">_CloseLoopFrame</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span>
-                    <span class="n">actual_extended_gaps</span><span class="p">):</span>
+<span class="k">def</span> <span class="nf">_ResolveLogInfo</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">,</span> <span class="n">optimal_gap</span><span class="p">,</span> <span class="n">n_candidates</span><span class="p">,</span> <span class="n">with_db</span><span class="p">,</span> <span class="n">with_aa</span><span class="p">):</span>
+    <span class="c"># helper for consistent logging...</span>
+    <span class="n">scor_str</span> <span class="o">=</span> <span class="s">&quot;BB&quot;</span>
+    <span class="k">if</span> <span class="n">with_db</span><span class="p">:</span>
+        <span class="n">scor_str</span> <span class="o">+=</span> <span class="s">&quot;_DB&quot;</span>
+    <span class="k">if</span> <span class="n">with_aa</span><span class="p">:</span>
+        <span class="n">scor_str</span> <span class="o">+=</span> <span class="s">&quot;_AA&quot;</span>
+    <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Resolved </span><span class="si">%s</span><span class="s"> by filling </span><span class="si">%s</span><span class="s"> (</span><span class="si">%d</span><span class="s"> candidates, </span><span class="si">%s</span><span class="s">)&quot;</span> <span class="o">%</span> \
+                <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">),</span> <span class="nb">str</span><span class="p">(</span><span class="n">optimal_gap</span><span class="p">),</span> <span class="n">n_candidates</span><span class="p">,</span> <span class="n">scor_str</span><span class="p">))</span>
+
+<span class="k">def</span> <span class="nf">_CloseLoopFrame</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span> <span class="n">actual_extended_gaps</span><span class="p">,</span>
+                    <span class="n">actual_db_scores</span><span class="o">=</span><span class="p">[],</span> <span class="n">max_num_all_atom</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Rank candidates with &quot;frame-approach&quot;.</span>
 <span class="sd">    All found candidates are extended prior to scoring so they match in size.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
@@ -122,130 +168,115 @@
     <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">frame_seq</span><span class="p">)):</span>
         <span class="n">actual_res</span> <span class="o">=</span> <span class="n">actual_chain</span><span class="o">.</span><span class="n">FindResidue</span><span class="p">(</span><span class="n">actual_res_num</span><span class="p">)</span>
         <span class="k">if</span> <span class="n">actual_res</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
-            <span class="n">frame_backbone</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">Backbone</span><span class="p">(</span><span class="n">actual_res</span><span class="p">,</span> <span class="n">frame_seq</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
-            <span class="n">frame_backbone_list</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">frame_backbone</span>
+            <span class="n">frame_backbone_list</span><span class="o">.</span><span class="n">Set</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">actual_res</span><span class="p">,</span> <span class="n">frame_seq</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
         <span class="n">actual_res_num</span> <span class="o">+=</span> <span class="mi">1</span>
 
-    <span class="n">final_loop_candidates</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoopCandidates</span><span class="p">(</span><span class="n">frame_seq</span><span class="p">)</span>
-
     <span class="c"># prepare loop candidates for scoring</span>
+    <span class="n">final_loop_candidates</span> <span class="o">=</span> <span class="n">LoopCandidates</span><span class="p">(</span><span class="n">frame_seq</span><span class="p">)</span>
     <span class="n">back_mapper</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
     <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">loop_candidates</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">actual_candidates</span><span class="p">):</span>
         <span class="n">start_index</span> <span class="o">=</span> <span class="n">actual_extended_gaps</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span>\
                       <span class="o">-</span> <span class="n">min_before_resnum</span>
         <span class="k">for</span> <span class="n">j</span><span class="p">,</span> <span class="n">loop_candidate</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">loop_candidates</span><span class="p">):</span>
-            <span class="n">actual_frame_backbone_list</span> <span class="o">=</span> <span class="n">frame_backbone_list</span>
+            <span class="n">actual_frame_backbone_list</span> <span class="o">=</span> <span class="n">frame_backbone_list</span><span class="o">.</span><span class="n">Copy</span><span class="p">()</span>
             <span class="n">actual_frame_backbone_list</span><span class="o">.</span><span class="n">ReplaceFragment</span><span class="p">(</span>
-                <span class="n">loop_candidate</span><span class="o">.</span><span class="n">bb_list</span><span class="p">,</span> <span class="n">start_index</span><span class="p">,</span> <span class="bp">False</span><span class="p">)</span>
+                <span class="n">loop_candidate</span><span class="p">,</span> <span class="n">start_index</span><span class="p">,</span> <span class="bp">False</span><span class="p">)</span>
             <span class="n">final_loop_candidates</span><span class="o">.</span><span class="n">Add</span><span class="p">(</span><span class="n">actual_frame_backbone_list</span><span class="p">)</span>
             <span class="n">back_mapper</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">i</span><span class="p">,</span> <span class="n">j</span><span class="p">))</span>
 
-    <span class="c"># score them</span>
-    <span class="n">final_loop_candidates</span><span class="o">.</span><span class="n">AttachScorer</span><span class="p">(</span><span class="n">scorer</span><span class="p">)</span>
-    <span class="n">final_loop_candidates</span><span class="o">.</span><span class="n">CalculateCombinedScores</span><span class="p">(</span><span class="n">_GetWeights</span><span class="p">(),</span>
-                                                  <span class="n">min_before_resnum</span><span class="p">,</span>
-                                                  <span class="n">actual_chain_idx</span><span class="p">)</span>
-
-    <span class="c"># compare scores</span>
-    <span class="n">min_score</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="s">&quot;inf&quot;</span><span class="p">)</span>
-    <span class="n">optimal_candidate</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span>
-    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">final_loop_candidates</span><span class="p">)):</span>
-        <span class="n">score</span> <span class="o">=</span> <span class="n">final_loop_candidates</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">combined_score</span>
-        <span class="k">if</span> <span class="n">score</span> <span class="o">&lt;</span> <span class="n">min_score</span><span class="p">:</span>
-            <span class="n">optimal_candidate</span> <span class="o">=</span> <span class="n">i</span>
-            <span class="n">min_score</span> <span class="o">=</span> <span class="n">score</span>
-
-    <span class="n">ost</span><span class="o">.</span><span class="n">LogVerbose</span><span class="p">(</span><span class="s">&quot;Gap </span><span class="si">%s</span><span class="s"> - </span><span class="si">%d</span><span class="s"> candidates, best (min) score </span><span class="si">%g</span><span class="s">&quot;</span> <span class="o">%</span>
-                   <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">),</span> <span class="nb">len</span><span class="p">(</span><span class="n">final_loop_candidates</span><span class="p">),</span> <span class="n">min_score</span><span class="p">))</span>
-
-    <span class="c"># finally resolve loop</span>
-    <span class="k">if</span> <span class="n">optimal_candidate</span> <span class="o">!=</span> <span class="o">-</span><span class="mi">1</span><span class="p">:</span>
-        <span class="n">idx_a</span> <span class="o">=</span> <span class="n">back_mapper</span><span class="p">[</span><span class="n">optimal_candidate</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span>
-        <span class="n">idx_b</span> <span class="o">=</span> <span class="n">back_mapper</span><span class="p">[</span><span class="n">optimal_candidate</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span>
-        <span class="c"># update model</span>
-        <span class="n">start_resnum</span> <span class="o">=</span> <span class="n">actual_extended_gaps</span><span class="p">[</span><span class="n">idx_a</span><span class="p">]</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span>
-        <span class="n">bb_list</span> <span class="o">=</span> <span class="n">actual_candidates</span><span class="p">[</span><span class="n">idx_a</span><span class="p">][</span><span class="n">idx_b</span><span class="p">]</span><span class="o">.</span><span class="n">bb_list</span>
-        <span class="n">bb_list</span><span class="o">.</span><span class="n">InsertInto</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">chains</span><span class="p">[</span><span class="n">actual_chain_idx</span><span class="p">],</span> <span class="n">start_resnum</span><span class="p">)</span>
-        <span class="c"># update scorer</span>
-        <span class="n">scorer</span><span class="o">.</span><span class="n">SetEnvironment</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="n">start_resnum</span><span class="p">,</span> <span class="n">actual_chain_idx</span><span class="p">)</span>
-        <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Resolved </span><span class="si">%s</span><span class="s"> by filling </span><span class="si">%s</span><span class="s"> (</span><span class="si">%d</span><span class="s"> candidates)&quot;</span> <span class="o">%</span> \
-                    <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">),</span>
-                     <span class="nb">str</span><span class="p">(</span><span class="n">actual_extended_gaps</span><span class="p">[</span><span class="n">idx_a</span><span class="p">]),</span>
-                     <span class="nb">len</span><span class="p">(</span><span class="n">final_loop_candidates</span><span class="p">)))</span>
-        <span class="c"># will return -1 if last gap removed</span>
-        <span class="k">return</span> <span class="n">ClearGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">actual_extended_gaps</span><span class="p">[</span><span class="n">idx_a</span><span class="p">])</span>
+    <span class="c"># db scores requested</span>
+    <span class="n">db_scores</span> <span class="o">=</span> <span class="n">ScoreContainer</span><span class="p">()</span>
+    <span class="k">for</span> <span class="n">actual_scores</span> <span class="ow">in</span> <span class="n">actual_db_scores</span><span class="p">:</span>
+        <span class="n">db_scores</span><span class="o">.</span><span class="n">Extend</span><span class="p">(</span><span class="n">actual_scores</span><span class="p">)</span>
+    
+    <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">final_loop_candidates</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
+        <span class="c"># get best</span>
+        <span class="n">min_idx</span><span class="p">,</span> <span class="n">min_score</span> <span class="o">=</span> <span class="n">_GetBestLC</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">final_loop_candidates</span><span class="p">,</span>
+                                        <span class="n">min_before_resnum</span><span class="p">,</span> <span class="n">actual_chain_idx</span><span class="p">,</span>
+                                        <span class="n">db_scores</span><span class="p">,</span> <span class="n">max_num_all_atom</span><span class="p">)</span>
+        <span class="n">ost</span><span class="o">.</span><span class="n">LogVerbose</span><span class="p">(</span><span class="s">&quot;Gap </span><span class="si">%s</span><span class="s"> - </span><span class="si">%d</span><span class="s"> candidates, best (min) score </span><span class="si">%g</span><span class="s">&quot;</span> <span class="o">%</span>
+                       <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">),</span> <span class="nb">len</span><span class="p">(</span><span class="n">final_loop_candidates</span><span class="p">),</span> <span class="n">min_score</span><span class="p">))</span>
+        <span class="c"># resolve loop</span>
+        <span class="n">idx_a</span> <span class="o">=</span> <span class="n">back_mapper</span><span class="p">[</span><span class="n">min_idx</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span>
+        <span class="n">idx_b</span> <span class="o">=</span> <span class="n">back_mapper</span><span class="p">[</span><span class="n">min_idx</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span>
+        <span class="n">_ResolveLogInfo</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_extended_gaps</span><span class="p">[</span><span class="n">idx_a</span><span class="p">],</span>
+                        <span class="nb">len</span><span class="p">(</span><span class="n">final_loop_candidates</span><span class="p">),</span> <span class="nb">bool</span><span class="p">(</span><span class="n">actual_db_scores</span><span class="p">),</span>
+                        <span class="n">max_num_all_atom</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span>
+        <span class="c"># update model and clear gaps</span>
+        <span class="n">bb_list</span> <span class="o">=</span> <span class="n">actual_candidates</span><span class="p">[</span><span class="n">idx_a</span><span class="p">][</span><span class="n">idx_b</span><span class="p">]</span>
+        <span class="n">actual_gap</span> <span class="o">=</span> <span class="n">actual_extended_gaps</span><span class="p">[</span><span class="n">idx_a</span><span class="p">]</span>
+        <span class="c"># will return -1 if last gap removed, else next gap idx</span>
+        <span class="k">return</span> <span class="n">InsertLoopClearGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">bb_list</span><span class="p">,</span> <span class="n">actual_gap</span><span class="p">)</span>
     <span class="k">else</span><span class="p">:</span>
         <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Failed at loop insertion (</span><span class="si">%s</span><span class="s">)&quot;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">))</span>
         <span class="k">return</span> <span class="o">-</span><span class="mi">2</span>
 
 
-<span class="k">def</span> <span class="nf">_CloseLoopBare</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span>
-                   <span class="n">actual_extended_gaps</span><span class="p">,</span> <span class="n">penalize_length</span><span class="o">=</span><span class="bp">True</span><span class="p">):</span>
+<span class="k">def</span> <span class="nf">_CloseLoopBare</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span> <span class="n">actual_extended_gaps</span><span class="p">,</span>
+                   <span class="n">actual_db_scores</span><span class="o">=</span><span class="p">[],</span> <span class="n">penalize_length</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span>
+                   <span class="n">max_num_all_atom</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Rank candidates directly.</span>
 <span class="sd">    All candidates are scored directly and optionally penalized for gap length.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
     <span class="c"># get chain for gap</span>
     <span class="n">actual_chain_idx</span> <span class="o">=</span> <span class="n">actual_extended_gaps</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">GetChainIndex</span><span class="p">()</span>
-    <span class="n">actual_chain</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">chains</span><span class="p">[</span><span class="n">actual_chain_idx</span><span class="p">]</span>
     
     <span class="c"># score loops as they are</span>
-    <span class="n">weights</span> <span class="o">=</span> <span class="n">_GetWeights</span><span class="p">()</span>
     <span class="n">min_score</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="s">&quot;inf&quot;</span><span class="p">)</span>
     <span class="n">optimal_gap</span> <span class="o">=</span> <span class="bp">None</span>
     <span class="n">optimal_candidate</span> <span class="o">=</span> <span class="bp">None</span>
     <span class="n">n_candidates</span> <span class="o">=</span> <span class="mi">0</span>
     <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">loop_candidates</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">actual_candidates</span><span class="p">):</span>
+        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">loop_candidates</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> <span class="k">continue</span>
         <span class="n">n_candidates</span> <span class="o">+=</span> <span class="nb">len</span><span class="p">(</span><span class="n">loop_candidates</span><span class="p">)</span>
-        <span class="c"># score them</span>
+        <span class="c"># get current best</span>
         <span class="n">before_resnum</span> <span class="o">=</span> <span class="n">actual_extended_gaps</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span>
-        <span class="n">loop_candidates</span><span class="o">.</span><span class="n">AttachScorer</span><span class="p">(</span><span class="n">scorer</span><span class="p">)</span>
-        <span class="n">loop_candidates</span><span class="o">.</span><span class="n">CalculateCombinedScores</span><span class="p">(</span><span class="n">weights</span><span class="p">,</span>
-                                                <span class="n">before_resnum</span><span class="p">,</span>
-                                                <span class="n">actual_chain_idx</span><span class="p">)</span>
-        <span class="c"># any good ones?</span>
-        <span class="n">gap_length</span> <span class="o">=</span> <span class="n">actual_extended_gaps</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">length</span>
-        <span class="k">for</span> <span class="n">loop_candidate</span> <span class="ow">in</span> <span class="n">loop_candidates</span><span class="p">:</span>
-            <span class="c"># penalized by gap length?</span>
-            <span class="k">if</span> <span class="n">penalize_length</span><span class="p">:</span>
-                <span class="n">score</span> <span class="o">=</span> <span class="n">loop_candidate</span><span class="o">.</span><span class="n">combined_score</span> <span class="o">*</span> <span class="n">gap_length</span>
-            <span class="k">else</span><span class="p">:</span>
-                <span class="n">score</span> <span class="o">=</span> <span class="n">loop_candidate</span><span class="o">.</span><span class="n">combined_score</span>
-            <span class="k">if</span> <span class="n">score</span> <span class="o">&lt;</span> <span class="n">min_score</span><span class="p">:</span>
-                <span class="n">optimal_gap</span> <span class="o">=</span> <span class="n">actual_extended_gaps</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
-                <span class="n">optimal_candidate</span> <span class="o">=</span> <span class="n">loop_candidate</span>
-                <span class="n">min_score</span> <span class="o">=</span> <span class="n">score</span>
+        <span class="n">db_scores</span> <span class="o">=</span> <span class="n">ScoreContainer</span><span class="p">()</span>
+        <span class="k">if</span> <span class="n">actual_db_scores</span><span class="p">:</span>
+            <span class="n">db_scores</span> <span class="o">=</span> <span class="n">actual_db_scores</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
+        <span class="n">best_idx</span><span class="p">,</span> <span class="n">score</span> <span class="o">=</span> <span class="n">_GetBestLC</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">loop_candidates</span><span class="p">,</span> <span class="n">before_resnum</span><span class="p">,</span>
+                                     <span class="n">actual_chain_idx</span><span class="p">,</span> <span class="n">db_scores</span><span class="p">,</span>
+                                     <span class="n">max_num_all_atom</span><span class="p">)</span>
+        <span class="c"># compare with others</span>
+        <span class="k">if</span> <span class="n">penalize_length</span><span class="p">:</span>
+            <span class="c"># penalized by gap length</span>
+            <span class="n">score</span> <span class="o">=</span> <span class="n">score</span> <span class="o">*</span> <span class="n">actual_extended_gaps</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">length</span>
+        <span class="k">if</span> <span class="n">score</span> <span class="o">&lt;</span> <span class="n">min_score</span><span class="p">:</span>
+            <span class="c"># keep best one</span>
+            <span class="n">min_score</span> <span class="o">=</span> <span class="n">score</span>
+            <span class="n">optimal_gap</span> <span class="o">=</span> <span class="n">actual_extended_gaps</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
+            <span class="n">optimal_candidate</span> <span class="o">=</span> <span class="n">loop_candidates</span><span class="p">[</span><span class="n">best_idx</span><span class="p">]</span>
 
     <span class="n">ost</span><span class="o">.</span><span class="n">LogVerbose</span><span class="p">(</span><span class="s">&quot;Gap </span><span class="si">%s</span><span class="s"> - </span><span class="si">%d</span><span class="s"> candidates, best (min) score </span><span class="si">%g</span><span class="s">&quot;</span> <span class="o">%</span>
                    <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">),</span> <span class="n">n_candidates</span><span class="p">,</span> <span class="n">min_score</span><span class="p">))</span>
 
     <span class="c"># finally resolve loop</span>
     <span class="k">if</span> <span class="n">optimal_candidate</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
-        <span class="c"># update model</span>
-        <span class="n">start_resnum</span> <span class="o">=</span> <span class="n">optimal_gap</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span>
-        <span class="n">bb_list</span> <span class="o">=</span> <span class="n">optimal_candidate</span><span class="o">.</span><span class="n">bb_list</span>
-        <span class="n">bb_list</span><span class="o">.</span><span class="n">InsertInto</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">chains</span><span class="p">[</span><span class="n">actual_chain_idx</span><span class="p">],</span> <span class="n">start_resnum</span><span class="p">)</span>
-        <span class="c"># update scorer</span>
-        <span class="n">scorer</span><span class="o">.</span><span class="n">SetEnvironment</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="n">start_resnum</span><span class="p">,</span> <span class="n">actual_chain_idx</span><span class="p">)</span>
-        <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Resolved </span><span class="si">%s</span><span class="s"> by filling </span><span class="si">%s</span><span class="s"> (</span><span class="si">%d</span><span class="s"> candidates)&quot;</span> <span class="o">%</span> \
-                    <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">),</span> <span class="nb">str</span><span class="p">(</span><span class="n">optimal_gap</span><span class="p">),</span> <span class="n">n_candidates</span><span class="p">))</span>
-        <span class="c"># will return -1 if last gap removed</span>
-        <span class="k">return</span> <span class="n">ClearGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">optimal_gap</span><span class="p">)</span>
+        <span class="c"># report</span>
+        <span class="n">_ResolveLogInfo</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">,</span> <span class="n">optimal_gap</span><span class="p">,</span> <span class="n">n_candidates</span><span class="p">,</span>
+                        <span class="nb">bool</span><span class="p">(</span><span class="n">actual_db_scores</span><span class="p">),</span> <span class="n">max_num_all_atom</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span>
+        <span class="c"># update model and clear gaps</span>
+        <span class="c"># will return -1 if last gap removed, else next gap idx</span>
+        <span class="k">return</span> <span class="n">InsertLoopClearGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">optimal_candidate</span><span class="p">,</span> <span class="n">optimal_gap</span><span class="p">)</span>
     <span class="k">else</span><span class="p">:</span>
         <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Failed at loop insertion (</span><span class="si">%s</span><span class="s">)&quot;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">))</span>
         <span class="k">return</span> <span class="o">-</span><span class="mi">2</span>
 
-<span class="k">def</span> <span class="nf">_CloseLoop</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span>
-               <span class="n">actual_extended_gaps</span><span class="p">,</span> <span class="n">variant</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
+<span class="k">def</span> <span class="nf">_CloseLoop</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span>
+               <span class="n">actual_extended_gaps</span><span class="p">,</span> <span class="n">variant</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">actual_db_scores</span><span class="o">=</span><span class="p">[],</span>
+               <span class="n">max_num_all_atom</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Choose best scoring loop candidate and close loop in mhandle.</span>
-<span class="sd">    :param scorer: scorer dedicated to this model</span>
 <span class="sd">    :param gap_orig: Gap we actually wanted to close</span>
 <span class="sd">    :param actual_candidates: List of LoopCandidates</span>
 <span class="sd">    :param actual_extended_gaps: List of gaps (same size as actual_candidates)</span>
-<span class="sd">    :param variant: 0 = _CloseLoopFrame</span>
+<span class="sd">    :param variant: 0 = _CloseLoopFrame()</span>
 <span class="sd">                    1 = _CloseLoopBare(penalize_length=False)</span>
 <span class="sd">                    2 = _CloseLoopBare(penalize_length=True)</span>
+<span class="sd">    :param actual_db_scores: List of DB scores (same size as actual_candidates)</span>
+<span class="sd">    :param max_num_all_atom: Num. of all atom LC to consider</span>
 <span class="sd">    :return: gap-index as returned by ClearGaps or -2 if fail.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="s">&#39;closegaps::_CloseLoop&#39;</span><span class="p">)</span>
     <span class="c"># check consistency</span>
     <span class="n">N</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">actual_extended_gaps</span><span class="p">)</span>
     <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">actual_candidates</span><span class="p">)</span> <span class="o">!=</span> <span class="n">N</span><span class="p">:</span>
@@ -257,35 +288,60 @@
         <span class="k">return</span> <span class="o">-</span><span class="mi">2</span>
     <span class="c"># choose variant</span>
     <span class="k">if</span> <span class="n">variant</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
-        <span class="k">return</span> <span class="n">_CloseLoopFrame</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span>
-                               <span class="n">actual_extended_gaps</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">_CloseLoopFrame</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span>
+                               <span class="n">actual_extended_gaps</span><span class="p">,</span> <span class="n">actual_db_scores</span><span class="p">,</span>
+                               <span class="n">max_num_all_atom</span><span class="p">)</span>
     <span class="k">elif</span> <span class="n">variant</span> <span class="ow">in</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">]:</span>
-        <span class="k">return</span> <span class="n">_CloseLoopBare</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span>
-                              <span class="n">actual_extended_gaps</span><span class="p">,</span> <span class="n">variant</span> <span class="o">==</span> <span class="mi">2</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">_CloseLoopBare</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span>
+                              <span class="n">actual_extended_gaps</span><span class="p">,</span> <span class="n">actual_db_scores</span><span class="p">,</span>
+                              <span class="n">variant</span> <span class="o">==</span> <span class="mi">2</span><span class="p">,</span> <span class="n">max_num_all_atom</span><span class="p">)</span>
     <span class="k">else</span><span class="p">:</span>
         <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s">&quot;Unknown variant </span><span class="si">%d</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">variant</span><span class="p">);</span>
 
-<span class="c">###############################################################################</span>
-
-<div class="viewcode-block" id="SetupBackboneScorer"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.SetupBackboneScorer">[docs]</a><span class="k">def</span> <span class="nf">SetupBackboneScorer</span><span class="p">(</span><span class="n">mhandle</span><span class="p">):</span>
-    <span class="sd">&#39;&#39;&#39;Get a scorer for medling with backbones.</span>
+<span class="k">def</span> <span class="nf">_InRange</span><span class="p">(</span><span class="n">gap</span><span class="p">,</span> <span class="n">chain_idx</span><span class="p">,</span> <span class="n">resnum_range</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Check if gap is in range to be processed.&#39;&#39;&#39;</span>
+    <span class="c"># It is possible to specify exact ranges that should be resolved by</span>
+    <span class="c"># the chain_idx and resnum_range parameters.</span>
+    <span class="c"># Let&#39;s check whether we care for that particular gap in case of one</span>
+    <span class="c"># parameter being set.</span>
+    <span class="k">if</span> <span class="n">chain_idx</span> <span class="o">!=</span> <span class="bp">None</span> <span class="ow">and</span> <span class="n">gap</span><span class="o">.</span><span class="n">GetChainIndex</span><span class="p">()</span> <span class="o">!=</span> <span class="n">chain_idx</span><span class="p">:</span>
+        <span class="k">return</span> <span class="bp">False</span>
+    <span class="k">elif</span> <span class="n">resnum_range</span> <span class="o">!=</span> <span class="bp">None</span><span class="p">:</span>
+        <span class="k">if</span> <span class="n">gap</span><span class="o">.</span><span class="n">IsNTerminal</span><span class="p">():</span>
+            <span class="n">c_stem_num</span> <span class="o">=</span> <span class="n">gap</span><span class="o">.</span><span class="n">after</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span>
+            <span class="k">return</span> <span class="n">c_stem_num</span> <span class="o">&gt;</span> <span class="n">resnum_range</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
+        <span class="k">if</span> <span class="n">gap</span><span class="o">.</span><span class="n">IsCTerminal</span><span class="p">():</span>
+            <span class="n">n_stem_num</span> <span class="o">=</span> <span class="n">gap</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span>
+            <span class="k">return</span> <span class="n">n_stem_num</span> <span class="o">&lt;</span> <span class="n">resnum_range</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
+        <span class="n">n_stem_num</span> <span class="o">=</span> <span class="n">gap</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span>
+        <span class="n">c_stem_num</span> <span class="o">=</span> <span class="n">gap</span><span class="o">.</span><span class="n">after</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span>
+        <span class="k">if</span> <span class="n">n_stem_num</span> <span class="o">&lt;=</span> <span class="n">resnum_range</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">and</span> <span class="n">c_stem_num</span> <span class="o">&gt;=</span> <span class="n">resnum_range</span><span class="p">[</span><span class="mi">1</span><span class="p">]:</span>
+            <span class="c"># full overlap =&gt; current gap is fully enclosing range</span>
+            <span class="k">return</span> <span class="bp">True</span>
+        <span class="k">elif</span> <span class="n">n_stem_num</span> <span class="o">&gt;=</span> <span class="n">resnum_range</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">and</span> <span class="n">n_stem_num</span> <span class="o">&lt;</span> <span class="n">resnum_range</span><span class="p">[</span><span class="mi">1</span><span class="p">]:</span>
+            <span class="c"># partial overlap =&gt; n-stem is within range</span>
+            <span class="k">return</span> <span class="bp">True</span>
+        <span class="k">elif</span> <span class="n">c_stem_num</span> <span class="o">&gt;</span> <span class="n">resnum_range</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">and</span> <span class="n">c_stem_num</span> <span class="o">&lt;=</span> <span class="n">resnum_range</span><span class="p">[</span><span class="mi">1</span><span class="p">]:</span>
+            <span class="c"># partial overlap =&gt; c-stem is within range</span>
+            <span class="k">return</span> <span class="bp">True</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="k">return</span> <span class="bp">False</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="k">return</span> <span class="bp">True</span>
 
-<span class="sd">    This one is already tailored towards a certain modelling job.</span>
+<span class="k">def</span> <span class="nf">_GetMCWeights</span><span class="p">():</span>
+    <span class="c"># get weights for Monte Carlo sampling (BB only)</span>
+    <span class="k">return</span> <span class="p">{</span><span class="s">&quot;reduced&quot;</span><span class="p">:</span> <span class="mf">3.0</span><span class="p">,</span>
+            <span class="s">&quot;cb_packing&quot;</span><span class="p">:</span> <span class="mf">2.0</span><span class="p">,</span>
+            <span class="s">&quot;hbond&quot;</span><span class="p">:</span> <span class="mf">1.0</span><span class="p">,</span>
+            <span class="s">&quot;clash&quot;</span><span class="p">:</span> <span class="mf">0.05</span><span class="p">}</span>
 
-<span class="sd">    :param mhandle: The modelling handle this scorer should be dedicated to.</span>
-<span class="sd">    :type mhandle: :class:`~promod3.modelling.ModellingHandle`</span>
+<span class="c">###############################################################################</span>
 
-<span class="sd">    :return: A scorer instance.</span>
-<span class="sd">    :rtype: :class:`~promod3.loop.BackboneLoopScorer`</span>
-<span class="sd">    &#39;&#39;&#39;</span>
-    <span class="n">scorer</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadBackboneLoopScorer</span><span class="p">()</span>
-    <span class="n">scorer</span><span class="o">.</span><span class="n">Initialize</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">seqres</span><span class="p">)</span>
-    <span class="n">scorer</span><span class="o">.</span><span class="n">SetEnvironment</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">)</span>
-    <span class="k">return</span> <span class="n">scorer</span>
-</div>
-<div class="viewcode-block" id="CloseSmallDeletions"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.CloseSmallDeletions">[docs]</a><span class="k">def</span> <span class="nf">CloseSmallDeletions</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">max_extension</span><span class="o">=</span><span class="mi">9</span><span class="p">,</span> <span class="n">clash_thresh</span><span class="o">=</span><span class="mf">1.0</span><span class="p">,</span>
+<div class="viewcode-block" id="CloseSmallDeletions"><a class="viewcode-back" href="../../../modelling/pipeline.html#promod3.modelling.CloseSmallDeletions">[docs]</a><span class="k">def</span> <span class="nf">CloseSmallDeletions</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">max_extension</span><span class="o">=</span><span class="mi">9</span><span class="p">,</span> <span class="n">clash_thresh</span><span class="o">=</span><span class="mf">1.0</span><span class="p">,</span>
                         <span class="n">e_thresh</span><span class="o">=</span><span class="mi">200</span><span class="p">,</span> <span class="n">use_scoring_extender</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span>
-                        <span class="n">use_full_extender</span><span class="o">=</span><span class="bp">True</span><span class="p">):</span>
+                        <span class="n">use_full_extender</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">chain_idx</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
+                        <span class="n">resnum_range</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">ff_lookup</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Close small deletions by relaxing neighbouring residues.</span>
 
 <span class="sd">    Small deletions in the template from the target-template alignment have a</span>
@@ -301,16 +357,12 @@
 <span class="sd">    :param mhandle: Modelling handle on which to apply change.</span>
 <span class="sd">    :type mhandle:  :class:`ModellingHandle`</span>
 
-<span class="sd">    :param scorer: A scorer dedicated to this model.</span>
-<span class="sd">                   If gaps are closed, the *scorer* is updated.</span>
-<span class="sd">    :type scorer: :class:`~promod3.loop.BackboneLoopScorer`</span>
-
 <span class="sd">    :param max_extension: Maximal number of gap extension steps to perform</span>
 <span class="sd">                          (see :class:`GapExtender`)</span>
 <span class="sd">    :type max_extension: :class:`int`</span>
 
-<span class="sd">    :param clash_thresh: Threshold for the clash score, acceptance means being</span>
-<span class="sd">                         lower than this.</span>
+<span class="sd">    :param clash_thresh: Threshold for the backbone clash score. Acceptance</span>
+<span class="sd">                         means being lower than this.</span>
 <span class="sd">    :type clash_thresh: :class:`float`</span>
 
 <span class="sd">    :param e_thresh: Potential energy should be lower than this.</span>
@@ -332,31 +384,59 @@
 <span class="sd">                              extender to skip neighboring gaps and to correctly</span>
 <span class="sd">                              handle gaps close to termini.</span>
 <span class="sd">    :type use_full_extender:  :class:`bool`</span>
+
+<span class="sd">    :param chain_idx: If not None, only gaps from chain with given index get</span>
+<span class="sd">                      processed</span>
+<span class="sd">    :type chain_idx:  :class:`int`</span>
+
+<span class="sd">    :param resnum_range: If not None, only gaps within this resnum range get</span>
+<span class="sd">                         processed.</span>
+<span class="sd">    :type resnum_range: :class:`tuple` containing two :class:`int`</span>
+
+<span class="sd">    :param ff_lookup: Forcefield to parametrize </span>
+<span class="sd">                      :class:`promod3.loop.BackboneList` in </span>
+<span class="sd">                      :class:`promod3.modelling.BackboneRelaxer`.</span>
+<span class="sd">                      If set to None, the one returned by</span>
+<span class="sd">                      :func:`promod3.loop.ForcefieldLookup.GetDefault` </span>
+<span class="sd">                      gets used.</span>
+<span class="sd">    :type ff_lookup:  :class:`promod3.loop.ForcefieldLookup`</span>
 <span class="sd">    &#39;&#39;&#39;</span>
 
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;closegaps::CloseSmallDeletions&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
+
     <span class="k">if</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="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-        <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Trying to close small deletions (no. of gap(s): </span><span class="si">%d</span><span class="s">).&quot;</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">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Trying to close small deletions (no. of gap(s): </span><span class="si">%d</span><span class="s">).&quot;</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="k">else</span><span class="p">:</span>
         <span class="k">return</span>
 
-    <span class="n">current_gap_index</span> <span class="o">=</span> <span class="mi">0</span>
+    <span class="c"># check/setup scoring</span>
+    <span class="k">if</span> <span class="ow">not</span> <span class="n">IsBackboneScoringSetUp</span><span class="p">(</span><span class="n">mhandle</span><span class="p">):</span>
+        <span class="n">SetupDefaultBackboneScoring</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span>
+    <span class="n">clash_scorer</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">backbone_scorer</span><span class="o">.</span><span class="n">Get</span><span class="p">(</span><span class="s">&quot;clash&quot;</span><span class="p">)</span>
+
+    <span class="k">if</span> <span class="n">ff_lookup</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
+        <span class="n">ff_lookup</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">ForcefieldLookup</span><span class="o">.</span><span class="n">GetDefault</span><span class="p">()</span>
 
     <span class="c"># iterating mhandle.gaps. The number of gaps may change during the process,</span>
     <span class="c"># hence we run by &#39;while&#39;, comparing to the updated list of gaps. If a gap</span>
     <span class="c"># gets closed, it is deleted from mhandle.gaps, otherwise, current_gap_index</span>
     <span class="c"># as a counter is increased.</span>
+    <span class="n">current_gap_index</span> <span class="o">=</span> <span class="mi">0</span>
     <span class="k">while</span> <span class="n">current_gap_index</span> <span class="o">&lt;</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="c"># in the end this determines if a gap was closed or not</span>
         <span class="n">success</span> <span class="o">=</span> <span class="bp">False</span>
+        <span class="c"># work on a copy of the gap, if not closed in the end, no harm done</span>
+        <span class="n">current_gap</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">[</span><span class="n">current_gap_index</span><span class="p">]</span><span class="o">.</span><span class="n">Copy</span><span class="p">()</span>
 
         <span class="c"># A deletion is a gap of size 0 in the template, this means that to</span>
         <span class="c"># transform the template sequence into the target sequence, aa&#39;s vanish,</span>
         <span class="c"># so the target sequence has gap characters, the template not.</span>
         <span class="c"># If we are not looking at a deletion, do nothing.</span>
-        <span class="k">if</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">current_gap_index</span><span class="p">]</span><span class="o">.</span><span class="n">seq</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
-            <span class="c"># work on a copy of the gap, if not closed in the end, no harm done</span>
-            <span class="n">current_gap</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">[</span><span class="n">current_gap_index</span><span class="p">]</span><span class="o">.</span><span class="n">Copy</span><span class="p">()</span>
+        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">current_gap</span><span class="o">.</span><span class="n">seq</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">current_gap</span><span class="o">.</span><span class="n">IsTerminal</span><span class="p">()</span>\
+           <span class="ow">and</span> <span class="n">_InRange</span><span class="p">(</span><span class="n">current_gap</span><span class="p">,</span> <span class="n">chain_idx</span><span class="p">,</span> <span class="n">resnum_range</span><span class="p">):</span>
+            
             <span class="n">current_chain</span> <span class="o">=</span> <span class="n">current_gap</span><span class="o">.</span><span class="n">GetChain</span><span class="p">()</span>
             <span class="n">current_chain_index</span> <span class="o">=</span> <span class="n">current_gap</span><span class="o">.</span><span class="n">GetChainIndex</span><span class="p">()</span>
 
@@ -390,26 +470,22 @@
                 <span class="c"># backbone relaxation, for now we allow 300 steps or stop at</span>
                 <span class="c"># max. force of 0.1</span>
                 <span class="n">bb_list</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">BackboneList</span><span class="p">(</span><span class="n">current_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">,</span> <span class="n">res_list</span><span class="p">)</span>
-                <span class="n">bb_relaxer</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">BackboneRelaxer</span><span class="p">(</span><span class="n">bb_list</span><span class="p">)</span>
+                <span class="n">bb_relaxer</span> <span class="o">=</span> <span class="n">BackboneRelaxer</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="n">ff_lookup</span><span class="p">)</span>
                 <span class="n">potential_e</span> <span class="o">=</span> <span class="n">bb_relaxer</span><span class="o">.</span><span class="n">Run</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="mi">300</span><span class="p">,</span> <span class="mf">0.1</span><span class="p">)</span>
                 <span class="c"># check for clashes</span>
-                <span class="n">score</span> <span class="o">=</span> <span class="n">scorer</span><span class="o">.</span><span class="n">CalculateClashScore</span><span class="p">(</span>\
-                                        <span class="n">bb_list</span><span class="p">,</span>
-                                        <span class="n">n_stem_resnum</span><span class="o">.</span><span class="n">GetNum</span><span class="p">(),</span>
-                                        <span class="n">current_chain_index</span><span class="p">)</span>
+                <span class="n">score</span> <span class="o">=</span> <span class="n">clash_scorer</span><span class="o">.</span><span class="n">CalculateScore</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span>
+                                                    <span class="n">n_stem_resnum</span><span class="o">.</span><span class="n">GetNum</span><span class="p">(),</span>
+                                                    <span class="n">current_chain_index</span><span class="p">)</span>
+
                 <span class="c"># if there is no clash and potential energy is low enough we</span>
                 <span class="c"># just solved a gap, delete it and update the scorer for the</span>
                 <span class="c"># changed model</span>
                 <span class="k">if</span> <span class="n">score</span> <span class="o">&lt;</span> <span class="n">clash_thresh</span> <span class="ow">and</span> \
                    <span class="n">potential_e</span> <span class="o">&lt;</span> <span class="n">e_thresh</span> <span class="ow">and</span> \
-                   <span class="n">scorer</span><span class="o">.</span><span class="n">TransOmegaTorsions</span><span class="p">(</span><span class="n">bb_list</span><span class="p">):</span>
+                   <span class="n">bb_list</span><span class="o">.</span><span class="n">TransOmegaTorsions</span><span class="p">():</span>
                     <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Closed: </span><span class="si">%s</span><span class="s"> by relaxing </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</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">current_gap_index</span><span class="p">],</span> <span class="n">current_gap</span><span class="p">))</span>
-                    <span class="n">chain</span> <span class="o">=</span> <span class="n">current_gap</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">GetChain</span><span class="p">()</span>
-                    <span class="n">bb_list</span><span class="o">.</span><span class="n">InsertInto</span><span class="p">(</span><span class="n">chain</span><span class="p">,</span> <span class="n">n_stem_resnum</span><span class="p">)</span>
-                    <span class="n">scorer</span><span class="o">.</span><span class="n">SetEnvironment</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="n">n_stem_resnum</span><span class="p">,</span>
-                                          <span class="n">current_chain_index</span><span class="p">)</span>
-                    <span class="n">ClearGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">current_gap</span><span class="p">)</span>
+                    <span class="n">InsertLoopClearGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">bb_list</span><span class="p">,</span> <span class="n">current_gap</span><span class="p">)</span>
                     <span class="n">success</span> <span class="o">=</span> <span class="bp">True</span>
                     <span class="k">break</span>
 
@@ -419,7 +495,8 @@
         <span class="k">if</span> <span class="ow">not</span> <span class="n">success</span><span class="p">:</span>
             <span class="n">current_gap_index</span> <span class="o">+=</span> <span class="mi">1</span>
 </div>
-<div class="viewcode-block" id="MergeGapsByDistance"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.MergeGapsByDistance">[docs]</a><span class="k">def</span> <span class="nf">MergeGapsByDistance</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">distance</span><span class="p">):</span>
+<div class="viewcode-block" id="MergeGapsByDistance"><a class="viewcode-back" href="../../../modelling/pipeline.html#promod3.modelling.MergeGapsByDistance">[docs]</a><span class="k">def</span> <span class="nf">MergeGapsByDistance</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">distance</span><span class="p">,</span> <span class="n">chain_idx</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span> 
+                        <span class="n">resnum_range</span> <span class="o">=</span> <span class="bp">None</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Merge 2 neighbouring gaps by deleting residues in-between.</span>
 
 <span class="sd">    Check if two neighbouring gaps are at max. *distance* residues apart from</span>
@@ -437,8 +514,19 @@
 <span class="sd">    :param distance: The max. no. of residues between two gaps up to which</span>
 <span class="sd">                     merge happens.</span>
 <span class="sd">    :type distance: :class:`int`</span>
+
+<span class="sd">    :param chain_idx: If not None, only gaps from chain with given index get</span>
+<span class="sd">                      processed</span>
+<span class="sd">    :type chain_idx:  :class:`int`</span>
+
+<span class="sd">    :param resnum_range: If not None, two gaps only get merged if they&#39;re</span>
+<span class="sd">                         both in this resnum range.</span>
+<span class="sd">    :type resnum_range: :class:`tuple` containing two :class:`int`</span>
 <span class="sd">    &#39;&#39;&#39;</span>
 
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;closegaps::MergeGapsByDistance&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
+
     <span class="k">if</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="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
         <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Trying to merge </span><span class="si">%d</span><span class="s"> gap(s) with distance </span><span class="si">%d</span><span class="s">.&quot;</span> <span class="o">%</span> \
                        <span class="p">(</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">distance</span><span class="p">))</span>
@@ -461,13 +549,19 @@
             <span class="c"># check that we are on the same chain</span>
             <span class="k">if</span> <span class="n">current_gap</span><span class="o">.</span><span class="n">GetChain</span><span class="p">()</span> <span class="o">!=</span> <span class="n">next_gap</span><span class="o">.</span><span class="n">GetChain</span><span class="p">():</span>
                 <span class="k">continue</span>
+            <span class="c"># check for range (if given)</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">_InRange</span><span class="p">(</span><span class="n">current_gap</span><span class="p">,</span> <span class="n">chain_idx</span><span class="p">,</span> <span class="n">resnum_range</span><span class="p">)</span> <span class="ow">and</span>\
+                    <span class="n">_InRange</span><span class="p">(</span><span class="n">next_gap</span><span class="p">,</span> <span class="n">chain_idx</span><span class="p">,</span> <span class="n">resnum_range</span><span class="p">)):</span>
+                <span class="k">continue</span>
             <span class="c"># no merging of gaps at the end AND the start :)</span>
             <span class="k">if</span> <span class="n">current_gap</span><span class="o">.</span><span class="n">IsNTerminal</span><span class="p">()</span> <span class="ow">and</span> <span class="n">next_gap</span><span class="o">.</span><span class="n">IsCTerminal</span><span class="p">():</span>
                 <span class="k">continue</span>
             <span class="c"># get the distance between the gaps</span>
             <span class="n">dist</span> <span class="o">=</span> <span class="n">next_gap</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span> \
                    <span class="o">-</span> <span class="n">current_gap</span><span class="o">.</span><span class="n">after</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span>
-            <span class="k">if</span> <span class="n">dist</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">:</span>
+            <span class="c"># NOTE: -1 can currently only happen when fixing ring punches</span>
+            <span class="c">#       in _pipeline.BuildSidechains</span>
+            <span class="k">if</span> <span class="n">dist</span> <span class="o">&lt;</span> <span class="o">-</span><span class="mi">1</span><span class="p">:</span>
                 <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Non-sequential gaps found. Ignoring.&quot;</span><span class="p">)</span>
                 <span class="k">continue</span>
             <span class="k">if</span> <span class="n">dist</span> <span class="o">&lt;=</span> <span class="n">distance</span><span class="p">:</span>
@@ -478,12 +572,14 @@
                 <span class="n">try_again</span> <span class="o">=</span> <span class="bp">True</span>
                 <span class="k">break</span>
 </div>
-<div class="viewcode-block" id="FillLoopsByDatabase"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.FillLoopsByDatabase">[docs]</a><span class="k">def</span> <span class="nf">FillLoopsByDatabase</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</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>
+<div class="viewcode-block" id="FillLoopsByDatabase"><a class="viewcode-back" href="../../../modelling/pipeline.html#promod3.modelling.FillLoopsByDatabase">[docs]</a><span class="k">def</span> <span class="nf">FillLoopsByDatabase</span><span class="p">(</span><span class="n">mhandle</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="n">max_loops_to_search</span><span class="o">=</span><span class="mi">40</span><span class="p">,</span>
                         <span class="n">min_loops_required</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">max_res_extension</span><span class="o">=-</span><span class="mi">1</span><span class="p">,</span>
                         <span class="n">extended_search</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">use_scoring_extender</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span>
                         <span class="n">use_full_extender</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">score_variant</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>
-                        <span class="n">ring_punch_detection</span><span class="o">=</span><span class="mi">1</span><span class="p">):</span>
+                        <span class="n">ring_punch_detection</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">chain_idx</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
+                        <span class="n">resnum_range</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">max_num_all_atom</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>
+                        <span class="n">clash_thresh</span><span class="o">=-</span><span class="mi">1</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Try to fill up loops from a structural database.</span>
 
 <span class="sd">    Usually this will extend the gaps a bit to match candidates from the</span>
@@ -496,14 +592,10 @@
 <span class="sd">    :param mhandle: Modelling handle on which to apply change.</span>
 <span class="sd">    :type mhandle:  :class:`ModellingHandle`</span>
 
-<span class="sd">    :param scorer: A scorer dedicated to this model.</span>
-<span class="sd">                   If gaps are closed, the *scorer* is updated.</span>
-<span class="sd">    :type scorer: :class:`~promod3.loop.BackboneLoopScorer`</span>
-
 <span class="sd">    :param fragment_db: A fragment database coupled to the *structure_db*.</span>
 <span class="sd">    :type fragment_db: :class:`~promod3.loop.FragDB`</span>
 
-<span class="sd">    :param structure_db: Backbone/ profile data.</span>
+<span class="sd">    :param structure_db: Backbone/profile data.</span>
 <span class="sd">    :type structure_db: :class:`~promod3.loop.StructureDB`</span>
 
 <span class="sd">    :param torsion_sampler: A sampler for torsion angles.</span>
@@ -531,7 +623,7 @@
 
 <span class="sd">    :param extended_search: True = more loop candidates are considered.</span>
 <span class="sd">                            The candidate search is done less precisely (see</span>
-<span class="sd">                            :meth:`~promod3.loop.LoopCandidates.FillFromDatabase`).</span>
+<span class="sd">                            :meth:`~LoopCandidates.FillFromDatabase`).</span>
 <span class="sd">                            The candidates are still scored and evaluated the</span>
 <span class="sd">                            same though (only more of them considered).</span>
 <span class="sd">    :type extended_search:  :class:`bool`</span>
@@ -564,13 +656,48 @@
 <span class="sd">                                 - **2**: check incl. sidechain for loop cand.</span>
 
 <span class="sd">    :type ring_punch_detection:  :class:`int`</span>
+
+<span class="sd">    :param chain_idx: If not None, only gaps from chain with given index get</span>
+<span class="sd">                      processed</span>
+<span class="sd">    :type chain_idx:  :class:`int`</span>
+
+<span class="sd">    :param resnum_range: If not None, only gaps within this resnum range get</span>
+<span class="sd">                         processed</span>
+<span class="sd">    :type resnum_range: :class:`tuple` containing two :class:`int`</span>
+
+<span class="sd">    :param max_num_all_atom: If &gt; 0, we prefilter loop candidates based on</span>
+<span class="sd">                             non-all-atom-scores and apply all atom scoring to</span>
+<span class="sd">                             the best *max_num_all_atom* candidates. If desired,</span>
+<span class="sd">                             *5* is a good value here (larger values give only</span>
+<span class="sd">                             numerical improvement). With *5*, this will be</span>
+<span class="sd">                             approx. 2x slower than without and will give a</span>
+<span class="sd">                             slight improvement in loop selection.</span>
+<span class="sd">    :type max_num_all_atom:  :class:`int`</span>
+
+<span class="sd">    :param clash_thresh: If &gt; 0, we only keep loop candidates which have a</span>
+<span class="sd">                         backbone clash score lower than this.</span>
+<span class="sd">    :type clash_thresh:  :class:`float`</span>
 <span class="sd">    &#39;&#39;&#39;</span>
 
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;closegaps::FillLoopsByDatabase&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
+
     <span class="k">if</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="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
         <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Trying to fill </span><span class="si">%d</span><span class="s"> gap(s) by database.&quot;</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="k">else</span><span class="p">:</span>
         <span class="k">return</span>
 
+    <span class="c"># check/setup scoring</span>
+    <span class="k">if</span> <span class="ow">not</span> <span class="n">IsBackboneScoringSetUp</span><span class="p">(</span><span class="n">mhandle</span><span class="p">):</span>
+        <span class="n">SetupDefaultBackboneScoring</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span>
+    <span class="k">if</span> <span class="n">max_num_all_atom</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">IsAllAtomScoringSetUp</span><span class="p">(</span><span class="n">mhandle</span><span class="p">):</span>
+        <span class="n">SetupDefaultAllAtomScoring</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span>
+
+    <span class="c"># some score variants cannot deal with multiple insertions in one &quot;gap&quot;</span>
+    <span class="n">disallow_ins_merge</span> <span class="o">=</span> <span class="p">(</span><span class="n">score_variant</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+    <span class="c"># do we want DB features?</span>
+    <span class="n">add_db_features</span> <span class="o">=</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">profiles</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span>
+
     <span class="c"># check min_loops_required</span>
     <span class="k">if</span> <span class="n">min_loops_required</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">:</span>
         <span class="n">min_loops_required</span> <span class="o">=</span> <span class="n">max_loops_to_search</span>
@@ -584,14 +711,15 @@
     <span class="c"># an updated list. gap_idx is only increased when necessary, e.g. current</span>
     <span class="c"># gap could not be removed.</span>
     <span class="k">while</span> <span class="n">gap_idx</span> <span class="o">&lt;</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="ow">and</span> <span class="n">gap_idx</span> <span class="o">&gt;=</span> <span class="mi">0</span><span class="p">:</span>
-        
+
         <span class="c"># keep copy of original gap</span>
         <span class="n">gap_orig</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">[</span><span class="n">gap_idx</span><span class="p">]</span><span class="o">.</span><span class="n">Copy</span><span class="p">()</span>
-        <span class="k">if</span> <span class="n">score_variant</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
+        <span class="k">if</span> <span class="n">disallow_ins_merge</span><span class="p">:</span>
             <span class="n">gap_ins</span> <span class="o">=</span> <span class="n">CountEnclosedInsertions</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">)</span>
 
-        <span class="c"># terminal gaps are no loops, database needs 2 stems to work on</span>
-        <span class="k">if</span> <span class="n">gap_orig</span><span class="o">.</span><span class="n">IsTerminal</span><span class="p">():</span>
+        <span class="c"># ignore terminal gaps and out-of-range (if range given)</span>
+        <span class="k">if</span> <span class="n">gap_orig</span><span class="o">.</span><span class="n">IsTerminal</span><span class="p">()</span> \
+           <span class="ow">or</span> <span class="ow">not</span> <span class="n">_InRange</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">,</span> <span class="n">chain_idx</span><span class="p">,</span> <span class="n">resnum_range</span><span class="p">):</span>
             <span class="n">gap_idx</span> <span class="o">+=</span> <span class="mi">1</span>
             <span class="k">continue</span>
 
@@ -602,6 +730,9 @@
         <span class="n">actual_candidates</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
         <span class="c"># list of StructuralGap corresponding to actual_candidates</span>
         <span class="n">actual_extended_gaps</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+        <span class="c"># list of dicts with DB specific scores</span>
+        <span class="c"># -&gt; empty if not add_db_features</span>
+        <span class="n">actual_db_scores</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
         <span class="c"># number of loops found (stop if &gt;= max_loops_to_search)</span>
         <span class="n">found_loops</span> <span class="o">=</span> <span class="mi">0</span>
         <span class="c"># maximal length for this gap</span>
@@ -617,50 +748,96 @@
                                           <span class="n">use_full_extender</span><span class="p">,</span>
                                           <span class="n">max_gap_length</span><span class="p">)</span>
         <span class="c"># iteratively extend actual_gap until we have enough loops</span>
+        <span class="n">first_iteration</span> <span class="o">=</span> <span class="bp">True</span>
         <span class="k">while</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">length</span> <span class="o">&lt;=</span> <span class="n">max_gap_length</span><span class="p">:</span>
             <span class="c"># check if we have enough</span>
             <span class="k">if</span> <span class="n">found_loops</span> <span class="o">&gt;=</span> <span class="n">max_loops_to_search</span><span class="p">:</span>
                 <span class="k">break</span>
+
             <span class="c"># extend the gap</span>
-            <span class="k">if</span> <span class="ow">not</span> <span class="n">actual_extender</span><span class="o">.</span><span class="n">Extend</span><span class="p">():</span>
-                <span class="k">break</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="n">first_iteration</span><span class="p">:</span>
+                <span class="k">if</span> <span class="ow">not</span> <span class="n">actual_extender</span><span class="o">.</span><span class="n">Extend</span><span class="p">():</span>
+                    <span class="k">break</span>
+            <span class="n">first_iteration</span> <span class="o">=</span> <span class="bp">False</span>
+
             <span class="c"># ensure both stems are valid</span>
-            <span class="k">if</span> <span class="ow">not</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">or</span> \
-               <span class="ow">not</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">after</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
+            <span class="n">n_stem</span> <span class="o">=</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">before</span>
+            <span class="n">c_stem</span> <span class="o">=</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">after</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="n">n_stem</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">c_stem</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
                 <span class="k">break</span>
-            <span class="c"># skip if we try to merge insertions with score_variant=0</span>
-            <span class="k">if</span> <span class="n">score_variant</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">and</span> \
+            <span class="c"># skip if we try to merge insertions when disallowed</span>
+            <span class="k">if</span> <span class="n">disallow_ins_merge</span> <span class="ow">and</span> \
                <span class="n">CountEnclosedInsertions</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">actual_gap</span><span class="p">)</span> <span class="o">!=</span> <span class="n">gap_ins</span><span class="p">:</span>
                 <span class="k">continue</span>
 
             <span class="c"># get candidates for the current loop</span>
-            <span class="n">candidates</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoopCandidates</span><span class="o">.</span><span class="n">FillFromDatabase</span><span class="p">(</span>
-                <span class="n">actual_gap</span><span class="o">.</span><span class="n">before</span><span class="p">,</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">after</span><span class="p">,</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">,</span>
+            <span class="n">candidates</span> <span class="o">=</span> <span class="n">LoopCandidates</span><span class="o">.</span><span class="n">FillFromDatabase</span><span class="p">(</span>
+                <span class="n">n_stem</span><span class="p">,</span> <span class="n">c_stem</span><span class="p">,</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</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">extended_search</span><span class="p">)</span>
 
             <span class="c"># skip gaps with no loop candidates</span>
             <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">candidates</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
                 <span class="k">continue</span>
+            <span class="c"># check for stem rmsd before ApplyCCD</span>
+            <span class="k">if</span> <span class="n">add_db_features</span><span class="p">:</span>
+                <span class="n">db_scores</span> <span class="o">=</span> <span class="n">ScoreContainer</span><span class="p">()</span>
+                <span class="n">candidates</span><span class="o">.</span><span class="n">CalculateStemRMSDs</span><span class="p">(</span><span class="n">db_scores</span><span class="p">,</span> <span class="n">n_stem</span><span class="p">,</span> <span class="n">c_stem</span><span class="p">)</span>
             <span class="c"># try to close loops</span>
             <span class="k">try</span><span class="p">:</span>
                 <span class="c">#pylint: disable=broad-except</span>
-                <span class="n">candidates</span><span class="o">.</span><span class="n">ApplyCCD</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">before</span><span class="p">,</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">after</span><span class="p">,</span>
-                                    <span class="n">torsion_sampler</span><span class="p">)</span>
+                <span class="n">orig_indices</span> <span class="o">=</span> <span class="n">candidates</span><span class="o">.</span><span class="n">ApplyCCD</span><span class="p">(</span><span class="n">n_stem</span><span class="p">,</span> <span class="n">c_stem</span><span class="p">,</span>
+                                                   <span class="n">torsion_sampler</span><span class="p">)</span>
+                
             <span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
                 <span class="c"># CCD should work even if no residues exist before and/or after</span>
                 <span class="c"># the stems. If this is not desired, you should skip those gaps.</span>
                 <span class="c"># If anything else fails, the proposed gap is skipped.</span>
                 <span class="n">ost</span><span class="o">.</span><span class="n">LogWarning</span><span class="p">(</span><span class="s">&quot;ApplyCCD failure for &quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">actual_gap</span><span class="p">))</span>
                 <span class="k">continue</span>
+
+            <span class="c"># remove clashing ones if desired</span>
+            <span class="k">if</span> <span class="n">clash_thresh</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
+                <span class="n">scorer</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">backbone_scorer</span><span class="o">.</span><span class="n">Get</span><span class="p">(</span><span class="s">&quot;clash&quot;</span><span class="p">)</span>
+                <span class="n">to_keep</span> <span class="o">=</span> <span class="p">[]</span>
+                <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">bb_list</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">candidates</span><span class="p">):</span>
+                    <span class="n">score</span> <span class="o">=</span> <span class="n">scorer</span><span class="o">.</span><span class="n">CalculateScore</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span>
+                                                  <span class="n">n_stem</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">(),</span>
+                                                  <span class="n">actual_gap</span><span class="o">.</span><span class="n">GetChainIndex</span><span class="p">())</span>
+                    <span class="k">if</span> <span class="n">score</span> <span class="o">&lt;</span> <span class="n">clash_thresh</span><span class="p">:</span>
+                        <span class="n">to_keep</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
+                <span class="n">candidates</span> <span class="o">=</span> <span class="n">candidates</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">to_keep</span><span class="p">)</span>
+                <span class="n">orig_indices</span> <span class="o">=</span> <span class="p">[</span><span class="n">orig_indices</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">to_keep</span><span class="p">]</span>
+                <span class="k">assert</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">orig_indices</span><span class="p">)</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">candidates</span><span class="p">))</span>
+
             <span class="c"># check for ring punchings</span>
             <span class="k">if</span> <span class="n">ring_punch_detection</span> <span class="o">==</span> <span class="mi">1</span> <span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">candidates</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-                <span class="n">FilterCandidates</span><span class="p">(</span><span class="n">candidates</span><span class="p">,</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="n">actual_gap</span><span class="p">)</span>
+                <span class="n">FilterCandidates</span><span class="p">(</span><span class="n">candidates</span><span class="p">,</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span>
+                                 <span class="n">actual_gap</span><span class="p">,</span> <span class="n">orig_indices</span><span class="p">)</span>
             <span class="k">elif</span> <span class="n">ring_punch_detection</span> <span class="o">==</span> <span class="mi">2</span> <span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">candidates</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-                <span class="n">FilterCandidatesWithSC</span><span class="p">(</span><span class="n">candidates</span><span class="p">,</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="n">actual_gap</span><span class="p">)</span>
+                <span class="n">FilterCandidatesWithSC</span><span class="p">(</span><span class="n">candidates</span><span class="p">,</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span>
+                                       <span class="n">actual_gap</span><span class="p">,</span> <span class="n">orig_indices</span><span class="p">)</span>
+            
             <span class="c"># skip if no loop was successfully closed</span>
             <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">candidates</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
                 <span class="k">continue</span>
 
+            <span class="c"># deal with DB features</span>
+            <span class="k">if</span> <span class="n">add_db_features</span><span class="p">:</span>
+                <span class="c"># get subset of stem rmsd scores</span>
+                <span class="k">assert</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">orig_indices</span><span class="p">)</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">candidates</span><span class="p">))</span>
+                <span class="n">db_scores</span> <span class="o">=</span> <span class="n">db_scores</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">orig_indices</span><span class="p">)</span>
+                <span class="c"># add profile scores</span>
+                <span class="n">prof</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">profiles</span><span class="p">[</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">GetChainIndex</span><span class="p">()]</span>
+                <span class="n">start_pos</span> <span class="o">=</span> <span class="n">n_stem</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span> <span class="o">-</span> <span class="mi">1</span>
+                <span class="n">candidates</span><span class="o">.</span><span class="n">CalculateSequenceProfileScores</span><span class="p">(</span><span class="n">db_scores</span><span class="p">,</span>
+                                                          <span class="n">structure_db</span><span class="p">,</span>
+                                                          <span class="n">prof</span><span class="p">,</span> <span class="n">start_pos</span><span class="p">)</span>
+                <span class="n">candidates</span><span class="o">.</span><span class="n">CalculateStructureProfileScores</span><span class="p">(</span><span class="n">db_scores</span><span class="p">,</span>
+                                                           <span class="n">structure_db</span><span class="p">,</span>
+                                                           <span class="n">prof</span><span class="p">,</span> <span class="n">start_pos</span><span class="p">)</span>
+                <span class="c"># update list</span>
+                <span class="n">actual_db_scores</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">db_scores</span><span class="p">)</span>
+
             <span class="c"># update candidate lists</span>
             <span class="n">actual_candidates</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">candidates</span><span class="p">)</span>
             <span class="n">actual_extended_gaps</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">Copy</span><span class="p">())</span>
@@ -676,23 +853,25 @@
         <span class="c">##################################</span>
         <span class="c"># close loop</span>
         <span class="c">##################################</span>
-        <span class="n">new_idx</span> <span class="o">=</span> <span class="n">_CloseLoop</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span>
-                             <span class="n">actual_extended_gaps</span><span class="p">,</span> <span class="n">score_variant</span><span class="p">)</span>
+        <span class="n">new_idx</span> <span class="o">=</span> <span class="n">_CloseLoop</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span>
+                             <span class="n">actual_extended_gaps</span><span class="p">,</span> <span class="n">score_variant</span><span class="p">,</span>
+                             <span class="n">actual_db_scores</span><span class="p">,</span> <span class="n">max_num_all_atom</span><span class="p">)</span>
         <span class="k">if</span> <span class="n">new_idx</span> <span class="o">==</span> <span class="o">-</span><span class="mi">2</span><span class="p">:</span>
             <span class="c"># try next one if we failed</span>
             <span class="n">gap_idx</span> <span class="o">+=</span> <span class="mi">1</span>
         <span class="k">else</span><span class="p">:</span>
             <span class="c"># all good: fix sidechains if we&#39;re in ring-punch-mode and continue</span>
             <span class="k">if</span> <span class="n">ring_punch_detection</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
-                <span class="n">sidechain</span><span class="o">.</span><span class="n">Reconstruct</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+                <span class="n">ReconstructSidechains</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
             <span class="n">gap_idx</span> <span class="o">=</span> <span class="n">new_idx</span>
 
 </div>
-<div class="viewcode-block" id="FillLoopsByMonteCarlo"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.FillLoopsByMonteCarlo">[docs]</a><span class="k">def</span> <span class="nf">FillLoopsByMonteCarlo</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">torsion_sampler</span><span class="p">,</span> <span class="n">max_loops_to_search</span><span class="o">=</span><span class="mi">6</span><span class="p">,</span>
+<div class="viewcode-block" id="FillLoopsByMonteCarlo"><a class="viewcode-back" href="../../../modelling/pipeline.html#promod3.modelling.FillLoopsByMonteCarlo">[docs]</a><span class="k">def</span> <span class="nf">FillLoopsByMonteCarlo</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">torsion_sampler</span><span class="p">,</span> <span class="n">max_loops_to_search</span><span class="o">=</span><span class="mi">6</span><span class="p">,</span>
                           <span class="n">max_extension</span><span class="o">=</span><span class="mi">30</span><span class="p">,</span> <span class="n">mc_num_loops</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">mc_steps</span><span class="o">=</span><span class="mi">5000</span><span class="p">,</span>
                           <span class="n">use_scoring_extender</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">use_full_extender</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span>
                           <span class="n">score_variant</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">ring_punch_detection</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
-                          <span class="n">fragger_handles</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
+                          <span class="n">fragger_handles</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">chain_idx</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
+                          <span class="n">resnum_range</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Try to fill up loops with Monte Carlo sampling.</span>
 
 <span class="sd">    This is meant as a &quot;last-resort&quot; approach when it is not possible to fill</span>
@@ -711,10 +890,6 @@
 <span class="sd">    :param mhandle: Modelling handle on which to apply change.</span>
 <span class="sd">    :type mhandle:  :class:`ModellingHandle`</span>
 
-<span class="sd">    :param scorer: A scorer dedicated to this model.</span>
-<span class="sd">                   If gaps are closed, the *scorer* is updated.</span>
-<span class="sd">    :type scorer: :class:`~promod3.loop.BackboneLoopScorer`</span>
-
 <span class="sd">    :param torsion_sampler: A sampler for torsion angles.</span>
 <span class="sd">    :type torsion_sampler: :class:`~promod3.loop.TorsionSampler`</span>
 
@@ -727,11 +902,11 @@
 <span class="sd">    :type max_extension:  :class:`int`</span>
 
 <span class="sd">    :param mc_num_loops: Number of loop candidates to consider for each extended gap</span>
-<span class="sd">                         (see :meth:`~promod3.loop.LoopCandidates.FillFromMonteCarloSampler`)</span>
+<span class="sd">                         (see :meth:`~LoopCandidates.FillFromMonteCarloSampler`)</span>
 <span class="sd">    :type mc_num_loops:  :class:`int`</span>
 
 <span class="sd">    :param mc_steps: Number of MC steps to perform for each loop candidate</span>
-<span class="sd">                     (see :meth:`~promod3.loop.LoopCandidates.FillFromMonteCarloSampler`)</span>
+<span class="sd">                     (see :meth:`~LoopCandidates.FillFromMonteCarloSampler`)</span>
 <span class="sd">    :type mc_steps:  :class:`int`</span>
 
 <span class="sd">    :param use_scoring_extender: True = use :class:`ScoringGapExtender` instead</span>
@@ -744,7 +919,7 @@
 <span class="sd">                              See :func:`CloseSmallDeletions`.</span>
 <span class="sd">    :type use_full_extender:  :class:`bool`</span>
 
-<span class="sd">    :param score_variant: How to score loop candidates.</span>
+<span class="sd">    :param score_variant: How to score loop candidates (AllAtom not supported).</span>
 <span class="sd">                          See :func:`FillLoopsByDatabase`.</span>
 <span class="sd">    :type score_variant:  :class:`int`</span>
 
@@ -754,14 +929,30 @@
 
 <span class="sd">    :param fragger_handles: Either None (no fragger sampling used) or one</span>
 <span class="sd">                            fragger handle for each chain in *mhandle*.</span>
-<span class="sd">    :type fragger_handles:  :class:`list` of :class:`~promod3.loop.FraggerHandle`</span>
+<span class="sd">    :type fragger_handles:  :class:`list` of :class:`~promod3.modelling.FraggerHandle`</span>
+
+<span class="sd">    :param chain_idx: If not None, only gaps from chain with given index get</span>
+<span class="sd">                      processed</span>
+<span class="sd">    :type chain_idx:  :class:`int`</span>
+
+<span class="sd">    :param resnum_range: If not None, only gaps within this resnum range get</span>
+<span class="sd">                         processed</span>
+<span class="sd">    :type resnum_range: :class:`tuple` containing two :class:`int`</span>
 <span class="sd">    &#39;&#39;&#39;</span>
 
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;closegaps::FillLoopsByMonteCarlo&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
+
     <span class="k">if</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="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-        <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Trying to fill </span><span class="si">%d</span><span class="s"> gap(s) by Monte Carlo.&quot;</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">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Trying to fill </span><span class="si">%d</span><span class="s"> gap(s) by Monte Carlo.&quot;</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="k">else</span><span class="p">:</span>
         <span class="k">return</span>
 
+    <span class="c"># check/setup scoring</span>
+    <span class="k">if</span> <span class="ow">not</span> <span class="n">IsBackboneScoringSetUp</span><span class="p">(</span><span class="n">mhandle</span><span class="p">):</span>
+        <span class="n">SetupDefaultBackboneScoring</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span>
+
     <span class="c"># point to the current gap</span>
     <span class="n">gap_idx</span> <span class="o">=</span> <span class="mi">0</span>
 
@@ -775,8 +966,9 @@
         <span class="k">if</span> <span class="n">score_variant</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
             <span class="n">gap_ins</span> <span class="o">=</span> <span class="n">CountEnclosedInsertions</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">)</span>
 
-        <span class="c"># ignore terminal gaps</span>
-        <span class="k">if</span> <span class="n">gap_orig</span><span class="o">.</span><span class="n">IsTerminal</span><span class="p">():</span>
+        <span class="c"># ignore terminal gaps and out-of-range (if range given)</span>
+        <span class="k">if</span> <span class="n">gap_orig</span><span class="o">.</span><span class="n">IsTerminal</span><span class="p">()</span> \
+           <span class="ow">or</span> <span class="ow">not</span> <span class="n">_InRange</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">,</span> <span class="n">chain_idx</span><span class="p">,</span> <span class="n">resnum_range</span><span class="p">):</span>
             <span class="n">gap_idx</span> <span class="o">+=</span> <span class="mi">1</span>
             <span class="k">continue</span>
 
@@ -791,16 +983,25 @@
         <span class="n">found_loops</span> <span class="o">=</span> <span class="mi">0</span>
         <span class="c"># currently extended gap and gap-extender</span>
         <span class="n">actual_gap</span> <span class="o">=</span> <span class="n">gap_orig</span><span class="o">.</span><span class="n">Copy</span><span class="p">()</span>
+        <span class="c"># each extension can make it at most 1 longer...</span>
+        <span class="n">max_loop_len</span> <span class="o">=</span> <span class="n">gap_orig</span><span class="o">.</span><span class="n">length</span> <span class="o">+</span> <span class="n">max_extension</span>
         <span class="n">actual_extender</span> <span class="o">=</span> <span class="n">_GetGapExtender</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">actual_gap</span><span class="p">,</span>
                                           <span class="n">use_scoring_extender</span><span class="p">,</span>
-                                          <span class="n">use_full_extender</span><span class="p">)</span>
+                                          <span class="n">use_full_extender</span><span class="p">,</span>
+                                          <span class="n">max_loop_len</span><span class="p">)</span>
         <span class="n">actual_chain_idx</span> <span class="o">=</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">GetChainIndex</span><span class="p">()</span>
         <span class="c"># iteratively extend actual_gap</span>
         <span class="n">ext_step</span> <span class="o">=</span> <span class="mi">0</span>
+
+        <span class="n">first_iteration</span> <span class="o">=</span> <span class="bp">True</span>
         <span class="k">while</span> <span class="n">found_loops</span> <span class="o">&lt;</span> <span class="n">max_loops_to_search</span> <span class="ow">and</span> <span class="n">ext_step</span> <span class="o">&lt;</span> <span class="n">max_extension</span><span class="p">:</span>
+
             <span class="c"># extend the gap</span>
-            <span class="k">if</span> <span class="ow">not</span> <span class="n">actual_extender</span><span class="o">.</span><span class="n">Extend</span><span class="p">():</span>
-                <span class="k">break</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="n">first_iteration</span><span class="p">:</span>
+                <span class="k">if</span> <span class="ow">not</span> <span class="n">actual_extender</span><span class="o">.</span><span class="n">Extend</span><span class="p">():</span>
+                    <span class="k">break</span>
+            <span class="n">first_iteration</span> <span class="o">=</span> <span class="bp">False</span>
+
             <span class="c"># make sure, that the loop seq has at least length 3</span>
             <span class="k">if</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">)</span> <span class="o">&lt;</span> <span class="mi">3</span><span class="p">):</span>
                 <span class="k">continue</span>
@@ -822,36 +1023,33 @@
                 <span class="c"># choose sampler</span>
                 <span class="k">if</span> <span class="n">fragger_handles</span> <span class="ow">is</span> <span class="bp">None</span> <span class="ow">or</span> \
                    <span class="n">actual_gap</span><span class="o">.</span><span class="n">length</span> <span class="o">&lt;</span> <span class="n">fragger_handle</span><span class="o">.</span><span class="n">fragment_length</span><span class="p">:</span>
-                    <span class="n">mc_sampler</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">PhiPsiSampler</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">,</span>
-                                                    <span class="n">torsion_sampler</span><span class="p">)</span>
+                    <span class="n">mc_sampler</span> <span class="o">=</span> <span class="n">PhiPsiSampler</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">,</span>
+                                               <span class="n">torsion_sampler</span><span class="p">)</span>
                 <span class="k">else</span><span class="p">:</span>
                     <span class="n">start_pos</span> <span class="o">=</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span> <span class="o">-</span> <span class="mi">1</span>
                     <span class="n">end_pos</span> <span class="o">=</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">after</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span> <span class="o">-</span> <span class="mi">1</span>
                     <span class="n">fragger_list</span> <span class="o">=</span> <span class="n">fragger_handle</span><span class="o">.</span><span class="n">GetList</span><span class="p">(</span><span class="n">start_pos</span><span class="p">,</span> <span class="n">end_pos</span><span class="p">)</span>
-                    <span class="n">mc_sampler</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">FragmentSampler</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">,</span>
-                                                      <span class="n">fragger_list</span><span class="p">,</span>
-                                                      <span class="n">init_fragments</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
-
-                <span class="n">mc_closer</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">DirtyCCDCloser</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">before</span><span class="p">,</span>
-                                                <span class="n">actual_gap</span><span class="o">.</span><span class="n">after</span><span class="p">)</span>
-
-                <span class="n">weights</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
-                <span class="n">weights</span><span class="p">[</span><span class="s">&quot;reduced&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">3.0</span>
-                <span class="n">weights</span><span class="p">[</span><span class="s">&quot;cb_packing&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">2.0</span>
-                <span class="n">weights</span><span class="p">[</span><span class="s">&quot;hbond&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">1.0</span>
-                <span class="n">weights</span><span class="p">[</span><span class="s">&quot;clash&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">0.05</span>
-                <span class="n">mc_scorer</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LinearScorer</span><span class="p">(</span>
-                        <span class="n">scorer</span><span class="p">,</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">(),</span>
-                        <span class="n">actual_chain_idx</span><span class="p">,</span> <span class="n">weights</span><span class="p">)</span>
+                    <span class="n">mc_sampler</span> <span class="o">=</span> <span class="n">FragmentSampler</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">,</span>
+                                                 <span class="n">fragger_list</span><span class="p">,</span>
+                                                 <span class="n">init_fragments</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
+
+                <span class="n">mc_closer</span> <span class="o">=</span> <span class="n">DirtyCCDCloser</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">before</span><span class="p">,</span>
+                                           <span class="n">actual_gap</span><span class="o">.</span><span class="n">after</span><span class="p">)</span>
+
+                <span class="n">weights</span> <span class="o">=</span> <span class="n">_GetMCWeights</span><span class="p">()</span>
+                
+                <span class="n">mc_scorer</span> <span class="o">=</span> <span class="n">LinearScorer</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">backbone_scorer</span><span class="p">,</span>
+                                         <span class="n">actual_gap</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">(),</span>
+                                         <span class="n">actual_chain_idx</span><span class="p">,</span> <span class="n">weights</span><span class="p">)</span>
 
                 <span class="n">start_temperature</span> <span class="o">=</span> <span class="mi">100</span>
                 <span class="n">cooling_factor</span> <span class="o">=</span> <span class="mf">0.9</span>
                 <span class="c"># the number of 109 is roughly the number of times we have to apply</span>
                 <span class="c"># a factor of 0.9 to 100 until it reaches a value of 0.001</span>
                 <span class="n">cooling_interval</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="nb">round</span><span class="p">(</span><span class="n">mc_steps</span><span class="o">/</span><span class="mf">109.0</span><span class="p">))</span>
-                <span class="n">mc_cooler</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">ExponentialCooler</span><span class="p">(</span><span class="n">cooling_interval</span><span class="p">,</span>
-                                                   <span class="n">start_temperature</span><span class="p">,</span>
-                                                   <span class="n">cooling_factor</span><span class="p">)</span>
+                <span class="n">mc_cooler</span> <span class="o">=</span> <span class="n">ExponentialCooler</span><span class="p">(</span><span class="n">cooling_interval</span><span class="p">,</span>
+                                              <span class="n">start_temperature</span><span class="p">,</span>
+                                              <span class="n">cooling_factor</span><span class="p">)</span>
             <span class="k">except</span><span class="p">:</span>
                 <span class="c"># something went terribly wrong...</span>
                 <span class="n">ost</span><span class="o">.</span><span class="n">LogError</span><span class="p">(</span><span class="s">&#39;Failed to set up MC components&#39;</span><span class="p">)</span>
@@ -860,7 +1058,7 @@
             <span class="c"># try to get candidates for the current loop</span>
             <span class="k">try</span><span class="p">:</span>
                 <span class="n">ost</span><span class="o">.</span><span class="n">LogVerbose</span><span class="p">(</span><span class="s">&quot;Firing MC for &quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">actual_gap</span><span class="p">))</span>
-                <span class="n">candidates</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoopCandidates</span><span class="o">.</span><span class="n">FillFromMonteCarloSampler</span><span class="p">(</span>
+                <span class="n">candidates</span> <span class="o">=</span> <span class="n">LoopCandidates</span><span class="o">.</span><span class="n">FillFromMonteCarloSampler</span><span class="p">(</span>
                     <span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">,</span> <span class="n">mc_num_loops</span><span class="p">,</span> <span class="n">mc_steps</span><span class="p">,</span> <span class="n">mc_sampler</span><span class="p">,</span>
                     <span class="n">mc_closer</span><span class="p">,</span> <span class="n">mc_scorer</span><span class="p">,</span> <span class="n">mc_cooler</span><span class="p">)</span>
             <span class="k">except</span> <span class="ne">RuntimeError</span><span class="p">:</span>
@@ -886,7 +1084,7 @@
         <span class="c">##################################</span>
         <span class="c"># close loop</span>
         <span class="c">##################################</span>
-        <span class="n">new_idx</span> <span class="o">=</span> <span class="n">_CloseLoop</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span>
+        <span class="n">new_idx</span> <span class="o">=</span> <span class="n">_CloseLoop</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">gap_orig</span><span class="p">,</span> <span class="n">actual_candidates</span><span class="p">,</span>
                              <span class="n">actual_extended_gaps</span><span class="p">,</span> <span class="n">score_variant</span><span class="p">)</span>
         <span class="k">if</span> <span class="n">new_idx</span> <span class="o">==</span> <span class="o">-</span><span class="mi">2</span><span class="p">:</span>
             <span class="c"># try next one if we failed</span>
@@ -894,11 +1092,111 @@
         <span class="k">else</span><span class="p">:</span>
             <span class="c"># all good: fix sidechains if we&#39;re in ring-punch-mode and continue</span>
             <span class="k">if</span> <span class="n">ring_punch_detection</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
-                <span class="n">sidechain</span><span class="o">.</span><span class="n">Reconstruct</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+                <span class="n">ReconstructSidechains</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
             <span class="n">gap_idx</span> <span class="o">=</span> <span class="n">new_idx</span>
 
 </div>
-<div class="viewcode-block" id="ModelTermini"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.ModelTermini">[docs]</a><span class="k">def</span> <span class="nf">ModelTermini</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">torsion_sampler</span><span class="p">,</span> <span class="n">fragger_handles</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
+<div class="viewcode-block" id="CloseGaps"><a class="viewcode-back" href="../../../modelling/pipeline.html#promod3.modelling.CloseGaps">[docs]</a><span class="k">def</span> <span class="nf">CloseGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">merge_distance</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">fragment_db</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">structure_db</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
+              <span class="n">torsion_sampler</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">fragger_handles</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">chain_idx</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
+              <span class="n">resnum_range</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;</span>
+<span class="sd">    Tries to close all gaps in a model, except termini. It will go through</span>
+<span class="sd">    following steps:</span>
+
+<span class="sd">    - Try to close small deletions by relaxing them </span>
+<span class="sd">      (see :func:`CloseSmallDeletions`)</span>
+<span class="sd">    - Iteratively merge gaps up to a distance **merge_distance**</span>
+<span class="sd">      (see :func:`MergeGapsByDistance`) and try to fill them with a database </span>
+<span class="sd">      approach (see :func:`FillLoopsByDatabase`)</span>
+<span class="sd">    - Try to fill remaining gaps using a Monte Carlo approach</span>
+<span class="sd">      (see :func:`FillLoopsByMonteCarlo`)</span>
+<span class="sd">    - Large deletions get closed using a last resort approach</span>
+<span class="sd">      (see :func:`CloseLargeDeletions`)</span>
+
+<span class="sd">    :param mhandle: Modelling handle on which to apply change.</span>
+<span class="sd">    :type mhandle:  :class:`ModellingHandle`</span>
+
+<span class="sd">    :param merge_distance:  Max. merge distance when performing the database </span>
+<span class="sd">                            approach</span>
+<span class="sd">    :type merge_distance:   :class:`int`</span>
+<span class="sd">    :param fragment_db:     Database for searching fragments in database </span>
+<span class="sd">                            approach, must be consistent with provided</span>
+<span class="sd">                            **structure_db**. A default is loaded if None.</span>
+<span class="sd">    :type fragment_db:      :class:`~promod3.loop.FragDB`</span>
+<span class="sd">    :param structure_db:    Structure db from which the **fragment_db** gets</span>
+<span class="sd">                            it&#39;s structural information. A default is loaded </span>
+<span class="sd">                            if None.</span>
+<span class="sd">    :type structure_db:     :class:`~promod3.loop.StructureDB`</span>
+<span class="sd">    :param torsion_sampler: Used as parameter for :func:`FillLoopsByDatabase`</span>
+<span class="sd">                            and :func:`FillLoopsByMonteCarlo` A default one is </span>
+<span class="sd">                            loaded if None.</span>
+<span class="sd">    :type torsion_sampler: :class:`promod3.loop.TorsionSampler`</span>
+<span class="sd">    :param fragger_handles: A list of :class:`promod3.modelling.FraggerHandle`</span>
+<span class="sd">                            objects for each chain in **mhandle**. </span>
+<span class="sd">                            If provided, fragments will be used for</span>
+<span class="sd">                            sampling when the :func:`FillLoopsByMonteCarlo`</span>
+<span class="sd">                            gets executed.</span>
+<span class="sd">    :type fragger_handles: :class:`list`</span>
+<span class="sd">    :param chain_idx: If not None, only gaps from chain with given index get</span>
+<span class="sd">                      processed</span>
+<span class="sd">    :type chain_idx:  :class:`int`</span>
+
+<span class="sd">    :param resnum_range: If not None, only gaps within this resnum range get</span>
+<span class="sd">                         processed.</span>
+<span class="sd">    :type resnum_range: :class:`tuple` containing two :class:`int`  </span>
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="c"># load stuff if needed</span>
+    <span class="k">if</span> <span class="n">fragment_db</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</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="k">if</span> <span class="n">structure_db</span> <span class="ow">is</span> <span class="bp">None</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="k">if</span> <span class="n">torsion_sampler</span> <span class="ow">is</span> <span class="bp">None</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="c"># try to close small deletions by relaxing them</span>
+    <span class="n">CloseSmallDeletions</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">chain_idx</span><span class="o">=</span><span class="n">chain_idx</span><span class="p">,</span> 
+                        <span class="n">resnum_range</span><span class="o">=</span><span class="n">resnum_range</span><span class="p">)</span>
+
+    <span class="c"># iteratively merge gaps of distance i and fill loops by database</span>
+    <span class="k">for</span> <span class="n">distance</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">merge_distance</span><span class="p">):</span>
+        <span class="n">MergeGapsByDistance</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">distance</span><span class="p">,</span> <span class="n">chain_idx</span><span class="o">=</span><span class="n">chain_idx</span><span class="p">,</span>
+                            <span class="n">resnum_range</span><span class="o">=</span><span class="n">resnum_range</span><span class="p">)</span>
+        <span class="n">FillLoopsByDatabase</span><span class="p">(</span><span class="n">mhandle</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="n">min_loops_required</span><span class="o">=-</span><span class="mi">1</span><span class="p">,</span>
+                            <span class="n">max_res_extension</span><span class="o">=</span><span class="mi">6</span><span class="p">,</span> <span class="n">chain_idx</span><span class="o">=</span><span class="n">chain_idx</span><span class="p">,</span>
+                            <span class="n">resnum_range</span><span class="o">=</span><span class="n">resnum_range</span><span class="p">,</span> <span class="n">clash_thresh</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
+        
+    <span class="c"># if above fails, try DB-fill with less restrictions</span>
+    <span class="n">FillLoopsByDatabase</span><span class="p">(</span><span class="n">mhandle</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="n">min_loops_required</span><span class="o">=-</span><span class="mi">1</span><span class="p">,</span>
+                        <span class="n">chain_idx</span><span class="o">=</span><span class="n">chain_idx</span><span class="p">,</span> <span class="n">resnum_range</span><span class="o">=</span><span class="n">resnum_range</span><span class="p">,</span>
+                        <span class="n">clash_thresh</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
+    <span class="n">FillLoopsByDatabase</span><span class="p">(</span><span class="n">mhandle</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="n">chain_idx</span><span class="o">=</span><span class="n">chain_idx</span><span class="p">,</span>
+                        <span class="n">resnum_range</span><span class="o">=</span><span class="n">resnum_range</span><span class="p">)</span>
+
+    <span class="c"># close remaining gaps by Monte Carlo</span>
+    <span class="n">FillLoopsByMonteCarlo</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">torsion_sampler</span><span class="p">,</span> 
+                          <span class="n">fragger_handles</span><span class="o">=</span><span class="n">fragger_handles</span><span class="p">,</span> 
+                          <span class="n">chain_idx</span><span class="o">=</span><span class="n">chain_idx</span><span class="p">,</span>
+                          <span class="n">resnum_range</span><span class="o">=</span><span class="n">resnum_range</span><span class="p">)</span>
+
+    <span class="c"># last resort approach to close large deletions</span>
+    <span class="n">CloseLargeDeletions</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">structure_db</span><span class="p">,</span> <span class="n">chain_idx</span><span class="o">=</span><span class="n">chain_idx</span><span class="p">,</span> 
+                        <span class="n">resnum_range</span><span class="o">=</span><span class="n">resnum_range</span><span class="p">)</span>
+
+    <span class="c"># NOTE:</span>
+    <span class="c"># In the function above, we call :func:`FillLoopsByDatabase` multiple</span>
+    <span class="c"># times. First, we try to close &quot;easy&quot; gaps which require few extensions</span>
+    <span class="c"># (we wish to limit the damage we do on the template) and for which we have</span>
+    <span class="c"># plenty of loop candidates. If some gaps cannot be closed like this, we try</span>
+    <span class="c"># less restrictive options. This approach is helpful if neighboring gaps are</span>
+    <span class="c"># close together and the one closer to the C-terminus is easier to close.</span>
+    <span class="c"># Several variants were evaluated on 1752 target-template-pairs and this one</span>
+    <span class="c"># worked best.</span>
+</div>
+<div class="viewcode-block" id="ModelTermini"><a class="viewcode-back" href="../../../modelling/pipeline.html#promod3.modelling.ModelTermini">[docs]</a><span class="k">def</span> <span class="nf">ModelTermini</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">torsion_sampler</span><span class="p">,</span> <span class="n">fragger_handles</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
                  <span class="n">mc_num_loops</span><span class="o">=</span><span class="mi">20</span><span class="p">,</span> <span class="n">mc_steps</span><span class="o">=</span><span class="mi">5000</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Try to model termini with Monte Carlo sampling.</span>
 
@@ -916,30 +1214,35 @@
 <span class="sd">    :param mhandle: Modelling handle on which to apply change.</span>
 <span class="sd">    :type mhandle:  :class:`ModellingHandle`</span>
 
-<span class="sd">    :param scorer: A scorer dedicated to this model.</span>
-<span class="sd">                   If gaps are closed, the *scorer* is updated.</span>
-<span class="sd">    :type scorer: :class:`~promod3.loop.BackboneLoopScorer`</span>
-
 <span class="sd">    :param torsion_sampler: A sampler for torsion angles.</span>
 <span class="sd">    :type torsion_sampler: :class:`~promod3.loop.TorsionSampler`</span>
 
 <span class="sd">    :param fragger_handles: Either None (no fragger sampling used) or one</span>
 <span class="sd">                            fragger handle for each chain in *mhandle*.</span>
-<span class="sd">    :type fragger_handles:  :class:`list` of :class:`~promod3.loop.FraggerHandle`</span>
+<span class="sd">    :type fragger_handles:  :class:`list` of :class:`~promod3.modelling.FraggerHandle`</span>
 
 <span class="sd">    :param mc_num_loops: Number of loop candidates to consider for each terminal gap</span>
-<span class="sd">                         (see :meth:`~promod3.loop.LoopCandidates.FillFromMonteCarloSampler`)</span>
+<span class="sd">                         (see :meth:`~LoopCandidates.FillFromMonteCarloSampler`)</span>
 <span class="sd">    :type mc_num_loops:  :class:`int`</span>
 
 <span class="sd">    :param mc_steps: Number of MC steps to perform for each loop candidate</span>
-<span class="sd">                     (see :meth:`~promod3.loop.LoopCandidates.FillFromMonteCarloSampler`)</span>
+<span class="sd">                     (see :meth:`~LoopCandidates.FillFromMonteCarloSampler`)</span>
 <span class="sd">    :type mc_steps:  :class:`int`</span>
 <span class="sd">    &#39;&#39;&#39;</span>
 
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;closegaps::ModelTermini&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
+
     <span class="c"># get terminal gaps (copies as we&#39;ll clear them as we go)</span>
     <span class="n">terminal_gaps</span> <span class="o">=</span> <span class="p">[</span><span class="n">g</span><span class="o">.</span><span class="n">Copy</span><span class="p">()</span> <span class="k">for</span> <span class="n">g</span> <span class="ow">in</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span> <span class="k">if</span> <span class="n">g</span><span class="o">.</span><span class="n">IsTerminal</span><span class="p">()</span> <span class="ow">and</span> <span class="n">g</span><span class="o">.</span><span class="n">length</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">]</span>
     <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">terminal_gaps</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
         <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Trying to model </span><span class="si">%d</span><span class="s"> terminal gap(s).&quot;</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">terminal_gaps</span><span class="p">))</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="k">return</span>
+
+    <span class="c"># check/setup scoring</span>
+    <span class="k">if</span> <span class="ow">not</span> <span class="n">IsBackboneScoringSetUp</span><span class="p">(</span><span class="n">mhandle</span><span class="p">):</span>
+        <span class="n">SetupDefaultBackboneScoring</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span>
 
     <span class="c"># model them</span>
     <span class="k">for</span> <span class="n">actual_gap</span> <span class="ow">in</span> <span class="n">terminal_gaps</span><span class="p">:</span>
@@ -957,28 +1260,24 @@
         <span class="c"># choose sampler</span>
         <span class="k">if</span> <span class="n">fragger_handles</span> <span class="ow">is</span> <span class="bp">None</span> <span class="ow">or</span> \
            <span class="n">actual_gap</span><span class="o">.</span><span class="n">length</span> <span class="o">&lt;</span> <span class="n">fragger_handle</span><span class="o">.</span><span class="n">fragment_length</span><span class="p">:</span>
-            <span class="n">mc_sampler</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">PhiPsiSampler</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">,</span>
-                                            <span class="n">torsion_sampler</span><span class="p">)</span>
+            <span class="n">mc_sampler</span> <span class="o">=</span> <span class="n">PhiPsiSampler</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">,</span>
+                                       <span class="n">torsion_sampler</span><span class="p">)</span>
         <span class="k">else</span><span class="p">:</span>
             <span class="n">end_pos</span> <span class="o">=</span> <span class="n">start_resnum</span><span class="o">-</span><span class="mi">1</span> <span class="o">+</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">length</span>
             <span class="n">fragger_list</span> <span class="o">=</span> <span class="n">fragger_handle</span><span class="o">.</span><span class="n">GetList</span><span class="p">(</span><span class="n">start_resnum</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="n">end_pos</span><span class="p">)</span>
-            <span class="n">mc_sampler</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">FragmentSampler</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">,</span> <span class="n">fragger_list</span><span class="p">,</span>
-                                              <span class="n">init_fragments</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
+            <span class="n">mc_sampler</span> <span class="o">=</span> <span class="n">FragmentSampler</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">,</span> <span class="n">fragger_list</span><span class="p">,</span>
+                                         <span class="n">init_fragments</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
 
         <span class="c"># choose closer</span>
         <span class="k">if</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">IsNTerminal</span><span class="p">():</span>
-            <span class="n">mc_closer</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">NTerminalCloser</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">after</span><span class="p">)</span>
+            <span class="n">mc_closer</span> <span class="o">=</span> <span class="n">NTerminalCloser</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">after</span><span class="p">)</span>
         <span class="k">else</span><span class="p">:</span>
-            <span class="n">mc_closer</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">CTerminalCloser</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">before</span><span class="p">)</span>
+            <span class="n">mc_closer</span> <span class="o">=</span> <span class="n">CTerminalCloser</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">before</span><span class="p">)</span>
 
         <span class="c"># setup scorer</span>
-        <span class="n">scorer_weights</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
-        <span class="n">scorer_weights</span><span class="p">[</span><span class="s">&quot;reduced&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">3.0</span>
-        <span class="n">scorer_weights</span><span class="p">[</span><span class="s">&quot;cb_packing&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">2.0</span>
-        <span class="n">scorer_weights</span><span class="p">[</span><span class="s">&quot;hbond&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">1.0</span>
-        <span class="n">scorer_weights</span><span class="p">[</span><span class="s">&quot;clash&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">0.05</span>
-        <span class="n">mc_scorer</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LinearScorer</span><span class="p">(</span><span class="n">scorer</span><span class="p">,</span> <span class="n">start_resnum</span><span class="p">,</span>
-                                      <span class="n">actual_chain_idx</span><span class="p">,</span> <span class="n">scorer_weights</span><span class="p">)</span>
+        <span class="n">weights</span> <span class="o">=</span> <span class="n">_GetMCWeights</span><span class="p">()</span>
+        <span class="n">mc_scorer</span> <span class="o">=</span> <span class="n">LinearScorer</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">backbone_scorer</span><span class="p">,</span> <span class="n">start_resnum</span><span class="p">,</span>
+                                 <span class="n">actual_chain_idx</span><span class="p">,</span> <span class="n">weights</span><span class="p">)</span>
 
         <span class="c"># setup cooler</span>
         <span class="n">start_temperature</span> <span class="o">=</span> <span class="mi">100</span>
@@ -986,49 +1285,37 @@
         <span class="c"># the number of 109 is roughly the number of times we have to apply</span>
         <span class="c"># a factor of 0.9 to 100 until it reaches a value of 0.001</span>
         <span class="n">cooling_interval</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="nb">round</span><span class="p">(</span><span class="n">mc_steps</span><span class="o">/</span><span class="mf">109.0</span><span class="p">))</span>
-        <span class="n">mc_cooler</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">ExponentialCooler</span><span class="p">(</span><span class="n">cooling_interval</span><span class="p">,</span>
-                                           <span class="n">start_temperature</span><span class="p">,</span>
-                                           <span class="n">cooling_factor</span><span class="p">)</span>
+        <span class="n">mc_cooler</span> <span class="o">=</span> <span class="n">ExponentialCooler</span><span class="p">(</span><span class="n">cooling_interval</span><span class="p">,</span> <span class="n">start_temperature</span><span class="p">,</span>
+                                      <span class="n">cooling_factor</span><span class="p">)</span>
 
         <span class="c"># try to get loop candidates</span>
         <span class="n">ost</span><span class="o">.</span><span class="n">LogVerbose</span><span class="p">(</span><span class="s">&quot;Firing MC for &quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">actual_gap</span><span class="p">))</span>
-        <span class="n">candidates</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoopCandidates</span><span class="o">.</span><span class="n">FillFromMonteCarloSampler</span><span class="p">(</span>
+        <span class="n">candidates</span> <span class="o">=</span> <span class="n">LoopCandidates</span><span class="o">.</span><span class="n">FillFromMonteCarloSampler</span><span class="p">(</span>
                 <span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">,</span> <span class="n">mc_num_loops</span><span class="p">,</span> <span class="n">mc_steps</span><span class="p">,</span> <span class="n">mc_sampler</span><span class="p">,</span>
                 <span class="n">mc_closer</span><span class="p">,</span> <span class="n">mc_scorer</span><span class="p">,</span> <span class="n">mc_cooler</span><span class="p">)</span>
 
-        <span class="c"># score candidates</span>
-        <span class="n">candidates</span><span class="o">.</span><span class="n">AttachScorer</span><span class="p">(</span><span class="n">scorer</span><span class="p">)</span>
-        <span class="n">candidates</span><span class="o">.</span><span class="n">CalculateCombinedScores</span><span class="p">(</span><span class="n">_GetWeights</span><span class="p">(),</span> <span class="n">start_resnum</span><span class="p">,</span>
-                                           <span class="n">actual_chain_idx</span><span class="p">)</span>
-        <span class="c"># get best one</span>
-        <span class="n">min_score</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="s">&quot;inf&quot;</span><span class="p">)</span>
-        <span class="n">optimal_candidate</span> <span class="o">=</span> <span class="bp">None</span>
-        <span class="k">for</span> <span class="n">candidate</span> <span class="ow">in</span> <span class="n">candidates</span><span class="p">:</span>
-            <span class="n">score</span> <span class="o">=</span> <span class="n">candidate</span><span class="o">.</span><span class="n">combined_score</span>
-            <span class="k">if</span> <span class="n">score</span> <span class="o">&lt;</span> <span class="n">min_score</span><span class="p">:</span>
-                <span class="n">optimal_candidate</span> <span class="o">=</span> <span class="n">candidate</span>
-                <span class="n">min_score</span> <span class="o">=</span> <span class="n">score</span>
-
-        <span class="n">ost</span><span class="o">.</span><span class="n">LogVerbose</span><span class="p">(</span><span class="s">&quot;Gap </span><span class="si">%s</span><span class="s"> - </span><span class="si">%d</span><span class="s"> candidates, best (min) score </span><span class="si">%g</span><span class="s">&quot;</span> <span class="o">%</span>
-                       <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">actual_gap</span><span class="p">),</span> <span class="nb">len</span><span class="p">(</span><span class="n">candidates</span><span class="p">),</span> <span class="n">min_score</span><span class="p">))</span>
-
-        <span class="c"># finally resolve loop</span>
-        <span class="k">if</span> <span class="n">optimal_candidate</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
-            <span class="c"># update model</span>
-            <span class="n">bb_list</span> <span class="o">=</span> <span class="n">optimal_candidate</span><span class="o">.</span><span class="n">bb_list</span>
-            <span class="n">bb_list</span><span class="o">.</span><span class="n">InsertInto</span><span class="p">(</span><span class="n">actual_chain</span><span class="p">,</span> <span class="n">start_resnum</span><span class="p">)</span>
-            <span class="c"># update scorer</span>
-            <span class="n">scorer</span><span class="o">.</span><span class="n">SetEnvironment</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="n">start_resnum</span><span class="p">,</span> <span class="n">actual_chain_idx</span><span class="p">)</span>
+        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">candidates</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
+            <span class="c"># score candidates</span>
+            <span class="n">bb_scores</span> <span class="o">=</span> <span class="n">ScoreContainer</span><span class="p">()</span>
+            <span class="n">candidates</span><span class="o">.</span><span class="n">CalculateBackboneScores</span><span class="p">(</span><span class="n">bb_scores</span><span class="p">,</span>
+                                               <span class="n">mhandle</span><span class="o">.</span><span class="n">backbone_scorer</span><span class="p">,</span>
+                                               <span class="n">start_resnum</span><span class="p">,</span> <span class="n">actual_chain_idx</span><span class="p">)</span>
+            <span class="n">scores</span> <span class="o">=</span> <span class="n">bb_scores</span><span class="o">.</span><span class="n">LinearCombine</span><span class="p">(</span><span class="n">ScoringWeights</span><span class="o">.</span><span class="n">GetWeights</span><span class="p">())</span>
+            <span class="n">min_score</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="n">scores</span><span class="p">)</span>
+            <span class="n">min_idx</span> <span class="o">=</span> <span class="n">scores</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="n">min_score</span><span class="p">)</span>
+            <span class="c"># report</span>
             <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Resolved terminal gap </span><span class="si">%s</span><span class="s"> (</span><span class="si">%d</span><span class="s"> candidates)&quot;</span> <span class="o">%</span> \
                         <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">actual_gap</span><span class="p">),</span> <span class="nb">len</span><span class="p">(</span><span class="n">candidates</span><span class="p">)))</span>
-            <span class="n">ClearGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">actual_gap</span><span class="p">)</span>
+            <span class="c"># update model and clear gap</span>
+            <span class="n">InsertLoopClearGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">candidates</span><span class="p">[</span><span class="n">min_idx</span><span class="p">],</span> <span class="n">actual_gap</span><span class="p">)</span>
         <span class="k">else</span><span class="p">:</span>
             <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Failed to model terminal gap (</span><span class="si">%s</span><span class="s">)&quot;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">actual_gap</span><span class="p">))</span>
             
 </div>
-<div class="viewcode-block" id="CloseLargeDeletions"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.CloseLargeDeletions">[docs]</a><span class="k">def</span> <span class="nf">CloseLargeDeletions</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">structure_db</span><span class="p">,</span> <span class="n">linker_length</span><span class="o">=</span><span class="mi">8</span><span class="p">,</span>
+<div class="viewcode-block" id="CloseLargeDeletions"><a class="viewcode-back" href="../../../modelling/pipeline.html#promod3.modelling.CloseLargeDeletions">[docs]</a><span class="k">def</span> <span class="nf">CloseLargeDeletions</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">structure_db</span><span class="p">,</span> <span class="n">linker_length</span><span class="o">=</span><span class="mi">8</span><span class="p">,</span>
                         <span class="n">num_fragments</span><span class="o">=</span><span class="mi">500</span><span class="p">,</span> <span class="n">use_scoring_extender</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span>
-                        <span class="n">use_full_extender</span><span class="o">=</span><span class="bp">True</span><span class="p">):</span>
+                        <span class="n">use_full_extender</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">chain_idx</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
+                        <span class="n">resnum_range</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
 
     <span class="sd">&#39;&#39;&#39;Try to close large deletions.</span>
 
@@ -1040,10 +1327,6 @@
 <span class="sd">    :param mhandle: Modelling handle on which to apply change.</span>
 <span class="sd">    :type mhandle:  :class:`ModellingHandle`</span>
 
-<span class="sd">    :param scorer: A scorer dedicated to this model.</span>
-<span class="sd">                   If gaps are closed, the *scorer* is updated.</span>
-<span class="sd">    :type scorer: :class:`~promod3.loop.BackboneLoopScorer`</span>
-
 <span class="sd">    :param structure_db: The database from which to extract fragments for</span>
 <span class="sd">                         the linker region.</span>
 <span class="sd">    :type structure_db: :class:`~promod3.loop.StructureDB`</span>
@@ -1065,14 +1348,29 @@
 <span class="sd">                              :class:`GapExtender`.</span>
 <span class="sd">                              See :func:`CloseSmallDeletions`.</span>
 <span class="sd">    :type use_full_extender:  :class:`bool`</span>
+
+<span class="sd">    :param chain_idx: If not None, only gaps from chain with given index get</span>
+<span class="sd">                      processed</span>
+<span class="sd">    :type chain_idx:  :class:`int`</span>
+
+<span class="sd">    :param resnum_range: If not None, only gaps within this resnum range get</span>
+<span class="sd">                         processed</span>
+<span class="sd">    :type resnum_range: :class:`tuple` containing two :class:`int`</span>
 <span class="sd">    &#39;&#39;&#39;</span>
 
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;closegaps::CloseLargeDeletions&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
+
     <span class="k">if</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="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
         <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Trying to resolve large deletions (</span><span class="si">%d</span><span class="s"> gap(s) left) by &quot;</span>
                     <span class="s">&quot;sampling a linker region.&quot;</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="k">else</span><span class="p">:</span>
         <span class="k">return</span>
 
+    <span class="c"># check/setup scoring</span>
+    <span class="k">if</span> <span class="ow">not</span> <span class="n">IsBackboneScoringSetUp</span><span class="p">(</span><span class="n">mhandle</span><span class="p">):</span>
+        <span class="n">SetupDefaultBackboneScoring</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span>
+
     <span class="c"># point to the current gap</span>
     <span class="n">gap_idx</span> <span class="o">=</span> <span class="mi">0</span>
 
@@ -1083,6 +1381,12 @@
 
         <span class="c"># keep copy of original gap</span>
         <span class="n">gap_orig</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">[</span><span class="n">gap_idx</span><span class="p">]</span><span class="o">.</span><span class="n">Copy</span><span class="p">()</span>
+
+        <span class="c"># check whether we are in the desired range</span>
+        <span class="k">if</span> <span class="ow">not</span> <span class="n">_InRange</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">,</span> <span class="n">chain_idx</span><span class="p">,</span> <span class="n">resnum_range</span><span class="p">):</span>
+            <span class="n">gap_idx</span> <span class="o">+=</span> <span class="mi">1</span>
+            <span class="k">continue</span>
+
         <span class="c"># get chain for gap</span>
         <span class="n">actual_chain_idx</span> <span class="o">=</span> <span class="n">gap_orig</span><span class="o">.</span><span class="n">GetChainIndex</span><span class="p">()</span>
         <span class="n">actual_chain</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">chains</span><span class="p">[</span><span class="n">actual_chain_idx</span><span class="p">]</span>
@@ -1127,10 +1431,10 @@
             <span class="k">continue</span>
         
         <span class="c"># extract gap info</span>
-        <span class="n">n_res</span> <span class="o">=</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">before</span>
-        <span class="n">c_res</span> <span class="o">=</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">after</span>
-        <span class="n">n_res_num</span> <span class="o">=</span> <span class="n">n_res</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span>
-        <span class="n">c_res_num</span> <span class="o">=</span> <span class="n">c_res</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span>
+        <span class="n">n_stem_res</span> <span class="o">=</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">before</span>
+        <span class="n">c_stem_res</span> <span class="o">=</span> <span class="n">actual_gap</span><span class="o">.</span><span class="n">after</span>
+        <span class="n">n_stem_res_num</span> <span class="o">=</span> <span class="n">n_stem_res</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span>
+        <span class="n">c_stem_res_num</span> <span class="o">=</span> <span class="n">c_stem_res</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span>
 
         <span class="c"># let&#39;s find fragments!</span>
         <span class="n">fragger</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">Fragger</span><span class="p">(</span><span class="n">actual_gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">)</span>
@@ -1141,104 +1445,90 @@
         <span class="c"># We generate two backbonelists based on residues beginning from the </span>
         <span class="c"># n-terminus:</span>
         <span class="c"># - bb_list: covers the full thing being sampled (incl. stuff in gap)</span>
-        <span class="c"># - initial_n_ter_bb_list: n-terminal residues before the fragment</span>
-        <span class="c">#                          insertion position</span>
+        <span class="c"># - initial_n_stem: n-stem residue before the fragment insertion</span>
         <span class="c">#</span>
         <span class="c"># After having found the ideal fragment, we cannot simply insert it into</span>
         <span class="c"># the model, since all sidechain information would be lost.</span>
-        <span class="c"># We therefore need the initial_n_ter_bb_list to store the initial</span>
+        <span class="c"># We therefore need the initial_n_stem to store the initial N stem</span>
         <span class="c"># positions. We can then calculate a transformation in the end and </span>
         <span class="c"># apply it manually in the end for the according atom positions.</span>
 
         <span class="c"># only put valid residues in bb_seq</span>
         <span class="n">first_num</span> <span class="o">=</span> <span class="n">actual_chain</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span>
-        <span class="n">bb_seq</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">seqres</span><span class="p">[</span><span class="n">actual_chain_idx</span><span class="p">][</span><span class="n">first_num</span><span class="o">-</span><span class="mi">1</span><span class="p">:</span><span class="n">c_res_num</span><span class="p">]</span>
+        <span class="n">bb_seq</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">seqres</span><span class="p">[</span><span class="n">actual_chain_idx</span><span class="p">][</span><span class="n">first_num</span><span class="o">-</span><span class="mi">1</span><span class="p">:</span><span class="n">c_stem_res_num</span><span class="p">]</span>
         <span class="n">bb_list</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">BackboneList</span><span class="p">(</span><span class="n">bb_seq</span><span class="p">)</span>
         <span class="n">actual_res_num</span> <span class="o">=</span> <span class="n">ost</span><span class="o">.</span><span class="n">mol</span><span class="o">.</span><span class="n">ResNum</span><span class="p">(</span><span class="n">first_num</span><span class="p">)</span>
         <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">bb_seq</span><span class="p">)):</span>
             <span class="n">actual_res</span> <span class="o">=</span> <span class="n">actual_chain</span><span class="o">.</span><span class="n">FindResidue</span><span class="p">(</span><span class="n">actual_res_num</span><span class="p">)</span>
             <span class="k">if</span> <span class="n">actual_res</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
-                <span class="n">bb_list</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">Backbone</span><span class="p">(</span><span class="n">actual_res</span><span class="p">,</span> <span class="n">bb_seq</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
+                <span class="n">bb_list</span><span class="o">.</span><span class="n">Set</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">actual_res</span><span class="p">,</span> <span class="n">bb_seq</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
             <span class="n">actual_res_num</span> <span class="o">+=</span> <span class="mi">1</span>
 
-        <span class="c"># define region in fragger and region before</span>
-        <span class="n">frag_start_idx</span> <span class="o">=</span> <span class="n">n_res_num</span> <span class="o">-</span> <span class="n">first_num</span>
-        <span class="n">initial_n_ter_bb_list</span> <span class="o">=</span> <span class="n">bb_list</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">frag_start_idx</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span>
+        <span class="c"># define region in fragger and region before, including the n_stem of </span>
+        <span class="c"># the fragment</span>
+        <span class="n">frag_start_idx</span> <span class="o">=</span> <span class="n">n_stem_res_num</span> <span class="o">-</span> <span class="n">first_num</span>
+        <span class="n">initial_n_stem</span> <span class="o">=</span> <span class="n">bb_list</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">frag_start_idx</span><span class="p">,</span> <span class="n">frag_start_idx</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span>
 
         <span class="c"># all fragments get now sampled and scored</span>
         <span class="c"># the idea is to sample the fragments by moving the full part towards</span>
         <span class="c"># the n-terminus</span>
+        <span class="n">closer</span> <span class="o">=</span> <span class="n">NTerminalCloser</span><span class="p">(</span><span class="n">c_stem_res</span><span class="p">)</span>
         <span class="n">best_score</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="s">&quot;inf&quot;</span><span class="p">)</span>
         <span class="n">best_idx</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="n">scorer_weights</span> <span class="o">=</span> <span class="p">{</span><span class="s">&quot;clash&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s">&quot;reduced&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">}</span>
         <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">fragger</span><span class="p">)):</span>
 
-            <span class="n">fragment</span> <span class="o">=</span> <span class="n">fragger</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
-
-            <span class="c"># let&#39;s move the fragment to the right position relative to</span>
-            <span class="c"># bb_list and insert it</span>
-            <span class="n">t</span> <span class="o">=</span> <span class="n">fragment</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">GetTransform</span><span class="p">(</span><span class="n">bb_list</span><span class="p">[</span><span class="n">frag_start_idx</span><span class="p">])</span>
-            <span class="n">fragment</span><span class="o">.</span><span class="n">ApplyTransform</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
-            <span class="n">bb_list</span><span class="o">.</span><span class="n">ReplaceFragment</span><span class="p">(</span><span class="n">fragger</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">frag_start_idx</span><span class="p">,</span> <span class="bp">False</span><span class="p">)</span>
-
-            <span class="c"># lets transform the overall bb_list to the right position</span>
-            <span class="c"># this represents the full stretch towards the n-terminus</span>
-            <span class="n">t</span> <span class="o">=</span> <span class="n">bb_list</span><span class="p">[</span><span class="nb">len</span><span class="p">(</span><span class="n">bb_list</span><span class="p">)</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">GetTransform</span><span class="p">(</span><span class="n">c_res</span><span class="p">)</span>
-            <span class="n">bb_list</span><span class="o">.</span><span class="n">ApplyTransform</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
+            <span class="n">bb_list</span><span class="o">.</span><span class="n">ReplaceFragment</span><span class="p">(</span><span class="n">fragger</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">frag_start_idx</span><span class="p">,</span> <span class="bp">True</span><span class="p">)</span>
+            <span class="n">closer</span><span class="o">.</span><span class="n">Close</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="n">bb_list</span><span class="p">)</span>
 
             <span class="c"># a simple score gets calculated and best chosen</span>
-            <span class="n">score</span> <span class="o">=</span> <span class="n">scorer</span><span class="o">.</span><span class="n">CalculateReducedScore</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="n">first_num</span><span class="p">,</span>
-                                                 <span class="n">actual_chain_idx</span><span class="p">)</span>
-            <span class="n">score</span> <span class="o">+=</span> <span class="n">scorer</span><span class="o">.</span><span class="n">CalculateClashScore</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="n">first_num</span><span class="p">,</span>
-                                                <span class="n">actual_chain_idx</span><span class="p">)</span>
+            <span class="n">score</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">backbone_scorer</span><span class="o">.</span><span class="n">CalculateLinearCombination</span><span class="p">(</span>\
+                        <span class="n">scorer_weights</span><span class="p">,</span> <span class="n">bb_list</span><span class="p">,</span> <span class="n">first_num</span><span class="p">,</span> <span class="n">actual_chain_idx</span><span class="p">)</span>
+
             <span class="k">if</span> <span class="n">score</span> <span class="o">&lt;</span> <span class="n">best_score</span><span class="p">:</span>
                 <span class="n">best_score</span> <span class="o">=</span> <span class="n">score</span>
                 <span class="n">best_idx</span> <span class="o">=</span> <span class="n">i</span>
 
-        <span class="c"># set best fragment into bb_list (need to reapply transforms)</span>
+        <span class="c"># set best fragment into bb_list and </span>
         <span class="n">fragment</span> <span class="o">=</span> <span class="n">fragger</span><span class="p">[</span><span class="n">best_idx</span><span class="p">]</span>
-        <span class="n">t</span> <span class="o">=</span> <span class="n">fragment</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">GetTransform</span><span class="p">(</span><span class="n">bb_list</span><span class="p">[</span><span class="n">frag_start_idx</span><span class="p">])</span>
-        <span class="n">fragment</span><span class="o">.</span><span class="n">ApplyTransform</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
-        <span class="n">bb_list</span><span class="o">.</span><span class="n">ReplaceFragment</span><span class="p">(</span><span class="n">fragment</span><span class="p">,</span> <span class="n">frag_start_idx</span><span class="p">,</span> <span class="bp">False</span><span class="p">)</span>
-        <span class="c"># lets transform the overall bb_list to the right position</span>
-        <span class="n">t</span> <span class="o">=</span> <span class="n">bb_list</span><span class="p">[</span><span class="nb">len</span><span class="p">(</span><span class="n">bb_list</span><span class="p">)</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">GetTransform</span><span class="p">(</span><span class="n">c_res</span><span class="p">)</span>
-        <span class="n">bb_list</span><span class="o">.</span><span class="n">ApplyTransform</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
+        <span class="n">bb_list</span><span class="o">.</span><span class="n">ReplaceFragment</span><span class="p">(</span><span class="n">fragment</span><span class="p">,</span> <span class="n">frag_start_idx</span><span class="p">,</span> <span class="bp">True</span><span class="p">)</span>
+        <span class="n">closer</span><span class="o">.</span><span class="n">Close</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="n">bb_list</span><span class="p">)</span>
+        <span class="c"># reextract fragment, since the whole thing has undergone a </span>
+        <span class="c"># transformation</span>
+        <span class="n">fragment</span> <span class="o">=</span> <span class="n">bb_list</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">frag_start_idx</span><span class="p">,</span> <span class="n">frag_start_idx</span> <span class="o">+</span> 
+                                                   <span class="nb">len</span><span class="p">(</span><span class="n">fragment</span><span class="p">))</span>
 
         <span class="c"># We finally calculate the transformation from the initial positions</span>
         <span class="c"># of all residues towards the n-terminus and apply it manually.</span>
         <span class="c"># this is done to not loose all the sidechain information</span>
-        <span class="n">n_ter_bb_list</span> <span class="o">=</span> <span class="n">bb_list</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">frag_start_idx</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span>
-        <span class="n">t</span> <span class="o">=</span> <span class="n">initial_n_ter_bb_list</span><span class="o">.</span><span class="n">GetTransform</span><span class="p">(</span><span class="n">n_ter_bb_list</span><span class="p">)</span>
-        <span class="n">ed</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">EditXCS</span><span class="p">()</span>
+        <span class="n">t</span> <span class="o">=</span> <span class="n">initial_n_stem</span><span class="o">.</span><span class="n">GetTransform</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">bb_list</span><span class="p">,</span> <span class="n">frag_start_idx</span><span class="p">)</span>
+        <span class="n">ed</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">EditXCS</span><span class="p">(</span><span class="n">ost</span><span class="o">.</span><span class="n">mol</span><span class="o">.</span><span class="n">BUFFERED_EDIT</span><span class="p">)</span>
         <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">actual_chain</span><span class="o">.</span><span class="n">residues</span><span class="p">[:</span><span class="n">frag_start_idx</span><span class="p">]:</span>
             <span class="k">for</span> <span class="n">a</span> <span class="ow">in</span> <span class="n">r</span><span class="o">.</span><span class="n">atoms</span><span class="p">:</span>
                 <span class="n">new_pos</span> <span class="o">=</span> <span class="n">t</span> <span class="o">*</span> <span class="n">ost</span><span class="o">.</span><span class="n">geom</span><span class="o">.</span><span class="n">Vec4</span><span class="p">(</span><span class="n">a</span><span class="o">.</span><span class="n">GetPos</span><span class="p">())</span>
                 <span class="n">ed</span><span class="o">.</span><span class="n">SetAtomPos</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">ost</span><span class="o">.</span><span class="n">geom</span><span class="o">.</span><span class="n">Vec3</span><span class="p">(</span><span class="n">new_pos</span><span class="p">))</span>
+        <span class="n">ed</span><span class="o">.</span><span class="n">UpdateICS</span><span class="p">()</span>
 
         <span class="c"># replace fragment part</span>
-        <span class="n">fragment</span> <span class="o">=</span> <span class="n">bb_list</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">frag_start_idx</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">bb_list</span><span class="p">))</span>
-        <span class="n">fragment</span><span class="o">.</span><span class="n">InsertInto</span><span class="p">(</span><span class="n">actual_chain</span><span class="p">,</span> <span class="n">n_res_num</span><span class="p">)</span>
+        <span class="n">fragment</span><span class="o">.</span><span class="n">InsertInto</span><span class="p">(</span><span class="n">actual_chain</span><span class="p">,</span> <span class="n">n_stem_res_num</span><span class="p">)</span>
 
-        <span class="c"># update scorer</span>
-        <span class="n">scorer</span><span class="o">.</span><span class="n">SetEnvironment</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="n">first_num</span><span class="p">,</span> <span class="n">actual_chain_idx</span><span class="p">)</span>
+        <span class="c"># update score env. (manual to keep all atom sidechains)</span>
+        <span class="n">mhandle</span><span class="o">.</span><span class="n">backbone_scorer_env</span><span class="o">.</span><span class="n">SetEnvironment</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="n">first_num</span><span class="p">,</span>
+                                                   <span class="n">actual_chain_idx</span><span class="p">)</span>
         <span class="c"># will return -1 if last gap removed</span>
         <span class="n">gap_idx</span> <span class="o">=</span> <span class="n">ClearGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">actual_gap</span><span class="p">)</span>
 
         <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Resolved </span><span class="si">%s</span><span class="s"> by sampling </span><span class="si">%s</span><span class="s"> as linker&quot;</span> <span class="o">%</span> \
                     <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">gap_orig</span><span class="p">),</span> <span class="nb">str</span><span class="p">(</span><span class="n">actual_gap</span><span class="p">)))</span>
-        
+    
+    <span class="c"># reset all atom env. if it&#39;s set (changes are too drastic so we set all)</span>
+    <span class="k">if</span> <span class="n">IsAllAtomScoringSetUp</span><span class="p">(</span><span class="n">mhandle</span><span class="p">):</span>
+        <span class="n">mhandle</span><span class="o">.</span><span class="n">all_atom_sidechain_env</span><span class="o">.</span><span class="n">SetInitialEnvironment</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">)</span>
 
 <span class="c"># these methods will be exported into module</span></div>
-<span class="n">__all__</span> <span class="o">=</span> <span class="p">(</span><span class="s">&#39;SetupBackboneScorer&#39;</span><span class="p">,</span> <span class="s">&#39;CloseSmallDeletions&#39;</span><span class="p">,</span> <span class="s">&#39;MergeGapsByDistance&#39;</span><span class="p">,</span>
-           <span class="s">&#39;FillLoopsByDatabase&#39;</span><span class="p">,</span> <span class="s">&#39;FillLoopsByMonteCarlo&#39;</span><span class="p">,</span> <span class="s">&#39;ModelTermini&#39;</span><span class="p">,</span>
+<span class="n">__all__</span> <span class="o">=</span> <span class="p">(</span><span class="s">&#39;CloseSmallDeletions&#39;</span><span class="p">,</span> <span class="s">&#39;MergeGapsByDistance&#39;</span><span class="p">,</span> <span class="s">&#39;FillLoopsByDatabase&#39;</span><span class="p">,</span>
+           <span class="s">&#39;FillLoopsByMonteCarlo&#39;</span><span class="p">,</span> <span class="s">&#39;CloseGaps&#39;</span><span class="p">,</span> <span class="s">&#39;ModelTermini&#39;</span><span class="p">,</span> 
            <span class="s">&#39;CloseLargeDeletions&#39;</span><span class="p">)</span>
-
-<span class="c">#  LocalWords:  modeling stereochemically param idx init</span>
-<span class="c">#  LocalWords:  py ost pylint modelling promod CloseSmallDeletions</span>
-<span class="c">#  LocalWords:  fillloopsbydb tpl aln trg TLNGFTVPAGNTLV LNPDKGATVTMA mhandle</span>
-<span class="c">#  LocalWords:  NGGTLLIPNGTYHFLGIQMKSNVHIRVE AttachView CreateFullView len</span>
-<span class="c">#  LocalWords:  BuildRawModel SetupBackboneScorer FillLoopsByDatabase</span>
-<span class="c">#  LocalWords:  LoadFragDB LoadStructureDB LoadTorsionSamplerCoil dbs fasta</span>
-<span class="c">#  LocalWords:  rtype</span>
 </pre></div>
 
           </div>
@@ -1274,7 +1564,7 @@
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/_modules/promod3/modelling/_denovo.html b/doc/html/_modules/promod3/modelling/_denovo.html
new file mode 100644
index 00000000..73fb9e12
--- /dev/null
+++ b/doc/html/_modules/promod3/modelling/_denovo.html
@@ -0,0 +1,207 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>promod3.modelling._denovo &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../../../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../../../index.html" />
+    <link rel="up" title="promod3" href="../../promod3.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <h1>Source code for promod3.modelling._denovo</h1><div class="highlight"><pre>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">scoring</span><span class="p">,</span> <span class="n">loop</span>
+<span class="kn">from</span> <span class="nn">_modelling</span> <span class="kn">import</span> <span class="o">*</span>
+
+<div class="viewcode-block" id="GenerateDeNovoTrajectories"><a class="viewcode-back" href="../../../modelling/algorithms.html#promod3.modelling.GenerateDeNovoTrajectories">[docs]</a><span class="k">def</span> <span class="nf">GenerateDeNovoTrajectories</span><span class="p">(</span><span class="n">sequence</span><span class="p">,</span> 
+                               <span class="n">num_trajectories</span> <span class="o">=</span> <span class="mi">200</span><span class="p">,</span>
+                               <span class="n">avg_sampling_per_position</span> <span class="o">=</span> <span class="mi">600</span><span class="p">,</span>
+                               <span class="n">profile</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
+                               <span class="n">psipred_prediction</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
+                               <span class="n">fragment_handler</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
+                               <span class="n">scorer</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
+                               <span class="n">scoring_weights</span> <span class="o">=</span> <span class="bp">None</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Example de novo modelling pipeline based on Fragment sampling and</span>
+<span class="sd">    backbone scoring. Take this as a starting point for more advanced</span>
+<span class="sd">    de novo procedures.</span>
+
+<span class="sd">    :param sequence:    The sequence you want to sample</span>
+<span class="sd">    :type sequence:     :class:`str`</span>
+
+<span class="sd">    :param num_trajectories:  The number of sampling trajectories you</span>
+<span class="sd">                              want to generate </span>
+<span class="sd">    :type num_trajectories:   :class:`int`</span>
+
+<span class="sd">    </span>
+<span class="sd">    :param avg_sampling_per_position: Number of Monte Carlo sampling steps</span>
+<span class="sd">                                      the total number is: </span>
+<span class="sd">                                      len(**sequence**) * **avg_sampling_per_position** </span>
+
+<span class="sd">    :param profile:     The sequence profile for **sequence**. This increases the </span>
+<span class="sd">                        fragment search performance.</span>
+<span class="sd">    :type profile:      :class:`ost.seq.ProfileHandle`</span>
+
+<span class="sd">    :param psipred_prediction: The psipred prediction for **sequence**. This</span>
+<span class="sd">                               increases the fragment search performance</span>
+<span class="sd">    :type psipred_prediction:  :class:`promod3.loop.PsipredPrediction`</span>
+
+<span class="sd">    :param fragment_handler: You can provide already initialized fragments.</span>
+<span class="sd">                             If you pass this parameter, **profile** and</span>
+<span class="sd">                             **psipred_prediction** get neglected and do</span>
+<span class="sd">                             not influence the fragment search, the</span>
+<span class="sd">                             ones you initialized **fragment_handler** with</span>
+<span class="sd">                             get used instead.</span>
+<span class="sd">    :type fragment_handler:  :class:`promod3.modelling.FraggerHandle`</span>
+
+<span class="sd">    :param scorer:      Scorer doing the backbone scoring. If not provided, a </span>
+<span class="sd">                        default one gets loaded with default objects with</span>
+<span class="sd">                        following keys: clash, reduced, cb_packing, hbond, cbeta, </span>
+<span class="sd">                        torsion and pairwise </span>
+<span class="sd">    :type scorer:       :class:`promod3.scoring.BackboneOverallScorer`</span>
+
+<span class="sd">    :param scoring_weights: Linear weights for different scores. If not provided,</span>
+<span class="sd">                            the output of ScoringWeights.GetWeights() is used.</span>
+<span class="sd">                            Please note, that the weights must be consistent</span>
+<span class="sd">                            with the keys of the scores in **scorer**</span>
+<span class="sd">    :type scoring_weights:  :class:`dict`</span>
+
+<span class="sd">    :returns:           A :class:`promod3.loop.LoopCandidates` object containing</span>
+<span class="sd">                        **num_trajectories** elements for further processing</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+
+    <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">sequence</span><span class="p">)</span> <span class="o">&lt;</span> <span class="mi">9</span><span class="p">:</span>
+        <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s">&quot;Seq too short for Denovo sampling (min length 9)&quot;</span><span class="p">)</span>
+
+    <span class="c"># check whether profile / psipred_prediction are consistent if present</span>
+    <span class="k">if</span> <span class="n">profile</span> <span class="o">!=</span> <span class="bp">None</span><span class="p">:</span>
+      <span class="k">if</span> <span class="n">profile</span><span class="o">.</span><span class="n">sequence</span> <span class="o">!=</span> <span class="n">sequence</span><span class="p">:</span>
+          <span class="n">err</span> <span class="o">=</span> <span class="s">&quot;Sequence of profile must match input sequence!&quot;</span>
+          <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">err</span><span class="p">)</span>
+
+    <span class="k">if</span> <span class="n">psipred_prediction</span> <span class="o">!=</span> <span class="bp">None</span><span class="p">:</span>
+        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">sequence</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">psipred_prediction</span><span class="p">):</span>
+            <span class="n">err</span> <span class="o">=</span> <span class="s">&quot;psipred_prediction must be consistent with the input sequence!&quot;</span>
+            <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">err</span><span class="p">)</span>
+
+    <span class="k">if</span> <span class="n">fragment_handler</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
+        <span class="c"># we first have to build our own handler</span>
+        <span class="n">fragment_handler</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">FraggerHandle</span><span class="p">(</span><span class="n">sequence</span><span class="p">,</span> 
+                                                   <span class="n">profile</span> <span class="o">=</span> <span class="n">profile</span><span class="p">,</span> 
+                                                   <span class="n">psipred_pred</span> <span class="o">=</span> <span class="n">psipred_prediction</span><span class="p">)</span>
+    <span class="n">fragger_list</span> <span class="o">=</span> <span class="n">fragment_handler</span><span class="o">.</span><span class="n">GetList</span><span class="p">()</span>
+
+    <span class="k">if</span> <span class="n">scorer</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
+        <span class="c"># Lets setup a scorer with empty environment</span>
+        <span class="n">scorer</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">BackboneOverallScorer</span><span class="p">()</span>
+        <span class="n">scorer_env</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">BackboneScoreEnv</span><span class="p">(</span><span class="n">sequence</span><span class="p">)</span>
+        <span class="n">scorer</span><span class="p">[</span><span class="s">&quot;clash&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">ClashScorer</span><span class="p">()</span>
+        <span class="n">scorer</span><span class="p">[</span><span class="s">&quot;reduced&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">LoadReducedScorer</span><span class="p">()</span>
+        <span class="n">scorer</span><span class="p">[</span><span class="s">&quot;cb_packing&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">LoadCBPackingScorer</span><span class="p">()</span>
+        <span class="n">scorer</span><span class="p">[</span><span class="s">&quot;hbond&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">LoadHBondScorer</span><span class="p">()</span>
+        <span class="n">scorer</span><span class="p">[</span><span class="s">&quot;cbeta&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">LoadCBetaScorer</span><span class="p">()</span>
+        <span class="n">scorer</span><span class="p">[</span><span class="s">&quot;torsion&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">LoadTorsionScorer</span><span class="p">()</span>
+        <span class="n">scorer</span><span class="p">[</span><span class="s">&quot;pairwise&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">PairwiseScorer</span><span class="p">()</span>
+        <span class="n">scorer</span><span class="o">.</span><span class="n">AttachEnvironment</span><span class="p">(</span><span class="n">scorer_env</span><span class="p">)</span>
+
+    <span class="k">if</span> <span class="n">scoring_weights</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
+        <span class="n">scoring_weights</span> <span class="o">=</span> <span class="n">ScoringWeights</span><span class="o">.</span><span class="n">GetWeights</span><span class="p">()</span>
+
+    <span class="c"># the number of 109 is roughly the number of times we have to apply</span>
+    <span class="c"># a factor of 0.9 to 100 until it reaches a value of 0.001</span>
+    <span class="n">start_temperature</span> <span class="o">=</span> <span class="mi">100</span>
+    <span class="n">cooling_factor</span> <span class="o">=</span> <span class="mf">0.9</span>
+    <span class="n">sampling_steps</span> <span class="o">=</span> <span class="n">avg_sampling_per_position</span> <span class="o">*</span> <span class="nb">len</span><span class="p">(</span><span class="n">fragger_list</span><span class="p">)</span>
+    <span class="n">cooling_interval</span> <span class="o">=</span> <span class="n">sampling_steps</span> <span class="o">/</span> <span class="mi">109</span>
+
+    <span class="n">mc_sampler</span> <span class="o">=</span> <span class="n">FragmentSampler</span><span class="p">(</span><span class="n">sequence</span><span class="p">,</span> <span class="n">fragger_list</span><span class="p">,</span> 
+                                 <span class="n">init_fragments</span> <span class="o">=</span> <span class="mi">5</span><span class="p">)</span>
+    <span class="n">mc_closer</span> <span class="o">=</span> <span class="n">DeNovoCloser</span><span class="p">()</span>
+    <span class="n">mc_scorer</span> <span class="o">=</span> <span class="n">LinearScorer</span><span class="p">(</span><span class="n">scorer</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">scoring_weights</span><span class="p">)</span>
+    <span class="n">mc_cooler</span> <span class="o">=</span> <span class="n">ExponentialCooler</span><span class="p">(</span><span class="n">start_temperature</span><span class="p">,</span>
+                                  <span class="n">cooling_interval</span><span class="p">,</span>
+                                  <span class="n">cooling_factor</span><span class="p">)</span>
+
+    <span class="n">candidates</span> <span class="o">=</span> <span class="n">LoopCandidates</span><span class="o">.</span><span class="n">FillFromMonteCarloSampler</span><span class="p">(</span><span class="n">sequence</span><span class="p">,</span>
+                                                          <span class="n">num_trajectories</span><span class="p">,</span>
+                                                          <span class="n">sampling_steps</span><span class="p">,</span>
+                                                          <span class="n">mc_sampler</span><span class="p">,</span>
+                                                          <span class="n">mc_closer</span><span class="p">,</span>
+                                                          <span class="n">mc_scorer</span><span class="p">,</span>
+                                                          <span class="n">mc_cooler</span><span class="p">)</span>  
+    <span class="k">return</span> <span class="n">candidates</span></div>
+</pre></div>
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper"><div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="../../../index.html">Documentation overview</a><ul>
+  <li><a href="../../index.html">Module code</a><ul>
+  <li><a href="../../promod3.html">promod3</a><ul>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../../../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/_modules/promod3/modelling/_fragger_handle.html b/doc/html/_modules/promod3/modelling/_fragger_handle.html
new file mode 100644
index 00000000..e0ecbe0e
--- /dev/null
+++ b/doc/html/_modules/promod3/modelling/_fragger_handle.html
@@ -0,0 +1,439 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>promod3.modelling._fragger_handle &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../../../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../../../index.html" />
+    <link rel="up" title="promod3" href="../../promod3.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <h1>Source code for promod3.modelling._fragger_handle</h1><div class="highlight"><pre>
+<span class="sd">&#39;&#39;&#39;Python functionality to generate fraggers.&#39;&#39;&#39;</span>
+
+<span class="kn">from</span> <span class="nn">promod3.loop</span> <span class="kn">import</span> <span class="o">*</span>
+<span class="kn">from</span> <span class="nn">ost.conop</span> <span class="kn">import</span> <span class="n">OneLetterCodeToResidueName</span>
+<span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">seq</span>
+
+<span class="k">def</span> <span class="nf">_GetSizeIdx</span><span class="p">(</span><span class="n">frag_size</span><span class="p">):</span>
+    <span class="k">if</span> <span class="n">frag_size</span> <span class="o">&lt;=</span> <span class="mi">5</span><span class="p">:</span>
+        <span class="k">return</span> <span class="mi">0</span>
+    <span class="k">if</span> <span class="n">frag_size</span> <span class="o">&lt;=</span> <span class="mi">7</span><span class="p">:</span>
+        <span class="k">return</span> <span class="mi">1</span>
+    <span class="k">if</span> <span class="n">frag_size</span> <span class="o">&lt;=</span> <span class="mi">9</span><span class="p">:</span>
+        <span class="k">return</span> <span class="mi">2</span>
+    <span class="k">if</span> <span class="n">frag_size</span> <span class="o">&lt;=</span> <span class="mi">11</span><span class="p">:</span>
+        <span class="k">return</span> <span class="mi">3</span>
+    <span class="k">return</span> <span class="mi">4</span>
+
+<span class="k">def</span> <span class="nf">_GetWeights</span><span class="p">(</span><span class="n">weight_group</span><span class="p">,</span> <span class="n">frag_size</span><span class="p">):</span>
+
+    <span class="n">size_idx</span> <span class="o">=</span> <span class="n">_GetSizeIdx</span><span class="p">(</span><span class="n">frag_size</span><span class="p">)</span>
+
+    <span class="k">if</span> <span class="n">weight_group</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
+        <span class="c"># group one, it&#39;s only sequence similarity...</span>
+        <span class="k">return</span> <span class="p">[</span><span class="mf">1.0</span><span class="p">]</span>
+
+    <span class="k">elif</span> <span class="n">weight_group</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
+        <span class="c"># group two: [sequence_profile_weight, structure_profile_weight]</span>
+        <span class="k">if</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="o">-</span><span class="mf">1.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.404</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="o">-</span><span class="mf">1.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.112</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="o">-</span><span class="mf">1.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">2.424</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">3</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="o">-</span><span class="mf">1.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">5.131</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="o">-</span><span class="mf">1.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">6.703</span><span class="p">]</span> 
+
+    <span class="k">elif</span> <span class="n">weight_group</span> <span class="o">==</span> <span class="mi">3</span><span class="p">:</span>
+        <span class="c"># group_three: [ss_agreement_weight, torsion_weight, seqsim_weight] </span>
+        <span class="k">if</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">71.467</span><span class="p">,</span> <span class="mf">2.276</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">26.616</span><span class="p">,</span> <span class="mf">4.086</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">13.802</span><span class="p">,</span> <span class="mf">4.601</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">3</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">11.376</span><span class="p">,</span> <span class="mf">5.601</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">5.784</span><span class="p">,</span> <span class="mf">4.618</span><span class="p">]</span>
+
+    <span class="k">elif</span> <span class="n">weight_group</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
+        <span class="c"># group_four: [ss_agreement_weight, torsion_weight, </span>
+        <span class="c">#              sequence_profile_weight, structure_profile_weight]</span>
+        <span class="k">if</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">17.219</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.930</span><span class="p">,</span> <span class="o">-</span><span class="mf">3.328</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">19.561</span><span class="p">,</span> <span class="o">-</span><span class="mf">2.411</span><span class="p">,</span> <span class="o">-</span><span class="mf">6.060</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">27.523</span><span class="p">,</span> <span class="o">-</span><span class="mf">3.819</span><span class="p">,</span> <span class="o">-</span><span class="mf">8.318</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">3</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">17.009</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.805</span><span class="p">,</span> <span class="o">-</span><span class="mf">7.055</span><span class="p">]</span> 
+        <span class="k">elif</span> <span class="n">size_idx</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">6.526</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.798</span><span class="p">,</span> <span class="o">-</span><span class="mf">11.290</span><span class="p">]</span> 
+        
+
+<span class="k">def</span> <span class="nf">_SetupFragger_one</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">,</span> <span class="n">subst_mat</span><span class="p">):</span>
+    <span class="n">frag_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">)</span>
+    <span class="n">weights</span> <span class="o">=</span> <span class="n">_GetWeights</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">frag_size</span><span class="p">)</span>
+    <span class="n">fragger</span> <span class="o">=</span> <span class="n">Fragger</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">)</span>
+    <span class="n">fragger</span><span class="o">.</span><span class="n">AddSeqSimParameters</span><span class="p">(</span><span class="n">weights</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">subst_mat</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">fragger</span>
+
+
+<span class="k">def</span> <span class="nf">_SetupFragger_two</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">,</span> <span class="n">frag_profile</span><span class="p">):</span>
+    <span class="n">frag_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">)</span>
+    <span class="n">weights</span> <span class="o">=</span> <span class="n">_GetWeights</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">frag_size</span><span class="p">)</span>
+    <span class="n">fragger</span> <span class="o">=</span> <span class="n">Fragger</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">)</span>
+    <span class="n">fragger</span><span class="o">.</span><span class="n">AddSequenceProfileParameters</span><span class="p">(</span><span class="n">weights</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">frag_profile</span><span class="p">)</span>
+    <span class="n">fragger</span><span class="o">.</span><span class="n">AddStructureProfileParameters</span><span class="p">(</span><span class="n">weights</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">frag_profile</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">fragger</span>
+
+
+<span class="k">def</span> <span class="nf">_SetupFragger_three</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">,</span> <span class="n">frag_psipred_pred</span><span class="p">,</span>
+                        <span class="n">frag_t_samplers</span><span class="p">,</span>
+                        <span class="n">aa_before</span><span class="p">,</span> <span class="n">aa_after</span><span class="p">,</span>
+                        <span class="n">subst_matrix</span><span class="p">):</span>
+    <span class="n">frag_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">)</span>
+    <span class="n">weights</span> <span class="o">=</span> <span class="n">_GetWeights</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="n">frag_size</span><span class="p">)</span>
+    <span class="n">fragger</span> <span class="o">=</span> <span class="n">Fragger</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">)</span>
+    <span class="n">fragger</span><span class="o">.</span><span class="n">AddSSAgreeParameters</span><span class="p">(</span><span class="n">weights</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">frag_psipred_pred</span><span class="p">)</span>
+    <span class="n">fragger</span><span class="o">.</span><span class="n">AddTorsionProbabilityParameters</span><span class="p">(</span><span class="n">weights</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">frag_t_samplers</span><span class="p">,</span>
+                                            <span class="n">aa_before</span><span class="p">,</span> <span class="n">aa_after</span><span class="p">)</span>
+    <span class="n">fragger</span><span class="o">.</span><span class="n">AddSeqSimParameters</span><span class="p">(</span><span class="n">weights</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">subst_matrix</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">fragger</span>
+
+
+<span class="k">def</span> <span class="nf">_SetupFragger_four</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">,</span> <span class="n">frag_profile</span><span class="p">,</span> 
+                       <span class="n">frag_psipred_pred</span><span class="p">,</span>
+                       <span class="n">frag_t_samplers</span><span class="p">,</span>
+                       <span class="n">aa_before</span><span class="p">,</span> <span class="n">aa_after</span><span class="p">):</span>
+    <span class="n">frag_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">)</span>
+    <span class="n">weights</span> <span class="o">=</span> <span class="n">_GetWeights</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="n">frag_size</span><span class="p">)</span>
+    <span class="n">fragger</span> <span class="o">=</span> <span class="n">Fragger</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">)</span>
+    <span class="n">fragger</span><span class="o">.</span><span class="n">AddSSAgreeParameters</span><span class="p">(</span><span class="n">weights</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">frag_psipred_pred</span><span class="p">)</span>
+    <span class="n">fragger</span><span class="o">.</span><span class="n">AddTorsionProbabilityParameters</span><span class="p">(</span><span class="n">weights</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">frag_t_samplers</span><span class="p">,</span>
+                                            <span class="n">aa_before</span><span class="p">,</span> <span class="n">aa_after</span><span class="p">)</span>
+    <span class="n">fragger</span><span class="o">.</span><span class="n">AddSequenceProfileParameters</span><span class="p">(</span><span class="n">weights</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">frag_profile</span><span class="p">)</span>
+    <span class="n">fragger</span><span class="o">.</span><span class="n">AddStructureProfileParameters</span><span class="p">(</span><span class="n">weights</span><span class="p">[</span><span class="mi">3</span><span class="p">],</span> <span class="n">frag_profile</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">fragger</span>
+                       
+
+<div class="viewcode-block" id="FraggerHandle"><a class="viewcode-back" href="../../../modelling/algorithms.html#promod3.modelling.FraggerHandle">[docs]</a><span class="k">class</span> <span class="nc">FraggerHandle</span><span class="p">:</span>
+    <span class="sd">&#39;&#39;&#39;Handler for :class:`~promod3.loop.Fragger` objects linked to a </span>
+<span class="sd">    specific chain.</span>
+
+<span class="sd">    Tries to get the most accurate fragments given your input.</span>
+<span class="sd">    You can only provide a SEQRES, the returned fragments are</span>
+<span class="sd">    then searched by using sequence similarity as the only target value.</span>
+<span class="sd">    You can massively increase the accuracy of the found fragments by</span>
+<span class="sd">    providing a secondary structure prediction and / or sequence profile.</span>
+
+<span class="sd">    Following features influence the fragment search given your input:</span>
+
+<span class="sd">    * **sequence**: </span>
+
+<span class="sd">      * Sequence Similarity with BLOSUM62</span>
+
+<span class="sd">    * **sequence**, **psipred_pred**:</span>
+
+<span class="sd">      * Sequence Similarity with BLOSUM62</span>
+<span class="sd">      * Secondary Structure Agreement</span>
+<span class="sd">      * Secondary Structure Dependent Torsion Probabilities</span>
+
+<span class="sd">    * **sequence**, **profile**:</span>
+
+<span class="sd">      * Sequence Profile Score</span>
+<span class="sd">      * Structure Profile Score</span>
+
+<span class="sd">    * **sequence**, **psipred_pred**, **profile**:</span>
+
+<span class="sd">      * Secondary Structure Agreement</span>
+<span class="sd">      * Secondary Structure Dependent Torsion Probabilities</span>
+<span class="sd">      * Sequence Profile Score</span>
+<span class="sd">      * Structure Profile Score</span>
+
+<span class="sd">    The FraggerHandle internally uses the :class:`promod3.loop.FraggerMap` for caching. You</span>
+<span class="sd">    can therefore request fragments for a certain position several times and the</span>
+<span class="sd">    search is performed only once. This also allows to save the FraggerHandle to</span>
+<span class="sd">    disk. When loading the FraggerHandle again, you need to provide all parameters</span>
+<span class="sd">    again. These parameters must be exactly the same than the ones you used when</span>
+<span class="sd">    initially constructing the FraggerHandle, especially the structure database.</span>
+<span class="sd">    Weird things are happening otherwise.</span>
+
+<span class="sd">    :param sequence: SEQRES for this chain</span>
+<span class="sd">    :type sequence: :class:`str`/:class:`ost.seq.SequenceHandle`</span>
+<span class="sd">    :param profile: Sequence profile for this chain.</span>
+<span class="sd">    :type profile:  :class:`ost.seq.ProfileHandle`</span>
+<span class="sd">    :param psipred_pred: Psipred prediction for this chain.</span>
+<span class="sd">    :type psipred_pred:  :class:`promod3.loop.PsipredPrediction`</span>
+<span class="sd">    :param fragment_length: Length (num. residues) of fragments to be extracted.</span>
+<span class="sd">    :type fragment_length:  :class:`int`</span>
+<span class="sd">    :param fragments_per_position: Number of fragments to be extracted at each</span>
+<span class="sd">                                   position.</span>
+<span class="sd">    :type fragments_per_position:  :class:`int`</span>
+<span class="sd">    :param rmsd_thresh: To guarantee structural diversity, no pair of fragments</span>
+<span class="sd">                        at a given position will have RMSD below `rmsd_thresh`.</span>
+<span class="sd">    :type rmsd_thresh:  :class:`float`</span>
+<span class="sd">    :param structure_db: Source of structural data</span>
+<span class="sd">    :type structure_db:  :class:`promod3.loop.StructureDB`</span>
+<span class="sd">    :param torsion_sampler_coil: Torsion sampler for coil residues.</span>
+<span class="sd">    :type torsion_sampler_coil:  :class:`promod3.loop.TorsionSampler`</span>
+<span class="sd">    :param torsion_sampler_helix: Torsion sampler for helical residues.</span>
+<span class="sd">    :type torsion_sampler_helix:  :class:`promod3.loop.TorsionSampler`</span>
+<span class="sd">    :param torsion_sampler_extended: Torsion sampler for extended residues.</span>
+<span class="sd">    :type torsion_sampler_extended:  :class:`promod3.loop.TorsionSampler`</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span>
+                 <span class="n">sequence</span><span class="p">,</span> 
+                 <span class="n">profile</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span> 
+                 <span class="n">psipred_pred</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
+                 <span class="n">fragment_length</span> <span class="o">=</span> <span class="mi">9</span><span class="p">,</span>
+                 <span class="n">fragments_per_position</span> <span class="o">=</span> <span class="mi">100</span><span class="p">,</span>
+                 <span class="n">rmsd_thresh</span> <span class="o">=</span> <span class="mf">0.0</span><span class="p">,</span> 
+                 <span class="n">structure_db</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
+                 <span class="n">torsion_sampler_coil</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
+                 <span class="n">torsion_sampler_helix</span> <span class="o">=</span> <span class="bp">None</span><span class="p">,</span>
+                 <span class="n">torsion_sampler_extended</span> <span class="o">=</span> <span class="bp">None</span><span class="p">):</span>
+        <span class="c"># check</span>
+        <span class="k">if</span> <span class="n">profile</span> <span class="o">!=</span> <span class="bp">None</span><span class="p">:</span>
+            <span class="c"># can either be a SequenceHandle or simple string...</span>
+            <span class="k">try</span><span class="p">:</span>
+                <span class="k">if</span> <span class="n">sequence</span><span class="o">.</span><span class="n">GetString</span><span class="p">()</span> <span class="o">!=</span> <span class="n">profile</span><span class="o">.</span><span class="n">sequence</span><span class="p">:</span>
+                    <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s">&quot;Sequence must be consistent with profile!&quot;</span><span class="p">)</span>
+            <span class="k">except</span><span class="p">:</span>
+                <span class="k">if</span> <span class="n">sequence</span> <span class="o">!=</span> <span class="n">profile</span><span class="o">.</span><span class="n">sequence</span><span class="p">:</span>
+                    <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s">&quot;Sequence must be consistent with profile!&quot;</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="n">psipred_pred</span> <span class="o">!=</span> <span class="bp">None</span><span class="p">:</span>
+            <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">sequence</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">psipred_pred</span><span class="p">):</span>
+                <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s">&quot;Sequence must be consistent with PsipredPred!&quot;</span><span class="p">)</span>
+        
+        <span class="c"># keep all objects</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">sequence</span> <span class="o">=</span> <span class="n">sequence</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">profile</span> <span class="o">=</span> <span class="n">profile</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">psipred_pred</span> <span class="o">=</span> <span class="n">psipred_pred</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">fragment_length</span> <span class="o">=</span> <span class="n">fragment_length</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">fragments_per_position</span> <span class="o">=</span> <span class="n">fragments_per_position</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">rmsd_thresh</span> <span class="o">=</span> <span class="n">rmsd_thresh</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">subst_mat</span> <span class="o">=</span> <span class="n">seq</span><span class="o">.</span><span class="n">alg</span><span class="o">.</span><span class="n">BLOSUM62</span>
+
+        <span class="k">if</span> <span class="n">structure_db</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">structure_db</span> <span class="o">=</span> <span class="n">LoadStructureDB</span><span class="p">()</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">structure_db</span> <span class="o">=</span> <span class="n">structure_db</span>
+
+        <span class="c"># the torsion samplers are only required if we have a psipred prediction</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">samplers</span> <span class="o">=</span> <span class="bp">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_coil</span> <span class="o">=</span> <span class="bp">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_helix</span> <span class="o">=</span> <span class="bp">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_extended</span> <span class="o">=</span> <span class="bp">None</span>
+        <span class="k">if</span> <span class="n">psipred_pred</span> <span class="o">!=</span> <span class="bp">None</span><span class="p">:</span>
+
+            <span class="k">if</span> <span class="n">torsion_sampler_coil</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_coil</span> <span class="o">=</span> <span class="n">LoadTorsionSamplerCoil</span><span class="p">()</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_coil</span> <span class="o">=</span> <span class="n">torsion_sampler_coil</span>
+
+            <span class="k">if</span> <span class="n">torsion_sampler_helix</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_helix</span> <span class="o">=</span> <span class="n">LoadTorsionSamplerHelical</span><span class="p">()</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_helix</span> <span class="o">=</span> <span class="n">torsion_sampler_helix</span>
+
+            <span class="k">if</span> <span class="n">torsion_sampler_extended</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_extended</span> <span class="o">=</span> <span class="n">LoadTorsionSamplerExtended</span><span class="p">()</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_extended</span> <span class="o">=</span> <span class="n">torsion_sampler_extended</span>
+
+            <span class="bp">self</span><span class="o">.</span><span class="n">samplers</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_coil</span><span class="p">]</span> <span class="o">*</span> <span class="nb">len</span><span class="p">(</span><span class="n">psipred_pred</span><span class="p">)</span>
+            <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">psipred_pred</span><span class="p">)):</span>
+                <span class="k">if</span> <span class="n">psipred_pred</span><span class="o">.</span><span class="n">GetPrediction</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">==</span> <span class="s">&#39;H&#39;</span> \
+                   <span class="ow">and</span> <span class="n">psipred_pred</span><span class="o">.</span><span class="n">GetConfidence</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">&gt;=</span> <span class="mi">6</span><span class="p">:</span>
+                    <span class="bp">self</span><span class="o">.</span><span class="n">samplers</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_helix</span>  
+                <span class="k">if</span> <span class="n">psipred_pred</span><span class="o">.</span><span class="n">GetPrediction</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">==</span> <span class="s">&#39;E&#39;</span> \
+                   <span class="ow">and</span> <span class="n">psipred_pred</span><span class="o">.</span><span class="n">GetConfidence</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">&gt;=</span> <span class="mi">6</span><span class="p">:</span>
+                    <span class="bp">self</span><span class="o">.</span><span class="n">samplers</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">torsion_sampler_extended</span>
+        <span class="c"># prepare map</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">fragger_map</span> <span class="o">=</span> <span class="n">FraggerMap</span><span class="p">()</span>
+
+<div class="viewcode-block" id="FraggerHandle.Get"><a class="viewcode-back" href="../../../modelling/algorithms.html#promod3.modelling.FraggerHandle.Get">[docs]</a>    <span class="k">def</span> <span class="nf">Get</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">frag_pos</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Get fragger for sequence at index frag_pos..frag_pos+frag_length-1.</span>
+
+<span class="sd">        :param frag_pos: Start-index (note that sequence-indexing starts at 0)</span>
+<span class="sd">        :type frag_pos:  :class`int`</span>
+<span class="sd">        :return: A :class:`Fragger` object.</span>
+<span class="sd">        :raises: :exc:`~exceptions.ValueError` if index out-of-bounds.</span>
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="c"># this is for ranges (i.e. last touched index is end_pos-1)</span>
+        <span class="n">end_pos</span> <span class="o">=</span> <span class="n">frag_pos</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">fragment_length</span>
+        <span class="c"># check</span>
+        <span class="k">if</span> <span class="n">frag_pos</span> <span class="o">&lt;</span> <span class="mi">0</span> <span class="ow">or</span> <span class="n">end_pos</span> <span class="o">&gt;</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">sequence</span><span class="p">):</span>
+            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s">&quot;Invalid fragment position &quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">))</span>
+        <span class="c"># get</span>
+        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">fragger_map</span><span class="o">.</span><span class="n">Contains</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">):</span>
+
+            <span class="n">fragger</span> <span class="o">=</span> <span class="bp">None</span>
+            <span class="n">frag_sequence</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sequence</span><span class="p">[</span><span class="n">frag_pos</span><span class="p">:</span><span class="n">end_pos</span><span class="p">]</span>
+
+            <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">profile</span> <span class="o">!=</span> <span class="bp">None</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">psipred_pred</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
+                <span class="n">frag_profile</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">profile</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">,</span><span class="n">end_pos</span><span class="p">)</span>
+                <span class="n">fragger</span> <span class="o">=</span> <span class="n">_SetupFragger_two</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">,</span> <span class="n">frag_profile</span><span class="p">)</span>
+
+            <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">profile</span> <span class="o">==</span> <span class="bp">None</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">psipred_pred</span> <span class="o">!=</span> <span class="bp">None</span><span class="p">:</span>
+                <span class="n">frag_psipred_pred</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">psipred_pred</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">,</span> <span class="n">end_pos</span><span class="p">)</span>
+                <span class="n">frag_t_samplers</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">samplers</span><span class="p">[</span><span class="n">frag_pos</span><span class="p">:</span><span class="n">end_pos</span><span class="p">]</span>
+                <span class="n">fragger</span> <span class="o">=</span> <span class="n">_SetupFragger_three</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">,</span> <span class="n">frag_psipred_pred</span><span class="p">,</span>
+                                              <span class="n">frag_t_samplers</span><span class="p">,</span>
+                                              <span class="bp">self</span><span class="o">.</span><span class="n">_GetAABefore</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">),</span>
+                                              <span class="bp">self</span><span class="o">.</span><span class="n">_GetAAAfter</span><span class="p">(</span><span class="n">end_pos</span> <span class="o">-</span> <span class="mi">1</span><span class="p">),</span>
+                                              <span class="bp">self</span><span class="o">.</span><span class="n">subst_mat</span><span class="p">)</span>
+
+            <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">profile</span> <span class="o">!=</span> <span class="bp">None</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">psipred_pred</span> <span class="o">!=</span> <span class="bp">None</span><span class="p">:</span>
+                <span class="n">frag_profile</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">profile</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">,</span><span class="n">end_pos</span><span class="p">)</span>
+                <span class="n">frag_psipred_pred</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">psipred_pred</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">,</span> <span class="n">end_pos</span><span class="p">)</span>
+                <span class="n">frag_t_samplers</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">samplers</span><span class="p">[</span><span class="n">frag_pos</span><span class="p">:</span><span class="n">end_pos</span><span class="p">]</span>
+                <span class="n">fragger</span> <span class="o">=</span> <span class="n">_SetupFragger_four</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">,</span> <span class="n">frag_profile</span><span class="p">,</span> 
+                                             <span class="n">frag_psipred_pred</span><span class="p">,</span>
+                                             <span class="n">frag_t_samplers</span><span class="p">,</span>
+                                             <span class="bp">self</span><span class="o">.</span><span class="n">_GetAABefore</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">),</span>
+                                             <span class="bp">self</span><span class="o">.</span><span class="n">_GetAAAfter</span><span class="p">(</span><span class="n">end_pos</span> <span class="o">-</span> <span class="mi">1</span><span class="p">))</span>
+
+            <span class="k">else</span><span class="p">:</span>
+                <span class="n">fragger</span> <span class="o">=</span> <span class="n">_SetupFragger_one</span><span class="p">(</span><span class="n">frag_sequence</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">subst_mat</span><span class="p">)</span>
+
+            <span class="n">fragger</span><span class="o">.</span><span class="n">Fill</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">structure_db</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">rmsd_thresh</span><span class="p">,</span>
+                         <span class="bp">self</span><span class="o">.</span><span class="n">fragments_per_position</span><span class="p">)</span>
+
+            <span class="c"># keep cached</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">fragger_map</span><span class="p">[</span><span class="n">frag_pos</span><span class="p">]</span> <span class="o">=</span> <span class="n">fragger</span>
+
+        <span class="c"># get it back</span>
+        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">fragger_map</span><span class="p">[</span><span class="n">frag_pos</span><span class="p">]</span>
+</div>
+<div class="viewcode-block" id="FraggerHandle.GetList"><a class="viewcode-back" href="../../../modelling/algorithms.html#promod3.modelling.FraggerHandle.GetList">[docs]</a>    <span class="k">def</span> <span class="nf">GetList</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">pos_start</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">pos_end</span><span class="o">=-</span><span class="mi">1</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Get List of fraggers covering sequence indices pos_start..pos_end.</span>
+
+<span class="sd">        This will return an empty list if range is smaller than fragment_length.</span>
+
+<span class="sd">        :param pos_start: Start-index (note that sequence-indexing starts at 0)</span>
+<span class="sd">        :type pos_start:  :class`int`</span>
+<span class="sd">        :param pos_end: End-index or -1 if it should go to the sequence-end.</span>
+<span class="sd">        :type pos_end:  :class`int`</span>
+<span class="sd">        :return: A :class:`list` of :class:`Fragger` objects.</span>
+<span class="sd">        :raises: :exc:`~exceptions.ValueError` if indices out-of-bounds.</span>
+<span class="sd">        &#39;&#39;&#39;</span>
+        <span class="k">if</span> <span class="n">pos_end</span> <span class="o">==</span> <span class="o">-</span><span class="mi">1</span><span class="p">:</span>
+            <span class="n">pos_end</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">sequence</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span>
+        <span class="n">fragger_list</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+        <span class="k">for</span> <span class="n">frag_pos</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">pos_start</span><span class="p">,</span> <span class="n">pos_end</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">fragment_length</span> <span class="o">+</span> <span class="mi">2</span><span class="p">):</span>
+            <span class="n">fragger_list</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">Get</span><span class="p">(</span><span class="n">frag_pos</span><span class="p">))</span>
+        <span class="k">return</span> <span class="n">fragger_list</span>
+</div>
+<div class="viewcode-block" id="FraggerHandle.SaveCached"><a class="viewcode-back" href="../../../modelling/algorithms.html#promod3.modelling.FraggerHandle.SaveCached">[docs]</a>    <span class="k">def</span> <span class="nf">SaveCached</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filename</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Save cached fraggers.&#39;&#39;&#39;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">fragger_map</span><span class="o">.</span><span class="n">Save</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
+</div>
+<div class="viewcode-block" id="FraggerHandle.LoadCached"><a class="viewcode-back" href="../../../modelling/algorithms.html#promod3.modelling.FraggerHandle.LoadCached">[docs]</a>    <span class="k">def</span> <span class="nf">LoadCached</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filename</span><span class="p">):</span>
+        <span class="sd">&#39;&#39;&#39;Load fragger objects stored with :meth:`SaveCached`.</span>
+<span class="sd">        Note that here we require that the same structure db is set as was</span>
+<span class="sd">        used when `filename` was saved.&#39;&#39;&#39;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">fragger_map</span> <span class="o">=</span> <span class="n">FraggerMap</span><span class="o">.</span><span class="n">Load</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">structure_db</span><span class="p">)</span>
+</div>
+    <span class="k">def</span> <span class="nf">_GetAABefore</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">pos</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">pos</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
+            <span class="n">olc</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sequence</span><span class="p">[</span><span class="n">pos</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">olc</span> <span class="o">=</span> <span class="s">&#39;A&#39;</span>
+        <span class="n">aa_before</span> <span class="o">=</span> <span class="n">OneLetterCodeToResidueName</span><span class="p">(</span><span class="n">olc</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">aa_before</span>
+
+    <span class="k">def</span> <span class="nf">_GetAAAfter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">pos</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">pos</span> <span class="o">&lt;</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">sequence</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">:</span>
+            <span class="n">olc</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sequence</span><span class="p">[</span><span class="n">pos</span> <span class="o">+</span> <span class="mi">1</span><span class="p">]</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">olc</span> <span class="o">=</span> <span class="s">&#39;A&#39;</span>
+        <span class="n">aa_after</span> <span class="o">=</span> <span class="n">OneLetterCodeToResidueName</span><span class="p">(</span><span class="n">olc</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">aa_after</span>
+
+
+<span class="c"># these methods will be exported into module</span></div>
+<span class="n">__all__</span> <span class="o">=</span> <span class="p">(</span><span class="s">&#39;FraggerHandle&#39;</span><span class="p">,)</span>
+</pre></div>
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper"><div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="../../../index.html">Documentation overview</a><ul>
+  <li><a href="../../index.html">Module code</a><ul>
+  <li><a href="../../promod3.html">promod3</a><ul>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../../../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/_modules/promod3/modelling/_molprobity.html b/doc/html/_modules/promod3/modelling/_molprobity.html
new file mode 100644
index 00000000..d7a7cfc9
--- /dev/null
+++ b/doc/html/_modules/promod3/modelling/_molprobity.html
@@ -0,0 +1,205 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>promod3.modelling._molprobity &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../../../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../../../index.html" />
+    <link rel="up" title="promod3" href="../../promod3.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <h1>Source code for promod3.modelling._molprobity</h1><div class="highlight"><pre>
+<span class="sd">&#39;&#39;&#39;Binding to external MolProbity tool to get scores.&#39;&#39;&#39;</span>
+
+<span class="kn">import</span> <span class="nn">ost</span>
+<span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">settings</span>
+<span class="kn">import</span> <span class="nn">subprocess</span><span class="o">,</span> <span class="nn">tempfile</span><span class="o">,</span> <span class="nn">os</span>
+
+<div class="viewcode-block" id="RunMolProbity"><a class="viewcode-back" href="../../../modelling/model_checking.html#promod3.modelling.RunMolProbity">[docs]</a><span class="k">def</span> <span class="nf">RunMolProbity</span><span class="p">(</span><span class="n">target_pdb</span><span class="p">,</span> <span class="n">molprobity_bin</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Run ``MolProbity`` from ``Phenix`` on a given PDB file.</span>
+
+<span class="sd">    MolProbity score computation: (formula from molprobity source code)</span>
+
+<span class="sd">    .. code-block:: python</span>
+
+<span class="sd">        clashscore = result[&quot;Clashscore&quot;]</span>
+<span class="sd">        rota_out = result[&quot;Rotamer outliers&quot;]</span>
+<span class="sd">        rama_iffy = 100. - result[&quot;Ramachandran favored&quot;]</span>
+<span class="sd">        mpscore = (( 0.426 * math.log(1 + clashscore) ) +</span>
+<span class="sd">                 ( 0.33 * math.log(1 + max(0, rota_out - 1)) ) +</span>
+<span class="sd">                 ( 0.25 * math.log(1 + max(0, rama_iffy - 2)) )) + 0.5</span>
+<span class="sd">    </span>
+<span class="sd">    :param target_pdb: Path to PDB file on which to do analysis.</span>
+<span class="sd">    :type target_pdb:  :class:`str`</span>
+<span class="sd">    </span>
+<span class="sd">    :param molprobity_bin: Path to ``phenix.molprobity`` executable. If None, it</span>
+<span class="sd">                           searches for it in the ``PATH`` or (if set) in the</span>
+<span class="sd">                           env. variable ``MOLPROBITY_EXECUTABLE``.</span>
+<span class="sd">                           The function was tested with ``Phenix 1.9-1692`` and</span>
+<span class="sd">                           with ``MolProbity 4.2`` which also includes it.</span>
+<span class="sd">    :type molprobity_bin:  :class:`str`</span>
+
+<span class="sd">    :return: Dictionary with scores produced by MolProbity. Entries:</span>
+
+<span class="sd">             - &quot;Ramachandran outliers&quot; (percentage [0,100] as :class:`float`)</span>
+<span class="sd">             - &quot;Ramachandran favored&quot; (percentage [0,100] as :class:`float`)</span>
+<span class="sd">             - &quot;Rotamer outliers&quot; (percentage [0,100] as :class:`float`)</span>
+<span class="sd">             - &quot;C-beta deviations&quot; (:class:`int`)</span>
+<span class="sd">             - &quot;Clashscore&quot; (:class:`float`)</span>
+<span class="sd">             - &quot;MolProbity score&quot; (:class:`float`)</span>
+<span class="sd">             - &quot;RMS(bonds)&quot; (:class:`float`)</span>
+<span class="sd">             - &quot;RMS(angles)&quot; (:class:`float`)</span>
+
+<span class="sd">    :rtype: :class:`dict`</span>
+
+<span class="sd">    :raises: :class:`~ost.settings.FileNotFound` if the &quot;phenix.molprobity&quot;</span>
+<span class="sd">             executable is not found.</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="c"># HELPER</span>
+    <span class="k">def</span> <span class="nf">GetStringValue</span><span class="p">(</span><span class="n">my_line</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;Parse line formatted as &#39; bla  = X ...&#39; and return &#39;X&#39; as string.&quot;&quot;&quot;</span>
+        <span class="k">return</span> <span class="n">my_line</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s">&#39;=&#39;</span><span class="p">)[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s">&#39; &#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
+
+    <span class="c"># locate molprobity</span>
+    <span class="n">molprobity_exec</span> <span class="o">=</span> <span class="n">settings</span><span class="o">.</span><span class="n">Locate</span><span class="p">(</span><span class="s">&quot;phenix.molprobity&quot;</span><span class="p">,</span>
+                                      <span class="n">explicit_file_name</span><span class="o">=</span><span class="n">molprobity_bin</span><span class="p">,</span>
+                                      <span class="n">env_name</span><span class="o">=</span><span class="s">&#39;MOLPROBITY_EXECUTABLE&#39;</span><span class="p">)</span>
+    <span class="c"># run molprobity avoiding any file output</span>
+    <span class="n">cmd</span> <span class="o">=</span> <span class="p">[</span><span class="n">molprobity_exec</span><span class="p">,</span> <span class="n">target_pdb</span><span class="p">,</span> <span class="s">&quot;output.quiet=True&quot;</span><span class="p">,</span> \
+           <span class="s">&quot;output.coot=False&quot;</span><span class="p">,</span> <span class="s">&quot;output.probe_dots=False&quot;</span><span class="p">]</span>
+    <span class="n">job</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">Popen</span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span> <span class="n">stdout</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span> <span class="n">stderr</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">PIPE</span><span class="p">)</span>
+    <span class="n">sout</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">job</span><span class="o">.</span><span class="n">communicate</span><span class="p">()</span>
+    <span class="c"># parse</span>
+    <span class="n">result</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
+    <span class="n">first_found</span> <span class="o">=</span> <span class="bp">False</span>
+    <span class="n">lines</span> <span class="o">=</span> <span class="n">sout</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()</span>
+    <span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="n">lines</span><span class="p">:</span>
+        <span class="n">my_line</span> <span class="o">=</span> <span class="n">line</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
+        <span class="k">if</span> <span class="n">my_line</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&quot;ramachandran outliers&quot;</span><span class="p">):</span>
+            <span class="n">first_found</span> <span class="o">=</span> <span class="bp">True</span>
+            <span class="n">result</span><span class="p">[</span><span class="s">&quot;Ramachandran outliers&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">GetStringValue</span><span class="p">(</span><span class="n">line</span><span class="p">))</span>
+        <span class="k">elif</span> <span class="n">first_found</span> <span class="ow">and</span> <span class="n">my_line</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&quot;favored&quot;</span><span class="p">):</span>
+            <span class="n">result</span><span class="p">[</span><span class="s">&quot;Ramachandran favored&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">GetStringValue</span><span class="p">(</span><span class="n">line</span><span class="p">))</span>
+        <span class="k">elif</span> <span class="n">first_found</span> <span class="ow">and</span> <span class="n">my_line</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&quot;rotamer outliers&quot;</span><span class="p">):</span>
+            <span class="n">result</span><span class="p">[</span><span class="s">&quot;Rotamer outliers&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">GetStringValue</span><span class="p">(</span><span class="n">line</span><span class="p">))</span>
+        <span class="k">elif</span> <span class="n">first_found</span> <span class="ow">and</span> <span class="n">my_line</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&quot;clashscore&quot;</span><span class="p">):</span>
+            <span class="n">result</span><span class="p">[</span><span class="s">&quot;Clashscore&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">GetStringValue</span><span class="p">(</span><span class="n">line</span><span class="p">))</span>
+        <span class="k">elif</span> <span class="n">first_found</span> <span class="ow">and</span> <span class="n">my_line</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&quot;c-beta deviations&quot;</span><span class="p">):</span>
+            <span class="n">result</span><span class="p">[</span><span class="s">&quot;C-beta deviations&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">GetStringValue</span><span class="p">(</span><span class="n">line</span><span class="p">))</span>
+        <span class="k">elif</span> <span class="n">first_found</span> <span class="ow">and</span> <span class="n">my_line</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&quot;molprobity score&quot;</span><span class="p">):</span>
+            <span class="n">result</span><span class="p">[</span><span class="s">&quot;MolProbity score&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">GetStringValue</span><span class="p">(</span><span class="n">line</span><span class="p">))</span>
+        <span class="k">elif</span> <span class="n">first_found</span> <span class="ow">and</span> <span class="n">my_line</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&quot;rms(bonds)&quot;</span><span class="p">):</span>
+            <span class="n">result</span><span class="p">[</span><span class="s">&quot;RMS(bonds)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">GetStringValue</span><span class="p">(</span><span class="n">line</span><span class="p">))</span>
+        <span class="k">elif</span> <span class="n">first_found</span> <span class="ow">and</span> <span class="n">my_line</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&quot;rms(angles)&quot;</span><span class="p">):</span>
+            <span class="n">result</span><span class="p">[</span><span class="s">&quot;RMS(angles)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">GetStringValue</span><span class="p">(</span><span class="n">line</span><span class="p">))</span>
+    <span class="k">return</span> <span class="n">result</span>
+
+</div>
+<div class="viewcode-block" id="RunMolProbityEntity"><a class="viewcode-back" href="../../../modelling/model_checking.html#promod3.modelling.RunMolProbityEntity">[docs]</a><span class="k">def</span> <span class="nf">RunMolProbityEntity</span><span class="p">(</span><span class="n">ost_ent</span><span class="p">,</span> <span class="n">molprobity_bin</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Run molprobity from phenix on given OST entity.</span>
+<span class="sd">    </span>
+<span class="sd">    See :func:`RunMolProbity` for details.</span>
+
+<span class="sd">    :param ost_ent: OST entity on which to do analysis.</span>
+<span class="sd">    :type ost_ent:  :class:`Entity &lt;ost.mol.EntityHandle&gt;`</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="c"># store as PDB in a tmp. file</span>
+    <span class="n">_</span><span class="p">,</span> <span class="n">tmpfile</span> <span class="o">=</span> <span class="n">tempfile</span><span class="o">.</span><span class="n">mkstemp</span><span class="p">(</span><span class="n">suffix</span><span class="o">=</span><span class="s">&#39;.pdb&#39;</span><span class="p">)</span>
+    <span class="n">ost</span><span class="o">.</span><span class="n">PushVerbosityLevel</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
+    <span class="n">ost</span><span class="o">.</span><span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">ost_ent</span><span class="p">,</span> <span class="n">tmpfile</span><span class="p">)</span>
+    <span class="n">ost</span><span class="o">.</span><span class="n">PopVerbosityLevel</span><span class="p">()</span>
+    <span class="c"># get result</span>
+    <span class="n">result</span> <span class="o">=</span> <span class="n">RunMolProbity</span><span class="p">(</span><span class="n">tmpfile</span><span class="p">,</span> <span class="n">molprobity_bin</span><span class="p">)</span>
+    <span class="c"># clean up</span>
+    <span class="n">os</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="n">tmpfile</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">result</span>
+</div>
+<div class="viewcode-block" id="ReportMolProbityScores"><a class="viewcode-back" href="../../../modelling/model_checking.html#promod3.modelling.ReportMolProbityScores">[docs]</a><span class="k">def</span> <span class="nf">ReportMolProbityScores</span><span class="p">(</span><span class="n">scores</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Print MolProbity score and its components to LogInfo.</span>
+<span class="sd">    </span>
+<span class="sd">    :param scores: MolProbity scores as generated by :func:`RunMolProbity`.</span>
+<span class="sd">    :type scores:  :class:`dict`</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;MolProbity score: &quot;</span>  <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">scores</span><span class="p">[</span><span class="s">&quot;MolProbity score&quot;</span><span class="p">]))</span>
+    <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;- Clashscore          : &quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">scores</span><span class="p">[</span><span class="s">&quot;Clashscore&quot;</span><span class="p">]))</span>
+    <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;- Rotamer outliers    : &quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">scores</span><span class="p">[</span><span class="s">&quot;Rotamer outliers&quot;</span><span class="p">])</span> <span class="o">+</span> <span class="s">&quot; %&quot;</span><span class="p">)</span>
+    <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;- Ramachandran favored: &quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">scores</span><span class="p">[</span><span class="s">&quot;Ramachandran favored&quot;</span><span class="p">])</span> <span class="o">+</span> <span class="s">&quot; %&quot;</span><span class="p">)</span>
+</div>
+<span class="n">__all__</span> <span class="o">=</span> <span class="p">(</span><span class="s">&#39;RunMolProbity&#39;</span><span class="p">,</span> <span class="s">&#39;RunMolProbityEntity&#39;</span><span class="p">,</span> <span class="s">&#39;ReportMolProbityScores&#39;</span><span class="p">)</span>
+</pre></div>
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper"><div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="../../../index.html">Documentation overview</a><ul>
+  <li><a href="../../index.html">Module code</a><ul>
+  <li><a href="../../promod3.html">promod3</a><ul>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../../../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/_modules/promod3/modelling/_pipeline.html b/doc/html/_modules/promod3/modelling/_pipeline.html
index d77b0865..936538d7 100644
--- a/doc/html/_modules/promod3/modelling/_pipeline.html
+++ b/doc/html/_modules/promod3/modelling/_pipeline.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>promod3.modelling._pipeline &mdash; ProMod3 0 documentation</title>
+    <title>promod3.modelling._pipeline &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../../../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../../../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../../../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../../../index.html" />
     <link rel="up" title="promod3" href="../../promod3.html" />
    
   
@@ -44,25 +44,173 @@
 <span class="sd">&#39;&#39;&#39;</span>
 
 <span class="c"># internal</span>
-<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span>
-<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">sidechain</span>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span><span class="p">,</span> <span class="n">sidechain</span><span class="p">,</span> <span class="n">core</span>
 <span class="kn">from</span> <span class="nn">_modelling</span> <span class="kn">import</span> <span class="o">*</span>
+<span class="kn">from</span> <span class="nn">_reconstruct_sidechains</span> <span class="kn">import</span> <span class="o">*</span>
 <span class="kn">from</span> <span class="nn">_closegaps</span> <span class="kn">import</span> <span class="o">*</span>
 <span class="kn">from</span> <span class="nn">_ring_punches</span> <span class="kn">import</span> <span class="o">*</span>
 <span class="c"># external</span>
 <span class="kn">import</span> <span class="nn">ost</span>
-<span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">mol</span>
+<span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">mol</span><span class="p">,</span> <span class="n">conop</span>
 <span class="kn">from</span> <span class="nn">ost.mol</span> <span class="kn">import</span> <span class="n">mm</span>
-<span class="kn">import</span> <span class="nn">os</span>
+<span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">math</span>
+
+<span class="c">###############################################################################</span>
+<span class="c"># helper functions</span>
+<span class="k">def</span> <span class="nf">_RemoveHydrogens</span><span class="p">(</span><span class="n">ent</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Hydrogen naming depends on the force field used.</span>
+<span class="sd">    To be on the safe side, we simply remove all of them.</span>
+<span class="sd">    Note that the pipeline ignores hydrogens when building the raw model and</span>
+<span class="sd">    when rebuilding sidechains.</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">edi</span> <span class="o">=</span> <span class="n">ent</span><span class="o">.</span><span class="n">EditXCS</span><span class="p">(</span><span class="n">mol</span><span class="o">.</span><span class="n">BUFFERED_EDIT</span><span class="p">)</span>
+    <span class="n">ha</span> <span class="o">=</span> <span class="n">ent</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&#39;ele=H&#39;</span><span class="p">)</span>
+    <span class="k">for</span> <span class="n">a</span> <span class="ow">in</span> <span class="n">ha</span><span class="o">.</span><span class="n">atoms</span><span class="p">:</span>
+        <span class="n">edi</span><span class="o">.</span><span class="n">DeleteAtom</span><span class="p">(</span><span class="n">a</span><span class="o">.</span><span class="n">handle</span><span class="p">)</span>
+    <span class="n">edi</span><span class="o">.</span><span class="n">UpdateICS</span><span class="p">()</span>
+
+<span class="k">def</span> <span class="nf">_AddHeuristicHydrogens</span><span class="p">(</span><span class="n">ent</span><span class="p">,</span> <span class="n">ff</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Add hydrogens with mm.HeuristicHydrogenConstructor.&#39;&#39;&#39;</span>
+    <span class="k">for</span> <span class="n">res</span> <span class="ow">in</span> <span class="n">ent</span><span class="o">.</span><span class="n">residues</span><span class="p">:</span>
+        <span class="k">if</span> <span class="ow">not</span> <span class="n">res</span><span class="o">.</span><span class="n">IsPeptideLinking</span><span class="p">():</span>
+            <span class="n">bb</span> <span class="o">=</span> <span class="n">ff</span><span class="o">.</span><span class="n">GetBuildingBlock</span><span class="p">(</span><span class="n">res</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
+            <span class="n">edi</span> <span class="o">=</span> <span class="n">ent</span><span class="o">.</span><span class="n">EditXCS</span><span class="p">(</span><span class="n">mol</span><span class="o">.</span><span class="n">BUFFERED_EDIT</span><span class="p">)</span>
+            <span class="n">h_constructor</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">HeuristicHydrogenConstructor</span><span class="p">(</span><span class="n">bb</span><span class="p">)</span>
+            <span class="n">h_constructor</span><span class="o">.</span><span class="n">ApplyOnResidue</span><span class="p">(</span><span class="n">res</span><span class="p">,</span> <span class="n">edi</span><span class="p">)</span>
+            <span class="n">edi</span><span class="o">.</span><span class="n">UpdateICS</span><span class="p">()</span>
+
+<span class="k">def</span> <span class="nf">_GetTopology</span><span class="p">(</span><span class="n">ent</span><span class="p">,</span> <span class="n">settings</span><span class="p">,</span> <span class="n">force_fields</span><span class="p">,</span> <span class="n">add_heuristic_hydrogens</span><span class="o">=</span><span class="bp">False</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Return topology or None if no topology could be created.</span>
+<span class="sd">    Note: if successful, this will update ent (adding hydrogens).</span>
+<span class="sd">    Set add_heuristic_hydrogens to True for ligands.</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="c"># try all force fields in order</span>
+    <span class="k">for</span> <span class="n">i_ff</span><span class="p">,</span> <span class="n">ff</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">force_fields</span><span class="p">):</span>
+        <span class="n">settings</span><span class="o">.</span><span class="n">forcefield</span> <span class="o">=</span> <span class="n">ff</span>
+        <span class="k">try</span><span class="p">:</span>
+            <span class="c"># check if we need to add hydrogens heuristically</span>
+            <span class="k">if</span> <span class="n">add_heuristic_hydrogens</span><span class="p">:</span>
+                <span class="n">_AddHeuristicHydrogens</span><span class="p">(</span><span class="n">ent</span><span class="p">,</span> <span class="n">ff</span><span class="p">)</span>
+            <span class="c"># ok now we try...</span>
+            <span class="n">topo</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">TopologyCreator</span><span class="o">.</span><span class="n">Create</span><span class="p">(</span><span class="n">ent</span><span class="p">,</span> <span class="n">settings</span><span class="p">)</span>
+        <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">ex</span><span class="p">:</span>
+            <span class="c"># report only for debugging</span>
+            <span class="n">ost</span><span class="o">.</span><span class="n">LogVerbose</span><span class="p">(</span><span class="s">&quot;Could not create mm topology for ff </span><span class="si">%d</span><span class="s">. </span><span class="si">%s</span><span class="s">&quot;</span> \
+                           <span class="o">%</span> <span class="p">(</span><span class="n">i_ff</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="n">ex</span><span class="p">)</span><span class="o">.</span><span class="n">__name__</span> <span class="o">+</span> <span class="s">&quot;: &quot;</span> <span class="o">+</span> <span class="n">ex</span><span class="o">.</span><span class="n">message</span><span class="p">))</span>
+            <span class="k">continue</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="c"># all good</span>
+            <span class="k">return</span> <span class="n">topo</span>
+    <span class="c"># if we got here, nothing worked</span>
+    <span class="k">return</span> <span class="bp">None</span>
+
+<span class="k">def</span> <span class="nf">_AddLigands</span><span class="p">(</span><span class="n">ent</span><span class="p">,</span> <span class="n">top</span><span class="p">,</span> <span class="n">lig_ent</span><span class="p">,</span> <span class="n">settings</span><span class="p">,</span> <span class="n">force_fields</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Add ligands from lig_ent to topology top and update entity ent.&#39;&#39;&#39;</span>
+    <span class="c"># connect them first</span>
+    <span class="n">proc</span> <span class="o">=</span> <span class="n">conop</span><span class="o">.</span><span class="n">RuleBasedProcessor</span><span class="p">(</span><span class="n">conop</span><span class="o">.</span><span class="n">GetDefaultLib</span><span class="p">())</span>
+    <span class="n">proc</span><span class="o">.</span><span class="n">Process</span><span class="p">(</span><span class="n">lig_ent</span><span class="p">)</span>
+    <span class="n">cur_res</span> <span class="o">=</span> <span class="n">lig_ent</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
+    <span class="n">lig_num</span> <span class="o">=</span> <span class="mi">1</span>
+    <span class="k">while</span> <span class="n">cur_res</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
+        <span class="c"># setup connected components</span>
+        <span class="n">cur_view</span> <span class="o">=</span> <span class="n">lig_ent</span><span class="o">.</span><span class="n">CreateEmptyView</span><span class="p">()</span>
+        <span class="n">cur_view</span><span class="o">.</span><span class="n">AddResidue</span><span class="p">(</span><span class="n">cur_res</span><span class="p">,</span> <span class="n">mol</span><span class="o">.</span><span class="n">INCLUDE_ATOMS</span><span class="p">)</span>
+        <span class="n">cur_res</span> <span class="o">=</span> <span class="n">cur_res</span><span class="o">.</span><span class="n">next</span>
+        <span class="k">while</span> <span class="n">cur_res</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">mol</span><span class="o">.</span><span class="n">InSequence</span><span class="p">(</span><span class="n">cur_res</span><span class="o">.</span><span class="n">prev</span><span class="p">,</span> <span class="n">cur_res</span><span class="p">):</span>
+            <span class="n">cur_view</span><span class="o">.</span><span class="n">AddResidue</span><span class="p">(</span><span class="n">cur_res</span><span class="p">,</span> <span class="n">mol</span><span class="o">.</span><span class="n">INCLUDE_ATOMS</span><span class="p">)</span>
+            <span class="n">cur_res</span> <span class="o">=</span> <span class="n">cur_res</span><span class="o">.</span><span class="n">next</span>
+        <span class="c"># try to add topology with special named chain</span>
+        <span class="n">cur_ent</span> <span class="o">=</span> <span class="n">mol</span><span class="o">.</span><span class="n">CreateEntityFromView</span><span class="p">(</span><span class="n">cur_view</span><span class="p">,</span> <span class="bp">True</span><span class="p">)</span>
+        <span class="n">edi</span> <span class="o">=</span> <span class="n">cur_ent</span><span class="o">.</span><span class="n">EditXCS</span><span class="p">()</span>
+        <span class="n">edi</span><span class="o">.</span><span class="n">RenameChain</span><span class="p">(</span><span class="n">cur_ent</span><span class="o">.</span><span class="n">chains</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="s">&#39;_&#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">lig_num</span><span class="p">))</span>
+        <span class="n">lig_num</span> <span class="o">+=</span> <span class="mi">1</span>
+        <span class="n">cur_top</span> <span class="o">=</span> <span class="n">_GetTopology</span><span class="p">(</span><span class="n">cur_ent</span><span class="p">,</span> <span class="n">settings</span><span class="p">,</span> <span class="n">force_fields</span><span class="p">,</span> <span class="bp">True</span><span class="p">)</span>
+        <span class="k">if</span> <span class="n">cur_top</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
+            <span class="n">view_res_str</span> <span class="o">=</span> <span class="nb">str</span><span class="p">([</span><span class="nb">str</span><span class="p">(</span><span class="n">r</span><span class="p">)</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">cur_view</span><span class="o">.</span><span class="n">residues</span><span class="p">])</span>
+            <span class="n">ost</span><span class="o">.</span><span class="n">LogError</span><span class="p">(</span><span class="s">&quot;Failed to add ligands &quot;</span> <span class="o">+</span> <span class="n">view_res_str</span> <span class="o">+</span> \
+                         <span class="s">&quot; for energy minimization! Skipping...&quot;</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="c"># merge into main topology</span>
+            <span class="n">cur_top</span><span class="o">.</span><span class="n">SetFudgeLJ</span><span class="p">(</span><span class="n">top</span><span class="o">.</span><span class="n">GetFudgeLJ</span><span class="p">())</span>
+            <span class="n">cur_top</span><span class="o">.</span><span class="n">SetFudgeQQ</span><span class="p">(</span><span class="n">top</span><span class="o">.</span><span class="n">GetFudgeQQ</span><span class="p">())</span>
+            <span class="n">top</span><span class="o">.</span><span class="n">Merge</span><span class="p">(</span><span class="n">ent</span><span class="p">,</span> <span class="n">cur_top</span><span class="p">,</span> <span class="n">cur_ent</span><span class="p">)</span>
+
+<span class="k">def</span> <span class="nf">_SetupMmSimulation</span><span class="p">(</span><span class="n">model</span><span class="p">,</span> <span class="n">force_fields</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Get mm simulation object for the model (incl. ligands in chain &quot;_&quot;).</span>
+<span class="sd">    This tries to generate a topology for the protein and for each connected</span>
+<span class="sd">    component in the ligand chain separately by evaluating the force fields in</span>
+<span class="sd">    the same order as given. Ligands without force fields are skipped.</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="s">&#39;pipeline::_SetupMmSimulation&#39;</span><span class="p">)</span>
+
+    <span class="c"># get general settings </span>
+    <span class="n">settings</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">Settings</span><span class="p">()</span>
+    <span class="n">settings</span><span class="o">.</span><span class="n">integrator</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">LangevinIntegrator</span><span class="p">(</span><span class="mi">310</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mf">0.002</span><span class="p">)</span>
+    <span class="n">settings</span><span class="o">.</span><span class="n">init_temperature</span> <span class="o">=</span> <span class="mi">0</span>
+    <span class="n">settings</span><span class="o">.</span><span class="n">nonbonded_method</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">NonbondedMethod</span><span class="o">.</span><span class="n">CutoffNonPeriodic</span>
+    <span class="n">settings</span><span class="o">.</span><span class="n">keep_ff_specific_naming</span> <span class="o">=</span> <span class="bp">False</span>
+    
+    <span class="c"># prepare entity with protein</span>
+    <span class="n">_RemoveHydrogens</span><span class="p">(</span><span class="n">model</span><span class="p">)</span>
+    <span class="n">ent</span> <span class="o">=</span> <span class="n">mol</span><span class="o">.</span><span class="n">CreateEntityFromView</span><span class="p">(</span><span class="n">model</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;cname!=&#39;_&#39;&quot;</span><span class="p">),</span> <span class="bp">True</span><span class="p">)</span>
+    <span class="n">top</span> <span class="o">=</span> <span class="n">_GetTopology</span><span class="p">(</span><span class="n">ent</span><span class="p">,</span> <span class="n">settings</span><span class="p">,</span> <span class="n">force_fields</span><span class="p">)</span>
+    <span class="k">if</span> <span class="n">top</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
+        <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s">&quot;Failed to setup protein for energy minimization!&quot;</span><span class="p">)</span>
+    
+    <span class="c"># prepare ligands: we reprocess them to ensure connectivity</span>
+    <span class="n">lig_ent</span> <span class="o">=</span> <span class="n">mol</span><span class="o">.</span><span class="n">CreateEntityFromView</span><span class="p">(</span><span class="n">model</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;cname=&#39;_&#39;&quot;</span><span class="p">),</span> <span class="bp">True</span><span class="p">)</span>
+    <span class="k">if</span> <span class="n">lig_ent</span><span class="o">.</span><span class="n">residue_count</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
+        <span class="n">_AddLigands</span><span class="p">(</span><span class="n">ent</span><span class="p">,</span> <span class="n">top</span><span class="p">,</span> <span class="n">lig_ent</span><span class="p">,</span> <span class="n">settings</span><span class="p">,</span> <span class="n">force_fields</span><span class="p">)</span>
 
-<div class="viewcode-block" id="BuildSidechains"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.BuildSidechains">[docs]</a><span class="k">def</span> <span class="nf">BuildSidechains</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">merge_distance</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">scorer</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">fragment_db</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
+    <span class="c"># use fast CPU platform by default</span>
+    <span class="c"># NOTE: settings.platform only relevant for mm.Simulation!</span>
+    <span class="n">settings</span><span class="o">.</span><span class="n">platform</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">Platform</span><span class="o">.</span><span class="n">CPU</span>
+    <span class="k">if</span> <span class="n">mm</span><span class="o">.</span><span class="n">Simulation</span><span class="o">.</span><span class="n">IsPlatformAvailable</span><span class="p">(</span><span class="n">settings</span><span class="p">):</span>
+        <span class="n">num_cpu_threads</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getenv</span><span class="p">(</span><span class="s">&#39;PM3_OPENMM_CPU_THREADS&#39;</span><span class="p">)</span>
+        <span class="k">if</span> <span class="n">num_cpu_threads</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
+            <span class="n">settings</span><span class="o">.</span><span class="n">cpu_properties</span><span class="p">[</span><span class="s">&quot;CpuThreads&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s">&quot;1&quot;</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">settings</span><span class="o">.</span><span class="n">cpu_properties</span><span class="p">[</span><span class="s">&quot;CpuThreads&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">num_cpu_threads</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="c"># switch to &quot;mm.Platform.Reference&quot; as fallback</span>
+        <span class="n">settings</span><span class="o">.</span><span class="n">platform</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">Platform</span><span class="o">.</span><span class="n">Reference</span>
+        <span class="n">ost</span><span class="o">.</span><span class="n">LogWarning</span><span class="p">(</span><span class="s">&quot;Switched to slower reference platform of OpenMM!&quot;</span><span class="p">)</span>
+    <span class="c"># finally set up the simulation</span>
+    <span class="n">sim</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">Simulation</span><span class="p">(</span><span class="n">top</span><span class="p">,</span> <span class="n">ent</span><span class="p">,</span> <span class="n">settings</span><span class="p">)</span>
+        
+    <span class="k">return</span> <span class="n">sim</span>
+
+<span class="k">def</span> <span class="nf">_GetSimEntity</span><span class="p">(</span><span class="n">sim</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Get Entity from mm sim and reverse ligand chain naming.&#39;&#39;&#39;</span>
+    <span class="n">ent</span> <span class="o">=</span> <span class="n">sim</span><span class="o">.</span><span class="n">GetEntity</span><span class="p">()</span><span class="o">.</span><span class="n">Copy</span><span class="p">()</span>
+    <span class="c"># merge ligand chains into _</span>
+    <span class="n">ent_ed</span> <span class="o">=</span> <span class="n">ent</span><span class="o">.</span><span class="n">EditXCS</span><span class="p">(</span><span class="n">mol</span><span class="o">.</span><span class="n">BUFFERED_EDIT</span><span class="p">)</span>
+    <span class="n">chain_names</span> <span class="o">=</span> <span class="p">[</span><span class="n">ch</span><span class="o">.</span><span class="n">name</span> <span class="k">for</span> <span class="n">ch</span> <span class="ow">in</span> <span class="n">ent</span><span class="o">.</span><span class="n">chains</span><span class="p">]</span>
+    <span class="k">for</span> <span class="n">chain_name</span> <span class="ow">in</span> <span class="n">chain_names</span><span class="p">:</span>
+        <span class="c"># all separate ligand chains start with _</span>
+        <span class="k">if</span> <span class="n">chain_name</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;_&#39;</span><span class="p">:</span>
+            <span class="c"># add to chain _</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="n">ent</span><span class="o">.</span><span class="n">FindChain</span><span class="p">(</span><span class="s">&#39;_&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
+                <span class="n">ent_ed</span><span class="o">.</span><span class="n">InsertChain</span><span class="p">(</span><span class="s">&#39;_&#39;</span><span class="p">)</span>
+            <span class="n">lig_ch</span> <span class="o">=</span> <span class="n">ent</span><span class="o">.</span><span class="n">FindChain</span><span class="p">(</span><span class="s">&#39;_&#39;</span><span class="p">)</span>
+            <span class="n">cur_ch</span> <span class="o">=</span> <span class="n">ent</span><span class="o">.</span><span class="n">FindChain</span><span class="p">(</span><span class="n">chain_name</span><span class="p">)</span>
+            <span class="k">for</span> <span class="n">res</span> <span class="ow">in</span> <span class="n">cur_ch</span><span class="o">.</span><span class="n">residues</span><span class="p">:</span>
+                <span class="n">ent_ed</span><span class="o">.</span><span class="n">AppendResidue</span><span class="p">(</span><span class="n">lig_ch</span><span class="p">,</span> <span class="n">res</span><span class="p">,</span> <span class="n">deep</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+            <span class="c"># remove old chain</span>
+            <span class="n">ent_ed</span><span class="o">.</span><span class="n">DeleteChain</span><span class="p">(</span><span class="n">cur_ch</span><span class="p">)</span>
+    <span class="n">ent_ed</span><span class="o">.</span><span class="n">UpdateICS</span><span class="p">()</span>
+    <span class="k">return</span> <span class="n">ent</span>
+<span class="c">###############################################################################</span>
+
+
+<div class="viewcode-block" id="BuildSidechains"><a class="viewcode-back" href="../../../modelling/pipeline.html#promod3.modelling.BuildSidechains">[docs]</a><span class="k">def</span> <span class="nf">BuildSidechains</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">merge_distance</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">fragment_db</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
                     <span class="n">structure_db</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">torsion_sampler</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Build sidechains for model.</span>
 
-<span class="sd">    This is a wrapper for :func:`promod3.sidechain.Reconstruct`, followed</span>
-<span class="sd">    by a check for ring punches. If ring punches are found it introduces gaps</span>
-<span class="sd">    for the residues with punched rings and tries to fill them with </span>
-<span class="sd">    :func:`FillLoopsByDatabase` with *ring_punch_detection=2*.</span>
+<span class="sd">    This is a wrapper for :func:`promod3.modelling.ReconstructSidechains`, </span>
+<span class="sd">    followed by a check for ring punches. If ring punches are found it </span>
+<span class="sd">    introduces gaps for the residues with punched rings and tries to fill them </span>
+<span class="sd">    with :func:`FillLoopsByDatabase` with *ring_punch_detection=2*.</span>
 
 <span class="sd">    :param mhandle: Modelling handle on which to apply change.</span>
 <span class="sd">    :type mhandle:  :class:`ModellingHandle`</span>
@@ -70,10 +218,6 @@
 <span class="sd">    :param merge_distance:  Used as parameter for :func:`MergeGapsByDistance`</span>
 <span class="sd">                            if ring punches are found.</span>
 <span class="sd">    :type merge_distance:   :class:`int`</span>
-<span class="sd">    :param scorer:          Used as parameter for :func:`FillLoopsByDatabase`</span>
-<span class="sd">                            if ring punches are found. A default one is created</span>
-<span class="sd">                            if None.</span>
-<span class="sd">    :type scorer:           :class:`~promod3.loop.BackboneLoopScorer`</span>
 <span class="sd">    :param fragment_db:     Used as parameter for :func:`FillLoopsByDatabase`</span>
 <span class="sd">                            if ring punches are found. A default one is loaded</span>
 <span class="sd">                            if None.</span>
@@ -87,8 +231,9 @@
 <span class="sd">                            if None.</span>
 <span class="sd">    :type torsion_sampler:  :class:`~promod3.loop.TorsionSampler`</span>
 <span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="s">&#39;pipeline::BuildSidechains&#39;</span><span class="p">)</span>
     <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Rebuilding sidechains.&quot;</span><span class="p">)</span>
-    <span class="n">sidechain</span><span class="o">.</span><span class="n">Reconstruct</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+    <span class="n">ReconstructSidechains</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
     <span class="c"># check for ring punches</span>
     <span class="n">rings</span> <span class="o">=</span> <span class="n">GetRings</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">)</span>
     <span class="n">ring_punches</span> <span class="o">=</span> <span class="n">GetRingPunches</span><span class="p">(</span><span class="n">rings</span><span class="p">,</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">)</span>
@@ -98,13 +243,13 @@
         <span class="c"># backup old gaps</span>
         <span class="n">old_gaps</span> <span class="o">=</span> <span class="p">[</span><span class="n">g</span><span class="o">.</span><span class="n">Copy</span><span class="p">()</span> <span class="k">for</span> <span class="n">g</span> <span class="ow">in</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">]</span>
         <span class="c"># new gaps for mhandle</span>
+        <span class="c"># NOTE: we currently do not delete the punched residues here</span>
+        <span class="c">#       BUT they could be deleted when merging gaps below...</span>
         <span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span> <span class="o">=</span> <span class="n">StructuralGapList</span><span class="p">()</span>
         <span class="k">for</span> <span class="n">res</span> <span class="ow">in</span> <span class="n">ring_punches</span><span class="p">:</span>
             <span class="n">mygap</span> <span class="o">=</span> <span class="n">StructuralGap</span><span class="p">(</span><span class="n">res</span><span class="o">.</span><span class="n">prev</span><span class="p">,</span> <span class="n">res</span><span class="o">.</span><span class="n">next</span><span class="p">,</span> <span class="n">res</span><span class="o">.</span><span class="n">one_letter_code</span><span class="p">)</span>
             <span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">mygap</span><span class="p">)</span>
         <span class="c"># load stuff if needed</span>
-        <span class="k">if</span> <span class="n">scorer</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
-            <span class="n">scorer</span> <span class="o">=</span> <span class="n">SetupBackboneScorer</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span>
         <span class="k">if</span> <span class="n">fragment_db</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</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="k">if</span> <span class="n">structure_db</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
@@ -113,18 +258,19 @@
             <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="c"># fix it</span>
         <span class="n">MergeGapsByDistance</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">FillLoopsByDatabase</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</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">FillLoopsByDatabase</span><span class="p">(</span><span class="n">mhandle</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="n">ring_punch_detection</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
         <span class="c"># re-build sidechains</span>
-        <span class="n">sidechain</span><span class="o">.</span><span class="n">Reconstruct</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+        <span class="n">ReconstructSidechains</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
         <span class="c"># restore gaps</span>
         <span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span> <span class="o">=</span> <span class="n">StructuralGapList</span><span class="p">()</span>
         <span class="k">for</span> <span class="n">g</span> <span class="ow">in</span> <span class="n">old_gaps</span><span class="p">:</span>
             <span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">g</span><span class="p">)</span>
             
 </div>
-<div class="viewcode-block" id="MinimizeModelEnergy"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.MinimizeModelEnergy">[docs]</a><span class="k">def</span> <span class="nf">MinimizeModelEnergy</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">max_iterations</span><span class="o">=</span><span class="mi">12</span><span class="p">,</span> <span class="n">max_iter_sd</span><span class="o">=</span><span class="mi">20</span><span class="p">,</span>
-                        <span class="n">max_iter_lbfgs</span><span class="o">=</span><span class="mi">10</span><span class="p">):</span>
+<div class="viewcode-block" id="MinimizeModelEnergy"><a class="viewcode-back" href="../../../modelling/pipeline.html#promod3.modelling.MinimizeModelEnergy">[docs]</a><span class="k">def</span> <span class="nf">MinimizeModelEnergy</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">max_iterations</span><span class="o">=</span><span class="mi">12</span><span class="p">,</span> <span class="n">max_iter_sd</span><span class="o">=</span><span class="mi">20</span><span class="p">,</span>
+                        <span class="n">max_iter_lbfgs</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">use_amber_ff</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span>
+                        <span class="n">extra_force_fields</span><span class="o">=</span><span class="nb">list</span><span class="p">()):</span>
     <span class="sd">&#39;&#39;&#39;Minimize energy of final model using molecular mechanics.</span>
 
 <span class="sd">    Uses :mod:`ost.mol.mm` to perform energy minimization.</span>
@@ -153,31 +299,38 @@
 
 <span class="sd">    :param max_iter_lbfgs: Max. number of iterations within LBFGS method</span>
 <span class="sd">    :type max_iter_lbfgs:  :class:`int`</span>
+
+<span class="sd">    :param use_amber_ff: if True, use the AMBER force field instead of the def.</span>
+<span class="sd">                         CHARMM one (see :meth:`BuildFromRawModel`).</span>
+<span class="sd">    :type use_amber_ff:  :class:`bool`</span>
+
+<span class="sd">    :param extra_force_fields: Additional list of force fields to use (see</span>
+<span class="sd">                               :meth:`BuildFromRawModel`).</span>
+<span class="sd">    :type extra_force_fields:  :class:`list` of :class:`ost.mol.mm.Forcefield`</span>
+
+<span class="sd">    :return: The model including all oxygens as used in the minimizer.</span>
+<span class="sd">    :rtype:  :class:`Entity &lt;ost.mol.EntityHandle&gt;`</span>
 <span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="s">&#39;pipeline::MinimizeModelEnergy&#39;</span><span class="p">)</span>
     <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Minimize energy.&quot;</span><span class="p">)</span>
     <span class="c"># ignore LogInfo in stereochemical problems if output up to info done</span>
     <span class="n">ignore_stereo_log</span> <span class="o">=</span> <span class="p">(</span><span class="n">ost</span><span class="o">.</span><span class="n">GetVerbosityLevel</span><span class="p">()</span> <span class="o">==</span> <span class="mi">3</span><span class="p">)</span>
-    <span class="c"># setup mm simulation</span>
-    <span class="n">settings</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">Settings</span><span class="p">()</span>
-    <span class="n">settings</span><span class="o">.</span><span class="n">integrator</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">LangevinIntegrator</span><span class="p">(</span><span class="mi">310</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mf">0.002</span><span class="p">)</span>
-    <span class="n">settings</span><span class="o">.</span><span class="n">init_temperature</span> <span class="o">=</span> <span class="mi">0</span>
-    <span class="n">settings</span><span class="o">.</span><span class="n">forcefield</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">LoadCHARMMForcefield</span><span class="p">()</span>
-    <span class="n">settings</span><span class="o">.</span><span class="n">nonbonded_method</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">NonbondedMethod</span><span class="o">.</span><span class="n">CutoffNonPeriodic</span>
-    <span class="n">settings</span><span class="o">.</span><span class="n">keep_ff_specific_naming</span> <span class="o">=</span> <span class="bp">False</span>
-    <span class="c"># use fast CPU platform by default</span>
-    <span class="n">settings</span><span class="o">.</span><span class="n">platform</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">Platform</span><span class="o">.</span><span class="n">CPU</span>
-    <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">getenv</span><span class="p">(</span><span class="s">&#39;PM3_OPENMM_CPU_THREADS&#39;</span><span class="p">)</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
-        <span class="n">settings</span><span class="o">.</span><span class="n">cpu_properties</span><span class="p">[</span><span class="s">&quot;CpuThreads&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s">&quot;1&quot;</span>
+
+    <span class="c"># setup force fields</span>
+    <span class="k">if</span> <span class="n">use_amber_ff</span><span class="p">:</span>
+        <span class="n">force_fields</span> <span class="o">=</span> <span class="p">[</span><span class="n">mm</span><span class="o">.</span><span class="n">LoadAMBERForcefield</span><span class="p">()]</span>
     <span class="k">else</span><span class="p">:</span>
-        <span class="n">settings</span><span class="o">.</span><span class="n">cpu_properties</span><span class="p">[</span><span class="s">&quot;CpuThreads&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getenv</span><span class="p">(</span><span class="s">&#39;PM3_OPENMM_CPU_THREADS&#39;</span><span class="p">)</span>
-    <span class="k">try</span><span class="p">:</span>
-        <span class="n">sim</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">Simulation</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="n">settings</span><span class="p">)</span>
-    <span class="k">except</span> <span class="ne">RuntimeError</span> <span class="k">as</span> <span class="n">ex</span><span class="p">:</span>
-        <span class="n">ost</span><span class="o">.</span><span class="n">LogWarning</span><span class="p">(</span><span class="s">&quot;OpenMM failed to initialize with error: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">ex</span><span class="p">))</span>
-        <span class="c"># switch to &quot;mm.Platform.Reference&quot; as fallback</span>
-        <span class="n">settings</span><span class="o">.</span><span class="n">platform</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">Platform</span><span class="o">.</span><span class="n">Reference</span>
-        <span class="n">sim</span> <span class="o">=</span> <span class="n">mm</span><span class="o">.</span><span class="n">Simulation</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="n">settings</span><span class="p">)</span>
-        <span class="n">ost</span><span class="o">.</span><span class="n">LogWarning</span><span class="p">(</span><span class="s">&quot;Switched to slower reference platform of OpenMM!&quot;</span><span class="p">)</span>
+        <span class="n">force_fields</span> <span class="o">=</span> <span class="p">[</span><span class="n">mm</span><span class="o">.</span><span class="n">LoadCHARMMForcefield</span><span class="p">()]</span>
+    <span class="n">force_fields</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">extra_force_fields</span><span class="p">)</span>
+    <span class="c"># setup mm simulation</span>
+    <span class="n">sim</span> <span class="o">=</span> <span class="n">_SetupMmSimulation</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="n">force_fields</span><span class="p">)</span>
+
+    <span class="c"># check for certain failure -&gt; we get NaN if atoms are on top each other</span>
+    <span class="k">if</span> <span class="n">math</span><span class="o">.</span><span class="n">isnan</span><span class="p">(</span><span class="n">sim</span><span class="o">.</span><span class="n">GetEnergy</span><span class="p">()):</span>
+        <span class="n">ost</span><span class="o">.</span><span class="n">LogError</span><span class="p">(</span><span class="s">&quot;OpenMM could not minimize energy as atoms are on top of &quot;</span>
+                     <span class="s">&quot;each other!&quot;</span><span class="p">)</span>
+        <span class="k">return</span>
+        
     <span class="c"># settings to check for stereochemical problems</span>
     <span class="n">clashing_distances</span> <span class="o">=</span> <span class="n">mol</span><span class="o">.</span><span class="n">alg</span><span class="o">.</span><span class="n">DefaultClashingDistances</span><span class="p">()</span>
     <span class="n">bond_stereo_chemical_param</span> <span class="o">=</span> <span class="n">mol</span><span class="o">.</span><span class="n">alg</span><span class="o">.</span><span class="n">DefaultBondStereoChemicalParams</span><span class="p">()</span>
@@ -185,7 +338,8 @@
 
     <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">max_iterations</span><span class="p">):</span>
         <span class="c"># update atoms</span>
-        <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Perform energy minimization (iteration </span><span class="si">%d</span><span class="s">)&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">))</span>
+        <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Perform energy minimization &quot;</span>
+                    <span class="s">&quot;(iteration </span><span class="si">%d</span><span class="s">, energy: </span><span class="si">%g</span><span class="s">)&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span> <span class="n">sim</span><span class="o">.</span><span class="n">GetEnergy</span><span class="p">()))</span>
         <span class="n">sim</span><span class="o">.</span><span class="n">ApplySD</span><span class="p">(</span><span class="n">tolerance</span> <span class="o">=</span> <span class="mf">1.0</span><span class="p">,</span> <span class="n">max_iterations</span> <span class="o">=</span> <span class="n">max_iter_sd</span><span class="p">)</span>
         <span class="n">sim</span><span class="o">.</span><span class="n">ApplyLBFGS</span><span class="p">(</span><span class="n">tolerance</span> <span class="o">=</span> <span class="mf">1.0</span><span class="p">,</span> <span class="n">max_iterations</span> <span class="o">=</span> <span class="n">max_iter_lbfgs</span><span class="p">)</span>
         <span class="n">sim</span><span class="o">.</span><span class="n">UpdatePositions</span><span class="p">()</span>
@@ -208,27 +362,36 @@
         <span class="c"># checks above would remove bad atoms</span>
         <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">temp_ent_stereo_checked</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;ele!=H&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">atoms</span><span class="p">)</span> \
            <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">temp_ent</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;ele!=H&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">atoms</span><span class="p">):</span>
+            <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;No more stereo-chemical problems &quot;</span>
+                        <span class="s">&quot;-&gt; final energy: </span><span class="si">%g</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">sim</span><span class="o">.</span><span class="n">GetEnergy</span><span class="p">()))</span>
             <span class="k">break</span>
-        <span class="k">else</span><span class="p">:</span>
-            <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Stereo-chemical problems found, need more energy&quot;</span>
-                        <span class="o">+</span> <span class="s">&quot; minimization (iteration </span><span class="si">%d</span><span class="s">)&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">))</span>
 
     <span class="c"># update model</span>
-    <span class="n">simulation_ent</span> <span class="o">=</span> <span class="n">sim</span><span class="o">.</span><span class="n">GetEntity</span><span class="p">()</span>
-    <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span> <span class="o">=</span> <span class="n">mol</span><span class="o">.</span><span class="n">CreateEntityFromView</span><span class="p">(</span>\
-                            <span class="n">simulation_ent</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;peptide=true and ele!=H&quot;</span><span class="p">),</span>
-                            <span class="bp">True</span><span class="p">)</span>
+    <span class="n">simulation_ent</span> <span class="o">=</span> <span class="n">_GetSimEntity</span><span class="p">(</span><span class="n">sim</span><span class="p">)</span>
+    <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span> <span class="o">=</span> <span class="n">mol</span><span class="o">.</span><span class="n">CreateEntityFromView</span><span class="p">(</span><span class="n">simulation_ent</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;ele!=H&quot;</span><span class="p">),</span>
+                                             <span class="bp">True</span><span class="p">)</span>
+    <span class="c"># return model with hydrogens</span>
+    <span class="k">return</span> <span class="n">simulation_ent</span>
 </div>
-<div class="viewcode-block" id="CheckFinalModel"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.CheckFinalModel">[docs]</a><span class="k">def</span> <span class="nf">CheckFinalModel</span><span class="p">(</span><span class="n">mhandle</span><span class="p">):</span>
+<div class="viewcode-block" id="CheckFinalModel"><a class="viewcode-back" href="../../../modelling/pipeline.html#promod3.modelling.CheckFinalModel">[docs]</a><span class="k">def</span> <span class="nf">CheckFinalModel</span><span class="p">(</span><span class="n">mhandle</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Performs samity checks on final models and reports problems.</span>
 <span class="sd">    </span>
 <span class="sd">    :param mhandle: Modelling handle for which to perform checks.</span>
 <span class="sd">    :type mhandle:  :class:`ModellingHandle`</span>
 <span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;pipeline::CheckFinalModel&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
     <span class="c"># report incomplete models</span>
+    <span class="k">for</span> <span class="n">chain</span> <span class="ow">in</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">chains</span><span class="p">:</span>
+        <span class="k">if</span> <span class="n">chain</span><span class="o">.</span><span class="n">residue_count</span> <span class="o">&lt;</span> <span class="mi">3</span><span class="p">:</span>
+            <span class="n">ost</span><span class="o">.</span><span class="n">LogWarning</span><span class="p">(</span><span class="s">&quot;Chain </span><span class="si">%s</span><span class="s"> of returned model contains only </span><span class="si">%d</span><span class="s"> &quot;</span>\
+                           <span class="s">&quot;residues! This typically indicates that the &quot;</span>\
+                           <span class="s">&quot;template is mostly a Calpha trace or contains &quot;</span>\
+                           <span class="s">&quot;too many D-peptides.&quot;</span>\
+                           <span class="o">%</span> <span class="p">(</span><span class="n">chain</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">chain</span><span class="o">.</span><span class="n">residue_count</span><span class="p">))</span>
     <span class="k">if</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="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-        <span class="n">ost</span><span class="o">.</span><span class="n">LogWarning</span><span class="p">(</span><span class="s">&quot;Failed to close </span><span class="si">%d</span><span class="s"> gap(s). Returning incomplete model!&quot;</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">ost</span><span class="o">.</span><span class="n">LogWarning</span><span class="p">(</span><span class="s">&quot;Failed to close </span><span class="si">%d</span><span class="s"> gap(s). Returning incomplete model!&quot;</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="k">else</span><span class="p">:</span>
         <span class="c"># check sequences</span>
         <span class="k">for</span> <span class="n">chain</span><span class="p">,</span> <span class="n">seq</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">chains</span><span class="p">,</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">seqres</span><span class="p">):</span>
@@ -281,7 +444,7 @@
             <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Stereo-chemical problem in sidechain &quot;</span> <span class="o">+</span> \
                         <span class="s">&quot;of residue &quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">res</span><span class="p">))</span>
 </div>
-<div class="viewcode-block" id="BuildFromRawModel"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.BuildFromRawModel">[docs]</a><span class="k">def</span> <span class="nf">BuildFromRawModel</span><span class="p">(</span><span class="n">mhandle</span><span class="p">):</span>
+<div class="viewcode-block" id="BuildFromRawModel"><a class="viewcode-back" href="../../../modelling/pipeline.html#promod3.modelling.BuildFromRawModel">[docs]</a><span class="k">def</span> <span class="nf">BuildFromRawModel</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">use_amber_ff</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">extra_force_fields</span><span class="o">=</span><span class="nb">list</span><span class="p">()):</span>
     <span class="sd">&#39;&#39;&#39;Build a model starting with a raw model (see :func:`BuildRawModel`).</span>
 
 <span class="sd">    This function implements a recommended pipeline to generate complete models</span>
@@ -289,7 +452,12 @@
 <span class="sd">    :ref:`above &lt;modelling_steps_example&gt;`. If you wish to use your own</span>
 <span class="sd">    pipeline, you can use that code as a starting point for your own custom</span>
 <span class="sd">    modelling pipeline. For reproducibility, we recommend that you keep copies</span>
-<span class="sd">    of custom pipelines. </span>
+<span class="sd">    of custom pipelines.</span>
+
+<span class="sd">    To adapt the scoring used during loop closing, you can call</span>
+<span class="sd">    :func:`SetupDefaultBackboneScoring` and :func:`SetupDefaultAllAtomScoring`</span>
+<span class="sd">    and adapt the default scoring members. Alternatively, you can setup the</span>
+<span class="sd">    scoring manually, but you must ensure consistency yourself!</span>
 
 <span class="sd">    If the function fails to close all gaps, it will produce a warning and</span>
 <span class="sd">    return an incomplete model.</span>
@@ -298,10 +466,32 @@
 <span class="sd">                    alignment.</span>
 <span class="sd">    :type mhandle:  :class:`ModellingHandle`</span>
 
+<span class="sd">    :param use_amber_ff: if True, use the AMBER force field instead of the def.</span>
+<span class="sd">                         CHARMM one (see :func:`ost.mol.mm.LoadAMBERForcefield`</span>
+<span class="sd">                         and :func:`ost.mol.mm.LoadCHARMMForcefield`).</span>
+<span class="sd">                         Both do a similarly good job without ligands (CHARMM</span>
+<span class="sd">                         slightly better), but you will want to be consistent</span>
+<span class="sd">                         with the optional force fields in `extra_force_fields`.</span>
+<span class="sd">    :type use_amber_ff:  :class:`bool`</span>
+
+<span class="sd">    :param extra_force_fields: Additional list of force fields to use if a </span>
+<span class="sd">                               (ligand) residue cannot be parametrized with the</span>
+<span class="sd">                               default force field. The force fields are tried</span>
+<span class="sd">                               in the order as given and ligands without an</span>
+<span class="sd">                               existing parametrization are skipped.</span>
+<span class="sd">    :type extra_force_fields:  :class:`list` of :class:`ost.mol.mm.Forcefield`</span>
+
 <span class="sd">    :return: Delivers the model as an |ost_s| entity.</span>
 <span class="sd">    :rtype: :class:`Entity &lt;ost.mol.EntityHandle&gt;`</span>
 <span class="sd">    &#39;&#39;&#39;</span>
-    <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Starting modelling based on a raw model.&quot;</span><span class="p">)</span>
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;pipeline::BuildFromRawModel&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
+    <span class="c"># ignore empty models</span>
+    <span class="k">if</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">residue_count</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
+        <span class="n">ost</span><span class="o">.</span><span class="n">LogError</span><span class="p">(</span><span class="s">&quot;Cannot perform modelling with an empty raw model.&quot;</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="n">ost</span><span class="o">.</span><span class="n">LogInfo</span><span class="p">(</span><span class="s">&quot;Starting modelling based on a raw model.&quot;</span><span class="p">)</span>
 
     <span class="c"># a bit of setup</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>
@@ -309,33 +499,21 @@
     <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="n">merge_distance</span> <span class="o">=</span> <span class="mi">4</span>
 
-    <span class="n">scorer</span> <span class="o">=</span> <span class="n">SetupBackboneScorer</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span>
-
-    <span class="c"># remove terminal gaps and close small deletions</span>
+    <span class="c"># remove terminal gaps</span>
     <span class="n">RemoveTerminalGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span>
-    <span class="n">CloseSmallDeletions</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">)</span>
-
-    <span class="c"># iteratively merge gaps of distance i and fill loops by database</span>
-    <span class="k">for</span> <span class="n">distance</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">merge_distance</span><span class="p">):</span>
-        <span class="n">MergeGapsByDistance</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">distance</span><span class="p">)</span>
-        <span class="n">FillLoopsByDatabase</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</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="n">min_loops_required</span><span class="o">=-</span><span class="mi">1</span><span class="p">,</span>
-                            <span class="n">max_res_extension</span><span class="o">=</span><span class="mi">6</span><span class="p">)</span>
-    <span class="n">FillLoopsByDatabase</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</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="n">min_loops_required</span><span class="o">=-</span><span class="mi">1</span><span class="p">)</span>
-    <span class="n">FillLoopsByDatabase</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</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="c"># close remaining gaps by Monte Carlo</span>
-    <span class="n">FillLoopsByMonteCarlo</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">torsion_sampler</span><span class="p">)</span>
-    <span class="n">CloseLargeDeletions</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">structure_db</span><span class="p">)</span>
+
+    <span class="c"># close gaps</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="o">=</span><span class="n">merge_distance</span><span class="p">,</span> 
+              <span class="n">fragment_db</span><span class="o">=</span><span class="n">fragment_db</span><span class="p">,</span> <span class="n">structure_db</span><span class="o">=</span><span class="n">structure_db</span><span class="p">,</span> 
+              <span class="n">torsion_sampler</span><span class="o">=</span><span class="n">torsion_sampler</span><span class="p">)</span>
 
     <span class="c"># build sidechains</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">scorer</span><span class="p">,</span> <span class="n">fragment_db</span><span class="p">,</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="c"># minimize energy of final model using molecular mechanics</span>
-    <span class="n">MinimizeModelEnergy</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span>
+    <span class="n">MinimizeModelEnergy</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">use_amber_ff</span><span class="o">=</span><span class="n">use_amber_ff</span><span class="p">,</span>
+                        <span class="n">extra_force_fields</span><span class="o">=</span><span class="n">extra_force_fields</span><span class="p">)</span>
 
     <span class="c"># sanity checks</span>
     <span class="n">CheckFinalModel</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span>
@@ -344,8 +522,8 @@
     <span class="k">return</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">model</span>
 
 <span class="c"># these methods will be exported into module</span></div>
-<span class="n">__all__</span> <span class="o">=</span> <span class="p">(</span><span class="s">&#39;BuildFromRawModel&#39;</span><span class="p">,</span> <span class="s">&#39;BuildSidechains&#39;</span><span class="p">,</span> <span class="s">&#39;MinimizeModelEnergy&#39;</span><span class="p">,</span>
-           <span class="s">&#39;CheckFinalModel&#39;</span><span class="p">)</span>
+<span class="n">__all__</span> <span class="o">=</span> <span class="p">(</span><span class="s">&#39;BuildFromRawModel&#39;</span><span class="p">,</span> <span class="s">&#39;BuildSidechains&#39;</span><span class="p">,</span> 
+           <span class="s">&#39;MinimizeModelEnergy&#39;</span><span class="p">,</span> <span class="s">&#39;CheckFinalModel&#39;</span><span class="p">)</span>
 </pre></div>
 
           </div>
@@ -381,7 +559,7 @@
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/_modules/promod3/modelling/_reconstruct_sidechains.html b/doc/html/_modules/promod3/modelling/_reconstruct_sidechains.html
new file mode 100644
index 00000000..e903f7b3
--- /dev/null
+++ b/doc/html/_modules/promod3/modelling/_reconstruct_sidechains.html
@@ -0,0 +1,620 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>promod3.modelling._reconstruct_sidechains &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../../../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../../../index.html" />
+    <link rel="up" title="promod3" href="../../promod3.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <h1>Source code for promod3.modelling._reconstruct_sidechains</h1><div class="highlight"><pre>
+<span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">geom</span><span class="p">,</span> <span class="n">mol</span><span class="p">,</span> <span class="n">conop</span>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">core</span><span class="p">,</span> <span class="n">sidechain</span>
+
+<span class="c">###############################################################################</span>
+<span class="c"># helper functions</span>
+<span class="k">def</span> <span class="nf">_GetRotamerIDs</span><span class="p">(</span><span class="n">res_list</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Return list (length = len(res_list)) of rotamer IDs for all residues.&#39;&#39;&#39;</span>
+    <span class="n">rotamer_ids</span> <span class="o">=</span> <span class="p">[</span><span class="n">sidechain</span><span class="o">.</span><span class="n">ALA</span><span class="p">]</span> <span class="o">*</span> <span class="nb">len</span><span class="p">(</span><span class="n">res_list</span><span class="p">)</span>
+    <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">res_list</span><span class="p">):</span>
+        <span class="n">rot_id</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">TLCToRotID</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">GetName</span><span class="p">())</span>
+        <span class="k">if</span> <span class="n">rot_id</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">XXX</span><span class="p">:</span>
+            <span class="k">continue</span> <span class="c"># no idea what it is, so we stick with ALA </span>
+                     <span class="c"># =&gt; don&#39;t model sidechain</span>
+        <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">rot_id</span>
+    <span class="k">return</span> <span class="n">rotamer_ids</span>
+
+<span class="k">def</span> <span class="nf">_GetPhiAngle</span><span class="p">(</span><span class="n">r</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Extract phi angle for residue r.&#39;&#39;&#39;</span>
+    <span class="c"># def. fallback = helix</span>
+    <span class="n">phi</span> <span class="o">=</span> <span class="o">-</span><span class="mf">1.0472</span>
+    <span class="c"># try to get phi from torsion angles</span>
+    <span class="n">tor</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">GetPhiTorsion</span><span class="p">()</span>
+    <span class="k">if</span> <span class="n">tor</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
+        <span class="n">phi</span> <span class="o">=</span> <span class="n">tor</span><span class="o">.</span><span class="n">GetAngle</span><span class="p">()</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="n">r_prev</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="o">.</span><span class="n">prev</span>
+        <span class="k">if</span> <span class="n">r_prev</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">mol</span><span class="o">.</span><span class="n">InSequence</span><span class="p">(</span><span class="n">r_prev</span><span class="p">,</span> <span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">):</span>
+            <span class="n">c_prev</span> <span class="o">=</span> <span class="n">r_prev</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;C&quot;</span><span class="p">)</span>
+            <span class="n">n</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;N&quot;</span><span class="p">)</span>
+            <span class="n">ca</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;CA&quot;</span><span class="p">)</span>
+            <span class="n">c</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;C&quot;</span><span class="p">)</span>
+            <span class="k">if</span> <span class="n">c_prev</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">n</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">ca</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">c</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
+                <span class="n">phi</span> <span class="o">=</span> <span class="n">geom</span><span class="o">.</span><span class="n">DihedralAngle</span><span class="p">(</span><span class="n">c_prev</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span><span class="n">n</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span>
+                                         <span class="n">ca</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span><span class="n">c</span><span class="o">.</span><span class="n">GetPos</span><span class="p">())</span>
+    <span class="k">return</span> <span class="n">phi</span>
+
+<span class="k">def</span> <span class="nf">_GetPsiAngle</span><span class="p">(</span><span class="n">r</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Extract psi angle for residue r.&#39;&#39;&#39;</span>
+    <span class="c"># def. fallback = helix </span>
+    <span class="n">psi</span> <span class="o">=</span> <span class="o">-</span><span class="mf">0.7854</span>
+    <span class="c"># try to get psi from torsion angles</span>
+    <span class="n">tor</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">GetPsiTorsion</span><span class="p">()</span>
+    <span class="k">if</span> <span class="n">tor</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
+        <span class="n">psi</span> <span class="o">=</span> <span class="n">tor</span><span class="o">.</span><span class="n">GetAngle</span><span class="p">()</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="n">r_next</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="o">.</span><span class="n">next</span>
+        <span class="k">if</span> <span class="n">r_next</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">mol</span><span class="o">.</span><span class="n">InSequence</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span> <span class="n">r_next</span><span class="p">):</span>
+            <span class="n">n</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;N&quot;</span><span class="p">)</span>
+            <span class="n">ca</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;CA&quot;</span><span class="p">)</span>
+            <span class="n">c</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;C&quot;</span><span class="p">)</span>
+            <span class="n">n_next</span> <span class="o">=</span> <span class="n">r_next</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;N&quot;</span><span class="p">)</span>
+            <span class="k">if</span> <span class="n">n</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">ca</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">c</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">n_next</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
+                <span class="n">psi</span> <span class="o">=</span> <span class="n">geom</span><span class="o">.</span><span class="n">DihedralAngle</span><span class="p">(</span><span class="n">n</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span> <span class="n">ca</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span>
+                                         <span class="n">c</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span> <span class="n">n_next</span><span class="o">.</span><span class="n">GetPos</span><span class="p">())</span>
+    <span class="k">return</span> <span class="n">psi</span>
+
+<span class="k">def</span> <span class="nf">_GetDihedrals</span><span class="p">(</span><span class="n">res_list</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Extract dihedral angles for all residues.</span>
+<span class="sd">    Returns phi and psi angles as 2 lists with length = len(res_list).</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;sidechain::_GetDihedrals&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
+    <span class="n">phi_angles</span> <span class="o">=</span> <span class="p">[</span><span class="mf">0.0</span><span class="p">]</span> <span class="o">*</span> <span class="nb">len</span><span class="p">(</span><span class="n">res_list</span><span class="p">)</span>
+    <span class="n">psi_angles</span> <span class="o">=</span> <span class="p">[</span><span class="mf">0.0</span><span class="p">]</span> <span class="o">*</span> <span class="nb">len</span><span class="p">(</span><span class="n">res_list</span><span class="p">)</span>
+    <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">res_list</span><span class="p">):</span>
+        <span class="n">phi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">_GetPhiAngle</span><span class="p">(</span><span class="n">r</span><span class="p">)</span>
+        <span class="n">psi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">_GetPsiAngle</span><span class="p">(</span><span class="n">r</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">phi_angles</span><span class="p">,</span> <span class="n">psi_angles</span>
+
+<span class="k">def</span> <span class="nf">_AddBackboneFrameResidues</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">,</span> <span class="n">res_list</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">,</span>
+                              <span class="n">rotamer_constructor</span><span class="p">,</span> <span class="n">phi_angles</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Update frame_residues (list) with BackboneFrameResidues for res_list.&#39;&#39;&#39;</span>
+    <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">res_list</span><span class="p">):</span>
+        <span class="k">try</span><span class="p">:</span>
+            <span class="n">frame_residue</span> <span class="o">=</span> <span class="n">rotamer_constructor</span><span class="o">.</span><span class="n">ConstructBackboneFrameResidue</span><span class="p">(</span>\
+                                <span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">i</span><span class="p">,</span>
+                                <span class="n">phi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">r</span><span class="o">.</span><span class="n">HasProp</span><span class="p">(</span><span class="s">&quot;n_ter&quot;</span><span class="p">),</span>
+                                <span class="n">r</span><span class="o">.</span><span class="n">HasProp</span><span class="p">(</span><span class="s">&quot;c_ter&quot;</span><span class="p">))</span>
+            <span class="n">frame_residues</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">frame_residue</span><span class="p">)</span>
+        <span class="k">except</span><span class="p">:</span>
+            <span class="k">continue</span>
+
+<span class="k">def</span> <span class="nf">_AddLigandFrameResidues</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">,</span> <span class="n">ent_lig</span><span class="p">,</span> <span class="n">rotamer_constructor</span><span class="p">,</span> <span class="n">offset</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Update frame_residues (list) with FrameResidues for res. in ent_lig.</span>
+<span class="sd">    Set offset &gt;= number of non-ligand residues (used for residue_index).</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="c"># parse ligand residues</span>
+    <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">res</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">ent_lig</span><span class="o">.</span><span class="n">residues</span><span class="p">):</span>
+        <span class="n">res_idx</span> <span class="o">=</span> <span class="n">offset</span> <span class="o">+</span> <span class="n">i</span>
+        <span class="n">is_done</span> <span class="o">=</span> <span class="bp">False</span>
+        <span class="c"># special treatment for peptides</span>
+        <span class="k">if</span> <span class="n">res</span><span class="o">.</span><span class="n">IsPeptideLinking</span><span class="p">():</span>
+            <span class="n">rot_id</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">TLCToRotID</span><span class="p">(</span><span class="n">res</span><span class="o">.</span><span class="n">GetName</span><span class="p">())</span>
+            <span class="k">if</span> <span class="n">rot_id</span> <span class="o">!=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">XXX</span><span class="p">:</span>
+                <span class="c"># get more info</span>
+                <span class="n">phi</span> <span class="o">=</span> <span class="n">_GetPhiAngle</span><span class="p">(</span><span class="n">res</span><span class="p">)</span>
+                <span class="n">r_prev</span> <span class="o">=</span> <span class="n">res</span><span class="o">.</span><span class="n">handle</span><span class="o">.</span><span class="n">prev</span>
+                <span class="n">n_ter</span> <span class="o">=</span> <span class="ow">not</span> <span class="n">r_prev</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> \
+                        <span class="ow">or</span> <span class="ow">not</span> <span class="n">mol</span><span class="o">.</span><span class="n">InSequence</span><span class="p">(</span><span class="n">r_prev</span><span class="p">,</span> <span class="n">res</span><span class="o">.</span><span class="n">handle</span><span class="p">)</span>
+                <span class="n">r_next</span> <span class="o">=</span> <span class="n">res</span><span class="o">.</span><span class="n">handle</span><span class="o">.</span><span class="n">next</span>
+                <span class="n">c_ter</span> <span class="o">=</span> <span class="ow">not</span> <span class="n">r_next</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> \
+                        <span class="ow">or</span> <span class="ow">not</span> <span class="n">mol</span><span class="o">.</span><span class="n">InSequence</span><span class="p">(</span><span class="n">res</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span> <span class="n">r_next</span><span class="p">)</span>
+                <span class="c"># try to add frame residues (ignore exceptions)</span>
+                <span class="k">try</span><span class="p">:</span>
+                    <span class="n">fr1</span> <span class="o">=</span> <span class="n">rotamer_constructor</span><span class="o">.</span><span class="n">ConstructBackboneFrameResidue</span><span class="p">(</span>\
+                              <span class="n">res</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span> <span class="n">rot_id</span><span class="p">,</span> <span class="n">res_idx</span><span class="p">,</span>
+                              <span class="n">phi</span><span class="p">,</span> <span class="n">n_ter</span><span class="p">,</span> <span class="n">c_ter</span><span class="p">)</span>
+                    <span class="k">if</span> <span class="n">rot_id</span> <span class="o">!=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ALA</span> <span class="ow">and</span> <span class="n">rot_id</span> <span class="o">!=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">GLY</span><span class="p">:</span>
+                        <span class="n">fr2</span> <span class="o">=</span> <span class="n">rotamer_constructor</span><span class="o">.</span><span class="n">ConstructSidechainFrameResidue</span><span class="p">(</span>\
+                                  <span class="n">res</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span> <span class="n">rot_id</span><span class="p">,</span> <span class="n">res_idx</span><span class="p">)</span>
+                        <span class="n">frame_residues</span><span class="o">.</span><span class="n">extend</span><span class="p">([</span><span class="n">fr1</span><span class="p">,</span><span class="n">fr2</span><span class="p">])</span>
+                    <span class="k">else</span><span class="p">:</span>
+                        <span class="n">frame_residues</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">fr1</span><span class="p">)</span>
+                <span class="k">except</span><span class="p">:</span>
+                    <span class="k">pass</span>   <span class="c"># ignore peptide treatment and treat below</span>
+                <span class="k">else</span><span class="p">:</span>
+                    <span class="n">is_done</span> <span class="o">=</span> <span class="bp">True</span>
+        <span class="c"># if it failed, treat it as an unknown entity</span>
+        <span class="k">if</span> <span class="ow">not</span> <span class="n">is_done</span><span class="p">:</span>
+            <span class="c"># try to add frame residues (skip exceptions)</span>
+            <span class="k">try</span><span class="p">:</span>
+                <span class="c"># NOTES:</span>
+                <span class="c"># - ConstructFrameResidueHeuristic has fall back if res unknown</span>
+                <span class="c"># - it only deals with few possible ligand cases and has not</span>
+                <span class="c">#   been tested extensively!</span>
+                <span class="n">comp_lib</span> <span class="o">=</span> <span class="n">conop</span><span class="o">.</span><span class="n">GetDefaultLib</span><span class="p">()</span>
+                <span class="n">fr</span> <span class="o">=</span> <span class="n">rotamer_constructor</span><span class="o">.</span><span class="n">ConstructFrameResidueHeuristic</span><span class="p">(</span>\
+                         <span class="n">res</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span> <span class="n">res_idx</span><span class="p">,</span> <span class="n">comp_lib</span><span class="p">)</span>
+                <span class="n">frame_residues</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">fr</span><span class="p">)</span>
+            <span class="k">except</span><span class="p">:</span>
+                <span class="k">continue</span>
+
+<span class="k">def</span> <span class="nf">_AddSidechainFrameResidues</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">,</span> <span class="n">incomplete_sidechains</span><span class="p">,</span>
+                               <span class="n">keep_sidechains</span><span class="p">,</span> <span class="n">res_list</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">,</span>
+                               <span class="n">rotamer_constructor</span><span class="p">,</span> <span class="n">cystein_indices</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Update frame_residues (list) with SidechainFrameResidues for res_list,</span>
+<span class="sd">    incomplete_sidechains (list of indices) with sidechains to be constructed,</span>
+<span class="sd">    and (if given) cystein_indices (list of indices) with all CYS (appended).</span>
+<span class="sd">    Each residue can only end up in one of the 3 lists.</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="k">if</span> <span class="n">keep_sidechains</span><span class="p">:</span>
+        <span class="c"># try to generate frame residues for all existing side chains</span>
+        <span class="c"># skip non-existing sidechains and CYS (if cystein_indices) and update</span>
+        <span class="c"># incomplete_sidechains and cystein_indices</span>
+        <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">res_list</span><span class="p">):</span>
+
+            <span class="k">if</span> <span class="n">cystein_indices</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span> <span class="ow">and</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">CYS</span><span class="p">:</span>
+                <span class="n">cystein_indices</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
+                <span class="k">continue</span>
+
+            <span class="k">if</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ALA</span> <span class="ow">or</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">GLY</span><span class="p">:</span>
+                <span class="k">continue</span> <span class="c"># no sidechain to model</span>
+
+            <span class="k">try</span><span class="p">:</span>
+                <span class="n">frame_residue</span> <span class="o">=</span> <span class="n">rotamer_constructor</span><span class="o">.</span><span class="n">ConstructSidechainFrameResidue</span><span class="p">(</span>\
+                                    <span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">i</span><span class="p">)</span>
+                <span class="n">frame_residues</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">frame_residue</span><span class="p">)</span>
+            <span class="k">except</span><span class="p">:</span>
+                <span class="n">incomplete_sidechains</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="c"># no frame residues to create, just update incomplete_sidechains</span>
+        <span class="c"># and cystein_indices if needed</span>
+        <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">res_list</span><span class="p">):</span>
+
+            <span class="k">if</span> <span class="n">cystein_indices</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span> <span class="ow">and</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">CYS</span><span class="p">:</span>
+                <span class="n">cystein_indices</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
+                <span class="k">continue</span>
+
+            <span class="k">if</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ALA</span> <span class="ow">or</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">GLY</span><span class="p">:</span>
+                <span class="k">continue</span> <span class="c"># no sidechain to model</span>
+
+            <span class="n">incomplete_sidechains</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
+
+<span class="k">def</span> <span class="nf">_AddCysteinFrameResidues</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">,</span> <span class="n">incomplete_sidechains</span><span class="p">,</span>
+                             <span class="n">keep_sidechains</span><span class="p">,</span> <span class="n">res_list</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">,</span>
+                             <span class="n">rot_constructor</span><span class="p">,</span> <span class="n">cystein_indices</span><span class="p">,</span>
+                             <span class="n">disulfid_indices</span><span class="p">,</span> <span class="n">disulfid_rotamers</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Update frame_residues (list) with cysteins.</span>
+<span class="sd">    Parameters as in _AddSidechainFrameResidues.</span>
+<span class="sd">    Some cysteins (in disulfid_indices) get special treatment as disulfid</span>
+<span class="sd">    bridges (disulfid_indices, disulfid_rotamers from _GetDisulfidBridges).</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="c"># handle cysteins participating in a disulfid bond</span>
+    <span class="k">for</span> <span class="n">cys_idx</span><span class="p">,</span> <span class="n">cys_rot</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">disulfid_indices</span><span class="p">,</span> <span class="n">disulfid_rotamers</span><span class="p">):</span>
+        <span class="c"># add FrameResidue</span>
+        <span class="n">frame_residues</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cys_rot</span><span class="o">.</span><span class="n">ToFrameResidue</span><span class="p">(</span><span class="n">cys_idx</span><span class="p">))</span>
+        <span class="c"># set the position in the proteins residues</span>
+        <span class="n">cys_rot</span><span class="o">.</span><span class="n">ApplyOnResidue</span><span class="p">(</span><span class="n">res_list</span><span class="p">[</span><span class="n">cys_idx</span><span class="p">]</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span>
+                               <span class="n">consider_hydrogens</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
+        <span class="n">sidechain</span><span class="o">.</span><span class="n">ConnectSidechain</span><span class="p">(</span><span class="n">res_list</span><span class="p">[</span><span class="n">cys_idx</span><span class="p">]</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">CYS</span><span class="p">)</span>
+
+    <span class="c"># add remaining ones according the given flags</span>
+    <span class="k">for</span> <span class="n">idx</span> <span class="ow">in</span> <span class="n">cystein_indices</span><span class="p">:</span>
+        <span class="k">if</span> <span class="n">idx</span> <span class="ow">in</span> <span class="n">disulfid_indices</span><span class="p">:</span>
+            <span class="k">continue</span> <span class="c"># already handled</span>
+        <span class="k">if</span> <span class="n">keep_sidechains</span><span class="p">:</span>
+            <span class="k">try</span><span class="p">:</span>
+                <span class="n">frame_residue</span> <span class="o">=</span> <span class="n">rot_constructor</span><span class="o">.</span><span class="n">ConstructSidechainFrameResidue</span><span class="p">(</span>\
+                                    <span class="n">res_list</span><span class="p">[</span><span class="n">idx</span><span class="p">]</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">idx</span><span class="p">],</span>
+                                    <span class="n">idx</span><span class="p">)</span>
+                <span class="n">frame_residues</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">frame_residue</span><span class="p">)</span>
+            <span class="k">except</span><span class="p">:</span>
+                <span class="n">incomplete_sidechains</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">idx</span><span class="p">)</span> 
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">incomplete_sidechains</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">idx</span><span class="p">)</span>
+
+<span class="k">def</span> <span class="nf">_GetRotamerGroup</span><span class="p">(</span><span class="n">res_handle</span><span class="p">,</span> <span class="n">rot_id</span><span class="p">,</span> <span class="n">res_idx</span><span class="p">,</span> <span class="n">rot_lib</span><span class="p">,</span> <span class="n">rot_constructor</span><span class="p">,</span>
+                     <span class="n">phi</span><span class="p">,</span> <span class="n">psi</span><span class="p">,</span> <span class="n">use_frm</span><span class="p">,</span> <span class="n">bbdep</span><span class="p">,</span> <span class="n">probability_cutoff</span> <span class="o">=</span> <span class="mf">0.98</span><span class="p">):</span>
+    <span class="k">if</span> <span class="n">use_frm</span><span class="p">:</span>
+        <span class="k">if</span> <span class="n">bbdep</span><span class="p">:</span>
+            <span class="k">return</span> <span class="n">rot_constructor</span><span class="o">.</span><span class="n">ConstructFRMRotamerGroup</span><span class="p">(</span><span class="n">res_handle</span><span class="p">,</span> <span class="n">rot_id</span><span class="p">,</span>
+                                                            <span class="n">res_idx</span><span class="p">,</span> <span class="n">rot_lib</span><span class="p">,</span>
+                                                            <span class="n">phi</span><span class="p">,</span> <span class="n">psi</span><span class="p">,</span>
+                                                            <span class="n">probability_cutoff</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="k">return</span> <span class="n">rot_constructor</span><span class="o">.</span><span class="n">ConstructFRMRotamerGroup</span><span class="p">(</span><span class="n">res_handle</span><span class="p">,</span> <span class="n">rot_id</span><span class="p">,</span>
+                                                            <span class="n">res_idx</span><span class="p">,</span> <span class="n">rot_lib</span><span class="p">,</span>
+                                                            <span class="n">probability_cutoff</span><span class="p">)</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="k">if</span> <span class="n">bbdep</span><span class="p">:</span>
+            <span class="k">return</span> <span class="n">rot_constructor</span><span class="o">.</span><span class="n">ConstructRRMRotamerGroup</span><span class="p">(</span><span class="n">res_handle</span><span class="p">,</span> <span class="n">rot_id</span><span class="p">,</span>
+                                                            <span class="n">res_idx</span><span class="p">,</span> <span class="n">rot_lib</span><span class="p">,</span>
+                                                            <span class="n">phi</span><span class="p">,</span> <span class="n">psi</span><span class="p">,</span>
+                                                            <span class="n">probability_cutoff</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="k">return</span> <span class="n">rot_constructor</span><span class="o">.</span><span class="n">ConstructRRMRotamerGroup</span><span class="p">(</span><span class="n">res_handle</span><span class="p">,</span> <span class="n">rot_id</span><span class="p">,</span>
+                                                            <span class="n">res_idx</span><span class="p">,</span> <span class="n">rot_lib</span><span class="p">,</span>
+                                                            <span class="n">probability_cutoff</span><span class="p">)</span>
+
+<span class="k">def</span> <span class="nf">_GetRotamerGroups</span><span class="p">(</span><span class="n">res_list</span><span class="p">,</span> <span class="n">rot_ids</span><span class="p">,</span> <span class="n">indices</span><span class="p">,</span> <span class="n">rot_lib</span><span class="p">,</span> <span class="n">rot_constructor</span><span class="p">,</span>
+                      <span class="n">phi_angles</span><span class="p">,</span> <span class="n">psi_angles</span><span class="p">,</span> <span class="n">use_frm</span><span class="p">,</span> <span class="n">bbdep</span><span class="p">,</span> <span class="n">frame_residues</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Get list of rotamer groups from subset of res_list.</span>
+<span class="sd">    Residues are chosen as res_list[i] for i in indices and only if a rotamer</span>
+<span class="sd">    group can be created (e.g. no ALA, GLY).</span>
+<span class="sd">    Rotamer groups are filtered to keep only best ones (given frame).</span>
+<span class="sd">    Returns list of rotamer groups and list of res. indices they belong to.</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;sidechain::_GetRotamerGroups&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
+
+    <span class="c"># res.index (res_list[i]) for each modelled sc</span>
+    <span class="n">residues_with_rotamer_group</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+    <span class="c">#  linked to residue in residues_with_rotamer_group</span>
+    <span class="n">rotamer_groups</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+    <span class="c"># get frame for score evaluation</span>
+    <span class="n">frame</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">Frame</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">)</span>
+    <span class="c"># build rotamers for chosen sidechains</span>
+    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">indices</span><span class="p">:</span>
+        <span class="c"># get rotamer ID</span>
+        <span class="n">r</span> <span class="o">=</span> <span class="n">res_list</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
+        <span class="n">rot_id</span> <span class="o">=</span> <span class="n">rot_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
+        
+        <span class="k">if</span> <span class="n">rot_id</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ALA</span> <span class="ow">or</span> <span class="n">rot_id</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">GLY</span><span class="p">:</span>
+            <span class="k">continue</span>
+
+        <span class="k">if</span> <span class="n">rot_id</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">CYS</span><span class="p">:</span>
+            <span class="n">rot_id</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">CYH</span>
+
+        <span class="k">if</span> <span class="n">rot_id</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">PRO</span><span class="p">:</span>
+            <span class="n">tor</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">GetOmegaTorsion</span><span class="p">()</span>
+            <span class="n">omega</span> <span class="o">=</span> <span class="bp">None</span>
+            <span class="k">if</span> <span class="n">tor</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
+                <span class="n">omega</span> <span class="o">=</span> <span class="n">tor</span><span class="o">.</span><span class="n">GetAngle</span><span class="p">()</span>
+            <span class="k">elif</span> <span class="n">i</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
+                <span class="c"># fallback computation of omega as in OST-code</span>
+                <span class="n">prev</span> <span class="o">=</span> <span class="n">res_list</span><span class="p">[</span><span class="n">i</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
+                <span class="k">if</span> <span class="n">prev</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">prev</span><span class="o">.</span><span class="n">IsPeptideLinking</span><span class="p">():</span>
+                    <span class="n">ca_prev</span> <span class="o">=</span> <span class="n">prev</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;CA&quot;</span><span class="p">)</span>
+                    <span class="n">c_prev</span> <span class="o">=</span> <span class="n">prev</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;C&quot;</span><span class="p">)</span>
+                    <span class="n">n</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;N&quot;</span><span class="p">)</span>
+                    <span class="n">ca</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;CA&quot;</span><span class="p">)</span>
+                    <span class="n">valid</span> <span class="o">=</span> <span class="n">ca_prev</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">c_prev</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> \
+                            <span class="ow">and</span> <span class="n">n</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">ca</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span>
+                    <span class="k">if</span> <span class="n">valid</span> <span class="ow">and</span> <span class="n">mol</span><span class="o">.</span><span class="n">BondExists</span><span class="p">(</span><span class="n">c_prev</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span> <span class="n">n</span><span class="o">.</span><span class="n">handle</span><span class="p">):</span>
+                        <span class="n">omega</span> <span class="o">=</span> <span class="n">geom</span><span class="o">.</span><span class="n">DihedralAngle</span><span class="p">(</span><span class="n">ca_prev</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span>
+                                                   <span class="n">c_prev</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span>
+                                                   <span class="n">n</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span> <span class="n">ca</span><span class="o">.</span><span class="n">GetPos</span><span class="p">())</span>
+            <span class="c"># omega not set if prev. res. missing</span>
+            <span class="k">if</span> <span class="n">omega</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
+                <span class="k">if</span> <span class="nb">abs</span><span class="p">(</span><span class="n">omega</span><span class="p">)</span> <span class="o">&lt;</span> <span class="mf">1.57</span><span class="p">:</span>
+                    <span class="n">rot_id</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">CPR</span>
+                <span class="k">else</span><span class="p">:</span>
+                    <span class="n">rot_id</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">TPR</span>
+
+        <span class="c"># get RotamerGroup</span>
+        <span class="k">try</span><span class="p">:</span>
+            <span class="n">rot_group</span> <span class="o">=</span> <span class="n">_GetRotamerGroup</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span> <span class="n">rot_id</span><span class="p">,</span> <span class="n">i</span><span class="p">,</span> <span class="n">rot_lib</span><span class="p">,</span>
+                                         <span class="n">rot_constructor</span><span class="p">,</span> <span class="n">phi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">],</span>
+                                         <span class="n">psi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">use_frm</span><span class="p">,</span> <span class="n">bbdep</span><span class="p">)</span>
+        <span class="k">except</span><span class="p">:</span>
+            <span class="k">continue</span>
+        <span class="c"># keep best ones</span>
+        <span class="n">rot_group</span><span class="o">.</span><span class="n">SetFrameEnergy</span><span class="p">(</span><span class="n">frame</span><span class="p">)</span>
+        <span class="n">rot_group</span><span class="o">.</span><span class="n">ApplySelfEnergyThresh</span><span class="p">()</span>
+        <span class="n">rotamer_groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">rot_group</span><span class="p">)</span>
+        <span class="n">residues_with_rotamer_group</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
+
+    <span class="k">return</span> <span class="n">rotamer_groups</span><span class="p">,</span> <span class="n">residues_with_rotamer_group</span>
+
+<span class="k">def</span> <span class="nf">_GetDisulfidBridges</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="p">,</span> <span class="n">cystein_indices</span><span class="p">,</span> 
+                        <span class="n">res_list</span><span class="p">,</span> <span class="n">rotamer_library</span><span class="p">,</span> <span class="n">use_frm</span><span class="p">,</span> <span class="n">bbdep</span><span class="p">,</span> 
+                        <span class="n">rotamer_constructor</span><span class="p">,</span> <span class="n">phi_angles</span><span class="p">,</span> <span class="n">psi_angles</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Get disulfid bridges for CYS and according rotamers.</span>
+<span class="sd">    CYS are identified by by items in cystein_indices (into res_list).</span>
+<span class="sd">    Returns: disulfid_indices: list of res. index in bridge,</span>
+<span class="sd">             disulfid_rotamers: list of rotamers (best one for bridge).</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="c"># this is required for the disulfid score evaluation</span>
+    <span class="n">frame</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">Frame</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">)</span>
+
+    <span class="c"># some info we have to keep track of when evaluating disulfid bonds</span>
+    <span class="n">cystein_rot_groups</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+    <span class="n">cys_ca_positions</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+    <span class="n">cys_cb_positions</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+    <span class="n">indices_with_rot_groups</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+
+    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">cystein_indices</span><span class="p">:</span>
+        <span class="c"># check ca, cb</span>
+        <span class="n">r</span> <span class="o">=</span> <span class="n">res_list</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
+        <span class="n">ca</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;CA&quot;</span><span class="p">)</span>
+        <span class="n">cb</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;CB&quot;</span><span class="p">)</span>
+        <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">ca</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">cb</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()):</span>
+            <span class="k">continue</span>
+        <span class="n">cys_ca_positions</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ca</span><span class="o">.</span><span class="n">GetPos</span><span class="p">())</span>
+        <span class="n">cys_cb_positions</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cb</span><span class="o">.</span><span class="n">GetPos</span><span class="p">())</span>
+
+        <span class="c"># get RotamerGroup in case of cysteins, we do FRM in any case...</span>
+        <span class="c"># If we&#39;re suposed to keep the existing sidechains and the processed</span>
+        <span class="c"># cystein contains all required atoms, we manually construct an FRM</span>
+        <span class="c"># rotamer to still allow the rotamer to enter the disulfid bridge </span>
+        <span class="c"># resolving algorithm.  </span>
+        <span class="n">rot_group</span> <span class="o">=</span> <span class="bp">None</span>
+        <span class="k">if</span> <span class="n">keep_sidechains</span><span class="p">:</span>
+            <span class="n">sg</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;SG&quot;</span><span class="p">)</span>
+            <span class="k">if</span> <span class="n">sg</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
+                <span class="n">particle</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">Particle</span><span class="p">(</span><span class="n">sidechain</span><span class="o">.</span><span class="n">SidechainParticle</span><span class="o">.</span><span class="n">SParticle</span><span class="p">,</span> 
+                                              <span class="n">sg</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span>
+                                              <span class="o">-</span><span class="mf">0.19</span><span class="p">,</span> <span class="s">&quot;SG&quot;</span><span class="p">)</span>   
+                <span class="n">particle_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">particle</span><span class="p">]</span>
+                <span class="c"># The temperature and self internal_e_prefactor parameter have </span>
+                <span class="c"># been copied from the SCWRLRotamerConstructor. Hacky...</span>
+                <span class="n">frm_rotamer</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">FRMRotamer</span><span class="p">(</span><span class="n">particle_list</span><span class="p">,</span> 
+                                                   <span class="mf">1.69</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">,</span> <span class="mf">4.07</span><span class="p">)</span>
+                <span class="n">frm_rotamer</span><span class="o">.</span><span class="n">AddSubrotamerDefinition</span><span class="p">([</span><span class="mi">0</span><span class="p">])</span>               
+                <span class="n">frm_rotamer</span><span class="o">.</span><span class="n">SetInternalEnergy</span><span class="p">(</span><span class="mf">0.0</span><span class="p">)</span>
+                <span class="n">rot_group</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">FRMRotamerGroup</span><span class="p">([</span><span class="n">frm_rotamer</span><span class="p">],</span> <span class="n">i</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="n">rot_group</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span>
+            <span class="n">rot_group</span> <span class="o">=</span> <span class="n">_GetRotamerGroup</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">CYD</span><span class="p">,</span> <span class="n">i</span><span class="p">,</span> 
+                                         <span class="n">rotamer_library</span><span class="p">,</span>
+                                         <span class="n">rotamer_constructor</span><span class="p">,</span> 
+                                         <span class="n">phi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">],</span>
+                                         <span class="n">psi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="bp">True</span><span class="p">,</span> <span class="n">bbdep</span><span class="p">)</span>
+        <span class="n">rot_group</span><span class="o">.</span><span class="n">AddFrameEnergy</span><span class="p">(</span><span class="n">frame</span><span class="p">)</span>
+        <span class="n">cystein_rot_groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">rot_group</span><span class="p">)</span>
+        <span class="n">indices_with_rot_groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
+
+    <span class="n">bond_result</span><span class="p">,</span> \
+    <span class="n">rotamer_result</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ResolveCysteins</span><span class="p">(</span><span class="n">cystein_rot_groups</span><span class="p">,</span> 
+                                               <span class="n">cys_ca_positions</span><span class="p">,</span>
+                                               <span class="n">cys_cb_positions</span><span class="p">,</span> <span class="mf">45.0</span><span class="p">,</span>
+                                               <span class="bp">True</span><span class="p">)</span>
+
+    <span class="c"># get CYS with disulfid bonds and the chosen rotamers</span>
+    <span class="n">disulfid_indices</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+    <span class="n">disulfid_rotamers</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+  
+    <span class="k">for</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">bond_result</span><span class="p">,</span> <span class="n">rotamer_result</span><span class="p">):</span>
+        <span class="n">disulfid_indices</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">indices_with_rot_groups</span><span class="p">[</span><span class="n">a</span><span class="p">[</span><span class="mi">0</span><span class="p">]])</span>
+        <span class="n">disulfid_indices</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">indices_with_rot_groups</span><span class="p">[</span><span class="n">a</span><span class="p">[</span><span class="mi">1</span><span class="p">]])</span>
+        <span class="n">disulfid_rotamers</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cystein_rot_groups</span><span class="p">[</span><span class="n">a</span><span class="p">[</span><span class="mi">0</span><span class="p">]][</span><span class="n">b</span><span class="p">[</span><span class="mi">0</span><span class="p">]])</span>
+        <span class="n">disulfid_rotamers</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cystein_rot_groups</span><span class="p">[</span><span class="n">a</span><span class="p">[</span><span class="mi">1</span><span class="p">]][</span><span class="n">b</span><span class="p">[</span><span class="mi">1</span><span class="p">]])</span>
+
+    <span class="k">return</span> <span class="n">disulfid_indices</span><span class="p">,</span> <span class="n">disulfid_rotamers</span>
+
+
+<span class="c">###############################################################################</span>
+
+<div class="viewcode-block" id="ReconstructSidechains"><a class="viewcode-back" href="../../../modelling/sidechain_reconstruction.html#promod3.modelling.ReconstructSidechains">[docs]</a><span class="k">def</span> <span class="nf">ReconstructSidechains</span><span class="p">(</span><span class="n">ent</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">build_disulfids</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span>
+                          <span class="n">rotamer_model</span><span class="o">=</span><span class="s">&quot;frm&quot;</span><span class="p">,</span> <span class="n">consider_ligands</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> 
+                          <span class="n">rotamer_library</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">optimize_subrotamers</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span>
+                          <span class="n">graph_max_complexity</span><span class="o">=</span><span class="mi">100000000</span><span class="p">,</span> 
+                          <span class="n">graph_initial_epsilon</span><span class="o">=</span><span class="mf">0.02</span><span class="p">):</span>
+    <span class="sd">&#39;&#39;&#39;Reconstruct sidechains for the given structure.</span>
+
+<span class="sd">    :param ent: Structure for sidechain reconstruction. Note, that the sidechain</span>
+<span class="sd">                reconstruction gets directly applied on the structure itself.</span>
+<span class="sd">    :type ent:  :class:`ost.mol.EntityHandle`</span>
+
+<span class="sd">    :param keep_sidechains: Flag, whether complete sidechains in *ent* (i.e. </span>
+<span class="sd">                            containing all required atoms) should be kept rigid</span>
+<span class="sd">                            and directly be added to the frame.</span>
+<span class="sd">    :type keep_sidechains:  :class:`bool`</span>
+
+<span class="sd">    :param build_disulfids: Flag, whether possible disulfid bonds should be </span>
+<span class="sd">                            searched. If a disulfid bond is found, the two</span>
+<span class="sd">                            participating cysteins are fixed and added to</span>
+<span class="sd">                            the frame.</span>
+<span class="sd">    :type build_disulfids:  :class:`bool`</span>
+
+<span class="sd">    :param rotamer_model: Rotamer model to be used, can either be &quot;frm&quot; or &quot;rrm&quot;</span>
+<span class="sd">    :type rotamer_model:  :class:`str`</span>
+
+<span class="sd">    :param consider_ligands: Flag, whether to add ligands (anything in chain</span>
+<span class="sd">                             &#39;_&#39;) as static objects.</span>
+<span class="sd">    :type consider_ligands:  :class:`bool`</span>
+
+<span class="sd">    :param rotamer_library: A rotamer library to extract the rotamers from. The</span>
+<span class="sd">                            default is the :meth:`Dunbrack &lt;LoadDunbrackLib&gt;`</span>
+<span class="sd">                            library.</span>
+<span class="sd">    :type rotamer_library:  :class:`BBDepRotamerLib` / :class:`RotamerLib`</span>
+
+<span class="sd">    :param optimize_subrotamers: Only considered when *rotamer_model*</span>
+<span class="sd">                                 is &quot;frm&quot;.</span>
+<span class="sd">                                 If set to True, the FRM solution undergoes </span>
+<span class="sd">                                 some postprocessing by calling </span>
+<span class="sd">                                 :func:`SubrotamerOptimizer` with default </span>
+<span class="sd">                                 parametrization.</span>
+<span class="sd">    :type optimize_subrotamers: :class:`bool`</span>
+
+<span class="sd">    :param graph_max_complexity: Max. complexity for</span>
+<span class="sd">                                 :meth:`RotamerGraph.TreeSolve`.</span>
+<span class="sd">    :type graph_max_complexity:  :class:`int`</span>
+<span class="sd">    :param graph_intial_epsilon: Initial epsilon for</span>
+<span class="sd">                                 :meth:`RotamerGraph.TreeSolve`.</span>
+<span class="sd">    :type graph_intial_epsilon:  :class:`float`</span>
+<span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;modelling::ReconstructSidechains&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
+
+    <span class="c"># setup settings</span>
+    <span class="k">if</span> <span class="n">rotamer_model</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">==</span> <span class="s">&quot;frm&quot;</span><span class="p">:</span>
+        <span class="n">use_frm</span> <span class="o">=</span> <span class="bp">True</span>
+    <span class="k">elif</span> <span class="n">rotamer_model</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">==</span> <span class="s">&quot;rrm&quot;</span><span class="p">:</span>
+        <span class="n">use_frm</span> <span class="o">=</span> <span class="bp">False</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s">&quot;Only </span><span class="se">\&quot;</span><span class="s">rrm</span><span class="se">\&quot;</span><span class="s"> and </span><span class="se">\&quot;</span><span class="s">frm</span><span class="se">\&quot;</span><span class="s"> allowed for rotamer_model!&quot;</span><span class="p">)</span>
+
+    <span class="k">if</span> <span class="n">rotamer_library</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span> 
+        <span class="n">rotamer_library</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">LoadDunbrackLib</span><span class="p">()</span>
+    <span class="n">bbdep</span> <span class="o">=</span> <span class="bp">False</span>
+    <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">rotamer_library</span><span class="p">)</span> <span class="ow">is</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">BBDepRotamerLib</span><span class="p">:</span>
+        <span class="n">bbdep</span> <span class="o">=</span> <span class="bp">True</span>
+
+    <span class="n">rotamer_constructor</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">SCWRLRotamerConstructor</span><span class="p">()</span>
+    
+    <span class="c"># take out ligand chain and any non-peptides</span>
+    <span class="n">prot</span> <span class="o">=</span> <span class="n">ent</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;peptide=true and cname!=&#39;_&#39;&quot;</span><span class="p">)</span>
+    
+    <span class="c"># parse residues (all lists of length len(prot.residues))</span>
+    <span class="n">rotamer_ids</span> <span class="o">=</span> <span class="n">_GetRotamerIDs</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">)</span>
+    <span class="n">phi_angles</span><span class="p">,</span> <span class="n">psi_angles</span> <span class="o">=</span> <span class="n">_GetDihedrals</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">)</span>
+
+    <span class="c"># set nter and cter (needed in _AddBackboneFrameResidues)</span>
+    <span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">prot</span><span class="o">.</span><span class="n">chains</span><span class="p">:</span>
+        <span class="n">c</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">SetIntProp</span><span class="p">(</span><span class="s">&quot;n_ter&quot;</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span>
+        <span class="n">c</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">SetIntProp</span><span class="p">(</span><span class="s">&quot;c_ter&quot;</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span>
+
+    <span class="c"># build up frame</span>
+    <span class="n">frame_residues</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>         <span class="c"># list of frame residues connected to frame</span>
+    <span class="n">incomplete_sidechains</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>  <span class="c"># residue indices</span>
+    <span class="n">_AddBackboneFrameResidues</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">,</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">,</span>
+                              <span class="n">rotamer_constructor</span><span class="p">,</span> <span class="n">phi_angles</span><span class="p">)</span>
+    
+    <span class="c"># add ligands?</span>
+    <span class="k">if</span> <span class="n">consider_ligands</span><span class="p">:</span>
+        <span class="n">ligs</span> <span class="o">=</span> <span class="n">ent</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;cname=&#39;_&#39;&quot;</span><span class="p">)</span>
+        <span class="n">offset</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">)</span>
+        <span class="n">_AddLigandFrameResidues</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">,</span> <span class="n">ligs</span><span class="p">,</span> <span class="n">rotamer_constructor</span><span class="p">,</span> <span class="n">offset</span><span class="p">)</span>
+
+    <span class="c"># check special handling of cysteins</span>
+    <span class="k">if</span> <span class="n">build_disulfids</span><span class="p">:</span>
+        <span class="c"># residue indices of cysteins</span>
+        <span class="n">cystein_indices</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+        <span class="c"># update frame_residues, incomplete_sidechains, cystein_indices</span>
+        <span class="n">_AddSidechainFrameResidues</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">,</span> <span class="n">incomplete_sidechains</span><span class="p">,</span>
+                                   <span class="n">keep_sidechains</span><span class="p">,</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">,</span>
+                                   <span class="n">rotamer_constructor</span><span class="p">,</span> <span class="n">cystein_indices</span><span class="p">)</span>
+        <span class="c"># update frame_residues, incomplete_sidechains with cysteins (if needed)</span>
+        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">cystein_indices</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
+            <span class="c"># get disulfid bridges and according rotamers</span>
+            <span class="n">disulfid_indices</span><span class="p">,</span> <span class="n">disulfid_rotamers</span> <span class="o">=</span> \
+                <span class="n">_GetDisulfidBridges</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="p">,</span> 
+                                    <span class="n">cystein_indices</span><span class="p">,</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">,</span>
+                                    <span class="n">rotamer_library</span><span class="p">,</span> <span class="n">use_frm</span><span class="p">,</span> <span class="n">bbdep</span><span class="p">,</span>
+                                    <span class="n">rotamer_constructor</span><span class="p">,</span> <span class="n">phi_angles</span><span class="p">,</span> <span class="n">psi_angles</span><span class="p">)</span>
+            <span class="c"># update frame_residues, incomplete_sidechains</span>
+            <span class="n">_AddCysteinFrameResidues</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">,</span> <span class="n">incomplete_sidechains</span><span class="p">,</span>
+                                     <span class="n">keep_sidechains</span><span class="p">,</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">,</span>
+                                     <span class="n">rotamer_constructor</span><span class="p">,</span> <span class="n">cystein_indices</span><span class="p">,</span>
+                                     <span class="n">disulfid_indices</span><span class="p">,</span> <span class="n">disulfid_rotamers</span><span class="p">)</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="c"># update frame_residues, incomplete_sidechains</span>
+        <span class="n">_AddSidechainFrameResidues</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">,</span> <span class="n">incomplete_sidechains</span><span class="p">,</span>
+                                   <span class="n">keep_sidechains</span><span class="p">,</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">,</span>
+                                   <span class="n">rotamer_constructor</span><span class="p">)</span>
+    
+    <span class="c"># get rotamer groups and residues they&#39;re linked to</span>
+    <span class="n">rotamer_groups</span><span class="p">,</span> <span class="n">residues_with_rotamer_group</span> <span class="o">=</span> \
+        <span class="n">_GetRotamerGroups</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">,</span> <span class="n">incomplete_sidechains</span><span class="p">,</span>
+                          <span class="n">rotamer_library</span><span class="p">,</span> <span class="n">rotamer_constructor</span><span class="p">,</span> <span class="n">phi_angles</span><span class="p">,</span>
+                          <span class="n">psi_angles</span><span class="p">,</span> <span class="n">use_frm</span><span class="p">,</span> <span class="n">bbdep</span><span class="p">,</span> <span class="n">frame_residues</span><span class="p">)</span>
+
+    <span class="c"># set up graph and solve to get best rotamers</span>
+    <span class="k">if</span> <span class="n">use_frm</span><span class="p">:</span>
+        <span class="n">graph</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">RotamerGraph</span><span class="o">.</span><span class="n">CreateFromFRMList</span><span class="p">(</span><span class="n">rotamer_groups</span><span class="p">)</span>
+    <span class="k">else</span><span class="p">:</span>
+        <span class="n">graph</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">RotamerGraph</span><span class="o">.</span><span class="n">CreateFromRRMList</span><span class="p">(</span><span class="n">rotamer_groups</span><span class="p">)</span>
+
+    <span class="n">solution</span> <span class="o">=</span> <span class="n">graph</span><span class="o">.</span><span class="n">TreeSolve</span><span class="p">(</span><span class="n">max_complexity</span><span class="o">=</span><span class="n">graph_max_complexity</span><span class="p">,</span>
+                               <span class="n">initial_epsilon</span><span class="o">=</span><span class="n">graph_initial_epsilon</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
+
+    <span class="k">if</span> <span class="n">use_frm</span> <span class="ow">and</span> <span class="n">optimize_subrotamers</span><span class="p">:</span>
+        <span class="n">rotamers_to_optimize</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
+
+        <span class="k">for</span> <span class="n">rot_group</span><span class="p">,</span> <span class="n">sol</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">rotamer_groups</span><span class="p">,</span> <span class="n">solution</span><span class="p">):</span> 
+            <span class="n">rotamers_to_optimize</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">rot_group</span><span class="p">[</span><span class="n">sol</span><span class="p">])</span>
+        <span class="n">sidechain</span><span class="o">.</span><span class="n">SubrotamerOptimizer</span><span class="p">(</span><span class="n">rotamers_to_optimize</span><span class="p">)</span>
+
+    <span class="c"># update structure</span>
+    <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">rot_group</span><span class="p">,</span> <span class="n">sol</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">residues_with_rotamer_group</span><span class="p">,</span> <span class="n">rotamer_groups</span><span class="p">,</span>
+                                 <span class="n">solution</span><span class="p">):</span>
+        <span class="k">try</span><span class="p">:</span>
+            <span class="n">res_handle</span> <span class="o">=</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">handle</span>
+            <span class="n">rot_group</span><span class="p">[</span><span class="n">sol</span><span class="p">]</span><span class="o">.</span><span class="n">ApplyOnResidue</span><span class="p">(</span><span class="n">res_handle</span><span class="p">,</span> <span class="n">consider_hydrogens</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
+            <span class="n">sidechain</span><span class="o">.</span><span class="n">ConnectSidechain</span><span class="p">(</span><span class="n">res_handle</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
+        <span class="k">except</span><span class="p">:</span>
+            <span class="k">print</span> <span class="s">&quot;there is a backbone atom missing... &quot;</span><span class="p">,</span> \
+                  <span class="n">res_handle</span><span class="o">.</span><span class="n">GetQualifiedName</span><span class="p">()</span>
+
+<span class="c"># these methods will be exported into module</span></div>
+<span class="n">__all__</span> <span class="o">=</span> <span class="p">(</span><span class="s">&#39;ReconstructSidechains&#39;</span><span class="p">,)</span>
+</pre></div>
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper"><div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="../../../index.html">Documentation overview</a><ul>
+  <li><a href="../../index.html">Module code</a><ul>
+  <li><a href="../../promod3.html">promod3</a><ul>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../../../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/_modules/promod3/modelling/_ring_punches.html b/doc/html/_modules/promod3/modelling/_ring_punches.html
index 40cc44f2..42e41f2e 100644
--- a/doc/html/_modules/promod3/modelling/_ring_punches.html
+++ b/doc/html/_modules/promod3/modelling/_ring_punches.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>promod3.modelling._ring_punches &mdash; ProMod3 0 documentation</title>
+    <title>promod3.modelling._ring_punches &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../../../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../../../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../../../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../../../index.html" />
     <link rel="up" title="promod3" href="../../promod3.html" />
    
   
@@ -41,11 +41,13 @@
 <span class="sd">&#39;&#39;&#39;Helper functions to deal with ring punchings.&#39;&#39;&#39;</span>
 <span class="kn">import</span> <span class="nn">ost</span>
 <span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">geom</span>
-<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">sidechain</span>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">core</span>
+<span class="kn">from</span> <span class="nn">_reconstruct_sidechains</span> <span class="kn">import</span> <span class="n">ReconstructSidechains</span>
 <span class="kn">from</span> <span class="nn">collections</span> <span class="kn">import</span> <span class="n">namedtuple</span>
 
 <span class="k">def</span> <span class="nf">_AddRing</span><span class="p">(</span><span class="n">rings</span><span class="p">,</span> <span class="n">res</span><span class="p">,</span> <span class="n">atom_names</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Try to add ring for given atoms in residue res to rings.&#39;&#39;&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="s">&quot;ring_punches::_AddRing&quot;</span><span class="p">)</span>
     <span class="c"># get exisiting atom positions</span>
     <span class="n">N</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">atom_names</span><span class="p">)</span>
     <span class="k">assert</span><span class="p">(</span><span class="n">N</span> <span class="o">&gt;=</span> <span class="mi">3</span><span class="p">)</span>
@@ -117,7 +119,7 @@
                 <span class="k">return</span> <span class="bp">True</span>
     <span class="k">return</span> <span class="bp">False</span>
 
-<div class="viewcode-block" id="GetRings"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.GetRings">[docs]</a><span class="k">def</span> <span class="nf">GetRings</span><span class="p">(</span><span class="n">ent</span><span class="p">):</span>
+<div class="viewcode-block" id="GetRings"><a class="viewcode-back" href="../../../modelling/model_checking.html#promod3.modelling.GetRings">[docs]</a><span class="k">def</span> <span class="nf">GetRings</span><span class="p">(</span><span class="n">ent</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Get rings for a protein structure.</span>
 <span class="sd">    A ring is only added if all ring-atoms exist or if it is a proline and</span>
 <span class="sd">    three of the atoms exist (center and radii are estimated then).</span>
@@ -132,6 +134,8 @@
 <span class="sd">             radius (:class:`float`),</span>
 <span class="sd">             residue (:class:`~ost.mol.ResidueHandle`).</span>
 <span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;ring_punches::GetRings&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
     <span class="n">rings</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
     <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">ent</span><span class="o">.</span><span class="n">residues</span><span class="p">:</span>
         <span class="k">if</span> <span class="n">r</span><span class="o">.</span><span class="n">one_letter_code</span> <span class="ow">in</span> <span class="s">&#39;YF&#39;</span><span class="p">:</span>
@@ -145,7 +149,7 @@
             <span class="n">_AddRing</span><span class="p">(</span><span class="n">rings</span><span class="p">,</span> <span class="n">r</span><span class="p">,</span> <span class="p">[</span><span class="s">&quot;N&quot;</span><span class="p">,</span> <span class="s">&quot;CA&quot;</span><span class="p">,</span> <span class="s">&quot;CB&quot;</span><span class="p">,</span> <span class="s">&quot;CD&quot;</span><span class="p">,</span> <span class="s">&quot;CG&quot;</span><span class="p">])</span>
     <span class="k">return</span> <span class="n">rings</span>
 </div>
-<div class="viewcode-block" id="GetRingPunches"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.GetRingPunches">[docs]</a><span class="k">def</span> <span class="nf">GetRingPunches</span><span class="p">(</span><span class="n">rings</span><span class="p">,</span> <span class="n">ent</span><span class="p">):</span>
+<div class="viewcode-block" id="GetRingPunches"><a class="viewcode-back" href="../../../modelling/model_checking.html#promod3.modelling.GetRingPunches">[docs]</a><span class="k">def</span> <span class="nf">GetRingPunches</span><span class="p">(</span><span class="n">rings</span><span class="p">,</span> <span class="n">ent</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Get list of residues with rings that are punched by the given structure.</span>
 
 <span class="sd">    :param rings: List of rings as provided by :func:`GetRings`.</span>
@@ -155,6 +159,8 @@
 <span class="sd">    :return: :class:`list` of residues (:class:`~ost.mol.ResidueHandle`) which</span>
 <span class="sd">              have a punched ring.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;ring_punches::GetRingPunches&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
     <span class="n">ring_punches</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
     <span class="k">for</span> <span class="n">ring</span> <span class="ow">in</span> <span class="n">rings</span><span class="p">:</span>
         <span class="c"># we don&#39;t need to add residues multiple times</span>
@@ -167,7 +173,7 @@
                 <span class="k">break</span>
     <span class="k">return</span> <span class="n">ring_punches</span>
 </div>
-<div class="viewcode-block" id="HasRingPunches"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.HasRingPunches">[docs]</a><span class="k">def</span> <span class="nf">HasRingPunches</span><span class="p">(</span><span class="n">rings</span><span class="p">,</span> <span class="n">ent</span><span class="p">):</span>
+<div class="viewcode-block" id="HasRingPunches"><a class="viewcode-back" href="../../../modelling/model_checking.html#promod3.modelling.HasRingPunches">[docs]</a><span class="k">def</span> <span class="nf">HasRingPunches</span><span class="p">(</span><span class="n">rings</span><span class="p">,</span> <span class="n">ent</span><span class="p">):</span>
     <span class="sd">&#39;&#39;&#39;Check if any ring is punched by the given structure.</span>
 <span class="sd">    This check is faster than using :func:`GetRingPunches`.</span>
 
@@ -178,6 +184,8 @@
 <span class="sd">    :return: True, iff any ring is punched</span>
 <span class="sd">    :rtype:  :class:`bool`</span>
 <span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;ring_punches::HasRingPunches&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
     <span class="k">for</span> <span class="n">ring</span> <span class="ow">in</span> <span class="n">rings</span><span class="p">:</span>
         <span class="c"># check neighborhood (3A should be enough)</span>
         <span class="k">for</span> <span class="n">atom</span> <span class="ow">in</span> <span class="n">ent</span><span class="o">.</span><span class="n">FindWithin</span><span class="p">(</span><span class="n">ring</span><span class="o">.</span><span class="n">center</span><span class="p">,</span> <span class="mi">3</span><span class="p">):</span>
@@ -185,7 +193,7 @@
                 <span class="k">return</span> <span class="bp">True</span>
     <span class="k">return</span> <span class="bp">False</span>
 </div>
-<div class="viewcode-block" id="FilterCandidates"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.FilterCandidates">[docs]</a><span class="k">def</span> <span class="nf">FilterCandidates</span><span class="p">(</span><span class="n">candidates</span><span class="p">,</span> <span class="n">model</span><span class="p">,</span> <span class="n">gap</span><span class="p">):</span>
+<div class="viewcode-block" id="FilterCandidates"><a class="viewcode-back" href="../../../modelling/model_checking.html#promod3.modelling.FilterCandidates">[docs]</a><span class="k">def</span> <span class="nf">FilterCandidates</span><span class="p">(</span><span class="n">candidates</span><span class="p">,</span> <span class="n">model</span><span class="p">,</span> <span class="n">gap</span><span class="p">,</span> <span class="n">orig_indices</span><span class="o">=</span><span class="p">[]):</span>
     <span class="sd">&#39;&#39;&#39;Remove loop candidates if they cause ring punches.</span>
 
 <span class="sd">    :param candidates: Loop candidates meant to fill *gap* within *model*.</span>
@@ -195,7 +203,12 @@
 <span class="sd">    :type model:       :class:`~ost.mol.EntityHandle`</span>
 <span class="sd">    :param gap:        Gap for which loop is to be filled.</span>
 <span class="sd">    :type gap:         :class:`StructuralGap`.</span>
+<span class="sd">    :param orig_indices: Mapping to old indexing of candidates. If given, it</span>
+<span class="sd">                         must have as many elements as *candidates*.</span>
+<span class="sd">    :type orig_indices:  :class:`list`</span>
 <span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;ring_punches::FilterCandidates&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
     <span class="n">start_resnum</span> <span class="o">=</span> <span class="n">gap</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span>
     <span class="n">chain_idx</span> <span class="o">=</span> <span class="n">gap</span><span class="o">.</span><span class="n">GetChainIndex</span><span class="p">()</span>
     <span class="c"># precompute rings and range of rings to replace</span>
@@ -211,19 +224,23 @@
     <span class="n">lc_idx</span> <span class="o">=</span> <span class="mi">0</span>
     <span class="k">while</span> <span class="n">lc_idx</span> <span class="o">&lt;</span> <span class="nb">len</span><span class="p">(</span><span class="n">candidates</span><span class="p">):</span>
         <span class="c"># get loop-entity for checks</span>
-        <span class="n">new_loop</span> <span class="o">=</span> <span class="n">candidates</span><span class="p">[</span><span class="n">lc_idx</span><span class="p">]</span><span class="o">.</span><span class="n">bb_list</span><span class="o">.</span><span class="n">ToEntity</span><span class="p">()</span>
+        <span class="n">new_loop</span> <span class="o">=</span> <span class="n">candidates</span><span class="p">[</span><span class="n">lc_idx</span><span class="p">]</span><span class="o">.</span><span class="n">ToEntity</span><span class="p">()</span>
         <span class="n">rings_new</span> <span class="o">=</span> <span class="n">GetRings</span><span class="p">(</span><span class="n">new_loop</span><span class="p">)</span>
         <span class="n">check_punches</span> <span class="o">=</span> <span class="n">HasRingPunches</span><span class="p">(</span><span class="n">rings_out</span><span class="o">+</span><span class="n">rings_new</span><span class="p">,</span> <span class="n">new_loop</span><span class="p">)</span> <span class="ow">or</span>\
                         <span class="n">HasRingPunches</span><span class="p">(</span><span class="n">rings_new</span><span class="p">,</span> <span class="n">model_out</span><span class="p">)</span>
         <span class="k">if</span> <span class="n">check_punches</span><span class="p">:</span>
             <span class="n">candidates</span><span class="o">.</span><span class="n">Remove</span><span class="p">(</span><span class="n">lc_idx</span><span class="p">)</span>
+            <span class="k">if</span> <span class="n">orig_indices</span><span class="p">:</span>
+                <span class="k">del</span> <span class="n">orig_indices</span><span class="p">[</span><span class="n">lc_idx</span><span class="p">]</span>
         <span class="k">else</span><span class="p">:</span>
             <span class="n">lc_idx</span> <span class="o">+=</span> <span class="mi">1</span>
 </div>
-<div class="viewcode-block" id="FilterCandidatesWithSC"><a class="viewcode-back" href="../../../modelling/index.html#promod3.modelling.FilterCandidatesWithSC">[docs]</a><span class="k">def</span> <span class="nf">FilterCandidatesWithSC</span><span class="p">(</span><span class="n">candidates</span><span class="p">,</span> <span class="n">model</span><span class="p">,</span> <span class="n">gap</span><span class="p">):</span>
+<div class="viewcode-block" id="FilterCandidatesWithSC"><a class="viewcode-back" href="../../../modelling/model_checking.html#promod3.modelling.FilterCandidatesWithSC">[docs]</a><span class="k">def</span> <span class="nf">FilterCandidatesWithSC</span><span class="p">(</span><span class="n">candidates</span><span class="p">,</span> <span class="n">model</span><span class="p">,</span> <span class="n">gap</span><span class="p">,</span> <span class="n">orig_indices</span><span class="o">=</span><span class="p">[]):</span>
     <span class="sd">&#39;&#39;&#39;Remove loop candidates if they (with sidechain) cause ring punches.</span>
 <span class="sd">    See :func:`FilterCandidates`.</span>
 <span class="sd">    &#39;&#39;&#39;</span>
+    <span class="n">prof_name</span> <span class="o">=</span> <span class="s">&#39;ring_punches::FilterCandidatesWithSC&#39;</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">StaticRuntimeProfiler</span><span class="o">.</span><span class="n">StartScoped</span><span class="p">(</span><span class="n">prof_name</span><span class="p">)</span>
     <span class="n">start_resnum</span> <span class="o">=</span> <span class="n">gap</span><span class="o">.</span><span class="n">before</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span>
     <span class="n">chain_idx</span> <span class="o">=</span> <span class="n">gap</span><span class="o">.</span><span class="n">GetChainIndex</span><span class="p">()</span>
     <span class="n">cur_model</span> <span class="o">=</span> <span class="n">model</span><span class="o">.</span><span class="n">Copy</span><span class="p">()</span>
@@ -239,16 +256,18 @@
     <span class="n">lc_idx</span> <span class="o">=</span> <span class="mi">0</span>
     <span class="k">while</span> <span class="n">lc_idx</span> <span class="o">&lt;</span> <span class="nb">len</span><span class="p">(</span><span class="n">candidates</span><span class="p">):</span>
         <span class="c"># insert loop into model-copy</span>
-        <span class="n">bb_list</span> <span class="o">=</span> <span class="n">candidates</span><span class="p">[</span><span class="n">lc_idx</span><span class="p">]</span><span class="o">.</span><span class="n">bb_list</span>
+        <span class="n">bb_list</span> <span class="o">=</span> <span class="n">candidates</span><span class="p">[</span><span class="n">lc_idx</span><span class="p">]</span>
         <span class="n">bb_list</span><span class="o">.</span><span class="n">InsertInto</span><span class="p">(</span><span class="n">cur_model</span><span class="o">.</span><span class="n">chains</span><span class="p">[</span><span class="n">chain_idx</span><span class="p">],</span> <span class="n">start_resnum</span><span class="p">)</span>
         <span class="c"># add sidechains and check for clashes</span>
-        <span class="n">sidechain</span><span class="o">.</span><span class="n">Reconstruct</span><span class="p">(</span><span class="n">cur_model</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+        <span class="n">ReconstructSidechains</span><span class="p">(</span><span class="n">cur_model</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
         <span class="n">models_new</span> <span class="o">=</span> <span class="n">cur_model</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="n">myqueryin</span><span class="p">)</span>
         <span class="n">rings_new</span> <span class="o">=</span> <span class="n">GetRings</span><span class="p">(</span><span class="n">models_new</span><span class="p">)</span>
         <span class="n">check_punches</span> <span class="o">=</span> <span class="n">HasRingPunches</span><span class="p">(</span><span class="n">rings_out</span><span class="p">,</span> <span class="n">models_new</span><span class="p">)</span> <span class="ow">or</span>\
                         <span class="n">HasRingPunches</span><span class="p">(</span><span class="n">rings_new</span><span class="p">,</span> <span class="n">cur_model</span><span class="p">)</span>
         <span class="k">if</span> <span class="n">check_punches</span><span class="p">:</span>
             <span class="n">candidates</span><span class="o">.</span><span class="n">Remove</span><span class="p">(</span><span class="n">lc_idx</span><span class="p">)</span>
+            <span class="k">if</span> <span class="n">orig_indices</span><span class="p">:</span>
+                <span class="k">del</span> <span class="n">orig_indices</span><span class="p">[</span><span class="n">lc_idx</span><span class="p">]</span>
         <span class="k">else</span><span class="p">:</span>
             <span class="n">lc_idx</span> <span class="o">+=</span> <span class="mi">1</span>
 
@@ -290,7 +309,7 @@
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/_modules/promod3/sidechain/_reconstruct_sidechains.html b/doc/html/_modules/promod3/sidechain/_reconstruct_sidechains.html
deleted file mode 100644
index 39ed41fd..00000000
--- a/doc/html/_modules/promod3/sidechain/_reconstruct_sidechains.html
+++ /dev/null
@@ -1,454 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    
-    <title>promod3.sidechain._reconstruct_sidechains &mdash; ProMod3 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">
-      var DOCUMENTATION_OPTIONS = {
-        URL_ROOT:    '../../../',
-        VERSION:     '0',
-        COLLAPSE_INDEX: false,
-        FILE_SUFFIX: '.html',
-        HAS_SOURCE:  true
-      };
-    </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>
-    <link rel="top" title="ProMod3 0 documentation" href="../../../index.html" />
-    <link rel="up" title="promod3" href="../../promod3.html" />
-   
-  
-  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
-
-  </head>
-  <body role="document">  
-
-    <div class="document">
-      <div class="documentwrapper">
-        <div class="bodywrapper">
-          <div class="body" role="main">
-            
-  <h1>Source code for promod3.sidechain._reconstruct_sidechains</h1><div class="highlight"><pre>
-<span class="kn">from</span> <span class="nn">.</span> <span class="kn">import</span> <span class="n">_sidechain</span> <span class="k">as</span> <span class="n">sidechain</span>
-<span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">geom</span>
-<span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">mol</span>
-
-<div class="viewcode-block" id="Reconstruct"><a class="viewcode-back" href="../../../sidechain/index.html#promod3.sidechain.Reconstruct">[docs]</a><span class="k">def</span> <span class="nf">Reconstruct</span><span class="p">(</span><span class="n">ent</span><span class="p">,</span> <span class="n">keep_sidechains</span> <span class="o">=</span> <span class="bp">False</span><span class="p">,</span> <span class="n">build_disulfids</span> <span class="o">=</span> <span class="bp">True</span><span class="p">,</span> 
-                <span class="n">rotamer_model</span> <span class="o">=</span> <span class="s">&quot;frm&quot;</span><span class="p">,</span> <span class="n">consider_hbonds</span> <span class="o">=</span> <span class="bp">True</span><span class="p">,</span>
-                <span class="n">rotamer_library</span> <span class="o">=</span> <span class="bp">None</span><span class="p">):</span>
-
-    <span class="k">if</span> <span class="n">rotamer_model</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">==</span> <span class="s">&quot;frm&quot;</span><span class="p">:</span>
-        <span class="n">use_frm</span> <span class="o">=</span> <span class="bp">True</span>
-    <span class="k">elif</span> <span class="n">rotamer_model</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">==</span> <span class="s">&quot;rrm&quot;</span><span class="p">:</span>
-        <span class="n">use_frm</span> <span class="o">=</span> <span class="bp">False</span>
-    <span class="k">else</span><span class="p">:</span>
-        <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s">&quot;Only </span><span class="se">\&quot;</span><span class="s">rrm</span><span class="se">\&quot;</span><span class="s"> and </span><span class="se">\&quot;</span><span class="s">frm</span><span class="se">\&quot;</span><span class="s"> allowed for rotamer_model!&quot;</span><span class="p">)</span>
-
-
-    <span class="n">rotamer_settings</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">RotamerSettings</span><span class="p">()</span>
-    <span class="n">rotamer_settings</span><span class="o">.</span><span class="n">consider_hbonds</span> <span class="o">=</span> <span class="n">consider_hbonds</span>
-    <span class="k">if</span> <span class="n">rotamer_library</span> <span class="o">==</span> <span class="bp">None</span><span class="p">:</span> 
-        <span class="n">rotamer_library</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">LoadDunbrackLib</span><span class="p">()</span>
-    <span class="n">bbdep</span> <span class="o">=</span> <span class="bp">False</span>
-    <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">rotamer_library</span><span class="p">)</span> <span class="ow">is</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">BBDepRotamerLib</span><span class="p">:</span>
-        <span class="n">bbdep</span> <span class="o">=</span> <span class="bp">True</span>
-    <span class="n">residues_with_rotamer_group</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
-    <span class="n">rotamer_groups</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
-    <span class="n">prot</span> <span class="o">=</span> <span class="n">ent</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;peptide=true&quot;</span><span class="p">)</span>
-    <span class="n">incomplete_sidechains</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
-
-    <span class="c">#extract rotamer ids</span>
-    <span class="n">rotamer_ids</span> <span class="o">=</span> <span class="p">[</span><span class="n">sidechain</span><span class="o">.</span><span class="n">ALA</span><span class="p">]</span> <span class="o">*</span> <span class="nb">len</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">)</span>
-    <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">):</span>
-        <span class="n">rot_id</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">TLCToRotID</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">GetName</span><span class="p">())</span>
-        <span class="k">if</span> <span class="n">rot_id</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">XXX</span><span class="p">:</span>
-            <span class="k">continue</span> <span class="c"># no idea what it is, so we stick with ALA </span>
-                     <span class="c"># =&gt; don&#39;t model sidechain</span>
-        <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">rot_id</span>
-
-    <span class="c">#extract dihedral angles</span>
-    <span class="n">phi_angles</span> <span class="o">=</span> <span class="p">[</span><span class="mf">0.0</span><span class="p">]</span> <span class="o">*</span> <span class="nb">len</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">)</span>
-    <span class="n">psi_angles</span> <span class="o">=</span> <span class="p">[</span><span class="mf">0.0</span><span class="p">]</span> <span class="o">*</span> <span class="nb">len</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">)</span>
-  
-    <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">):</span>
-
-        <span class="n">phi</span> <span class="o">=</span> <span class="o">-</span><span class="mf">1.0472</span> 
-        <span class="n">psi</span> <span class="o">=</span> <span class="o">-</span><span class="mf">0.7854</span>
-  
-        <span class="n">tor</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">GetPhiTorsion</span><span class="p">()</span>
-        <span class="k">if</span> <span class="n">tor</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
-            <span class="n">phi</span> <span class="o">=</span> <span class="n">tor</span><span class="o">.</span><span class="n">GetAngle</span><span class="p">()</span>
-        <span class="k">elif</span> <span class="n">i</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-            <span class="n">r_prev</span> <span class="o">=</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">i</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
-            <span class="k">if</span> <span class="n">mol</span><span class="o">.</span><span class="n">InSequence</span><span class="p">(</span><span class="n">r_prev</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">):</span>
-                <span class="n">c_prev</span> <span class="o">=</span> <span class="n">r_prev</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;C&quot;</span><span class="p">)</span>
-                <span class="n">n</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;N&quot;</span><span class="p">)</span>
-                <span class="n">ca</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;CA&quot;</span><span class="p">)</span>
-                <span class="n">c</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;C&quot;</span><span class="p">)</span>
-                <span class="k">if</span> <span class="n">c_prev</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">n</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">ca</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">c</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
-                    <span class="n">phi</span> <span class="o">=</span> <span class="n">geom</span><span class="o">.</span><span class="n">DihedralAngle</span><span class="p">(</span><span class="n">c_prev</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span><span class="n">n</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span>
-                                             <span class="n">ca</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span><span class="n">c</span><span class="o">.</span><span class="n">GetPos</span><span class="p">())</span>
-      
-        <span class="n">tor</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">GetPsiTorsion</span><span class="p">()</span>
-        <span class="k">if</span> <span class="n">tor</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
-            <span class="n">psi</span> <span class="o">=</span> <span class="n">tor</span><span class="o">.</span><span class="n">GetAngle</span><span class="p">()</span>
-        <span class="k">elif</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">):</span>
-            <span class="n">r_next</span> <span class="o">=</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">]</span>
-            <span class="k">if</span> <span class="n">mol</span><span class="o">.</span><span class="n">InSequence</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span><span class="n">r_next</span><span class="o">.</span><span class="n">handle</span><span class="p">):</span>
-                <span class="n">n</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;N&quot;</span><span class="p">)</span>
-                <span class="n">ca</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;CA&quot;</span><span class="p">)</span>
-                <span class="n">c</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;C&quot;</span><span class="p">)</span>
-                <span class="n">n_next</span> <span class="o">=</span> <span class="n">r_next</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;N&quot;</span><span class="p">)</span>
-                <span class="k">if</span> <span class="n">n</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">ca</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">c</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">n_next</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
-                    <span class="n">psi</span> <span class="o">=</span> <span class="n">geom</span><span class="o">.</span><span class="n">DihedralAngle</span><span class="p">(</span><span class="n">n</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span> <span class="n">ca</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span>
-                                             <span class="n">c</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span> <span class="n">n_next</span><span class="o">.</span><span class="n">GetPos</span><span class="p">())</span>
-
-
-        <span class="n">phi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">phi</span>
-        <span class="n">psi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">psi</span>
-
-
-    <span class="c">#set nter and cter</span>
-    <span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">prot</span><span class="o">.</span><span class="n">chains</span><span class="p">:</span>
-        <span class="n">c</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">SetIntProp</span><span class="p">(</span><span class="s">&quot;n_ter&quot;</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span>
-        <span class="n">c</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">SetIntProp</span><span class="p">(</span><span class="s">&quot;c_ter&quot;</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span>
-
-
-    <span class="c">#build up frame and cysteins</span>
-    <span class="n">frame_residues</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
-
-    <span class="c">#build up backbone frame</span>
-    <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">):</span>
-        <span class="k">try</span><span class="p">:</span>
-            <span class="n">frame_residue</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructBackboneFrameResidue</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span>
-                                                                    <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">],</span>
-                                                                    <span class="n">i</span><span class="p">,</span><span class="n">rotamer_settings</span><span class="p">,</span>
-                                                                    <span class="n">phi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">],</span>
-                                                                    <span class="n">r</span><span class="o">.</span><span class="n">HasProp</span><span class="p">(</span><span class="s">&quot;n_ter&quot;</span><span class="p">),</span>
-                                                                    <span class="n">r</span><span class="o">.</span><span class="n">HasProp</span><span class="p">(</span><span class="s">&quot;c_ter&quot;</span><span class="p">))</span>
-            <span class="n">frame_residues</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">frame_residue</span><span class="p">)</span>
-        <span class="k">except</span><span class="p">:</span>
-            <span class="k">continue</span>
-
-
-    <span class="n">frame</span> <span class="o">=</span> <span class="bp">None</span>
-
-    <span class="k">if</span> <span class="n">build_disulfids</span><span class="p">:</span>
-
-        <span class="n">cystein_indices</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
-
-        <span class="k">if</span> <span class="n">keep_sidechains</span><span class="p">:</span>
-            <span class="c">#let&#39;s add all complete sidechains except the cysteins to the frame</span>
-            <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">):</span>
-
-                <span class="k">if</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">CYS</span><span class="p">:</span>
-                    <span class="n">cystein_indices</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
-                    <span class="k">continue</span>
-
-                <span class="k">if</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ALA</span> <span class="ow">or</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">GLY</span><span class="p">:</span>
-                    <span class="k">continue</span> <span class="c">#no sidechain to model</span>
-
-                <span class="k">try</span><span class="p">:</span>
-                    <span class="n">frame_residue</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructSidechainFrameResidue</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span>
-                                                                             <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">],</span>
-                                                                             <span class="n">i</span><span class="p">,</span><span class="n">rotamer_settings</span><span class="p">)</span>
-                    <span class="n">frame_residues</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">frame_residue</span><span class="p">)</span>
-                <span class="k">except</span><span class="p">:</span>
-                    <span class="n">incomplete_sidechains</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
-        <span class="k">else</span><span class="p">:</span>
-            <span class="c">#let&#39;s add everything except cysteins to the incomplete sidechains</span>
-            <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">):</span>
-
-                <span class="k">if</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">CYS</span><span class="p">:</span>
-                    <span class="n">cystein_indices</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
-                    <span class="k">continue</span>
-
-                <span class="k">if</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ALA</span> <span class="ow">or</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">GLY</span><span class="p">:</span>
-                    <span class="k">continue</span> <span class="c">#no sidechain to model</span>
-
-                <span class="n">incomplete_sidechains</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
-
-        <span class="c">#let&#39;s generate the frame without any cystein sidechains</span>
-        <span class="c">#this is required for the disulfid score evaluation</span>
-        <span class="n">frame</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">Frame</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">)</span>
-
-        <span class="c">#some info we have to keep track of when evaluating disulfid bonds</span>
-        <span class="n">cystein_rotamers</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
-        <span class="n">disulfid_indices</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
-        <span class="n">cys_ca_positions</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
-        <span class="n">cys_cb_positions</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
-
-        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">cystein_indices</span><span class="p">:</span>
-
-            <span class="n">rot_grop</span> <span class="o">=</span> <span class="bp">None</span>
-            <span class="n">r</span> <span class="o">=</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
-            <span class="n">ca</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;CA&quot;</span><span class="p">)</span>
-            <span class="n">cb</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;CB&quot;</span><span class="p">)</span>
-
-            <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">ca</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">cb</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()):</span>
-                <span class="k">continue</span>
-
-            <span class="n">cys_ca_positions</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ca</span><span class="o">.</span><span class="n">GetPos</span><span class="p">())</span>
-            <span class="n">cys_cb_positions</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cb</span><span class="o">.</span><span class="n">GetPos</span><span class="p">())</span>
-
-            <span class="k">if</span> <span class="n">use_frm</span><span class="p">:</span>
-                <span class="k">if</span> <span class="n">bbdep</span><span class="p">:</span>
-                    <span class="n">rot_group</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructFRMRotamerGroup</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span>
-                                                                   <span class="n">sidechain</span><span class="o">.</span><span class="n">CYD</span><span class="p">,</span><span class="n">i</span><span class="p">,</span>
-                                                                   <span class="n">rotamer_library</span><span class="p">,</span>
-                                                                   <span class="n">rotamer_settings</span><span class="p">,</span>
-                                                                   <span class="n">phi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">],</span>
-                                                                   <span class="n">psi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
-                <span class="k">else</span><span class="p">:</span>
-                    <span class="n">rot_group</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructFRMRotamerGroup</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span>
-                                                                   <span class="n">sidechain</span><span class="o">.</span><span class="n">CYD</span><span class="p">,</span><span class="n">i</span><span class="p">,</span>
-                                                                   <span class="n">rotamer_library</span><span class="p">,</span>
-                                                                   <span class="n">rotamer_settings</span><span class="p">)</span>
-            <span class="k">else</span><span class="p">:</span>
-                <span class="k">if</span> <span class="n">bbdep</span><span class="p">:</span>
-                    <span class="n">rot_group</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructRRMRotamerGroup</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span>
-                                                                   <span class="n">sidechain</span><span class="o">.</span><span class="n">CYD</span><span class="p">,</span><span class="n">i</span><span class="p">,</span>
-                                                                   <span class="n">rotamer_library</span><span class="p">,</span>
-                                                                   <span class="n">rotamer_settings</span><span class="p">,</span>
-                                                                   <span class="n">phi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">],</span>
-                                                                   <span class="n">psi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
-                <span class="k">else</span><span class="p">:</span>
-                    <span class="n">rot_group</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructRRMRotamerGroup</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span>
-                                                                   <span class="n">sidechain</span><span class="o">.</span><span class="n">CYD</span><span class="p">,</span><span class="n">i</span><span class="p">,</span>
-                                                                   <span class="n">rotamer_library</span><span class="p">,</span>
-                                                                   <span class="n">rotamer_settings</span><span class="p">)</span>
-
-            <span class="n">frame</span><span class="o">.</span><span class="n">AddFrameEnergy</span><span class="p">(</span><span class="n">rot_group</span><span class="p">)</span>
-            <span class="n">cystein_rotamers</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">rot_group</span><span class="p">)</span>
-
-        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">cystein_rotamers</span><span class="p">)):</span>
-            <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">cystein_rotamers</span><span class="p">)):</span>
-
-                <span class="k">if</span> <span class="n">geom</span><span class="o">.</span><span class="n">Distance</span><span class="p">(</span><span class="n">cys_ca_positions</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">cys_ca_positions</span><span class="p">[</span><span class="n">j</span><span class="p">])</span> <span class="o">&gt;</span> <span class="mf">8.0</span><span class="p">:</span>
-                    <span class="k">continue</span> <span class="c">#they&#39;re too far for a disulfid bond</span>
-
-                <span class="k">if</span> <span class="n">cystein_indices</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="ow">in</span> <span class="n">disulfid_indices</span> <span class="ow">or</span> <span class="n">cystein_indices</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="ow">in</span> <span class="n">disulfid_indices</span><span class="p">:</span>
-                    <span class="k">continue</span> <span class="c">#one of them already participates in a disulfid bond!</span>
-                             <span class="c">#that one might be bether but right now is first come</span>
-                             <span class="c">#first served principle</span>
-
-                <span class="n">min_score</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="s">&quot;inf&quot;</span><span class="p">)</span>
-                <span class="n">min_index_k</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span>
-                <span class="n">min_index_l</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span>
-
-                <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">cystein_rotamers</span><span class="p">[</span><span class="n">i</span><span class="p">])):</span>
-                    <span class="k">for</span> <span class="n">l</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">cystein_rotamers</span><span class="p">[</span><span class="n">j</span><span class="p">])):</span>
-                        <span class="n">score</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">DisulfidScore</span><span class="p">(</span><span class="n">cystein_rotamers</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="n">k</span><span class="p">],</span> 
-                                                        <span class="n">cystein_rotamers</span><span class="p">[</span><span class="n">j</span><span class="p">][</span><span class="n">l</span><span class="p">],</span>
-                                                        <span class="n">cys_ca_positions</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> 
-                                                        <span class="n">cys_cb_positions</span><span class="p">[</span><span class="n">i</span><span class="p">],</span>
-                                                        <span class="n">cys_ca_positions</span><span class="p">[</span><span class="n">j</span><span class="p">],</span> 
-                                                        <span class="n">cys_cb_positions</span><span class="p">[</span><span class="n">j</span><span class="p">])</span>
-                        <span class="k">if</span> <span class="n">score</span> <span class="o">&lt;</span> <span class="n">min_score</span><span class="p">:</span>
-                            <span class="n">min_index_k</span> <span class="o">=</span> <span class="n">k</span>
-                            <span class="n">min_index_l</span> <span class="o">=</span> <span class="n">l</span>
-                            <span class="n">min_score</span> <span class="o">=</span> <span class="n">score</span>
-
-                <span class="k">if</span> <span class="n">min_score</span> <span class="o">&lt;</span> <span class="mf">45.0</span><span class="p">:</span>
-                    <span class="n">disulfid_indices</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cystein_indices</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
-                    <span class="n">disulfid_indices</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cystein_indices</span><span class="p">[</span><span class="n">j</span><span class="p">])</span>
-                    <span class="n">particle_list</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
-                    <span class="n">particle_list</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cystein_rotamers</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="n">min_index_k</span><span class="p">][</span><span class="mi">0</span><span class="p">])</span>
-                    <span class="n">new_frame_residue_i</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">FrameResidue</span><span class="p">(</span><span class="n">particle_list</span><span class="p">,</span><span class="n">cystein_indices</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
-                    <span class="n">particle_list</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
-                    <span class="n">particle_list</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cystein_rotamers</span><span class="p">[</span><span class="n">j</span><span class="p">][</span><span class="n">min_index_l</span><span class="p">][</span><span class="mi">0</span><span class="p">])</span>
-                    <span class="n">new_frame_residue_j</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">FrameResidue</span><span class="p">(</span><span class="n">particle_list</span><span class="p">,</span><span class="n">cystein_indices</span><span class="p">[</span><span class="n">j</span><span class="p">])</span>
-                    <span class="n">frame_residues</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">new_frame_residue_i</span><span class="p">)</span>
-                    <span class="n">frame_residues</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">new_frame_residue_j</span><span class="p">)</span>
-                    <span class="c">#set the position in the proteins residues</span>
-                    <span class="n">cystein_rotamers</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="n">min_index_k</span><span class="p">]</span><span class="o">.</span><span class="n">ApplyOnResidue</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">cystein_indices</span><span class="p">[</span><span class="n">i</span><span class="p">]]</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span>
-                                                                    <span class="n">consider_hydrogens</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
-                    <span class="n">cystein_rotamers</span><span class="p">[</span><span class="n">j</span><span class="p">][</span><span class="n">min_index_l</span><span class="p">]</span><span class="o">.</span><span class="n">ApplyOnResidue</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">cystein_indices</span><span class="p">[</span><span class="n">j</span><span class="p">]]</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span>
-                                                                    <span class="n">consider_hydrogens</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span> 
-                    <span class="n">sidechain</span><span class="o">.</span><span class="n">ConnectSidechain</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">cystein_indices</span><span class="p">[</span><span class="n">i</span><span class="p">]]</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span><span class="n">sidechain</span><span class="o">.</span><span class="n">CYS</span><span class="p">)</span>
-                    <span class="n">sidechain</span><span class="o">.</span><span class="n">ConnectSidechain</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">cystein_indices</span><span class="p">[</span><span class="n">j</span><span class="p">]]</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span><span class="n">sidechain</span><span class="o">.</span><span class="n">CYS</span><span class="p">)</span>
-
-
-        <span class="c">#All cysteins participating in a disulfid bond have been applied to the</span>
-        <span class="c">#structure and added to the frame.</span>
-        <span class="c">#All remaining ones have to be handled according the given flags.</span>
-        <span class="k">for</span> <span class="n">idx</span> <span class="ow">in</span> <span class="n">cystein_indices</span><span class="p">:</span>
-            <span class="k">if</span> <span class="n">idx</span> <span class="ow">in</span> <span class="n">disulfid_indices</span><span class="p">:</span>
-                <span class="k">continue</span> <span class="c">#it&#39;s all fine</span>
-            <span class="k">if</span> <span class="n">keep_sidechains</span><span class="p">:</span>
-                <span class="k">try</span><span class="p">:</span>
-                    <span class="n">frame_residue</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructSidechainFrameResidue</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">idx</span><span class="p">]</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span>
-                                                                             <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">idx</span><span class="p">],</span>
-                                                                             <span class="n">idx</span><span class="p">,</span><span class="n">rotamer_settings</span><span class="p">)</span>
-                    <span class="n">frame_residues</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">frame_residue</span><span class="p">)</span>
-                <span class="k">except</span><span class="p">:</span>
-                    <span class="n">incomplete_sidechains</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">idx</span><span class="p">)</span> 
-            <span class="k">else</span><span class="p">:</span>
-                <span class="n">incomplete_sidechains</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">idx</span><span class="p">)</span>  
-
-        <span class="c">#we finally have to rebuild the frame if any disulfid bonds have been built</span>
-        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">disulfid_indices</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-            <span class="n">frame</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">Frame</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">)</span>                 
-
-
-    <span class="k">else</span><span class="p">:</span>
-        <span class="k">if</span> <span class="n">keep_sidechains</span><span class="p">:</span>
-            <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">):</span>
-                <span class="k">if</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ALA</span> <span class="ow">or</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">GLY</span><span class="p">:</span>
-                    <span class="k">continue</span> <span class="c">#no sidechain to model</span>
-                <span class="k">try</span><span class="p">:</span>
-                    <span class="n">frame_residue</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructSidechainFrameResidue</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span>
-                                                                             <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">],</span>
-                                                                             <span class="n">i</span><span class="p">,</span><span class="n">rotamer_settings</span><span class="p">)</span>
-                    <span class="n">frame_residues</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">frame_residue</span><span class="p">)</span>
-                <span class="k">except</span><span class="p">:</span>
-                    <span class="n">incomplete_sidechains</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
-        <span class="k">else</span><span class="p">:</span>
-            <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">):</span>
-                <span class="k">if</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="n">sidechain</span><span class="o">.</span><span class="n">GLY</span><span class="p">,</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ALA</span><span class="p">]:</span>
-                    <span class="n">incomplete_sidechains</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
-
-        <span class="n">frame</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">Frame</span><span class="p">(</span><span class="n">frame_residues</span><span class="p">)</span>
-
-
-    <span class="c">#build rotamers for incomplete sidechains</span>
-    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">incomplete_sidechains</span><span class="p">:</span>
-
-        <span class="n">r</span> <span class="o">=</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
-        <span class="n">rot_id</span> <span class="o">=</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
-        
-        <span class="k">if</span><span class="p">(</span><span class="n">rot_id</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ALA</span> <span class="ow">or</span> <span class="n">rot_id</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">GLY</span><span class="p">):</span>
-            <span class="k">continue</span>
-
-        <span class="k">if</span> <span class="n">rot_id</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">CYS</span><span class="p">:</span>
-            <span class="n">rot_id</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">CYH</span>
-
-        <span class="k">if</span> <span class="n">rot_id</span> <span class="o">==</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">PRO</span><span class="p">:</span>
-            <span class="n">tor</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">GetOmegaTorsion</span><span class="p">()</span>
-            <span class="n">omega</span> <span class="o">=</span> <span class="bp">None</span>
-            <span class="k">if</span> <span class="n">tor</span><span class="o">.</span><span class="n">IsValid</span><span class="p">():</span>
-                <span class="n">omega</span> <span class="o">=</span> <span class="n">tor</span><span class="o">.</span><span class="n">GetAngle</span><span class="p">()</span>
-            <span class="k">elif</span> <span class="n">i</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
-                <span class="c"># fallback computation of omega as in OST-code</span>
-                <span class="n">prev</span> <span class="o">=</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">i</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
-                <span class="k">if</span> <span class="n">prev</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">prev</span><span class="o">.</span><span class="n">IsPeptideLinking</span><span class="p">():</span>
-                    <span class="n">ca_prev</span> <span class="o">=</span> <span class="n">prev</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;CA&quot;</span><span class="p">)</span>
-                    <span class="n">c_prev</span> <span class="o">=</span> <span class="n">prev</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;C&quot;</span><span class="p">)</span>
-                    <span class="n">n</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;N&quot;</span><span class="p">)</span>
-                    <span class="n">ca</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">FindAtom</span><span class="p">(</span><span class="s">&quot;CA&quot;</span><span class="p">)</span>
-                    <span class="n">valid</span> <span class="o">=</span> <span class="n">ca_prev</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">c_prev</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> \
-                            <span class="ow">and</span> <span class="n">n</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span> <span class="ow">and</span> <span class="n">ca</span><span class="o">.</span><span class="n">IsValid</span><span class="p">()</span>
-                    <span class="k">if</span> <span class="n">valid</span> <span class="ow">and</span> <span class="n">mol</span><span class="o">.</span><span class="n">BondExists</span><span class="p">(</span><span class="n">c_prev</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span> <span class="n">n</span><span class="o">.</span><span class="n">handle</span><span class="p">):</span>
-                        <span class="n">omega</span> <span class="o">=</span> <span class="n">geom</span><span class="o">.</span><span class="n">DihedralAngle</span><span class="p">(</span><span class="n">ca_prev</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span>
-                                                   <span class="n">c_prev</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span>
-                                                   <span class="n">n</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(),</span> <span class="n">ca</span><span class="o">.</span><span class="n">GetPos</span><span class="p">())</span>
-            <span class="c"># omega not set if prev. res. missing</span>
-            <span class="k">if</span> <span class="n">omega</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
-                <span class="k">if</span> <span class="nb">abs</span><span class="p">(</span><span class="n">omega</span><span class="p">)</span> <span class="o">&lt;</span> <span class="mf">1.57</span><span class="p">:</span>
-                    <span class="n">rot_id</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">CPR</span>
-                <span class="k">else</span><span class="p">:</span>
-                    <span class="n">rot_id</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">TPR</span>
-
-        <span class="k">try</span><span class="p">:</span>
-            <span class="k">if</span> <span class="n">use_frm</span><span class="p">:</span>
-                <span class="k">if</span> <span class="n">bbdep</span><span class="p">:</span>
-                    <span class="n">rot_group</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructFRMRotamerGroup</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span><span class="n">rot_id</span><span class="p">,</span><span class="n">i</span><span class="p">,</span>
-                                                                   <span class="n">rotamer_library</span><span class="p">,</span><span class="n">rotamer_settings</span><span class="p">,</span>
-                                                                   <span class="n">phi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">],</span><span class="n">psi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
-                <span class="k">else</span><span class="p">:</span>
-                    <span class="n">rot_group</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructFRMRotamerGroup</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span><span class="n">rot_id</span><span class="p">,</span><span class="n">i</span><span class="p">,</span>
-                                                                   <span class="n">rotamer_library</span><span class="p">,</span><span class="n">rotamer_settings</span><span class="p">)</span>
-            <span class="k">else</span><span class="p">:</span>
-                <span class="k">if</span> <span class="n">bbdep</span><span class="p">:</span>
-                    <span class="n">rot_group</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructRRMRotamerGroup</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span><span class="n">rot_id</span><span class="p">,</span><span class="n">i</span><span class="p">,</span>
-                                                                   <span class="n">rotamer_library</span><span class="p">,</span><span class="n">rotamer_settings</span><span class="p">,</span>
-                                                                   <span class="n">phi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">],</span><span class="n">psi_angles</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
-                <span class="k">else</span><span class="p">:</span>
-                    <span class="n">rot_group</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructRRMRotamerGroup</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span><span class="n">rot_id</span><span class="p">,</span><span class="n">i</span><span class="p">,</span>
-                                                                   <span class="n">rotamer_library</span><span class="p">,</span><span class="n">rotamer_settings</span><span class="p">)</span>
-
-        <span class="k">except</span><span class="p">:</span>
-            <span class="k">continue</span>
-        <span class="n">rot_group</span><span class="o">.</span><span class="n">CalculateInternalEnergies</span><span class="p">()</span>
-        <span class="n">frame</span><span class="o">.</span><span class="n">SetFrameEnergy</span><span class="p">(</span><span class="n">rot_group</span><span class="p">)</span>
-        <span class="n">rot_group</span><span class="o">.</span><span class="n">ApplySelfEnergyThresh</span><span class="p">()</span>
-        <span class="n">rotamer_groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">rot_group</span><span class="p">)</span>
-        <span class="n">residues_with_rotamer_group</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>   
-
-
-    <span class="k">if</span> <span class="n">use_frm</span><span class="p">:</span>
-        <span class="n">graph</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">Graph</span><span class="o">.</span><span class="n">CreateFromFRMList</span><span class="p">(</span><span class="n">rotamer_groups</span><span class="p">)</span>
-    <span class="k">else</span><span class="p">:</span>
-        <span class="n">graph</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">Graph</span><span class="o">.</span><span class="n">CreateFromRRMList</span><span class="p">(</span><span class="n">rotamer_groups</span><span class="p">)</span>
-
-
-    <span class="n">solution</span> <span class="o">=</span> <span class="n">graph</span><span class="o">.</span><span class="n">Solve</span><span class="p">(</span><span class="mi">100000000</span><span class="p">,</span><span class="mf">0.02</span><span class="p">)</span>
-
-
-    <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">rot_group</span><span class="p">,</span><span class="n">sol</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">residues_with_rotamer_group</span><span class="p">,</span><span class="n">rotamer_groups</span><span class="p">,</span><span class="n">solution</span><span class="p">):</span>
-        <span class="k">try</span><span class="p">:</span>
-            <span class="n">rot_group</span><span class="p">[</span><span class="n">sol</span><span class="p">]</span><span class="o">.</span><span class="n">ApplyOnResidue</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span><span class="n">consider_hydrogens</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
-            <span class="n">sidechain</span><span class="o">.</span><span class="n">ConnectSidechain</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">handle</span><span class="p">,</span><span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
-        <span class="k">except</span><span class="p">:</span>
-            <span class="k">print</span> <span class="s">&quot;there is a backbone atom missing... &quot;</span><span class="p">,</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">GetQualifiedName</span><span class="p">()</span>
-
-
-<span class="c"># these methods will be exported into module</span></div>
-<span class="n">__all__</span> <span class="o">=</span> <span class="p">(</span><span class="s">&#39;Reconstruct&#39;</span><span class="p">,)</span>
-</pre></div>
-
-          </div>
-        </div>
-      </div>
-      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
-        <div class="sphinxsidebarwrapper"><div class="relations">
-<h3>Related Topics</h3>
-<ul>
-  <li><a href="../../../index.html">Documentation overview</a><ul>
-  <li><a href="../../index.html">Module code</a><ul>
-  <li><a href="../../promod3.html">promod3</a><ul>
-  </ul></li>
-  </ul></li>
-  </ul></li>
-</ul>
-</div>
-<div id="searchbox" style="display: none" role="search">
-  <h3>Quick search</h3>
-    <form class="search" action="../../../search.html" method="get">
-      <input type="text" name="q" />
-      <input type="submit" value="Go" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    <p class="searchtip" style="font-size: 90%">
-    Enter search terms or a module, class or function name.
-    </p>
-</div>
-<script type="text/javascript">$('#searchbox').show(0);</script>
-        </div>
-      </div>
-      <div class="clearer"></div>
-    </div>
-    <div class="footer">
-      &copy;2016, Bienchen.
-      
-      |
-      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
-      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
-      
-    </div>
-
-    
-
-    
-  </body>
-</html>
\ No newline at end of file
diff --git a/doc/html/_modules/test_actions.html b/doc/html/_modules/test_actions.html
index 3bd5dec1..52ede379 100644
--- a/doc/html/_modules/test_actions.html
+++ b/doc/html/_modules/test_actions.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>test_actions &mdash; ProMod3 0 documentation</title>
+    <title>test_actions &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="Module code" href="index.html" />
    
   
@@ -198,7 +198,7 @@
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/_sources/actions/index.txt b/doc/html/_sources/actions/index.txt
new file mode 100644
index 00000000..4820610c
--- /dev/null
+++ b/doc/html/_sources/actions/index.txt
@@ -0,0 +1,116 @@
+.. _promod-actions:
+
+|project| Actions
+================================================================================
+
+A pure command line interface of |project| is provided by actions.
+You can execute ``pm help`` for a list of possible actions and for every action,
+you can type ``pm <ACTION> -h`` to get a description on its usage.
+
+Here we list the most prominent actions with simple examples.
+
+.. _promod-build-model:
+
+Building models
+--------------------------------------------------------------------------------
+
+You can run a full protein homology modelling pipeline from the command line
+with
+
+.. code-block:: console
+
+  $ pm build-model [-h] (-f <FILE> | -c <FILE> | -j <OBJECT>|<FILE>)
+                   (-p <FILE> | -e <FILE>) [-o <FILENAME>]
+
+Example usage:
+
+.. code-block:: console
+
+  $ pm build-model -f aln.fasta -p tpl.pdb
+
+This reads a target-template alignment from :file:`aln.fasta` and a matching
+structure from :file:`tpl.pdb` and produces a gap-less model which is stored as
+:file:`model.pdb`. The output filename can be controlled with the ``-o`` flag.
+
+Target-template alignments can be provided in FASTA (``-f``), CLUSTAL (``-c``)
+or as JSON files/objects (``-j``). Files can be plain or gzipped.
+At least one alignment must be given and you cannot mix file formats.
+Multiple alignment files can be given and target chains will be appended in the
+given order. The chains of the target model are named with default chain names
+(A, B, C, ..., see :meth:`~promod3.modelling.BuildRawModel`).
+Notes on the input formats:
+
+- Leading/trailing whitespaces of sequence names will always be deleted
+
+- FASTA input example:
+
+  .. code-block:: none
+  
+    >target
+    HGFHVHEFGDNTNGCMSSGPHFNPYGKEHGAPVDENRHLG
+    >2jlp-1.A|55
+    RAIHVHQFGDLSQGCESTGPHYNPLAVPH------PQHPG
+
+  Target sequence is either named "trg" or "target" or the first sequence is
+  used. Template sequence names can encode an identifier for the chain to attach
+  to it and optionally an offset (here: 55, see below for details).
+  Leading whitespaces of fasta headers will be deleted
+
+- CLUSTAL input follows the same logic as FASTA input
+
+- JSON input: filenames are not allowed to start with '{'.
+  JSON objects contain an entry with key 'alignmentlist'.
+  That in turn is an array of objects with keys 'target' and 'template'.
+  Those in turn are objects with keys
+  'name' (string id. for sequence),
+  'seqres' (string for aligned sequence) and optionally for templates
+  'offset' (number of residues to skip in structure file attached to it).
+  Example:
+
+  .. code-block:: json
+
+    {"alignmentlist": [ {
+      "target": {
+          "name": "mytrg",
+          "seqres": "HGFHVHEFGDNTNGCMSSGPHFNPYGKEHGAPVDENRHLG"
+      },
+      "template": {
+          "name": "2jlp-1.A",
+          "offset": 55,
+          "seqres": "RAIHVHQFGDLSQGCESTGPHYNPLAVPH------PQHPG"
+      }
+    } ] }
+
+Structures can be provided in PDB (``-p``) or in any format readable by the
+:func:`ost.io.LoadEntity` method (``-e``). In the latter case, the format is
+chosen by file ending. Recognized File Extensions: ``.ent``, ``.pdb``,
+``.ent.gz``, ``.pdb.gz``, ``.cif``, ``.cif.gz``. At least one structure must be
+given and you cannot mix file formats. Multiple structures can be given and each
+structure may have multiple chains, but care must be taken to identify which
+chain to attach to which template sequence. Chains for each sequence are
+identified based on the sequence name of the templates in the alignments. Valid
+sequence names are:
+
+- anything, if only one structure with one chain
+- "<FILE>.<CHAIN>", where <FILE> is the base file name of an imported structure
+  with no extensions and <CHAIN> is the identifier of the chain in the imported
+  structure.
+- "<FILE>" if only one chain in file
+- "<CHAIN>" if only one file imported
+- "<CHAINID>|<OFFSET>", where <CHAINID> identifies the chain as above and
+  <OFFSET> is the number of residues to skip for that chain to reach the first
+  residue in the aligned sequence. Leading/trailing whitespaces of <CHAINID> and
+  <OFFSET> are ignored.
+
+Example: ``... -p data/2jlp.pdb.gz``, where the pdb file has chains ``A``,
+``B``, ``C`` and the template sequence is named ``2jlp.A|55``.
+
+Possible exit codes of the action:
+
+- 0: all went well
+- 1: an unhandled exception was raised
+- 2: arguments cannot be parsed or required arguments are missing
+- 3: failed to perform modelling (internal error)
+- 4: failed to write results to file
+- other non-zero: failure in argument checking
+  (see :class:`promod3.core.pm3argparse.PM3ArgumentParser`)
\ No newline at end of file
diff --git a/doc/html/_sources/buildsystem.txt b/doc/html/_sources/buildsystem.txt
index 449bdfb0..4bb19268 100644
--- a/doc/html/_sources/buildsystem.txt
+++ b/doc/html/_sources/buildsystem.txt
@@ -6,23 +6,24 @@ Building |project|
 --------------------------------------------------------------------------------
 Dependencies
 --------------------------------------------------------------------------------
+
 |project| is build on top of |ost_l|_ (|ost_s|), requiring at least version
-1.5. |ost_s| must be configured and compiled with ``ENABLE_MM=1`` to use |openmm|_.
+1.7. |ost_s| must be configured and compiled with ``ENABLE_MM=1`` to use |openmm|_.
 To create the build system, |cmake|_ is required in version
 2.8.7 or higher. |python|_ works well from version 2.7. For |ost_s| and the
-|C++| bit of |project|, |boost|_ is required in version 1.47.0 (the same as
-used for |ost_s|). Also |eigen3|_ and |lapack|_ are needed. To build
+|C++| bit of |project|, |boost|_ is required in version 1.53.0 (the same as
+used for |ost_s|). Also |eigen3|_ is needed. To build
 documentation, |sphinx|_ 1.2b1 is required.
 
-The currently (Nov. 2015) preferred versions are:
 
-* |ost_s|_ 1.5
-* |openmm|_ 6.1
+The currently preferred versions are:
+
+* |ost_s|_ 1.7
+* |openmm|_ 7.1.1
 * |cmake|_ 2.8.12
 * |python|_ 2.7.5
 * |boost|_ 1.53.0
-* |eigen3|_ 3.2.1
-* |lapack|_ 3.4.2
+* |eigen3|_ 3.3.0
 * |sphinx|_ 1.3.1
 
 --------------------------------------------------------------------------------
@@ -45,11 +46,10 @@ For us, at least pointer to the |ost_s| installation directory is needed,
 handed over to |cmake| by ``-D`` into the variable ``OST_ROOT`` (e.g. |ost_s|
 headers would be located in ``OST_ROOT/include/ost``).
 
-Similarly, one can specify folders for |boost|, |python|, |eigen3| and |lapack|
+Similarly, one can specify folders for |boost|, |python| and |eigen3| 
 if multiple versions exist and/or they are not installed in a default location.
 These are set with the ``BOOST_ROOT`` (make sure that's the same as for |ost_s|), 
-``PYTHON_ROOT``, ``EIGEN3_INCLUDE_DIR``, ``BLAS_blas_LIBRARY`` (BLAS library used
-by |lapack|) and ``LAPACK_lapack_LIBRARY``.
+``PYTHON_ROOT`` and ``EIGEN3_INCLUDE_DIR``.
 
 Here is a list of more options used within |project|:
 
@@ -58,6 +58,10 @@ Here is a list of more options used within |project|:
   ``make check`` (implicit by ``DISABLE_DOCUMENTATION``)
 * ``DISABLE_LINKCHECK`` Don't test links from documentation on ``make check``
   (implicit by ``DISABLE_DOCUMENTATION``)
+* ``ENABLE_SSE`` Allow for more agressive optimization by adding -msse4 flag to
+  the compiler. At some places within the code, we use SSE intrinsics explicitely.
+  This is only enabled if |ost_s| has been compiled with single precision.
+  (``OST_DOUBLE_PRECISION`` flag)
 
 Since we use |ost_s| in the background, some of its options for |cmake| are
 also relevant, here. Basically they need to be set to exactly the same value.
@@ -86,7 +90,7 @@ anything goes wrong, just remove the build directory to get to a clean state
 again. No searching for |cmake| cache files or checking if certain files
 really got rebuild and similar things required.
 
-
+--------------------------------------------------------------------------------
 Running Make
 --------------------------------------------------------------------------------
 After configuring, you want to build |project| by
@@ -115,9 +119,29 @@ special targets:
   ``man`` targets
 * ``help`` :index:`make help` Prints a list of targets available
 
+--------------------------------------------------------------------------------
+Installing |project|
+--------------------------------------------------------------------------------
+If you wish to install |project| (note that you can also safely keep it all in
+the :file:`stage` directory), you can use
+
+.. code-block:: console
+
+   $ make install
+
+By default, this will copy the :file:`stage` directory to :file:`/usr/local`. To
+override this, you can add the ``-DCMAKE_INSTALL_PREFIX=<INSTALL PATH>`` flag to
+your ``cmake`` call.
+
+After the installation, you should be able to delete the whole source folder. To
+ensure that everything works, you can use a set of automated "sanity checks".
+Please follow the instructions in :file:`extras/sanity_checks/README` to setup
+and run those tests after moving the source folder. If everything works, you can
+safely delete the whole source folder.
+
+
 .. |qmean| replace:: QMEAN
 .. |eigen3| replace:: Eigen 3
-.. |lapack| replace:: LAPACK
 .. |openmm| replace:: OpenMM
 .. _qmean: http://swissmodel.expasy.org/qmean/cgi/index.cgi?
 .. _ost_l: http://www.OpenStructure.org
@@ -125,9 +149,8 @@ special targets:
 .. _python: https://www.python.org/
 .. _boost: http://www.boost.org/
 .. _eigen3: http://eigen.tuxfamily.org/index.php?title=Main_Page
-.. _lapack: http://www.netlib.org/lapack/
-.. _openmm: https://simtk.org/home/openmm
+.. _openmm: http://openmm.org
 
 ..  LocalWords:  cmake makefiles CMakeLists txt DOCTEST LINKCHECK conf html
-..  LocalWords:  doctest linkcheck qmean DQMEAN eigen CMakeCache lapack
+..  LocalWords:  doctest linkcheck qmean DQMEAN eigen CMakeCache
 ..  LocalWords:  OPTIMIZE
diff --git a/doc/html/_sources/cmake/index.txt b/doc/html/_sources/cmake/index.txt
index e3a5805c..8bdbfff6 100644
--- a/doc/html/_sources/cmake/index.txt
+++ b/doc/html/_sources/cmake/index.txt
@@ -80,8 +80,7 @@ Default dependencies in a module ``NAME``:
 
   ``LINK``
     Add dependencies to external libraries. You may use some predefines set of
-    libraries here, such as ``${OST_LIBRARIES}``, ``${BOOST_LIBRARIES}`` and
-    ``${LAPACK_LIBRARIES}``.
+    libraries here, such as ``${OST_LIBRARIES}`` and ``${BOOST_LIBRARIES}``.
 
 
 .. cmake:command:: pymod
@@ -97,9 +96,9 @@ Default dependencies in a module ``NAME``:
                         [DEPENDS_ON dep1 dep2]
                         [NEED_CONFIG_HEADER])
 
-  Define the |python| interface of a |project| ProMod3 module from a set of
-  |C++| wrappers and/or Python files. This will define the following make
-  targets (where ``NAME`` is the provided module name):
+  Define the |python| interface of a |project| module from a set of |C++|
+  wrappers and/or Python files. This will define the following make targets
+  (where ``NAME`` is the provided module name):
 
   - ``_NAME``: builds library :file:`_NAME` for |python| wrapper around |C++|
   - ``NAME_pymod``: copies (and/or translates) all |python| files
diff --git a/doc/html/_sources/contributing.txt b/doc/html/_sources/contributing.txt
index 417eafe2..832af70c 100644
--- a/doc/html/_sources/contributing.txt
+++ b/doc/html/_sources/contributing.txt
@@ -1,345 +1,9 @@
 Contributing
 ================================================================================
-The following should explain, in a coarse grain manner, how to add new
-features or your project to |project|. Important topics are |git| branches, the
-directory structure and tightly linked with this also |cmake|. The most general
-advice would be to use existing bits and pieces as examples and to be
-consistent with what you already find here. As an example, documentation
-explaining what a whole module is supposed to do usually goes into a
-:file:`doc` directory within the modules tree, while the API itself is
-documented inline. One exception exists on the example-driven approach:
-following the :mod:`~promod3.core` module for your setup is not advisable. This
-one is a bit special and provides core functionality to everybody else.
-
-In the end of this chapter you will find a little walk-through on how to get
-started.
-
-.. _git-branches:
 
---------------------------------------------------------------------------------
-|git| Branches
---------------------------------------------------------------------------------
-Basically we have two, sometimes three major branches. ``master``, ``develop``
-and in front of a new release a dedicated release branch. For bugs, hotfix
-branches of a rather short life are used.
-
-``master`` is the stable branch, corresponding to a released version. It is
-solely fed by a release or hotfix branch.
-
-Release branches, usually labelled ``release-<VERSION>``, are branched of
-``develop`` to fix features and thoroughly test them before a new major
-release. Once everything looks trustworthy, such a branch is merged into
-``master`` and since there should be a few bug fixes in, ``master`` is merged
-into ``develop``. Bugs are fixed in dedicated hotfix branches, which should
-only exist for the fix and testing itself. Those are forged from release
-branches or ``master``. If created for ``master``, they are also merged back
-into ``develop``.
-
-The ``develop`` branch exists to introduce new features up to the level of
-whole projects extending |project| and see that they work seamlessly together
-with the rest of the system. There do exist a couple of rather strict rules for
-what goes into this branch:
-
-* Your code must have been (briefly) reviewed by others
-* There have to be unit tests
-* It needs to pass ``make check`` **including** ``doctest`` & ``linkcheck``
-* Your project needs documentation
-* It must not break the ability of out-of-source builds
-
-The reason to be a bit restrictive on branches which end up in actual releases,
-should be mostly obvious: |project| is used by productive services as a third
-party toolbox. There it is not an item of active development and people
-probably have no insight in its internals. So messing up a new release creates
-a lot of extra work for a lot of people. First for the developer of a service
-to find out that |project| has turned malicious, then for the maintainer of
-this package to figure out that its your contribution messing things up and in
-the end for you, fixing the problems.
-
-The place where you may get messy is your own |git| branch within the |project|
-repository. This is basically where you should develop your project. Once you
-created something that could go into a release, tidy things up according to the
-rules from above and merge it into ``develop``. From there it will
-automatically find its way into the next release.
-
-To set up your own branch, start from a current ``develop`` branch:
-
-.. code-block:: console
-
-   $ git checkout develop         # switch to branch develop
-   $ git pull --rebase            # update branch develop
-   $ git checkout -b <BRANCHNAME> # create branch <BRANCHNAME> and switch to it
-
-Over time, ``develop`` may recognise some changes, e.g. new features, which you
-want to make use of in your project. Keeping your branch up to date is a three
-step process. |git| does not allow updates on top of changed code, so either
-changes have to be committed, or if in the middle of implementing something,
-stored away temporarily. Making commits is straight forward:
-
-.. code-block:: console
-
-   $ git commit -m '<DESCRIPTION>' # commit changes including a comment
-
-Hiding your changes away from |git| just for updating files is a bit more
-involved. Everything is easily stored on an internal stack and needs to be
-fetched from there, once the branch was updated. One major problem in the past
-was a possible loss of code by those operations. If the update changes a file
-you have changed, too, and stashed away, this may end up in a non-resolvable
-merge conflict and your changes are lost. Usually the log tells you, which
-files were recently modified. Moving all current changes to the stack is
-achieved by:
-
-.. code-block:: console
-
-   $ git stash save
-
-To revive them, use:
-
-.. code-block:: console
-
-   $ git stash pop
-
-After cleaning up your branch, switch to ``develop``, update it and switch back:
-
-.. code-block:: console
-
-   $ git checkout develop
-   $ git pull --rebase
-   $ git checkout <BRANCHNAME>
-
-Now for actually updating your branch, there are two different ways: merging
-and rebasing. A rebase may only be done, if you **never** pushed your branch to
-the origin of the repository (otherwise you will mess up history, in the worst
-case ``develop`` may be unusable once you merge):
-
-.. code-block:: console
-
-   $ git rebase develop
-
-For branches which are available to others, do a proper merge:
-
-.. code-block:: console
-
-   $ git merge develop
-
-This may require some manual conflict solving and will end up in a merge commit.
-
---------------------------------------------------------------------------------
-|git| Hooks
---------------------------------------------------------------------------------
-|git| hooks are scripts invoked by |git| in connection to certain commands.
-|project| currently provides one for :command:`commit`. It is installed by
-
-.. code-block:: console
-
-   $ cp extras/pre_commit/pre-commit .git/hooks/
-
-Its task is applying coding standards and doing a bunch of other checks on the
-files involved in a commit. Everything around the script is hosted in 
-:file:`extras/pre_commit/`. The checks can be manually executed with
-
-.. code-block:: console
-
-   $ python .git/hooks/pre-commit
-
-If you ever have to skip the hook,
-
-.. code-block:: console
-
-   $ git commit --no-verify
-
-does the trick. **But** checks are always run on the complete file containing
-changes, not only on the lines changed. This means if you opt out of an issue,
-it will reappear next time that very file changes.
-
-For checking |python| code, the pre-commit hook employs |pylint|_, to make sure
-we stay close to |pep8|_. If you feel the need to make changes to the |pylint|
-call, please make sure you fully understand what the complaints are. Sometimes
-|pep8| sounds overly restrictive but it may help with performance and
-compatibility with |python| 3. For |project| it is also important that the code
-looks similar throughout the various modules. So do not disable a check because
-it just seems inconvenient or you do not understand why |pylint| is croaking at
-what looks like 'working' code. But then there are also cases where |pylint| is
-not smart enough to cope with valid |pep8| code. For changes with valid cause,
-the configuration flushed into |pylint| may be found at
-:file:`extras/pre_commit/pm3_csc/filecheck/pylintrc` and
-:file:`extras/pre_commit/pm3_csc/filecheck/pylint-unittest-rc`. The latter one
-is invoked on unit test code, where we may go a little bit less restrictive.
-
---------------------------------------------------------------------------------
-Directory Structure
---------------------------------------------------------------------------------
-The directory structure of the |project| repository is supposed to 'keep
-everything together that belongs together'. That is, code, documentation and
-extra data should be gathered on a per-module basis immediately in the
-repository root. The directory structure of your module should look like this:
-
-.. code-block:: text
-
-   promod3.git/                            Project folder
-         your_module/                      Directory housing your project
-               CMakeLists.txt              CMake configuration for this module
-               data/                       Extra data (if needed)
-                     CMakeLists.txt        CMake configuration
-                     ...
-               doc/                        Documentation
-                     CMakeLists.txt        CMake configuration
-                     your_module.rst       Overview/ frame of your module
-                     ...
-               pymod/                      Python code
-                     CMakeLists.txt        CMake configuration
-                     __init__.py           Init file needed for importing
-                     submodule1.py         Code
-                     ...
-               src/                        C/ C++ code
-                     CMakeLists.txt        CMake configuration
-                     source1.cc            C++ code
-                     source2.hh            Header
-                     ...
-               tests/                      Unit tests
-                     CMakeLists.txt        CMake configuration
-                     data/                 Test data (if needed)
-                           ...
-                     test_your_module.py   Unit tests for your_module
-                     test_submodule1.py    Unit tests for submodule1
-                     ...
-
---------------------------------------------------------------------------------
-|cmake|
---------------------------------------------------------------------------------
-The attentive reader may have noticed all the :file:`CMakeLists.txt` files in
-the directory structure. Those are needed to configure the build system, e.g.
-tell it which files have to be considered packaging, compiling, etc.. Also
-|python| modules are declared there as well as which files belong to the
-documentation. |cmake| is a rather complex topic (unfortunately all usable
-build systems seem to be) so we skip a detailed view, here, and just advice you
-to go by example. There is a tiny bit of documentation on our additions to
-|cmake| :ref:`here <pm3-cmake-doc>`. If you really need to make changes to the
-build system, other than adding new files and modules, you have to dive into
-|cmake| documentation all by yourself and on your own responsibility. You have
-been warned.
-
---------------------------------------------------------------------------------
-The :file:`stage` Directory
---------------------------------------------------------------------------------
-Once you hit :command:`make` in your build directory, a directory :file:`stage`
-in this path will be populated. It just resembles a directory structure as of a
-usual Unix file system filled with the build products of |project|. The
-:file:`stage` directory tree can already be utilised. You may import Python
-modules from there, use the binaries from :file:`stage/bin`, etc..
-
---------------------------------------------------------------------------------
-Quick testing of |project| features
---------------------------------------------------------------------------------
-High-level features of |project|, can be tested directly in an interactive
-Python shell. First, you need to tell Python, where to find the modules by
-defining the ``PYTHONPATH`` env. variable in your shell to include the
-:file:`lib64/python2.7/site-packages` folders of the :file:`stage` folders of
-|project| and |ost_s|. For convenience, you can place the export-command in
-your :file:`.bashrc` (or so). Then, you can import modules from ``promod3``
-and ``ost`` as in the example codes shown in this documentation.
-
-To test low-level |C++| features, you can copy the :file:`extras/test_code`
-folder and adapt it for your purposes. First, you will have to fix the paths
-to |project| and |ost_s| in the :file:`Makefile` by changing the following
-lines:
-
-.. code-block:: make
-
-  # path to OST and ProMod3 stage
-  OST_ROOT = <DEFINEME>/ost/build/stage
-  PROMOD3_ROOT = <DEFINEME>/ProMod3/build/stage
-
-Afterwards, you should be able to compile and run small sample codes that use
-|project| and |ost_s| as in the :file:`test.cc` example. You can compile your
-code by executing ``make`` and run it with ``make run``. Also, remember to set
-the ``PROMOD3_SHARED_DATA_PATH`` variable if you moved the stage folder.
-
---------------------------------------------------------------------------------
-Unit Tests
---------------------------------------------------------------------------------
-Of course your code should contain tests. But we cannot give an elaborate
-tutorial on unit testing here. Again, have a look at how other modules treat
-this topic and then there is quite a lot of educated material to be found on
-the Internet. Nevertheless, here is a short list of most important advices:
-
-* Tests go into dedicated scripts/ source files in the :file:`tests` directory
-* No external data dependencies, if tests need data, they find it in
-  :file:`tests/data`
-* If 'exotic' |python| modules are used, consider making the test aware of the
-  possibility that the module is not available
-* Tests do not fail on purpose
-* No failing tests, that are considered 'this does not affect anything'
-
-To run the whole test suite, ``make check`` is enough. This will also trigger
-the ``doctest`` and ``linkcheck`` targets. Alternatively you can run:
-
-- ``make codetest`` to run only unit tests from all modules in |project|.
-  Note that ``make check`` does nothing more but invoking ``doctest``,
-  ``linkcheck`` and ``codetest`` as dependencies.
-- ``make check_xml`` to run tests without stopping after each failure.
-  Failures are shortly reported to the command line and the result of each test
-  is written in 'PYTEST-<TestCaseName>.xml' files in the 'tests' subfolders of
-  your 'build' folder.
-- Run single tests:
-  assuming you have :file:`your_module/tests/test_awesome_feature.py`, |cmake|
-  will provide you with a target ``test_awesome_feature.py_run``. If your module
-  has |C++| tests, those will be available by ``test_suite_your_module_run``.
-
---------------------------------------------------------------------------------
-Writing Documentation
---------------------------------------------------------------------------------
-To create documentation, we use |sphinx|_ to go from |restructuredtext|
-(|restructuredtext_abrv|) files and API documentation in source files to HTML
-or man pages.
-
-For each module, at least one |restructuredtext_abrv| document exists, that
-gives an idea of concepts and pulls in interfaces from source. Copying files to
-the build directory, issuing the |sphinx| call and everything else that is
-needed to create the actual documentation is done by |cmake| and its makefiles.
-Hence, the :file:`CMakeLists.txt` of the :file:`doc` directory of a module is
-crucial. For documentation which does not relate to a particular module, the
-repository comes with a top-level :file:`doc` directory.
-
-While you should not spend to much time thinking about how to format
-documentation, here is a helpful list of standard formatters:
-http://sphinx-doc.org/markup/inline.html
-
-If you write new functionality for |project|, or fix bugs, feel free to extend
-the Changelog. It will be automatically pulled into the documentation.
-
-It is highly recommended to add code examples with your documentation. For that
-purpose, you should write a fully runnable script, which is to be placed in the
-:file:`doc/tests/scripts` directory. The script is to be runnable from within
-the :file:`doc/tests` directory as ``pm SCRIPTPATH`` and may use data stored in
-the :file:`doc/tests/data` directory. The script and any data needed by it, must
-then be referenced in the :file:`doc/tests/CMakeLists.txt` file. Afterwards,
-they can be included in the documentation using the
-`literalinclude <http://www.sphinx-doc.org/en/stable/markup/code.html#includes>`_
-directive. For instance, if you add a new example code :file:`loop_main.py`,
-you would add it in your module documentation as follows:
-
-.. code-block:: rest
-
-  .. literalinclude:: ../../../tests/doc/scripts/loop_main.py
-
-If your example does not relate to a specific module and the documentation is
-in the top-level :file:`doc` directory, you need to drop one of the ``..`` as
-follows:
-
-.. code-block:: rest
-
-  .. literalinclude:: ../../tests/doc/scripts/hello_world.py
-
-To ensure that the code examples keep on working, a unit test has to be defined
-in :file:`doc/tests/test_doctests.py`. Each example code is run by a dedicated
-test function. Usually, the codes are run and the return code is checked.
-Command-line output or resulting files can also be checked (see existing test
-codes for examples). A few more guidelines for example codes:
-
-- If it generates files as output, please delete them after checking them.
-- If it requires external modules or binaries, check for their availablity. If
-  the external dependencies are not available, output a warning and skip the
-  test.
+The following should explain, in a coarse grain manner, how to add new features
+to |project|. The most general advice would be to use existing bits and pieces
+as examples and to be consistent with what you already find here.
 
 .. _how-to-start-your-own-module:
 
@@ -359,7 +23,6 @@ tell you for which branch you went, a story of failure otherwise.
 
    $ git checkout develop
    Switched to branch 'develop'
-   $
 
 Sitting on top of the right code basis, you should just spawn your own branch
 from it. As an example, your feature will go by the name of 'sidechain'.
@@ -368,7 +31,6 @@ from it. As an example, your feature will go by the name of 'sidechain'.
 
    $ git checkout -b sidechain
    Switched to a new branch 'sidechain'
-   $
 
 This time, |git| should tell you about going for **a new** branch.
 
@@ -378,7 +40,6 @@ install our very own |git| hook to check some coding rules on commit.
 .. code-block:: console
 
    $ cp extras/pre_commit/pre-commit .git/hooks/
-   $
 
 With that in place, changes which break our coding standards will abort any
 commit.
@@ -391,7 +52,6 @@ list of directories which are likely to be used in every project.
    $ mkdir -p sidechain/doc
    $ mkdir -p sidechain/pymod
    $ mkdir -p sidechain/tests
-   $
 
 If you run ``git status`` at this point, you will see basically nothing. That
 is, |git| does not admire empty directories. Before you bring your module under
@@ -402,7 +62,6 @@ version control, create a couple of files which are always needed.
    $ touch sidechain/pymod/__init__.py
    $ echo ":mod:\`~promod3.sidechain\` - ProMod3 side chain optimiser" >> sidechain/doc/index.rst
    $ echo "================================================================================" >> sidechain/doc/index.rst
-   $
 
 Having an empty :file:`__init__.py` is perfectly fine for |python|, it just
 announces a directory as a module. But a blank :file:`index.rst` has the chance
@@ -418,7 +77,6 @@ extending some around the directory root.
    $ touch sidechain/CMakeLists.txt
    $ touch sidechain/pymod/CMakeLists.txt
    $ touch sidechain/doc/CMakeLists.txt
-   $
 
 Each of those files still needs a bit of content. The simplest one comes from
 the module's root, :file:`sidechain/CMakeLists.txt`:
@@ -518,7 +176,6 @@ will not show up in ``git status``.
 
    $ mkdir build
    $ cd build
-   $
 
 To actually create all the makefiles and generated files, you may use one of
 the configuration scripts from the :file:`conf-scripts` directory. Usually
@@ -539,7 +196,7 @@ good practice to develop new functionality along tests and that right from the
 beginning. At some point, new code needs testing anyway to see if it does what
 it should, so just do this by writing unit tests. Test sources are stored in
 files with a prefix :file:`test_` and usually come per submodule instead of
-sporting a single monolithic :file:`test_sidechain.py`.
+sporting a single monolithic :file:`test_sidechain_reconstruction.py`.
 
 |python| code is evaluated using its own :py_docs:`unit testing framework
 <library/unittest.html>` with a little help from |ost_s|_ (|C++| uses the
@@ -547,14 +204,14 @@ sporting a single monolithic :file:`test_sidechain.py`.
 <http://www.boost.org/doc/libs/1_47_0/libs/test/doc/html/index.html>`_). The
 basic scheme is to import your module, subclass :class:`unittest.TestCase` and
 make the whole file runnable as script using the most common |nameattr|_
-attribute. As an example we test the :func:`promod3.sidechain.Reconstruct`
-function:
+attribute. As an example we test the 
+:func:`promod3.modelling.ReconstructSidechains` function:
 
-.. literalinclude:: ../../tests/doc/scripts/unittest_sidechain.py
+.. literalinclude:: ../../tests/doc/scripts/unittest_sidechain_reconstruction.py
   :linenos:
 
 To hook up your tests with ``make codetest`` (and to create a
-``test_reconstruct.py_run`` target), everything has to be introduced to |cmake|.
+``test_reconstruct_sidechains.py_run`` target), everything has to be introduced to |cmake|.
 First, tell |cmake| to search :file:`tests` for a :file:`CMakeLists.txt` file
 by extending the list of sub-directories in :file:`sidechain/CMakeLists.txt`:
 
@@ -573,7 +230,7 @@ you.
   :linenos:
 
   set(SIDECHAIN_UNIT_TESTS
-    test_reconstruct.py
+    test_reconstruct_sidechains.py
   )
 
   set(SIDECHAIN_TEST_DATA
@@ -589,7 +246,9 @@ Note how we listed the test data that we require in the unit test by defining
 ``SIDECHAIN_TEST_DATA``.
 
 Now tests should be available by ``make check``, ``make codetest`` and
-``make test_reconstruct.py_run``.
+``make test_reconstruct_sidechains.py_run``.
+
+.. _how-to-start-your-own-action:
 
 --------------------------------------------------------------------------------
 How To Start Your Own Action
@@ -676,7 +335,200 @@ directory. There are only two really important points:
          <put together what your action should do here>
 
   start putting your action together.
+
+--------------------------------------------------------------------------------
+How To Write Your Own Scorer
+--------------------------------------------------------------------------------
+The :mod:`~promod3.scoring` module contains several classes to make it easy to
+add new scorers. As usual, you can use existing bits and pieces as examples and
+try to be consistent with it. Here, we quickly give an overview of the separation of concerns:
+
+- :class:`~promod3.scoring.BackboneScorer`:
+  Defines the scorer with all its parameters and energies and the functionality
+  to compute scores. Scorers are setup by the user (or loaded from disk) if
+  necessary.
   
+  Scorers do not store any environment data. If needed they can be linked via
+  pointers to env. data kept and updated by the score env.. Also, they may be
+  linked to a score env. listener to handle specially organized data.
+
+- :class:`~promod3.scoring.BackboneScoreEnv`:
+  Handles all model-specific data used by the scorers. The user sets up the
+  environment and updates it whenever something changes.
+
+  Residue-specific data is kept in arrays of fixed size (see :class:`IdxHandler`
+  for how the indexing is done). An array of bool-like integers can be accessed
+  with "GetEnvSetData()" and used to determine whether env. data is available
+  for a certain residue. The list of sequences handled by the env. is fixed as
+  otherwise pointers into the data-storage would be invalidated.
+
+- :class:`~promod3.scoring.BackboneScoreEnvListener`:
+  Allows to have score-specific data to be extracted from the model-specific
+  data available in the score env. class. It is commonly used to define
+  spatially organized structures to quickly access other atoms within a given
+  radius.
+
+  All score env. listener are attached to a master score env. and they get
+  updated when the score env. gets updated. Multiple scorers can use the same
+  listener. Listeners are not accessible by anyone outside of the scorers and
+  the score env. object responsible for it. Since the user doesn't see them,
+  there is no Python API for them.
+
+- :class:`~promod3.loop.IdxHandler`:
+  This takes care of translating chain indices (range [0, GetNumChains()])
+  and residue numbers (range [1, GetChainSize(chain_idx)]) into the indexing
+  used internally by the score env. (range [0, GetNumResidues()]).
+  The score env. takes care of this object and makes it accessible for scorers.
+
+As an example, let's look at the :class:`~promod3.scoring.CBPackingScorer`:
+
+- it contains score-specific parameters and energies which can be either
+  set manually or loaded from disk
+- it is linked to a score env. listener of type :class:`CBetaEnvListener`,
+  which provides a :meth:`FindWithin` function to quickly access neighboring
+  CB atoms (note that the same listener is also used by the 
+  :class:`~promod3.scoring.CBetaScorer`)
+- a pointer to the :class:`IdxHandler` object of the score env. is extracted
+  when the environment is attached and is used to get sequence-specific data
+  when calculating the score
+
+As a second example, look at the :class:`~promod3.scoring.PairwiseScorer`:
+
+- it does not require any score-specific setup
+- it is linked to residue-specific CA/CB positions and the pairwise functions
+  defined in the score env.
+- "GetEnvSetData()" of the score env. is used to determine if env. data is
+  available for a given residue
+
+--------------------------------------------------------------------------------
+Quick testing of |project| features
+--------------------------------------------------------------------------------
+High-level features of |project|, can be tested directly in an interactive
+Python shell. First, you need to tell Python, where to find the modules by
+defining the ``PYTHONPATH`` env. variable in your shell to include the
+:file:`lib64/python2.7/site-packages` folders of the :file:`stage` folders of
+|project| and |ost_s|. For convenience, you can place the export-command in
+your :file:`.bashrc` (or so). Then, you can import modules from ``promod3``
+and ``ost`` as in the example codes shown in this documentation.
+
+To test low-level |C++| features, you can copy the :file:`extras/test_code`
+folder and adapt it for your purposes. First, you will have to fix the paths
+to |project| and |ost_s| in the :file:`Makefile` by changing the following
+lines:
+
+.. code-block:: make
+
+  # path to OST and ProMod3 stage
+  OST_ROOT = <DEFINEME>/ost/build/stage
+  PROMOD3_ROOT = <DEFINEME>/ProMod3/build/stage
+
+Afterwards, you should be able to compile and run small sample codes that use
+|project| and |ost_s| as in the :file:`test.cc` example. You can compile your
+code by executing ``make`` and run it with ``make run``. Also, remember to set
+the ``PROMOD3_SHARED_DATA_PATH`` variable if you moved the stage folder.
+
+--------------------------------------------------------------------------------
+Unit Tests
+--------------------------------------------------------------------------------
+Of course your code should contain tests. But we cannot give an elaborate
+tutorial on unit testing here. Again, have a look at how other modules treat
+this topic and then there is quite a lot of educated material to be found on
+the Internet. Nevertheless, here is a short list of most important advices:
+
+* Tests go into dedicated scripts/ source files in the :file:`tests` directory
+* No external data dependencies, if tests need data, they find it in
+  :file:`tests/data`
+* If 'exotic' |python| modules are used, consider making the test aware of the
+  possibility that the module is not available
+* Tests do not fail on purpose
+* No failing tests, that are considered 'this does not affect anything'
+
+To run the whole test suite, ``make check`` is enough. This will also trigger
+the ``doctest`` and ``linkcheck`` targets. Alternatively you can run:
+
+- ``make codetest`` to run only unit tests from all modules in |project|.
+  Note that ``make check`` does nothing more but invoking ``doctest``,
+  ``linkcheck`` and ``codetest`` as dependencies.
+- ``make check_xml`` to run tests without stopping after each failure.
+  Failures are shortly reported to the command line and the result of each test
+  is written in 'PYTEST-<TestCaseName>.xml' files in the 'tests' subfolders of
+  your 'build' folder.
+- Run single tests:
+  assuming you have :file:`your_module/tests/test_awesome_feature.py`, |cmake|
+  will provide you with a target ``test_awesome_feature.py_run``. If your module
+  has |C++| tests, those will be available by ``test_suite_your_module_run``.
+
+.. _writing-documentation:
+
+--------------------------------------------------------------------------------
+Writing Documentation
+--------------------------------------------------------------------------------
+To create documentation, we use |sphinx|_ to go from |restructuredtext|
+(|restructuredtext_abrv|) files and API documentation in source files to HTML
+or man pages.
+
+For each module, at least one |restructuredtext_abrv| document exists, that
+gives an idea of concepts and pulls in interfaces from source. Copying files to
+the build directory, issuing the |sphinx| call and everything else that is
+needed to create the actual documentation is done by |cmake| and its makefiles.
+Hence, the :file:`CMakeLists.txt` of the :file:`doc` directory of a module is
+crucial. For documentation which does not relate to a particular module, the
+repository comes with a top-level :file:`doc` directory.
+
+While you should not spend to much time thinking about how to format
+documentation, here is a helpful list of standard formatters:
+http://sphinx-doc.org/markup/inline.html
+
+If you write new functionality for |project|, or fix bugs, feel free to extend
+the :file:`CHANGELOG` file. It will be automatically pulled into the
+documentation.
+
+It is highly recommended to add code examples with your documentation. For that
+purpose, you should write a fully runnable script, which is to be placed in the
+:file:`doc/tests/scripts` directory. The script is to be runnable from within
+the :file:`doc/tests` directory as ``pm SCRIPTPATH`` and may use data stored in
+the :file:`doc/tests/data` directory. The script and any data needed by it, must
+then be referenced in the :file:`doc/tests/CMakeLists.txt` file. Afterwards,
+they can be included in the documentation using the
+`literalinclude <http://www.sphinx-doc.org/en/stable/markup/code.html#includes>`_
+directive. For instance, if you add a new example code :file:`loop_main.py`,
+you would add it in your module documentation as follows:
+
+.. code-block:: rest
+
+  .. literalinclude:: ../../../tests/doc/scripts/loop_main.py
+
+If your example does not relate to a specific module and the documentation is
+in the top-level :file:`doc` directory, you need to drop one of the ``..`` as
+follows:
+
+.. code-block:: rest
+
+  .. literalinclude:: ../../tests/doc/scripts/hello_world.py
+
+To ensure that the code examples keep on working, a unit test has to be defined
+in :file:`doc/tests/test_doctests.py`. Each example code is run by a dedicated
+test function. Usually, the codes are run and the return code is checked.
+Command-line output or resulting files can also be checked (see existing test
+codes for examples). A few more guidelines for example codes:
+
+- If it generates files as output, please delete them after checking them.
+- If it requires external modules or binaries, check for their availablity. If
+  the external dependencies are not available, output a warning and skip the
+  test.
+
+A copy of the generated html documentation is kept in :file:`doc/html` so that
+there is no need to compile |project| to read it. Our policy is to keep that
+folder in-sync with the latest documentation at least on the ``master`` branch
+(i.e. for every release). You can use the following commands to do the update:
+
+.. code-block:: console
+
+   $ cd <PROMOD3_PATH>/build
+   $ make html
+   $ rsync -iv -az --exclude=".*" --delete \
+           "stage/share/promod3/html/" "../doc/html"
+
 --------------------------------------------------------------------------------
 Third Party Contributions (License Issues)
 --------------------------------------------------------------------------------
@@ -712,18 +564,3 @@ contributions to web pages using |project|.
 .. |fedora| replace:: Fedora
 .. |nameattr| replace:: :attr:`__name__`
 .. |mainattr| replace:: :attr:`__main__`
-.. |pylint| replace:: Pylint
-.. _pylint: http://www.pylint.org
-..  LocalWords:  cmake hotfix doctest linkcheck rebase BRANCHNAME rebasing py
-..  LocalWords:  CMakeLists txt rst pymod init submodule src restructuredtext
-..  LocalWords:  makefiles formatters Changelog codetest promod sidechain io
-..  LocalWords:  mkdir linenos subdirectory abrv emphasize CXX GNUCXX gcc fno
-..  LocalWords:  ARGS endif OPTIMIZE LIBEXEC Wno DIRS dirs subdirs config dbg
-..  LocalWords:  changelog Optimized DOPTIMIZE gitignore cd conf subtree attr
-..  LocalWords:  unittest TestCase nameattr staticmethod builtin cp
-..  LocalWords:  testFileExistsFalse testutils RunTests DQMEAN
-..  LocalWords:  pre API inline CMake hh ProMod Bienchen OST OPENSTRUCTURE os
-..  LocalWords:  mol alg conop QMEAN KIC eigen eigenvectors Lapack 
-..  LocalWords:  OpenStructure ost pylint chmod sys pyc dont bytecode args
-..  LocalWords:  AwesomeActionTests ActionTestCase kwargs testExit getcwd
-..  LocalWords:  RunExitStatusTest DoAwesomeActionTests pardir mainattr alot
diff --git a/doc/html/_sources/core/geometry.txt b/doc/html/_sources/core/geometry.txt
new file mode 100644
index 00000000..3d36b1bd
--- /dev/null
+++ b/doc/html/_sources/core/geometry.txt
@@ -0,0 +1,141 @@
+Geometry functions
+================================================================================
+
+.. currentmodule:: promod3.core
+
+.. function:: EvaluateGromacsPosRule(rule, number, anchors)
+
+  Constructs *number* positions with the given Gromacs rule and anchor positions
+  (see Gromacs manual for details).
+
+  :param rule: Gromacs rule
+  :type rule:  :class:`int`
+  :param number: Desired number of positions (max. 3)
+  :type number:  :class:`int`
+  :param anchors: Anchor positions (max. 4)
+  :type anchors:  :class:`list` of :class:`~ost.geom.Vec3`
+  :return: Constructed *number* positions.
+  :rtype:  :class:`list` of :class:`~ost.geom.Vec3`
+
+.. function:: ConstructCTerminalOxygens(c_pos, ca_pos, n_pos)
+
+  Constructs positions of O and OXT atoms for C terminal.
+
+  :param c_pos: Position of C atom
+  :type c_pos:  :class:`~ost.geom.Vec3`
+  :param n_pos: Position of nitrogen atom
+  :type n_pos:  :class:`~ost.geom.Vec3`
+  :param ca_pos: Position of C-alpha atom
+  :type ca_pos:  :class:`~ost.geom.Vec3`
+  :return: Positions of O and OXT atoms.
+  :rtype:  :class:`tuple` of :class:`~ost.geom.Vec3`
+
+.. function:: ConstructAtomPos(A, B, C, bond_length, angle, dihedral)
+
+  Constructs position of atom "D" based on bond length (C-D), angle (B-C-D) and
+  dihedral (A-B-C-D).
+
+  :param A: Position of atom A
+  :type A:  :class:`~ost.geom.Vec3`
+  :param B: Position of atom B
+  :type B:  :class:`~ost.geom.Vec3`
+  :param C: Position of atom C
+  :type C:  :class:`~ost.geom.Vec3`
+  :param bond_length: Bond length (C-D)
+  :type bond_length:  :class:`float`
+  :param angle: Angle (B-C-D)
+  :type angle:  :class:`float`
+  :param dihedral: Dihedral (A-B-C-D)
+  :type dihedral:  :class:`float`
+  :return: Position of atom D
+  :rtype:  :class:`~ost.geom.Vec3`
+
+.. function:: ConstructCBetaPos(n_pos, ca_pos, c_pos)
+
+  Constructs position of C-beta atom given the positions of the backbone nitrogen,
+  C-alpha and c atoms.
+
+  :param n_pos: Position of nitrogen atom
+  :type n_pos:  :class:`~ost.geom.Vec3`
+  :param ca_pos: Position of C-alpha atom
+  :type ca_pos:  :class:`~ost.geom.Vec3`
+  :param c_pos: Position of C atom
+  :type c_pos:  :class:`~ost.geom.Vec3`
+  :return: Position of C-beta atom
+  :rtype:  :class:`~ost.geom.Vec3`
+
+.. function:: RotationAroundLine(axis, anchor, angle)
+
+  Creates a geometric transform leading to a rotation with specified `angle`
+  around a line defined by `axis` and `anchor`.
+
+  :param axis: Axis of rotation
+  :type axis:  :class:`~ost.geom.Vec3`
+  :param anchor: Anchor for rotation
+  :type anchor:  :class:`~ost.geom.Vec3`
+  :param angle: Angle (in radians in range [-pi,pi]) of rotation
+  :type angle:  :class:`float`
+  :return: Transformation matrix
+  :rtype:  :class:`~ost.geom.Mat4`
+
+.. function:: RotationAroundLine(axis, angle)
+
+  Creates a 3x3 matrix for a rotation by a specified `angle` around an `axis`
+  going through the origin.
+
+  :param axis: Axis of rotation
+  :type axis:  :class:`~ost.geom.Vec3`
+  :param angle: Angle (in radians in range [-pi,pi]) of rotation
+  :type angle:  :class:`float`
+  :return: Rotation matrix
+  :rtype:  :class:`~ost.geom.Mat3`
+
+.. class:: StemCoords()
+           StemCoords(res)
+
+  Simple container class to store N, CA and C coordinates.
+
+  :param res: Residue handle from which to extract N, CA and C coordinates.
+  :type res:  :class:`ost.mol.ResidueHandle`
+
+  :raises: :exc:`~exceptions.RuntimeError` if *res* does not contain N, CA and C
+           atoms.
+
+  .. attribute:: n_coord
+                 ca_coord
+                 c_coord
+
+    Position of nitrogen / alpha carbon / carbon atom.
+    
+    :type:  :class:`~ost.geom.Vec3`
+
+.. class:: StemPairOrientation()
+           StemPairOrientation(n_stem, c_stem)
+
+  Relative orientation of a pair of stems. Can be used to define gaps with four
+  angles and one distance and is used in the fragment database for fast lookups.
+
+  :param n_stem: Coordinates of stem A.
+  :type n_stem:  :class:`StemCoords`
+  :param c_stem: Coordinates of stem B.
+  :type c_stem:  :class:`StemCoords`
+
+  .. attribute:: distance
+
+    Distance of C atom of stem A to N atom of stem B.
+
+    :type: :class:`float`
+
+  .. attribute:: angle_one
+                 angle_two
+
+    Angles defining relative orientation of stem B with respect to stem A.
+
+    :type: :class:`float`
+
+  .. attribute:: angle_three
+                 angle_four
+
+    Angles defining relative orientation of stem A with respect to stem B.
+
+    :type: :class:`float`
diff --git a/doc/html/_sources/core/index.txt b/doc/html/_sources/core/index.txt
index 904e46a8..17f9534a 100644
--- a/doc/html/_sources/core/index.txt
+++ b/doc/html/_sources/core/index.txt
@@ -7,11 +7,12 @@
 This module gathers functions and classes which are not devoted to homology
 modeling per se but cover standard programming issues.
 
+Contents:
+
 .. toctree:: 
   :maxdepth: 2
-
+  
   pm3argparse
-
   helper
-
-..  LocalWords:  promod se toctree maxdepth argcheck
+  geometry
+  runtime_profiling
diff --git a/doc/html/_sources/core/runtime_profiling.txt b/doc/html/_sources/core/runtime_profiling.txt
new file mode 100644
index 00000000..07c51ad5
--- /dev/null
+++ b/doc/html/_sources/core/runtime_profiling.txt
@@ -0,0 +1,73 @@
+Runtime profiling
+================================================================================
+
+.. currentmodule:: promod3.core
+
+.. class:: StaticRuntimeProfiler
+
+  Defines functionality for runtime profiling.
+  
+  All profiling is completely turned off by default and must be activated at
+  compile-time by adding ``-DPM3_RUNTIME_PROFILING_LEVEL=N`` to your |cmake|
+  call, where ``N`` must be larger than 0. If turned off, all these functions
+  will still exist and work but will not do anything. Functionality in the |C++|
+  code is usually profiled at level 2, while |python| functionality is profiled
+  at level 1. The default profiling only covers the steps of the modelling
+  pipeline.
+
+  You can start multiple timers with the same id and statistics will be
+  generated considering the number of timings and the total runtime for that
+  timer. If a timer within another timed entity, the outer timer is paused,
+  while the inner one is running. Hence, the sum of all timers will be the
+  total time spent in any timer (nothing is counted twice!).
+
+  .. staticmethod:: Start(id, level=1)
+
+    Start a timer for the given `id`. This pauses any other currently running
+    timer.
+
+    :param id: Identifier for this timer.
+    :type id:  :class:`str`
+    :param level: Timer only started if level <= ``PM3_RUNTIME_PROFILING_LEVEL``
+    :type level:  :class:`int`
+
+  .. staticmethod:: StartScoped(id, level=1)
+
+    Start a timer for the given `id` as in :meth:`Start`, but this will stop it
+    automatically when the returned variable goes out of scope.
+
+    :param id: Identifier for this timer.
+    :type id:  :class:`str`
+    :param level: Timer only started if level <= ``PM3_RUNTIME_PROFILING_LEVEL``
+    :type level:  :class:`int`
+    :return: Object that will call :meth:`Stop` when it goes out of scope
+
+  .. staticmethod:: Stop(id, level=1)
+
+    Stop the currently running timer. If a timer was paused when starting this
+    timer, it will be resumed now. Note that there is no error checking here, so
+    this will fail miserably if no timer is currently running.
+
+    :param level: Timer only stopped if level <= ``PM3_RUNTIME_PROFILING_LEVEL``
+    :type level:  :class:`int`
+
+  .. staticmethod:: PrintSummary(max_to_show=-1)
+
+    Display a summary of all timed entities. The timers are collected by id and
+    sorted by total runtime. If more than 10 entries are shown and the used id's
+    have the form "GROUP::NAME", an additional summary is shown with the total
+    times spent in each "GROUP".
+
+    :param max_to_show: if >= 0, show only top `max_to_show` entries.
+    :type max_to_show:  :class:`int`
+
+  .. staticmethod:: IsEnabled()
+
+    :return: True, if ``PM3_RUNTIME_PROFILING_LEVEL`` > 0. Otherwise, profiling
+             is completely turned off.
+    :rtype:  :class:`bool`
+
+  .. staticmethod:: Clear()
+
+    Clears all timed entries. Note that there is no error checking here, so this
+    will fail miserably if timers are currently running.
diff --git a/doc/html/_sources/dev_setup.txt b/doc/html/_sources/dev_setup.txt
new file mode 100644
index 00000000..3b450acc
--- /dev/null
+++ b/doc/html/_sources/dev_setup.txt
@@ -0,0 +1,238 @@
+|project| Setup
+================================================================================
+
+The following should give an overview of how this project is set up. Anyone
+planning to develop parts of |project| should read this! Important topics are
+|git| branches, the directory structure and tightly linked with this also
+|cmake|.
+
+.. _git-branches:
+
+--------------------------------------------------------------------------------
+|git| Branches
+--------------------------------------------------------------------------------
+Basically we have two, sometimes three major branches. ``master``, ``develop``
+and in front of a new release a dedicated release branch. For bugs, hotfix
+branches of a rather short life are used.
+
+``master`` is the stable branch, corresponding to a released version. It is
+solely fed by a release or hotfix branch.
+
+Release branches, usually labelled ``release-<VERSION>``, are branched of
+``develop`` to fix features and thoroughly test them before a new major
+release. Once everything looks trustworthy, such a branch is merged into
+``master`` and since there should be a few bug fixes in, ``master`` is merged
+into ``develop``. Bugs are fixed in dedicated hotfix branches, which should
+only exist for the fix and testing itself. Those are forged from release
+branches or ``master``. If created for ``master``, they are also merged back
+into ``develop``.
+
+The ``develop`` branch exists to introduce new features up to the level of
+whole projects extending |project| and see that they work seamlessly together
+with the rest of the system. There do exist a couple of rather strict rules for
+what goes into this branch:
+
+* Your code must have been (briefly) reviewed by others
+* There have to be unit tests
+* It needs to pass ``make check`` **including** ``doctest`` & ``linkcheck``
+* Your project needs documentation
+* It must not break the ability of out-of-source builds
+
+The reason to be a bit restrictive on branches which end up in actual releases,
+should be mostly obvious: |project| is used by productive services as a third
+party toolbox. There it is not an item of active development and people
+probably have no insight in its internals. So messing up a new release creates
+a lot of extra work for a lot of people. First for the developer of a service
+to find out that |project| has turned malicious, then for the maintainer of
+this package to figure out that its your contribution messing things up and in
+the end for you, fixing the problems.
+
+The place where you may get messy is your own |git| branch within the |project|
+repository. This is basically where you should develop your project. Once you
+created something that could go into a release, tidy things up according to the
+rules from above and merge it into ``develop``. From there it will
+automatically find its way into the next release.
+
+To set up your own branch, start from a current ``develop`` branch:
+
+.. code-block:: console
+
+   $ git checkout develop         # switch to branch develop
+   $ git pull --rebase            # update branch develop
+   $ git checkout -b <BRANCHNAME> # create branch <BRANCHNAME> and switch to it
+
+Over time, ``develop`` may recognise some changes, e.g. new features, which you
+want to make use of in your project. Keeping your branch up to date is a three
+step process. |git| does not allow updates on top of changed code, so either
+changes have to be committed, or if in the middle of implementing something,
+stored away temporarily. Making commits is straight forward:
+
+.. code-block:: console
+
+   $ git commit -m '<DESCRIPTION>' # commit changes including a comment
+
+Hiding your changes away from |git| just for updating files is a bit more
+involved. Everything is easily stored on an internal stack and needs to be
+fetched from there, once the branch was updated. One major problem in the past
+was a possible loss of code by those operations. If the update changes a file
+you have changed, too, and stashed away, this may end up in a non-resolvable
+merge conflict and your changes are lost. Usually the log tells you, which
+files were recently modified. Moving all current changes to the stack is
+achieved by:
+
+.. code-block:: console
+
+   $ git stash save
+
+To revive them, use:
+
+.. code-block:: console
+
+   $ git stash pop
+
+After cleaning up your branch, switch to ``develop``, update it and switch back:
+
+.. code-block:: console
+
+   $ git checkout develop
+   $ git pull --rebase
+   $ git checkout <BRANCHNAME>
+
+Now for actually updating your branch, there are two different ways: merging
+and rebasing. A rebase may only be done, if you **never** pushed your branch to
+the origin of the repository (otherwise you will mess up history, in the worst
+case ``develop`` may be unusable once you merge):
+
+.. code-block:: console
+
+   $ git rebase develop
+
+For branches which are available to others, do a proper merge:
+
+.. code-block:: console
+
+   $ git merge develop
+
+This may require some manual conflict solving and will end up in a merge commit.
+
+--------------------------------------------------------------------------------
+|git| Hooks
+--------------------------------------------------------------------------------
+|git| hooks are scripts invoked by |git| in connection to certain commands.
+|project| currently provides one for :command:`commit`. It is installed by
+
+.. code-block:: console
+
+   $ cp extras/pre_commit/pre-commit .git/hooks/
+
+Its task is applying coding standards and doing a bunch of other checks on the
+files involved in a commit. Everything around the script is hosted in 
+:file:`extras/pre_commit/`. The checks can be manually executed with
+
+.. code-block:: console
+
+   $ python .git/hooks/pre-commit
+
+If you ever have to skip the hook,
+
+.. code-block:: console
+
+   $ git commit --no-verify
+
+does the trick. **But** checks are always run on the complete file containing
+changes, not only on the lines changed. This means if you opt out of an issue,
+it will reappear next time that very file changes.
+
+For checking |python| code, the pre-commit hook employs |pylint|_, to make sure
+we stay close to |pep8|_. If you feel the need to make changes to the |pylint|
+call, please make sure you fully understand what the complaints are. Sometimes
+|pep8| sounds overly restrictive but it may help with performance and
+compatibility with |python| 3. For |project| it is also important that the code
+looks similar throughout the various modules. So do not disable a check because
+it just seems inconvenient or you do not understand why |pylint| is croaking at
+what looks like 'working' code. But then there are also cases where |pylint| is
+not smart enough to cope with valid |pep8| code. For changes with valid cause,
+the configuration flushed into |pylint| may be found at
+:file:`extras/pre_commit/pm3_csc/filecheck/pylintrc` and
+:file:`extras/pre_commit/pm3_csc/filecheck/pylint-unittest-rc`. The latter one
+is invoked on unit test code, where we may go a little bit less restrictive.
+
+--------------------------------------------------------------------------------
+Directory Structure
+--------------------------------------------------------------------------------
+The directory structure of the |project| repository is supposed to 'keep
+everything together that belongs together'. That is, code, documentation and
+extra data should be gathered on a per-module basis immediately in the
+repository root. The directory structure of your module should look like this:
+
+.. code-block:: text
+
+   promod3.git/                            Project folder
+         your_module/                      Module directory
+               CMakeLists.txt              CMake configuration
+               data/                       Extra data (if needed)
+                     CMakeLists.txt        CMake configuration
+                     ...
+               doc/                        Documentation
+                     CMakeLists.txt        CMake configuration
+                     your_module.rst       Overview/frame of your module
+                     ...
+               pymod/                      Python code
+                     CMakeLists.txt        CMake configuration
+                     __init__.py           Init file needed for import
+                     submodule1.py         Code
+                     ...
+               src/                        C/ C++ code
+                     CMakeLists.txt        CMake configuration
+                     source1.cc            C++ code
+                     source2.hh            Header
+                     ...
+               tests/                      Unit tests
+                     CMakeLists.txt        CMake configuration
+                     data/                 Test data (if needed)
+                           ...
+                     test_your_module.py   Unit tests for your_module
+                     test_submodule1.py    Unit tests for submodule1
+                     ...
+
+Additionally to the module directories there are a few extra folders:
+
+- :file:`actions`: Scripts callable as ``pm <ACTION_NAME>``.
+  See :ref:`here <how-to-start-your-own-action>` for details.
+- :file:`cmake_support`: Helper functions for |cmake|.
+  See :ref:`here <pm3-cmake-doc>` for details.
+- :file:`doc`: High-level documentation, test scripts (:file:`doc/tests`) and a
+  copy of the generated html documentation (:file:`doc/html`). The latter must
+  be kept up-to-date at least on the ``master`` branch.
+  See :ref:`here <writing-documentation>` for details.
+- :file:`extras`: Extra data and information that doesn't fit anywhere
+  else (e.g. |git| hooks or scripts to recreate the binary files).
+- :file:`scripts`: Input for scripts that end up in :file:`stage/bin`
+
+--------------------------------------------------------------------------------
+|cmake|
+--------------------------------------------------------------------------------
+The attentive reader may have noticed all the :file:`CMakeLists.txt` files in
+the directory structure. Those are needed to configure the build system, e.g.
+tell it which files have to be considered packaging, compiling, etc.. Also
+|python| modules are declared there as well as which files belong to the
+documentation. |cmake| is a rather complex topic (unfortunately all usable
+build systems seem to be) so we skip a detailed view, here, and just advice you
+to go by example. There is a tiny bit of documentation on our additions to
+|cmake| :ref:`here <pm3-cmake-doc>`. If you really need to make changes to the
+build system, other than adding new files and modules, you have to dive into
+|cmake| documentation all by yourself and on your own responsibility. You have
+been warned.
+
+--------------------------------------------------------------------------------
+The :file:`stage` Directory
+--------------------------------------------------------------------------------
+Once you hit :command:`make` in your build directory, a directory :file:`stage`
+in this path will be populated. It just resembles a directory structure as of a
+usual Unix file system filled with the build products of |project|. The
+:file:`stage` directory tree can already be utilised. You may import Python
+modules from there, use the binaries from :file:`stage/bin`, etc..
+
+
+.. |pylint| replace:: Pylint
+.. _pylint: https://www.pylint.org
diff --git a/doc/html/_sources/developers.txt b/doc/html/_sources/developers.txt
index b4da85fb..3955c47c 100644
--- a/doc/html/_sources/developers.txt
+++ b/doc/html/_sources/developers.txt
@@ -10,6 +10,7 @@ Contents:
 .. toctree::
    :maxdepth: 2
 
+   dev_setup
    contributing
    actions/index_dev
    cmake/index
diff --git a/doc/html/_sources/gettingstarted.txt b/doc/html/_sources/gettingstarted.txt
index 55c8ccfd..9b2b8024 100644
--- a/doc/html/_sources/gettingstarted.txt
+++ b/doc/html/_sources/gettingstarted.txt
@@ -17,7 +17,7 @@ First steps to get |project| up and running:
  
   Here ``<COMMAND>`` can be:
 
-  - a predefined "action" (execute ``pm help`` for a list of possible actions)
+  - a predefined "action" (see :ref:`here <promod-actions>`)
   - the path to a python script, such as the following example:
 
     .. literalinclude:: ../../tests/doc/scripts/hello_world.py
@@ -35,6 +35,14 @@ the desired target sequence. The modelling steps then are:
 - Build a raw model from a template by copying the part of the template which
   is conserved
 - Perform loop modelling to close all gaps (see :mod:`~promod3.loop` module)
-- Reconstruct sidechains (see :mod:`~promod3.sidechain` module)
+- Reconstruct sidechains (using :mod:`~promod3.sidechain` module)
 - Minimize energy of final model using molecular mechanics
   (using :mod:`ost.mol.mm` from |ost_s|)
+
+Since a good amount of time is spent in OpenMM routines to minimize energy, we
+try to use the fast and multi-threaded "CPU" platform of OpenMM (should be
+included and working on any hardware supported by OpenMM). If the platform is
+not available, we use the slower "Reference" platform. For the "CPU" platform,
+multiple CPU threads can be used by setting the env. variable
+``PM3_OPENMM_CPU_THREADS`` to the number of desired threads. If the variable is
+not set, 1 thread will be used by default.
diff --git a/doc/html/_sources/loop/all_atom.txt b/doc/html/_sources/loop/all_atom.txt
new file mode 100644
index 00000000..b2f19a81
--- /dev/null
+++ b/doc/html/_sources/loop/all_atom.txt
@@ -0,0 +1,657 @@
+Handling All Atom Positions
+================================================================================
+
+.. currentmodule:: promod3.loop
+
+To represent and handle all atom loops, we provide a container
+(:class:`AllAtomPositions`) to represent arbitrary amino acid sequences with the
+positions of all their heavy atoms and an environment (:class:`AllAtomEnv`) to
+handle changes during loop modelling.
+
+The example below showcases some operations on the two classes:
+
+.. literalinclude:: ../../../tests/doc/scripts/loop_all_atom.py
+
+
+The AllAtomEnv class
+--------------------------------------------------------------------------------
+
+.. class:: AllAtomEnv(seqres)
+
+  The all atom environment contains and handles positions of all atoms during
+  loop modelling. It is linked to a (list of) seqres (one per chain) at
+  construction. The idea is to initialize it at the beginning of the modelling
+  process with all known positions and then update the environment whenever a
+  new loop is being added.
+
+  :param seqres: Internal SEQRES to be set (single chain or list with one per
+                 chain). Whenever setting structural data, consistency with this SEQRES is enforced.
+  :type seqres:  :class:`str` / :class:`ost.seq.SequenceHandle` / 
+                 :class:`list` of :class:`str` / :class:`ost.seq.SequenceList`
+
+  Indexing to access parts of the environment:
+
+  * *chain_idx*: Index of chain as it occurs in *seqres* (0 for single sequence)
+  * *start_resnum*: Residue number defining the position in the SEQRES of chain
+    with index *chain_idx*. **The numbering starts for every chain with the
+    value 1**.
+  * internal residue indexing: all residues of all chains are simply
+    concatenated one after each other (indexing starts at 0)
+
+  .. method:: SetInitialEnvironment(env_structure)
+
+    Sets full environment. Existing data is cleared first.
+
+    :param env_structure:  Structral data to be set as environment. The chains
+                           in *env_structure* are expected to be in the same
+                           order as the SEQRES items provided in constructor.
+    :type env_structure:   :class:`ost.mol.EntityHandle`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if *env* is inconsistent with
+              SEQRES set in constructor. This can be because of corrupt residue
+              numbers or sequence mismatches.
+
+  .. method:: SetEnvironment(new_env_pos)
+              SetEnvironment(new_pos, start_resnum, chain_idx=0)
+              SetEnvironment(bb_list, start_resnum, chain_idx=0)
+
+    Add/update atom positions in environment. In the end, all residues covered
+    in *new_env_pos* / *new_pos* / *bb_list* will be set as defined there. This
+    means, that positions in the env. may be reset, newly set or cleared.
+
+    :param new_env_pos: Structural data to be set as environment.
+    :type new_env_pos:  :class:`AllAtomEnvPositions`
+    :param new_pos: Structural data to be set as environment.
+    :type new_pos:  :class:`AllAtomPositions`
+    :param bb_list: Backbone data to be set as environment.
+    :type bb_list:  :class:`BackboneList`
+    :param start_resnum: Res. number defining the start position in the SEQRES.
+    :type start_resnum:  :class:`int` / :class:`ost.mol.ResNum`
+    :param chain_idx: Index of chain the structural data belongs to.
+    :type chain_idx:  :class:`int`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if *new_pos* / *new_env_pos* /
+              *bb_list* is inconsistent with SEQRES set in constructor or when
+              either *start_resnum* or *chain_idx* point to invalid positions in
+              the SEQRES.
+
+  .. method:: ClearEnvironment(start_resnum, num_residues, chain_idx=0)
+
+    Clears a stretch of length *num_residues* in the environment in chain 
+    with idx *chain_idx* starting from residue number *start_resnum*
+
+    :param start_resnum: Start of stretch to clear
+    :type start_resnum:  :class:`int`
+    :param num_residues: Length of stretch to clear
+    :type num_residues:  :class:`int`
+    :param chain_idx: Chain the stretch belongs to
+    :type chain_idx:  :class:`int`
+
+    :raises:  :exc:`~exceptions.RuntimeError` when either *start_resnum* or 
+              *chain_idx* point to invalid positions in the SEQRES.
+
+  .. method:: GetEnvironment(start_resnum, num_residues, chain_idx=0)
+
+    :return: Copy of stretch of structural data in environment. Useful to store
+             a loop to reset later with :meth:`SetEnvironment`.
+    :rtype:  :class:`AllAtomEnvPositions`
+
+    :param start_resnum: Start of stretch to store
+    :type start_resnum:  :class:`int`
+    :param num_residues: Length of stretch to store
+    :type num_residues:  :class:`int`
+    :param chain_idx: Chain the stretch belongs to
+    :type chain_idx:  :class:`int`
+
+    :raises:  :exc:`~exceptions.RuntimeError` when either *start_resnum* or 
+              *chain_idx* point to invalid positions in the SEQRES.
+
+  .. method:: GetSeqres()
+
+    :return: SEQRES that was set in constructor (one sequence per chain).
+    :rtype:  :class:`ost.seq.SequenceList`
+
+  .. method:: GetAllAtomPositions()
+
+    :return: Reference (use with caution!) to the internal storage of all atom
+             positions for the environment. All residues of all chains are
+             stored continuously in there. To get a copy of some positions use
+             :meth:`GetEnvironment`.
+    :rtype:  :class:`AllAtomPositions`
+
+
+The AllAtomPositions class
+--------------------------------------------------------------------------------
+
+.. class:: AllAtomPositions
+
+  Container for the positions of all heavy atoms of an arbitrary amino acid sequence. This is tailored for fast operations within |C++| codes. The Python export described here, is mainly meant for debugging or to initialize the object and feed it to other classes using it.
+
+  Indexing of positions and residues:
+
+  - residue indexing is in the range [0, :meth:`GetNumResidues`-1] and is in the
+    order of the sequence used to initialize the object
+  - indexing of single atoms is in the range [0, :meth:`GetNumAtoms`-1]. For
+    each residue you can find the bounds with :meth:`GetFirstIndex` and
+    :meth:`GetLastIndex` or find a single atom with :meth:`GetIndex`
+
+  Each atom position is initially unset (unless a list of residues is passed
+  when constructing it) and can only be set with calls to :meth:`SetPos` or
+  :meth:`SetResidue`.
+
+  .. method:: AllAtomPositions(sequence)
+
+    Creates a container for the given *sequence* with all positions unset.
+
+    :param sequence: Sequence of amino acid one letter codes.
+    :type sequence:  :class:`str`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *sequence* contains a one letter
+             code which is not one of the 20 default amino acids.
+
+  .. method:: AllAtomPositions(residues)
+
+    Creates a container for the given *residues*. Both sequence and positions
+    are extracted from the given residues.
+
+    :param residues: List of residues
+    :type residues:  :class:`ost.mol.ResidueHandleList`
+
+    :raises: :exc:`~exceptions.RuntimeError` if any residue has a one letter
+             code which is not one of the 20 default amino acids.
+
+  .. method:: AllAtomPositions(sequence, residues)
+
+    Creates a container for the given *sequence* and extracts positions from
+    *residues*. The residues may be different amino acids than the given
+    *sequence* (see :meth:`SetResidue`).
+
+    :param sequence: Sequence of amino acid one letter codes.
+    :type sequence:  :class:`str`
+    :param residues: List of residues from which positions are extracted.
+    :type residues:  :class:`ost.mol.ResidueHandleList`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *sequence* contains a one letter
+             code which is not one of the 20 default amino acids or if
+             *sequence* and *residues* are inconsistent in size.
+
+  .. method:: AllAtomPositions(bb_list)
+
+    Creates a container for the given backbone. Both sequence and backbone
+    positions are extracted from the given residues.
+
+    :param bb_list: Backbone list of residues
+    :type bb_list:  :class:`BackboneList`
+
+    :raises: :exc:`~exceptions.RuntimeError` if any residue has a one letter
+             code which is not one of the 20 default amino acids.
+
+
+  .. method:: SetResidue(res_index, res)
+
+    Set positions for residue at index *res_index* given the atoms in *res*.
+    For each expected heavy atom, we search for an atom of that name in *res*
+    and if found set the corresponding position, otherwise we unset it.
+
+    :param res_index: Residue index
+    :type res_index:  :class:`int`
+    :param res: Residue providing atoms
+    :type res:  :class:`ost.mol.ResidueHandle`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *res_index* out of bounds.
+
+  .. method:: SetResidue(res_index, other, other_res_index)
+
+    Set positions for residue at index *res_index* given the positions of
+    residue at index *other_res_index* in *other* position container. Each
+    position is set or cleared according to the data in *other*.
+
+    :param res_index: Residue index
+    :type res_index:  :class:`int`
+    :param other: Position container from which we take data
+    :type other:  :class:`AllAtomPositions`
+    :param other_res_index: Residue index in *other*
+    :type other_res_index:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *res_index* or *other_res_index*
+             out of bounds or if residues in the two containers are inconsistent
+             (different amino acids).
+
+  .. method:: SetPos(index, pos)
+
+    :param index: Set position at that index.
+    :type index:  :class:`int`
+    :param pos: Set position to *pos*.
+    :type pos:  :class:`ost.geom.Vec3`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *index* out of bounds.
+
+  .. method:: ClearPos(index)
+
+    :param index: Unset position at that index.
+    :type index:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *index* out of bounds.
+
+  .. method:: ClearResidue(res_index)
+
+    :param res_index: Unset all positions for residue at that index.
+    :type res_index:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *res_index* out of bounds.
+
+
+  .. method:: GetPos(index)
+
+    :return: Position at given index.
+    :rtype:  :class:`ost.geom.Vec3`
+    :param index: Atom position index.
+    :type index:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *index* out of bounds.
+
+  .. method:: IsSet(index)
+
+    :return: True, if the position at that index is currently set.
+    :rtype:  :class:`bool`
+    :param index: Atom position index.
+    :type index:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *index* out of bounds.
+
+
+  .. method:: GetIndex(res_index, atom_name)
+
+    :return: Atom position index for atom named *atom_name* (standard PDB
+             naming) for residue at index *res_index*.
+    :rtype:  :class:`int`
+    :param res_index: Residue index
+    :type res_index:  :class:`int`
+    :param atom_name: Atom name
+    :type atom_name:  :class:`str`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *res_index* out of bounds or
+             if *atom_name* is not one of that residue's heavy atoms.
+
+  .. method:: GetFirstIndex(res_index)
+
+    :return: First atom position index for residue at index *res_index*.
+    :rtype:  :class:`int`
+    :param res_index: Residue index
+    :type res_index:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *res_index* out of bounds.
+
+  .. method:: GetLastIndex(res_index)
+
+    :return: Last atom position index for residue at index *res_index*.
+    :rtype:  :class:`int`
+    :param res_index: Residue index
+    :type res_index:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *res_index* out of bounds.
+
+  .. method:: GetAA(res_index)
+
+    :return: Amino acid type of residue at index *res_index*.
+    :rtype:  :class:`ost.conop.AminoAcid`
+    :param res_index: Residue index
+    :type res_index:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *res_index* out of bounds.
+
+  .. method:: IsAnySet(res_index)
+
+    :return: True, if any atom position of residue at index *res_index* is set.
+    :rtype:  :class:`bool`
+    :param res_index: Residue index
+    :type res_index:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *res_index* out of bounds.
+
+  .. method:: IsAllSet(res_index)
+
+    :return: True, if all atom positions of residue at index *res_index* are set.
+    :rtype:  :class:`bool`
+    :param res_index: Residue index
+    :type res_index:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *res_index* out of bounds.
+
+
+  .. method:: GetPhiTorsion(res_index, def_angle=-1.0472)
+
+    :return: Phi torsion angle of residue at index *res_index* or *def_angle*
+             if required atom positions (C-N-CA-C) are not set.
+    :rtype:  :class:`float`
+    :param res_index: Residue index
+    :type res_index:  :class:`int`
+    :param def_angle: Default phi angle.
+    :type def_angle:  :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *res_index* - 1 or *res_index*
+             out of bounds.
+
+  .. method:: GetPsiTorsion(res_index, def_angle=-0.7854)
+
+    :return: Psi torsion angle of residue at index *res_index* or *def_angle*
+             if required atom positions (N-CA-C-N) are not set.
+    :rtype:  :class:`float`
+    :param res_index: Residue index
+    :type res_index:  :class:`int`
+    :param def_angle: Default psi angle.
+    :type def_angle:  :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *res_index* or *res_index* + 1
+             out of bounds.
+
+  .. method:: GetOmegaTorsion(res_index, def_angle=3.14159)
+
+    :return: Omega torsion angle of residue at index *res_index* or *def_angle*
+             if required atom positions (CA-C-N-CA) are not set.
+             Here, we use CA-C of residue *res_index* - 1 and N-CA of residue
+             *res_index* (consistent with OST's
+             :meth:`~ost.mol.ResidueHandle.GetOmegaTorsion`).
+    :rtype:  :class:`float`
+    :param res_index: Residue index
+    :type res_index:  :class:`int`
+    :param def_angle: Default omega angle.
+    :type def_angle:  :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *res_index* - 1 or *res_index*
+             out of bounds.
+
+  .. method:: GetNumAtoms()
+
+    :return: Number of atom positions stored in this container.
+    :rtype:  :class:`int`
+
+  .. method:: GetNumResidues()
+
+    :return: Number of residues stored in this container.
+    :rtype:  :class:`int`
+
+  .. method:: GetSequence()
+
+    :return: Sequence of one letter codes of all residues stored here.
+    :rtype:  :class:`str`
+
+
+  .. method:: Copy()
+
+    :return: Full copy of this object.
+    :rtype:  :class:`AllAtomPositions`
+
+  .. method:: Extract(from, to)
+
+    :return: Container with residues with indices in range [*from*, *to*-1].
+    :rtype:  :class:`AllAtomPositions`
+    :param from: First residue index
+    :type from:  :class:`int`
+    :param to: One after last residue index
+    :type to:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *from* >= *to* or if any residue
+             index is out of bounds.
+
+  .. method:: Extract(res_indices)
+
+    :return: Container with residues with indices in *res_indices*.
+    :rtype:  :class:`AllAtomPositions`
+    :param res_indices: List of residue index
+    :type res_indices:  :class:`list` of :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if any residue index is out of
+             bounds.
+
+  .. method:: ExtractBackbone(from, to)
+
+    :return: Backbone list of residues with indices in range [*from*, *to*-1].
+             CB atoms are reconstructed if unset.
+    :rtype:  :class:`BackboneList`
+    :param from: First residue index
+    :type from:  :class:`int`
+    :param to: One after last residue index
+    :type to:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *from* >= *to*, if any residue
+             index is out of bounds or if any residue has any unset backbone
+             atom (N, CA, C, O).
+
+  .. method:: ToEntity()
+
+    :return: All residues packed in a single chain as an OST entity.
+             Connectivity resolved with :class:`ost.conop.HeuristicProcessor`.
+    :rtype:  :class:`ost.mol.EntityHandle`
+
+  .. method:: InsertInto(res_index, chain, res_num)
+
+    Insert a single residue (taken from given index) into the *chain* (with
+    given res. number). Existing data is replaced and atoms are (re)connected
+    according to the default connectivity of that amino acid. Peptide links to
+    neighboring residues are set according to residue numbering. To make this
+    function efficient, we require the backbone atoms (N, C, CA) to be set.
+
+    :param res_index: Residue index
+    :type res_index:  :class:`int`
+    :param chain: Chain into which we insert
+    :type chain:  :class:`ost.mol.ChainHandle`
+    :param start_resnum: Residue number for the inserted residue
+    :type start_resnum:  :class:`int` / :class:`ost.mol.ResNum`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *res_index* out of bounds, if
+             *chain* is invalid or if not all backbone atoms (N, C, CA) set.
+
+
+The AllAtomEnvPositions class
+--------------------------------------------------------------------------------
+
+.. class:: AllAtomEnvPositions
+
+  To link the arbitrary amino acid sequence defined in :class:`AllAtomPositions`
+  and the SEQRES of :class:`AllAtomEnv`, we provide a helper class containing
+  structural data as well as a mapping to the internal residue indices of
+  :class:`AllAtomEnv`.
+
+  .. attribute:: all_pos
+
+    Container for the positions of all heavy atoms of some residues.
+
+    :type: :class:`AllAtomPositions`
+
+  .. attribute:: res_indices
+
+    Residue indices to be used by :class:`AllAtomEnv` for each residue defined
+    in *all_pos*.
+
+    :type: :class:`list` of :class:`int`
+
+
+Distinguishing amino acid atoms
+--------------------------------------------------------------------------------
+
+.. class:: AminoAcidAtom
+  
+  Enumerates all heavy atoms of all amino acids. The naming scheme is TLC_AN,
+  where TLC is the standard three letter code of the amino acid and AN is the
+  atom name (standard PDB naming) of the heavy atom. Examples: *ALA_CB*,
+  *ARG_CA*, *ASN_C*, *ASP_O*, *CYS_SG*, *GLU_OE1*, *GLN_NE2*, *GLY_N*.
+
+  We include all heavy atoms that amino acids have when they are peptide bound
+  to other residues (i.e. no OXT).
+
+  Additionally, there is the value *XXX_NUM_ATOMS*, which corresponds to the
+  number of atoms in the enumerator. Each heavy atom hence corresponds to an
+  integer in the range [0, *XXX_NUM_ATOMS*-1].
+
+.. class:: AminoAcidHydrogen
+  
+  Enumerates all hydrogens of all amino acids. The naming scheme is TLC_AN,
+  where TLC is the standard three letter code of the amino acid and AN is the
+  atom name (standard PDB naming) of the hydrogen. Examples: *ALA_H*,
+  *ARG_HD3*, *ASN_HB2*, *ASP_HA*, *CYS_HB3*, *LEU_H*.
+
+  We include all hydrogens that amino acids can have including *H1* (def. PDB
+  name = "H"), *H2* and (if not PRO) *H3* for charged N-terminal residues. Note
+  that the H atom attached to N when peptide bound (*H*) is distinct from the N
+  terminal hydrogens (e.g. *ALA_H* != *ALA_H1*). For *HIS* we consider the fully
+  protonated state, while *ASP* and *GLU* are included in their charged state.
+
+  Additionally, there is the value *XXX_NUM_HYDROGENS*, which corresponds to the
+  number of hydrogens in the enumerator. Each hydrogen hence corresponds to an
+  integer in the range [0, *XXX_NUM_HYDROGENS*-1].
+
+.. class:: AminoAcidLookup
+  
+  Collection of static methods to lookup properties of amino acid types
+  (:class:`ost.conop.AminoAcid`), heavy atom types (:class:`AminoAcidAtom`) and
+  hydrogen types (:class:`AminoAcidHydrogen`).
+
+  .. staticmethod:: GetOLC(aa)
+
+    :return: One letter code for the given amino acid
+    :rtype:  :class:`str`
+    :param aa: Amino acid type
+    :type aa:  :class:`~ost.conop.AminoAcid`
+
+  .. staticmethod:: GetAAA(aa, atom_idx)
+                    GetAAA(aa, atom_name)
+
+    :return: Heavy atom type for the given amino acid and atom.
+    :rtype:  :class:`AminoAcidAtom`
+    :param aa: Amino acid type
+    :type aa:  :class:`~ost.conop.AminoAcid`
+    :param atom_idx: Atom index (in [0, GetNumAtoms(aa)-1])
+    :type atom_idx:  :class:`int`
+    :param atom_name: Atom name
+    :type atom_name:  :class:`str`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *atom_idx* out of bounds or if
+             *atom_name* is not one of the heavy atoms of *aa*.
+
+  .. staticmethod:: GetAAH(aa, atom_idx)
+                    GetAAH(aa, atom_name)
+
+    :return: Hydrogen type for the given amino acid and atom.
+    :rtype:  :class:`AminoAcidHydrogen`
+    :param aa: Amino acid type
+    :type aa:  :class:`~ost.conop.AminoAcid`
+    :param atom_idx: Atom index (in [0, GetNumHydrogens(aa)-1])
+    :type atom_idx:  :class:`int`
+    :param atom_name: Atom name
+    :type atom_name:  :class:`str`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *atom_idx* out of bounds or if
+             *atom_name* is not one of the hydrogens of *aa*.
+
+  .. staticmethod:: GetIndex(aa, atom_name)
+
+    :return: Atom index (in [0, GetNumAtoms(aa)-1]) for the given amino acid and
+             atom.
+    :rtype:  :class:`int`
+    :param aa: Amino acid type
+    :type aa:  :class:`~ost.conop.AminoAcid`
+    :param atom_name: Atom name
+    :type atom_name:  :class:`str`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *atom_name* is not one of the
+             heavy atoms of *aa*.
+
+  .. staticmethod:: GetHydrogenIndex(aa, atom_name)
+
+    :return: Atom index (in [0, GetNumHydrogens(aa)-1]) for the given amino acid
+             and atom.
+    :rtype:  :class:`int`
+    :param aa: Amino acid type
+    :type aa:  :class:`~ost.conop.AminoAcid`
+    :param atom_name: Atom name
+    :type atom_name:  :class:`str`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *atom_name* is not one of the
+             hydrogens of *aa*.
+
+  .. staticmethod:: GetNumAtoms(aa)
+
+    :return: Number of heavy atoms of the given amino acid
+    :rtype:  :class:`int`
+    :param aa: Amino acid type
+    :type aa:  :class:`~ost.conop.AminoAcid`
+
+  .. staticmethod:: GetMaxNumAtoms()
+
+    :return: Max. number of heavy atoms for any amino acid
+    :rtype:  :class:`int`
+
+  .. staticmethod:: GetNumHydrogens(aa)
+
+    :return: Number of hydrogens of the given amino acid
+    :rtype:  :class:`int`
+    :param aa: Amino acid type
+    :type aa:  :class:`~ost.conop.AminoAcid`
+
+  .. staticmethod:: GetMaxNumHydrogens()
+
+    :return: Max. number of hydrogens for any amino acid
+    :rtype:  :class:`int`
+
+  .. staticmethod:: GetAA(aaa)
+                    GetAA(aah)
+
+    :return: Amino acid type of the given heavy atom type
+    :rtype:  :class:`~ost.conop.AminoAcid`
+    :param aaa: Heavy atom type
+    :type aaa:  :class:`AminoAcidAtom`
+    :param aah: Hydrogen type
+    :type aah:  :class:`AminoAcidHydrogen`
+
+  .. staticmethod:: GetAtomName(aaa)
+                    GetAtomName(aah)
+                    GetAtomNameCharmm(aaa)
+                    GetAtomNameCharmm(aah)
+                    GetAtomNameAmber(aaa)
+                    GetAtomNameAmber(aah)
+
+    :return: Atom name of the given heavy atom type according to PDB (default),
+             CHARMM or AMBER naming.
+    :rtype:  :class:`str`
+    :param aaa: Heavy atom type
+    :type aaa:  :class:`AminoAcidAtom`
+    :param aah: Hydrogen type
+    :type aah:  :class:`AminoAcidHydrogen`
+
+  .. staticmethod:: GetElement(aaa)
+
+    :return: Chemical element of the given heavy atom type
+    :rtype:  :class:`str`
+    :param aaa: Heavy atom type
+    :type aaa:  :class:`AminoAcidAtom`
+
+  .. staticmethod:: GetAnchorAtomIndex(aah)
+
+    :return: Atom index (in [0, GetNumAtoms(GetAA(aah))-1]) of the anchor to
+             which the given hydrogen is attached.
+    :rtype:  :class:`int`
+    :param aah: Hydrogen type
+    :type aah:  :class:`AminoAcidHydrogen`
+
+  .. staticmethod:: GetHNIndex(aa)
+
+    :return: Atom index (in [0, GetNumHydrogens(aa)-1]) of H atom attached to N
+             when residue is peptide bound.
+    :rtype:  :class:`int`
+    :param aa: Amino acid type
+    :type aa:  :class:`~ost.conop.AminoAcid`
+
+    :raises: :exc:`~exceptions.RuntimeError` if no such atom (i.e. PRO)
+
+  .. staticmethod:: GetH1Index(aa)
+                    GetH2Index(aa)
+                    GetH3Index(aa)
+
+    :return: Atom index (in [0, GetNumHydrogens(aa)-1]) of H atom attached to N
+             when residue is N terminal.
+    :rtype:  :class:`int`
+    :param aa: Amino acid type
+    :type aa:  :class:`~ost.conop.AminoAcid`
+
+    :raises: :exc:`~exceptions.RuntimeError` if no such atom (i.e. H3 for PRO)
diff --git a/doc/html/_sources/loop/backbone.txt b/doc/html/_sources/loop/backbone.txt
index 1c4f6634..15288fb3 100644
--- a/doc/html/_sources/loop/backbone.txt
+++ b/doc/html/_sources/loop/backbone.txt
@@ -1,118 +1,32 @@
-Backbone
+Representing Loops
 ================================================================================
 
 .. currentmodule:: promod3.loop
 
 
 The most simple representation of structural information in |project| is the
-:class:`Backbone`. It provides a way to store the backbone positions of
-a residue. For simple structural manipulations they can be gathered to a
-:class:`BackboneList` that can be inserted into or converted to a 
-:class:`ost.mol.EntityHandle` at any time.
+:class:`BackboneList`. It provides a way to store the backbone positions of
+residues. They provide structural manipulations, they can be manipulated and
+converted from, to, or inserted to a :class:`ost.mol.EntityHandle`.
 
 .. literalinclude:: ../../../tests/doc/scripts/loop_backbone.py
 
 
-The Basic Building Blocks
---------------------------------------------------------------------------------
-
-.. class:: Backbone
-  
-  Container for the positions of the backbone atoms (N,CA,CB,C and O) of a residue.
-
-  .. method:: Backbone(n,ca,c,o,olc)
-
-    :param n:       Position of nitrogen
-    :param ca:      Position of alpha carbon
-    :param c:       Position of carbon
-    :param o:       Position of oxygen
-    :param olc:     One letter code of the residue
-    :type n:        :class:`~ost.geom.Vec3`
-    :type ca:       :class:`~ost.geom.Vec3`
-    :type c:        :class:`~ost.geom.Vec3`
-    :type o:        :class:`~ost.geom.Vec3`
-    :type olc:      :class:`char`
-
-  .. method:: Backbone(n,ca,c,o,cb,olc)
-
-    :param n:       Position of nitrogen
-    :param ca:      Position of alpha carbon
-    :param c:       Position of carbon
-    :param o:       Position of oxygen
-    :param cb:      Position of beta carbon
-    :param olc:     One letter code of the residue
-    :type n:        :class:`~ost.geom.Vec3`
-    :type ca:       :class:`~ost.geom.Vec3`
-    :type c:        :class:`~ost.geom.Vec3`
-    :type o:        :class:`~ost.geom.Vec3`
-    :type cb:       :class:`~ost.geom.Vec3`
-    :type olc:      :class:`char`
-
-  .. method:: Backbone(res,olc)
-
-    :param res:     Residue from which to extract backbone atom positions
-    :param olc:     One letter code of the residue
-    :type res:      :class:`~ost.mol.ResidueHandle`
-    :type olc:      :class:`char`
-
-  .. attribute:: n_coord
-
-    Coordinate of the nitrogen atom (:class:`ost.geom.Vec3`)
-
-  .. attribute:: ca_coord
-
-    Coordinate of the C-alpha carbon atom (:class:`ost.geom.Vec3`)
-
-  .. attribute:: c_coord
-
-    Coordinate of the C carbon atom (:class:`ost.geom.Vec3`)
-
-  .. attribute:: o_coord
-
-    Coordinate of the oxygen atom (:class:`ost.geom.Vec3`)
-
-  .. attribute:: cb_coord
-
-    Coordinate of the C-beta carbon atom (:class:`ost.geom.Vec3`)
-
-  .. attribute:: one_letter_code
-
-    One letter code of the residue (:class:`char`)  
-
-  .. attribute:: aa
-
-    Amino acid type of the residue (:class:`ost.conop.AminoAcid`)
-
-  .. method:: ApplyTransform(transformation_matrix)
-
-    Applies a transformation to the coordinates of the backbone
-
-    :param transformation_matrix:       The transformation
-    :type transformation_matrix:        :class:`ost.geom.Mat4` / :class:`ost.geom.Transform`
-
-  .. method:: GetTransform(target)
-
-     Get transformation performing a minimum RMSD transformation onto
-     *target* considering the positions of the N, CA and C atoms.
-
-    :param target:    The target positions
-
-    :type target:     :class:`Backbone` / :class:`ost.mol.ResidueHandle`          
-
-    :returns:         A 4x4 transformation matrix
-    :rtype:           :class:`ost.geom.Mat4`
-
-
-
-Editing Full Stretches Of Backbone Residues
+The BackboneList class
 --------------------------------------------------------------------------------
 
 .. class:: BackboneList()
   
-  Container for the positions of the backbone atoms (N,CA,CB,C and O) of a
-  segment. This object basically contains a list of :class:`Backbone` and
-  allows setting or modifying the positions of the atoms by setting/changing
-  torsion angles.
+  Container for the positions of the backbone atoms (nitrogen (N), alpha carbon
+  (CA), beta carbon (CB), carbon (C), oxygen (O)), the one letter codes and
+  amino acid types of a segment. This object allows to get, set or modify the
+  atom positions, etc through a set of functions (**indexing to access each
+  residue starts at 0**). To simplify algorithms, which use this structure, each
+  residue has a CB position defined (i.e. even if it's a glycine) and we only
+  allow amino acid types belonging to the 20 default amino acids. Note that the
+  omega torsion angle defined here for residue *i* is the dihedral between CA-C
+  of residue *i* and N-CA of residue *i+1* (this is shifted by 1 residue
+  compared to OST's :meth:`~ost.mol.ResidueHandle.GetOmegaTorsion`).
 
   .. method:: BackboneList()
 
@@ -126,9 +40,12 @@ Editing Full Stretches Of Backbone Residues
 
     :type sequence:     :class:`str`
 
+    :raises: :exc:`~exceptions.RuntimeError` if *sequence* contains a one letter
+             code which is not one of the 20 default amino acids.
+
   .. method:: BackboneList(sequence, dihedral_angles)
 
-    Creates a BackboneList from given **sequence** and **dihedral_angles**
+    Creates a BackboneList from given *sequence* and *dihedral_angles*
 
     :param sequence:    Sequence of created BackboneList
     :param dihedral_angles: List of :class:`tuple` objects defining the backbone
@@ -139,297 +56,464 @@ Editing Full Stretches Of Backbone Residues
                             angle of 180 degrees. In case of three elements, all
                             angles are defined.
 
-
     :type sequence:     :class:`str`
     :type dihedral_angles: :class:`list`
 
-    :raises:            :exc:`~exceptions.RuntimeError` if **sequence** and 
-                        **dihedral_angles** are inconsistent in size.   
+    :raises: :exc:`~exceptions.RuntimeError` if *sequence* contains a one letter
+             code which is not one of the 20 default amino acids or if
+             *sequence* and *dihedral_angles* are inconsistent in size.
 
   .. method:: BackboneList(sequence, residues)
 
-    Creates a BackboneList from given **sequence** and positions extracted from
-    **residues**
+    Creates a BackboneList from given *sequence* and positions extracted from
+    *residues*.
 
     :param sequence:    Sequence of created BackboneList
-    :param residues:    List of :class:`ost.mol.ResidueHandle` objects from which the
-                        backbone positions are extracted.
+    :param residues:    List of :class:`ost.mol.ResidueHandle` objects from
+                        which the backbone positions are extracted.
 
     :type sequence:     :class:`str`
     :type residues:     :class:`list`
 
-    :raises:            :exc:`~exceptions.RuntimeError` if **sequence** and 
-                        **residues** are inconsistent in size or when there is
-                        a residue not providing all necessary positions. 
+    :raises: :exc:`~exceptions.RuntimeError` if *sequence* contains a one letter
+             code which is not one of the 20 default amino acids or if
+             *sequence* and *residues* are inconsistent in size or when there is
+             a residue not providing all necessary positions. 
 
 
-  .. method:: ToEntity()
+  .. method:: ToDensity(padding=10.0, sampling=Vec3(1.0,1.0,1.0), \
+                        resolution=3.0, high_resolution=false)
+    
+    :return: The whole backbone list converted to a density map.
+    :rtype:  :class:`ost.img.ImageHandle`
 
-    Transforms the backbone list into an :class:`ost.mol.EntityHandle`.
+    .. note that ImageHandle and MapHandle are the same, but former is mentioned
+       in OST doc, so we use that for documentation purposes
 
-    :return:          The entity
-    :rtype:           :class:`ost.mol.EntityHandle`
+    :param padding:
+    :type padding:  :class:`float`
+    :param sampling:
+    :type sampling:  :class:`~ost.geom.Vec3`
+    :param resolution:
+    :type resolution:  :class:`float`
+    :param high_resolution:
+    :type high_resolution:  :class:`bool`
 
-  .. method:: GetSequence()
-
-    :return:            The amino acid sequence
+  .. method:: ToEntity()
 
-  .. method:: SetSequence(sequence)
+    :return: The whole backbone list converted to an OST entity.
+    :rtype:  :class:`ost.mol.EntityHandle`
 
-    Set amino acid sequence.
+  .. method:: InsertInto(chain, start_resnum)
 
-  .. method:: Extract(from, to)
+    Inserts the backbone list into the *chain*. If the residues corresponding
+    to the :class:`BackboneList` are already present in the entity, they will
+    be replaced, otherwise they will be added to the entity.
 
-    :returns: Items with indices *from*, ..., *to*-1 of this list.
-    :rtype:   :class:`BackboneList`
+    :param chain:        The chain
+    :type chain:         :class:`ost.mol.ChainHandle`
+    :param start_resnum: Residue number defining the start location of insertion
+    :type start_resnum:  :class:`int` / :class:`ost.mol.ResNum`
 
-  .. method:: MinCADistance(other)
+  .. method:: InsertInto(map, resolution=3.0, high_resolution=false)
 
-    Calculates the minimal pairwise CA-distance between this and the *other*
-    :class:`BackboneList`
+    :param map: 
+    :type map:  :class:`ost.img.ImageHandle`
+    :param resolution:
+    :type resolution:  :class:`float`
+    :param high_resolution:
+    :type high_resolution:  :class:`bool`
 
-    :param other:       The other :class:`BackboneList`
-    :type other:        :class:`BackboneList`
+  .. method:: GetBounds(all_atom=True)
 
-    :returns:           Minimal pairwise CA-distance
+    :returns:
+    :rtype:   :class:`ost.geom.AlignedCuboid`
+    :param all_atom: 
+    :type all_atom:  :class:`bool`
 
-  .. method:: InsertInto(chain, start_resnum, remodel_cterminal_o=True)
 
-    Inserts the backbone list into the **chain**. If the residues corresponding
-    to the :class:`BackboneList` are already present in the entity, they will
-    be replaced, otherwise they will be added to the entity.
+  .. method:: GetSequence()
 
-    :param chain:                 The chain
-    :param start_resnum:          Residue number defining the start location of
-                                  insertion
-    :param remodel_cterminal_o:   The position of the cterminal o is dependent
-                                  on the residue after the c_stem. If this flag
-                                  is set and the residue after the cterminus is 
-                                  present in **chain**, the according oxygen
-                                  position gets recalculated.
-    :type chain:                 :class:`ost.mol.ChainHandle`
-    :type start_resnum:          :class:`int` / :class:`ost.mol.ResNum`
-    :type remodel_cterminal_o:   :class:`bool`
+    :return: The amino acid sequence.
+    :rtype:  :class:`str`
 
-  .. method:: ReconstructCBetaPositions()
+  .. method:: SetSequence(sequence)
 
-    Does a simple reconstruction of all CBeta positions based on the actual
-    n, ca, and c positions.
+    :param sequence: Set amino acid sequence to this.
+    :type sequence:  :class:`str`
 
-  .. method:: ReconstructOxygenPositions(last_psi=-0.78540)
+    :raises: :exc:`~exceptions.RuntimeError` if *sequence* contains a one letter
+             code which is not one of the 20 default amino acids.
 
-    Does a simple reconstruction of all oxygen positions based on the actual
-    n, ca and c positions. The position of the last oxygen depends on the next
-    residue, an additional parameter is therefore required.
 
-    :param last_psi:    Psi angle of the last BackboneList residue,
-                        the default value corresponds to a typical alpha-helix
+  .. method:: Extract(from, to)
 
-    :type last_psi:     :class:`float`
+    :returns: Items with indices *from*, ..., *to*-1 of this list.
+    :rtype:   :class:`BackboneList`
 
-  .. method:: ApplyTransform(transform)
+  .. method:: ReplaceFragment(sub_fragment, index, superpose_stems)
 
-    Applies a transformation to the positions of the :class:`BackboneList`.
+    Replaces a fragment of the :class:`BackboneList` starting at position
+    *index* by the *sub_fragment*.
 
-    :param transform:  The transformation
-    :type transform:   :class:`ost.geom.Transform` / :class:`ost.geom.Mat4`
+    :param sub_fragment:          The fragment to be inserted
+    :param index:                 The position at which the fragment 
+                                  replacement will begin
+    :param superpose_stems:       If set to false, the function will simply
+                                  replace the according 
+                                  :class:`Backbone` objects. If set to True,
+                                  the n-terminal and c-terminal tails are superposed onto the *sub_fragment* 
+                                  stems using the positions at *index* and 
+                                  *index* + len( *sub_fragment* )-1.
+    :type sub_fragment:           :class:`BackboneList`
+    :type index:                  :class:`int`
+    :type superpose_stems:        :class:`bool`
 
-  .. method:: SetPhiTorsion(index, angle, sequential=False)
+    :raises:                      :exc:`~exceptions.RuntimeError` if
+                                  *sub_fragment* does not fully fit into
+                                  actual fragment at specified *index*
+
+
+  .. method:: GetN(index)
+              GetCA(index)
+              GetCB(index)
+              GetC(index)
+              GetO(index)
+
+    :return: Position of nitrogen / alpha carbon / beta carbon / carbon / oxygen
+             atom for residue at given index.
+    :rtype:  :class:`~ost.geom.Vec3`
+    :param index: Residue index.
+    :type index:  :class:`int`
+
+  .. method:: SetN(index, pos)
+              SetCA(index, pos)
+              SetCB(index, pos)
+              SetC(index, pos)
+              SetO(index, pos)
+
+    :param index: Residue index.
+    :type index:  :class:`int`
+    :param pos: Set position of nitrogen / alpha carbon / beta carbon / carbon
+                / oxygen atom to this.
+    :type pos:  :class:`~ost.geom.Vec3`
+
+  .. method:: GetOLC(index)
+
+    :return: One letter code of the residue at given index.
+    :rtype:  :class:`char`
+    :param index: Residue index.
+    :type index:  :class:`int`
+
+  .. method:: SetOLC(index, olc)
+
+    :param index: Residue index.
+    :type index:  :class:`int`
+    :param olc: Set one letter code of the residue to this.
+    :type olc:  :class:`char`
+
+  .. method:: GetAA(index)
+
+    :return: Amino acid type of the residue at given index.
+    :rtype:  :class:`ost.conop.AminoAcid`
+    :param index: Residue index.
+    :type index:  :class:`int`
+
+  .. method:: SetAA(index, aa)
+
+    :param index: Residue index.
+    :type index:  :class:`int`
+    :param aa: Set amino acid type of the residue to this.
+    :type aa:  :class:`ost.conop.AminoAcid`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *aa* == ost.conop.XXX.
+
+
+  .. method:: Set(index, n_pos, ca_pos, cb_pos, c_pos, o_pos, olc)
+              Set(index, n_pos, ca_pos, c_pos, o_pos, olc)
+              Set(index, res, olc)
+
+    Set all backbone informations. This will reconstruct CB positions if needed
+    and set the amino acid type according to the given one letter code.
+
+    :param index: Residue index.
+    :type index:  :class:`int`
+    :param res: Residue from which to extract backbone atom positions
+    :type res:  :class:`~ost.mol.ResidueHandle`
+    :param n_pos: Set position of nitrogen atom to this.
+    :type n_pos:  :class:`~ost.geom.Vec3`
+    :param ca_pos: Set position of alpha carbon atom to this.
+    :type ca_pos:  :class:`~ost.geom.Vec3`
+    :param cb_pos: Set position of beta carbon atom to this.
+    :type cb_pos:  :class:`~ost.geom.Vec3`
+    :param c_pos: Set position of carbon atom to this.
+    :type c_pos:  :class:`~ost.geom.Vec3`
+    :param o_pos: Set position of oxygen atom to this.
+    :type o_pos:  :class:`~ost.geom.Vec3`
+    :param olc: Set one letter code of the residue to this.
+    :type olc:  :class:`char`
 
-    Sets the *phi* torsion angle of the backbone at position **index** in the :class:`BackboneList`.
 
-    :param index:                The index of the residue in the :class:`BackboneList` for which the angle should be set.
-    :param angle:                The angle
-    :param sequential:           If *True*, the rotation will be propagated to all residues after the one with **index**. Otherwise it will be propagated in the direction where it will affect the least number of residues.
+  .. method:: __len__()
 
-    :type index:             :class:`int`
-    :type angle:             :class:`float`
-    :type sequential:         :class:`bool`
+    :returns: Number of residues in this backbone list.
+    :rtype:   :class:`int`
 
-  .. method:: SetPsiTorsion(index, angle, sequential=False)
+  .. method:: resize(new_size)
 
-    Sets the *psi* torsion angle of the backbone at position **index** in the :class:`BackboneList`.
+    :param new_size: Resize backbone list to contain this number of residues.
+                     If new residues are added, their properties will not be
+                     initialized. Existing residues are untouched unless the
+                     list is shrinked (in that case extra residues are deleted).
+    :type new_size:  :class:`int`
 
-    :param index:                The index of the residue in the :class:`BackboneList` for which the angle should be set.
-    :param angle:                The angle
-    :param sequential:           If *True*, the rotation will be propagated to all residues after the one with **index**. Otherwise it will be propagated in the direction where it will affect the least number of residues.
+  .. method:: empty()
 
-    :type index:             :class:`int`
-    :type angle:             :class:`float`
-    :type sequential:         :class:`bool`
+    :returns: True if the list is empty (i.e. size 0).
+    :rtype:   :class:`bool`
 
-  .. method:: SetOmegaTorsion(index, angle, sequential=False)
+  .. method:: append(n_pos, ca_pos, cb_pos, c_pos, o_pos, olc)
+              append(n_pos, ca_pos, c_pos, o_pos, olc)
+              append(res, olc)
 
-    Sets the *omega* torsion angle of the backbone at position **index** in the :class:`BackboneList`.
+    Appends a new residue at the end of the :class:`BackboneList`. This will
+    reconstruct CB positions if needed and set the amino acid type according
+    to the given one letter code.
 
-    :param index:                The index of the residue in the :class:`BackboneList` for which the angle should be set.
-    :param angle:                The angle
-    :param sequential:           If *True*, the rotation will be propagated to all residues after the one with **index**. Otherwise it will be propagated in the direction where it will affect the least number of residues.
+    :param res: Residue from which to extract backbone atom positions
+    :type res:  :class:`~ost.mol.ResidueHandle`
+    :param n_pos: Set position of nitrogen atom to this.
+    :type n_pos:  :class:`~ost.geom.Vec3`
+    :param ca_pos: Set position of alpha carbon atom to this.
+    :type ca_pos:  :class:`~ost.geom.Vec3`
+    :param cb_pos: Set position of beta carbon atom to this.
+    :type cb_pos:  :class:`~ost.geom.Vec3`
+    :param c_pos: Set position of carbon atom to this.
+    :type c_pos:  :class:`~ost.geom.Vec3`
+    :param o_pos: Set position of oxygen atom to this.
+    :type o_pos:  :class:`~ost.geom.Vec3`
+    :param olc: Set one letter code of the residue to this.
+    :type olc:  :class:`char`
 
-    :type index:             :class:`int`
-    :type angle:             :class:`float`
-    :type sequential:         :class:`bool`
+  .. method:: clear()
 
-  .. method:: SetPhiPsiTorsion(index, phi, psi, sequential=False)
+    Remove all residues from this list.
 
-    Sets the *phi* and *psi* torsion angle of the backbone at position **index** in the :class:`BackboneList`.
+  .. method:: Copy()
+    
+    Creates and returns a deep copy of this :class:`BackboneList`. This can be
+    useful, since Python uses reference assignments.
 
-    :param index:                The index of the residue in the :class:`BackboneList` for which the angle should be set.
-    :param phi:                  The phi angle
-    :param psi:                  The psi angle
-    :param sequential:           If *True*, the rotation will be propagated to all residues after the one with **index**. Otherwise it will be propagated in the direction where it will affect the least number of residues.
+    :rtype:  :class:`BackboneList`
 
-    :type index:             :class:`int`
-    :type phi:             :class:`float`
-    :type psi:             :class:`float`
-    :type sequential:         :class:`bool`
+  .. method:: ReconstructCBetaPositions()
 
-  .. method:: GetPhiTorsion(index)
+    Does a simple reconstruction of all CB positions based on the current
+    N, CA and C positions.
 
-    Get the *phi* torsion angle of the residue with **index** in the :class:`BackboneList`
+  .. method:: ReconstructOxygenPositions(last_psi=-0.78540)
 
-    :param index:           The index
-    :type index:            :class:`int`
+    Does a simple reconstruction of all oxygen positions based on the actual
+    N, CA and C positions. The position of the last oxygen depends on the next
+    residue, an additional parameter is therefore required.
 
-  .. method:: GetPsiTorsion(index)
+    :param last_psi:    Psi angle of the last BackboneList residue,
+                        the default value corresponds to a typical alpha-helix.
+    :type last_psi:     :class:`float`
 
-    Get the *psi* torsion angle of the residue with **index** in the :class:`BackboneList`
+  .. method:: ReconstructCStemOxygen(after_c_stem)
 
-    :param index:           The index
-    :type index:            :class:`int`
+    Reconstructs the last oxygen of this backbone list. The oxygen position
+    depends on the residue following the C stem. The position is only
+    reconstructed if the residue handle is valid.
 
-  .. method:: GetOmegaTorsion(index)
+    :param after_c_stem: Residue following the C stem (C stem residue is last
+                         element of this backbone list)
+    :type after_c_stem:  :class:`ost.mol.ResidueHandle`
 
-    Get the *omega* torsion angle of the residue with **index** in the :class:`BackboneList`
 
-    :param index:           The index
-    :type index:            :class:`int`
+  .. method:: ApplyTransform(index, transform)
 
-  .. method:: RotateAroundPhiTorsion(index, angle, sequential=False)
+    Applies a transformation to the positions of a single residue.
 
-    Rotates the *phi* torsion angle of the backbone at position **index** in the :class:`BackboneList` by **angle**.
+    :param index: Residue index.
+    :type index:  :class:`int`
+    :param transform:  The transformation
+    :type transform:   :class:`ost.geom.Mat4`
 
-    :param index:                The index of the residue in the :class:`BackboneList` for which the angle should be set.
-    :param angle:                The angle
-    :param sequential:           If *True*, the rotation will be propagated to all residues after the one with **index**. Otherwise it will be propagated in the direction where it will affect the least number of residues.
+  .. method:: ApplyTransform(from, to, transform)
 
-    :type index:             :class:`int`
-    :type angle:             :class:`float`
-    :type sequential:         :class:`bool`
+    Applies a transformation to the positions of the residues with indices
+    *from*, ..., *to*-1 of this list.
 
-  .. method:: RotateAroundPsiTorsion(index, angle, sequential=False)
+    :param from: Start index.
+    :type from:  :class:`int`
+    :param to: End index (one past last residue to transform).
+    :type to:  :class:`int`
+    :param transform:  The transformation
+    :type transform:   :class:`ost.geom.Mat4`
 
-    Rotates the *psi* torsion angle of the backbone at position **index** in the :class:`BackboneList` by **angle**.
+  .. method:: ApplyTransform(transform)
 
-    :param index:                The index of the residue in the :class:`BackboneList` for which the angle should be set.
-    :param angle:                The angle
-    :param sequential:           If *True*, the rotation will be propagated to all residues after the one with **index**. Otherwise it will be propagated in the direction where it will affect the least number of residues.
+    Applies a transformation to all positions of this list.
 
-    :type index:             :class:`int`
-    :type angle:             :class:`float`
-    :type sequential:         :class:`bool`
+    :param transform:  The transformation
+    :type transform:   :class:`ost.geom.Transform` / :class:`ost.geom.Mat4`
 
-  .. method:: RotateAroundOmegaTorsion(index, angle, sequential=False)
+  .. method:: GetTransform(index, res)
+              GetTransform(index, other, other_index)
 
-    Rotates the *omega* torsion angle of the backbone at position **index** in the :class:`BackboneList` by **angle**.
+    :returns: Minimum RMSD transformation of residue *index* onto *res* or
+              residue *other_index* of *other* backbone list considering the
+              positions of the N, CA and C atoms.
+    :rtype:   :class:`ost.geom.Mat4`
 
-    :param index:                The index of the residue in the :class:`BackboneList` for which the angle should be set.
-    :param angle:                The angle
-    :param sequential:           If *True*, the rotation will be propagated to all residues after the one with **index**. Otherwise it will be propagated in the direction where it will affect the least number of residues.
+    :param index: Residue index.
+    :type index:  :class:`int`
+    :param res:   The other residue.
+    :type res:    :class:`ost.mol.ResidueHandle`
+    :param other: The other backbone list.
+    :type other:  :class:`BackboneList`
+    :param other_index: Residue index in *other* backbone list.
+    :type other_index:  :class:`int`
 
-    :type index:             :class:`int`
-    :type angle:             :class:`float`
-    :type sequential:         :class:`bool`
+  .. method:: GetTransform(other)
 
-  .. method:: RotateAroundPhiPsiTorsion(index, phi, psi, sequential=False)
+    :returns: Get minimum RMSD transformation of CA positions of this backbone
+              list onto CA positions of *other* backbone list.
+    :rtype:   :class:`ost.geom.Mat4`
 
-    Rotates the *phi* and *psi* torsion angle of the backbone at position **index** in the :class:`BackboneList` by **phi** and **psi**.
+    :param other: The other backbone list.
+    :type other:  :class:`BackboneList`
 
-    :param index:                The index of the residue in the :class:`BackboneList` for which the angle should be set.
-    :param phi:                  The phi angle
-    :param psi:                  The psi angle
-    :param sequential:           If *True*, the rotation will be propagated to all residues after the one with **index**. Otherwise it will be propagated in the direction where it will affect the least number of residues.
+  .. method:: SuperposeOnto(other)
 
-    :type index:             :class:`int`
-    :type phi:             :class:`float`
-    :type psi:             :class:`float`
-    :type sequential:         :class:`bool`
+    Superposes this backbone list onto another one using CA positions.
+
+    :param other: The other backbone list.
+    :type other:  :class:`BackboneList`
+
+
+  .. method:: RotateAroundPhiTorsion(index, phi, sequential=False)
+              RotateAroundPsiTorsion(index, psi, sequential=False)
+              RotateAroundOmegaTorsion(index, omega, sequential=False)
+              RotateAroundPhiPsiTorsion(index, phi, psi, sequential=False)
+              SetAroundPhiTorsion(index, phi, sequential=False)
+              SetAroundPsiTorsion(index, psi, sequential=False)
+              SetAroundOmegaTorsion(index, omega, sequential=False)
+              SetAroundPhiPsiTorsion(index, phi, psi, sequential=False)
+
+    Rotates/sets the phi/psi/omega torsion angle of the backbone at position
+    *index* in the backbone list by/to the given angle(s).
+
+    :param index: Residue index.
+    :type index:  :class:`int`
+    :param phi: Angle by which to rotate phi torsion.
+    :type phi:  :class:`float`
+    :param psi: Angle by which to rotate psi torsion.
+    :type psi:  :class:`float`
+    :param omega: Angle by which to rotate omega torsion.
+    :type omega:  :class:`float`
+    :param sequential: If *True*, the rotation will be propagated to all
+                       residues after the one with *index*. Otherwise, it will
+                       be propagated in the direction where it will affect the
+                       least number of residues.
+    :type sequential:  :class:`bool`
 
-  .. method:: ReplaceFragment(sub_fragment, index, superpose_stems)
+  .. method:: GetPhiTorsion(index)
+              GetPsiTorsion(index)
+              GetOmegaTorsion(index)
 
-    Replaces a fragment of the :class:`BackboneList` starting at position
-    **index** by the **sub_fragment**.
+    :return: The phi/psi/omega torsion angle for residue at given index.
+    :rtype:  :class:`float`
+    :param index: Residue index.
+    :type index:  :class:`int`
 
-    :param sub_fragment:          The fragment to be inserted
-    :param index:                 The position at which the fragment 
-                                  replacement will begin
-    :param superpose_stems:       If set to false, the function will simply
-                                  replace the according 
-                                  :class:`Backbone` objects. If set to true,
-                                  the n-terminal and c-terminal tails are superposed onto the **sub_fragment** 
-                                  stems using the positions at **index** and 
-                                  **index** + len( **sub_fragment** )-1.
-    :type sub_fragment:           :class:`BackboneList`
-    :type index:                  :class:`int`
-    :type superpose_stems:        :class:`bool`
 
-    :raises:                      :exc:`~exceptions.RuntimeError` if
-                                  **sub_fragment** does not fully fit into
-                                  actual fragment at specified **index**
+  .. method:: TransOmegaTorsions(thresh=20/180*pi, allow_prepro_cis=True)
 
-  .. method:: CARMSD(other, superposed_rmsd=False)
+    Checks whether this backbone list only contains trans omega torsion angles.
+    Usually, you would want this to be the case, but it can fail if you have any
+    unfavorable omega torsion angle in your backbone.
 
-    Calculates the C-alpha RMSD between this :class:`BackboneList` and an **other** backbone list.
-    
-    :param other:             Other backbone list
-    :param superposed_rmsd:   whether to superpose before calculating the RMSD
+    :param thresh: Allowed deviation from ideal trans angle (pi)
+    :type thresh:  :class:`float`
+    :param allow_prepro_cis: Flag, whether cis-omega torsions should be
+                             allowed in case of a subsequent proline.
+    :type allow_prepro_cis:  :class:`bool`
 
-    :type other:              :class:`BackboneList`
-    :type superposed_rmsd:    :class:`bool`
+    :returns: whether *bb_list* only contains trans-omega torsions.
+    :rtype:   :class:`bool`
 
-  .. method:: RMSD(other, superposed_rmsd=False)
+    :raises: :exc:`~exceptions.RuntimeError` if size of this backbone list is
+             smaller than 3.
 
-    Calculates the RMSD between this :class:`BackboneList` and an **other** backbone list.
-    
-    :param other:             Other backbone list
-    :param superposed_rmsd:   whether to superpose before calculating the RMSD
+  .. method:: SetBackrub(index, primary_rot_angle, flanking_rot_angle_one, flanking_rot_angle_two)
 
-    :type other:              :class:`BackboneList`
-    :type superposed_rmsd:    :class:`bool`
+    Applies a backrub motion at residue defined by **index**. The first
+    rotation axis is defined by the CA positions from residues at
+    **index** -1 and **index** +1. All atoms in between get rotated around this
+    axis by **primary_rot_angle**. To restore the the hydrogen bond network
+    of the two transformed oxygens, the backrub motion gets completed by
+    two compensatory rotations. The first rotation is around the axis defined by 
+    the CA position from residue **index**-1 and the transformed central CA
+    position with an angle of **flanking_rot_angle_one**. The second rotation is 
+    around the axis from the transformed central CA position to the CA position 
+    from residue at position **index** +1 with an angle of 
+    **flanking_rot_angle_two**.
 
-  .. method:: SuperposeOnto(other)
+    :param index:       Position of central residue of the backrub motion
+    :param primary_rot_angle: Angle of the first rotation in radians
+    :param flanking_rot_angle_one: Angle of the first compensatory rotation 
+                                   in radians
+    :param flanking_rot_angle_two: Angle of the second compensatory rotation 
+                                   in radians
 
-    Superposes this :class:`BackboneList` onto another one
+    :type index:        :class:`int`
+    :type primary_rot_angle: :class:`float`
+    :type flanking_rot_angle_one: :class:`float`
+    :type flanking_rot_angle_two: :class:`float`
 
-    :param other:       The other backbone list
-    :type other:        :class:`BackboneList`
+    :raises: :exc:`~exceptions.RuntimeError` if **index** is smaller 1 or
+                                             larger size of BackboneList - 2
 
-  .. method:: GetTransform(other)
+  .. method:: SetBackrub(index, primary_rot_angle, [scaling=1.0])
 
-    Get transofrm to superpose this :class:`BackboneList` onto another one
+    Applies the backrub motion described above but calculates the ideal angles
+    for the compensatory rotations in a way, that the new oxygen positions are
+    as close as possible to the original ones. The ideal angles can be scaled
+    down by **scaling** to make them less extreme.
 
-    :param other:     The other backbone list
-    :type other:      :class:`BackboneList`
+    :param index:       Position of central residue of the backrub motion
+    :param primary_rot_angle: Angle of the first rotation in radians
+    :param scaling:     The ideal angles for the compensatory rotations will
+                        be scaled by this value. 
 
-    :returns:         A 4x4 transformation matrix
-    :rtype:           :class:`ost.geom.Mat4`
+    :type index:        :class:`int`
+    :type primary_rot_angle: :class:`float`
+    :type scaling:      :class:`float`
 
-  .. method:: append(bb)
+    :raises: :exc:`~exceptions.RuntimeError` if **index** is smaller 1 or
+                                             larger size of BackboneList - 2
 
-    Appends the backbone **bb** at the end of the :class:`BackboneList`.
 
-    :param bb:            The backbone
-    :type bb:             :class:`Backbone`
 
-  .. method:: __getitem__(index)
-              __setitem__(index)
+  .. method:: MinCADistance(other)
 
-    Allow read/write access (with [*index*]) to backbone at given *index*.
+    :returns: Minimal pairwise CA-distance between this and the *other*
+              backbone list.
+    :rtype:   :class:`float`
 
-  .. method:: __iter__()
+    :param other: The other backbone list.
+    :type other:  :class:`BackboneList`
 
-    Makes list iterable.
+  .. method:: RMSD(other, superposed_rmsd=False)
+              CARMSD(other, superposed_rmsd=False)
 
-  .. method:: __len__()
+    :returns: RMSD / C-alpha RMSD between this and the *other* backbone list.
+    :rtype:   :class:`float`
 
-    :returns:  Number of backbones in the list.
+    :param other: The other backbone list.
+    :type other:  :class:`BackboneList`
+    :param superposed_rmsd: Whether to superpose before calculating the RMSD.
+    :type superposed_rmsd:  :class:`bool`
diff --git a/doc/html/_sources/loop/backbone_loop_score.txt b/doc/html/_sources/loop/backbone_loop_score.txt
deleted file mode 100644
index 0868068e..00000000
--- a/doc/html/_sources/loop/backbone_loop_score.txt
+++ /dev/null
@@ -1,817 +0,0 @@
-Loop Scoring
-================================================================================
-
-.. currentmodule:: promod3.loop
-
-The BackboneLoopScorer
---------------------------------------------------------------------------------
-
-The :class:`BackboneLoopScorer` provides several terms to assess a 
-loop conformations plausibility. All values of the different scores 
-can be set manually. Once the scores are set, the scorer can be 
-saved/loaded from/to disk. Setting the scores can be avoided by 
-just loading the default scorer, which should satisfy most needs. 
-To be used, the scorer must be initialized with a seqres. 
-After initialization the structural environment can be set. 
-This environment defines the particles a certain loop interacts with 
-and can be reset/extended at any time in the modelling process.
-To score a certain loop you must define its exact location in the
-environment using a *chain_idx* and *start_resnum*:
-
-* *chain_idx*:
-    Index of chain as it occurs in the sequence list you initialized
-    the scorer with (0 in case of a single sequence)
-
-* *start_resnum*:
-    Residue number defining the position in the SEQRES of chain with
-    index *chain_idx*. **The numbering starts for every chain with
-    the value 1**.
-
-The following scores are available:
-
-* **ClashScore:** (see :func:`~BackboneLoopScorer.CalculateClashScore`)
-    Calculates a simple clash score of a loop itself and with the set
-    environment. There is no need to define any parameters if you start with an
-    empty scorer.
-
-* **CBetaScore:** (see :func:`~BackboneLoopScorer.CalculateCBetaScore`)
-    Evaluates a pairwise pseudo interaction energy between CB atoms. If you
-    start with an empty scorer you need to parametrize the energy function by
-    calling :func:`~BackboneLoopScorer.SetCBetaPotentialParameters`. You can
-    then set an energy value for every possible pair of residues given the
-    distance of their CB atoms (see :func:`~BackboneLoopScorer.SetCBetaEnergy`).
-    Every pairwise interaction within the loop and to the environment gets
-    evaluated according to the given parametrization, summed up and finally
-    normalized by the number of total interactions.
-
-* **ReducedScore:** (see :func:`~BackboneLoopScorer.CalculateReducedScore`)
-    Evaluates a pairwise pseudo  interaction energy between the reduced
-    representation of residues. Every residue gets represented by its CA
-    position p and a directional component ``v = norm(ca_pos-n_pos) + norm
-    (ca_pos-c_pos)``. Assuming an interaction between residues r1 and r2, we can
-    define a line l between p1 and p2. The potential then considers:
-
-    * dist => distance between p1 and p2
-    * alpha => angle between v1 and l
-    * beta => angle between v2 and l
-    * gamma => dihedral between (p1+v1,p1,p2,p2+v2)
-
-    If you start with an empty scorer you need to parametrize the energy
-    function by calling
-    :func:`~BackboneLoopScorer.SetReducedPotentialParameters`. You can then set
-    an energy value for every possible pair of residues given the distance of
-    their CA atoms and the according angles (see
-    :func:`~BackboneLoopScorer.SetReducedEnergy`). Every pairwise interaction
-    within the loop and to the environment gets evaluated according to the given
-    parametrization, summed up and finally normalized by the number of total
-    interactions.
-
-* **TorsionScore:** (see :func:`~BackboneLoopScorer.CalculateTorsionScore`)
-    Evaluates pseudo energies based on the identity of three consecutive
-    residues and the phi/psi dihedral angles of the central residue. The group
-    definitions are the same as they are used in the :class:`TorsionSampler`. If
-    you start with an empty scorer you need to parametrize the energy function
-    by calling :func:`~BackboneLoopScorer.SetTorsionPotentialParameters`. You
-    can then set an energy value for every possible torsion group and dihedral
-    angle pair (see :func:`~BackboneLoopScorer.SetTorsionEnergy`). Every residue
-    gets evaluated according to the set parametrization and the final score gets
-    normalized by the total number of summed pseudo energies. The first phi and
-    last psi angle get determined with the help of the environment if set.
-
-* **CBPackingScore:** (see :func:`~BackboneLoopScorer.CalculateCBPackingScore`)
-    Evaluates pseudo energies by counting the number of other CB positions
-    within a certain cutoff radius of the CB position of the residue to be
-    evaluated. If you start with an empty scorer you need to parametrize the
-    energy function by calling
-    :func:`~BackboneLoopScorer.SetCBPackingPotentialParameters`. You can then
-    set an energy value for every possible residue type and the corresponding
-    number of surrounding CB positions (see
-    :func:`~BackboneLoopScorer.SetCBPackingEnergy`). Every residue gets
-    evaluated according to the set parametrization and the final score gets
-    normalized by the number of residues in the loop.
-
-* **HBondScore:** (see :func:`~BackboneLoopScorer.CalculateHBondScore`)
-    Evaluates pairwise HBond pseudo energies similar to the one defined in the
-    Rosetta energy function. It considers the CA, C and O positions from
-    backbone hbond acceptors in interaction with the N and H positions from the
-    backbone hbond donors. 4 Parameters describe their relative orientation.
-
-    * dist => H-O distance
-    * alpha => O-H-N angle
-    * beta => C-N-H angle
-    * gamma => CA-C-O-H dihedral angle
-
-    A pseudo energy function for these parameters is evaluated for three
-    different states. State 1 for helical residues, state 2 for extended
-    residues and state 0 for other residues. If the state of two interacting
-    particles is the same, thats the one from which the energy is extracted. In
-    all other cases, the energy is extracted from the 0 state. If you start with
-    an empty scorer you need to parametrize the energy function by calling
-    :func:`~BackboneLoopScorer.SetHBondPotentialParameters`. You can then set an
-    energy value for every possible state and the according parameters (see
-    :func:`~BackboneLoopScorer.SetHBondEnergy`). Every pairwise interaction
-    within the loop and to the environment gets evaluated according to the given
-    parametrization, summed up and finally normalized by the number of total
-    interactions.
-
-* **SSAgreementScore:** (see :func:`~BackboneLoopScorer.CalculateSSAgreementScore`)
-    Evaluates an SSAgreement score. Despite no parameters being given,
-    :func:`~BackboneLoopScorer.SetSSAgreementParameters` has to be called before
-    you can set any SSAgreement scores (see
-    :func:`~BackboneLoopScorer.SetSSAgreementScore`) since the memory has to be
-    allocated internally. The SSAgreement score itself relates a score to a
-    certain combination of psipred prediction, its confidence and the actually
-    occurring secondary structure in the model. In every score evaluation, the
-    secondary structure of the loop is estimated by searching for hydrogen bonds
-    leading to a secondary structure as defined by dssp. The hbonds are searched
-    internally in the loop as well as in the environment. Before you can call
-    the scoring function, you have to set the psipred prediction in the scorer.
-    The final score gets summed up over all residues in the loop and normalized
-    by the number of residues.
-
-* **ContactScore:** (see :func:`~BackboneLoopScorer.CalculateContactScore`)
-    Evaluates contacts with the environment and within the loop itself. You can
-    set arbitrary contact functions. They are defined by a score that gets
-    added when the CB atoms of two specific residues are within a maximal
-    distance. When evaluating a loop, the results of all contact functions
-    towards the environment get added as well as the loop internal contacts. The
-    returned value gets then normalized by the number of residues in the loop.
-
-* **ConstraintScore:** (see :func:`~BackboneLoopScorer.CalculateConstraintScore`)
-    Evaluates constraints with the environment and within the loop itself. You
-    can set arbitrary constraint functions. They are defined by a min and max
-    distance and an arbitrary list of score values. If the distance between the
-    CB atoms of two specific residues is within the min and max distance, the
-    constraint function returns the value at the according position in the score
-    list assuming equidistant binning. When evaluating a loop, the results of
-    all constraint functions towards the environment get added as well as the
-    loop internal constraints. The returned value gets then normalized by the
-    number of residues in the loop.
-
-* **TransOmegaTorsion:** (see :func:`~BackboneLoopScorer.TransOmegaTorsions`)
-    Does not really return a score but rather a boolean value. It evaluates,
-    whether there are any unfavorable trans omega torsion angles in the loop. If
-    you wish you can decide, whether you want to allow pre-proline trans omega
-    torsions.
-
-
-
-.. class:: BackboneLoopScorer
-
-  .. method:: Load(filename)
-
-    Loads raw binary file generated with :meth:`Save` (optimized for fast
-    reading).
-
-    :param filename:    Name of file, the scorer will be loaded from.
-
-    :type filename:     :class:`str`
-
-    :returns:           A scorer
-    :rtype:             :class:`BackboneLoopScorer`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if:
-
-              - file cannot be opened.
-              - version number stored in file is not supported.
-              - file assumes different memory-layout than is available on this
-                machine. Use :meth:`LoadPortable` to convert your file.
-
-  .. method:: Save(filename)
-
-    Saves raw binary representation (optimized for fast reading).This puts many
-    assumptions on the memory-layout of the target-machine and hence it is not
-    portable. A portable version is provided by :meth:`SavePortable`.
-    Preferably portable files are distributed and converted to a raw binary
-    before using them.
-
-    :param filename:    Name of file, the scorer will be dumped into.
-                        All model specific information is lost.
-
-    :type filename:     :class:`str`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
-
-  .. method:: LoadPortable(filename)
-
-    Loads portable file generated with :meth:`SavePortable` (slow but less
-    machine-dependent).
-
-    :param filename:    Name of file, the scorer will be loaded from.
-
-    :type filename:     :class:`str`
-
-    :returns:           A scorer
-    :rtype:             :class:`BackboneLoopScorer`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if:
-
-              - file cannot be opened.
-              - version number stored in file is not supported.
-              - machine-dependent fundamental types are smaller than required.
-
-  .. method:: SavePortable(filename)
-
-    Saves portable binary representation (slow but less machine-dependent).
-
-    :param filename:    Name of file, the scorer will be dumped into.
-                        All model specific information is lost.
-
-    :type filename:     :class:`str`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
-
-  .. method:: SetCBetaPotentialParameters(cbeta_cutoff, cbeta_bins, cbeta_seq_sep)
-
-    :param cbeta_cutoff: The maximum distance of two cbeta atoms to be 
-                         considered
-
-    :param cbeta_bins:  Number of equally sized bins to describe the
-                        cbeta distances in a discrete manner.
-
-    :param cbeta_seq_sep: Minimal separation in sequence two cbeta atoms must
-                          have to be considered
-
-    :type cbeta_cutoff: :class:`float`
-    :type cbeta_bins:   :class:`int`
-    :type cbeta_seq_sep: :class:`int`
-
-    :raises: :exc:`~exceptions.RuntimeError` if *cbeta_cutoff* is negative or
-             *cbeta_bins* is <= 0
-
-
-  .. method:: SetReducedPotentialParameters(dist_cutoff, dist_bins, angle_bins, dihedral_bins, seq_sep)
-
-    :param dist_cutoff: The maximum distance of two residues to be 
-                        considered
-
-    :param dist_bins:   Number of equally sized bins to describe the
-                        distances in a discrete manner
-
-    :param angle_bins:  Number of equally sized bins to describe the angle
-                        parameters in a discrete manner (range of [0, pi])
-
-    :param dihedral_bins: Number of equally sized bins to describe the dihedral
-                          parameter in a discrete manner (range of [-pi,pi])
-
-    :param seq_sep:     Minimal separation in sequence two residues must
-                        have to be considered
-
-    :type dist_cutoff: :class:`float`
-    :type dist_bins:   :class:`int`
-    :type angle_bins:  :class:`int`
-    :type dihedral_bins: :class:`int`
-    :type seq_sep:     :class:`int`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if *dist_cutoff* is negative or
-              one of the bin parameters is <= 0
-
-  .. method:: SetTorsionPotentialParameters(group_definitions, torsion_bins)
-
-    :param group_definitions: List of strings describing groups of residues
-                                  for which separate phi/psi dependent energies
-                                  can be set.
-    :param torsion_bins: Number of equally sized bins to describe the
-                             torsion angles in a discrete manner.
-
-    :type group_definitions: :class:`list`
-    :type torsion_bins: :class:`int`
-
-    :raises: :exc:`~exceptions.RuntimeError` if torsion_bins is <= 0 or 
-             one possible combination of the 20 standard amino
-             acids is not covered by any entry of *group_definitions* 
-
-  .. method:: SetCBPackingPotentialParameters(cb_packing_cutoff, cb_packing_max_count)
-
-    :param cb_packing_cutoff: Radius in which other cbeta atoms are counted
-    :param cb_packing_max_count: If number of other cbeta atoms exceeds
-                                 *cb_packing_max_count*, it will be set to
-                                 this number.
-
-    :type cb_packing_cutoff: :class:`float`
-    :type cb_packing_max_count: :class:`int`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if *cb_packing_cutoff* is < 0 or
-              *cb_packing_max_count* is <= 0
-
-  .. method:: SetHBondPotentialParameters(hb_min_d, hb_max_d, hb_min_alpha, hb_max_alpha, hb_min_beta, hb_max_beta, hb_min_gamma, hb_max_gamma, hb_d_bins, hb_alpha_bins, hb_beta_bins, hb_gamma_bins)
-
-    :param hb_min_d:    Minimal H-O distance, that interaction gets considered.
-    :param hb_max_d:    Maximal H-O distance, that interaction gets considered.
-    :param hb_min_alpha: Minimal O-H-N angle, that interaction gets considered.
-    :param hb_max_alpha: Maximal O-H-N angle, that interaction gets considered.
-    :param hb_min_beta: Minimal C-N-H angle, that interaction gets considered.
-    :param hb_max_beta: Maximal C-N-H angle, that interaction gets considered.
-    :param hb_min_gamma: Minimal CA-C-O-H dihedral, that interaction gets 
-                         considered.
-    :param hb_max_gamma: Maximal CA-C-O-H dihedral, that interaction gets 
-                         considered.
-    :param hb_d_bins: Number of equally sized bins to describe the H-O distance 
-                      in a discrete manner.  
-    :param hb_alpha_bins: Number of equally sized bins to describe the O-H-N 
-                          angle in a discrete angle.
-    :param hb_beta_bins: Number of equally sized bins to describe the C-N-H
-                         angle in a discrete angle.
-    :param hb_gamma_bins: Number of equally sized bins to describe the CA-C-O-H 
-                          dihedral in a discrete angle.
-
-    :type hb_min_d:     :class:`float`  
-    :type hb_max_d:     :class:`float`
-    :type hb_min_alpha: :class:`float`
-    :type hb_max_alpha: :class:`float`
-    :type hb_min_beta:  :class:`float`
-    :type hb_max_beta:  :class:`float`
-    :type hb_min_gamma: :class:`float`
-    :type hb_max_gamma: :class:`float`
-    :type hb_d_bins:    :class:`int`
-    :type hb_alpha_bins: :class:`int`
-    :type hb_beta_bins: :class:`int`
-    :type hb_gamma_bins: :class:`int`
-
-    :raises: :exc:`~exceptions.RuntimeError` if one of the bin parameters is
-             <= 0 or a max parameter is smaller than its min counterpart.
-
-
-  .. method:: SetSSAgreementParameters()
-
-    Required to set SSAgreement scores with :func:`SetSSAgreementScore`).
-
-  .. method:: SetCBetaEnergy(a, b, bin, e)
-
-    :param a:           Identity of first interaction partner.          
-    :param b:           Identity of second interaction partner. 
-    :param bin:         Discrete bin describing the interaction distance based
-                        on the previously defined *cbeta_cutoff* and 
-                        *cbeta_bins*.
-    :param e:           Energy to be set         
-
-    :type a:            :class:`ost.conop.AminoAcid`                 
-    :type b:            :class:`ost.conop.AminoAcid`
-    :type bin:          :class:`int`
-    :type e:            :class:`float`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if invalid bin or amino acid is 
-              given
-
-  .. method:: SetReducedEnergy(a, b, dist_bin, alpha_bin, beta_bin, gamma_bin, e)
-
-    :param a:           Identity of first interaction partner.          
-    :param b:           Identity of second interaction partner. 
-    :param dist_bin:    Discrete bin describing the interaction distance based
-                        on the previously defined *dist_cutoff* and *dist_bins*.
-    :param alpha_bin:   Discrete bin describing the alpha angle based
-                        on the previously defined *angle_bins*.
-    :param beta_bin:    Discrete bin describing the beta angle based
-                        on the previously defined *angle_bins*.
-    :param gamma_bin:   Discrete bin describing the gamma dihedral based
-                        on the previously defined *dihedral_bins*.
-    :param e:           Energy to be set         
-
-    :type a:            :class:`ost.conop.AminoAcid`                 
-    :type b:            :class:`ost.conop.AminoAcid`
-    :type dist_bin:     :class:`int`
-    :type alpha_bin:    :class:`int`
-    :type beta_bin:     :class:`int`
-    :type gamma_bin:    :class:`int`
-    :type e:            :class:`float`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if invalid bin or amino acid is 
-              given
-
-  .. method:: SetTorsionEnergy(group_id_idx, phi_bin, psi_bin, e)
-
-    :param group_id_idx: Index of group identifier given at setting up the 
-                         torsion potential.
-    :param phi_bin:     Discrete bin describing the phi angle based on
-                        the previously defined *torsion_bins*
-    :param psi_bin:     Discrete bin describing the psi angle based on
-                        the previously defined *torsion_bins*
-    :param e:           Energy to be set
-
-    :type group_id_idx: :class:`int`
-    :type phi_bin:      :class:`int`
-    :type psi_bin:      :class:`int`
-    :type e:            :class:`float`
-
-    :raises: :exc:`~exceptions.RuntimeError` if invalid angle bin or 
-             group_id_idx is given.
-
-  .. method:: SetCBPackingEnergy(a, count, e)
-
-    :param a:           Identity of amino acid
-    :param count:       Number of surrounding cb positions
-    :param e:           Energy to be set
-
-    :type a:            :class:`ost.conop.AminoAcid` 
-    :type count:        :class:`int`
-    :type e:            :class:`float`
-
-    :raises: :exc:`~exceptions.RuntimeError` if *a* is invalid or *count*
-             exceeds previously defined *max_count*
-
-  .. method:: SetHBondEnergy(state, d_bin, alpha_bin, beta_bin, gamma_bin, e)
-
-    :param state:       State describing the actual secondary structure 
-                        (1:helical, 2:extended, 0: other)
-    :param d_bin:       Discrete bin describing the H-O distance based on
-                        the previously set parametrization.
-    :param alpha_bin:   Discrete bin describing the O-H-N angle based on the
-                        previously set parametrization.
-    :param beta_bin:    Discrete bin describing the C-N-H angle based on the
-                        previously set parametrization. 
-    :param gamma_bin:   Discrete bin describing the CA-C-O-H dihedral based on 
-                        the previously set parametrization.
-    :param e:           Energy to be set
-
-    :type state:        :class:`int`
-    :type d_bin:        :class:`int`
-    :type alpha_bin:    :class:`int`
-    :type beta_bin:     :class:`int`
-    :type gamma_bin:    :class:`int`
-    :type e:            :class:`float`
-
-    :raises: :exc:`~exceptions.RuntimeError` if state is not in [0,1,2] or one
-             of the bins is invalid.
-
-
-  .. method:: SetSSAgreementScore(psipred_state, int psipred_confidence,
-                                  dssp_state, score)
-
-    :param psipred_state: must be one of ['H','E','C']
-    :param psipred_confidence: must be in [0,9]
-    :param dssp_state:  must be one of ['H','E','C','G','B','S','T','I']
-    :param score:       score to be set
-
-    :type psipred_state: :class:`str`
-    :type psipred_confidence: :class:`int`
-    :type dssp_state:   :class:`str`
-    :type score:        :class:`float`    
-
-  .. method:: Initialize(seqres)
-
-    Set up internal scorer with given seqres
-
-    :param seqres:      Internal SEQRES to be set. Whenever setting structural
-                        data, consistency with this SEQRES is encorced.
-    :type seqres:       :class:`str` / :class:`ost.seq.SequenceHandle` / 
-                        :class:`list` of :class:`str` / :class:`ost.seq.SequenceList`
-
-    :raises:  :exc:`~exceptions.RuntimeError` when *seqres* contains invalid
-              one letter code
-
-
-  .. method:: SetPsipredPrediction(pred)
-
-    Internally sets the psipred prediction, which is necessary to calculate the
-    SSAgreementScore.
-
-    :param pred:        The prediction
-    :type pred:         :class:`PsipredPrediction` / :class:`list` of :class:`PsipredPrediction`
-
-    :raises: :exc:`~exceptions.RuntimeError` if the scorer is not yet
-             initialized, the number of predictions is inconsistent with the
-             number of internal chains or when one of the predictions sizes is
-             inconsistent with the according internal seqres
-
-
-  .. method:: SetEnvironment(env)
-
-    Sets structural environment with which loops to be scored interact.
-    If structural data for specific residues is already set, the
-    data gets resetted for these positions.
-
-    :param env:         Structral data to be set as environment. The chains
-                        in *env* are expected to be in the same order as the
-                        provided SEQRES items.
-    :type env:          :class:`ost.mol.EntityView`
-
-    :raises:         :exc:`~exceptions.RuntimeError` if scorer has never been
-                     initialized with a SEQRES or when *env* is inconsistent
-                     with previously set SEQRES. This can be because of 
-                     corrupt residue numbers or sequence mismatches.
-
-  .. method:: SetEnvironment(bb_list, start_resnum, [chain_index=0])
-
-    Sets structural environment with which loops to be scored interact.
-    If structural data for specific residues is already set, the
-    data gets resetted for these positions.
-
-    :param bb_list:     Structural data to be set as environment.
-    :param start_resnum: ResNum defining the position in the SEQRES
-                         (first element starts with one!)
-    :param chain_index: Index of chain the structural data belongs to.
-
-    :type bb_list:      :class:`BackboneList`
-    :type start_resnum: :class:`int`
-    :type chain_index:  :class:`int`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if sequence of *bb_list* is
-              inconsistent with previously provided SEQRES or when either
-              start_resnum or chain_index point to invalid positions in the
-              SEQRES.
-
-  .. method:: ClearEnvironment(start_resnum, num_residues, [chain_index=0])
-
-    Clears a stretch of length *num_residues* in the environment in chain 
-    with idx *chain_index* starting from residue number *start_resnum*
-
-    :param start_resnum: Start of stretch to clear
-    :param num_residues: Length of stretch to clear
-    :param chain_index: Chain the stretch belongs to
-
-    :type start_resnum: :class:`int`
-    :type num_residues: :class:`int`
-    :type chain_index:  :class:`int`
-
-    :raises:  :exc:`~exceptions.RuntimeError` when either start_resnum or 
-              chain_index point to invalid positions in the SEQRES.
-
-  .. method:: AddContactFunction(max_dist, score)
-
-    Adds a contact definition and returns an index, so it can be used later
-    when you add specific contacts. While the specific contact definitions
-    get cleared when reinitializing the scorer, The contact functions stay
-    and their indices remain valid until the scorer object gets destroyed.
-    The definition simply returns *score* , if a certain CA-CA distance is below
-    *max_dist* and 0.0 otherwise.
-
-    :param max_dist:    Maximal distance between two CA atoms to be in contact
-    :param score:       Value that gets returned if two CA atoms are in contact
-
-    :type max_dist:     :class:`float`
-    :type score:        :class:`float`
-
-    :returns:           Index of added contact definition
-
-  .. method:: AddConstraintFunction(min_dist, max_dist, values)
-
-    Adds a constraint definition and returns an index, so it can be used later
-    when you add specific constraints. While the specific constraint definitions
-    get cleared when reinitializing the scorer, the constraint functions stay
-    and their indices remain valid until the scorer object gets destroyed.
-    The definition returns the value at pos i, where i gets determined given
-    a certain CA-CA distance by assuming an equidistant binning of *values* 
-    between *min_dist* and *max_dist* . If a certain CA-CA distance is outside 
-    the range defined by *min_dist* and *max_dist*, the definition returns 0.0.
-
-    :param min_dist:    Minimal distance between two CA atoms to be considered
-    :param max_dist:    Maximal distance between two CA atoms to be considered
-    :param values:      The possible values that get returned when two CA
-                        atoms have a distance between *min_dist* and *max_dist*
-
-    :type min_dist:     :class:`float`
-    :type max_dist:     :class:`float`
-    :type values:       :class:`list` of :class:`float`
-
-
-    :returns:           Index of added constraint definition
-
-    :raises: :exc:`~exceptions.RuntimeError` if *min_dist* >= *max_dist* or
-             when *values* contains no elements
-
-  .. method:: AddContact(chain_idx_one, resnum_one, chain_idx_two, resnum_two, max_dist, score)
-
-  .. method:: AddContact(chain_idx_one, resnum_one, chain_idx_two, resnum_two, f_idx)
-
-    Two versions to add a specific contact. In version one, the AddContactFunction
-    method gets called internally to generate a unique contact definition for
-    this pair of residues. In version two you can use a manually defined contact
-    definition.
-
-    :param chain_idx_one: Chain idx of residue one in the contact
-    :param resnum_one:    Resnum of residue one in the contact
-    :param chain_idx_two: Chain idx of residue two in the contact
-    :param resnum_two:    Resnum of residue two in the contact
-    :param max_dist:      Maximal distance between the two CA atoms to be in contact
-    :param score:         Value that gets returned if the two CA atoms are in contact
-    :param f_idx:         Index of manually set contact definition
-
-    :type chain_idx_one:  :class:`int`
-    :type resnum_one:     :class:`int`
-    :type chain_idx_two:  :class:`int`
-    :type resnum_two:     :class:`int`
-    :type max_dist:       :class:`float`
-    :type score:          :class:`float`
-    :type f_idx:          :class:`int`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if any of the chain indices or
-              resnums is invalid, the interaction partners are the same residue
-              or when *f_idx* is an invalid index.
-
-
-  .. method:: AddConstraint(chain_idx_one, resnum_one, chain_idx_two, \
-                            resnum_two, min_dist, max_dist, scores)
-              AddConstraint(chain_idx_one, resnum_one, chain_idx_two, \
-                            resnum_two, f_idx)
-
-    Two versions to add a specific constraint. In version one, the
-    AddConstraintFunction method gets called internally to generate a unique
-    constraint definition for this pair of residues. In version two you can use
-    a manually defined constraint definition.
-
-    :param chain_idx_one: Chain idx of residue one in the constraint
-    :param resnum_one:    Resnum of residue one in the constraint
-    :param chain_idx_two: Chain idx of residue two in the constraint
-    :param resnum_two:    Resnum of residue two in the constraint
-    :param min_dist:      Minimal distance between the two CA atoms to be considered
-    :param max_dist:      Maximal distance between the two CA atoms to be considered
-    :param scores:        Values that get returned if the two CA atoms are considered
-    :param f_idx:         Index of manually set constraint definition
-
-    :type chain_idx_one:  :class:`int`
-    :type resnum_one:     :class:`int`
-    :type chain_idx_two:  :class:`int`
-    :type resnum_two:     :class:`int`
-    :type min_dist:       :class:`float`
-    :type max_dist:       :class:`float`
-    :type scores:         :class:`list` of :class:`float`
-    :type f_idx:          :class:`int`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if any of the chain indices or
-              resnums is invalid, the interaction partners are the same residue,
-              *min_dist* >= *max_dist*, *scores* is empty or when *f_idx* is an
-              invalid index.
-
-
-  .. method:: CalculateClashScore(bb_list, start_resnum, [chain_index=0])
-
-    :param bb_list:     Loop to calculate the clash score
-    :param start_resnum: ResNum defining the position in the SEQRES
-                         (first element starts with one!)
-    :param chain_index: Index of the chain the loop belongs to
-
-    :type bb_list:      :class:`BackboneList`
-    :type start_resnum: :class:`int`
-    :type chain_index:  :class:`int`
-
-    :returns: clash score
-
-    :raises: :exc:`~exceptions.RuntimeError` if size of *bb_list* is smaller
-             than 3, the *chain_index*/*start_resnum* lead to invalid
-             positions in the SEQRES or the scorer has never been initialized
-             with a SEQRES.
-
-  .. method:: CalculateCBetaScore(bb_list, start_resnum, [chain_index=0])
-
-    :param bb_list:     Loop to calculate the cbeta score
-    :param start_resnum: ResNum defining the position in the SEQRES
-                         (first element starts with one!)
-    :param chain_index: Index of the chain the loop belongs to
-
-    :type bb_list:      :class:`BackboneList`
-    :type start_resnum: :class:`int`
-    :type chain_index:  :class:`int`
-
-    :returns: cbeta score
-
-    :raises:  :exc:`~exceptions.RuntimeError` if size of *bb_list* is smaller
-              than 3, the *chain_index*/*start_resnum* lead to invalid positions
-              in the SEQRES or when the  according potential or scorer have
-              never been properly initialized.
-
-  .. method:: CalculateReducedScore(bb_list, start_resnum, [chain_index=0])
-
-    :param bb_list:     Loop to calculate the reduced score
-    :param start_resnum: ResNum defining the position in the SEQRES
-                         (first element starts with one!)
-    :param chain_index: Index of the chain the loop belongs to
-
-    :type bb_list:      :class:`BackboneList`
-    :type start_resnum: :class:`int`
-    :type chain_index:  :class:`int`
-
-    :returns: reduced score
-
-    :raises:  :exc:`~exceptions.RuntimeError` if size of *bb_list* is smaller
-              than 3, the *chain_index*/*start_resnum* lead to invalid positions
-              in the SEQRES or when the  according potential or scorer have
-              never been properly initialized.
-
-  .. method:: CalculateTorsionScore(bb_list, start_resnum, [chain_index=0])
-
-    :param bb_list:     Loop to calculate the torsion score
-    :param start_resnum: ResNum defining the position in the SEQRES
-                         (first element starts with one!)
-    :param chain_index: Index of the chain the loop belongs to
-
-    :type bb_list:      :class:`BackboneList`
-    :type start_resnum: :class:`int`
-    :type chain_index:  :class:`int`
-
-    :returns: torsion score
-
-    :raises:  :exc:`~exceptions.RuntimeError` if size of *bb_list* is smaller
-              than 3, the *chain_index*/*start_resnum* lead to invalid positions
-              in the SEQRES or when the  according potential or scorer have
-              never been properly initialized.
-
-  .. method:: CalculateCBPackingScore(bb_list, start_resnum, [chain_index=0])
-
-    :param bb_list:     Loop to calculate the packing score
-    :param start_resnum: ResNum defining the position in the SEQRES
-                         (first element starts with one!)
-    :param chain_index: Index of the chain the loop belongs to
-
-    :type bb_list:      :class:`BackboneList`
-    :type start_resnum: :class:`int`
-    :type chain_index:  :class:`int`
-
-    :returns: packing score
-
-    :raises:  :exc:`~exceptions.RuntimeError` if size of *bb_list* is smaller
-              than 3, the *chain_index*/*start_resnum* lead to invalid positions
-              in the SEQRES or when the  according potential or scorer have
-              never been properly initialized.
-
-  .. method:: CalculateHBondScore(bb_list, start_resnum, [chain_index=0])
-
-    :param bb_list:     Loop to calculate the hbond score
-    :param start_resnum: ResNum defining the position in the SEQRES
-                         (first element starts with one!)
-    :param chain_index: Index of the chain the loop belongs to
-
-    :type bb_list:      :class:`BackboneList`
-    :type start_resnum: :class:`int`
-    :type chain_index:  :class:`int`
-
-    :returns: hbond score
-
-    :raises:  :exc:`~exceptions.RuntimeError` if size of *bb_list* is smaller
-              than 3, the *chain_index*/*start_resnum* lead to invalid positions
-              in the SEQRES or when the  according potential or scorer have
-              never been properly initialized.
-
-
-  .. method:: CalculateSSAgreementScore(bb_list, start_resnum, [chain_index=0])
-
-    :param bb_list:     Loop to calculate the SSAgreement score
-    :param start_resnum: ResNum defining the position in the SEQRES
-                         (first element starts with one!)
-    :param chain_index: Index of the chain the loop belongs to
-
-    :type bb_list:      :class:`BackboneList`
-    :type start_resnum: :class:`int`
-    :type chain_index:  :class:`int`
-
-    :returns: SSAgreement score
-
-    :raises:  :exc:`~exceptions.RuntimeError` if size of *bb_list* is smaller
-              than 3, the *chain_index*/*start_resnum* lead to invalid positions
-              in the SEQRES or the scorer have never been properly initialized
-              or when no :class:`PsipredPrediction` is set to the scorer.
-
-
-  .. method:: CalculateContactScore(bb_list, start_resnum, [chain_index=0])
-
-    :param bb_list:     Loop to calculate the contact score
-    :param start_resnum: ResNum defining the position in the SEQRES
-                         (first element starts with one!)
-    :param chain_index: Index of the chain the loop belongs to
-
-    :type bb_list:      :class:`BackboneList`
-    :type start_resnum: :class:`int`
-    :type chain_index:  :class:`int`
-
-    :returns: contact score
-
-    :raises:  :exc:`~exceptions.RuntimeError` if size of *bb_list* is smaller
-              than 3, the *chain_index*/*start_resnum* lead to invalid positions
-              in the SEQRES or the scorer have never been properly initialized
-
-  .. method:: CalculateConstraintScore(bb_list, start_resnum, [chain_index=0])
-
-    :param bb_list:     Loop to calculate the constraint score
-    :param start_resnum: ResNum defining the position in the SEQRES
-                         (first element starts with one!)
-    :param chain_index: Index of the chain the loop belongs to
-
-    :type bb_list:      :class:`BackboneList`
-    :type start_resnum: :class:`int`
-    :type chain_index:  :class:`int`
-
-    :returns: constraint score
-
-    :raises:  :exc:`~exceptions.RuntimeError` if size of *bb_list* is smaller
-              than 3, the *chain_index*/*start_resnum* lead to invalid positions
-              in the SEQRES or the scorer have never been properly initialized
-
-  .. method:: TransOmegaTorsions(bb_list, [thresh = 20/180*pi, allow_prepro_cis=True])
-
-    Checks whether *bb_list* only contains trans omega torsion angles.
-
-    :param bb_list:     Loop to check
-    :param thresh:      Allowed deviation from ideal trans angle (pi)
-    :param allow_prepro_cis: Flag, whether cis-omega torsions should be
-                             allowed in case of a subsequent proline.
-
-    :type bb_list:      :class:`BackboneList`
-    :type thresh:       :class:`float`
-    :type allowe_prepro_cis: :class:`bool`
-
-    :returns:           :class:`bool` whether *bb_list* only contains
-                        trans-omega torsions.
-
-    :raises: :exc:`~exceptions.RuntimeError` if size of *bb_list* is smaller
-             than 3.
-
-
diff --git a/doc/html/_sources/loop/helper_classes.txt b/doc/html/_sources/loop/helper_classes.txt
deleted file mode 100644
index 033902e4..00000000
--- a/doc/html/_sources/loop/helper_classes.txt
+++ /dev/null
@@ -1,543 +0,0 @@
-Helper Classes
-================================================================================
-
-.. currentmodule:: promod3.loop
-
-This chapter describes helper classes, that are somehow related to the 
-functionality in the loop module.
-
-Psipred
---------------------------------------------------------------------------------
-
-  
-
-
-.. class:: PsipredPrediction
-
-  A container for the secondary structure prediction by Psipred.
-
-  .. method:: PsipredPrediction()
-    
-    Constructs empty container
-
-  .. method:: PsipredPrediction(prediction, confidence)
-
-    Constructs container with given content
-
-    :param prediction:  Secondary structure prediction as element in ['H','E','C']
-    :param confidence:  Confidence of prediction as element in [0,9]
-
-    :type prediction:   :class:`list`
-    :type confidence:   :class:`list`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if size of **prediction** and
-              **confidence** are inconsistent or if they contain an invalid
-              element
-
-  .. method:: FromHHM(filename)
-
-    Static function to Load a :class:`PsipredPrediction` object from hhm file, 
-    as they are provided by the hhsearch suite
-
-    :param filename:    Name of file
-    :type filename:     :class:`str`
-
-  .. method:: FromHoriz(filename)
-
-    Static function to Load a :class:`PsipredPrediction` object from horiz file, 
-    as they are produced by the psipred executable
-
-    :param filename:    Name of file
-    :type filename:     :class:`str` 
-
-  .. method:: Add(prediction, confidence)
-
-    Adds and appends a single residue psipred prediction at the end
-
-    :param prediction:  Prediction, must be one in ['H','E','C']
-    :param confidence:  Confidence of prediction, must be in [0,9]
-
-    :type prediction:   :class:`str`
-    :type confidence:   :class:`int`
-
-    :raises: :exc:`~exceptions.RuntimeError` if input contains invalid elements
-
-  .. method:: Extract(from, to)
-
-    Extracts content and returns a sub-:class:`PsipredPrediction` with range **from**
-    to **to**, not including **to** itself
-
-    :param from:        Idx to start
-    :param to:          Idx to end
-
-    :type from:         :class:`int`
-    :type to:           :class:`int`
-
-    :returns:           :class:`PsipredPrediction` with the specified range
-
-    :raises: :exc:`~exceptions.RuntimeError` if **from** or **to** are invalid
-
-
-
-  .. method:: GetPrediction(idx)
-
-    :param idx:         Index to get prediction from
-    :type idx:          :class:`int`
-    :returns:           Psipred prediction at pos **idx**
-    :raises:  :exc:`~exceptions.RuntimeError` if **idx** is invalid
-
-  .. method:: GetConfidence(idx)
-
-    :param idx:         Index to get confidence from
-    :type idx:          :class:`int`
-    :returns:           Psipred confidence at pos **idx**
-    :raises: :exc:`~exceptions.RuntimeError` if **idx** is invalid  
-
-  .. method:: GetPredictions()
-
-    Get all the predictions in the container
-
-    :returns:           :class:`list` containing all the predictions in the container
-
-
-  .. method:: GetConfidences()
-
-    Get all the confidences in the container
-
-    :returns:           :class:`list` containing all the confidences in the container
-
-
-  .. method:: __len__()
-
-    :returns:           Number of elements in container
-
-
-
-Handling several loops at once
---------------------------------------------------------------------------------
-
- 
-
-.. class:: LoopCandidate(backbone_list)
-  
-  Object representing a possible configuration of the backbone of a particular loop being modelled. Apart from the positions, stored in a :class:`BackboneList`, it also has attributes storing different scores associated with the candidate (will be set by calling the corresponding scoring function in :class:`LoopCandidates`).
-
-  :param backbone_list:  Positions of the backbone atoms
-
-  :type backbone_list:   :class:`BackboneList`
-
-  .. method:: CARMSD(other)
-
-    Calculates the C-alpha RMSD between this loop candidate and an *other* loop candidate, after superposition.
-    
-    :param other:        Other loop
-
-    :type other:         :class:`LoopCandidate`
-
-  .. method:: RMSD(other)
-
-    Calculates the RMSD between this loop candidate and an *other* loop candidate, after superposition.
-    
-    :param other:        Other loop
-
-    :type other:         :class:`LoopCandidate`   
-
-  .. attribute:: bb_list
-
-    The backbone list containing the positions of the backbone atoms
-
-    :type: :class:`BackboneList`
-
-
-  .. attribute:: clash_score
-
-    The clash score of the loop candidate
-
-    :type: :class:`float`
-
-  .. attribute:: cbeta_score
-
-    The C-beta score of the loop candidate
-
-    :type: :class:`float`
-
-  .. attribute:: reduced_score
-
-    The reduced score of the loop candidate
-
-    :type: :class:`float`
-
-  .. attribute:: torsion_score
-
-    The torsion score of the loop candidate
-
-    :type: :class:`float`
-
-  .. attribute:: packing_score
-
-    The packing score of the loop candidate
-
-    :type: :class:`float`
-
-  .. attribute:: hbond_score
-
-    The HBond score of the loop candidate
-    
-    :type: :class:`float`
-
-  .. attribute:: ss_agreement_score
-
-    The SSAgreement score of the loop candidate
-
-    :type: :class:`float`
-
-  .. attribute:: combined_score
-
-    Score value intended to be a placeholder for an arbitrary combination
-    of the other scores
-
-    :type: :class:`float`
-
-
-.. class:: LoopCandidates(seq)
-
-  The *LoopCandidates* is a helper class used as a container for 
-  :class:`LoopCandidate` objects enforcing consistent length
-  and sequence among them. It can either be filled manually or
-  generated using static filling functions using the functionality
-  from the :class:`FragDB` or Monte Carlo algorithms. Once it contains
-  candidates you can apply closing, scoring or clustering algorithms on the content.
-  Note, that you have to attach a scorer object before any scoring action.
-
-  :param seq:            The sequence being enforced for all candidates
-
-  :type sequence:        :class:`str`
-
-
-  .. staticmethod:: FillFromDatabase(n_stem, c_stem, seq, frag_db, \
-                                     structural_db, extended_search=False)
-    
-    Searches for loop candidates matching the length (number of residues in *seq*) and geometry (of *n_stem* and *c_stem*) of the loop to be modelled in a fragment database.
-
-    :param n_stem:         The residue at the N-terminal end of the loop 
-    :param c_stem:         The residue at the C-terminal end of the loop 
-    :param seq:            The sequence of residues to be added including the
-                           *n_stem* and *c_stem*
-    :param frag_db:        The fragment database
-    :param structural_db:  The according structural database
-    :param extended_search: Whether search should be extended to fragments
-                            matching the geometry of the *n_stem* and *c_stem*
-                            a bit less precisely.
-
-    :type n_stem:          :class:`ost.mol.ResidueHandle`
-    :type c_stem:          :class:`ost.mol.ResidueHandle`
-    :type seq:             :class:`str`
-    :type frag_db:         :class:`FragDB`
-    :type structural_db:   :class:`StructureDB`
-    :type extended_search: :class:`bool`
-
-    :returns:              A list of loop candidates
-    :rtype:                :class:`LoopCandidates`
-
-  .. staticmethod:: FillFromMonteCarloSampler(seq, num_loops, steps, \
-                                              sampler, closer, scorer, cooler, \
-                                              [random_seed = 0])
-                    FillFromMonteCarloSampler(initial_bb, seq, num_loops, steps, \
-                                              sampler, closer, scorer, cooler, \
-                                              [random_seed = 0])
-    
-    Uses Monte Carlo simulated annealing to sample the loop to be modelled.
-    If *initial_bb* is given, every Monte Carlo run starts from that configuration.
- 
-    :param initial_bb: Initial configuration used for the sampling
-    :param seq:        The sequence of residues to be sampled
-    :param num_loops:  Number of loop candidates to return
-    :param steps:      Number of MC steps to perform for each loop candidate
-                       generated
-    :param sampler:    Used to generate a new configuration at each MC step
-    :param closer:     Used to close the loop after each MC step
-    :param scorer:     Used to score the generated configurations at each MC step
-    :param cooler:     Controls the temperature profile of the simulated annealing
-    :param random_seed: Seed to feed the random number generator for 
-                        accepting/rejecting proposed monte carlo steps.
-                        For every monte carlo run, the random number generator 
-                        gets refreshed and this seed gets increased by 1.
-
-    :type initial_bb:  :class:`BackboneList`
-    :type seq:         :class:`str`
-    :type num_loops:   :class:`int`
-    :type steps:       :class:`int`
-    :type sampler:     :ref:`mc-sampler-object`
-    :type closer:      :ref:`mc-closer-object`
-    :type scorer:      :ref:`mc-scorer-object`
-    :type cooler:      :ref:`mc-cooler-object`
-    :type random_seed: :class:`int`
-
-    :returns:          The resulting candidates
-    :rtype:            :class:`LoopCandidates`
-
-    :raises: A :exc:`RuntimeError`, if *initial_bb* is not given and the Monte
-             Carlo sampler failed to initialize (i.e. stems are too far apart)
-    :raises: A :exc:`RuntimeError`, if *initial_bb* is given and it is
-             inconsistent with *seq*
-
-  .. method:: ClusterCandidates(max_dist, neglect_size_one = true)
-
-    Clusters the loop candidates according to their pairwise CARMSD using a greedy
-    hierarchical clustering algorithm. Every candidate gets assigned a unique cluster.
-    At every clustering step, the two clusters with shortest distance get merged, with
-    the distance definition being the maximal CARMSD between any of the members
-    of the two clusters.
-
-    :param max_dist:    Maximal distance two clusters can have to be merged
-    :param neglect_size_one: Whether clusters should be added to the return
-                             list if they only contain one :class:`LoopCandidate`
-
-    :type max_dist:     :class:`float`
-    :type neglect_size_one: :class:`bool`
-
-
-    :returns:   A list of :class:`LoopCandidates`. Each element in the list
-                corresponds to the candidates in one cluster.
-
-  .. method:: ApplyCCD(n_stem, c_stem, max_iterations=1000, \
-                       rmsd_cutoff=0.1, keep_non_converged=false, random_seed=0)
-              ApplyCCD(n_stem, c_stem, torsion_sampler, max_iterations=1000, \
-                       rmsd_cutoff=0.1, keep_non_converged=false, random_seed=0)
-              ApplyCCD(n_stem, c_stem, torsion_samplers, max_iterations=1000, \
-                       rmsd_cutoff=0.1, keep_non_converged=false, random_seed=0)
-
-    Closes all :class:`LoopCandidate` in :class:`LoopCandidates` using the CCD
-    algorithm (i.e. modifies the :class:`LoopCandidate` so that its stem residues 
-    match those of *n_stem* and *c_stem*). CCD (cyclic coordinate descent, see
-    :class:`~promod3.loop.CCD`) is an iterative minimization algorithm.
-
-    If *torsion_sampler* or *torsion_samplers* is given, it is used at each step
-    of the closing to calculate the probability of the proposed move, which is
-    then accepted or not depending on a metropolis criterium.
-
-    :param n_stem:      Residue defining the n-stem positions every candidate
-                        should match. See :meth:`~promod3.loop.CCD.CCD()`.
-    :param c_stem:      Residue defining the c-stem positions every candidate
-                        should match. See :meth:`~promod3.loop.CCD.CCD()`.
-    :param torsion_sampler:      The torsion sampler
-    :param torsion_samplers:     A list containing one torsion sampler for each
-                                 residue in the loop
-    :param max_iterations:       Maximum number of iteration
-    :param rmsd_cutoff:          Cutoff in stem residue RMSD used to determine
-                                 convergence
-    :param keep_non_converged:   Whether to keep loop candidates for which the
-                                 closing did not converge
-    :param random_seed:          seed for random number generator used to
-                                 accept/reject moves in CCD algorithm
-
-    :type n_stem:               :class:`ost.mol.ResidueHandle`
-    :type c_stem:               :class:`ost.mol.ResidueHandle`
-    :type torsion_sampler:      :class:`TorsionSampler`
-    :type torsion_samplers:     :class:`list` of :class:`TorsionSampler`
-    :type max_iterations:       :class:`int`
-    :type rmsd_cutoff:          :class:`float`
-    :type keep_non_converged:   :class:`bool`
-    :type random_seed:          :class:`int`
-
-
-  .. method:: ApplyKIC(n_stem, c_stem, pivot_one, pivot_two, pivot_three)
-
-    Closes all :class:`LoopCandidate` in :class:`LoopCandidates` (i.e. modifies
-    the :class:`LoopCandidate` so that its stem residues match those of
-    *n_stem* and *c_stem*, which are the stem residues of the loop being
-    modelled), using the KIC algorithm. This algorithm finds analytical
-    solutions for closing the loop by modifying the torsion angles of just
-    three pivot residues. Due to the underlying mathematical formalism in KIC,
-    up to 16 solutions can be found for every candidate. This leads to an
-    increase in number of loops. 
-
-    :param n_stem:      Residue defining the n-stem positions every candidate
-                        should match
-    :param c_stem:      Residue defining the c-stem positions every candidate
-                        should match
-    :param pivot_one:   First pivot residue
-    :param pivot_two:   Second pivot residue 
-    :param pivot_three: Third pivot residue 
-
-    :type n_stem:       :class:`ost.mol.ResidueHandle`
-    :type c_stem:       :class:`ost.mol.ResidueHandle`
-    :type pivot_one:    :class:`int`
-    :type pivot_two:    :class:`int`
-    :type pivot_three:  :class:`int`
-
-
-  .. method:: Add(loop_candidate)
-
-    Add a loop candidate to the list of candidates
-
-    :param loop_candidate:                 The loop candidate
-    :type loop_candidate:   :class:`LoopCandidate`
-
-    :raises: :exc:`~exceptions.RuntimeError` If sequence of *loop_candidate*
-             is not consistent with internal sequence
-
-  .. method:: Add(bb_list)
-
-    Add a loop candidate to the list of candidates from a list of backbone positions
-
-    :param bb_list:                 The backbone list
-    :type bb_list:                  :class:`BackboneList`
-
-    :raises: :exc:`~exceptions.RuntimeError` If sequence of *bb_list* is not
-             consistent with internal sequence
- 
-  .. method:: Remove(index)
-
-    Remove a loop candidate from the list of candidates.
-
-    :param index:         The index of the candidate that will be removed
-    :type index:          :class:`int`
-
-  .. method:: AttachScorer(scorer)
-
-    Attaches a scorer to the :class:`LoopCandidates`. The scorer contains the information about the environment of the loop candidates and is mandatory to calculate the different scores for the loop candidates.
-
-    :param scorer:            The scorer
-    :type scorer:             :class:`BackboneLoopScorer`
-
-
-  .. method:: CalculateClashScores(start_resnum, [chain_index=0])
-
-    Calculates and assigns the clash score for each :class:`LoopCandidate`. 
-
-    :param start_resnum:    Residue number of the starting residue of the candidates being scored
-                            (residue numbers start with one!)
-    :param chain_index:     The index of the chain to which the loop belongs (index relative to the entity forming the environment in the :class:`BackboneLoopScorer`)
-
-    :type start_resnum:     :class:`int`
-    :type chain_index:      :class:`int`       
-
-
-  .. method:: CalculateBetaScores(start_resnum, [chain_index=0])
-
-    Calculates and assigns the cbeta score for each :class:`LoopCandidate`.
-
-    :param start_resnum:    Residue number of the starting residue of the candidates being scored
-                            (residue numbers start with one!)
-    :param chain_index:     The index of the chain to which the loop belongs (index relative to the entity forming the environment in the :class:`BackboneLoopScorer`)
-    
-    :type start_resnum:     :class:`int`
-    :type chain_index:      :class:`int`
-
-  .. method:: CalculateReducedScores(start_resnum, [chain_index=0])
-
-    Calculates and assigns the reduced score for each :class:`LoopCandidate`.
-
-    :param start_resnum:    Residue number of the starting residue of the candidates being scored
-                            (residue numbers start with one!)
-    :param chain_index:     The index of the chain to which the loop belongs (index relative to the entity forming the environment in the :class:`BackboneLoopScorer`)
-    
-    :type start_resnum:     :class:`int`
-    :type chain_index:      :class:`int`
-
-
-  .. method:: CalculateTorsionScores(start_resnum, [chain_index=0])
-
-    Calculates and assigns the torsion score for each :class:`LoopCandidate`.
-
-    :param start_resnum:    Residue number of the starting residue of the candidates being scored
-                            (residue numbers start with one!)
-    :param chain_index:     The index of the chain to which the loop belongs (index relative to the entity forming the environment in the :class:`BackboneLoopScorer`)
-    
-    :type start_resnum:     :class:`int`
-    :type chain_index:      :class:`int`
-  .. method:: CalculatePackingScores(start_resnum, [chain_index=0])
-
-    Calculates and assigns the packing score for each :class:`LoopCandidate`.
-
-    :param start_resnum:    Residue number of the starting residue of the candidates being scored
-                            (residue numbers start with one!)
-    :param chain_index:     The index of the chain to which the loop belongs (index relative to the entity forming the environment in the :class:`BackboneLoopScorer`)
-    
-    :type start_resnum:     :class:`int`
-    :type chain_index:      :class:`int`
-
-  .. method:: CalculateHBondcores(start_resnum, [chain_index=0])
-
-    Calculates and assigns the HBond score for each :class:`LoopCandidate`. 
-
-    :param start_resnum:    Residue number of the starting residue of the candidates being scored
-                            (residue numbers start with one!)
-    :param chain_index:     The index of the chain to which the loop belongs (index relative to the entity forming the environment in the :class:`BackboneLoopScorer`)
-    
-    :type start_resnum:     :class:`int`
-    :type chain_index:      :class:`int`
-
-  .. method:: CalculateSSAgreementScores(start_resnum, [chain_index=0])
-
-    Calculates and assigns the SSAgreement score for each :class:`LoopCandidate`. 
-
-    :param start_resnum:    Residue number of the starting residue of the candidates being scored
-                            (residue numbers start with one!)
-    :param chain_index:     The index of the chain to which the loop belongs (index relative to the entity forming the environment in the :class:`BackboneLoopScorer`)
-    
-    :type start_resnum:     :class:`int`
-    :type chain_index:      :class:`int`
-
-
-  .. method:: CalculateCombinedScores(linear_weights, start_resnum, [chain_index=0])
-
-    Calculates and assigns an arbitrary linear combination of all the available scores for each :class:`LoopCandidate`. 
-
-     
-    :param linear_weights:  Defining the linear weights of the scores as key value pairs. Allowed
-                            keys are: ["cbeta","clash","torsion","cb_packing","hbond","ss_agreement", "reduced", "intercept"]
-                            For every key, the according function in the attached 
-                            :class:`BackboneLoopScorer` gets called and the returned score added to
-                            the final score with the according weight. If there is an intercept given,
-                            the according value also gets added to the final score.
-    :param start_resnum:    Residue number of the starting residue of the candidates being scored
-                            (residue numbers start with one!)
-    :param chain_index:     The index of the chain to which the loop belongs (index relative to the entity forming the environment in the :class:`BackboneLoopScorer`)
-    
-    :type linear_weights:   :class:`dict`
-    :type start_resnum:     :class:`int`
-    :type chain_index:      :class:`int`
-
- 
-
-  .. method:: GetAVGClashScore()
-
-    :return:      The average of the clash scores of all :class:`LoopCandidate`.
-    :rtype:       float
-
-  .. method:: GetAVGCBetaScore()
-
-    :return:      The average of the cbeta scores of all :class:`LoopCandidate`.
-    :rtype:       float
-
-  .. method:: GetAVGReducedScore()
-
-    :return:      The average of the reduced scores of all :class:`LoopCandidate`.
-    :rtype:       float
-
-  .. method:: GetAVGTorsionScore()
-
-    :return:      The average of the torsion scores of all :class:`LoopCandidate`.
-    :rtype:       float
-
-  .. method:: GetAVGPackingScore()
-
-    :return:      The average of the packing scores of all :class:`LoopCandidate`.
-    :rtype:       float
-
-  .. method:: GetAVGHBondscore()
-
-    :return:      The average of the HBond scores of all :class:`LoopCandidate`.
-    :rtype:       float
-
-  .. method:: GetAVGSSAgreementscore()
-
-    :return:      The average of the SSAgreement scores of all :class:`LoopCandidate`.
-    :rtype:       float
-
-  .. method:: GetAVGCombinedScore()
-
-    :return:      The average of the combined scores of all :class:`LoopCandidate`.
-    :rtype:       float
\ No newline at end of file
diff --git a/doc/html/_sources/loop/index.txt b/doc/html/_sources/loop/index.txt
index 6ee05f6b..f6039309 100644
--- a/doc/html/_sources/loop/index.txt
+++ b/doc/html/_sources/loop/index.txt
@@ -1,15 +1,14 @@
-:mod:`~promod3.loop` - Loop Modelling
+:mod:`~promod3.loop` - Loop Handling
 ================================================================================
 
 .. module:: promod3.loop
-  :synopsis: Loop Modelling
+  :synopsis: Loop Handling
 
 .. currentmodule:: promod3.loop
 
-Tools and algorithms for loop modelling. 
-This module provides ways for representation and manipulation of peptides and 
-finally connect them to larger structures. The following example should give 
-you a starting point to get an idea of what can be done.
+Tools and algorithms for loop handling. This module provides ways for
+representation of peptides and to obtain fragments to potentially use as
+loops. The following example should give you an idea of what can be done:
 
 .. literalinclude:: ../../../tests/doc/scripts/loop_main.py
 
@@ -18,11 +17,9 @@ Contents:
 .. toctree::
    :maxdepth: 2
 
-   Representing Loops <backbone>
-   Have a closer look at backbone dihedral angles <torsion_sampler>
-   A dump for structural data <structure_db>
-   Closing Loops - adapt them to the environment <loop_closing>
-   Loop Scoring <backbone_loop_score>
-   Generating Loops DeNovo <monte_carlo>
-   Loading Precomputed Loop Objects <load_loop_objects>
-   Helper Classes <helper_classes>
+   backbone
+   torsion_sampler
+   structure_db
+   all_atom
+   mm_system_creation
+   load_loop_objects
diff --git a/doc/html/_sources/loop/load_loop_objects.txt b/doc/html/_sources/loop/load_loop_objects.txt
index f14289b9..00365ca9 100644
--- a/doc/html/_sources/loop/load_loop_objects.txt
+++ b/doc/html/_sources/loop/load_loop_objects.txt
@@ -1,4 +1,4 @@
-Load Loop Objects
+Loading Precomputed Objects
 ================================================================================
 
 .. currentmodule:: promod3.loop
@@ -7,7 +7,7 @@ Load Loop Objects
 Several data objects are used throughout the loop module.
 |project| offers to load precomputed instances for direct usage.
 
-.. method:: LoadTorsionSampler([seed = 0])
+.. method:: LoadTorsionSampler(seed=0)
 
   Loads and returns a torsion sampler with an amino acid grouping
   as defined by Solis & Rachovsky [1] that has been trained on 
@@ -21,7 +21,7 @@ Several data objects are used throughout the loop module.
   :rtype:               :class:`TorsionSampler`
 
 
-.. method:: LoadTorsionSamplerCoil([seed = 0])
+.. method:: LoadTorsionSamplerCoil(seed=0)
 
   Loads and returns a torsion sampler with an amino acid grouping
   as defined by Solis & Rachovsky [1] that has been trained on coil
@@ -35,7 +35,7 @@ Several data objects are used throughout the loop module.
   :rtype:               :class:`TorsionSampler`
 
 
-.. method:: LoadTorsionSamplerHelical([seed = 0])
+.. method:: LoadTorsionSamplerHelical(seed=0)
 
   Loads and returns a torsion sampler with an amino acid grouping
   as defined by Solis & Rachovsky [1] that has been trained on helical
@@ -49,7 +49,7 @@ Several data objects are used throughout the loop module.
   :rtype:               :class:`TorsionSampler`
 
 
-.. method:: LoadTorsionSamplerExtended([seed = 0])
+.. method:: LoadTorsionSamplerExtended(seed=0)
 
   Loads and returns a torsion sampler with an amino acid grouping
   as defined by Solis & Rachovsky [1] that has been trained on extended
@@ -71,31 +71,19 @@ Several data objects are used throughout the loop module.
   :returns:             The Fragment database
   :rtype:               :class:`FragDB`
 
-.. method:: LoadStructureDB([load_frequencies=False])
+.. method:: LoadStructureDB(load_frequencies=True)
 
   Loads and returns a structure db containing roughly 24000 chains form the
   PDB with redundancy cutoff of 90%
 
   :param load_frequencies: If True, the full database including profile
-                           information for every position gets loaded.
-                           A database without profiles loads faster and 
-                           requires less memory. But it's not possible
-                           to add new coordinates or call one of the
-                           profile dependent functions.
-
-  :type load_frequencies: :class:`bool`
+                           information gets loaded (see
+                           :meth:`StructureDB.Load`).
+  :type load_frequencies:  :class:`bool`
 
   :returns:             The structure db
   :rtype:               :class:`StructureDB`
-
-
-.. method:: LoadBackboneLoopScorer()
-
-  Loads and returns a backbone loop scorer with already set statistical 
-  potentials.
-
-  :returns:             The scorer
-  :rtype:               :class:`~promod3.loop.BackboneLoopScorer`
+  
 
 [1] A. D. Solis and S. Rackovsky. Improvement of statistical potentials and     
     threading score functions using information maximization. 
diff --git a/doc/html/_sources/loop/loop_closing.txt b/doc/html/_sources/loop/loop_closing.txt
deleted file mode 100644
index 2e39dd54..00000000
--- a/doc/html/_sources/loop/loop_closing.txt
+++ /dev/null
@@ -1,218 +0,0 @@
-Loop Closing
-================================================================================
-
-.. currentmodule:: promod3.loop
-
-
-Loops, represented as :class:`BackboneList` objects, often need to undergo
-conformational changes to fit into gaps defined by stem residues.
-|project| implements two algorithms performing this task.
-
-  * There is cyclic coordinate descent (CCD) [canutescu2003]_
-
-
-  * and kinematic closure (KIC) [mandell2009]_
-
-
-In case of small gaps or small issues in the :class:`BackboneList` you might
-also consider the :class:`BackboneRelaxer`.
-
-
-
-
-
-CCD
---------------------------------------------------------------------------------
-The |project| implementation of the cyclic coordinate descent first superposes
-the n-stem of the input :class:`BackboneList` with the provided n-stem
-positions. In every iteration of the algorithm, one residue of the 
-:class:`BackboneList` gets randomly selected. If the residue is not the n-stem,
-the ideal phi angle, that minimizes the RMSD between the :class:`BackboneList` 
-c-stem and the target c-stem positions gets calculated and directly applied. 
-The same thing is done for the psi angle if the selected residue is not the
-c-stem. Iterations continue until a c-stem RMSD threshold is reached or number
-of iterations hit a limit.
-By performing CCD, unfavourable backbone dihedral pairs can be introduced.
-It is therefore optionally possible to use :class:`TorsionSampler` to guide the
-iterative process. 
-In this case, the algorithm calculates the probablity of observing the dihedral
-pair before and after performing the phi/psi update. If the fraction 
-after/before is smaller than a random number in range [0;1[, the proposed
-dihedral pair gets rejected and the next iteration starts. Please note, that
-this increases the probability of non-convergence.
-
-
-
-.. class:: CCD
-
-  Class, that sets up everything you need to perform a particular loop closing
-  action.
-
-  .. method:: CCD(sequence, n_stem, c_stem, torsion_sampler, max_steps, rmsd_cutoff, seed)
-
-    All runs with this CCD object will be with application of torsion samplers 
-    to avoid moving into unfavourable regions of the backbone dihedrals.
-
-    :param sequence:    Sequence of the backbones to be closed
-    :param n_stem:      Residue defining the n_stem.
-                        If the residue before *n_stem* doesn't exist, the
-                        torsion sampler will use a default residue (ALA) and
-                        and phi angle (-1.0472) to evaluate the first angle.
-    :param c_stem:      Residue defining the c_stem.
-                        If the residue after *c_stem* doesn't exist, the
-                        torsion sampler will use a default residue (ALA) and
-                        psi angle (-0.7854) to evaluate the last angle.
-    :param torsion_sampler: To extract probabilities for the analysis of the backbone 
-                        dihedrals. You either pass a list with :class:`TorsionSampler`
-                        objects for every residue of the loop to be closed or a single
-                        :class:`TorsionSampler`, that will be applied on all residues.
-    :param max_steps:   Maximal number of iterations
-    :param rmsd_cutoff: The algorithm stops as soon as the c_stem of the loop to be 
-                        closed has RMSD below the **c_stem** 
-    :param seed:        Seed of random number generator to decide whether new phi/psi pair
-                        should be accepted.
-
-
-    :type sequence:     :class:`str`
-    :type n_stem:       :class:`ost.mol.ResidueHandle`
-    :type c_stem:       :class:`ost.mol.ResidueHandle` 
-    :type torsion_sampler: :class:`TorsionSampler` / :class:`list`
-    :type max_steps:    :class:`int`
-    :type rmsd_cutoff:  :class:`float`
-    :type seed:         :class:`int`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if a list of torsion samplers is
-              given with inconsistent length regarding the sequence. Another
-              requirement is that all backbone atoms of the stems must be
-              present.
-
-  .. method:: CCD(n_stem, c_stem, max_steps, rmsd_cutoff)
-
-    All runs with this CCD object will be without application of torsion samplers.
-    This is faster but might lead to weird backbone dihedral pairs.
-
-    :param n_stem:      Residue defining the n_stem
-    :param c_stem:      Residue defining the c_stem
-    :param max_steps:   Maximal number of iterations
-    :param rmsd_cutoff: The algorithm stops as soon as the c_stem of the loop to be 
-                        closed has RMSD below the **c_stem**  
-
-    :type n_stem:       :class:`ost.mol.ResidueHandle`
-    :type c_stem:       :class:`ost.mol.ResidueHandle` 
-    :type max_steps:    :class:`int`
-    :type rmsd_cutoff:  :class:`float`
-
-  .. method:: Close(bb_list)
-
-    Closes given **bb_list** with the settings set at initialization.
-
-    :param bb_list:     Loop to be closed
-
-    :type bb_list:      :class:`BackboneList`      
-
-    :returns:           :class:`bool` Whether **rmsd_cutoff** has been reached  
-
-    :raises:  :exc:`~exceptions.RuntimeError` if the CCD object has been
-              initialized with :class:`TorsionSampler` support and the length of
-              the **bb_list** is not consistent with the initial sequence.
-
-
-
-KIC
---------------------------------------------------------------------------------
-The kinematic closure leads to a fragmentation of the loop based on given
-pivot residues. It then calculates possible relative orientations
-of these fragments by considering constraints of bond length and bond angles
-at these pivot residues. Due to the internal mathematical formalism, up to
-16 solutions can be found for a given loop closing problem.
-
-
-.. class:: KIC
-
-  Class, that sets up everything you need to perform a particular loop closing
-  action.
-
-  .. method:: KIC(n_stem, c_stem)
-
-    All runs of this KIC closing object will adapt the input loops to these
-    stem residues.
-
-    :param n_stem:      Residue describing the stem towards n_ter
-    :param c_stem:      Residue describing the stem towards c_ter
-
-  .. method:: Close(bb_list, pivot_one, pivot_two, pivot_three)
-
-    Applies KIC algorithm, so that the output loops match the given stem residues
-
-    :param bb_list:     Loop to be closed
-    :param pivot_one:     Index of first pivot residue
-    :param pivot_two:     Index of second pivot residue
-    :param pivot_three:   Index of third pivot residue  
-
-    :type bb_list:        :class:`BackboneList`
-    :type pivot_one:      :class:`int`  
-    :type pivot_two:      :class:`int`  
-    :type pivot_three:    :class:`int`  
-
-    :returns:             List of :class:`BackboneList` objects representing
-                          the closed loops. There is a maximum of 16 entries.
-
-    :raises: :exc:`~exceptions.RuntimeError` in case of invalid pivot indices.
-
-
-
-Relaxing Backbones
---------------------------------------------------------------------------------
-
-In many cases one wants to quickly relax a :class:`BackboneList`. This
-can be useful to close small gaps in the backbone or resolve the most
-severe clashes. The :class:`BackboneRelaxer` internally sets up a topology
-for the input :class:`BackboneList` based on the CHARMM27 forcefield.
-Once setup, every :class:`BackboneList` of same length and sequence
-can be relaxed by the relaxer.
-
-
-.. class:: BackboneRelaxer(bb_list, [fix_nterm=True, fix_cterm=True])
-
-  Sets up a molecular mechanics topology for given **bb_list**. Every
-  :class:`BackboneList` of same length and sequence can then be
-  relaxed.
-
-  :param bb_list:       Basis for topology creation
-  :param fix_nterm:     Whether n-terminal backbone positions should kept
-                        rigid during relaxation.
-  :param fix_cterm:     Whether c-terminal backbone positions should kept
-                        rigid during relaxation.
-
-  :type bb_list:        :class:`BackboneList`
-  :type fix_nterm:      :class:`bool`
-  :type fix_cterm:      :class:`bool`
-
-  :raises: :exc:`~exceptions.RuntimeError` if size of **bb_list** is below 2
-
-
-  .. method:: Run(bb_list, [steps = 100, stop_criterion = 0.01])
-
-    Performs steepest descent on given BackboneList.
-
-    :param bb_list:     To be relaxed
-    :param steps:       number of steepest descent steps
-    :param stop_criterion:  If maximum force acting on a particle
-                            falls below that threshold, the
-                            relaxation aborts.
-
-    :type bb_list:      :class:`BackboneList`
-    :type steps:        :class:`steps`
-    :type stop_criterion: :class:`float`
-
-    :returns:           Forcefield energy upon relaxation
-
-    :raises:  :exc:`~exceptions.RuntimeError` if **bb_list** has not the same
-              size or sequence as the initial one.
-
-
-
-
-.. [canutescu2003] Canutescu AA and Dunbrack RL Jr. (2003). Cyclic coordinate descent: A robotics algorithm for protein loop closure. Protein Sci. 12(5):963–972.
-
-.. [mandell2009] Mandell DJ, Coutsias EA and Kortemme T (2009). Sub-angstrom accuracy in protein loop reconstruction by robotics-inspired conformational sampling. Nat Methods. 6(8):551-2.
\ No newline at end of file
diff --git a/doc/html/_sources/loop/mm_system_creation.txt b/doc/html/_sources/loop/mm_system_creation.txt
new file mode 100644
index 00000000..7ad0c03a
--- /dev/null
+++ b/doc/html/_sources/loop/mm_system_creation.txt
@@ -0,0 +1,807 @@
+Generate :mod:`ost.mol.mm` systems
+================================================================================
+
+.. currentmodule:: promod3.loop
+
+To simplify the creation of :mod:`ost.mol.mm` / OpenMM simulations for loops in
+proteins, we define a system creator for loops (:class:`MmSystemCreator`) and a
+specialized forcefield lookup for amino acids (:class:`ForcefieldLookup`).
+
+The example below showcases the creation and use of an MM system:
+
+.. literalinclude:: ../../../tests/doc/scripts/loop_mm_sys_creation.py
+
+.. note::
+
+  To simplify use when sidechains may be missing and the region of interest for
+  the MM system has to be determined, it might be better to use the simpler
+  :class:`promod3.modelling.SidechainReconstructor` and
+  :class:`promod3.modelling.AllAtomRelaxer` classes. Even if all the sidechains
+  are available, those classes will be helpful since the overhead to check
+  sidechains without reconstructing them is minimal.
+
+
+Create MM systems for loops
+--------------------------------------------------------------------------------
+
+.. class:: MmSystemCreator(ff_lookup, fix_surrounding_hydrogens=True, \
+                           kill_electrostatics=False, nonbonded_cutoff=8, \
+                           inaccurate_pot_energy=False)
+
+  Setup a system creator for a specific forcefield. The constructor only stores
+  the settings. Most setup work is done by :meth:`SetupSystem`.
+
+  The idea is to have a set of movable loop residues and a set of fixed
+  surrounding residues which interact with the loop.
+
+  :param ff_lookup: Forcefield to use with this system creator.
+  :type ff_lookup:  :class:`ForcefieldLookup`
+  :param fix_surrounding_hydrogens: If False, the hydrogens of the surrounding
+                                    residues can move to improve H-bond building
+                                    (True by default as it only has a minor
+                                    impact on the result and a big one on
+                                    performance).
+  :type fix_surrounding_hydrogens:  :class:`bool`
+  :param kill_electrostatics: If True, all charges are removed from the system.
+                              This is good for H-bond building, but may be bad
+                              if residues in the surrounding are missing (gaps).
+  :type kill_electrostatics:  :class:`bool`
+  :param nonbonded_cutoff: Defines cutoff to set for non bonded interactions.
+                           Recommended values: 5 if kill_electrostatics = True,
+                           8 otherwise. Negative value means no cutoff.
+  :type nonbonded_cutoff:  :class:`float`
+  :param inaccurate_pot_energy: If True, we do not set correct non-bonded
+                                interactions between fixed atoms. This leads
+                                to inaccurate pot. energies but it is faster and
+                                has no effect on simulation runs (e.g. ApplySD)
+                                otherwise.
+  :type inaccurate_pot_energy:  :class:`bool`
+
+  .. method:: GetDisulfidBridges(all_pos, res_indices)
+
+    :return: Pairs of indices (i,j), where res_indices[i] and res_indices[j] are
+             assumed to have a disulfid bridge (CYS-SG pairs within 2.5 A).
+    :rtype:  :class:`list` of :class:`tuple` with two :class:`int`
+
+    :param all_pos: Provides positions for each *res_indices[i]*.
+    :type all_pos:  :class:`AllAtomPositions`
+    :param res_indices: Residue indices into *all_pos*.
+    :type res_indices:  :class:`list` of :class:`int`
+
+  .. method:: SetupSystem(all_pos, res_indices, loop_length, is_n_ter, \
+                          is_c_ter, disulfid_bridges)
+              SetupSystem(all_pos, res_indices, loop_start_indices, \
+                          loop_lengths, is_n_ter, is_c_ter, disulfid_bridges)
+
+    Setup a new system for the loop / surrounding defined by *all_pos* and
+    *res_indices*. Positions are taken from *all_pos[res_indices[i]]* and each
+    of them must have all heavy atoms defined. Residue *all_pos[i]* is assumed
+    to be peptide bound to *all_pos[i-1]* unless res. *i* is labelled as
+    N-terminal. If *all_pos[i-1]* has an unset C (could happen for gaps while
+    modelling), res. *i* will still be treated as if peptide-bound and the
+    hydrogen attached to N is built assuming a helical structure as an
+    approximation. Similarly, we do not generate OXT atoms for residues followed
+    by a gap unless they are specifically labelled as C-terminal.
+
+    Each loop is defined by an entry in *loop_start_indices* and *loop_lengths*.
+    For loop *i_loop*, *res_indices[loop_start_indices[i_loop]]* is the N-stem
+    and *res_indices[loop_start_indices[i_loop] + loop_lengths[i_loop] - 1]* is
+    the C-stem of the loop. The loop indices are expected to be contiguous in
+    *res_indices* between the stems. The stems of the loop are kept fixed (N,
+    CA, CB for N-stem / CA, CB, C, O for C-stem) unless they are terminal
+    residues. Overlapping loops are merged and 0-length loops are removed.
+
+    If *loop_length* is given, a single loop with start index 0 and the given
+    loop length is defined.
+
+    If a system was setup previously, it is overwritten completely.
+
+    If possible, this uses the "CPU" platform in OpenMM using the env. variable
+    ``PM3_OPENMM_CPU_THREADS`` to define the number of desired threads (1 thread
+    is used if variable is undefined).
+
+    :param all_pos: Provides positions for each *res_indices[i]*.
+    :type all_pos:  :class:`AllAtomPositions`
+    :param res_indices: Residue indices into *all_pos*.
+    :type res_indices:  :class:`list` of :class:`int`
+    :param loop_length: Length of single loop (incl. stems).
+    :type loop_length:  :class:`int`
+    :param loop_start_indices: Start indices of loops.
+    :type loop_start_indices:  :class:`list` of :class:`int`
+    :param loop_lengths: Lengths of loops (incl. stems).
+    :type loop_lengths:  :class:`list` of :class:`int`
+    :param is_n_ter: For each *res_indices[i]*, *is_n_ter[i]* defines whether
+                     that residue is N-terminal.
+    :type is_n_ter:  :class:`list` of :class:`bool`
+    :param is_c_ter: For each *res_indices[i]*, *is_c_ter[i]* defines whether
+                     that residue is C-terminal.
+    :type is_c_ter:  :class:`list` of :class:`bool`
+    :param disulfid_bridges: Pairs of indices (i,j), where res_indices[i] and
+                             res_indices[j] form a disulfid bridge (see
+                             :meth:`GetDisulfidBridges`)
+    :type disulfid_bridges:  :class:`list` of :class:`tuple` with two
+                             :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if loops out of bounds with respect
+             to *res_indices*, *loop_start_indices* / *loop_lengths* or
+             *res_indices* / *is_n_ter* / *is_c_ter* have inconsistent lengths,
+             or if any *all_pos[res_indices[i]]* is invalid or has unset heavy
+             atoms.
+
+  .. method:: UpdatePositions(all_pos, res_indices)
+
+    Updates the positions in the system. Even though :meth:`SetupSystem` is
+    already very fast, this can speed up resetting a simulation. The data must
+    be consistent with the data used in the last :meth:`SetupSystem` call.
+
+    :param all_pos: Provides positions for each *res_indices[i]*.
+    :type all_pos:  :class:`AllAtomPositions`
+    :param res_indices: Residue indices into *all_pos*.
+    :type res_indices:  :class:`list` of :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if data is inconsistent with last
+             :meth:`SetupSystem` call (same number of residues, same AA).
+
+  .. method:: ExtractLoopPositions(loop_pos)
+              ExtractLoopPositions(out_pos, res_indices)
+
+    Extracts loop positions from the current simulation. If the simulation was
+    run (via :meth:`GetSimulation`), we internally have new positions for the
+    residues corresponding to *all_pos[res_indices[i]]* passed in
+    :meth:`SetupSystem`. This function then extracts these positions back into a
+    compatible output storage.
+
+    If *loop_pos* is passed, only the loops are stored. The loop residues are
+    stored contiguously and the loops are stored in the order given by
+    :meth:`GetLoopStartIndices` / :meth:`GetLoopLengths`. The *loop_pos* storage
+    must have at least :meth:`GetNumLoopResidues` residues and must have
+    matching amino acid types with respect to the loop residues passed as
+    *all_pos* of :meth:`SetupSystem`.
+
+    If *out_pos* and *res_indices* are passed, residues must have matching amino
+    acid types for *out_pos[res_indices[i]]* and *all_pos[res_indices[i]]* of
+    :meth:`SetupSystem`. Only loop residues with *i* in the ranges defined by
+    :meth:`GetLoopStartIndices` / :meth:`GetLoopLengths` are touched.
+
+    :param loop_pos: Reduced storage only covering loop positions.
+    :type loop_pos:  :class:`AllAtomPositions`
+    :param out_pos: Storage for loop positions linked to *res_indices*.
+    :type out_pos:  :class:`AllAtomPositions`
+    :param res_indices: Residue indices into *out_pos*.
+    :type res_indices:  :class:`list` of :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if data is inconsistent with last
+             :meth:`SetupSystem` call (big enough and matching AA).
+
+  .. method:: GetSimulation
+
+    :return: Simulation object setup by :meth:`SetupSystem`. Use this to run
+             MM simulations.
+    :rtype:  :class:`ost.mol.mm.Simulation`
+
+  .. method:: GetNumResidues
+
+    :return: Number of residues of current simulation setup.
+    :rtype:  :class:`int`
+
+  .. method:: GetNumLoopResidues
+
+    :return: Number of loop residues (incl. stems) of current simulation setup.
+    :rtype:  :class:`int`
+
+  .. method:: GetLoopStartIndices
+
+    :return: Start indices of loops (see :meth:`SetupSystem`).
+    :rtype:  :class:`list` of :class:`int`
+
+  .. method:: GetLoopLengths
+
+    :return: Lengths of loops (see :meth:`SetupSystem`).
+    :rtype:  :class:`list` of :class:`int`
+
+  .. method:: GetForcefieldAminoAcids
+
+    :return: Forcefield-specific amino acid type for each residue of last
+             :meth:`SetupSystem` call.
+    :rtype:  :class:`list` of :class:`ForcefieldAminoAcid`
+
+  .. method:: GetIndexing
+
+    The atoms of residue *i* are stored from *idx[i]* to *idx[i+1]-1*, where
+    *idx* is the list returned by this function. The atoms themselves are
+    ordered according to the indexing defined by :class:`ForcefieldLookup`.
+
+    :return: Indexing to positions vector used by the simulation object.
+             The last item of the list contains the number of atoms in the
+             system.
+    :rtype:  :class:`list` of :class:`int`
+
+  .. method:: GetCpuPlatformSupport
+
+    :return: True, if we will use OpenMM's "CPU" platform (enabled by default
+             if platform is available). False, if we use "Reference" platform.
+    :rtype:  :class:`bool`
+
+  .. method:: SetCpuPlatformSupport(cpu_platform_support)
+
+    Override "CPU" platform support setting. Useful to force the use of the
+    OpenMM's "Reference" platform for testing (by default we use "CPU" if it is
+    available).
+
+    :param cpu_platform_support: True, if "CPU" platform desired (ignored if
+                                 platform not available). False, if "Reference"
+                                 platform desired.
+    :type cpu_platform_support:  :class:`bool`
+
+
+Forcefield lookup for amino acids
+--------------------------------------------------------------------------------
+
+The :class:`ForcefieldLookup` class and its helpers define a fast way to extract
+FF specific data for amino acids in a protein. We distinguish amino acid types
+(and a few variants thereof) which may all be N- and/or C-terminal.
+
+
+.. class:: ForcefieldLookup
+
+  This class provides all functionality to generate :class:`ost.mol.mm.Simulation` objects. Specifically, we can:
+
+  - get a consistent indexing of each atom of each residue in [*0, N-1*], where
+    *N* = :meth:`GetNumAtoms` (note that only OXT indexing depends on whether a
+    residue is terminal)
+  - extract masses, charges and LJ-parameters for each atom (list of length *N*)
+  - extract connectivities (:class:`ForcefieldConnectivity`), which include all
+    possible bonds, angles, dihedrals, impropers and LJ pairs
+
+  There is functionality to adapt the lookup and store it as needed or you can
+  load a predefined one with :meth:`GetDefault` or :meth:`LoadCHARMM`.
+
+  The atom indexing and :meth:`GetAA` are independent of the loaded file.
+
+
+  .. staticmethod:: GetDefault()
+
+    :return: A default singleton instance (shared throughout the Python process)
+             of this class with all data defined. Using this instance has the
+             advantage that the object is only loaded once!
+    :rtype:  :class:`ForcefieldLookup`
+
+  .. staticmethod:: SetDefault(new_default)
+
+    Sets default singleton instance for all future :meth:`GetDefault` calls.
+
+    :param new_default: Lookup object to use as the new default.
+    :type new_default:  :class:`ForcefieldLookup`
+
+  .. staticmethod:: LoadCHARMM()
+
+    :returns: Predefined lookup object extracted from a CHARMM forcefield
+              (loaded from disk)
+    :rtype:   :class:`ForcefieldLookup`
+
+  .. staticmethod:: Load(filename)
+                    LoadPortable(filename)
+
+    Loads raw binary file generated with :meth:`Save` (optimized for fast
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
+
+    :param filename: Path to the file from which to load.
+    :type filename:  :class:`str`
+
+    :returns: The loaded lookup object
+    :rtype:   :class:`ForcefieldLookup`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
+
+  .. method:: Save(filename)
+              SavePortable(filename)
+
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
+
+    :param filename: Path to the file where it will be saved.
+    :type filename:  :class:`str`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
+
+
+  .. method:: GetAA(ff_aa)
+
+    :return: Amino acid type for given *ff_aa*
+    :rtype:  :class:`ost.conop.AminoAcid`
+
+    :param ff_aa: Forcefield-specific amino acid type
+    :type ff_aa:  :class:`ForcefieldAminoAcid`
+
+  .. method:: GetNumAtoms(ff_aa, is_nter, is_cter)
+
+    :return: Number of atoms for given input.
+    :rtype:  :class:`int`
+
+    :param ff_aa: Forcefield-specific amino acid type
+    :type ff_aa:  :class:`ForcefieldAminoAcid`
+    :param is_nter: True if N-terminal variant desired
+    :type is_nter:  :class:`bool`
+    :param is_cter: True if C-terminal variant desired
+    :type is_cter:  :class:`bool`
+
+  .. method:: GetHeavyIndex(ff_aa, atom_idx)
+              GetHeavyIndex(ff_aa, atom_name)
+
+    :return: Internal index for given heavy atom in [0, :meth:`GetNumAtoms`]
+    :rtype:  :class:`int`
+
+    :param ff_aa: Forcefield-specific amino acid type
+    :type ff_aa:  :class:`ForcefieldAminoAcid`
+    :param atom_idx: Atom index as returned by :meth:`AminoAcidLookup.GetIndex`
+    :type atom_idx:  :class:`int`
+    :param atom_name: Atom name
+    :type atom_name:  :class:`str`
+
+  .. method:: GetHydrogenIndex(ff_aa, atom_idx)
+              GetHydrogenIndex(ff_aa, atom_name)
+
+    :return: Internal index for given hydrogen atom in [0, :meth:`GetNumAtoms`]
+    :rtype:  :class:`int`
+
+    :param ff_aa: Forcefield-specific amino acid type
+    :type ff_aa:  :class:`ForcefieldAminoAcid`
+    :param atom_idx: Atom index as returned by
+                     :meth:`AminoAcidLookup.GetHydrogenIndex`
+    :type atom_idx:  :class:`int`
+    :param atom_name: Atom name
+    :type atom_name:  :class:`str`
+
+  .. method:: GetOXTIndex(ff_aa, is_nter)
+
+    :return: Internal index of OXT atom for C-terminal residue
+    :rtype:  :class:`int`
+
+    :param ff_aa: Forcefield-specific amino acid type
+    :type ff_aa:  :class:`ForcefieldAminoAcid`
+    :param is_nter: True if N-terminal variant desired
+    :type is_nter:  :class:`bool`
+
+
+  .. method:: GetFudgeLJ()
+
+    :return: Dampening factor for LJ 1,4 interactions (see
+             :meth:`ost.mol.mm.Topology.SetFudgeLJ`)
+    :rtype:  :class:`float`
+
+  .. method:: GetFudgeQQ()
+
+    :return: Dampening factor for electrostatic 1,4 interactions (see
+             :meth:`ost.mol.mm.Topology.SetFudgeQQ`)
+    :rtype:  :class:`float`
+
+
+  .. method:: GetMasses(ff_aa, is_nter, is_cter)
+
+    :return: Mass for each atom (see :meth:`ost.mol.mm.Topology.SetMasses`)
+    :rtype:  :class:`list` of :class:`float` (length = :meth:`GetNumAtoms`)
+
+    :param ff_aa: Forcefield-specific amino acid type
+    :type ff_aa:  :class:`ForcefieldAminoAcid`
+    :param is_nter: True if N-terminal variant desired
+    :type is_nter:  :class:`bool`
+    :param is_cter: True if C-terminal variant desired
+    :type is_cter:  :class:`bool`
+
+  .. method:: GetCharges(ff_aa, is_nter, is_cter)
+
+    :return: Charge for each atom (see :meth:`ost.mol.mm.Topology.SetCharges`)
+    :rtype:  :class:`list` of :class:`float` (length = :meth:`GetNumAtoms`)
+
+    :param ff_aa: Forcefield-specific amino acid type
+    :type ff_aa:  :class:`ForcefieldAminoAcid`
+    :param is_nter: True if N-terminal variant desired
+    :type is_nter:  :class:`bool`
+    :param is_cter: True if C-terminal variant desired
+    :type is_cter:  :class:`bool`
+
+  .. method:: GetSigmas(ff_aa, is_nter, is_cter)
+
+    :return: Sigma in nm for each atom
+             (see :meth:`ost.mol.mm.Topology.SetSigmas`)
+    :rtype:  :class:`list` of :class:`float` (length = :meth:`GetNumAtoms`)
+
+    :param ff_aa: Forcefield-specific amino acid type
+    :type ff_aa:  :class:`ForcefieldAminoAcid`
+    :param is_nter: True if N-terminal variant desired
+    :type is_nter:  :class:`bool`
+    :param is_cter: True if C-terminal variant desired
+    :type is_cter:  :class:`bool`
+
+  .. method:: GetEpsilons(ff_aa, is_nter, is_cter)
+
+    :return: Epsilon in kJ/mol for each atom
+             (see :meth:`ost.mol.mm.Topology.SetEpsilons`)
+    :rtype:  :class:`list` of :class:`float` (length = :meth:`GetNumAtoms`)
+
+    :param ff_aa: Forcefield-specific amino acid type
+    :type ff_aa:  :class:`ForcefieldAminoAcid`
+    :param is_nter: True if N-terminal variant desired
+    :type is_nter:  :class:`bool`
+    :param is_cter: True if C-terminal variant desired
+    :type is_cter:  :class:`bool`
+
+  .. method:: GetInternalConnectivity(ff_aa, is_nter, is_cter)
+
+    :return: Internal connectivity of a residue
+    :rtype:  :class:`ForcefieldConnectivity`
+
+    :param ff_aa: Forcefield-specific amino acid type
+    :type ff_aa:  :class:`ForcefieldAminoAcid`
+    :param is_nter: True if N-terminal variant desired
+    :type is_nter:  :class:`bool`
+    :param is_cter: True if C-terminal variant desired
+    :type is_cter:  :class:`bool`
+
+  .. method:: GetPeptideBoundConnectivity(ff_aa_one, ff_aa_two, is_nter,\
+                                          is_cter)
+
+    :return: All connectivity which include peptide bond between two residues
+             (additional to :meth:`GetInternalConnectivity`)
+    :rtype:  :class:`ForcefieldConnectivity`
+
+    :param ff_aa_one: Forcefield-specific amino acid type of first residue
+    :type ff_aa_one:  :class:`ForcefieldAminoAcid`
+    :param ff_aa_two: Forcefield-specific amino acid type of second residue
+    :type ff_aa_two:  :class:`ForcefieldAminoAcid`
+    :param is_nter: True if first residue is N-terminal
+    :type is_nter:  :class:`bool`
+    :param is_cter: True if second residue is C-terminal
+    :type is_cter:  :class:`bool`
+
+  .. method:: GetDisulfidConnectivity()
+
+    :return: All connectivity which include disulfid bridge between two cysteins
+             (additional to :meth:`GetInternalConnectivity`)
+    :rtype:  :class:`ForcefieldConnectivity`
+
+
+  .. method:: SetFudgeLJ(fudge)
+
+    Set value for future :meth:`GetFudgeLJ` calls to *fudge*.
+
+  .. method:: SetFudgeQQ(fudge)
+
+    Set value for future :meth:`GetFudgeQQ` calls to *fudge*.
+
+  .. method:: SetMasses(ff_aa, is_nter, is_cter, masses)
+
+    Set value for future :meth:`GetMasses` calls to *masses*.
+
+  .. method:: SetCharges(ff_aa, is_nter, is_cter, charges)
+
+    Set value for future :meth:`GetCharges` calls to *charges*.
+
+  .. method:: SetSigmas(ff_aa, is_nter, is_cter, sigmas)
+
+    Set value for future :meth:`GetSigmas` calls to *sigmas*.
+
+  .. method:: SetEpsilons(ff_aa, is_nter, is_cter, epsilons)
+
+    Set value for future :meth:`GetEpsilons` calls to *epsilons*.
+
+  .. method:: SetInternalConnectivity(ff_aa, is_nter, is_cter, connectivity)
+
+    Set value for future :meth:`GetInternalConnectivity` calls to
+    *connectivity*.
+
+  .. method:: SetPeptideBoundConnectivity(ff_aa_one, ff_aa_two, is_nter,\
+                                          is_cter, connectivity)
+
+    Set value for future :meth:`GetPeptideBoundConnectivity` calls to
+    *connectivity*.
+
+  .. method:: SetDisulfidConnectivity(connectivity)
+
+    Set value for future :meth:`GetDisulfidConnectivity` calls to
+    *connectivity*.
+
+
+.. class:: ForcefieldAminoAcid
+
+  Enumerates the amino acid types for forcefields. The first 20 values
+  correspond to the 20 values of :class:`ost.conop.AminoAcid`. Additionally,
+  there are values for disulfid bridges (*FF_CYS2*), d-protonated histidine
+  (*FF_HISD*, default for *ost.conop.HIS* is *FF_HISE*) and *FF_XXX* for unknown
+  types. The full list of values is:
+
+    *FF_ALA*, *FF_ARG*, *FF_ASN*, *FF_ASP*, *FF_GLN*, *FF_GLU*, *FF_LYS*,
+    *FF_SER*, *FF_CYS*, *FF_MET*, *FF_TRP*, *FF_TYR*, *FF_THR*, *FF_VAL*,
+    *FF_ILE*, *FF_LEU*, *FF_GLY*, *FF_PRO* *FF_HISE*, *FF_PHE*, *FF_CYS2*,
+    *FF_HISD*, *FF_XXX*
+
+
+.. class:: ForcefieldConnectivity
+  
+  Contains lists of bonds, angles, dihedrals, impropers and LJ pairs (exclusions
+  are the combination of all bonds and 1,3 pairs of angles and are not stored
+  separately). Each type of connectivity has it's own class (see below) storing
+  indices and parameters to be used for methods of :class:`ost.mol.mm.Topology`.
+  The indexing of atoms for internal connectivities is in [*0, N-1*], where *N*
+  = :meth:`ForcefieldLookup.GetNumAtoms`. For connectivities of pairs of
+  residues, atoms of the first residue are in [*0, N1-1*] and atoms of the
+  second one are in [*N1, N1+N2-1*], where *N1* and *N2* are the number of atoms
+  of the two residues. For disulfid bridges, *N1* = *N2* = *GetNumAtoms(FF_CYS2,
+  False, False)*.
+
+  .. attribute:: harmonic_bonds
+    
+    List of harmonic bonds.
+    
+    :type: :class:`list` of :class:`ForcefieldBondInfo`
+
+  .. attribute:: harmonic_angles
+    
+    List of harmonic angles.
+    
+    :type: :class:`list` of :class:`ForcefieldHarmonicAngleInfo`
+
+  .. attribute:: urey_bradley_angles
+    
+    List of Urey-Bradley angles.
+    
+    :type: :class:`list` of :class:`ForcefieldUreyBradleyAngleInfo`
+
+  .. attribute:: periodic_dihedrals
+    
+    List of periodic dihedrals.
+    
+    :type: :class:`list` of :class:`ForcefieldPeriodicDihedralInfo`
+
+  .. attribute:: periodic_impropers
+    
+    List of periodic impropers.
+    
+    :type: :class:`list` of :class:`ForcefieldPeriodicDihedralInfo`
+
+  .. attribute:: harmonic_impropers
+    
+    List of harmonic impropers.
+    
+    :type: :class:`list` of :class:`ForcefieldHarmonicImproperInfo`
+
+  .. attribute:: lj_pairs
+    
+    List of LJ pairs.
+    
+    :type: :class:`list` of :class:`ForcefieldLJPairInfo`
+
+
+.. class:: ForcefieldBondInfo
+
+  Define harmonic bond (see :meth:`ost.mol.mm.Topology.AddHarmonicBond`)
+
+  .. attribute:: index_one
+
+    Index of particle 1
+
+    :type: :class:`int`
+
+  .. attribute:: index_two
+
+    Index of particle 2
+
+    :type: :class:`int`
+
+  .. attribute:: bond_length
+
+    Bond length in nm
+
+    :type: :class:`float`
+
+  .. attribute:: force_constant
+
+    Force constant in kJ/mol/nm^2
+
+    :type: :class:`float`
+
+
+.. class:: ForcefieldHarmonicAngleInfo
+
+  Define harmonic angle (see :meth:`ost.mol.mm.Topology.AddHarmonicAngle`)
+
+  .. attribute:: index_one
+
+    Index of particle 1
+
+    :type: :class:`int`
+
+  .. attribute:: index_two
+
+    Index of particle 2
+
+    :type: :class:`int`
+
+  .. attribute:: index_three
+
+    Index of particle 3
+
+    :type: :class:`int`
+
+  .. attribute:: angle
+
+    Angle in radians
+
+    :type: :class:`float`
+
+  .. attribute:: force_constant
+
+    Force constant in kJ/mol/radian^2 
+
+    :type: :class:`float`
+
+
+.. class:: ForcefieldUreyBradleyAngleInfo
+
+  Define Urey-Bradley angle
+  (see :meth:`ost.mol.mm.Topology.AddUreyBradleyAngle`)
+
+  .. attribute:: index_one
+
+    Index of particle 1
+
+    :type: :class:`int`
+
+  .. attribute:: index_two
+
+    Index of particle 2
+
+    :type: :class:`int`
+
+  .. attribute:: index_three
+
+    Index of particle 3
+
+    :type: :class:`int`
+
+  .. attribute:: angle
+
+    Angle in radians
+
+    :type: :class:`float`
+
+  .. attribute:: angle_force_constant
+
+    Angle force constant kJ/mol/radian^2 
+
+    :type: :class:`float`
+
+  .. attribute:: bond_length
+
+    Bond length in nm
+
+    :type: :class:`float`
+
+  .. attribute:: bond_force_constant
+
+    Bond force constant kJ/mol/nm^2 
+
+    :type: :class:`float`
+    
+
+.. class:: ForcefieldPeriodicDihedralInfo
+  
+  Define periodic dihedral or improper (see
+  :meth:`ost.mol.mm.Topology.AddPeriodicDihedral` and
+  :meth:`ost.mol.mm.Topology.AddPeriodicImproper`)
+
+  .. attribute:: index_one
+
+    Index of particle 1
+
+    :type: :class:`int`
+
+  .. attribute:: index_two
+
+    Index of particle 2
+
+    :type: :class:`int`
+
+  .. attribute:: index_three
+
+    Index of particle 3
+
+    :type: :class:`int`
+
+  .. attribute:: index_four
+
+    Index of particle 4
+
+    :type: :class:`int`
+
+  .. attribute:: multiplicity
+
+    Multiplicity
+
+    :type: :class:`int`
+
+  .. attribute:: phase
+
+    Phase in radians
+
+    :type: :class:`float`
+
+  .. attribute:: force_constant
+
+    Force constant in kJ/mol/radian^2 
+
+    :type: :class:`float`
+
+
+.. class:: ForcefieldHarmonicImproperInfo
+
+  Define harmonic improper (see :meth:`ost.mol.mm.Topology.AddHarmonicImproper`)
+  
+  .. attribute:: index_one
+
+    Index of particle 1
+
+    :type: :class:`int`
+
+  .. attribute:: index_two
+
+    Index of particle 2
+
+    :type: :class:`int`
+
+  .. attribute:: index_three
+
+    Index of particle 3
+
+    :type: :class:`int`
+
+  .. attribute:: index_four
+
+    Index of particle 4
+
+    :type: :class:`int`
+
+  .. attribute:: angle
+
+    Angle in radians
+
+    :type: :class:`float`
+
+  .. attribute:: force_constant
+
+    Force constant kJ/mol/radian^2 
+
+    :type: :class:`float`
+
+
+.. class:: ForcefieldLJPairInfo
+
+  Define LJ pair (see :meth:`ost.mol.mm.Topology.AddLJPair`)
+
+  .. attribute:: index_one
+
+    Index of particle 1
+
+    :type: :class:`int`
+
+  .. attribute:: index_two
+
+    Index of particle 2
+
+    :type: :class:`int`
+
+  .. attribute:: sigma
+
+    Sigma in nm
+
+    :type: :class:`float`
+
+  .. attribute:: epsilon
+
+    Epsilon in kJ/mol
+
+    :type: :class:`float`
+
diff --git a/doc/html/_sources/loop/structure_db.txt b/doc/html/_sources/loop/structure_db.txt
index ede886f7..631811ed 100644
--- a/doc/html/_sources/loop/structure_db.txt
+++ b/doc/html/_sources/loop/structure_db.txt
@@ -1,4 +1,4 @@
-Structural Database
+Structural Data
 ================================================================================
 
 .. currentmodule:: promod3.loop
@@ -6,15 +6,14 @@ Structural Database
 The structural database serves as a container for structural backbone
 and profile data. It can be filled with chains of pdb structures with their
 corresponding profiles as they are produced by the HHSuite tools [soding2005]_. 
-Some of the extracted features expect the secondary structure, as well as the solvent
-accessibility to be assigned using dssp [kabsch1983]_.
+Structural and profile data get complemented by with additional information.
 Following features get stored on a per residue basis:
 
 * The amino acid one letter code
 * The coordinates of the backbone atoms (N,CA,C,O)
 * The phi/psi dihedral angles
 * The secondary structure state as defined by dssp
-* The solvent accessibility in square Angstrom as calculated by dssp
+* The solvent accessibility in square Angstrom 
 * The residue depth defined as the average distance from all atoms of a
   residue to the closest surface vertex as calculated by msms [sanner1996]_.
   This is a simplified version of the residue depth as discussed in
@@ -76,7 +75,7 @@ Defining Chains and Fragments
     Length of the fragment (:class:`int`)
 
 
-The Database
+The Structure Database
 --------------------------------------------------------------------------------
 
 The following code example demonstrates how to create a structural database
@@ -95,165 +94,133 @@ database, you might want to consider two things:
 
 .. class:: StructureDB()
 
-  .. method:: Load(filename,[load_frequencies=False])
+  .. staticmethod:: Load(filename, load_frequencies=True)
+                    LoadPortable(filename)
 
     Loads raw binary file generated with :meth:`Save` (optimized for fast
-    reading).
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
     
-    :param filename:      path to the file from which to load the database.
+    :param filename: Path to the file from which to load the database.
+    :type filename:  :class:`str`
     :param load_frequencies: If True, the full database including profile
                              information for every position gets loaded.
                              A database without profiles loads faster and 
                              requires less memory. But it's not possible
                              to add new coordinates or call one of the
                              profile dependent functions.
+    :type load_frequencies:  :class:`bool`
 
-    :type filename:       :class:`str`
-    :type load_frequencies: :class:`bool`
-
-    :returns:             The loaded data base
-    :rtype:               :class:`StructureDB`
+    :returns: The loaded data base
+    :rtype:   :class:`StructureDB`
 
-    :raises:  :exc:`~exceptions.RuntimeError` if:
-
-              - file cannot be opened.
-              - version number stored in file is not supported.
-              - file assumes different memory-layout than is available on this
-                machine. Use :meth:`LoadPortable` to convert your file.
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
 
   .. method:: Save(filename)
+              SavePortable(filename)
 
-    Saves raw binary representation (optimized for fast reading).This puts many
-    assumptions on the memory-layout of the target-machine and hence it is not
-    portable. A portable version is provided by :meth:`SavePortable`.
-    Preferably portable files are distributed and converted to a raw binary
-    before using them.
-
-    :param filename:      path to the file where the database will be saved
-
-    :type filename:       :class:`str`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if:
-
-              - file cannot be opened.
-              - db has been loaded with load_frequencies=False. This enforces
-                only complete databases to be saved down.
-
-  .. method:: LoadPortable(filename)
-
-    Loads portable file generated with :meth:`SavePortable` (slow but less
-    machine-dependent).
-    
-    :param filename:      path to the file from which to load the database.
-
-    :type filename:       :class:`str`
-    :type load_frequencies: :class:`bool`
-
-    :returns:             The loaded data base
-    :rtype:               :class:`StructureDB`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if:
-
-              - file cannot be opened.
-              - version number stored in file is not supported.
-              - machine-dependent fundamental types are smaller than required.
-
-  .. method:: SavePortable(filename)
-
-    Saves portable binary representation (slow but less machine-dependent).
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
 
-    :param filename:      path to the file where the database will be saved
-
-    :type filename:       :class:`str`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if:
+    :param filename: Path to the file where the database will be saved
+    :type filename:  :class:`str`
 
-              - file cannot be opened.
-              - db has been loaded with load_frequencies=False. This enforces
-                only complete databases to be saved down.
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              db has been loaded with load_frequencies=False (enforces only
+              complete databases to be saved down)
 
-  .. method:: AddCoordinates(pdb_id, chain_name, chain, surf, prof)
+  .. method:: AddCoordinates(pdb_id, chain_name, chain, surf, prof, \
+                             solvent_accessibility_string="solvent_accessibility")
 
     This method takes a structural chain and searches the longest stretch of
     connected residues containing all necessary backbone atoms. This stretch
     gets then added to the database. Due to technical reasons, The maximal
     extent along one of the base axis cannot exceed 650 A.
+    Following features are expected to be set on a per residue level in *chain*:
+    The secondary structure (e.g. call :meth:`ost.mol.alg.AssignSecStruct` on the
+    full :class:`ost.mol.EntityView` the *chain* belongs to) and
+    the solvent accessibility assigned using a float property with name 
+    *solvent_accessibility_string* as name on a per residue level (e.g. call 
+    :meth:`ost.mol.alg.Accessibility` on the full :class:`ost.mol.EntityView`
+    the chain belongs to and take care to pass the appropriate
+    *solvent_accessibility_string*).
 
     :param pdb_id:      4-letter code of the structure the chain belongs to
     :param chain_name:  Name of the chain consisting of one letter
     :param chain:       The actual chain 
-    :param surf:        A surface describint the solvent accessible surface
-    :param prof:        Profile information for this structure.
+    :param surf:        A surface describing the solvent accessible surface
+                        (we advise you to provide a surface estimated with the
+                        full :class:`ost.mol.EntityView` the *chain* belongs to)
+    :param prof:        Profile information for this *chain*.
+    :param solvent_accessibility_string: Name of float property where the 
+                                         solvent accessibilities are stored
+                                         on a per residue basis in *chain*
 
     :type pdb_id:       :class:`str`
     :type chain_name:   :class:`str`
     :type chain:        :class:`ost.mol.ChainView`
     :type surf:         :class:`ost.mol.SurfaceHandle`
     :type prof:         :class:`ost.seq.ProfileHandle`
+    :type solvent_accessibility_string: :class:`str`
 
-    :returns:           DB Index of added chain.
+    :returns: DB index of added chain.
+    :rtype:   :class:`int`
 
     :raises:  :exc:`~exceptions.RuntimeError` if size of chain is too large,
               when db has been loaded with load_frequencies=False or when the
-              ATOMSEQ form the **chain** can't be aligned with the SEQRES from
-              the **prof**.
+              ATOMSEQ form the *chain* can't be aligned with the SEQRES from
+              the *prof*.
 
   .. method:: GetCoordIndex(pdb_id, chain_name)
 
+    :returns: The StructureDB index (in [0, :meth:`GetNumCoords`-1]) of the
+              chain of interest, -1 if it cannot be found.
+    :rtype:   :class:`int`
+
     :param pdb_id:      4-letter code of the structure the chain belongs to
     :param chain_name:  Name of the chain consisting of one letter
 
-    :type pdb_id:       :class:`str`      
-    :type chain_name:   :class:`str` 
-
-    :returns:           The StructureDB index of the chain of interest, -1 if
-                        if can't be found.
+    :type pdb_id:       :class:`str`
+    :type chain_name:   :class:`str`
 
   .. method:: GetCoordInfo(idx)
 
-    :param idx:         The StructureDB index 
-
-    :returns:           The :class:`CoordInfo` object describing the chain with
-                        index **idx**. 
+    :returns: Object describing the chain with index *idx*.
+    :rtype:   :class:`CoordInfo`
 
+    :param idx: The StructureDB index (in [0, :meth:`GetNumCoords`-1])
+    :type idx:  :class:`int`
 
-  .. method:: GetBackboneList(fragment)
 
-    :param fragment:    Description of the fragment from which a 
-                        :class:`BackboneList` should be built.
-
-    :type fragment:     :class:`FragmentInfo`
+  .. method:: GetBackboneList(fragment, sequence)
+              GetBackboneList(n_stem, c_stem, fragment, sequence)
 
-    :returns:           :class:`BackboneList`
+    :returns: Backbone list with positions extracted from *fragment*.
+    :rtype:   :class:`BackboneList`
 
-    :raises:  :exc:`~exceptions.RuntimeError` if fragment is invalid. This is
-              the case when the fragment does not fully fit into one of the
-              chains in the database.
+    :param fragment: Fragment definition from which to extract positions.
+    :type fragment:  :class:`FragmentInfo`
+    :param sequence: Sequence to set for the returned backbone list.
+    :type sequence:  :class:`str`
+    :param n_stem: Positions on which the backbone list's N-terminus should be
+                   superposed onto.
+    :type n_stem:  :class:`ost.mol.ResidueHandle`
+    :param c_stem: Positions on which the backbone list's C-terminus should be
+                   superposed onto.
+    :type c_stem:  :class:`ost.mol.ResidueHandle`
 
-
-  .. method:: GetBackboneList(n_stem, c_stem, fragment)
-
-    :param n_stem:      Positions on which the bb_list n-terminus should be 
-                        superposed onto.
-    :param c_stem:      Positions on which th ebb_list c_terminus should be
-                        superposed onto.
-    :param fragment:    Description of the fragment from which a 
-                        :class:`BackboneList` should be built.
-
-    :type n_stem:       :class:`ost.mol.ResidueHandle`
-    :type c_stem:       :class:`ost.mol.ResidueHandle`
-    :type fragment:     :class:`FragmentInfo`
-
-    :returns:           :class:`BackboneList`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if fragment is invalid. This is
-              the case when the fragment does not fully fit into one of the
-              chains in the database.
+    :raises:  :exc:`~exceptions.RuntimeError` if fragment is invalid (happens
+              if the fragment does not fully fit into one of the chains in the
+              database) or if *sequence* contains a one letter code which is not
+              one of the 20 default amino acids.
 
 
   .. method:: GetNumCoords()
 
-    :returns:           Number of chains, that have been added to the database.
+    :returns: Number of chains that have been added to the database.
+    :rtype:   :class:`int`
 
 
   .. method:: PrintStatistics()
@@ -263,11 +230,12 @@ database, you might want to consider two things:
 
   .. method:: GetSequence(fragment)
 
+    :returns: The sequence of *fragment*
+    :rtype:   :class:`str`
+
     :param fragment:    Fragment definition from which to extract the sequence.
     :type fragment:     :class:`FragmentInfo`
 
-    :returns:           The sequence of **fragment**
-
     :raises:  :exc:`~exceptions.RuntimeError` if fragment is invalid. This is
               the case when the fragment does not fully fit into one of the
               chains in the database.
@@ -275,10 +243,11 @@ database, you might want to consider two things:
 
   .. method:: GetDSSPStates(fragment)
 
-    :param fragment:    Fragment definition from which to extract the states.
-    :type fragment:     :class:`FragmentInfo`
+    :returns: The dssp states of *fragment*
+    :rtype:   :class:`str`
 
-    :returns:           The dssp states of **fragment**
+    :param fragment: Fragment definition from which to extract the states.
+    :type fragment:  :class:`FragmentInfo`
 
     :raises:  :exc:`~exceptions.RuntimeError` if fragment is invalid. This is
               the case when the fragment does not fully fit into one of the
@@ -287,11 +256,11 @@ database, you might want to consider two things:
 
   .. method:: GetDihedralAngles(fragment)
 
-    :param fragment:    Fragment definition from which to extract the dihedrals.
-    :type fragment:     :class:`FragmentInfo`
+    :returns: The phi and psi dihedral angles of every residue of *fragment*
+    :rtype:   :class:`list` of pairs (:class:`tuple`)
 
-    :returns:           A list of pairs containing the  phi and psi dihedral angles of every
-                        residue of the **fragment**.
+    :param fragment: Fragment definition from which to extract the dihedrals.
+    :type fragment:  :class:`FragmentInfo`
 
     :raises:  :exc:`~exceptions.RuntimeError` if fragment is invalid. This is
               the case when the fragment does not fully fit into one of the
@@ -299,13 +268,12 @@ database, you might want to consider two things:
 
   .. method:: GetResidueDepths(fragment)
 
-    :param fragment:    Fragment definition from which to extract the residue
-                        depths
-
-    :type fragment:     :class:`FragmentInfo`
+    :returns: Residue depth for each residue of *fragment*.
+    :rtype:   :class:`list` of :class:`float`
 
-    :returns:           A :class:`list` of :class:`float` values describing
-                        the per residue depth
+    :param fragment: Fragment definition from which to extract the residue
+                     depths
+    :type fragment:  :class:`FragmentInfo`
 
     :raises:  :exc:`~exceptions.RuntimeError` if fragment is invalid. This is
               the case when the fragment does not fully fit into one of the
@@ -313,14 +281,13 @@ database, you might want to consider two things:
 
   .. method:: GetSolventAccessibilitites(fragment)
 
-    :param fragment:    Fragment definition from which to extract the solvent
-                        accessibilities
-
-    :type fragment:     :class:`FragmentInfo`
+    :returns: Solvent accessibility for each residue of *fragment* in square A
+              as calculated by dssp.
+    :rtype:   :class:`list` of :class:`float`
 
-    :returns:           A :class:`list` of :class:`float` values describing
-                        the per residue solvent accessibilities in square A as
-                        calculated by dssp
+    :param fragment: Fragment definition from which to extract the solvent
+                     accessibilities
+    :type fragment:  :class:`FragmentInfo`
 
     :raises:  :exc:`~exceptions.RuntimeError` if fragment is invalid. This is
               the case when the fragment does not fully fit into one of the
@@ -328,69 +295,81 @@ database, you might want to consider two things:
 
   .. method:: GetSequenceProfile(fragment)
 
+    :returns: The sequence profile for the residues defined by *fragment* with
+              the BLOSUM62 probabilities as NULL model.
+    :rtype:   :class:`ost.seq.ProfileHandle`
+
     :param fragment:    Fragment definition from which to extract the sequence
                         profile
 
     :type fragment:     :class:`FragmentInfo`
 
-    :returns:   The sequence profile for the residues defined by 
-                **fragment**, represented as a :class:`ost.seq.ProfileHandle`
-                with the BLOSUM62 probabilities as NULL model
-
     :raises:  :exc:`~exceptions.RuntimeError` if fragment is invalid. This is
               the case when the fragment does not fully fit into one of the
               chains in the database.
                         
   .. method:: GetStructureProfile(fragment)
 
+    :returns: The structure profile for the residues defined by *fragment* with
+              the BLOSUM62 probabilities as NULL model.
+    :rtype:   :class:`ost.seq.ProfileHandle`
+
     :param fragment:    Fragment definition from which to extract the structure
                         profile
 
     :type fragment:     :class:`FragmentInfo`
 
-    :returns:    The structure profile for the residues defined by 
-                 **fragment**, represented as a :class:`ost.seq.ProfileHandle`
-                 with the BLOSUM62 probabilities as NULL model
-
     :raises:  :exc:`~exceptions.RuntimeError` if fragment is invalid. This is
               the case when the fragment does not fully fit into one of the
               chains in the database.
 
-  .. method:: GenerateStructureProfile(bb_list, residue_depths)
+  .. method:: GenerateStructureProfile(other_db, fragment)
 
-    Takes the **bb_list** with its corresponding **residue_depths** to 
-    calculate a structure profile using the full internal structural data
-    with their corresponding residue depths.
+    Takes the CA positions and residue depths for *fragment* defined from
+    *other_db* to calculate a structure profile using the full internal
+    structural data of this database with their corresponding residue depths.
 
-    :param bb_list:     Structural data from which do extract structural 
-                        profile
+    :param fragment: Fragment definition from *other_db*.
+    :type fragment:  :class:`FragmentInfo`
+    :param other_db: Structural database from which we extract CA positions and
+                     residue depths for *fragment*.
+    :type other_db:  :class:`StructureDB`
 
-    :param residue_depths: Residue depth values for **bb_list** 
+    :returns: The structure profile for the input with the BLOSUM62
+              probabilities as NULL model.
+    :rtype:   :class:`ost.seq.ProfileHandle`
 
-    :type bb_list:      :class:`BackboneList`
-    :type residue_depths: :class:`list` of :class:`float` values 
+    :raises:  :exc:`~exceptions.RuntimeError` if *bb_list* and 
+              *residue_depths* differ in size or when their size is 0
 
-    :returns:           The structure profile for the input, 
-                        represented as a :class:`ost.seq.ProfileHandle`
-                        with the BLOSUM62 probabilities as NULL model
+  .. method:: SetStructureProfile(chain_idx, prof)
 
-    :raises:  :exc:`~exceptions.RuntimeError` if **bb_list** and 
-              **residue_depths** differ in size or when their size is 0
+    Takes the *prof* and sets the corresponding StructureProfile
+    frequencies in entry with *chain_idx*
 
-  .. method:: SetStructureProfile(chain_idx, prof)
+    :param prof:      Source of profile frequencies
+    :param chain_idx: StructureDB index of entry for which to set frequencies
+                      (in [0, :meth:`GetNumCoords`-1])
 
-    Takes the **prof** and sets the corresponding StructureProfile
-    frequencies in entry with **chain_idx**
+    :type prof:       :class:`ost.seq.ProfileHandle`
+    :type chain_idx:  :class:`int`
 
-    :param prof:        Source of profile frequencies
-    :param chain_idx:   idx of entry for which to set the frequencies
+    :raises: :exc:`~exceptions.RuntimeError` if *chain_idx* does not match
+             any entry in the db or when the size of the *prof* does not
+             exactly match the size of entry at *chain_idx*
 
-    :type prof:         :class:`ost.seq.ProfileHandle`
-    :type chain_idx:    :class:`int`
+  .. method:: GetSubDB(indices)
+
+    :return: A new database containing only the structural infos specified by
+             your input. This might be useful if you're testing stuff and want
+             to make sure that you have no close homologue in the database.
+    :rtype:  :class:`StructureDB`
 
-    :raises: :exc:`~exceptions.RuntimeError` if **chain_idx** does not match
-             any entry in the db or when the size of the **prof** does not
-             exactly match the size of entry at **chain_idx**
+    :param indices: StructureDB indices to be added to the sub database (in [0,
+                    :meth:`GetNumCoords`-1])
+    :type indices:  :class:`list`
+
+    :raises: :exc:`~exceptions.RuntimeError` if you provide an invalid index
 
 
 
@@ -416,64 +395,31 @@ This example illustrates how to create a custom FragDB based on a StructureDB:
   :type dist_bin_size:  :class:`float`
   :type angle_bin_size: :class:`int`
 
-  .. method:: Load(filename)
+  .. staticmethod:: Load(filename)
+                    LoadPortable(filename)
 
     Loads raw binary file generated with :meth:`Save` (optimized for fast
-    reading).
-
-    :param filename:      path to the file from which to load the database.
-
-    :type filename:       :class:`str`
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
 
-    :returns:             The loaded database
-    :rtype:               :class:`FragDB`
+    :param filename: Path to the file from which to load the database.
+    :type filename:  :class:`str`
 
-    :raises:  :exc:`~exceptions.RuntimeError` if:
+    :returns: The loaded database
+    :rtype:   :class:`FragDB`
 
-              - file cannot be opened.
-              - version number stored in file is not supported.
-              - file assumes different memory-layout than is available on this
-                machine. Use :meth:`LoadPortable` to convert your file.
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
 
   .. method:: Save(filename)
+              SavePortable(filename)
 
-    Saves raw binary representation (optimized for fast reading).This puts many
-    assumptions on the memory-layout of the target-machine and hence it is not
-    portable. A portable version is provided by :meth:`SavePortable`.
-    Preferably portable files are distributed and converted to a raw binary
-    before using them.
-
-    :param filename:      path to the file where the database will be saved
-
-    :type filename:       :class:`str`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
-
-  .. method:: LoadPortable(filename)
-
-    Loads portable file generated with :meth:`SavePortable` (slow but less
-    machine-dependent).
-
-    :param filename:      path to the file from which to load the database.
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
 
-    :type filename:       :class:`str`
-
-    :returns:             The loaded database
-    :rtype:               :class:`FragDB`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if:
-
-              - file cannot be opened.
-              - version number stored in file is not supported.
-              - machine-dependent fundamental types are smaller than required.
-
-  .. method:: SavePortable(filename)
-
-    Saves portable binary representation (slow but less machine-dependent).
-
-    :param filename:      path to the file where the database will be saved
-
-    :type filename:       :class:`str`
+    :param filename: path to the file where the database will be saved
+    :type filename:  :class:`str`
 
     :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
 
@@ -552,23 +498,26 @@ This example illustrates how to create a custom FragDB based on a StructureDB:
     :returns: Maximal fragment length contained in db. This function is quick.
     :rtype:   :class:`int`
 
-  .. method:: SearchDB(n_stem, c_stem,frag_size,[extended_search=False])
+  .. method:: SearchDB(n_stem, c_stem, frag_size, extra_bins=0)
 
-    Search the database for fragments matching the geometry of the **n_stem** and **c_stem** and of the same length as the **frag_size**.
+    Search the database for fragments matching the geometry of the **n_stem**
+    and **c_stem** and of the same length as the **frag_size**.
 
-    :param n_stem:    The N-stem
-    :param c_stem:    The C-stem
-    :param frag_size: The length of the fragment
-    :param extended_search: Whether an extended search should be performed, which will include fragments from bins surrounding the bin describing the  **n_stem** and **c_stem** geometry.
-
-    :type n_stem:              :class:`ost.mol.ResidueHandle` / :class:`Backbone`
-    :type c_stem:              :class:`ost.mol.ResidueHandle` / :class:`Backbone`
-    :type frag_size:           :class:`float`
-    :type extended_search:     :class:`bool`
-
-    :returns: A list of :class:`FragmentInfo` objects. These objects are related to the
-              structural database with which you called the AddFragments function.
+    :param n_stem: The N-stem
+    :type n_stem:  :class:`ost.mol.ResidueHandle`
+    :param c_stem: The C-stem
+    :type c_stem:  :class:`ost.mol.ResidueHandle`
+    :param frag_size: Number of residues of the fragment
+    :type frag_size:  :class:`int`
+    :param extra_bins: Whether to extend the search to include fragments from
+                       *extra_bins* additional bins surrounding the bin given by
+                       the *n_stem* and *c_stem* geometry. If odd, we extend to
+                       the closer bin, otherwise symmetrically.
+    :type extra_bins:  :class:`int`
 
+    :returns: A list of :class:`FragmentInfo` objects. These objects are related
+              to the structural database with which you called the AddFragments
+              function.
 
 
 Finding Fragments based on Sequence Features
@@ -578,8 +527,10 @@ In some cases you might want to use the :class:`StructureDB` to search
 for fragments that possibly represent the structural conformation of interest.
 The :class:`Fragger` searches a :class:`StructureDB` for n fragments, 
 that maximize a certain score and gathers a set of fragments with a guaranteed 
-structural diversity based on an rmsd_threshold. The score can be built using an 
-arbitrary linear combination of following components:
+structural diversity based on an rmsd_threshold. You can use the :class:`Fragger`
+wrapped in a full fletched pipeline implemented in 
+:class:`~promod3.modelling.FraggerHandle` or search for fragments from scratch 
+using an arbitrary linear combination of scores:
 
 * **SeqID**:
   Calculates the fraction of amino acids being identical when comparing
@@ -603,12 +554,12 @@ arbitrary linear combination of following components:
 * **SequenceProfile**:
   Calculates the avg. profile score between the amino acid frequencies of a potential
   fragment from the :class:`StructureDB` and a target profile assuming a gapfree alignment
-  in between them. The scores are calculated as described for HHSearch [soding2005]_.
+  in between them. The scores are calculated as L1 distances between the profile columns.
 
 * **StructureProfile**:
   Calculates the avg. profile score between the amino acid frequencies of a potential
   fragment from the :class:`StructureDB` and a target profile assuming a gapfree alignment
-  in between them. The scores are calculated as described for HHSearch [soding2005]_.
+  in between them. The scores are calculated as L1 distances between the profile columns.
   In this case, the amino acid frequencies extracted from structural alignments are used.
 
 .. literalinclude:: ../../../tests/doc/scripts/loop_fragger.py
@@ -817,8 +768,106 @@ arbitrary linear combination of following components:
 
     Allow read/write access (with [*id*]) to fragger object with given ID.
 
-.. autoclass:: FraggerHandle
-  :members:
+
+The PsipredPrediction class
+--------------------------------------------------------------------------------
+
+.. class:: PsipredPrediction
+
+  A container for the secondary structure prediction by Psipred.
+
+  .. method:: PsipredPrediction()
+    
+    Constructs empty container
+
+  .. method:: PsipredPrediction(prediction, confidence)
+
+    Constructs container with given content
+
+    :param prediction:  Secondary structure prediction as element in ['H','E','C']
+    :param confidence:  Confidence of prediction as element in [0,9]
+
+    :type prediction:   :class:`list`
+    :type confidence:   :class:`list`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if size of **prediction** and
+              **confidence** are inconsistent or if they contain an invalid
+              element
+
+  .. method:: FromHHM(filename)
+
+    Static function to Load a :class:`PsipredPrediction` object from hhm file, 
+    as they are provided by the hhsearch suite
+
+    :param filename:    Name of file
+    :type filename:     :class:`str`
+
+  .. method:: FromHoriz(filename)
+
+    Static function to Load a :class:`PsipredPrediction` object from horiz file, 
+    as they are produced by the psipred executable
+
+    :param filename:    Name of file
+    :type filename:     :class:`str` 
+
+  .. method:: Add(prediction, confidence)
+
+    Adds and appends a single residue psipred prediction at the end
+
+    :param prediction:  Prediction, must be one in ['H','E','C']
+    :param confidence:  Confidence of prediction, must be in [0,9]
+
+    :type prediction:   :class:`str`
+    :type confidence:   :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if input contains invalid elements
+
+  .. method:: Extract(from, to)
+
+    Extracts content and returns a sub-:class:`PsipredPrediction` with range **from**
+    to **to**, not including **to** itself
+
+    :param from:        Idx to start
+    :param to:          Idx to end
+
+    :type from:         :class:`int`
+    :type to:           :class:`int`
+
+    :returns:           :class:`PsipredPrediction` with the specified range
+
+    :raises: :exc:`~exceptions.RuntimeError` if **from** or **to** are invalid
+
+  .. method:: GetPrediction(idx)
+
+    :param idx:         Index to get prediction from
+    :type idx:          :class:`int`
+    :returns:           Psipred prediction at pos **idx**
+    :raises:  :exc:`~exceptions.RuntimeError` if **idx** is invalid
+
+  .. method:: GetConfidence(idx)
+
+    :param idx:         Index to get confidence from
+    :type idx:          :class:`int`
+    :returns:           Psipred confidence at pos **idx**
+    :raises: :exc:`~exceptions.RuntimeError` if **idx** is invalid  
+
+  .. method:: GetPredictions()
+
+    Get all the predictions in the container
+
+    :returns:           :class:`list` containing all the predictions in the container
+
+  .. method:: GetConfidences()
+
+    Get all the confidences in the container
+
+    :returns:           :class:`list` containing all the confidences in the container
+
+  .. method:: __len__()
+
+    :returns:           Number of elements in container
+
+
 
 .. [soding2005] Söding J (2005). Protein homology detection by HMM-HMM comparison. Bioinformatics 21 (7): 951–960.
 .. [sanner1996] Sanner M, Olson AJ, Spehner JC (1996). Reduced Surface: an Efficient Way to Compute Molecular Surfaces. Biopolymers 38 (3): 305-320.
diff --git a/doc/html/_sources/loop/torsion_sampler.txt b/doc/html/_sources/loop/torsion_sampler.txt
index cd475da4..0962c356 100644
--- a/doc/html/_sources/loop/torsion_sampler.txt
+++ b/doc/html/_sources/loop/torsion_sampler.txt
@@ -1,4 +1,4 @@
-Torsion Sampler
+Sampling Dihedral Angles
 ================================================================================
 
 .. currentmodule:: promod3.loop
@@ -32,9 +32,8 @@ amino acids. They are combined by "-". It is either possible to
 use the keyword "all", or write out all allowed amino acids by their
 three letter code and separate them by ",". An example would be: "all-
 VAL,ILE-PRO". There are cases where a tripeptide can match several
-group definitions. The group definitions are stored internally as a
-list. This list is iterated at
-every evaluation of three consecutive amino acids and the first hit is
+group definitions. The list of group definitions is iterated for every
+combination of three consecutive amino acids and the first hit is
 decisive.
 
 
@@ -42,16 +41,17 @@ decisive.
 The Torsion Sampler Class
 --------------------------------------------------------------------------------
 
-.. class:: TorsionSampler(group_definitions, bin_size, seed)
+.. class:: TorsionSampler(group_definitions, bins_per_dimension, seed)
     
   Basic object used to sample the backbone torsion angles phi and psi.
 
   :param group_definitions:  List of group definitions defining amino acid triplets
-  :param bin_size:           Size of bins in distributions (in degrees)
+  :param bins_per_dimension: Number of bins to represent the 360 degrees of each
+                             torsion angle
   :param seed:               Seed for random number generator
 
   :type group_definitions:   :class:`list` of :class:`str`
-  :type bin_size:            :class:`int`
+  :type binsa_per_dimension: :class:`int`
   :type seed:                :class:`int`
 
   :raises:                   :class:`RuntimeException` when there is a
@@ -70,76 +70,45 @@ The Torsion Sampler Class
     
     Recalculates the probability distributions from the histograms.
 
-  .. method:: Load(filename, seed)
+  .. staticmethod:: Load(filename, seed)
+                    LoadPortable(filename, seed)
 
     Loads raw binary file generated with :meth:`Save` (optimized for fast
-    reading).
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
 
-    :param filename:      path to the file from which to load the sampler.
-    :param seed:          seed for random number generator (not saved in file).
+    :param filename: Path to the file from which to load the sampler.
+    :type filename:  :class:`str`
+    :param seed: Seed for random number generator (not saved in file).
+    :type seed:  :class:`int`
 
-    :type filename:       :class:`str`
-    :type seed:           :class:`int`
+    :returns: A torsion sampler
+    :rtype:   :class:`TorsionSampler`
 
-    :returns:             A torsion sampler
-    :rtype:               :class:`TorsionSampler`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if:
-
-              - file cannot be opened.
-              - version number stored in file is not supported.
-              - file assumes different memory-layout than is available on this
-                machine. Use :meth:`LoadPortable` to convert your file.
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
 
   .. method:: Save(filename)
+              SavePortable(filename)
 
-    Saves raw binary representation (optimized for fast reading).This puts many
-    assumptions on the memory-layout of the target-machine and hence it is not
-    portable. A portable version is provided by :meth:`SavePortable`.
-    Preferably portable files are distributed and converted to a raw binary
-    before using them.
-
-    :param filename:      path to the file where the sampler will be saved
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
 
-    :type filename:       :class:`str`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
-
-  .. method:: LoadPortable(filename, seed)
-
-    Loads portable file generated with :meth:`SavePortable` (slow but less
-    machine-dependent).
-
-    :param filename:      path to the file from which to load the sampler.
-    :param seed:          seed for random number generator (not saved in file).
-
-    :type filename:       :class:`str`
-    :type seed:           :class:`int`
-
-    :returns:             A torsion sampler
-    :rtype:               :class:`TorsionSampler`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if:
-
-              - file cannot be opened.
-              - version number stored in file is not supported.
-              - machine-dependent fundamental types are smaller than required.
-
-  .. method:: SavePortable(filename)
-
-    Saves portable binary representation (slow but less machine-dependent).
-
-    :param filename:      path to the file where the sampler will be saved
-
-    :type filename:       :class:`str`
+    :param filename: Path to the file where the sampler will be saved
+    :type filename:  :class:`str`
 
     :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
 
   .. method:: GetHistogramIndex(before,central,after)
 
-    :param before:        Name (3 letter code) of the residue before *central*
-    :param central:       Name (3 letter code) of the residue for the central residue
-    :param after:         Name (3 letter code) of the residue after *central*
+    :param before:        id of the residue before *central*
+    :param central:       id of the residue for the central residue
+    :param after:         id of the residue after *central*
+
+    :type before:         :class:`ost.conop.AminoAcid`
+    :type central:        :class:`ost.conop.AminoAcid`
+    :type after:          :class:`ost.conop.AminoAcid`
 
     :returns:             The index of the histogram corresponding to the triplet of residues specified.
 
@@ -161,12 +130,12 @@ The Torsion Sampler Class
     
     Draws a pair of dihedral angles for the *central* residue from the distribution specific for such a triplet of residues.
 
-    :param before:        Name (3 letter code) of the residue before *central*
-    :param central:       Name (3 letter code) of the residue for which torsion angles will be drawn
-    :param after:         Name (3 letter code) of the residue after *central*
-    :type before:         :class:`str`
-    :type central:        :class:`str`
-    :type after:          :class:`str`
+    :param before:        id of the residue before *central*
+    :param central:       id of the residue for which torsion angles will be drawn
+    :param after:         id of the residue after *central*
+    :type before:         :class:`ost.conop.AminoAcid`
+    :type central:        :class:`ost.conop.AminoAcid`
+    :type after:          :class:`ost.conop.AminoAcid`
 
     :returns:           A pair of phi/psi angles
 
@@ -185,14 +154,14 @@ The Torsion Sampler Class
     
     Draws a *phi* angle for the *central* residue from the conditional distribution P( *phi* | *psi* ) specific for such a triplet of residues.
 
-    :param before:        Name (3 letter code) of the residue before *central*
-    :param central:       Name (3 letter code) of the residue for which the *phi* will be drawn
-    :param after:         Name (3 letter code) of the residue after *central*
+    :param before:        id of the residue before *central*
+    :param central:       id of the residue for which the *phi* will be drawn
+    :param after:         id of the residue after *central*
     :param psi:           *psi* angle
 
-    :type before:         :class:`str`
-    :type central:        :class:`str`
-    :type after:          :class:`str`
+    :type before:         :class:`ost.conop.AminoAcid`
+    :type central:        :class:`ost.conop.AminoAcid`
+    :type after:          :class:`ost.conop.AminoAcid`
     :type psi:            :class:`float`
 
     :returns:           An angle
@@ -213,14 +182,14 @@ The Torsion Sampler Class
     
     Draws a *phi* angle for the *central* residue from the conditional distribution P( *psi* | *phi* ) specific for such a triplet of residues.
 
-    :param before:        Name (3 letter code) of the residue before *central*
-    :param central:       Name (3 letter code) of the residue for which the *psi* angle will be drawn
-    :param after:         Name (3 letter code) of the residue after *central*
+    :param before:        id of the residue before *central*
+    :param central:       id of the residue for which the *psi* angle will be drawn
+    :param after:         id of the residue after *central*
     :param phi:           *phi* angle
 
-    :type before:         :class:`str`
-    :type central:        :class:`str`
-    :type after:          :class:`str`
+    :type before:         :class:`ost.conop.AminoAcid`
+    :type central:        :class:`ost.conop.AminoAcid`
+    :type after:          :class:`ost.conop.AminoAcid`
     :type phi:            :class:`float`
 
     :returns:           An angle
@@ -241,15 +210,15 @@ The Torsion Sampler Class
     
     Returns the probability of a specific pair of phi/psi angles for the central residue from the corresponding distribution.
 
-    :param before:        Name (3 letter code) of the residue before *central*
-    :param central:       Name (3 letter code) of the residue for which the probability is calculated.
-    :param after:         Name (3 letter code) of the residue after *central*
+    :param before:        id of the residue before *central*
+    :param central:       id of the residue for which the probability is calculated.
+    :param after:         id of the residue after *central*
     :param phi:           phi angle
     :param psi:           psi angle
 
-    :type before:         :class:`str`
-    :type central:        :class:`str`
-    :type after:          :class:`str`
+    :type before:         :class:`ost.conop.AminoAcid`
+    :type central:        :class:`ost.conop.AminoAcid`
+    :type after:          :class:`ost.conop.AminoAcid`
     :type phi:            :class:`float`
     :type psi:            :class:`float`
 
@@ -273,15 +242,15 @@ The Torsion Sampler Class
     
     Returns P( *phi* | *psi* ) for the central residue from the corresponding distribution.
 
-    :param before:        Name (3 letter code) of the residue before *central*
-    :param central:       Name (3 letter code) of the residue for which the probability is calculated.
-    :param after:         Name (3 letter code) of the residue after *central*
+    :param before:        id of the residue before *central*
+    :param central:       id of the residue for which the probability is calculated.
+    :param after:         id of the residue after *central*
     :param phi:           phi angle
     :param psi:           psi angle
 
-    :type before:         :class:`str`
-    :type central:        :class:`str`
-    :type after:          :class:`str`
+    :type before:         :class:`ost.conop.AminoAcid`
+    :type central:        :class:`ost.conop.AminoAcid`
+    :type after:          :class:`ost.conop.AminoAcid`
     :type phi:            :class:`float`
     :type psi:            :class:`float`
 
@@ -291,15 +260,15 @@ The Torsion Sampler Class
     
     Returns P( *psi* | *phi* ) for the central residue from the corresponding distribution.
 
-    :param before:        Name (3 letter code) of the residue before *central*
-    :param central:       Name (3 letter code) of the residue for which the probability is calculated.
-    :param after:         Name (3 letter code) of the residue after *central*
+    :param before:        id of the residue before *central*
+    :param central:       id of the residue for which the probability is calculated.
+    :param after:         id of the residue after *central*
     :param psi:           phi angle
     :param phi:           psi angle
 
-    :type before:         :class:`str`
-    :type central:        :class:`str`
-    :type after:          :class:`str`
+    :type before:         :class:`ost.conop.AminoAcid`
+    :type central:        :class:`ost.conop.AminoAcid`
+    :type after:          :class:`ost.conop.AminoAcid`
     :type phi:            :class:`float`
     :type psi:            :class:`float`
 
diff --git a/doc/html/_sources/modelling/algorithms.txt b/doc/html/_sources/modelling/algorithms.txt
new file mode 100644
index 00000000..439fd2d9
--- /dev/null
+++ b/doc/html/_sources/modelling/algorithms.txt
@@ -0,0 +1,152 @@
+Modelling Algorithms
+================================================================================
+
+.. currentmodule:: promod3.modelling
+
+A collection of algorithms that can be useful in modelling
+
+
+Rigid Blocks
+--------------------------------------------------------------------------------
+
+RMSD is a typical measure for similarity of two structures. Given an atom atom
+mapping between two structures, the minimum RMSD and the according superposition
+can efficiently be calculated using an approach based on singular value 
+decomposition. This approach is problematic if there are very dissimilar regions
+or when domain movement events occur. We can therefore implement an iterative
+superposition. The two structures undergo an initial superposition. For every
+iteration we then select a subset of atoms that are within a certain distance
+threshold that serve as input for the next superposition. This iterative
+superpostion typically converges to the largest common subpart but is
+non-deterministic since it depends on the initial superposition.
+The RigidBlocks algorithm is based on only the CA positions and performs this 
+iterative superposition multiple times by using a sliding window to select the 
+initial subset and gathers all unique results. These results can be very 
+similar and only differ by single positions. The algorithm therefore reduces
+the amount of solutions by merging them based on a threshold of similarity.
+If the sum of matching positions within the distance threshold divided by
+the maximum length of the two solutions is above a cluster thresh, the two
+solutions get merged by producing a common solution containing the shared
+positions. As a final result, the algorithm therefore detects common rigid
+subsets of positions.
+
+.. method:: RigidBlocks(bb_list_one, bb_list_two, [window_length = 12, max_iterations=20, distance_thresh=3.0, cluster_thresh=0.9])
+
+  Performs the RigidBlock algorithm on given input
+
+  :param bb_list_one:   First piece structural information from which CA
+                        positions will be extracted
+  :param bb_list_two:   Second piece of structural information from which CA
+                        positions will be extracted
+  :param window_length: Length of sliding window to generate initial subsets
+  :param max_iterations: Maximal numbers of iterations for every single
+                         iterative superposition
+  :param distance_thresh: Maximal distance two CA positions can have to be
+                          considered in the same rigid block and to select
+                          the common subset for the next iteration of the 
+                          iterative superposition
+  :param cluster_thresh: Threshold of similarity to perform the final merging
+                         of the solutions
+
+  :type bb_list_one:    :class:`promod3.loop.BackboneList`
+  :type bb_list_two:    :class:`promod3.loop.BackboneList`
+  :type window_length:  :class:`int`
+  :type max_iterations: :class:`int`
+  :type distance_thresh: :class:`float`
+  :type cluster_thresh: :class:`float`
+
+  :returns:             :class:`tuple` with the first element being a 
+                        :class:`list` of :class:`list` defining the
+                        indices of the common subsets (rigid blocks) relative
+                        to the input :class:`promod3.loop.BackboneList` objects 
+                        and the second element being a :class:`list` of 
+                        :class:`ost.geom.Mat4` defining the transformations to 
+                        superpose the according positions in **bb_list_one** 
+                        onto **bb_list_two**
+
+
+.. method:: RigidBlocks(aln, [seq_one_idx=0, seq_two_idx=1,window_length = 12, max_iterations=20, distance_thresh=3.0, cluster_thresh=0.9])
+
+  Performs the RigidBlock algorithm on given input
+
+  :param aln:           An alignment with attached :class:`ost.mol.EntityView`
+                        objects from which the positions are extracted
+  :param seq_idx_one:   The idx of the first sequence from which the CA 
+                        positions will be extracted
+  :param seq_idx_two:   The idx of the second sequence from which the CA
+                        positions will be extracted
+  :param window_length: Length of sliding window to generate initial subsets
+  :param max_iterations: Maximal numbers of iterations for every single
+                         iterative superposition
+  :param distance_thresh: Maximal distance two CA positions can have to be
+                          considered in the same rigid block and to select
+                          the common subset for the next iteration of the 
+                          iterative superposition
+  :param cluster_thresh: Threshold of similarity to perform the final merging
+                         of the solutions
+
+  :type aln:            :class:`ost.seq.AlignmentHandle`
+  :type seq_idx_one:    :class:`int`
+  :type seq_idx_two:    :class:`int`
+  :type window_length:  :class:`int`
+  :type max_iterations: :class:`int`
+  :type distance_thresh: :class:`float`
+  :type cluster_thresh: :class:`float`
+
+  :returns:             :class:`tuple` with the first element being a 
+                        :class:`list` of :class:`list` defining the
+                        column indices of the common subsets (rigid blocks) 
+                        relative to the input :class:`ost.seq.AlignmentHandle` 
+                        and the second element being a :class:`list` of 
+                        :class:`ost.geom.Mat4` defining the transformations to 
+                        superpose the according positions from the first
+                        sequence onto the second sequence.
+
+.. method:: RigidBlocks(pos_one, pos_two, [window_length = 12, max_iterations=20, distance_thresh=3.0, cluster_thresh=0.9])
+
+  Performs the RigidBlock algorithm on given input
+
+  :param pos_one:       First piece position information 
+  :param pos_two:       Second piece of position information
+  :param window_length: Length of sliding window to generate initial subsets
+  :param max_iterations: Maximal numbers of iterations for every single
+                         iterative superposition
+  :param distance_thresh: Maximal distance two CA positions can have to be
+                          considered in the same rigid block and to select
+                          the common subset for the next iteration of the 
+                          iterative superposition
+  :param cluster_thresh: Threshold of similarity to perform the final merging
+                         of the solutions
+
+  :type pos_one:        :class:`ost.geom.Vec3List`
+  :type pos_two:        :class:`ost.geom.Vec3List`
+  :type window_length:  :class:`int`
+  :type max_iterations: :class:`int`
+  :type distance_thresh: :class:`float`
+  :type cluster_thresh: :class:`float`
+
+  :returns:             :class:`tuple` with the first element being a 
+                        :class:`list` of :class:`list` defining the
+                        indices of the common subsets (rigid blocks) relative
+                        to the input :class:`ost.geom.Vec3List` objects 
+                        and the second element being a :class:`list` of 
+                        :class:`ost.geom.Mat4` defining the transformations to 
+                        superpose the according positions in **pos_one** 
+                        onto **pos_two**
+
+
+De Novo Modelling
+--------------------------------------------------------------------------------
+
+ProMod3 provides algorithms for sampling and fragment detection. 
+Here we provide an object, that facilitates fragment detection and caching,
+as well as a convenient function to combine the functionalities into an
+example pipeline.
+
+.. autoclass:: FraggerHandle
+  :members:
+
+
+.. autofunction:: GenerateDeNovoTrajectories
+
+
diff --git a/doc/html/_sources/modelling/gap_handling.txt b/doc/html/_sources/modelling/gap_handling.txt
new file mode 100644
index 00000000..e939f9f6
--- /dev/null
+++ b/doc/html/_sources/modelling/gap_handling.txt
@@ -0,0 +1,313 @@
+Handling Gaps
+================================================================================
+
+.. currentmodule:: promod3.modelling
+
+This chapter describes the gap classes and functionality attached to them. These
+classes / functions are used within the modelling pipeline.
+
+Gap classes
+--------------------------------------------------------------------------------
+
+.. class:: StructuralGap(before, after, seq)
+
+  Describes a structural gap, i.e. a loop to be modeled. The gap may either be
+  terminal or between two defined regions. The gap stores information of the
+  last residue before and the first residue after the gap as well as the
+  sequence of gap. Gaps at the N- and C-terminals can be defined by passing
+  invalid residue handles to `before` or `after`.
+
+  :param before: Fills :attr:`before`
+  :type before:  :class:`ost.mol.ResidueHandle`
+  :param after: Fills :attr:`after`
+  :type after:  :class:`ost.mol.ResidueHandle`
+  :param seq: Fills :attr:`seq`
+  :type seq:  :class:`str`
+
+  :raises: A :exc:`RuntimeError` if both residues are invalid or when both
+           are valid and:
+    
+           - residues are from different chains (if both valid)
+           - `before` is located after `after`
+           - `seq` has a length which is inconsistent with the gap
+
+  .. method:: GetChainIndex()
+
+    :return: Index of chain, the gap is belonging to
+    :rtype:  :class:`int`
+
+  .. method:: GetChainName()
+
+    :return: Name of chain, the gap is belonging to
+    :rtype:  :class:`str`
+
+  .. method:: GetChain()
+
+    :return: Chain, the gap is belonging to
+    :rtype:  :class:`ost.mol.ChainHandle`
+
+  .. method:: IsNTerminal()
+
+    :return: True, iff gap is N-terminal (i.e. :attr:`before` is invalid 
+             and :attr:`after` is valid)
+    :rtype:  :class:`bool`
+
+  .. method:: IsCTerminal()
+
+    :return: True, iff gap is C-terminal (i.e. :attr:`before` is valid 
+             and :attr:`after` is invalid)
+    :rtype:  :class:`bool`
+
+  .. method:: IsTerminal()
+
+    :return: True, iff gap is N- or C-terminal
+    :rtype:  :class:`bool`
+
+  .. method:: ShiftCTerminal()
+
+    Try to shift gap by one position towards C-terminal. Only possible if new
+    gap is not terminal and it doesn't try to shift the gap past another gap.
+
+    :return: True, iff shift succeeded (gap is only updated in that case)
+    :rtype:  :class:`bool`
+
+  .. method:: ExtendAtNTerm()
+
+    Try to extend gap at N-terminal end of gap.
+    Only possible if the gap is not at N-terminal and it doesn't try to
+    extend the gap past another gap.
+
+    :return: True, iff extend succeeded (gap is only updated in that case)
+    :rtype:  :class:`bool`
+
+  .. method:: ExtendAtCTerm()
+
+    Try to extend gap at C-terminal end of gap.
+    Only possible if the gap is not at C-terminal and it doesn't try to
+    extend the gap past another gap.
+
+    :return: True, iff extend succeeded (gap is only updated in that case)
+    :rtype:  :class:`bool`
+
+  .. method:: GetLength()
+
+    :return: Length of the gap.
+    :rtype:  :class:`int`
+
+  .. method:: Copy()
+
+    :return: Copy of the gap.
+    :rtype:  :class:`StructuralGap`
+
+  .. attribute:: length
+
+    Alias for :meth:`GetLength()` (read-only, :class:`int`)
+
+  .. attribute:: seq
+
+    Sequence string for the gap (read-only, :class:`str`)
+
+  .. attribute:: before
+
+    Residue before the gap (read-only, :class:`ost.mol.ResidueHandle`)
+
+  .. attribute:: after
+
+    Residue after the gap (read-only, :class:`ost.mol.ResidueHandle`)
+
+  .. attribute:: full_seq
+
+    Full sequence, including stem residues (read-only)
+
+.. class:: StructuralGapList
+
+  Represents a :class:`list` of :class:`StructuralGap`. 
+
+
+Gap Extender classes
+--------------------------------------------------------------------------------
+
+The extender classes work on a given :class:`StructuralGap` and provide an
+Extend() function to propose new gaps for loop modelling. The function returns
+False if no new extension possible.
+
+.. class:: GapExtender(gap, seqres)
+
+  The extender cycles through the following steps:
+
+  .. code-block:: none
+
+       -
+      --
+       --
+     ---
+      ---
+       ---
+    ----
+     ----
+      ----
+       ----
+
+  :param gap: The gap which will be extended by :meth:`Extend`.
+  :param seqres: The full sequence of the chain, the gap is associated with.
+  :type gap:  :class:`StructuralGap`
+  :type seqres: :class:`str` / :class:`ost.seq.SequenceHandle`
+
+  :raises: An exception if a terminal gap is used to construct this.
+
+  .. method:: Extend()
+
+    Tries to extend *gap*.
+
+    :return: False, if the *gap* cannot be extended any further. This happens
+             if it reaches a terminal or another insertion gap.
+             Otherwise, the *gap* passed to the constructor is changed.
+             The gaps are extended with ascending length and will always have
+             valid termini.
+    :rtype:  :class:`bool`
+
+.. class:: FullGapExtender(gap, seqres, max_length=-1)
+
+  Cycles as GapExtender, but continues even if another gap was encountered.
+
+  :param gap: The gap which will be extended by :meth:`Extend`.
+  :param seqres: The full sequence of the chain, the gap is associated with.
+  :param max_length: - If -1, all possible non-terminal gaps are returned.
+                     - If >= 0, this restricts the max. gap-length
+                       (w/o termini) producable by :meth:`Extend`.
+  :type gap:  :class:`StructuralGap`
+  :type seqres: :class:`str` / :class:`ost.seq.SequenceHandle`
+  :type max_length: :class:`int`
+
+  :raises: An exception if a terminal gap is used to construct this.
+
+  .. method:: Extend()
+
+    Tries to extend *gap*.
+
+    :return: False, if the *gap* cannot be extended without exceeding *max_length*.
+             Otherwise, the *gap* passed to the constructor is changed.
+             The gaps are extended with ascending length and will always have
+             valid termini.
+    :rtype:  :class:`bool`
+
+.. class:: ScoringGapExtender(gap, extension_penalty, penalties, seqres,\
+                              max_length=-2)
+
+  The extender scores possible gap extensions and returns them in order of
+  their score when :meth:`Extend` is called.
+  The score is penalized according to length and according to certain (well
+  conserved) regions in the structure as defined by *penalties*.
+  score = num_gap_extensions * `extension_penalty` + sum( `penalties` [i] )
+  (i = resnum - 1 of residues in extension)
+
+  :param gap: The gap which will be extended by :meth:`Extend`.
+  :type gap:  :class:`StructuralGap`
+  :param extension_penalty: Penalty for length of gap.
+  :type extension_penalty:  :class:`float`
+  :param penalties: Penalty for each residue added to gap.
+  :type penalties:  :class:`list` of :class:`float`
+  :param seqres: The full sequence of the chain, the gap is associated with.
+  :type seqres: :class:`str` / :class:`ost.seq.SequenceHandle`
+  :param max_length: 
+    - If -2, :class:`GapExtender` is used instead of :class:`FullGapExtender`
+      (i.e. it stops at gaps and termini).
+    - If -1, all possible non-terminal gaps are returned.
+    - If >= 0, this restricts the max. gap-length (w/o termini)
+      producable by :meth:`Extend`.
+  :type max_length: :class:`int`
+
+  :raises: An exception if a terminal gap is used to construct this.
+
+  .. method:: Extend()
+
+    Tries to extend *gap*.
+
+    :return: False, if the gap cannot be extended any further.
+             Otherwise, *gap* is changed and returned in ascending score.
+             The updated *gap* will always have valid termini.
+    :rtype:  :class:`bool`
+
+.. class:: ShiftExtension(n_num, c_num)
+
+  Implements the underlying extension scheme of the :class:`GapExtender`.
+  It is not associated to any structural data, it just spits out the
+  residue numbers according to the extension scheme described above.
+
+  :param n_num:         N residue number to start with
+  :param c_num:         C residue number to start with
+  :type n_num:          :class:`int`
+  :type c_num:          :class:`int`
+
+  .. method:: Extend()
+
+    :returns:           The next residue numbers for n_stem and c_stem
+    :rtype:             :class:`tuple`
+
+    
+Gap Handling Functions
+--------------------------------------------------------------------------------
+
+.. function:: CountEnclosedGaps(mhandle, gap)
+              CountEnclosedInsertions(mhandle, gap)
+
+  Counts all gaps from `mhandle` which are fully enclosed by given `gap`.
+  This is either all gaps or only insertions.
+
+  :param mhandle: Modelling handle on which to apply change.
+  :type mhandle:  :class:`ModellingHandle`
+  :param gap:     Gap defining range in which gaps are to be removed.
+  :type gap:      :class:`StructuralGap`
+
+  :return: Number of gaps.
+  :rtype:  :class:`int`
+
+.. function:: ClearGaps(mhandle, gap)
+
+  Removes all gaps from `mhandle` which are fully enclosed by given `gap`.
+
+  :param mhandle: Modelling handle on which to apply change.
+  :type mhandle:  :class:`ModellingHandle`
+  :param gap:     Gap defining range in which gaps are to be removed.
+  :type gap:      :class:`StructuralGap`
+
+  :return: Index of next gap in mhandle.gaps after removal.
+           Returns -1 if last gap was removed or no gaps in *mhandle*.
+  :rtype:  :class:`int`
+
+  :raises: A :exc:`RuntimeError` if any gap in mhandle.gaps is only partially
+           enclosed by given gap.
+
+.. function:: InsertLoopClearGaps(mhandle, bb_list, gap)
+
+  Insert loop into model, update scoring environments and remove all gaps from
+  *mhandle* which are fully enclosed by given *gap* (see :meth:`InsertLoop` and
+  :meth:`ClearGaps`).
+
+  :param mhandle: Modelling handle on which to apply change.
+  :type mhandle:  :class:`ModellingHandle`
+  :param bb_list: Loop to insert (backbone only).
+  :type bb_list:  :class:`~promod3.loop.BackboneList`
+  :param gap:     Gap defining range of loop to insert (must be consistent!).
+  :type gap:      :class:`StructuralGap`
+
+  :return: Index of next gap in mhandle.gaps after removal.
+           Returns -1 if last gap was removed or no gaps in *mhandle*.
+  :rtype:  :class:`int`
+
+  :raises: A :exc:`RuntimeError` if *bb_list* and *gap* are inconsistent or
+           if any gap in mhandle.gaps is only partially enclosed by *gap*.
+
+.. function:: MergeGaps(mhandle, index)
+
+  Merges two gaps `mhandle.gaps[index]` and `mhandle.gaps[index+1]`.
+  The residues in between the gaps are removed from `mhandle.model` and added
+  to the new `mhandle.gaps[index]`.
+
+  :param mhandle: Modelling handle on which to apply change.
+  :type mhandle:  :class:`ModellingHandle`
+  :param index:   Index of gap to merge with next one.
+  :type index:    :class:`int`
+
+  :raises: A :exc:`RuntimeError` if indices out of range or if trying to merge
+           gaps of different chains or an N-terminal gap with a C-terminal gap.
\ No newline at end of file
diff --git a/doc/html/_sources/modelling/index.txt b/doc/html/_sources/modelling/index.txt
index 5d6a8aee..27ed6101 100644
--- a/doc/html/_sources/modelling/index.txt
+++ b/doc/html/_sources/modelling/index.txt
@@ -6,475 +6,27 @@
 
 .. currentmodule:: promod3.modelling
 
-High-level functionality for protein modelling.
-Commonly, your input is a template structure and an alignment of the template to 
-the desired target sequence.
-A protein homology modelling pipeline then has the following main steps:
-
-- Build a raw model from the template (see :func:`BuildRawModel` function)
-- Perform loop modelling to close (or remove) all gaps (see functions
-  :func:`CloseSmallDeletions`, :func:`RemoveTerminalGaps`,
-  :func:`MergeGapsByDistance`, :func:`FillLoopsByDatabase`,
-  :func:`FillLoopsByMonteCarlo`, :func:`CloseLargeDeletions`)
-- Build sidechains (see :func:`BuildSidechains` function)
-- Minimize energy of final model using molecular mechanics
-  (see :func:`MinimizeModelEnergy` function)
-
-The last steps to go from a raw model to a final model can easily be executed
-with the :func:`BuildFromRawModel` function. In its simplest form, one can run
-a full protein homology modelling pipeline as follows:
+High-level functionality for protein modelling. The goal is to model a given
+target sequence (or list of sequences for oligomers) given some template data.
+Commonly, the template does not cover the full target. This module offers
+capabilities to extract useful template data for the target and to fill the
+remaining structural data to create a full model of the target. In its simplest
+form, you can use a target-template alignment and a template structure to create
+a model fully automatically as follows:
 
 .. literalinclude:: ../../../tests/doc/scripts/modelling_all.py
 
-If you want to run and tweak the internal steps, you can start with the 
-following code which is equivalent to the example above:
-
-.. _modelling_steps_example:
-
-.. literalinclude:: ../../../tests/doc/scripts/modelling_steps.py
-
-In the default pipeline above, we call :func:`FillLoopsByDatabase` multiple
-times. First, we try to close "easy" gaps which require few extensions (we wish
-to limit the damage we do on the template) and for which we have plenty of loop
-candidates. If some gaps cannot be closed like this, we try less restrictive
-options. This approach is helpful if neighboring gaps are close together and the
-one closer to the C-terminus is easier to close. Several variants of the
-pipeline were evaluated on 1752 target-template-pairs and this one worked best.
-
-
-Modelling Pipeline
---------------------------------------------------------------------------------
-
-.. function:: BuildRawModel(aln, include_ligands=False, chain_names=\
-              "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz",\
-              spdbv_style=False)
-
-  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.
+The various steps involved in protein modelling are described here:
 
-  Each alignment handle must contain exactly two sequences and the second
-  sequence is considered the template sequence, which must have a 
-  :class:`~ost.mol.EntityView` attached.
+.. toctree::
+  :maxdepth: 2
 
-  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.
-
-  The function tries to reuse as much as possible from the template. Modified
-  residues are treated as follows:
-
-    - Selenium methionine residues are converted to methionine
-
-    - Side chains which contain all atoms of the parent amino acid, e.g.
-      phosphoserine are copied as a whole with the modifications stripped off.
-
-  Residue numbers are set such that missing residue in gaps are honoured and
-  subsequent loop modelling can insert new residues without having to renumber.
-  **The numbering of residues starts for every chain with the value 1**.
+  pipeline
+  model_checking
+  gap_handling
+  loop_candidates
+  loop_closing
+  monte_carlo
+  sidechain_reconstruction
+  algorithms
   
-  The returned :class:`ModellingHandle` stores the obtained raw model as well
-  as information about insertions and deletions in the gaps list.
-
-  Note, that this class is used in SWISS-MODEL and hence, legacy code must be
-  preserved.
-
-  :param aln: Single alignment handle for raw model with single chain or
-              list of alignment handles for raw model with multiple chains.
-  :type aln:  :class:`~ost.seq.AlignmentHandle` / :class:`~ost.seq.AlignmentList`
-
-  :param include_ligands: True, if we wish to include ligands in the model.
-  :type include_ligands:  :class:`bool`
-
-  :param chain_names: Chains are named by a single chanacter taken from this.
-  :type chain_names:  :class:`str`
-
-  :param spdbv_style: True, if we need a model in the old SPDBV style.
-  :type spdbv_style:  :class:`bool`
-
-  :return: Raw (pseudo) model from the alignment.
-  :rtype:  :class:`ModellingHandle`
-
-  :raises: A :exc:`RuntimeError` when: 
-           
-           - the alignments do not have two sequences
-           - the second sequence does not have an attached structure
-           - the residues of the template structure do not match with the
-             alignment sequence (note that you can set an "offset" (see
-             :meth:`~ost.seq.AlignmentHandle.SetSequenceOffset`) for the
-             template sequence (but not for the target))
-           - the target sequence has a non-zero offset (cannot be honored as
-             the resulting model will always start its residue numbering at 1)
-
-.. autofunction:: BuildFromRawModel
-
-.. autofunction:: BuildSidechains
-
-.. autofunction:: MinimizeModelEnergy
-
-.. autofunction:: CheckFinalModel
-
-
-Closing Gaps
---------------------------------------------------------------------------------
-
-.. autofunction:: SetupBackboneScorer
-
-.. autofunction:: CloseSmallDeletions
-
-.. function:: RemoveTerminalGaps(mhandle)
-
-  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.
-
-  :param mhandle: Modelling handle on which to apply change.
-  :type mhandle:  :class:`ModellingHandle`
-
-  :return: Number of gaps which were removed.
-  :rtype:  :class:`int`
-
-.. autofunction:: MergeGapsByDistance
-
-.. autofunction:: FillLoopsByDatabase
-
-.. autofunction:: FillLoopsByMonteCarlo
-
-.. autofunction:: ModelTermini
-
-.. autofunction:: CloseLargeDeletions
-
-.. function:: CountEnclosedGaps(mhandle, gap)
-              CountEnclosedInsertions(mhandle, gap)
-
-  Counts all gaps from `mhandle` which are fully enclosed by given `gap`.
-  This is either all gaps or only insertions.
-
-  :param mhandle: Modelling handle on which to apply change.
-  :type mhandle:  :class:`ModellingHandle`
-  :param gap:     Gap defining range in which gaps are to be removed.
-  :type gap:      :class:`StructuralGap`
-
-  :return: Number of gaps.
-  :rtype:  :class:`int`
-
-.. function:: ClearGaps(mhandle, gap)
-
-  Removes all gaps from `mhandle` which are fully enclosed by given `gap`.
-
-  :param mhandle: Modelling handle on which to apply change.
-  :type mhandle:  :class:`ModellingHandle`
-  :param gap:     Gap defining range in which gaps are to be removed.
-  :type gap:      :class:`StructuralGap`
-
-  :return: Index of next gap in mhandle.gaps after removal.
-           Returns -1 if last gap was removed or no gaps in *mhandle*.
-  :rtype:  :class:`int`
-
-  :raises: A :exc:`RuntimeError` if any gap in mhandle.gaps is only partially
-           enclosed by given gap.
-
-.. function:: MergeGaps(mhandle, index)
-
-  Merges two gaps `mhandle.gaps[index]` and `mhandle.gaps[index+1]`.
-  The residues in between the gaps are removed from `mhandle.model` and added
-  to the new `mhandle.gaps[index]`.
-
-  :param mhandle: Modelling handle on which to apply change.
-  :type mhandle:  :class:`ModellingHandle`
-  :param index:   Index of gap to merge with next one.
-  :type index:    :class:`int`
-
-  :raises: A :exc:`RuntimeError` if indices out of range or if trying to merge
-           gaps of different chains or an N-terminal gap with a C-terminal gap.
-
-
-Modelling Handle class
---------------------------------------------------------------------------------
-
-.. class:: ModellingHandle
-
-  Handles the result for structure model building and provides high-level methods
-  to turn an initial raw model (see :func:`~promod3.modelling.BuildRawModel`)
-  into a complete protein model by removing any existing gaps.
-
-  .. attribute:: model
-
-    The resulting model.
-
-    :type: :class:`~ost.mol.EntityHandle`
-
-  .. attribute:: gaps
-
-    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.
-
-    :type: :class:`StructuralGapList`
-
-  .. attribute:: seqres
-
-    List of sequences with one :class:`~ost.seq.SequenceHandle` for each chain 
-    of target protein.
-
-    :type: :class:`~ost.seq.SequenceList`
-
-Gap classes
---------------------------------------------------------------------------------
-
-.. class:: StructuralGap(before, after, seq)
-
-  Describes a structural gap, i.e. a loop to be modeled. The gap may either be
-  terminal or between two defined regions. The gap stores information of the
-  last residue before and the first residue after the gap as well as the
-  sequence of gap. Gaps at the N- and C-terminals can be defined by passing
-  invalid residue handles to `before` or `after`.
-
-  :param before: Fills :attr:`before`
-  :type before:  :class:`ost.mol.ResidueHandle`
-  :param after: Fills :attr:`after`
-  :type after:  :class:`ost.mol.ResidueHandle`
-  :param seq: Fills :attr:`seq`
-  :type seq:  :class:`str`
-
-  :raises: A :exc:`RuntimeError` if both residues are invalid or when both
-           are valid and:
-    
-           - residues are from different chains (if both valid)
-           - `before` is located after `after`
-           - `seq` has a length which is inconsistent with the gap
-
-  .. method:: GetChainIndex()
-
-    :return: Index of chain, the gap is belonging to
-    :rtype:  :class:`int`
-
-  .. method:: GetChainName()
-
-    :return: Name of chain, the gap is belonging to
-    :rtype:  :class:`str`
-
-  .. method:: GetChain()
-
-    :return: Chain, the gap is belonging to
-    :rtype:  :class:`ost.mol.ChainHandle`
-
-  .. method:: IsNTerminal()
-
-    :return: True, iff gap is N-terminal (i.e. :attr:`before` is invalid 
-             and :attr:`after` is valid)
-    :rtype:  :class:`bool`
-
-  .. method:: IsCTerminal()
-
-    :return: True, iff gap is C-terminal (i.e. :attr:`before` is valid 
-             and :attr:`after` is invalid)
-    :rtype:  :class:`bool`
-
-  .. method:: IsTerminal()
-
-    :return: True, iff gap is N- or C-terminal
-    :rtype:  :class:`bool`
-
-  .. method:: ShiftCTerminal()
-
-    Try to shift gap by one position towards C-terminal. Only possible if new
-    gap is not terminal and it doesn't try to shift the gap past another gap.
-
-    :return: True, iff shift succeeded (gap is only updated in that case)
-    :rtype:  :class:`bool`
-
-  .. method:: ExtendAtNTerm()
-
-    Try to extend gap at N-terminal end of gap.
-    Only possible if the gap is not at N-terminal and it doesn't try to
-    extend the gap past another gap.
-
-    :return: True, iff extend succeeded (gap is only updated in that case)
-    :rtype:  :class:`bool`
-
-  .. method:: ExtendAtCTerm()
-
-    Try to extend gap at C-terminal end of gap.
-    Only possible if the gap is not at C-terminal and it doesn't try to
-    extend the gap past another gap.
-
-    :return: True, iff extend succeeded (gap is only updated in that case)
-    :rtype:  :class:`bool`
-
-  .. method:: GetLength()
-
-    :return: Length of the gap.
-    :rtype:  :class:`int`
-
-  .. method:: Copy()
-
-    :return: Copy of the gap.
-    :rtype:  :class:`StructuralGap`
-
-  .. attribute:: length
-
-    Alias for :meth:`GetLength()` (read-only, :class:`int`)
-
-  .. attribute:: seq
-
-    Sequence string for the gap (read-only, :class:`str`)
-
-  .. attribute:: before
-
-    Residue before the gap (read-only, :class:`ost.mol.ResidueHandle`)
-
-  .. attribute:: after
-
-    Residue after the gap (read-only, :class:`ost.mol.ResidueHandle`)
-
-  .. attribute:: full_seq
-
-    Full sequence, including stem residues (read-only)
-
-.. class:: StructuralGapList
-
-  Represents a :class:`list` of :class:`StructuralGap`. 
-
-
-Gap Extender classes
---------------------------------------------------------------------------------
-
-The extender classes work on a given :class:`StructuralGap` and provide an
-Extend() function to propose new gaps for loop modelling. The function returns
-False if no new extension possible.
-
-.. class:: GapExtender(gap, seqres)
-
-  The extender cycles through the following steps:
-
-  .. code-block:: none
-
-       -
-      --
-       --
-     ---
-      ---
-       ---
-    ----
-     ----
-      ----
-       ----
-
-  :param gap: The gap which will be extended by :meth:`Extend`.
-  :param seqres: The full sequence of the chain, the gap is associated with.
-  :type gap:  :class:`StructuralGap`
-  :type seqres: :class:`str` / :class:`ost.seq.SequenceHandle`
-
-  :raises: An exception if a terminal gap is used to construct this.
-
-  .. method:: Extend()
-
-    Tries to extend *gap*.
-
-    :return: False, if the *gap* cannot be extended any further. This happens
-             if it reaches a terminal or another insertion gap.
-             Otherwise, the *gap* passed to the constructor is changed.
-             The gaps are extended with ascending length and will always have
-             valid termini.
-    :rtype:  :class:`bool`
-
-.. class:: FullGapExtender(gap, seqres, max_length=-1)
-
-  Cycles as GapExtender, but continues even if another gap was encountered.
-
-  :param gap: The gap which will be extended by :meth:`Extend`.
-  :param seqres: The full sequence of the chain, the gap is associated with.
-  :param max_length: - If -1, all possible non-terminal gaps are returned.
-                     - If >= 0, this restricts the max. gap-length
-                       (w/o termini) producable by :meth:`Extend`.
-  :type gap:  :class:`StructuralGap`
-  :type seqres: :class:`str` / :class:`ost.seq.SequenceHandle`
-  :type max_length: :class:`int`
-
-  :raises: An exception if a terminal gap is used to construct this.
-
-  .. method:: Extend()
-
-    Tries to extend *gap*.
-
-    :return: False, if the *gap* cannot be extended without exceeding *max_length*.
-             Otherwise, the *gap* passed to the constructor is changed.
-             The gaps are extended with ascending length and will always have
-             valid termini.
-    :rtype:  :class:`bool`
-
-.. class:: ScoringGapExtender(gap, extension_penalty, penalties, seqres,\
-                              max_length=-2)
-
-  The extender scores possible gap extensions and returns them in order of
-  their score when :meth:`Extend` is called.
-  The score is penalized according to length and according to certain (well
-  conserved) regions in the structure as defined by *penalties*.
-  score = num_gap_extensions * `extension_penalty` + sum( `penalties` [i] )
-  (i = resnum - 1 of residues in extension)
-
-  :param gap: The gap which will be extended by :meth:`Extend`.
-  :type gap:  :class:`StructuralGap`
-  :param extension_penalty: Penalty for length of gap.
-  :type extension_penalty:  :class:`float`
-  :param penalties: Penalty for each residue added to gap.
-  :type penalties:  :class:`list` of :class:`float`
-  :param seqres: The full sequence of the chain, the gap is associated with.
-  :type seqres: :class:`str` / :class:`ost.seq.SequenceHandle`
-  :param max_length: 
-    - If -2, :class:`GapExtender` is used instead of :class:`FullGapExtender`
-      (i.e. it stops at gaps and termini).
-    - If -1, all possible non-terminal gaps are returned.
-    - If >= 0, this restricts the max. gap-length (w/o termini)
-      producable by :meth:`Extend`.
-  :type max_length: :class:`int`
-
-  :raises: An exception if a terminal gap is used to construct this.
-
-  .. method:: Extend()
-
-    Tries to extend *gap*.
-
-    :return: False, if the gap cannot be extended any further.
-             Otherwise, *gap* is changed and returned in ascending score.
-             The updated *gap* will always have valid termini.
-    :rtype:  :class:`bool`
-
-.. class:: ShiftExtension(n_num, c_num)
-
-  Implements the underlying extension scheme of the :class:`GapExtender`.
-  It is not associated to any structural data, it just spits out the
-  residue numbers according to the extension scheme described above.
-
-  :param n_num:         N residue number to start with
-  :param c_num:         C residue number to start with
-  :type n_num:          :class:`int`
-  :type c_num:          :class:`int`
-
-  .. method:: Extend()
-
-    :returns:           The next residue numbers for n_stem and c_stem
-    :rtype:             :class:`tuple`
-
-
-Detecting ring punches
---------------------------------------------------------------------------------
-
-.. autofunction:: GetRings
-
-.. autofunction:: GetRingPunches
-
-.. autofunction:: HasRingPunches
-
-.. autofunction:: FilterCandidates
-
-.. autofunction:: FilterCandidatesWithSC
-
-..  LocalWords:  currentmodule promod aln AttachView BuildRawModel pdb calpha
-..  LocalWords:  ModellingHandle StructuralGapList modelling Modelling os ost
-..  LocalWords:  tempfile io LoadAlignment LoadPDB fh fn API
-..  LocalWords:  modelling phosphoserine param exc RuntimeError automethod
-..  LocalWords:  CloseSmallDeletions
diff --git a/doc/html/_sources/modelling/loop_candidates.txt b/doc/html/_sources/modelling/loop_candidates.txt
new file mode 100644
index 00000000..dc3b5c96
--- /dev/null
+++ b/doc/html/_sources/modelling/loop_candidates.txt
@@ -0,0 +1,569 @@
+Handling Loop Candidates
+================================================================================
+
+.. currentmodule:: promod3.modelling
+
+For convenience, we provide the :class:`LoopCandidates` class as a container of
+loop candidates with consistent length and sequence among them. It can either be
+filled manually or generated using static filling functions using the
+functionality from the :class:`~promod3.loop.FragDB` or Monte Carlo algorithms.
+Once it contains candidates you can apply closing, scoring or clustering
+algorithms on all loop candidates. Example:
+
+.. literalinclude:: ../../../tests/doc/scripts/modelling_loop_candidates.py
+
+
+The LoopCandidates class
+--------------------------------------------------------------------------------
+
+.. class:: LoopCandidates(seq)
+
+  Initializes an empty container of loop candidates.
+
+  Candidates can be accessed and iterated as if it was a :class:`list` of
+  :class:`~promod3.loop.BackboneList`.
+
+  :param seq: The sequence being enforced for all candidates
+  :type seq:  :class:`str`
+
+  .. staticmethod:: FillFromDatabase(n_stem, c_stem, seq, frag_db, \
+                                     structural_db, extended_search=False)
+    
+    Searches for loop candidates matching the length (number of residues in
+    *seq*) and geometry (of *n_stem* and *c_stem*) of the loop to be modelled in
+    a fragment database.
+
+    This call also adds fragment infos (:meth:`HasFragmentInfos` will be True).
+
+    :param n_stem:         The residue at the N-terminal end of the loop 
+    :param c_stem:         The residue at the C-terminal end of the loop 
+    :param seq:            The sequence of residues to be added including the
+                           *n_stem* and *c_stem*
+    :param frag_db:        The fragment database
+    :param structural_db:  The according structural database
+    :param extended_search: Whether search should be extended to fragments
+                            matching the geometry of the *n_stem* and *c_stem*
+                            a bit less precisely.
+
+    :type n_stem:          :class:`ost.mol.ResidueHandle`
+    :type c_stem:          :class:`ost.mol.ResidueHandle`
+    :type seq:             :class:`str`
+    :type frag_db:         :class:`~promod3.loop.FragDB`
+    :type structural_db:   :class:`~promod3.loop.StructureDB`
+    :type extended_search: :class:`bool`
+
+    :returns:              A list of loop candidates
+    :rtype:                :class:`LoopCandidates`
+
+    :raises: :exc:`~exceptions.RuntimeError` if stems do no contain N, CA and C
+             atoms.
+
+  .. staticmethod:: FillFromMonteCarloSampler(seq, num_loops, steps, \
+                                              sampler, closer, scorer, cooler, \
+                                              random_seed=0)
+                    FillFromMonteCarloSampler(initial_bb, seq, num_loops, steps, \
+                                              sampler, closer, scorer, cooler, \
+                                              random_seed=0)
+    
+    Uses Monte Carlo simulated annealing to sample the loop to be modelled.
+    If *initial_bb* is given, every Monte Carlo run starts from that configuration.
+ 
+    :param initial_bb: Initial configuration used for the sampling
+    :param seq:        The sequence of residues to be sampled
+    :param num_loops:  Number of loop candidates to return
+    :param steps:      Number of MC steps to perform for each loop candidate
+                       generated
+    :param sampler:    Used to generate a new configuration at each MC step
+    :param closer:     Used to close the loop after each MC step
+    :param scorer:     Used to score the generated configurations at each MC step
+    :param cooler:     Controls the temperature profile of the simulated annealing
+    :param random_seed: Seed to feed the random number generator for 
+                        accepting/rejecting proposed monte carlo steps.
+                        For every monte carlo run, the random number generator 
+                        gets refreshed and this seed gets increased by 1.
+
+    :type initial_bb:  :class:`~promod3.loop.BackboneList`
+    :type seq:         :class:`str`
+    :type num_loops:   :class:`int`
+    :type steps:       :class:`int`
+    :type sampler:     :ref:`mc-sampler-object`
+    :type closer:      :ref:`mc-closer-object`
+    :type scorer:      :ref:`mc-scorer-object`
+    :type cooler:      :ref:`mc-cooler-object`
+    :type random_seed: :class:`int`
+
+    :returns:          The resulting candidates
+    :rtype:            :class:`LoopCandidates`
+
+    :raises: :exc:`~exceptions.RuntimeError`, if *initial_bb* is not given and
+             the Monte Carlo sampler failed to initialize (i.e. stems are too
+             far apart) or if *initial_bb* is given and it is inconsistent with
+             *seq*.
+
+
+  .. method:: GetSequence()
+
+    :returns:           The Sequence
+    :rtype:             :class:`str`
+
+  .. method:: ApplyCCD(n_stem, c_stem, max_iterations=1000, \
+                       rmsd_cutoff=0.1, keep_non_converged=false, random_seed=0)
+              ApplyCCD(n_stem, c_stem, torsion_sampler, max_iterations=1000, \
+                       rmsd_cutoff=0.1, keep_non_converged=false, random_seed=0)
+              ApplyCCD(n_stem, c_stem, torsion_samplers, max_iterations=1000, \
+                       rmsd_cutoff=0.1, keep_non_converged=false, random_seed=0)
+
+    Closes all loop candidates in this container using the CCD algorithm (i.e.
+    modifies the candidates so that its stem residues match those of *n_stem*
+    and *c_stem*). CCD (cyclic coordinate descent, see :class:`CCD`) is an
+    iterative minimization algorithm.
+
+    If *torsion_sampler* is given, it is used at each step of the closing to
+    calculate the probability of the proposed move, which is then accepted or
+    not depending on a metropolis criterium.
+
+    :param n_stem:      Residue defining the n-stem positions every candidate
+                        should match. See :meth:`~CCD.CCD()`.
+    :param c_stem:      Residue defining the c-stem positions every candidate
+                        should match. See :meth:`~CCD.CCD()`.
+    :param torsion_sampler: A torsion sampler (used for all residues) or a list
+                            of samplers (one per residue).
+    :param max_iterations:  Maximum number of iterations
+    :param rmsd_cutoff:     Cutoff in stem residue RMSD used to determine
+                            convergence
+    :param keep_non_converged: Whether to keep loop candidates for which the
+                               closing did not converge
+    :param random_seed:        seed for random number generator used to
+                               accept/reject moves in CCD algorithm
+
+    :type n_stem:          :class:`ost.mol.ResidueHandle`
+    :type c_stem:          :class:`ost.mol.ResidueHandle`
+    :type torsion_sampler: :class:`~promod3.loop.TorsionSampler` / :class:`list`
+                           of :class:`~promod3.loop.TorsionSampler`
+    :type max_iterations:  :class:`int`
+    :type rmsd_cutoff:     :class:`float`
+    :type keep_non_converged: :class:`bool`
+    :type random_seed:        :class:`int`
+
+    :return: An index for each kept candidate corresponding to the candidate
+             index before this function was called. This is useful to keep track
+             of scores and other data extracted before.
+    :rtype:  :class:`list` of :class:`int`
+
+
+  .. method:: ApplyKIC(n_stem, c_stem, pivot_one, pivot_two, pivot_three)
+
+    Closes all loop candidates in this container (i.e. modifies the candidates
+    so that its stem residues match those of *n_stem* and *c_stem*, which are
+    the stem residues of the loop being modelled), using the KIC algorithm. This
+    algorithm finds analytical solutions for closing the loop by modifying the
+    torsion angles of just three pivot residues. Due to the underlying
+    mathematical formalism in KIC, up to 16 solutions can be found for every
+    candidate. This leads to an increase in number of loops.
+
+    :param n_stem:      Residue defining the n-stem positions every candidate
+                        should match
+    :param c_stem:      Residue defining the c-stem positions every candidate
+                        should match
+    :param pivot_one:   First pivot residue
+    :param pivot_two:   Second pivot residue 
+    :param pivot_three: Third pivot residue 
+
+    :type n_stem:       :class:`ost.mol.ResidueHandle`
+    :type c_stem:       :class:`ost.mol.ResidueHandle`
+    :type pivot_one:    :class:`int`
+    :type pivot_two:    :class:`int`
+    :type pivot_three:  :class:`int`
+
+    :return: An index for each added candidate corresponding to the original
+             candidate index before this function was called (each candidate can
+             lead to multiple or no candidates after KIC is applied). This is
+             useful to keep track of scores and other data extracted before.
+    :rtype:  :class:`list` of :class:`int`
+
+  .. method:: CalculateBackboneScores(score_container, scorer, \
+                                      start_resnum, chain_idx=0)
+              CalculateBackboneScores(score_container, scorer, keys, \
+                                      start_resnum, chain_idx=0)
+              CalculateAllAtomScores(score_container, mhandle, \
+                                     start_resnum, chain_idx=0)
+              CalculateAllAtomScores(score_container, mhandle, keys, \
+                                     start_resnum, chain_idx=0)
+
+    Calculate backbone / all-atom scores for each loop candidate.
+    Note that (unless otherwise noted) a lower "score" is better!
+
+    The computed scores are in the same same order as the candidates in here.
+
+    :param score_container: Add scores to this score container using the given
+                            key names (or the ones from :class:`ScoringWeights`)
+    :type score_container:  :class:`ScoreContainer`
+    :param scorer: Backbone scoring object with set environment for the
+                   particular loop modelling problem.
+    :type scorer:  :class:`~promod3.scoring.BackboneOverallScorer`
+    :param mhandle: Modelling handle set up for all atom scoring (see
+                    :func:`SetupDefaultAllAtomScoring`).
+    :type mhandle:  :class:`ModellingHandle`
+    :param keys: Keys of the desired scorers. If not given, we use the set of
+                 keys given by :meth:`ScoringWeights.GetBackboneScoringKeys` /
+                 :meth:`ScoringWeights.GetAllAtomScoringKeys`.
+    :type keys:  :class:`list` of :class:`str`
+    :param start_resnum: Res. number defining the position in the SEQRES.
+    :type start_resnum:  :class:`int`
+    :param chain_idx: Index of chain the loops belong to.
+    :type chain_idx:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if :func:`IsAllAtomScoringSetUp`
+             is False, if *keys* has a key for which no scorer exists or if
+             anything is raised when calculating the scores.
+
+
+  .. method:: CalculateSequenceProfileScores(score_container, structure_db, \
+                                             prof, offset=0)
+              CalculateStructureProfileScores(score_container, structure_db, \
+                                              prof, offset=0)
+
+    Calculates a score comparing the given profile *prof* starting at *offset*
+    with the sequence / structure profile of each candidate as extracted from
+    *structure_db* (see :meth:`ost.seq.ProfileHandle.GetAverageScore` for
+    details, *prof.null_model* is used for weighting).
+
+    Note that for profile scores a higher "score" is better! So take care when
+    combining this to other scores, where it is commonly the other way around.
+
+    This requires that each candidate has a connected fragment info into the
+    given *structure_db* (e.g. :meth:`FillFromDatabase` must have been called
+    with this DB).
+
+    The computed scores are in the same same order as the candidates in here.
+
+    :param score_container: Add scores to this score container using the default
+                            key name defined in :class:`ScoringWeights`
+    :type score_container:  :class:`ScoreContainer`
+    :param structural_db: Structural database used in :meth:`FillFromDatabase`
+    :type structural_db:  :class:`~promod3.loop.StructureDB`
+    :param prof: Profile information for target.
+    :type prof:  :class:`ost.seq.ProfileHandle`
+    :param offset: Loop starts at index *offset* in *prof*.
+    :type offset:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if :meth:`HasFragmentInfos` is
+             False, if *structure_db* is incompatible with the stored fragment
+             infos or if *prof* has less than *offset+len* elements (len =
+             length of loops stored in here).
+
+
+  .. method:: CalculateStemRMSDs(score_container, n_stem, c_stem)
+
+    Calculates RMSD between the given stems and the first and last residue of
+    the loop candidates. This first superposes the first loop residue with
+    *n_stem* and then computes the RMSD between the last residue's N, CA, C
+    positions and the corresponding atoms in *c_stem*.
+
+    Note that this score is only useful before calling :meth:`ApplyCCD` or
+    :meth:`ApplyKIC`.
+
+    The computed scores are in the same same order as the candidates in here.
+
+    :param score_container: Add scores to this score container using the default
+                            key name defined in :class:`ScoringWeights`
+    :type score_container:  :class:`ScoreContainer`
+    :param n_stem: The residue at the N-terminal end of the loop.
+    :type n_stem:  :class:`ost.mol.ResidueHandle`
+    :param c_stem: The residue at the C-terminal end of the loop.
+    :type c_stem:  :class:`ost.mol.ResidueHandle`
+
+    :raises: :exc:`~exceptions.RuntimeError` if stems do no contain N, CA and C
+             atoms.
+
+
+  .. method:: CalculateSequenceProfileScores(structure_db, prof, offset=0)
+              CalculateStructureProfileScores(structure_db, prof, offset=0)
+              CalculateStemRMSDs(n_stem, c_stem)
+
+    Same as the *score_container* variant above, but here we directly return the
+    score vector instead of storing it in a container.
+
+    :return: Score for each candidate (same order as candidates in here).
+    :rtype:  :class:`list` of :class:`float`
+
+
+  .. method:: Add(bb_list)
+
+    :param bb_list: The loop candidate to be added.
+    :type bb_list:  :class:`~promod3.loop.BackboneList`
+
+    :raises: :exc:`~exceptions.RuntimeError` if sequence of *bb_list* is not
+             consistent with internal sequence
+ 
+  .. method:: AddFragmentInfo(fragment)
+
+    Adds a fragment info for the last candidate added with :meth:`Add`. Note
+    that these infos are added automatically with :meth:`FillFromDatabase` and
+    updated whenever the candidates are copied, removed, clustered etc.. So you
+    will probably never need this function.
+
+    :param fragment: The fragment info to add.
+    :type fragment:  :class:`~promod3.loop.FragmentInfo`
+ 
+  .. method:: Remove(index)
+
+    Remove a loop candidate from the list of candidates.
+
+    :param index: The index of the candidate that will be removed
+    :type index:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *index* is out of bounds.
+  
+  .. method:: HasFragmentInfos()
+
+    :return: True, if each loop candidate has a connected fragment info.
+    :rtype:  :class:`bool`
+
+  .. method:: GetFragmentInfo(index)
+
+    :return: Fragment info connected to loop candidate at given *index*.
+    :rtype:  :class:`~promod3.loop.FragmentInfo`
+    :param index: The index of the candidate.
+    :type index:  :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if :meth:`HasFragmentInfos` is
+             False or if *index* is out of bounds.
+
+  .. method:: Extract(indices)
+
+    :return: Container with candidates with given *indices*.
+    :rtype:  :class:`LoopCandidates`
+    :param indices: Candidate indices to extract.
+    :type indices:  :class:`list` of :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if any index is out of bounds.
+  
+
+  .. method:: GetClusters(max_dist, superposed_rmsd = False)
+
+    Clusters the loop candidates according to their pairwise CA RMSD using an
+    agglomerative hierarchical clustering algorithm. Every candidate gets 
+    assigned a unique cluster. At every clustering step, the two clusters with 
+    shortest distance get merged, with the distance definition being the average 
+    CA RMSD between any of the members of the two clusters.
+
+    :param max_dist: Maximal distance two clusters can have to be merged
+    :type superposed_rmsd: :class:`bool`
+    :param superposed_rmsd: Whether to calculate the RMSD based on a minimal
+                            RMSD superposition or simply consider the current
+                            positions
+    :type max_dist:  :class:`float`
+
+    :returns: Lists of loop candidate indices into this container
+    :rtype:   :class:`list` of :class:`list` of :class:`int`
+
+  .. method:: GetClusteredCandidates(max_dist, neglect_size_one=True, \
+                                     superposed_rmsd=False)
+
+    :returns: List of loop candidates clustered as in :meth:`GetClusters`.
+    :rtype:   :class:`list` of :class:`LoopCandidates`
+
+    :param max_dist: Maximal distance two clusters can have to be merged
+    :type max_dist:  :class:`float`
+    :param neglect_size_one: Whether clusters should be added to the returned
+                             list if they only contain one loop candidate
+    :type neglect_size_one:  :class:`bool`
+    :param superposed_rmsd: Whether to calculate the RMSD based on a minimal
+                            RMSD superposition or simply consider the current
+                            positions
+    :type superposed_rmsd: :class:`bool`
+
+  .. method:: GetLargestCluster(max_dist, superposed_rmsd = False)
+
+    Instead of performing a full clustering, the algorithm simply searches for
+    the candidate with the most other candidates having a CA RMSD below
+    **max_dist**. This candidate then serves as centroid for the return 
+    cluster.
+
+    :param max_dist:    Maximal CA RMSD to cluster centroid
+    :type max_dist:     :class:`float`
+    :param superposed_rmsd: Whether to calculate the RMSD based on a minimal
+                            RMSD superposition or simply consider the current
+                            positions
+    :type superposed_rmsd: :class:`bool`
+    
+    :returns:           Largest possible cluster with all members having a
+                        CA RMSD below **max_dist** to cluster centroid.
+    :rtype:             :class:`LoopCandidates`
+
+
+Keeping track of loop candidate scores
+--------------------------------------------------------------------------------
+
+Two helper classes are used to keep track and combine different scores computed
+on loop candidates.
+
+.. class:: ScoreContainer
+
+  Container to keep vectors of scores (one for each loop candidate) for each
+  scorer (one vector for each single scorer). Each score vector is guaranteed
+  to have the same number of values.
+
+  .. method:: IsEmpty()
+
+    :return: True, if no loop candidates have been scored with any scorer yet.
+    :rtype:  :class:`bool`
+
+  .. method:: Contains(key)
+
+    :return: True, if a score vector for this key was already added.
+    :rtype:  :class:`bool`
+    :param key: Key for desired scorer.
+    :type key:  :class:`str`
+
+  .. method:: Get(key)
+
+    :return: Score vector for the given *key*.
+    :rtype:  :class:`list` of :meth:`GetNumCandidates` :class:`float`
+    :param key: Key for desired score vector.
+    :type key:  :class:`str`
+    :raises: :exc:`~exceptions.RuntimeError` if there are no scores for that
+             *key*.
+
+  .. method:: Set(key, scores)
+
+    :param key: Set scores for that *key*.
+    :type key:  :class:`str`
+    :param scores: Score vector to set.
+    :type scores:  :class:`list` of :class:`float`
+    :raises: :exc:`~exceptions.RuntimeError` if this container contains other
+             score vectors with a different number of entries.
+
+  .. method:: GetNumCandidates()
+
+    :return: Number of loop candidates that are scored here. This is the length
+             of each score vector in this container.
+    :rtype:  :class:`int`
+
+  .. method:: LinearCombine(linear_weights)
+
+    :return: Weighted, linear combination of scores.
+    :rtype:  :class:`list` of :meth:`GetNumCandidates` :class:`float`
+
+    :param linear_weights: Weights for each scorer.
+    :type linear_weights:  :class:`dict` (keys: :class:`str`,
+                           values: :class:`float`)
+
+    :raises: :exc:`~exceptions.RuntimeError` if *linear_weights* has a key for
+             which no scores were added.
+
+  .. method:: Copy()
+
+    :return: Full copy of this container.
+    :rtype:  :class:`ScoreContainer`
+
+  .. method:: Extract(indices)
+
+    :return: Container with scores for a subset of loop candidates.
+    :rtype:  :class:`ScoreContainer`
+
+    :param indices: List of loop candidate indices to pick
+                    (in [0, :meth:`GetNumCandidates`-1])
+    :type indices:  :class:`list` of :class:`int`
+
+    :raises: :exc:`~exceptions.RuntimeError` if any index is out of bounds.
+
+  .. method:: Extend(other)
+
+    Extend each score vector with the score vector of *other* (must have
+    matching keys).
+
+    :param other: Score container to be added to this one.
+    :type other:  :class:`ScoreContainer`
+
+
+.. class:: ScoringWeights
+
+  Globally accessible set of weights to be used in scoring. This also defines
+  a consistent naming of keys used for backbone and all atom scorers as set up
+  by :func:`SetupDefaultBackboneScoring` and :func:`SetupDefaultAllAtomScoring`.
+
+  If you choose to modify the weights, please ensure to set consistently named
+  keys in here and to use consistently named scorers and scoring computations!
+
+  .. staticmethod:: GetWeights(with_db=False, with_aa=False)
+
+    :return: Named weights to be used when scoring loop candidates. The default
+             weights were optimized to give the best performance when choosing
+             the loop candidate with the lowest combined score. Each set of
+             weights includes (different) backbone scoring weights.
+    :rtype:  :class:`dict` (keys: :class:`str`, values: :class:`float`)
+
+    :param with_db: True to choose a set of weights including DB specific scores
+                    (stem RMSD and profile scores)
+    :type with_db:  :class:`bool`
+    :param with_aa: True to choose a set of weights including all atom scores
+    :type with_aa:  :class:`bool`
+
+  .. staticmethod:: SetWeights(with_db, with_aa, weights)
+
+    Overwrite a set of weights as returned by :meth:`GetWeights`.
+
+  .. staticmethod:: GetBackboneWeights(with_db=False, with_aa=False)
+
+    :return: Subset of :meth:`GetWeights` for backbone scoring as in
+             :meth:`scoring.BackboneOverallScorer.CalculateLinearCombination`.
+    :rtype:  :class:`dict` (keys: :class:`str`, values: :class:`float`)
+
+    :param with_db: As in :meth:`GetWeights`
+    :type with_db:  :class:`bool`
+    :param with_aa: As in :meth:`GetWeights`
+    :type with_aa:  :class:`bool`
+
+  .. staticmethod:: GetAllAtomWeights(with_db=False)
+
+    :return: Subset of :meth:`GetWeights` for all atom scoring as in
+             :meth:`scoring.AllAtomOverallScorer.CalculateLinearCombination`.
+    :rtype:  :class:`dict` (keys: :class:`str`, values: :class:`float`)
+
+    :param with_db: As in :meth:`GetWeights`
+    :type with_db:  :class:`bool`
+
+
+  .. staticmethod:: GetStemRMSDsKey()
+                    GetSequenceProfileScoresKey()
+                    GetStructureProfileScoresKey()
+
+    :return: Default key for stem RMSD / sequence profile / structure profile
+             scores.
+    :rtype:  :class:`str`
+
+  .. staticmethod:: SetStemRMSDsKey(key)
+                    SetSequenceProfileScoresKey(key)
+                    SetStructureProfileScoresKey(key)
+
+    :param key: New default key for stem RMSD / sequence profile / structure
+                profile scores.
+    :type key:  :class:`str`
+
+  .. staticmethod:: GetBackboneScoringKeys()
+                    GetAllAtomScoringKeys()
+
+    :return: List of backbone / all-atom scorers to be computed for any set of
+             weights defined in here.
+    :rtype:  :class:`list` of :class:`str`
+
+  .. staticmethod:: SetBackboneScoringKeys(keys)
+                    SetAllAtomScoringKeys(keys)
+
+    :param keys: New list of backbone / all-atom scorers to be computed for any
+                 set of weights defined in here.
+    :type keys:  :class:`list` of :class:`str`
+
+
+Example: loop scoring in modelling
+--------------------------------------------------------------------------------
+
+In the example below, we show how we find and choose a loop candidate to close a
+gap for a model. This shows the combined usage of :class:`ModellingHandle` to
+keep a consistent modelling environment, :class:`LoopCandidates` with its
+scoring routines, :class:`ScoreContainer` for keeping track of scores and
+:class:`ScoringWeights` to combine scores:
+
+.. literalinclude:: ../../../tests/doc/scripts/modelling_loop_scoring.py
diff --git a/doc/html/_sources/modelling/loop_closing.txt b/doc/html/_sources/modelling/loop_closing.txt
new file mode 100644
index 00000000..386458ba
--- /dev/null
+++ b/doc/html/_sources/modelling/loop_closing.txt
@@ -0,0 +1,373 @@
+Fitting Loops Into Gaps
+================================================================================
+
+.. currentmodule:: promod3.modelling
+
+Loops often need to undergo conformational changes to fit into gaps defined by
+stem residues. |project| implements two algorithms performing this task:
+
+  * Cyclic coordinate descent (CCD) [canutescu2003]_
+  * Kinematic closure (KIC) [mandell2009]_
+
+In case of small gaps or small issues in the loop you might also consider the
+:class:`BackboneRelaxer`.
+
+
+CCD
+--------------------------------------------------------------------------------
+
+The |project| implementation of the cyclic coordinate descent first superposes
+the n-stem of the input loop with the provided n-stem positions. In every
+iteration of the algorithm, we loop over all residues of the loop and find the
+ideal phi/psi angles to minimize the RMSD between the c-stem and the target
+c-stem positions. Iterations continue until a c-stem RMSD threshold is reached
+or the number of iterations hits a limit. By performing CCD, unfavorable
+backbone dihedral pairs can be introduced. It is therefore optionally possible
+to use torsion samplers to guide the iterative process.  In this case, the
+algorithm calculates the probability of observing the dihedral pair before and
+after performing the phi/psi update. If the fraction after/before is smaller
+than a uniform random number in the range [0,1[, the proposed dihedral pair gets
+rejected. Please note, that this increases the probability of non-convergence.
+
+.. class:: CCD
+
+  Class, that sets up everything you need to perform a particular loop closing
+  action.
+
+  .. method:: CCD(sequence, n_stem, c_stem, torsion_sampler, max_steps, \
+                  rmsd_cutoff, seed)
+
+    All runs with this CCD object will be with application of torsion samplers 
+    to avoid moving into unfavourable regions of the backbone dihedrals.
+
+    :param sequence:    Sequence of the backbones to be closed
+    :param n_stem:      Residue defining the n_stem.
+                        If the residue before *n_stem* doesn't exist, the
+                        torsion sampler will use a default residue (ALA) and
+                        and phi angle (-1.0472) to evaluate the first angle.
+    :param c_stem:      Residue defining the c_stem.
+                        If the residue after *c_stem* doesn't exist, the
+                        torsion sampler will use a default residue (ALA) and
+                        psi angle (-0.7854) to evaluate the last angle.
+    :param torsion_sampler: To extract probabilities for the analysis of the
+                            backbone dihedrals. Either a list of torsion
+                            samplers (one for for every residue of the loop to
+                            be closed) or a single one (used for all residues).
+    :param max_steps:   Maximal number of iterations
+    :param rmsd_cutoff: The algorithm stops as soon as the c_stem of the loop to
+                        be closed has RMSD below the *c_stem* 
+    :param seed:        Seed of random number generator to decide whether new phi/psi pair
+                        should be accepted.
+
+
+    :type sequence:     :class:`str`
+    :type n_stem:       :class:`ost.mol.ResidueHandle`
+    :type c_stem:       :class:`ost.mol.ResidueHandle` 
+    :type torsion_sampler: :class:`~promod3.loop.TorsionSampler` / :class:`list`
+                           of :class:`~promod3.loop.TorsionSampler`
+    :type max_steps:    :class:`int`
+    :type rmsd_cutoff:  :class:`float`
+    :type seed:         :class:`int`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if a list of torsion samplers is
+              given with inconsistent length regarding the sequence. Another
+              requirement is that all backbone atoms of the stems must be
+              present.
+
+  .. method:: CCD(n_stem, c_stem, max_steps, rmsd_cutoff)
+
+    All runs with this CCD object will be without application of torsion samplers.
+    This is faster but might lead to weird backbone dihedral pairs.
+
+    :param n_stem:      Residue defining the n_stem
+    :param c_stem:      Residue defining the c_stem
+    :param max_steps:   Maximal number of iterations
+    :param rmsd_cutoff: The algorithm stops as soon as the c_stem of the loop to
+                        be  closed has RMSD below the given *c_stem*
+
+    :type n_stem:       :class:`ost.mol.ResidueHandle`
+    :type c_stem:       :class:`ost.mol.ResidueHandle` 
+    :type max_steps:    :class:`int`
+    :type rmsd_cutoff:  :class:`float`
+
+  .. method:: Close(bb_list)
+
+    Closes given *bb_list* with the settings set at initialization.
+
+    :param bb_list: Loop to be closed
+    :type bb_list:  :class:`~promod3.loop.BackboneList`      
+
+    :return: Whether *rmsd_cutoff* has been reached  
+    :rtype:  :class:`bool` 
+
+    :raises:  :exc:`~exceptions.RuntimeError` if the CCD object has been
+              initialized with :class:`~promod3.loop.TorsionSampler` support
+              and the length of the *bb_list* is not consistent with the initial
+              *sequence*.
+
+
+KIC
+--------------------------------------------------------------------------------
+The kinematic closure leads to a fragmentation of the loop based on given
+pivot residues. It then calculates possible relative orientations
+of these fragments by considering constraints of bond length and bond angles
+at these pivot residues. Due to the internal mathematical formalism, up to
+16 solutions can be found for a given loop closing problem.
+
+
+.. class:: KIC
+
+  Class, that sets up everything you need to perform a particular loop closing
+  action.
+
+  .. method:: KIC(n_stem, c_stem)
+
+    All runs of this KIC closing object will adapt the input loops to these
+    stem residues.
+
+    :param n_stem:      Residue describing the stem towards n_ter
+    :param c_stem:      Residue describing the stem towards c_ter
+
+  .. method:: Close(bb_list, pivot_one, pivot_two, pivot_three)
+
+    Applies KIC algorithm, so that the output loops match the given stem residues
+
+    :param bb_list:     Loop to be closed
+    :param pivot_one:     Index of first pivot residue
+    :param pivot_two:     Index of second pivot residue
+    :param pivot_three:   Index of third pivot residue  
+
+    :type bb_list:        :class:`~promod3.loop.BackboneList`
+    :type pivot_one:      :class:`int`  
+    :type pivot_two:      :class:`int`  
+    :type pivot_three:    :class:`int`  
+
+    :return: List of closed loops (maximum of 16 entries)
+    :rtype:  :class:`list` of :class:`~promod3.loop.BackboneList`
+
+    :raises: :exc:`~exceptions.RuntimeError` in case of invalid pivot indices.
+
+
+Relaxing Backbones
+--------------------------------------------------------------------------------
+
+In many cases one wants to quickly relax a loop. This can be useful to close
+small gaps in the backbone or resolve the most severe clashes. The
+:class:`BackboneRelaxer` internally sets up a topology for the input loop. 
+Once setup, every loop of the same length and sequence can be relaxed by 
+the relaxer.
+
+.. class:: BackboneRelaxer(bb_list, ff, fix_nterm=True, fix_cterm=True)
+
+  Sets up a molecular mechanics topology for given *bb_list*. Every
+  :class:`~promod3.loop.BackboneList` of same length and sequence can then be
+  relaxed. The parametrization is taken from *ff*, simply neglecting all 
+  interactions to non backbone atoms. The electrostatics get neglected
+  completely by setting all charges to 0.0.
+
+  :param bb_list:       Basis for topology creation
+  :param ff:            Source for parametrization
+  :param fix_nterm:     Whether N-terminal backbone positions (N, CA, CB) should
+                        be kept rigid during relaxation 
+                        (C and O are left to move).
+  :param fix_cterm:     Whether C-terminal backbone positions (CA, CB, C, O)
+                        should be kept rigid during relaxation
+                        (N is left to move).
+  :type bb_list:        :class:`~promod3.loop.BackboneList`
+  :type ff:             :class:`promod3.loop.ForcefieldLookup`
+  :type fix_nterm:      :class:`bool`
+  :type fix_cterm:      :class:`bool`
+
+
+.. class:: BackboneRelaxer(bb_list, density, resolution, fix_nterm=True, \
+                           fix_cterm=True)
+
+  :param bb_list:       Basis for topology creation
+  :param fix_nterm:     Whether N-terminal backbone positions (N, CA, CB) should
+                        be kept rigid during relaxation.
+  :param fix_cterm:     Whether C-terminal backbone positions (CA, CB, C, O)
+                        should be kept rigid during relaxation.
+
+  :type bb_list:        :class:`~promod3.loop.BackboneList`
+  :type fix_nterm:      :class:`bool`
+  :type fix_cterm:      :class:`bool`
+
+  :raises: :exc:`~exceptions.RuntimeError` if size of *bb_list* is below 2
+
+
+  .. method:: Run(bb_list, steps=100, stop_criterion=0.01)
+
+    Performs steepest descent on given BackboneList.
+
+    :param bb_list:     To be relaxed
+    :param steps:       number of steepest descent steps
+    :param stop_criterion:  If maximum force acting on a particle
+                            falls below that threshold, the
+                            relaxation aborts.
+
+    :type bb_list:      :class:`~promod3.loop.BackboneList`
+    :type steps:        :class:`int`
+    :type stop_criterion: :class:`float`
+
+    :return: Forcefield energy upon relaxation
+    :rtype:  :class:`float`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if *bb_list* has not the same
+              size or sequence as the initial one.
+
+
+  .. method:: AddNRestraint(idx, pos, force_constant=100000)
+
+    Adds harmonic position restraint for nitrogen atom at specified residue
+
+    :param idx:         Idx of residue
+    :param pos:         Restraint Position (in Angstrom)
+    :param force_constant: Force constant in kJ/mol/nm^2 
+
+    :type idx:          :class:`int`
+    :type pos:          :class:`ost.geom.Vec3`
+    :type force_constant: :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *idx* is too large
+
+  .. method:: AddCARestraint(idx, pos, force_constant=100000)
+
+    Adds harmonic position restraint for CA atom at specified residue
+
+    :param idx:         Idx of residue
+    :param pos:         Restraint Position (in Angstrom)
+    :param force_constant: Force constant in kJ/mol/nm^2 
+
+    :type idx:          :class:`int`
+    :type pos:          :class:`ost.geom.Vec3`
+    :type force_constant: :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *idx* is too large
+
+  .. method:: AddCBRestraint(idx, pos, force_constant=100000)
+
+    Adds harmonic position restraint for CB atom at specified residue,
+    doesn't do anything if specified residue is a glycine
+
+    :param idx:         Idx of residue
+    :param pos:         Restraint Position (in Angstrom)
+    :param force_constant: Force constant in kJ/mol/nm^2 
+
+    :type idx:          :class:`int`
+    :type pos:          :class:`ost.geom.Vec3`
+    :type force_constant: :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *idx* is too large
+
+  .. method:: AddCRestraint(idx, pos, force_constant=100000)
+
+    Adds harmonic position restraint for C atom at specified residue
+
+    :param idx:         Idx of residue
+    :param pos:         Restraint Position (in Angstrom)
+    :param force_constant: Force constant in kJ/mol/nm^2 
+
+    :type idx:          :class:`int`
+    :type pos:          :class:`ost.geom.Vec3`
+    :type force_constant: :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *idx* is too large
+
+  .. method:: AddORestraint(idx, pos, force_constant=100000)
+
+    Adds harmonic position restraint for O atom at specified residue
+
+    :param idx:         Idx of residue
+    :param pos:         Restraint Position (in Angstrom)
+    :param force_constant: Force constant in kJ/mol/nm^2 
+
+    :type idx:          :class:`int`
+    :type pos:          :class:`ost.geom.Vec3`
+    :type force_constant: :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *idx* is too large
+
+
+  .. method:: SetNonBondedCutoff(nonbonded_cutoff)
+
+    Defines cutoff to set for non bonded interactions. By default, all atom-
+    pairs are compared which is the fastest for small backbones (e.g. in
+    :meth:`CloseSmallDeletions`). Otherwise, a cutoff around 5 is reasonable as
+    we ignore electrostatics.
+
+    :param nonbonded_cutoff: Cutoff to set for non bonded interactions. Negative
+                             means no cutoff.
+    :type nonbonded_cutoff:  :class:`float`
+
+  .. method:: GetNonBondedCutoff(nonbonded_cutoff)
+
+    :return: Cutoff for non bonded interactions.
+    :rtype:  :class:`float`
+
+
+Relaxing All Atom Loops
+--------------------------------------------------------------------------------
+
+After the reconstruction of loop sidechains with the
+:meth:`~promod3.modelling.SidechainReconstructor.Reconstruct` method of
+:class:`~promod3.modelling.SidechainReconstructor`, it may be desired to
+quickly relax the loop. The :class:`AllAtomRelaxer` class takes care of that.
+
+Example usage:
+
+.. literalinclude:: ../../../tests/doc/scripts/modelling_allatomrelaxer.py
+
+.. class:: AllAtomRelaxer(sc_data, mm_system_creator)
+
+  Setup relaxer for a given sidechain reconstruction result and a given MM
+  system creator, which takes care of generating a simulation object.
+
+  N/C stems of loop are fixed if they are non-terminal.
+
+  :param sc_data: Sidechain reconstruction result
+  :type sc_data:  :class:`~promod3.modelling.SidechainReconstructionData`
+  :param mm_system_creator: System creator to be used here
+  :type mm_system_creator:  :class:`~promod3.loop.MmSystemCreator`
+
+  .. method:: Run(sc_data, steps=100, stop_criterion=0.01)
+
+    Performs steepest descent for this system and writes updated positions into
+    *sc_data.env_pos.all_pos*.
+
+    :param sc_data: Sidechain reconstruction result to be updated
+    :type sc_data:  :class:`~promod3.modelling.SidechainReconstructionData`
+    :param steps: Number of steepest descent steps
+    :type steps:  :class:`int`
+    :param stop_criterion: If maximum force acting on a particle falls below
+                           that threshold, the relaxation aborts.
+    :type stop_criterion:  :class:`float`
+
+    :return: Potential energy after relaxation
+    :rtype:  :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *sc_data* is incompatible with
+             the one given in the constructor.
+
+  .. method:: UpdatePositions(sc_data)
+
+    Resets simulation positions to a new set of positions. It is assumed that
+    this *sc_data* object has the same amino acids as loops and surrounding and
+    the same disulfid bridges as the one given in the constructor.
+
+    :param sc_data: Get new positions from *sc_data.env_pos.all_pos*
+    :type sc_data:  :class:`~promod3.modelling.SidechainReconstructionData`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *sc_data* is incompatible with
+             the one given in the constructor.
+
+  .. method:: GetSystemCreator()
+
+    :return: MM system creator passed in the constructor
+    :rtype:  :class:`~promod3.loop.MmSystemCreator`
+
+
+.. rubric:: Citations
+
+.. [canutescu2003] Canutescu AA and Dunbrack RL Jr. (2003). Cyclic coordinate descent: A robotics algorithm for protein loop closure. Protein Sci. 12(5):963–972.
+
+.. [mandell2009] Mandell DJ, Coutsias EA and Kortemme T (2009). Sub-angstrom accuracy in protein loop reconstruction by robotics-inspired conformational sampling. Nat Methods. 6(8):551-2.
diff --git a/doc/html/_sources/modelling/model_checking.txt b/doc/html/_sources/modelling/model_checking.txt
new file mode 100644
index 00000000..97d7f69a
--- /dev/null
+++ b/doc/html/_sources/modelling/model_checking.txt
@@ -0,0 +1,29 @@
+Model Checking
+================================================================================
+
+.. currentmodule:: promod3.modelling
+
+This chapter describes additional functionality to check models. Some of this
+functionality is used within the modelling pipeline.
+
+Detecting Ring Punches
+--------------------------------------------------------------------------------
+
+.. autofunction:: GetRings
+
+.. autofunction:: GetRingPunches
+
+.. autofunction:: HasRingPunches
+
+.. autofunction:: FilterCandidates
+
+.. autofunction:: FilterCandidatesWithSC
+
+Model Checking With MolProbity
+--------------------------------------------------------------------------------
+
+.. autofunction:: RunMolProbity
+
+.. autofunction:: RunMolProbityEntity
+
+.. autofunction:: ReportMolProbityScores
\ No newline at end of file
diff --git a/doc/html/_sources/loop/monte_carlo.txt b/doc/html/_sources/modelling/monte_carlo.txt
similarity index 65%
rename from doc/html/_sources/loop/monte_carlo.txt
rename to doc/html/_sources/modelling/monte_carlo.txt
index 224298a3..328b73d3 100644
--- a/doc/html/_sources/loop/monte_carlo.txt
+++ b/doc/html/_sources/modelling/monte_carlo.txt
@@ -1,32 +1,35 @@
-Monte Carlo Sampling
+Generating Loops De Novo
 ================================================================================
 
-.. currentmodule:: promod3.loop
+.. currentmodule:: promod3.modelling
 
 The Monte Carlo capabilities of |project| are mainly targeted at generating de
 novo structure candidates for loops or N-/C-Termini. Every iteration of the
-sampling process consists basically of four steps.
+sampling process consists basically of four steps and we define objects for
+each step:
 
-* Propose new conformation
-* Adapt new conformation to the environment
-* Score the new conformation
-* Accept/Reject new conformation based on the score and a temperature controlled metropolis criterion
+* :ref:`mc-sampler-object`: Propose new conformation
+* :ref:`mc-closer-object`: Adapt new conformation to the environment
+* :ref:`mc-scorer-object`: Score the new conformation
+* :ref:`mc-cooler-object`: Accept/Reject new conformation based on the score and
+  a temperature controlled Metropolis criterion
 
-These steps are performed by sampler, closer, scorer and cooler objects, that 
-can be arbitrarily combined to generate custom Monte Carlo sampling pipelines.
-This combination either happens manually or by using a convenient function
-provided by |project|.
+These steps can be arbitrarily combined to generate custom Monte Carlo sampling
+pipelines. This combination either happens manually or by using the convenient
+:func:`SampleMonteCarlo` function. For example, here we show how to apply Monte
+Carlo sampling to the N-terminal part of crambin:
 
+.. literalinclude:: ../../../tests/doc/scripts/modelling_monte_carlo.py
 
 .. method:: SampleMonteCarlo(sampler, closer, scorer, cooler, steps,\
-                             bb_list, initialize=true, seed=0,\
-                             lowest_energy_conformation=true)
+                             bb_list, initialize=True, seed=0,\
+                             lowest_energy_conformation=True)
 
   A convenient function to perform Monte Carlo sampling using a simulated
   annealing scheme. In every iteration, a new loop conformation gets proposed by
-  the provided **sampler** and closed by the **closer**. Upon scoring, this new
+  the provided *sampler* and closed by the *closer*. Upon scoring, this new
   conformation gets accepted/rejected using a metropolis criterion based on the
-  temperature given by the **cooler** 
+  temperature given by the *cooler* 
   => acceptance probability: exp(-delta_score/T).
   The result is stored in *bb_list* and is either the lowest energy conformation
   ever encountered or the last accepted proposal.
@@ -42,9 +45,9 @@ provided by |project|.
   :param bb_list:       The chosen conformation gets stored here.
   :param initialize:    Whether a new bb_list should be generated as starting
                         point, based on the samplers Initialize function.
-                        The input **bb_list** gets used otherwise.
+                        The input *bb_list* gets used otherwise.
   :param seed:          Seed for internal random number generator.
-  :param lowest_energy_conformation:  If true, we choose the lowest scoring
+  :param lowest_energy_conformation:  If True, we choose the lowest scoring
                                       conformation of the trajectory. Otherwise,
                                       the last accepted proposal.
 
@@ -53,16 +56,11 @@ provided by |project|.
   :type scorer:         :ref:`mc-scorer-object`
   :type cooler:         :ref:`mc-cooler-object`
   :type steps:          :class:`int`
-  :type bb_list:        :class:`BackboneList`
+  :type bb_list:        :class:`~promod3.loop.BackboneList`
   :type initialize:     :class:`bool`
   :type seed:           :class:`int`
   :type lowest_energy_conformation: :class:`bool`
 
-In this example, we apply Monte Carlo sampling to the N-terminal part of
-crambin:
-
-.. literalinclude:: ../../../tests/doc/scripts/loop_monte_carlo.py
-
 
 .. _mc-sampler-object:
 
@@ -73,10 +71,11 @@ The sampler objects can be used to generate initial conformations and
 propose new conformations for a sequence of interest. They build the basis
 for any Monte Carlo sampling pipeline.
 
-.. class:: PhiPsiSampler(sequence,torsion_sampler,[n_stem_phi=-1.0472,c_stem_psi=-0.78540,prev_aa='A',next_aa='A',seed=0])
+.. class:: PhiPsiSampler(sequence, torsion_sampler, n_stem_phi=-1.0472,\
+                         c_stem_psi=-0.78540, prev_aa='A', next_aa='A', seed=0)
 
   The PhiPsiSampler randomly draws and sets phi/psi dihedral angles from
-  a distribution provided by the **torsion_sampler**.
+  a distribution provided by the *torsion_sampler*.
 
   :param sequence:      Sequence that should be sampled
   :param torsion_sampler: Sampler, from which the phi/psi pairs are drawn. It
@@ -86,23 +85,23 @@ for any Monte Carlo sampling pipeline.
   :param n_stem_phi:    Phi angle of the n_stem. This angle is not defined in
                         the sampling region. If the first residue gets selected
                         for changing the dihedral angles, it draws a psi angle
-                        given **n_stem_phi**.   
+                        given *n_stem_phi*.   
   :param c_stem_psi:    Psi angle of c_stem. This angle is not defined in
                         the sampling region. If the last residue gets selected
                         for changing the dihedral angles, it draws a phi angle
-                        given **c_stem_psi**.
+                        given *c_stem_psi*.
   :param prev_aa:       This parameter is necessary to extract the according
                         histogram index for the first residue from the 
-                        **torsion_sampler**. (Remember: The torsion sampler
+                        *torsion_sampler*. (Remember: The torsion sampler
                         always considers triplets)   
   :param next_aa:       This parameter is necessary to extract the according
                         histogram index for the last residue from the 
-                        **torsion_sampler**. (Remember: The torsion sampler
+                        *torsion_sampler*. (Remember: The torsion sampler
                         always considers triplets)   
   :param seed:          Seed for the internal random number generators.
 
   :type sequence:       :class:`str`
-  :type torsion_sampler: :class:`TorsionSampler`
+  :type torsion_sampler: :class:`~promod3.loop.TorsionSampler`
   :type n_stem_phi:     :class:`float`
   :type c_stem_psi:     :class:`float`
   :type prev_aa:        :class:`str`
@@ -113,11 +112,11 @@ for any Monte Carlo sampling pipeline.
 
   .. method:: Initialize(bb_list)
 
-    Sets up a new :class:`BackboneList` by randomly drawing phi/psi dihedral
-    angles.
+    Sets up a new :class:`~promod3.loop.BackboneList` by randomly drawing
+    phi/psi dihedral angles.
 
     :param bb_list:     The newly created conformation gets stored in here
-    :type bb_list:      :class:`BackboneList`
+    :type bb_list:      :class:`~promod3.loop.BackboneList`
 
   .. method:: ProposeStep(actual_positions, proposed_position)
 
@@ -129,19 +128,20 @@ for any Monte Carlo sampling pipeline.
     :param actual_positions: Conformation to be changed
     :param proposed_positions: Changed conformation gets stored in here  
 
-    :type actual_positions: :class:`BackboneList`
-    :type proposed_positions: :class:`BackboneList`
+    :type actual_positions: :class:`~promod3.loop.BackboneList`
+    :type proposed_positions: :class:`~promod3.loop.BackboneList`
 
-    :raises:  :exc:`~exceptions.RuntimeError` If size of **actual_positions**
+    :raises:  :exc:`~exceptions.RuntimeError` If size of *actual_positions*
               is not consistent with the internal sequence. Note, that the
               sequence itself doesn't get checked for efficiency reasons.
 
 
 
-.. class:: SoftSampler(sequence,torsion_sampler,max_dev,[n_stem_phi=-1.0472,c_stem_psi=-0.78540,prev_aa='A',next_aa='A',seed=0])
+.. class:: SoftSampler(sequence, torsion_sampler, max_dev, n_stem_phi=-1.0472,\
+                       c_stem_psi=-0.78540, prev_aa='A', next_aa='A', seed=0)
 
   Instead of drawing completely new values for a residues phi/psi angles,
-  only one angle gets altered by a maximum value of **max_dev** in the 
+  only one angle gets altered by a maximum value of *max_dev* in the 
   SoftSampler.
 
   :param sequence:      Sequence that should be sampled
@@ -153,26 +153,26 @@ for any Monte Carlo sampling pipeline.
                         value per sampling step.
   :param n_stem_phi:    Phi angle of the n_stem. This angle is not defined in
                         the sampling region. If the psi angle of the first
-                        residue gets selected to be changed, **n_stem_phi** is
+                        residue gets selected to be changed, *n_stem_phi* is
                         used to calculate the phi/psi probability to estimate
                         the acceptance probability.  
   :param c_stem_psi:    Psi angle of c_stem. This angle is not defined in
                         the sampling region. If the phi angle of the last 
-                        residue gets selected to be changed, **c_stem_psi** is
+                        residue gets selected to be changed, *c_stem_psi* is
                         used to calculate the phi/psi probability to estimate
                         the acceptance probability.
   :param prev_aa:       This parameter is necessary to extract the according
                         histogram index for the first residue from the 
-                        **torsion_sampler**. (Remember: The torsion sampler
+                        *torsion_sampler*. (Remember: The torsion sampler
                         always considers triplets)   
   :param next_aa:       This parameter is necessary to extract the according
                         histogram index for the last residue from the 
-                        **torsion_sampler**. (Remember: The torsion sampler
+                        *torsion_sampler*. (Remember: The torsion sampler
                         always considers triplets)   
   :param seed:          Seed for the internal random number generators.
 
   :type sequence:       :class:`str`
-  :type torsion_sampler: :class:`TorsionSampler`
+  :type torsion_sampler: :class:`~promod3.loop.TorsionSampler`
   :type n_stem_phi:     :class:`float`
   :type c_stem_psi:     :class:`float`
   :type prev_aa:        :class:`str`
@@ -183,17 +183,17 @@ for any Monte Carlo sampling pipeline.
 
   .. method:: Initialize(bb_list)
 
-    Sets up a new :class:`BackboneList` by randomly drawing phi/psi dihedral
-    angles.
+    Sets up a new :class:`~promod3.loop.BackboneList` by randomly drawing
+    phi/psi dihedral angles.
 
     :param bb_list:     The newly created conformation gets stored in here
-    :type bb_list:      :class:`BackboneList`
+    :type bb_list:      :class:`~promod3.loop.BackboneList`
 
   .. method:: ProposeStep(actual_positions, proposed_position)
 
     In an iterative process, the SoftSampler randomly selects one of the 
     possible dihedral angles in a conformation and changes it by a random value 
-    in [-**max_dev**,**max_dev**]. The acceptance probability of this change is
+    in [-*max_dev*, *max_dev*]. The acceptance probability of this change is
     the fraction of the phi/psi probability before and after changing the 
     single angle in the particular residue. There is a maximum of 100 
     iterations. It is therefore theoretically possible, that nothing happens 
@@ -202,40 +202,43 @@ for any Monte Carlo sampling pipeline.
     :param actual_positions: Conformation to be changed
     :param proposed_positions: Changed conformation gets stored in here  
 
-    :type actual_positions: :class:`BackboneList`
-    :type proposed_positions: :class:`BackboneList`
+    :type actual_positions: :class:`~promod3.loop.BackboneList`
+    :type proposed_positions: :class:`~promod3.loop.BackboneList`
 
-    :raises:  :exc:`~exceptions.RuntimeError` If size of **actual_positions**
+    :raises:  :exc:`~exceptions.RuntimeError` If size of *actual_positions*
               is not consistent with the internal sequence. Note, that the
               sequence itself doesn't get checked for efficiency reasons.
 
 
-.. class:: FragmentSampler(sequence, fraggers, [init_bb_list = BackboneList(sequence), sampling_start_index = 0, init_fragments = 3, seed = 0])
-
-  The FragmentSampler samples by replacing full fragments originating from a list
-  of :class:`Fragger` objects. The region, that actually gets sampled is
-  determined by **sampling_start_index** and number of :class:`Fragger` objects 
-  being available. All parts not covered by any fragger remain rigid.
-
-  :param sequence:      Overall sequence
-  :param fraggers:      A list of :class:`Fragger` objects. The first fragger 
-                        covers the region starting at the letter 
-                        **sampling_start_index** of the **sequence** and so on. 
-                        All fraggers must contain fragments of equal size.
-  :param init_bb_list:  Initial conformation, that serves as a starting point for
-                        sampling. The default gets constructed using the default
-                        constructor of :class:`BackboneList` and results in
-                        a helix.
+.. class:: FragmentSampler(sequence, fraggers,\
+                           init_bb_list=BackboneList(sequence), \
+                           sampling_start_index=0, init_fragments=3, seed=0)
+
+  The FragmentSampler samples by replacing full fragments originating from a
+  list of :class:`~promod3.loop.Fragger` objects. The region, that actually gets
+  sampled is determined by *sampling_start_index* and number of
+  :class:`~promod3.loop.Fragger` objects  being available. All parts not covered
+  by any fragger remain rigid.
+
+  :param sequence: Overall sequence
+  :param fraggers: A list of :class:`~promod3.loop.Fragger` objects. The first
+                   fragger covers the region starting at the letter
+                   *sampling_start_index* of the *sequence* and so on.
+                   All fraggers must contain fragments of equal size.
+  :param init_bb_list: Initial conformation, that serves as a starting point for
+                       sampling. The default gets constructed using the default
+                       constructor of :class:`~promod3.loop.BackboneList` and
+                       results in a helix.
   :param sampling_start_index: Defines the beginning of the region, that actually
                                gets sampled.
   :param init_fragments: When calling the Initialize function, the positions get set
-                         to the ones of **init_bb_list**. This is the number of 
+                         to the ones of *init_bb_list*. This is the number of 
                          fragments that gets randomly selected and inserted.
   :param seed:          Seed for the internal random number generators
 
   :type sequence:       :class:`str`
   :type fraggers:       :class:`str`
-  :type init_bb_list:   :class:`BackboneList`
+  :type init_bb_list:   :class:`~promod3.loop.BackboneList`
   :type samplint_start_index: :class:`int`
   :type init_fragments: :class:`int`
   :type seed:           :class:`int`
@@ -243,12 +246,12 @@ for any Monte Carlo sampling pipeline.
 
   .. method:: Initialize(bb_list)
 
-    Sets up a new :class:`BackboneList` by setting the setting 
-    bb_list = **init_bb_list** and randomly replace n fragments
-    with n = **init_fragments**
+    Sets up a new :class:`~promod3.loop.BackboneList` by setting the setting 
+    bb_list = *init_bb_list* and randomly replace n fragments
+    with n = *init_fragments*
 
     :param bb_list:     The newly created conformation gets stored in here
-    :type bb_list:      :class:`BackboneList`
+    :type bb_list:      :class:`~promod3.loop.BackboneList`
 
 
   .. method:: ProposeStep(actual_step, proposed_position)
@@ -259,8 +262,8 @@ for any Monte Carlo sampling pipeline.
     :param actual_positions: Conformation to be changed
     :param proposed_positions: Changed conformation gets stored in here  
 
-    :type actual_positions: :class:`BackboneList`
-    :type proposed_positions: :class:`BackboneList`   
+    :type actual_positions: :class:`~promod3.loop.BackboneList`
+    :type proposed_positions: :class:`~promod3.loop.BackboneList`   
 
 
 
@@ -279,26 +282,27 @@ or simple stem superposition in case of terminal sampling.
 
   The CCDCloser applies the CCD algorithm to the sampled conformation 
   to enforce the match between the conformations stem residue and
-  the stems given by the closer. The **torsion_sampler** is used to
+  the stems given by the closer. The *torsion_sampler* is used to
   avoid moving into unfavourable phi/psi ranges.
 
   :param n_stem:        Defining stem positions the closed conformation
-                        should adapt. See :meth:`~promod3.loop.CCD.CCD()`.
+                        should adapt. See :meth:`~CCD.CCD()`.
 
   :param c_stem:        Defining stem positions the closed conformation
-                        should adapt. See :meth:`~promod3.loop.CCD.CCD()`.
+                        should adapt. See :meth:`~CCD.CCD()`.
 
   :param sequence:      Sequence of the conformation to be closed.
-  :param torsion_sampler: To enforce valid phi/psi ranges. Alternatively
-                          you can also pass a list of :class:`TorsionSampler`
-                          objects to assign a unique torsion sampler to
-                          every residue of the conformation to be closed.
+  :param torsion_sampler: To enforce valid phi/psi ranges. Alternatively, you
+                          can also pass a list of sampler objects to assign a
+                          unique torsion sampler to every residue of the
+                          conformation to be closed.
   :param seed:          Seed for internal random generators.
 
   :type n_stem:         :class:`ost.mol.ResidueHandle`
   :type c_stem:         :class:`ost.mol.ResidueHandle`
   :type sequence:       :class:`str`
-  :type torsion_sampler: :class:`TorsionSampler`
+  :type torsion_sampler: :class:`~promod3.loop.TorsionSampler` / :class:`list`
+                         of :class:`~promod3.loop.TorsionSampler`
   :type seed:           :class:`int`
 
   .. method:: Close(actual_positions,closed_positions)
@@ -306,8 +310,8 @@ or simple stem superposition in case of terminal sampling.
     :param actual_positions: Conformation to be closed.
     :param closed_positions: Closed conformation gets stored in here.
 
-    :type actual_positions: :class:`BackboneList`
-    :type closed_positions: :class:`BackboneList`
+    :type actual_positions: :class:`~promod3.loop.BackboneList`
+    :type closed_positions: :class:`~promod3.loop.BackboneList`
 
     :returns: Whether CCD converged
 
@@ -332,8 +336,8 @@ or simple stem superposition in case of terminal sampling.
     :param actual_positions: Conformation to be closed.
     :param closed_positions: Closed conformation gets stored in here.
 
-    :type actual_positions: :class:`BackboneList`
-    :type closed_positions: :class:`BackboneList`
+    :type actual_positions: :class:`~promod3.loop.BackboneList`
+    :type closed_positions: :class:`~promod3.loop.BackboneList`
 
     :returns: Whether CCD converged
 
@@ -359,8 +363,8 @@ or simple stem superposition in case of terminal sampling.
     :param actual_positions: Conformation to be closed.
     :param closed_positions: Closed conformation gets stored in here.
 
-    :type actual_positions: :class:`BackboneList`
-    :type closed_positions: :class:`BackboneList`
+    :type actual_positions: :class:`~promod3.loop.BackboneList`
+    :type closed_positions: :class:`~promod3.loop.BackboneList`
 
     :returns: Whether KIC found a solution
 
@@ -398,37 +402,34 @@ The scorer asses a proposed conformation and are intended to return a pseudo
 energy, the lower the better.
 
 
-.. class:: LinearScorer(scorer,start_resnum,chain_index,weights)
+.. class:: LinearScorer(scorer, start_resnum, chain_idx, linear_weights)
 
   The LinearScorer allows to combine the scores available from
-  :class:`BackboneLoopScorer` in a linear manner.
-
-  :param scorer:        Scorer Object with set environment for the particular loop
-                        modelling problem.
-  :param start_resnum:  The starting residue number of the loop. Note, that the
-                        residue numbers start from one.
-  :param chain_index:   The chain the loop belongs to.
-  :param weights:       Assigns every score, that should be combined a linear
-                        weight. Key of dict is a score name and can be any of:
-                        ["cbeta", "clash", "torsion", "cb_packing", "hbond", "ss_agreement",
-                        "reduced", "contact", "constraint"].
-                        An additional possible key is: "intercept".
-
-  :type scorer:         :class:`BackboneLoopScorer`
-  :type start_resnum:   :class:`int`
-  :type chain_index:    :class:`int`
-  :type weights:        :class:`dict`
-
-  :raises: :exc:`~exceptions.RuntimeError` if there is an invalid weight name.
-
+  :class:`~promod3.scoring.BackboneOverallScorer` in a linear manner. See
+  :meth:`~promod3.scoring.BackboneOverallScorer.CalculateLinearCombination` for a
+  detailed description of the arguments.
+
+  :param scorer: Scorer Object with set environment for the particular loop
+                 modelling problem.
+  :type scorer:  :class:`~promod3.scoring.BackboneOverallScorer`
+  :param start_resnum: Res. number defining the position in the SEQRES.
+  :type start_resnum:  :class:`int`
+  :param chain_idx: Index of chain the loop(s) belong to.
+  :type chain_idx:  :class:`int`
+  :param linear_weights: Weights for each desired scorer.
+  :type linear_weights:  :class:`dict` (keys: :class:`str`,
+                         values: :class:`float`)
+
+  :raises: :exc:`~exceptions.RuntimeError` if *linear_weights* has a *key* for
+           which no scorer exists
 
   .. method:: GetScore(bb_list)
 
-    :param bb_list:     Current loop conformation to be scored.
-
-    :type bb_list:      :class:`BackboneList`
+    :param bb_list: Loop to be scored.
+    :type bb_list:  :class:`~promod3.loop.BackboneList`
 
-    :returns:           A linear combination of the scores
+    :return: A linear combination of the scores
+    :rtype:  :class:`float`
 
 
 .. _mc-cooler-object:
@@ -442,9 +443,9 @@ to their GetTemperature function.
 
 .. class:: ExponentialCooler(change_frequency, start_temperature, cooling_factor)
 
-  The exponential cooler starts with a given **start_temperature** and counts the
-  calls to its GetTemperature function. According to the **change_frequency**, 
-  the returned temperature gets multiplied by the **cooling_factor**.
+  The exponential cooler starts with a given *start_temperature* and counts the
+  calls to its GetTemperature function. According to the *change_frequency*, 
+  the returned temperature gets multiplied by the *cooling_factor*.
 
   :param change_frequency: Frequency to change temperature
   :param start_temperature: temperature to start with
@@ -460,4 +461,4 @@ to their GetTemperature function.
 
   .. method:: Reset()
 
-    Sets current temperature back to **start_temperature**
+    Sets current temperature back to *start_temperature*
diff --git a/doc/html/_sources/modelling/pipeline.txt b/doc/html/_sources/modelling/pipeline.txt
new file mode 100644
index 00000000..db7dc9d5
--- /dev/null
+++ b/doc/html/_sources/modelling/pipeline.txt
@@ -0,0 +1,409 @@
+Modelling Pipeline
+================================================================================
+
+.. currentmodule:: promod3.modelling
+
+A protein homology modelling pipeline has the following main steps:
+
+- Build a raw model from the template (see :func:`BuildRawModel` function)
+- Perform loop modelling to close (or remove) all gaps (see functions
+  :func:`CloseSmallDeletions`, :func:`RemoveTerminalGaps`,
+  :func:`MergeGapsByDistance`, :func:`FillLoopsByDatabase`,
+  :func:`FillLoopsByMonteCarlo`, :func:`CloseLargeDeletions` or
+  :func:`CloseGaps` that calls all these functions using predefined
+  heuristics)
+- Build sidechains (see :func:`BuildSidechains` function)
+- Minimize energy of final model using molecular mechanics
+  (see :func:`MinimizeModelEnergy` function)
+
+The last steps to go from a raw model to a final model can easily be executed
+with the :func:`BuildFromRawModel` function. If you want to run and tweak the
+internal steps, you can start with the  following code and adapt it to your
+purposes:
+
+.. _modelling_steps_example:
+
+.. literalinclude:: ../../../tests/doc/scripts/modelling_steps.py
+
+
+Build Raw Modelling Handle
+--------------------------------------------------------------------------------
+
+.. class:: ModellingHandle
+
+  Handles the result for structure model building and provides high-level methods
+  to turn an initial raw model (see :func:`~promod3.modelling.BuildRawModel`)
+  into a complete protein model by removing any existing gaps.
+
+  .. attribute:: model
+
+    The resulting model. This includes one chain per target chain (in the same
+    order as the sequences in :attr:`seqres`) and (if they were included) a
+    chain named '_' for ligands. You can therefore access `model.chains` items
+    and :attr:`seqres` items with the same indexing and the optional ligand
+    chain follows afterwards.
+
+    :type: :class:`~ost.mol.EntityHandle`
+
+  .. attribute:: gaps
+
+    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.
+
+    :type: :class:`StructuralGapList`
+
+  .. attribute:: seqres
+
+    List of sequences with one :class:`~ost.seq.SequenceHandle` for each chain 
+    of the target protein.
+
+    :type: :class:`~ost.seq.SequenceList`
+
+  .. attribute:: profiles
+
+    List of profiles with one :class:`ost.seq.ProfileHandle` for each chain of
+    the target protein (same order as in :attr:`seqres`). Please note, that this
+    attribute won't be set by simply calling :func:`BuildFromRawModel`. You have
+    to fill it manually or even better by the convenient function
+    :func:`SetSequenceProfiles`,  to ensure consistency with the seqres.
+
+    :type: :class:`list` of :class:`ost.seq.ProfileHandle`
+
+  .. attribute:: psipred_predictions
+
+    List of predictions with one :class:`promod3.loop.PsipredPrediction` for
+    each chain of the target protein (same order as in :attr:`seqres`). Please
+    note, that this attribute won't be set by simply calling
+    :func:`BuildFromRawModel`. You have to fill it manually or even better by
+    the convenient function :func:`SetPsipredPredictions`,  to ensure
+    consistency with the seqres.
+
+    :type: :class:`list` of :class:`~promod3.loop.PsipredPrediction`
+
+  .. attribute:: backbone_scorer_env
+
+    Backbone score environment attached to this handle. A default environment is
+    set with :func:`SetupDefaultBackboneScoring` when needed. Additional
+    information can be added to the environment before running the pipeline
+    steps.
+
+    :type: :class:`~promod3.scoring.BackboneScoreEnv`
+
+  .. attribute:: backbone_scorer
+
+    Backbone scorer container attached to this handle. A default set of scorers
+    is initialized with :func:`SetupDefaultBackboneScoring` when needed.
+
+    :type: :class:`~promod3.scoring.BackboneOverallScorer`
+
+  .. attribute:: all_atom_scorer_env
+
+    All atom environment attached to this handle for scoring. A default
+    environment is set with :func:`SetupDefaultAllAtomScoring` 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.
+
+    :type: :class:`~promod3.loop.AllAtomEnv`
+
+  .. attribute:: all_atom_scorer
+
+    All atom scorer container attached to this handle. A default set of scorers
+    is initialized with :func:`SetupDefaultAllAtomScoring` when needed.
+
+    :type: :class:`~promod3.scoring.AllAtomOverallScorer`
+
+  .. attribute:: all_atom_sidechain_env
+
+    All atom environment attached to this handle for sidechain reconstruction. A
+    default environment is set with :func:`SetupDefaultAllAtomScoring` when
+    needed.
+
+    :type: :class:`~promod3.loop.AllAtomEnv`
+
+  .. attribute:: sidechain_reconstructor
+
+    A sidechain reconstructor to add sidechains to loops prior to all atom
+    scoring. A default one is set with :func:`SetupDefaultAllAtomScoring` when
+    needed.
+
+    :type: :class:`~promod3.modelling.SidechainReconstructor`
+
+  .. method:: Copy()
+
+    Generates a deep copy. Everything will be copied over to the returned
+    :class:`ModellingHandle`, except the potentially set scoring members
+    :attr:`~ModellingHandle.backbone_scorer`,
+    :attr:`~ModellingHandle.backbone_scorer_env`,
+    :attr:`~ModellingHandle.all_atom_scorer_env`,
+    :attr:`~ModellingHandle.all_atom_scorer`,
+    :attr:`~ModellingHandle.all_atom_sidechain_env` and
+    :attr:`~ModellingHandle.sidechain_reconstructor`.
+
+    :return: A deep copy of the current handle
+    :rtype:  :class:`ModellingHandle`
+
+
+.. function:: BuildRawModel(aln, include_ligands=False, chain_names=\
+              "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz",\
+              spdbv_style=False)
+
+  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.
+
+  Each alignment handle must contain exactly two sequences and the second
+  sequence is considered the template sequence, which must have a 
+  :class:`~ost.mol.EntityView` attached.
+
+  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.
+
+  The function tries to reuse as much as possible from the template. Modified
+  residues are treated as follows:
+
+    - Selenium methionine residues are converted to methionine
+
+    - Side chains which contain all atoms of the parent amino acid, e.g.
+      phosphoserine are copied as a whole with the modifications stripped off.
+
+  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.
+
+  Residue numbers are set such that missing residue in gaps are honoured and
+  subsequent loop modelling can insert new residues without having to renumber.
+  **The numbering of residues starts for every chain with the value 1**.
+  
+  The returned :class:`ModellingHandle` stores the obtained raw model as well
+  as information about insertions and deletions in the gaps list.
+
+  :param aln: Single alignment handle for raw model with single chain or
+              list of alignment handles for raw model with multiple chains.
+  :type aln:  :class:`~ost.seq.AlignmentHandle` / :class:`~ost.seq.AlignmentList`
+
+  :param include_ligands: 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 `ligand` 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
+                          '_'.
+  :type include_ligands:  :class:`bool`
+
+  :param chain_names: Chains are named by a single chanacter taken from this.
+  :type chain_names:  :class:`str`
+
+  :param spdbv_style: True, if we need a model in the old SPDBV style.
+  :type spdbv_style:  :class:`bool`
+
+  :return: Raw (pseudo) model from the alignment.
+  :rtype:  :class:`ModellingHandle`
+
+  :raises: A :exc:`RuntimeError` when: 
+           
+           - the alignments do not have two sequences
+           - the second sequence does not have an attached structure
+           - the residues of the template structure do not match with the
+             alignment sequence (note that you can set an "offset" (see
+             :meth:`~ost.seq.AlignmentHandle.SetSequenceOffset`) for the
+             template sequence (but not for the target))
+           - the target sequence has a non-zero offset (cannot be honored as
+             the resulting model will always start its residue numbering at 1)
+
+The Default Pipeline
+--------------------------------------------------------------------------------
+
+.. autofunction:: BuildFromRawModel
+
+
+Modelling Steps
+--------------------------------------------------------------------------------
+
+
+.. function:: SetupDefaultBackboneScoring(mhandle)
+
+    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:
+
+    - "cb_packing": :class:`~promod3.scoring.CBPackingScorer`
+    - "cbeta": :class:`~promod3.scoring.CBetaScorer`
+    - "reduced": :class:`~promod3.scoring.ReducedScorer`
+    - "clash": :class:`~promod3.scoring.ClashScorer`
+    - "hbond": :class:`~promod3.scoring.HBondScorer`
+    - "ss_agreement": :class:`~promod3.scoring.SSAgreementScorer`
+    - "torsion": :class:`~promod3.scoring.TorsionScorer`
+    - "pairwise": :class:`~promod3.scoring.PairwiseScorer`
+    - "density": :class:`~promod3.scoring.DensityScorer`
+
+    :param mhandle: The modelling handle. This will set the properties
+                    :attr:`~ModellingHandle.backbone_scorer` and
+                    :attr:`~ModellingHandle.backbone_scorer_env` of `mhandle`.
+    :type mhandle:  :class:`~promod3.modelling.ModellingHandle`
+
+.. function:: IsBackboneScoringSetUp(mhandle)
+
+  :return: True, if :attr:`~ModellingHandle.backbone_scorer` and 
+           :attr:`~ModellingHandle.backbone_scorer_env` of `mhandle` are set.
+  :rtype:  :class:`bool`
+  :param mhandle: Modelling handle to check.
+  :type mhandle:  :class:`ModellingHandle`
+
+.. function:: SetupDefaultAllAtomScoring(mhandle)
+
+    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:
+
+    - "aa_interaction": :class:`~promod3.scoring.AllAtomInteractionScorer`
+    - "aa_packing": :class:`~promod3.scoring.AllAtomPackingScorer`
+    - "aa_clash": :class:`~promod3.scoring.AllAtomClashScorer`
+
+    :param mhandle: The modelling handle. This will set the properties
+                    :attr:`~ModellingHandle.all_atom_scorer_env`,
+                    :attr:`~ModellingHandle.all_atom_scorer`,
+                    :attr:`~ModellingHandle.all_atom_sidechain_env` and
+                    :attr:`~ModellingHandle.sidechain_reconstructor`.
+    :type mhandle:  :class:`~promod3.modelling.ModellingHandle`
+
+.. function:: IsAllAtomScoringSetUp(mhandle)
+
+  :return: True, if :attr:`~ModellingHandle.all_atom_scorer_env`,
+           :attr:`~ModellingHandle.all_atom_scorer`,
+           :attr:`~ModellingHandle.all_atom_sidechain_env` and
+           :attr:`~ModellingHandle.sidechain_reconstructor` of `mhandle` are set.
+  :rtype:  :class:`bool`
+  :param mhandle: Modelling handle to check.
+  :type mhandle:  :class:`ModellingHandle`
+
+.. function:: InsertLoop(mhandle, bb_list, start_resnum, chain_idx)
+
+  Insert loop into model and ensure consistent updating of scoring environments.
+  Note that we do not update :attr:`~ModellingHandle.all_atom_scorer_env` as
+  that one is meant to be updated only while scoring. To clear a gap while
+  inserting a loop, use the simpler :meth:`InsertLoopClearGaps`.
+
+  :param mhandle: Modelling handle on which to apply change.
+  :type mhandle:  :class:`ModellingHandle`
+  :param bb_list: Loop to insert (backbone only).
+  :type bb_list:  :class:`~promod3.loop.BackboneList`
+  :param start_resnum: Res. number defining the start position in the SEQRES.
+  :type start_resnum:  :class:`int`
+  :param chain_idx: Index of chain the loop belongs to.
+  :type chain_idx:  :class:`int`
+
+.. function:: RemoveTerminalGaps(mhandle)
+
+  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.
+
+  :param mhandle: Modelling handle on which to apply change.
+  :type mhandle:  :class:`ModellingHandle`
+
+  :return: Number of gaps which were removed.
+  :rtype:  :class:`int`
+
+.. function:: ReorderGaps(mhandle)
+
+  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. 
+
+.. function:: MergeMHandle(source_mhandle, target_mhandle, source_chain_idx, \
+                           target_chain_idx, start_resnum, end_resnum, transform)
+
+  Merges the specified stretch of **source_mhandle** into **target_mhandle** by
+  replacing all structural information and gaps in the stretch 
+  **start_resnum** and **end_resnum** (inclusive). The residues specified by 
+  **start_resnum** and **end_resnum** must be valid in the source_mhandle, 
+  i.e. not be enclosed by a gap. If a gap encloses **start_resnum** or 
+  **end_resnum** in the **target_mhandle**, 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 **target_mhandle**.
+
+  :param source_mhandle:  Source of structural information and gaps
+  :param target_mhandle:  Structural information and gaps will be copied in here
+  :param source_chain_idx:  This is the chain where the info comes from
+  :param target_chain_idx:  This is the chain where the info goes to
+  :param start_resnum:  First residue of the copied stretch
+  :param end_resnum:    Last residue of the copied stretch
+  :param transform:     Transformation to be applied to all atom positions when
+                        they're copied over
+
+  :type source_mhandle: :class:`ModellingHandle`
+  :type target_mhandle: :class:`ModellingHandle`
+  :type source_chain_idx: :class:`int`
+  :type target_chain_idx: :class:`int`
+  :type start_resnum:   :class:`int`
+  :type end_resnum:     :class:`int`
+  :type transform:      :class:`ost.geom.Mat4`
+
+  :raises: A :exc:`RuntimeError` when: 
+           
+           - the chain indices are invalid
+           - the SEQRES of the specified chains do not match
+           - the start and end residue numbers are invalid or when the residues
+             at the specified positions in the **source_mhandle** do not exist
+           - a gap in the **source_mhandle** encloses the residues specified by
+             **start_resnum** and **end_resnum**
+
+.. function:: SetSequenceProfiles(mhandle, profiles)
+
+  Sets the :attr:`sequence profiles <ModellingHandle.profiles>` of **mhandle**
+  while ensuring consistency with the :attr:`~ModellingHandle.seqres`.
+
+  :param mhandle:  Will have the profiles attached afterwards
+  :param profiles: The sequence profiles to attach
+
+  :type mhandle:   :class:`ModellingHandle`
+  :type profiles:  :class:`list` of :class:`ost.seq.ProfileHandle`
+
+  :raises: :class:`ValueError` when the given **profiles** are not consistent
+           with seqres in **mhandle**
+
+
+.. function:: SetPsipredPredictions(mhandle, predictions)
+
+  Sets the :attr:`predictions <ModellingHandle.psipred_predictions>` of
+  **mhandle** while ensuring consistency with the
+  :attr:`~ModellingHandle.seqres`.
+
+  :param mhandle:     Will have the predictions attached afterwards
+  :param predictions: The predictions to attach
+
+  :type mhandle:      :class:`ModellingHandle`
+  :type predictions:  :class:`list` of :class:`~promod3.loop.PsipredPrediction`
+
+  :raises: :class:`ValueError` when the given **predictions** are not consistent
+           with seqres in **mhandle**
+
+
+
+.. autofunction:: CloseGaps
+
+.. autofunction:: CloseSmallDeletions
+
+.. autofunction:: MergeGapsByDistance
+
+.. autofunction:: FillLoopsByDatabase
+
+.. autofunction:: FillLoopsByMonteCarlo
+
+.. autofunction:: CloseLargeDeletions
+
+.. autofunction:: ModelTermini
+
+.. autofunction:: BuildSidechains
+
+.. autofunction:: MinimizeModelEnergy
+
+.. autofunction:: CheckFinalModel
+
diff --git a/doc/html/_sources/modelling/sidechain_reconstruction.txt b/doc/html/_sources/modelling/sidechain_reconstruction.txt
new file mode 100644
index 00000000..72e93a0a
--- /dev/null
+++ b/doc/html/_sources/modelling/sidechain_reconstruction.txt
@@ -0,0 +1,220 @@
+Sidechain Reconstruction
+================================================================================
+
+.. currentmodule:: promod3.modelling
+
+Two methods are provided to fully reconstruct sidechains of residues:
+
+- the :func:`ReconstructSidechains` function handles a full OST
+  :class:`~ost.mol.EntityHandle`
+- the :class:`SidechainReconstructor` is linked to an all atom environment
+  and used to reconstruct sidechains of single loops
+
+Example usage:
+
+.. literalinclude:: ../../../tests/doc/scripts/modelling_reconstruct_sidechains.py
+
+.. literalinclude:: ../../../tests/doc/scripts/modelling_sidechain_reconstructor.py
+
+
+
+Reconstruct Function
+--------------------------------------------------------------------------------
+
+.. autofunction:: ReconstructSidechains
+
+
+SidechainReconstructor Class
+--------------------------------------------------------------------------------
+
+.. class:: SidechainReconstructor(keep_sidechains=True, build_disulfids=True, \
+                                  optimize_subrotamers=False, \
+                                  remodel_cutoff=20, \
+                                  rigid_frame_cutoff=0, \
+                                  graph_max_complexity=100000000, \
+                                  graph_intial_epsilon=0.02, \
+                                  disulfid_score_thresh=45)
+
+  Reconstruct sidechains for single loops or residues. Must be linked to an 
+  all atom env. (:meth:`AttachEnvironment`) containing the structural data. 
+  Residues are identified as N- or C-terminal according to the seqres in the 
+  environment. This means that residues preceeded / followed by gaps are not 
+  treated as terminal! In the reconstruction procedure you can specify 
+  residues that should be remodelled. Everything within *remodel_cutoff* will
+  also be considered and potentially remodelled. To enforce the visibility
+  of the rigid frame to all of those close residues you can specify the 
+  *rigid_frame_cutoff*. In the example of *remodel_cutoff*\=20 and 
+  *rigid_frame_cutoff*\=10, all residues within 20A of any of the input residues
+  will be considered for remodelling. Everything further away than 20A but 
+  within 20A + 10A = 30A will also be considered as rigid frame (all 
+  backbone atoms and the sidechain if present). The distance criteria is the
+  CB atom distance between residues (CA in case of glycine).
+
+  :param keep_sidechains: Flag, whether complete sidechains in env. (i.e. 
+                          containing all required atoms) should be kept rigid
+                          and directly be added to the result.
+  :type keep_sidechains: :class:`bool`
+
+  :param build_disulfids: Flag, whether possible disulfid bonds should be 
+                          searched. If a disulfid bond is found, the two
+                          participating cysteins are fixed and added to
+                          the result.
+  :type build_disulfids: :class:`bool`
+
+  :param optimize_subrotamers: Flag, whether the
+                               :func:`~promod3.sidechain.SubrotamerOptimizer`
+                               with default parametrization should be called 
+                               if we're dealing with FRM rotamers.
+  :type optimize_subrotamers:  :class:`bool`
+
+  :param remodel_cutoff: Cutoff to identify all residues that need to be 
+                         remodelled.
+  :type remodel_cutoff:  :class:`float`
+
+  :param rigid_frame_cutoff: Cutoff to control the visibility of the rigid
+                             frame to the reconstruction procedure.
+                             Everything within 
+                             \[*remodel_cutoff*, 
+                             *remodel_cutoff* + *rigid_frame_cutoff*\]
+                             will be considered as ridig frame. Small sidenote:
+                             if the *keep_sidechains* flag is true and all 
+                             residues within *remodel_cutoff* already have a 
+                             sidechain, the *rigid_frame_cutoff* won't have any
+                             effect. 
+  :type rigid_frame_cutoff: :class:`float`
+
+  :param graph_max_complexity: Max. complexity for
+                               :meth:`promod3.sidechain.RotamerGraph.TreeSolve`.
+  :type graph_max_complexity:  :class:`int`
+  :param graph_intial_epsilon: Initial epsilon for
+                               :meth:`promod3.sidechain.RotamerGraph.TreeSolve`.
+  :type graph_intial_epsilon:  :class:`float`
+
+  :param disulfid_score_thresh: If :meth:`DisulfidScore` between two CYS is
+                                below this threshold, we consider them to be
+                                disulfid-bonded.
+  :type disulfid_score_thresh:  :class:`float`
+
+
+  .. method:: Reconstruct(start_resnum, num_residues, chain_idx=0)
+              Reconstruct(start_resnum_list, num_residues_list, chain_idx_list)
+
+    Reconstruct sidechains for one or several loops extracted from environment.
+    Overlapping loops are merged and 0-length loops are removed. All residues in
+    the loop(s) are expected to contain valid CB positions (or CA for GLY),
+    which are used to look for other potentially relevant residues in the
+    surrounding. The resulting structural data will contain all residues in the
+    loop(s) and in the surrounding with all backbone and sidechain heavy atom
+    positions set.
+
+    Note that the structural data of the loop(s) is expected to be in the linked
+    environment before calling this!
+
+    :param start_resnum: Start of loop.
+    :type start_resnum:  :class:`int` / :class:`ost.mol.ResNum`
+    :param num_residues: Length of loop.
+    :type num_residues:  :class:`int`
+    :param chain_idx: Chain the loop belongs to.
+    :type chain_idx:  :class:`int`
+    
+    :param start_resnum_list: Starts of loops.
+    :type start_resnum_list:  :class:`list` of :class:`int`
+    :param num_residues_list: Lengths of loops.
+    :type num_residues_list:  :class:`list` of :class:`int`
+    :param chain_idx_list: Chains the loops belong to.
+    :type chain_idx_list:  :class:`list` of :class:`int`
+
+    :return: A helper object with all the reconstruction results.
+    :rtype:  :class:`SidechainReconstructionData`
+
+    :raises: :exc:`~exceptions.RuntimeError` if reconstructor was never attached
+             to an environment or if parameters lead to invalid / unset
+             positions in environment.
+
+  .. method:: AttachEnvironment(env, use_frm=True, use_bbdep_lib=True)
+              AttachEnvironment(env, use_frm, rotamer_library)
+    
+    Link reconstructor to given *env*. A helper class is used in the background
+    to provide sidechain-objects for the environment. As this class is reused by
+    every reconstructor linked to *env*, the used parameters must be consistent
+    if multiple reconstructors are used (or you must use a distinct *env*).
+
+    :param env: Link to this environment.
+    :type env:  :class:`~promod3.loop.AllAtomEnv`
+    :param use_frm: If True, use flexible rotamer model, else rigid.
+    :type use_frm:  :class:`bool`
+    :param use_bbdep_lib: If True, use default backbone dependent rot. library
+                          (:meth:`Dunbrack <LoadDunbrackLib>`), else use
+                          backbone independent one
+                          (:meth:`Penultimate <LoadPenultimateLib>`).
+    :type use_bbdep_lib:  :class:`bool`
+    :param rotamer_library: Custom rotamer library to be used.
+    :type rotamer_library:  :class:`BBDepRotamerLib` / :class:`RotamerLib`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *env* was already linked to
+            another reconstructor with inconsistent parameters. Acceptable
+            changes:
+
+            - *keep_sidechains* = True, if previously False
+            - *build_disulfids* = False, if previously True
+
+The SidechainReconstructionData class
+--------------------------------------------------------------------------------
+
+.. class:: SidechainReconstructionData
+
+  Contains the results of a sidechain reconstruction
+  (:meth:`SidechainReconstructor.Reconstruct`). All attributes are read only!
+
+  .. attribute:: env_pos
+
+    Container for structural data and mapping to the internal residue indices
+    of the used :class:`~promod3.loop.AllAtomEnv`. Useful for scoring and env.
+    updates.
+
+    :type: :class:`~promod3.loop.AllAtomEnvPositions`
+
+  .. attribute:: loop_start_indices
+                 loop_lengths
+
+    The first *sum(loop_lengths)* residues in
+    :attr:`~promod3.loop.AllAtomEnvPositions.res_indices` of *env_pos* are
+    guaranteed to belong to the actual input, all the rest comes from the close
+    environment.
+
+    Each input loop (apart from overlapping and 0-length loops) is defined by an
+    entry in *loop_start_indices* and *loop_lengths*. For loop *i_loop*,
+    *res_indices[loop_start_indices[i_loop]]* is the N-stem and
+    *res_indices[loop_start_indices[i_loop] + loop_lengths[i_loop] - 1]* is the
+    C-stem of the loop. The loop indices are contiguous in *res_indices* between
+    the stems.
+
+    :type: :class:`list` of :class:`int`
+
+  .. attribute:: rotamer_res_indices
+
+    Indices of residues within *env_pos* for which we generated a new sidechain
+    (in [*0, len(env_pos.res_indices)-1*]).
+
+    :type: :class:`list` of :class:`int`
+
+  .. attribute:: disulfid_bridges
+
+    Pairs of residue indices within *env_pos* for which we generated a disulfid
+    bridge (indices in [*0, len(env_pos.res_indices)-1*]).
+
+    :type: :class:`list` of :class:`tuple` with two :class:`int`
+
+  .. attribute:: is_n_ter
+
+    True/False depending on whether a given residue in *env_pos* is N-terminal
+    in the environment (same length as *env_pos.res_indices*)
+
+    :type: :class:`list` of :class:`bool`
+
+  .. attribute:: is_c_ter
+
+    True/False depending on whether a given residue in *env_pos* is C-terminal
+    in the environment (same length as *env_pos.res_indices*)
+
+    :type: :class:`list` of :class:`bool`
diff --git a/doc/html/_sources/portableIO.txt b/doc/html/_sources/portableIO.txt
index 26044c63..d7122a20 100644
--- a/doc/html/_sources/portableIO.txt
+++ b/doc/html/_sources/portableIO.txt
@@ -1,6 +1,6 @@
 .. _portableIO:
 
-Using binary files in |project|
+Using Binary Files In |project|
 ===============================================================================
 A few features in |project| (and potentially your next addition) require binary
 files to be loaded and stored. Here, we provide guidelines and describe helper
@@ -28,9 +28,8 @@ converter which loads the portable file and stores a raw binary file for
 further use. Storing and loading of raw binary files on the same machine with
 the same compiler should never be an issue.
 
-The classes :class:`~promod3.loop.TorsionSampler`,
+For instance, the classes :class:`~promod3.loop.TorsionSampler`,
 :class:`~promod3.loop.FragDB`, :class:`~promod3.loop.StructureDB`,
-:class:`~promod3.loop.BackboneLoopScorer`,
 :class:`~promod3.sidechain.BBDepRotamerLib` and
 :class:`~promod3.sidechain.RotamerLib` use this approach and the conversion is
 automatically done in the ``make`` process. Code examples are given in the unit
@@ -67,7 +66,7 @@ All functions are templatized to work with any |ost_s|-like data sink or source
 and overloaded to work with ``std::ofstream`` and ``std::ifstream``.
 
 --------------------------------------------------------------------------------
-Portable binary data
+Portable Binary Data
 --------------------------------------------------------------------------------
 
 Portable files are written/read with functions and classes provided in the
@@ -116,7 +115,7 @@ Implementation notes:
 - you can use ``ds.IsSource()`` to distinguish sources and sinks.
 
 --------------------------------------------------------------------------------
-Code example
+Code Example
 --------------------------------------------------------------------------------
 
 Here is an example of a class which provides functionality for portable
@@ -345,15 +344,13 @@ and non-portable I/O:
   }
 
 --------------------------------------------------------------------------------
-Exisiting binary files
+Exisiting Binary Files
 --------------------------------------------------------------------------------
 
 The following binary files are currently in |project|:
 
 - module ``loop``:
 
-  - :file:`backbone_loop_scorer.dat`
-    (:class:`~promod3.loop.BackboneLoopScorer`)
   - :file:`frag_db.dat`
     (:class:`~promod3.loop.FragDB`)
   - :file:`structure_db.dat`
@@ -366,6 +363,27 @@ The following binary files are currently in |project|:
     (:class:`~promod3.loop.TorsionSampler`)
   - :file:`torsion_sampler_helical.dat`
     (:class:`~promod3.loop.TorsionSampler`)
+  - :file:`ff_lookup_charmm.dat`
+    (:class:`~promod3.loop.ForcefieldLookup`)
+
+- module ``scoring``:
+
+  - :file:`cbeta_scorer.dat`
+    (:class:`~promod3.scoring.CBetaScorer`)
+  - :file:`cb_packing_scorer.dat`
+    (:class:`~promod3.scoring.CBPackingScorer`)
+  - :file:`hbond_scorer.dat`
+    (:class:`~promod3.scoring.HBondScorer`)
+  - :file:`reduced_scorer.dat`
+    (:class:`~promod3.scoring.ReducedScorer`)
+  - :file:`ss_agreement_scorer.dat`
+    (:class:`~promod3.scoring.SSAgreementScorer`)
+  - :file:`torsion_scorer.dat`
+    (:class:`~promod3.scoring.TorsionScorer`)
+  - :file:`aa_scorer.dat`
+    (:class:`~promod3.scoring.AllAtomInteractionScorer`)
+  - :file:`aa_packing_scorer.dat`
+    (:class:`~promod3.scoring.AllAtomPackingScorer`)
 
 - module ``sidechain``:
 
diff --git a/doc/html/_sources/scoring/all_atom_scorers.txt b/doc/html/_sources/scoring/all_atom_scorers.txt
new file mode 100644
index 00000000..56370392
--- /dev/null
+++ b/doc/html/_sources/scoring/all_atom_scorers.txt
@@ -0,0 +1,306 @@
+All Atom Scorers
+================================================================================
+
+.. currentmodule:: promod3.scoring
+
+
+AllAtomOverallScorer class
+--------------------------------------------------------------------------------
+
+.. class:: AllAtomOverallScorer
+
+  Container that allows for the storage of multiple scorers identified by a key
+  (:class:`str`) and the computation of combined scores.
+
+  Scorers need to be individually set or loaded by 
+  :func:`LoadDefaultAllAtomOverallScorer()`
+
+  .. method:: Contains(key)
+
+    :return: True, if a scorer object for this key was already added.
+    :rtype:  :class:`bool`
+    :param key: Key for desired scorer.
+    :type key:  :class:`str`
+
+  .. method:: Get(key)
+
+    :return: Scorer with the given *key* (read-only access).
+    :rtype:  :class:`AllAtomScorer`
+    :param key: Key for desired scorer.
+    :type key:  :class:`str`
+    :raises: :exc:`~exceptions.RuntimeError` if there is no scorer with that
+             *key*.
+
+  .. method:: AttachEnvironment(env)
+
+    :param env: Link all scorers to this score environment.
+    :type env:  :class:`~promod3.loop.AllAtomEnv`
+
+  .. method:: CalculateLinearCombination(linear_weights, start_resnum, \
+                                         num_residues, chain_idx=0)
+
+    Calculate linear combination of scores for the desired loop (extracted from
+    environment) against the set environment (see
+    :meth:`AllAtomScorer.CalculateScore`).
+
+    :param linear_weights: Weights for each desired scorer. You can add a
+                           constant value to each score by defining a weight
+                           with key "intercept".
+    :type linear_weights:  :class:`dict` (keys: :class:`str`,
+                           values: :class:`float`)
+    :param start_resnum: Res. number defining the position in the SEQRES
+                         (see :class:`~promod3.loop.AllAtomEnv` for indexing)
+    :type start_resnum:  :class:`int` / :class:`ost.mol.ResNum`
+    :param num_residues: Length of loop.
+    :type num_residues:  :class:`int`
+    :param chain_idx: Index of chain the loop belongs to
+                      (see :class:`~promod3.loop.AllAtomEnv` for indexing)
+    :type chain_idx:  :class:`int`
+
+    :return: Score for the given set of atoms.
+    :rtype:  :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *linear_weights* has a *key* for
+             which no scorer exists or anything raised in
+             :meth:`AllAtomScorer.CalculateScore` for any of the used scorers.
+
+  .. method:: __getitem__(key)
+              __setitem__(key)
+
+    Allow read/write access (with [*key*]) to scorer object with given key.
+
+    :param key: Key for desired scorer.
+    :type key:  :class:`str`
+
+.. function:: LoadDefaultAllAtomOverallScorer()
+
+  :returns: Loads or creates the default scorers accessible through 
+            following keys:
+            "aa_interaction", "aa_packing", "aa_clash"
+  :rtype:   :class:`AllAtomOverallScorer`
+
+AllAtomScorer base class
+--------------------------------------------------------------------------------
+
+.. class:: AllAtomScorer
+
+  Base class for all the all atom scorers listed below.
+
+  .. method:: AttachEnvironment(env)
+
+    :param env: Link scorer to this score environment.
+    :type env:  :class:`~promod3.loop.AllAtomEnv`
+
+  .. method:: CalculateScore(start_resnum, num_residues, chain_idx=0)
+
+    Calculates score for the desired loop (extracted from environment) against
+    the set environment. Unless otherwise noted in the scorer, a lower "score"
+    is better!
+
+    Note that the structural data of the loop is expected to be in the linked
+    environment before calling this! This behavior is different from the
+    corresponding function in :class:`BackboneScorer` as, for performance
+    reasons, we require all the comparisons to be done against the environment.
+
+    :param start_resnum: Res. number defining the position in the SEQRES
+                         (see :class:`~promod3.loop.AllAtomEnv` for indexing)
+    :type start_resnum:  :class:`int` / :class:`ost.mol.ResNum`
+    :param num_residues: Length of loop.
+    :type num_residues:  :class:`int`
+    :param chain_idx: Index of chain the loop belongs to
+                      (see :class:`~promod3.loop.AllAtomEnv` for indexing)
+    :type chain_idx:  :class:`int`
+
+    :return: Score for the given set of atoms.
+    :rtype:  :class:`float`
+
+    :raises: (for most scorers) :exc:`~exceptions.RuntimeError` if scorer was
+             never attached to a score environment, if scorer has never been
+             properly initialized or if *chain_index* / *start_resnum* lead to
+             invalid positions.
+
+  .. method:: CalculateScoreProfile(start_resnum, num_residues, chain_idx=0)
+
+    Calculates per residue scores for the desired loop (extracted from
+    environment) against the set environment.
+
+    Note that the structural data of the loop is expected to be in the linked
+    environment before calling this! This behavior is different from the
+    corresponding function in :class:`BackboneScorer` as, for performance
+    reasons, we require all the comparisons to be done against the environment.
+
+    :param start_resnum: Res. number defining the position in the SEQRES
+                         (see :class:`~promod3.loop.AllAtomEnv` for indexing)
+    :type start_resnum:  :class:`int` / :class:`ost.mol.ResNum`
+    :param num_residues: Length of loop.
+    :type num_residues:  :class:`int`
+    :param chain_idx: Index of chain the loop belongs to
+                      (see :class:`~promod3.loop.AllAtomEnv` for indexing)
+    :type chain_idx:  :class:`int`
+
+    :return: Scores for the given loop, one for each residue.
+    :rtype:  :class:`list` of :class:`float`
+
+    :raises: same :exc:`~exceptions.RuntimeError` as :meth:`CalculateScore`.
+
+
+AllAtomInteractionScorer class
+--------------------------------------------------------------------------------
+
+.. class:: AllAtomInteractionScorer(cutoff, bins, seq_sep)
+
+  Inherits all functionality of :class:`AllAtomScorer`. Evaluates a pairwise
+  pseudo interaction energy between all atoms which are located within a
+  *cutoff* and which are at least *seq_sep* residues apart. An energy is
+  assigned to each distance using equally sized bins and distinguishing all
+  possible pairs of atoms (usually the energy only differs for chemically
+  distinguishable heavy atoms). The calculated score is normalized by the number
+  of interacting atom pairs.
+
+  The scorer needs to be initialized either by loading a predefined scorer (e.g.
+  :func:`LoadAllAtomInteractionScorer`) or by setting all energies (see :meth:`SetEnergy`).
+
+  :param cutoff: Radius in which other atoms are counted.
+  :type cutoff:  :class:`float`
+  :param bins: Number of equally sized bins to discretize distances (range
+               of [0,*cutoff*]).
+  :type bins:  :class:`int`
+  :param seq_sep: Minimal separation in sequence two residues must have to
+                  be considered.
+  :type seq_sep:  :class:`int`
+
+  :raises: :exc:`~exceptions.RuntimeError` if *cutoff* < 0, *bins* < 1 or
+           *seq_sep* < 1.
+
+  .. staticmethod:: Load(filename)
+                    LoadPortable(filename)
+
+    Loads raw binary file generated with :meth:`Save` (optimized for fast
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
+
+    :param filename: Path to the file from which to load.
+    :type filename:  :class:`str`
+
+    :returns: The loaded scorer
+    :rtype:   :class:`AllAtomInteractionScorer`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
+
+  .. method:: Save(filename)
+              SavePortable(filename)
+
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
+
+    :param filename: Path to the file where it will be saved.
+    :type filename:  :class:`str`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
+
+  .. method:: SetEnergy(aaa1, aaa2, bin, energy)
+
+    Setup one energy value. Unless a predefined scorer is loaded, this must be
+    called for every pair of heavy atom types and for every *bin* < *bins*.
+
+    :param aaa1: Heavy atom type for first interaction partner.
+    :type aaa1:  :class:`~promod3.loop.AminoAcidAtom`
+    :param aaa2: Heavy atom type for second interaction partner.
+    :type aaa2:  :class:`~promod3.loop.AminoAcidAtom`
+    :param bin: Discrete bin describing the interaction distance.
+    :type bin:  :class:`int`
+    :param energy: Energy to set for those parameters.
+    :type energy:  :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if inputs are invalid
+
+
+.. function:: LoadAllAtomInteractionScorer()
+
+  :returns: The default predefined AllAtomInteractionScorer (loaded from disk)
+  :rtype:   :class:`AllAtomInteractionScorer`
+
+
+AllAtomPackingScorer class
+--------------------------------------------------------------------------------
+
+.. class:: AllAtomPackingScorer(cutoff, max_count)
+
+  Inherits all functionality of :class:`AllAtomScorer`. Evaluates pseudo
+  energies by counting surrounding atoms within a certain *cutoff* radius around
+  all heavy atoms not belonging to the assessed residue itself. The calculated
+  score is normalized by the number of atoms being assessed.
+
+  The scorer needs to be initialized either by loading a predefined scorer (e.g.
+  :func:`LoadAllAtomPackingScorer`) or by setting all energies (see
+  :meth:`SetEnergy`).
+
+  :param cutoff: Radius in which other atoms are counted.
+  :type cutoff:  :class:`float`
+  :param max_count: If number of other atoms exceeds *max_count*, it will
+                    be set to this number.
+  :type max_count:  :class:`int`
+
+  :raises: :exc:`~exceptions.RuntimeError` if *cutoff* < 0, *max_count* < 1.
+
+  .. staticmethod:: Load(filename)
+                    LoadPortable(filename)
+
+    Loads raw binary file generated with :meth:`Save` (optimized for fast
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
+
+    :param filename: Path to the file from which to load.
+    :type filename:  :class:`str`
+
+    :returns: The loaded scorer
+    :rtype:   :class:`AllAtomPackingScorer`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
+
+  .. method:: Save(filename)
+              SavePortable(filename)
+
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
+
+    :param filename: Path to the file where it will be saved.
+    :type filename:  :class:`str`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
+
+  .. method:: SetEnergy(aaa, count, energy)
+
+    Setup one energy value. Unless a predefined scorer is loaded, this must be
+    called for every heavy atom type and for every *count* <= *max_count*.
+
+    :param aaa: Heavy atom type for which to set energy.
+    :type aaa:  :class:`~promod3.loop.AminoAcidAtom`
+    :param count: Number of surrounding atoms for which to set energy.
+    :type count:  :class:`int`
+    :param energy: Energy to set for those parameters.
+    :type energy:  :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if inputs are invalid
+
+
+.. function:: LoadAllAtomPackingScorer()
+
+  :returns: The default predefined AllAtomPackingScorer (loaded from disk)
+  :rtype:   :class:`AllAtomPackingScorer`
+
+
+AllAtomClashScorer class
+--------------------------------------------------------------------------------
+
+.. class:: AllAtomClashScorer
+
+  Inherits all functionality of :class:`AllAtomScorer`. Calculates a simple
+  clash score of all atoms against the environment. There is no need to define
+  any parameters here as all interaction energies are fixed (see Eq. (11) in
+  [canutescu2003b]_). The calculated score is normalized by the number of atoms
+  being assessed.
diff --git a/doc/html/_sources/scoring/backbone_score_env.txt b/doc/html/_sources/scoring/backbone_score_env.txt
new file mode 100644
index 00000000..f9c1e18c
--- /dev/null
+++ b/doc/html/_sources/scoring/backbone_score_env.txt
@@ -0,0 +1,265 @@
+Backbone Score Environment
+================================================================================
+
+.. currentmodule:: promod3.scoring
+
+BackboneScoreEnv class
+--------------------------------------------------------------------------------
+
+.. class:: BackboneScoreEnv(seqres)
+
+  The backbone score environment contains and handles all model-specific data
+  used by the scorers. It is linked to a (list of) seqres (one per chain) at
+  construction. The idea is to initialize it at the beginning of the modelling
+  process with all known data (positions extracted from template, psipred
+  prediction, density map, etc) and then update the environment whenever a new
+  loop is being added. Note that, depending on the used scorers, some
+  information must be provided for the score to make sense and any env. data can
+  be set at any time before actually calculating a score.
+
+  :param seqres: Internal SEQRES to be set (single chain or list with one per
+                 chain). Whenever setting structural data, consistency with this SEQRES is enforced.
+  :type seqres:  :class:`str` / :class:`ost.seq.SequenceHandle` / 
+                 :class:`list` of :class:`str` / :class:`ost.seq.SequenceList`
+
+  To access parts of the environment there are two key arguments to consider:
+
+  * *chain_idx*: Index of chain as it occurs in *seqres* (0 for single sequence)
+  * *start_resnum*: Residue number defining the position in the SEQRES of chain
+    with index *chain_idx*. **The numbering starts for every chain with the
+    value 1**.
+
+  .. method:: Copy()
+ 
+    :returns: A copy of the current :class:`BackboneScoreEnv` without any scorers
+              attached
+    :rtype: :class:`BackboneScoreEnv`
+
+  .. method:: SetInitialEnvironment(env_structure)
+
+    Sets structural environment with which loops to be scored interact. If
+    structural data was already set, all the existing data gets cleared first.
+
+    :param env_structure:  Structral data to be set as environment. The chains
+                           in *env_structure* are expected to be in the same
+                           order as the SEQRES items provided in constructor.
+    :type env_structure:   :class:`ost.mol.EntityHandle`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if *env* is inconsistent with
+              SEQRES set in constructor. This can be because of corrupt residue
+              numbers or sequence mismatches.
+
+  .. method:: SetEnvironment(bb_list, start_resnum, chain_idx=0)
+
+    Add/update structural information in environment. If structural data for
+    specific residues is already set, the data gets resetted for these
+    positions.
+
+    :param bb_list: Structural data to be set as environment.
+    :type bb_list:  :class:`~promod3.loop.BackboneList`
+    :param start_resnum: Res. number defining the position in the SEQRES.
+    :type start_resnum:  :class:`int` / :class:`ost.mol.ResNum`
+    :param chain_idx: Index of chain the structural data belongs to.
+    :type chain_idx:  :class:`int`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if sequence of *bb_list* is
+              inconsistent with previously SEQRES set in constructor or when
+              either *start_resnum* or *chain_idx* point to invalid positions in
+              the SEQRES.
+
+  .. method:: ClearEnvironment(start_resnum, num_residues, chain_idx=0)
+
+    Clears a stretch of length *num_residues* in the environment in chain 
+    with idx *chain_idx* starting from residue number *start_resnum*
+
+    :param start_resnum: Start of stretch to clear
+    :type start_resnum:  :class:`int`
+    :param num_residues: Length of stretch to clear
+    :type num_residues:  :class:`int`
+    :param chain_idx: Chain the stretch belongs to
+    :type chain_idx:  :class:`int`
+
+    :raises:  :exc:`~exceptions.RuntimeError` when either *start_resnum* or 
+              *chain_idx* point to invalid positions in the SEQRES.
+
+  .. method:: SetPsipredPrediction(pred)
+
+    Set the psipred prediction, which is necessary to calculate some scores.
+
+    :param pred: Psipred prediction to set (one per chain).
+    :type pred:  :class:`PsipredPrediction` / :class:`list` of 
+                 :class:`PsipredPrediction`
+
+    :raises: :exc:`~exceptions.RuntimeError` if the number of predictions is
+             inconsistent with the number of internal chains or when one of the
+             predictions' sizes is inconsistent with the internal SEQRES size.
+
+  .. method:: SetMap(map, resolution, all_atom=False)
+
+    Sets an internal density map, which is necessary to calculate some scores.
+
+    :param map:         The density map
+    :type map:          :class:`ost.img.ImageHandle`
+    :param resolution:  Expected resolution of the density map.
+    :type resolution:   :class:`float`
+    :param all_atom:    Whether the map is accurate enough to resolve all atoms.
+    :type all_atom:     :class:`bool`
+
+  .. method:: AddPairwiseFunction(function, function_type)
+
+    Adds a pairwise function that can be used in :meth:`ApplyPairwiseFunction`.
+
+    :param function: Pairwise function to be added.
+    :type function:  :class:`PairwiseFunction`
+    :param function_type: What distances should be looked at for this function.
+    :type function_type:  :class:`PairwiseFunctionType`
+    :return: Function index to be used in :meth:`ApplyPairwiseFunction`.
+    :rtype:  :class:`int`
+
+  .. method:: ApplyPairwiseFunction(chain_idx_one, resnum_one, chain_idx_two,\
+                                    resnum_two, f_idx)
+
+    Define two residues to be evaluated with a given pairwise function. This
+    data can then be used by scorers. Note that the pairs are symmetric and so
+    there is no need to add them twice with switched residues.
+
+    :param chain_idx_one: Chain index of first residue
+    :type chain_idx_one:  :class:`int`
+    :param resnum_one:    Res. number of first residue
+    :type resnum_one:     :class:`int`
+    :param chain_idx_two: Chain index of second residue
+    :type chain_idx_two:  :class:`int`
+    :param resnum_two:    Res. number of second residue
+    :type resnum_two:     :class:`int`
+    :param f_idx:         Index of pairwise function (as returned by
+                          :meth:`AddPairwiseFunction`)
+    :type f_idx:          :class:`int`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if any of the chain indices or
+              res. numbers is invalid, the interaction partners are the same
+              residue or when *f_idx* is an invalid index.
+
+  .. method:: GetSeqres()
+
+    :return: SEQRES that was set in constructor (one sequence per chain).
+    :rtype:  :class:`ost.seq.SequenceList`
+
+
+Pairwise function classes
+--------------------------------------------------------------------------------
+
+.. class:: PairwiseFunctionType
+
+  Enumerates the pairwise function types. Possible values:
+
+  * *CA_PAIRWISE_FUNCTION* - Evaluate CA atoms distances.
+  * *CB_PAIRWISE_FUNCTION* - Evaluate CB atoms distances.
+
+.. class:: PairwiseFunction
+
+  Base class for any pairwise function.
+
+  .. method:: Score(distance)
+
+    :return: Score for a given pairwise distance
+    :rtype:  :class:`float`
+    :param distance: Pairwise distance
+    :type distance:  :class:`float`
+
+.. class:: ConstraintFunction(min_dist, max_dist, values)
+
+  Inherits all functionality of :class:`PairwiseFunction`.
+  Defines a constraint function. The score for a distance between *min_dist* and
+  *max_dist* is determined by liner interpolation assuming the first and last 
+  value exactly lying on *min_dist* ang *max_dist*. For distances outside the 
+  range defined by *min_dist* and *max_dist*, the score is 0.0.
+
+  :param min_dist:    Minimal distance to be considered
+  :param max_dist:    Maximal distance to be considered
+  :param values:      The possible values that get returned when the distance is
+                      between *min_dist* and *max_dist*
+
+  :type min_dist:     :class:`float`
+  :type max_dist:     :class:`float`
+  :type values:       :class:`list` of :class:`float`
+
+
+  :returns:           Index of added constraint definition
+
+  :raises: :exc:`~exceptions.RuntimeError` if *min_dist* >= *max_dist* or when
+           *min_dist* or *max_dist* are negative or when *values* contains no
+           elements
+
+.. class:: ContactFunction(max_dist, score)
+
+  Inherits all functionality of :class:`PairwiseFunction`.
+  Defines a simple contact function. The score value is *score* if
+  distance < *max_dist* and 0 otherwise.
+
+  :param max_dist:    Maximal distance to be in contact
+  :param score:       Value that gets returned if in contact
+
+  :type max_dist:     :class:`float`
+  :type score:        :class:`float`
+
+
+Convenient construction of pairwise functions
+--------------------------------------------------------------------------------
+
+.. class:: DiscoContainer(seqres, [function_type = CA_PAIRWISE_FUNCTION])
+
+  A container collecting structural information until it can be added in form
+  of :class:`ConstraintFunction` to a :class:`BackboneScoreEnv` . 
+  The constraint functions are built after the principle of QMEANDisCo.
+
+  :param seqres:        The sequence with which all added structures must match
+  :param function_type: Whether you want to assess pairwise distances between CA
+                        or CB atoms
+
+  :type seqres:         :class:`ost.seq.SequenceHandle`
+  :type function_type:  :class:`PairwiseFunctionType` 
+
+  .. function:: AddStructuralInfo(aln)
+
+    :param aln:       Alignment, where first sequence represent the initial 
+                      SEQRES and the second sequence the actual structural
+                      info. The second sequence must have a view attached.     
+
+    :type aln:        :class:`ost.seq.AlignmentHandle`
+
+    :raises: :exc:`~exceptions.RuntimeError` if number of sequences in *aln* is 
+             not two, the SEQRES does not match or when the second sequence in 
+             *aln* has no view attached.
+
+  .. function:: AttachConstraints(env, chain_indices, [cluster_thresh = 0.5, gamma = 70.0])
+
+    Generates distance constraints and adds it to *env*. 
+    It first clusters the added sequences with a pairwise normalised sequence 
+    similarity based on BLOSUM62. It's a hierarchical clustering with with an 
+    average distance metric and *cluster_thresh* as threshold to merge two 
+    clusters. Constraint functions are built for every cluster and finally
+    merged. The influence of the per cluster constraint functions to the overall 
+    function depends on the clusters average sequence similarity to the
+    target SEQRES. How fast this influence vanishes gets controlled by gamma.
+    The higher it is, the faster vanishes the influence of structural info
+    from distant clusters. The final pairwise cluster functions get then 
+    directly added to the scoring *env*.
+
+    :param env:            The scoring env to which the constraint 
+                           should be added
+    :param chain_indices:  Indices of chains for which the constraints should 
+                           be added
+    :param cluster_thresh: Controls the clustering behaviour at the initial
+                           stage of constraint construction
+    :param gamma:          Controls how fast the influence of constraint
+                           functions of distant clusters vanishes
+
+    :type env:             :class:`BackboneScoreEnv`
+    :type chain_indices:   :class:`list` of :class:`int`
+    :type cluster_thresh:  :class:`float`
+    :type gamma:           :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if one of the *chain_indices* is
+             invalid or the SEQRES set in *env* for specified chain is 
+             inconsistent with SEQRES you initialized the DiscoContainer with
+             
\ No newline at end of file
diff --git a/doc/html/_sources/scoring/backbone_scorers.txt b/doc/html/_sources/scoring/backbone_scorers.txt
new file mode 100644
index 00000000..ebb0bc30
--- /dev/null
+++ b/doc/html/_sources/scoring/backbone_scorers.txt
@@ -0,0 +1,772 @@
+Backbone Scorers
+================================================================================
+
+.. currentmodule:: promod3.scoring
+
+
+BackboneOverallScorer class
+--------------------------------------------------------------------------------
+
+.. class:: BackboneOverallScorer
+
+  Container that allows for the storage of multiple scorers identified by a key
+  (:class:`str`) and the computation of combined scores.
+
+  Scorers need to be individually set or loaded by 
+  :func:`LoadDefaultBackboneOverallScorer()`
+
+  .. method:: Contains(key)
+
+    :return: True, if a scorer object for this key was already added.
+    :rtype:  :class:`bool`
+    :param key: Key for desired scorer.
+    :type key:  :class:`str`
+
+  .. method:: Get(key)
+
+    :return: Scorer with the given *key* (read-only access).
+    :rtype:  :class:`BackboneScorer`
+    :param key: Key for desired scorer.
+    :type key:  :class:`str`
+    :raises: :exc:`~exceptions.RuntimeError` if there is no scorer with that
+             *key*.
+
+  .. method:: AttachEnvironment(env)
+
+    :param env: Link all scorers to this score environment.
+    :type env:  :class:`BackboneScoreEnv`
+
+  .. method:: Calculate(key, bb_list, start_resnum, chain_idx=0)
+
+    Calculate score(s) for one or many loop(s) with
+    :meth:`BackboneScorer.CalculateScore`.
+
+    :param key: Key for desired scorer.
+    :type key:  :class:`str`
+    :param bb_list: Loop(s) for which to calculate the given score
+    :type bb_list:  :class:`~promod3.loop.BackboneList` / :class:`list` of
+                    :class:`~promod3.loop.BackboneList`
+    :param start_resnum: Res. number defining the position in the SEQRES
+                         (see :class:`BackboneScoreEnv` for indexing)
+    :type start_resnum:  :class:`int`
+    :param chain_idx: Index of chain the loop(s) belong to
+                      (see :class:`BackboneScoreEnv` for indexing)
+    :type chain_idx:  :class:`int`
+
+    :return: Score(s) calculated with the desired scorer for the given loop(s).
+             In the case of multiple loops, the returned list has the same
+             order as the input.
+    :rtype:  :class:`float` / :class:`list` of :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if there is no scorer with that
+             *key* or anything raised in :meth:`BackboneScorer.CalculateScore`.
+
+  .. method:: CalculateLinearCombination(linear_weights, bb_list, start_resnum,\
+                                         chain_idx=0)
+
+    Calculate linear combination(s) of scores for one or many loop(s).
+
+    :param linear_weights: Weights for each desired scorer. You can add a
+                           constant value to each score by defining a weight
+                           with key "intercept".
+    :type linear_weights:  :class:`dict` (keys: :class:`str`,
+                           values: :class:`float`)
+    :param bb_list: Loop(s) for which to calculate the given score
+    :type bb_list:  :class:`~promod3.loop.BackboneList` / :class:`list` of
+                    :class:`~promod3.loop.BackboneList`
+    :param start_resnum: Res. number defining the position in the SEQRES
+                         (see :class:`BackboneScoreEnv` for indexing)
+    :type start_resnum:  :class:`int`
+    :param chain_idx: Index of chain the loop(s) belong to
+                      (see :class:`BackboneScoreEnv` for indexing)
+    :type chain_idx:  :class:`int`
+
+    :return: Linear combination(s) of the scores calculated with the desired
+             scorers for the given loop(s). In the case of multiple loops, the
+             returned list has the same order as the input.
+    :rtype:  :class:`float` / :class:`list` of :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if *linear_weights* has a *key* for
+             which no scorer exists or anything raised in
+             :meth:`BackboneScorer.CalculateScore` for any of the used scorers.
+
+  .. method:: __getitem__(key)
+              __setitem__(key)
+
+    Allow read/write access (with [*key*]) to scorer object with given key.
+
+    :param key: Key for desired scorer.
+    :type key:  :class:`str`
+
+.. function:: LoadDefaultBackboneOverallScorer()
+
+  :returns: Loads or creates the default scorers accessible through 
+            following keys:
+            "cb_packing", "cbeta", "reduced", "clash", "hbond", "ss_agreement",\
+            "torsion", "pairwise", "density"
+  :rtype:   :class:`BackboneOverallScorer`
+
+
+BackboneScorer base class
+--------------------------------------------------------------------------------
+
+.. class:: BackboneScorer
+
+  Base class for all the backbone scorers listed below.
+
+  .. method:: AttachEnvironment(env)
+
+    :param env: Link scorer to this score environment.
+    :type env:  :class:`BackboneScoreEnv`
+
+  .. method:: CalculateScore(bb_list, start_resnum, chain_idx=0)
+
+    Calculates score for the given loop internally and against the set
+    environment. Data in the environment, which overlaps with the given
+    *bb_list* is ignored. Unless otherwise noted in the scorer, a lower "score"
+    is better!
+
+    :param bb_list: Loop for which to calculate the given score
+    :type bb_list:  :class:`~promod3.loop.BackboneList`
+    :param start_resnum: Res. number defining the position in the SEQRES
+                         (see :class:`BackboneScoreEnv` for indexing)
+    :type start_resnum:  :class:`int`
+    :param chain_idx: Index of chain the loop belongs to
+                      (see :class:`BackboneScoreEnv` for indexing)
+    :type chain_idx:  :class:`int`
+
+    :return: Score for the given loop.
+    :rtype:  :class:`float`
+
+    :raises: (for most scorers) :exc:`~exceptions.RuntimeError` if scorer was
+             never attached to a score environment, if scorer has never been
+             properly initialized or if *chain_index* / *start_resnum* lead to
+             invalid positions.
+
+  .. method:: CalculateScoreProfile(bb_list, start_resnum, chain_idx=0)
+
+    Calculates per residue scores for the given loop internally and against the
+    set environment. Data in the environment, which overlaps with the given
+    *bb_list* is ignored.
+
+    :param bb_list: Loop for which to calculate the given scores
+    :type bb_list:  :class:`~promod3.loop.BackboneList`
+    :param start_resnum: Res. number defining the position in the SEQRES
+                         (see :class:`BackboneScoreEnv` for indexing)
+    :type start_resnum:  :class:`int`
+    :param chain_idx: Index of chain the loop belongs to
+                      (see :class:`BackboneScoreEnv` for indexing)
+    :type chain_idx:  :class:`int`
+
+    :return: Scores for the given loop, one for each residue.
+    :rtype:  :class:`list` of :class:`float`
+
+    :raises: same :exc:`~exceptions.RuntimeError` as :meth:`CalculateScore`.
+
+
+CBPackingScorer class
+--------------------------------------------------------------------------------
+
+.. class:: CBPackingScorer(cutoff, max_count)
+
+  Inherits all functionality of :class:`BackboneScorer`. Evaluates pseudo
+  energies by counting the number of other CB positions within a certain
+  *cutoff* radius of the CB position of the residue to be evaluated. The
+  calculated score is normalized by the number of residues in the loop.
+  In the default mode, the scorer scores a :class:`promod3.loop.BackboneList` 
+  given the defined environment. By placing this 
+  :class:`promod3.loop.BackboneList`, the score of the residues in the 
+  environment also change. It is possible to honour this effect by using the 
+  "IncludeEnv" mode. In this alternative mode, every environment residue close 
+  to the input :class:`promod3.loop.BackboneList` also contributes 
+  to the final score by adding the difference in score when the environment 
+  residue sees the original environment and the score when the environment would 
+  be modified by the :class:`promod3.loop.BackboneList`. You choose the mode 
+  by specifically calling the according CalculateEnergy functions. 
+  If you call the CalculateScore function from the parent class
+  (e.g. when the scorer is part of the :class:`BackboneOverallScorer`), it
+  gets checked what mode is currently active. You can toggle the mode by calling
+  the appropriate functions in this class. By default (when you load a scorer or
+  when you create a new scorer) the classic version gets called. If you want to
+  get per residue scores, the "IncludeEnv" mode makes not much sense and the 
+  scorer throws an error if a profile is requeset in this mode.
+
+  The scorer needs to be initialized either by loading a predefined scorer (e.g.
+  :func:`LoadCBPackingScorer`) or by setting all energies (see
+  :meth:`SetEnergy`).
+
+  :param cutoff: Radius in which other cbeta atoms are counted.
+  :type cutoff:  :class:`float`
+  :param max_count: If number of other cbeta atoms exceeds *max_count*, it will
+                    be set to this number.
+  :type max_count:  :class:`int`
+
+  :raises:  :exc:`~exceptions.RuntimeError` if *cutoff* < 0 or *max_count* < 1.
+
+  .. staticmethod:: Load(filename)
+                    LoadPortable(filename)
+
+    Loads raw binary file generated with :meth:`Save` (optimized for fast
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
+
+    :param filename: Path to the file from which to load.
+    :type filename:  :class:`str`
+
+    :returns: The loaded scorer
+    :rtype:   :class:`CBPackingScorer`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
+
+  .. method:: Save(filename)
+              SavePortable(filename)
+
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
+
+    :param filename: Path to the file where it will be saved.
+    :type filename:  :class:`str`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
+    
+  .. method:: SetEnergy(aa, count, energy)
+
+    Setup one energy value. Unless a predefined scorer is loaded, this must be
+    called for every type of amino acids and for every *count* <= *max_count*.
+
+    :param aa: Amino acid for which to set energy.
+    :type aa:  :class:`ost.conop.AminoAcid`
+    :param count: Number of surrounding CB positions for which to set energy.
+    :type count:  :class:`int`
+    :param energy: Energy to set for those parameters.
+    :type energy:  :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if inputs are invalid
+
+  .. method:: UseClassicMode()
+
+    If you call this function, the default mode is set to classic if the 
+    CalculateScore function from the parent class gets called. 
+
+  .. method:: UseIncludeEnvMode()
+
+    If you call this function, the default mode is set to the 
+    described alternative mode if the CalculateScore function from the parent 
+    class gets called. 
+
+.. function:: LoadCBPackingScorer()
+
+  :returns: The default predefined CBPackingScorer (loaded from disk)
+  :rtype:   :class:`CBPackingScorer`
+
+
+CBetaScorer class
+--------------------------------------------------------------------------------
+
+.. class:: CBetaScorer(cutoff, bins, seq_sep)
+
+  Inherits all functionality of :class:`BackboneScorer`. Evaluates a pairwise
+  pseudo interaction energy between CB atoms which are located within a *cutoff*
+  and which are at least *seq_sep* residues apart. An energy is assigned to each
+  distance using *bins* equally sized bins and distinguishing all possible pairs
+  of amino acids. The calculated score is normalized by the number of
+  interacting CB pairs.
+
+  The scorer needs to be initialized either by loading a predefined scorer (e.g.
+  :func:`LoadCBetaScorer`) or by setting all energies (see :meth:`SetEnergy`).
+
+  :param cutoff: Radius in which other cbeta atoms are counted.
+  :type cutoff:  :class:`float`
+  :param bins: Number of equally sized bins to discretize distances (range
+               of [0,*cutoff*]).
+  :type bins:  :class:`int`
+  :param seq_sep: Minimal separation in sequence two cbeta atoms must have to
+                  be considered.
+  :type seq_sep:  :class:`int`
+
+  :raises: :exc:`~exceptions.RuntimeError` if *cutoff* < 0, *bins* < 1 or
+           *seq_sep* < 1.
+
+  .. staticmethod:: Load(filename)
+                    LoadPortable(filename)
+
+    Loads raw binary file generated with :meth:`Save` (optimized for fast
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
+
+    :param filename: Path to the file from which to load.
+    :type filename:  :class:`str`
+
+    :returns: The loaded scorer
+    :rtype:   :class:`CBetaScorer`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
+
+  .. method:: Save(filename)
+              SavePortable(filename)
+
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
+
+    :param filename: Path to the file where it will be saved.
+    :type filename:  :class:`str`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
+
+  .. method:: SetEnergy(aa1, aa2, bin, energy)
+
+    Setup one energy value. Unless a predefined scorer is loaded, this must be
+    called for every pair of amino acids and for every *bin* < *bins*.
+
+    :param aa1: Amino acid for first interaction partner.
+    :type aa1:  :class:`ost.conop.AminoAcid`
+    :param aa2: Amino acid for second interaction partner.
+    :type aa2:  :class:`ost.conop.AminoAcid`
+    :param bin: Discrete bin describing the interaction distance.
+    :type bin:  :class:`int`
+    :param energy: Energy to set for those parameters.
+    :type energy:  :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if inputs are invalid
+
+
+.. function:: LoadCBetaScorer()
+
+  :returns: The default predefined CBetaScorer (loaded from disk)
+  :rtype:   :class:`CBetaScorer`
+
+
+ReducedScorer class
+--------------------------------------------------------------------------------
+
+.. class:: ReducedScorer(cutoff, dist_bins, angle_bins, dihedral_bins, seq_sep)
+
+  Inherits all functionality of :class:`BackboneScorer`. Evaluates a pairwise
+  pseudo interaction energy between the reduced representation of residues.
+  Every residue gets represented by its CA position p and a directional
+  component ``v = norm(ca_pos-n_pos) + norm (ca_pos-c_pos)``. Residues with CA
+  distance < *cutoff* and which are at least *seq_sep* residues apart are
+  considered to be interacting. For interacting residues r1 and r2, we can
+  define a line l between p1 and p2. The potential then considers:
+
+  * dist => distance between p1 and p2
+  * alpha => angle between v1 and l
+  * beta => angle between v2 and l
+  * gamma => dihedral between (p1+v1,p1,p2,p2+v2)
+
+  Every pairwise interaction within the loop and to the environment gets
+  evaluated according to the given parametrization, summed up and finally
+  normalized by the number of total interactions.
+
+  The scorer needs to be initialized either by loading a predefined scorer (e.g.
+  :func:`LoadReducedScorer`) or by setting all energies (see :meth:`SetEnergy`).
+
+  :param cutoff: Radius in which other CA atoms are searched.
+  :type cutoff:  :class:`float`
+  :param dist_bins: Number of equally sized bins to discretize distances (range
+                    of [0, *cutoff*]).
+  :type dist_bins:  :class:`int`
+  :param angle_bins: Number of equally sized bins to discretize angles (range
+                     of [0, pi]).
+  :type angle_bins:  :class:`int`
+  :param dihedral_bins: Number of equally sized bins to discretize dihedrals
+                        (range of [-pi, pi]).
+  :type dihedral_bins:  :class:`int`
+  :param seq_sep: Minimal separation in sequence two residues must have to
+                  be considered.
+  :type seq_sep:  :class:`int`
+
+  :raises: :exc:`~exceptions.RuntimeError` if *cutoff* < 0, *dist_bins* < 1,
+           *angle_bins* < 1, *dihedral_bins* < 1 or *seq_sep* < 1.
+
+  .. staticmethod:: Load(filename)
+                    LoadPortable(filename)
+
+    Loads raw binary file generated with :meth:`Save` (optimized for fast
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
+
+    :param filename: Path to the file from which to load.
+    :type filename:  :class:`str`
+
+    :returns: The loaded scorer
+    :rtype:   :class:`ReducedScorer`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
+
+  .. method:: Save(filename)
+              SavePortable(filename)
+
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
+
+    :param filename: Path to the file where it will be saved.
+    :type filename:  :class:`str`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
+
+  .. method:: SetEnergy(aa1, aa2, dist_bin, alpha_bin, beta_bin, gamma_bin,\
+                        energy)
+
+    Setup one energy value. Unless a predefined scorer is loaded, this must be
+    called for every pair of amino acids, every *dist_bin* < *dist_bins*, every
+    *alpha_bin* < *angle_bins*, every *beta_bin* < *angle_bins* and every
+    *gamma_bin* < *dihedral_bins*.
+
+    :param aa1: Amino acid for first interaction partner.
+    :type aa1:  :class:`ost.conop.AminoAcid`
+    :param aa2: Amino acid for second interaction partner.
+    :type aa2:  :class:`ost.conop.AminoAcid`
+    :param dist_bin: Discrete bin describing the interaction distance.
+    :type dist_bin:  :class:`int`
+    :param alpha_bin: Discrete bin describing the alpha angle.
+    :type alpha_bin:  :class:`int`
+    :param beta_bin: Discrete bin describing the beta angle.
+    :type beta_bin:  :class:`int`
+    :param gamma_bin: Discrete bin describing the gamma dihedral.
+    :type gamma_bin:  :class:`int`
+    :param energy: Energy to set for those parameters.
+    :type energy:  :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if inputs are invalid
+
+
+.. function:: LoadReducedScorer()
+
+  :returns: The default predefined ReducedScorer (loaded from disk)
+  :rtype:   :class:`ReducedScorer`
+
+
+ClashScorer class
+--------------------------------------------------------------------------------
+
+.. class:: ClashScorer
+
+  Inherits all functionality of :class:`BackboneScorer`. Calculates a simple
+  clash score of a loop itself and with the set environment. There is no need to
+  define any parameters here as all interaction energies are fixed. The
+  calculated score is normalized by the number of residues in the loop.
+
+
+DensityScorer class
+--------------------------------------------------------------------------------
+
+.. class:: DensityScorer
+
+  Inherits all functionality of :class:`BackboneScorer`. Calculates the
+  normalized cross correlation between a density generated from the input
+  :class:`~promod3.loop.BackboneList` and a set map.
+
+  This scorer requires that the attached environment has a density map defined
+  (see :meth:`BackboneScoreEnv.SetMap`) as soon as a score is to be calculated.
+  The *resolution* and *all_atom* flags that were specified in SetMap determine
+  how the backbone list is translated into an artificial density map. If
+  *all_atom* is set to False (which is recommended for low resolution maps), the
+  artificial map gets constructed by only using CA positions instead of all
+  atoms.
+
+  Note that for this scorer a higher "score" is better! So take care when
+  combining this to other scores, where it is commonly the other way around.
+
+
+HBondScorer class
+--------------------------------------------------------------------------------
+
+.. class:: HBondScorer(min_d, max_d, min_alpha, max_alpha, min_beta, max_beta,\
+                       min_gamma, max_gamma, d_bins, alpha_bins, beta_bins,\
+                       gamma_bins)
+
+  Inherits all functionality of :class:`BackboneScorer`. Evaluates pairwise
+  HBond pseudo energies similar to the one defined in the Rosetta energy
+  function. It considers the CA, C and O positions from backbone hbond acceptors
+  in interaction with the N and H positions from the backbone hbond donors. 4
+  Parameters describe their relative orientation.
+
+  * dist => H-O distance
+  * alpha => O-H-N angle
+  * beta => C-N-H angle
+  * gamma => CA-C-O-H dihedral angle
+
+  A pseudo energy function for these parameters is evaluated for three different
+  states. State 1 for helical residues, state 2 for extended residues and state
+  0 for other residues. If the state of two interacting particles is the same,
+  thats the one from which the energy is extracted. In all other cases, the
+  energy is extracted from the 0 state.
+
+  Every pairwise interaction within the loop and to the environment gets
+  evaluated according to the given parametrization, summed up and finally
+  normalized by the number of residues in the loop.
+
+  The scorer needs to be initialized either by loading a predefined scorer (e.g.
+  :func:`LoadHBondScorer`) or by setting all energies (see :meth:`SetEnergy`).
+
+  :param min_d: Minimal H-O distance to consider interaction
+  :type min_d:  :class:`float`
+  :param max_d: Maximal H-O distance to consider interaction
+  :type max_d:  :class:`float`
+  :param min_alpha: Minimal O-H-N angle to consider interaction
+  :type min_alpha:  :class:`float`
+  :param max_alpha: Maximal O-H-N angle to consider interaction
+  :type max_alpha:  :class:`float`
+  :param min_beta: Minimal C-N-H angle to consider interaction
+  :type min_beta:  :class:`float`
+  :param max_beta: Maximal C-N-H angle to consider interaction
+  :type max_beta:  :class:`float`
+  :param min_gamma: Minimal CA-C-O-H dihedral to consider interaction
+  :type min_gamma:  :class:`float`
+  :param max_gamma: Maximal CA-C-O-H dihedral to consider interaction
+  :type max_gamma:  :class:`float`
+  :param d_bins: Number of equally sized bins to discretize H-O distances
+                 (range of [*min_d*, *max_d*]).
+  :type d_bins:  :class:`int`
+  :param alpha_bins: Number of equally sized bins to discretize O-H-N angles
+                     (range of [*min_alpha*, *max_alpha*]).
+  :type alpha_bins:  :class:`int`
+  :param beta_bins: Number of equally sized bins to discretize C-N-H angles
+                    (range of [*min_beta*, *max_beta*]).
+  :type beta_bins:  :class:`int`
+  :param gamma_bins: Number of equally sized bins to discretize CA-C-O-H angles
+                     (range of [*min_gamma*, *max_gamma*]).
+  :type gamma_bins:  :class:`int`
+
+  :raises: :exc:`~exceptions.RuntimeError` if one of the bin parameters is
+           < 1 or a max parameter is smaller than its min counterpart.
+
+  .. staticmethod:: Load(filename)
+                    LoadPortable(filename)
+
+    Loads raw binary file generated with :meth:`Save` (optimized for fast
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
+
+    :param filename: Path to the file from which to load.
+    :type filename:  :class:`str`
+
+    :returns: The loaded scorer
+    :rtype:   :class:`HBondScorer`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
+
+  .. method:: Save(filename)
+              SavePortable(filename)
+
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
+
+    :param filename: Path to the file where it will be saved.
+    :type filename:  :class:`str`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
+
+  .. method:: SetEnergy(state, d_bin, alpha_bin, beta_bin, gamma_bin, energy)
+
+    Setup one energy value. Unless a predefined scorer is loaded, this must be
+    called for every state ([0, 1, 2]), every *d_bin* < *d_bins*, every
+    *alpha_bin* < *alpha_bins*, every *beta_bin* < *beta_bins* and every
+    *gamma_bin* < *gamma_bins*.
+
+    :param state: State describing the actual secondary structure
+                  (1: helical, 2: extended, 0: other)
+    :type state:  :class:`int`
+    :param d_bin: Discrete bin describing the H-O distance.
+    :type d_bin:  :class:`int`
+    :param alpha_bin: Discrete bin describing the O-H-N angle.
+    :type alpha_bin:  :class:`int`
+    :param beta_bin: Discrete bin describing the C-N-H angle. 
+    :type beta_bin:  :class:`int`
+    :param gamma_bin: Discrete bin describing the CA-C-O-H dihedral.
+    :type gamma_bin:  :class:`int`
+    :param energy: Energy to set for those parameters.
+    :type energy:  :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if inputs are invalid
+
+
+.. function:: LoadHBondScorer()
+
+  :returns: The default predefined HBondScorer (loaded from disk)
+  :rtype:   :class:`HBondScorer`
+
+
+SSAgreementScorer class
+--------------------------------------------------------------------------------
+
+.. class:: SSAgreementScorer
+
+  Inherits all functionality of :class:`BackboneScorer`. Evaluates a secondary
+  structure agreement score. The scorer has a score for each  combination of
+  psipred prediction, its confidence and the actually occurring secondary
+  structure in the model. In every score evaluation, the secondary structure of
+  the loop is estimated by searching for hydrogen bonds leading to a secondary
+  structure as defined by dssp. The hbonds are searched internally in the loop
+  as well as in the environment. The final score gets summed up over all
+  residues in the loop and normalized by the number of residues.
+
+  The scorer needs to be initialized either by loading a predefined scorer (e.g.
+  :func:`LoadSSAgreementScorer`) or by setting scores for all possible states
+  (see :meth:`SetScore`).
+
+  This scorer assumes that the attached environment has a psipred prediction
+  defined (see :meth:`BackboneScoreEnv.SetPsipredPrediction`) as soon as a score
+  is to be calculated.
+
+  Note that for this scorer a higher "score" is better! So take care when
+  combining this to other scores, where it is commonly the other way around.
+
+  .. staticmethod:: Load(filename)
+                    LoadPortable(filename)
+
+    Loads raw binary file generated with :meth:`Save` (optimized for fast
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
+
+    :param filename: Path to the file from which to load.
+    :type filename:  :class:`str`
+
+    :returns: The loaded scorer
+    :rtype:   :class:`SSAgreementScorer`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
+
+  .. method:: Save(filename)
+              SavePortable(filename)
+
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
+
+    :param filename: Path to the file where it will be saved.
+    :type filename:  :class:`str`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
+
+  .. method:: SetScore(psipred_state, psipred_confidence, dssp_state, score)
+
+    Setup a single score for a combination of states. Unless a predefined scorer
+    is loaded, this must be called for every combination of states.
+
+    :param psipred_state: must be one of ['H', 'E', 'C']
+    :type psipred_state:  :class:`str`
+    :param psipred_confidence: must be in range [0, 9]
+    :type psipred_confidence:  :class:`int`
+    :param dssp_state: must be one of ['H', 'E', 'C', 'G', 'B', 'S', 'T', 'I']
+    :type dssp_state:  :class:`str`
+    :param score: score to be set
+    :type score:  :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if inputs are invalid
+
+
+.. function:: LoadSSAgreementScorer()
+
+  :returns: The default predefined structure agreement scorer (loaded from disk)
+  :rtype:   :class:`SSAgreementScorer`
+
+
+TorsionScorer class
+--------------------------------------------------------------------------------
+
+.. class:: TorsionScorer(group_definitions, torsion_bins)
+
+  Inherits all functionality of :class:`BackboneScorer`. Evaluates pseudo
+  energies based on the identity of three consecutive residues and the phi/psi
+  dihedral angles of the central residue. Every residue gets evaluated according
+  to the set parametrization and the final score gets normalized by the total
+  number of summed pseudo energies. The first phi and last psi angle get
+  determined with the help of the environment if set.
+
+  The scorer needs to be initialized either by loading a predefined scorer (e.g.
+  :func:`LoadTorsionScorer`) or by setting all energies (see :meth:`SetEnergy`)
+  for each group definition.
+
+  :param group_definitions: List of group definitions defining amino acid
+                            triplets (same style as used in the
+                            :class:`~promod3.loop.TorsionSampler` class).
+  :type group_definitions:  :class:`list` of :class:`str`
+  :param torsion_bins: Number of equally sized bins to discretize the torsion
+                       angles (range of [0, 2*pi]).
+  :type torsion_bins:  :class:`int`
+
+  :raises: :exc:`~exceptions.RuntimeError` if *torsion_bins* < 1 or if there is
+           a possible combination of the 20 standard amino acids not matching
+           any entry of *group_definitions*
+
+  .. staticmethod:: Load(filename)
+                    LoadPortable(filename)
+
+    Loads raw binary file generated with :meth:`Save` (optimized for fast
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
+
+    :param filename: Path to the file from which to load.
+    :type filename:  :class:`str`
+
+    :returns: The loaded scorer
+    :rtype:   :class:`TorsionScorer`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
+
+  .. method:: Save(filename)
+              SavePortable(filename)
+
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
+
+    :param filename: Path to the file where it will be saved.
+    :type filename:  :class:`str`
+
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
+
+  .. method:: SetEnergy(group_idx, phi_bin, psi_bin, energy)
+
+    Setup one energy value. Unless a predefined scorer is loaded, this must be
+    called for every *group_idx* < len(*group_definitions*), every *phi_bin* <
+    *torsion_bins* and every *psi_bin* < *torsion_bins*.
+
+    :param group_idx: Index of group definition as set in constructor with
+                      numbering starting at 0.
+    :type group_idx:  :class:`int`
+    :param phi_bin: Discrete bin describing the phi angle.
+    :type phi_bin:  :class:`int`
+    :param psi_bin: Discrete bin describing the psi angle.
+    :type psi_bin:  :class:`int`
+    :param energy: Energy to set for those parameters.
+    :type energy:  :class:`float`
+
+    :raises: :exc:`~exceptions.RuntimeError` if inputs are invalid
+
+
+.. function:: LoadTorsionScorer()
+
+  :returns: The default predefined TorsionScorer (loaded from disk)
+  :rtype:   :class:`TorsionScorer`
+
+
+PairwiseScorer class
+--------------------------------------------------------------------------------
+
+.. class:: PairwiseScorer
+
+  Inherits all functionality of :class:`BackboneScorer`. Evaluates a list of
+  generic pairwise functions (see :class:`PairwiseFunction`). When evaluating a
+  loop, the scores of all pairwise functions which involve a residue in the loop
+  are summed up (the other residue can be either in the loop or in the env.) and
+  normalized by the number of residues in the loop.
+
+  This scorer assumes that the attached environment has pairwise functions
+  defined (see :meth:`BackboneScoreEnv.ApplyPairwiseFunction`) as soon as a
+  score is to be calculated.
+
+  Note that for this scorer a higher "score" is better! So take care when
+  combining this to other scores, where it is commonly the other way around.
diff --git a/doc/html/_sources/scoring/index.txt b/doc/html/_sources/scoring/index.txt
new file mode 100644
index 00000000..9b9a9788
--- /dev/null
+++ b/doc/html/_sources/scoring/index.txt
@@ -0,0 +1,24 @@
+:mod:`~promod3.scoring` - Loop Scoring
+================================================================================
+
+.. module:: promod3.scoring
+  :synopsis: Loop Scoring
+
+.. currentmodule:: promod3.scoring
+
+Tools and algorithms to score loops. The scoring system is split between an
+environment which contains model-specific data and scorers which evaluate loops.
+
+In this example, we load a structure, setup a score environment and a few
+scorers and finally score some loops:
+
+.. literalinclude:: ../../../tests/doc/scripts/scoring_main.py
+
+Contents:
+
+.. toctree::
+   :maxdepth: 2
+
+   backbone_score_env
+   backbone_scorers
+   all_atom_scorers
diff --git a/doc/html/_sources/sidechain/disulfid.txt b/doc/html/_sources/sidechain/disulfid.txt
index fd2fb16d..5b330287 100644
--- a/doc/html/_sources/sidechain/disulfid.txt
+++ b/doc/html/_sources/sidechain/disulfid.txt
@@ -8,15 +8,49 @@ a disulfid bond, one would get an unfavourable energy due to "clashes" between
 the sulfur atoms. It is possible to improve performance in sidechain
 reconstruction regarding cysteins when finding and separately handle
 disulfid bonds. PROMOD3 implements a simple geometrical description 
-[canutescu2003b]_ .
+[canutescu2003b]_ . The paper proposes two rotamers to be in a disulfid
+bonded state, if the resulting disulfid score plus the self energies of the 
+involved rotamers is below 45. If there are several cysteines close together,
+this problem gets another layer of complexity. One has to assure, that
+every cysteine only participates in one disulfid bond but the network
+of disulfid bonds is geometrically optimal. SCWRL4 proposes an approach,
+that has also been implemented here.
 
-Two methods are implemented to evaluate this disulfid score on either rigid of 
-flexible rotamers. The above paper proposes two rotamers to be in a disulfid
-bonded state, if the resulting score is below 45.
+.. method:: DisulfidRawScore(ca_pos_one, cb_pos_one, sg_pos_one, \
+                             ca_pos_two, cb_pos_two, sg_pos_two)
+
+  Evaluates the geometric expression based on the input positions
+
+  :param ca_pos_one:    The CA position of first rotamer
+  :param cb_pos_one:    The CB position of first rotamer
+  :param sg_pos_one:    The gamma sulfur position of first rotamer
+  :param ca_pos_two:    The CA position of second rotamer
+  :param cb_pos_two:    The CB position of second rotamer
+  :param sg_pos_two:    The gamma sulfur position of second rotamer
+
+  :type ca_pos_one:     :class:`ost.geom.Vec3`
+  :type cb_pos_one:     :class:`ost.geom.Vec3`
+  :type sg_pos_one:     :class:`ost.geom.Vec3`
+  :type ca_pos_two:     :class:`ost.geom.Vec3`
+  :type cb_pos_two:     :class:`ost.geom.Vec3`
+  :type sg_pos_two:     :class:`ost.geom.Vec3`
+
+  :returns:             The result of the raw score
+
+  
 
 .. method:: DisulfidScore(rotamer_one, rotamer_two, ca_pos_one, cb_pos_one, \
                           ca_pos_two, cb_pos_two)
 
+  Directly extracts the positions of the gamma sulfurs from the rotamers by
+  searching for particles with the name "SG". In case of :class:`RRMRotamer`
+  It expects exactly one gamma sulfur per rotamer. In case of
+  :class:`FRMRotamer` there can be an arbitrary number of gamma sulfurs per
+  rotamer (at least one), it then evaluates the score for all possible
+  combinations of gamma sulfurs and takes the minimum score.
+  To get a final DisulfidScore, it finally adds the self energies of the
+  rotamers to the result of the geometric expression.
+
   :param rotamer_one:   First rotamer
   :param rotamer_two:   Second rotamer
   :param ca_pos_one:    CA position of first rotamer
@@ -32,11 +66,48 @@ bonded state, if the resulting score is below 45.
   :type cb_pos_two:     :class:`ost.geom.Vec3`
 
   :raises:  :exc:`~exceptions.RuntimeError` if given rotamers do not contain
-            exactly one particle representing the gamma sulfur.
+            exactly (in case of :class:`RRMRotamer`) or at least (in case of
+            :class:`FRMRotamer`) one particle representing the gamma sulfur.
+
+  :returns:             The result of the raw score plus the average 
+                        self energies of the input rotamers
+
+
+.. method:: ResolveCysteins(rotamer_groups, ca_positions, cb_positions,\
+                            [score_threshold=45.0, optimize_subrotamers=False])
+
+  Tries to optimize disulfid bond network. In a first step, all disulfid bonds
+  get detected using :func:`DisulfidScore`. If the value between two rotamers is
+  below **score_threshold**, they're assumed to be bonded. The function then 
+  tries to detect the largest possible set of disulfide bonds, with no
+  cysteine being part of more than one bond. If several largest sets are 
+  possible, the one with the optimal sum of scores gets estimated.
+
+  :param rotamer_groups: Every group represents a cysteine
+  :param ca_positions:   The CA positions of the according rotamers 
+  :param cb_positions:   The CB positions of the according rotamers
+  :param score_threshold: The score two rotamers must have to be considered
+                          as a disulfid bond
+  :param optimize_subrotamers: If set to true and the input consists of flexible
+                               rotamer groups, the active subrotamers get 
+                               optimized. For every pair of rotamers
+                               participating in a disulfid bond, the subrotamers
+                               with best :func:`DisulfidScore` get activated in
+                               the input **rotamer_groups**. This has an effect
+                               when the rotamers get applied on residues.
+
+  :type rotamer_groups:  :class:`list` of 
+                         :class:`FRMRotamerGroup`/:class:`RRMRotamerGroup`
+  :type ca_positions: :class:`list` of :class:`ost.geom.Vec3`
+  :type cb_positions: :class:`list` of :class:`ost.geom.Vec3`
+  :type score_threshold: :class:`float`
+  :type optimize_subrotamers: :class:`bool`
+
+  :returns: A :class:`tuple` containing two :class:`list` objects with equal
+            length. Both lists contain :class:`tuple` objects with two elements.
+            The tuples in the first list describe the indices of cysteins 
+            participating in disulfid bonds. The tuples in the second list 
+            describe the optimal rotamers in the according rotamer groups.
 
-  :returns:             The disulfid score based on geometric features. In case
-                        of :class:`FRMRotamer` as input, the minimal score
-                        between all possible subrotamer combinations gets
-                        returned.
 
 .. [canutescu2003b] Canutescu AA, Shelenkov AA, Dunbrack RL Jr. (2003). A graph-theory algorithm for rapid protein side-chain prediction. Protein Sci (2003).
diff --git a/doc/html/_sources/sidechain/frame.txt b/doc/html/_sources/sidechain/frame.txt
index fcf4d6c0..d5e35591 100644
--- a/doc/html/_sources/sidechain/frame.txt
+++ b/doc/html/_sources/sidechain/frame.txt
@@ -17,9 +17,6 @@ The Frame Objects
 --------------------------------------------------------------------------------
 
 .. class:: FrameResidue(particles, residue_index)
-  
-  The most simple way of constructing a frame residue is the usage
-  of the convenient functions provided by PROMOD3.
 
   :param particles:     particles building frame residue
   :param residue_index: Interaction energies between the constructed frame
@@ -47,141 +44,9 @@ The Frame Objects
  
 .. class:: Frame(frame_residues)
 
-  The :class:`Frame` object allows to calculate frame energies for rotamers.
-  Due to technical reasons, this is only possible if the rotamers are
-  part of rotamer groups.
+  The :class:`Frame` object is used as a container for rigid particles, that
+  can be passed to rotamer groups for calculating frame energies.
 
   :param frame_residues:  residues building the frame.
   :type frame_residues:   :class:`list` of :class:`FrameResidue`
 
-  .. method:: SetFrameEnergy(rotamer_group)
-
-    Calculates and sets frame energies for all rotamers in the rotamer group.
-
-    :param rotamer_group: group of rotamers for energy calculation
-
-    :type rotamer_group: :class:`RRMRotamerGroup` / :class:`FRMRotamerGroup`
-
-  .. method:: AddFrameEnergy(rotamer_group)
-
-    Calculates and adds frame energies to the already existing frame
-    energy values for all rotamers in the rotamer group.
-    This is useful if you have several :class:`Frame` objects.
-
-    :param rotamer_group: group of rotamers for energy calculation
-
-    :type rotamer_group: :class:`RRMRotamerGroup` / :class:`FRMRotamerGroup`
-
-
-Convenient functions for constructing frame residues
---------------------------------------------------------------------------------
-
-PROMOD3 offers some functionality to construct frame residues for standard
-residues. The functions distinguish between backbone frame residue
-and sidechain frame residues.
-
-.. method:: ConstructBackboneFrameResidue(n_pos,ca_pos,c_pos,o_pos,cb_pos,id,residue_index,settings,phi,[n_ter=False, c_ter=False])
-
-  :param n_pos:         Position of backbone nitrogen atom
-  :param ca_pos:        Position of backbone c-alpha carbon atom
-  :param c_pos:         Position of backbone carbon atom
-  :param o_pos:         Position of backbone oxygen atom
-  :param cb_pos:        Position of backbone c-beta carbon atom
-  :param id:            Type of :class:`FrameResidue`
-  :param residue_index: Index this :class:`FrameResidue` belongs to.
-                        Interactions to rotamers associated to the same
-                        index are neglected.
-  :param settings:      Settings to control parametrization of the single 
-                        particles.
-  :param phi:           Phi backbone torsion angle required to construct the
-                        backbone hydrogen if hbonds get considered.
-  :param n_ter:         Flag, whether residue is n-terminal. If yes, the 
-                        according backbone hydrogens get constructed if
-                        hbonds get considered.
-  :param c_ter:         Flag, whether residue is c-terminal. If yes, the
-                        according backbone oxygen gets constructed if 
-                        hbonds get considered. 
-
-
-  :type n_pos:          :class:`ost.geom.Vec3`
-  :type ca_pos:         :class:`ost.geom.Vec3`
-  :type c_pos:          :class:`ost.geom.Vec3`
-  :type o_pos:          :class:`ost.geom.Vec3`
-  :type cb_pos:         :class:`ost.geom.Vec3`
-  :type id:             :class:`RotamerID`
-  :type residue_index:  :class:`int`
-  :type settings:       :class:`RotamerSettings`
-  :type phi:            :class:`float`
-  :type n_ter:          :class:`bool`
-  :type c_ter:          :class:`bool`
-
-  :returns:             :class:`FrameResidue`
-
-
-
-.. method:: ConstructBackboneFrameResidue(residue,id,residue_index,settings,phi,[n_ter=False, c_ter=False])
-
-  :param residue:       Residue from which the backbone atoms are extracted.
-  :param id:            Type of :class:`FrameResidue`
-  :param residue_index: Index this :class:`FrameResidue` belongs to.
-                        Interactions to rotamers associated to the same
-                        index are neglected.
-  :param settings:      Settings to control parametrization of the single 
-                        particles.
-  :param phi:           Phi backbone torsion angle required to construct the
-                        backbone hydrogen if hbonds get considered.
-  :param n_ter:         Flag, whether residue is n-terminal. If yes, the 
-                        according backbone hydrogens get constructed if
-                        hbonds get considered.
-  :param c_ter:         Flag, whether residue is c-terminal. If yes, the
-                        according backbone oxygen gets constructed if 
-                        hbonds get considered. 
-
-
-  :type residue:        :class:`ost.mol.ResidueHandle`
-  :type id:             :class:`RotamerID`
-  :type residue_index:  :class:`int`
-  :type settings:       :class:`RotamerSettings`
-  :type phi:            :class:`float`
-  :type n_ter:          :class:`bool`
-  :type c_ter:          :class:`bool`
-
-  :raises:  :exc:`~exceptions.RuntimeError` when not all required backbone
-            atoms are present in **residue**
-
-  :returns:             :class:`FrameResidue`
-
-.. method:: ConstructSidechainFrameResidue(residue,id,residue_index,settings)
-
-  :param residue:       Residue from which the sidechain atoms are extracted.
-  :param id:            Type of :class:`FrameResidue`
-  :param residue_index: Index this :class:`FrameResidue` belongs to.
-  :param settings:      Settings to control parametrization of the single
-                        particles.
-
-  :type residue:        :class:`ost.mol.ResidueHandle`
-  :type id:             :class:`RotamerID`
-  :type residue_index:  :class:`int`
-  :type settings:       :class:`RotamerSettings`
-
-  :raises:  :exc:`~exceptions.RuntimeError` when not all required sidechain
-            atoms are present in **residue**
-
-  :returns:             :class:`FrameResidue`
-
-.. method:: ConstructFrameResidue(residue,residue_index)
-
-  Constructs a :class:`FrameResidue` from a :class:`ost.mol.ResidueHandle`.
-  This can be useful to mark a region occupied by a ligand. Note, that
-  there won't be any parametrization of hbonds in this function. All
-  Atoms of the residue will be represented as carbons.
-  
-
-  :param residue:       Residue from which all atoms will be taken to
-                        construct a :class:`FrameResidue`.
-  :param residue_index: Index this :class:`FrameResidue` belongs to.
-
-  :type residue:        :class:`ost.mol.ResidueHandle`
-  :type residue_index:  :class:`int`
-
-  :returns:             :class:`FrameResidue`
diff --git a/doc/html/_sources/sidechain/graph.txt b/doc/html/_sources/sidechain/graph.txt
index f7d48023..33f3da97 100644
--- a/doc/html/_sources/sidechain/graph.txt
+++ b/doc/html/_sources/sidechain/graph.txt
@@ -1,4 +1,4 @@
-Coming to a solution
+Rotamer Graph
 ================================================================================
 
 .. currentmodule:: promod3.sidechain
@@ -8,43 +8,108 @@ rotamer groups can be calculated. To come to a final solution of the sidechain
 modelling problem, the pairwise energies also have to be evaluated and an
 overall solution has to be found. PROMOD3 implements an interaction graph that
 takes a list of rotamer groups, calculates the pairwise energies, does edge
-decomposition and dead end elimination, decomposes the graph in a tree form
-and finally comes back with a solution.
+decomposition and dead end elimination. Solutions can finally be found 
+using Tree decomposition, AStar or Monte Carlo approaches. 
 
-
-The Interaction Graph
---------------------------------------------------------------------------------
-
-.. class:: Graph
+.. class:: RotamerGraph
 
   The Graph object has no constructor exported to python. It is meant to be
   constructed using the static create functions.
 
   .. staticmethod:: CreateFromRRMList(rotamer_groups)
 
-    :param rotamer_groups: :class:`RRMRotamerGroup` objects representing the
-                           possible sidechain conformations for every amino
-                           acid position.
+  .. staticmethod:: CreateFromFRMList(rotamer_groups)
+
+    :param rotamer_groups: :class:`RRMRotamerGroup` or :class:`FRMRotamerGroup` 
+                           objects representing the possible sidechain 
+                           conformations for every amino acid position.
 
-    :type rotamer_groups: :class:`list`
+    :type rotamer_groups:  :class:`list`
 
 
-  .. staticmethod:: CreateFromFRMList(rotamer_groups)
+  .. method:: Prune(epsilon, [e_cut=0.0, consider_all_nodes=False])
+
+    Performs edge decomposition followed by dead end elimination in an
+    iterative manner until no changes can be observed anymore given 
+    **epsilon**.
+
+    :param epsilon:     The energy threshold to perform edge decomposition.
+
+    :param e_cut:       Parameter to control dead end elimination. If set to
+                        0.0, the default goldstein criterion is applied =>
+                        the rotamer gets removed if it's dominated by all other
+                        rotamers in the same node. If you increase this value,
+                        a rotamer must be dominated by at least this **e_cut**.
+
+
+    :param consider_all_nodes: Flag, wether the dead end elimination should be
+                               applied to all nodes, or only those who are
+                               connected with an edge removed by edge 
+                               decomposition. This is useful if already a Prune
+                               operation has been performed => only those nodes
+                               connected to a removed edge have the chance for
+                               successful dead end elimination.
 
-    :param rotamer_groups: :class:`FRMRotamerGroup` objects representing the
-                           possible sidechain conformations for every amino
-                           acid position.
+    :type epsilon:      :class:`float`
+    :type e_cut:        :class:`float`
+    :type consider_all_nodes: :class:`bool`
 
-    :type rotamer_groups: :class:`list`
 
+  .. method:: ApplyDEE(node_idx, [e_cut=0.0])
 
-  .. method:: Solve([max_complexity=inf, initial_epsilon=0.02])
+    Applies dead end elimination on one particular node and potentially
+    deactivates certain rotamers.
 
-    The method solves a graph by iteratively performing dead end elimination
-    and edge decomposition until the number of possible permutations, that
-    have to be enumerated in the resulting tree, fall below 
-    **max_complecity**. In every iteration the epsilon value gets doubled to
-    enforce more edges to be approximated by edge decomposition. This function
+    :param node_idx:    Node to apply dead end elimination
+    :param e_cut:       If set to
+                        0.0, the default goldstein criterion is applied =>
+                        the rotamer gets removed if it's dominated by all other
+                        rotamers in the same node. If you increase this value,
+                        a rotamer must be dominated by at least this **e_cut**.
+
+    :type node_idx:     :class:`int`
+    :type e_cut:        :class:`float`
+
+    :returns:           :class:`bool` whether any rotamer has been deactivated.
+
+
+
+  .. method:: ApplyEdgeDecomposition(edge_idx, epsilon)
+
+    Applies edge decomposition on one particular edge and potentially
+    deactivates it.
+
+
+    :param edge_idx:    Edge to decompose. 
+                        the idx relates to the list you get back
+                        when calling the :meth:`GetEdges` function.
+
+    :param epsilon:     The energy threshold to perform edge decomposition.
+
+    :type edge_idx:     :class:`int`
+    :type epsilon:      :class:`float`
+
+
+    :returns:           :class:`bool` whether the edge has been decomposed and 
+                        deactivated 
+                        
+
+  .. method:: Reset()
+
+    Resets the graph by undoing any pruning operation (DEE and edge decomposition)
+
+
+  .. method:: TreeSolve([max_complexity=inf, initial_epsilon=0.02])
+
+    The method solves a rotamer graph using a minimal width tree decomposition
+    approach in an iterative manner. In every iteration, the algorithm performs
+    a pruning step (DEE / Edge Decomposition) and subsequently tries to solve 
+    each connected component in the graph separately. 
+    If the number of possible enumerations in the tree constructetd from a 
+    particular connected component is is larger **max_complexity**, 
+    this component is solved in a later iteration. The algorithm iterates until 
+    all connected components are solved and steadily increases the epsilon value 
+    resulting in a more and more agressive edge decomposition. This function
     assumes all self energies of the rotamers to be calculated and properly set!
 
     :param max_complexity: Max number of possible permutations, that have to 
@@ -57,35 +122,97 @@ The Interaction Graph
     :type max_complexity: :class:`int`
     :type initial_epsilon: :class:`float`
 
-    :returns:           Indices representing the single rotamers minimizing
+    :returns:           A tuple with the first element being a list of indices 
+                        representing the single rotamers minimizing
                         the overall energy functions from every rotamer group.
+                        The second element is the according energy value.
+
+
+  .. method:: AStarSolve(e_thresh, [max_n=100, max_visited_nodes=100000000])
+
+    The method solves a rotamer graph using the A\* algorithm. Besides creating
+    minimal energy solution, the function produces a maximum of **max_n**
+    solutions sorted by energy. It aborts as soon as it sees the first solution
+    with an energy difference of **e_thresh** to the optimal solution or hits
+    **max_n**. If you're only interested in the optimal solution you should use
+    the TreeSolve function since it's much faster and uses less memory.
+    There is no automatic pruning of the graph using DEE or edge decomposition, 
+    so you have to do it by yourself, otherwise you'll have a looooooong 
+    runtime or even hit the **max_visited_nodes** parameter that caps the memory
+    usage. 
+    To have a valid solution you have to take care that you set the **e_cut** 
+    parameter in the pruning function to **e_tresh**.
+    This function assumes all self energies of the rotamers to be calculated 
+    and properly set!
+
+    :param e_thresh:    Maximal energy difference of a solution to the
+                        optimal solution to be considered.
+
+    :param max_n:       The maximum number of solutions that will be generated.
+
+    :param  max_visited_nodes: Caps the memory usage of the algorithm. Besides
+                               The memory used for pairwise energies and self
+                               energies, the algorithm uses about 
+                               **max_visited_nodes** * 20 bytes.
+
+
+    :type e_thresh:      :class:`float`
+    :type max_n:        :class:`int`
+    :type max_visited_nodes: :class:`int`
+
+    :returns:           A tuple with the first element being a list of 
+                        solutions with indices representing the single rotamers 
+                        selected for that solution. The second element is a list
+                        of energies for the according solutions.
+
+
+  .. method:: MCSolve([n=100, mc_steps=100000, start_temperature=1000.0, \\
+                       change_frequency=1000, cooling_factor=0.9, seed=0]) 
+
+    Does a total of **n** Monte Carlo runs to find low energy solutions
+    of the RotamerGraph. Each run starts with a random rotamer
+    configuration. At each of the **mc_steps** steps, a random location and
+    a random rotamer at that location is selected and an energy difference 
+    of that random selection relative to the current configuration is 
+    estimated. If the difference in energy is negative, the step is 
+    accepted. If not, the step is accepted with a probability given by
+    the temperature dependent Metropolis criterion (exp(-ediff/T)).
+    The temperature for every run starts with **start_temperature** 
+    and is multiplied every **change_frequency** steps with **cooling_factor**
+    to achieve a simulated annealing effect.
+    There is no automatic pruning of the graph using DEE or edge decomposition,
+    you have to do that by yourself.
+    This function assumes all self energies of the rotamers to be calculated 
+    and properly set!
+    
+    :param n:           Number of Monte Carlo runs 
+    :param mc_steps:    Number of Monte Carlo steps per run
+    :param start_temperature: Start temperature for the temperature dependent
+                              Metropolis criterion
+    :param change_frequency: Number of steps the temperature stays the same
+    :param cooling_factor: Factor to multiply temperature each 
+                          **change_frequency** steps
+    :param seed:        Seed for random number generator 
+
+    :type n:            :class:`int`
+    :type mc_steps:     :class:`int`
+    :type start_temperature: :class:`float`
+    :type change_frequency: :class:`int`
+    :type cooling_factor: :class:`float`
+    :type seed:         :class:`float`
+
+    :returns:           A tuple with the first element being a list of 
+                        solutions with indices representing the single rotamers 
+                        selected for that solution. The second element is a list
+                        of energies for the according solutions.
 
 
-  
-  .. method:: Prune(epsilon, [consider_all_nodes=False])
-
-    Performs edge decomposition followed by dead end elimination in an
-    iterative manner until no changes can be observed anymore given 
-    **epsilon**.
-
-    :param epsilon:     The energy threshold to perform edge decomposition.
-
-    :param consider_all_nodes: Flag, wether the dead end elimination should be
-                               applied to all nodes, or only those who are
-                               connected with an edge removed by edge 
-                               decomposition. This is useful if already a Prune
-                               operation has been performed => only those nodes
-                               connected to a removed edge have the chance for
-                               successful dead end elimination.
-
-  .. method Reset()
-
-    Resets the graph by undoing any pruning operations
 
   .. method:: GetNumNodes()
 
     :returns:           The number of nodes in the graph
-                        => every rotamer group is a node
+                        => every RotamerGroup is a node
+
 
   .. method:: GetNumEdges()
 
@@ -93,10 +220,12 @@ The Interaction Graph
                         connections between nodes with at least one
                         nonzero interaction
 
+
   .. method:: GetNumActiveNodes()
 
-    :returns:           The number of nodes having at least one edge, even
-                        after performing pruning operations
+    :returns:           The number of nodes having more than one active rotamer, 
+                        even after performing pruning operations
+
 
   .. method:: GetNumActiveEdges()
 
@@ -104,5 +233,70 @@ The Interaction Graph
                         even after performing pruning operations
 
 
+  .. method:: GetNumRotamers()
+
+    :returns:           The total number of rotamers in the graph
+
+
+  .. method:: GetNumActiveRotamers()
+
+    :returns:           The total number of active rotamers (Total number of 
+                        rotamers minus those that have been deactivated by DEE)
+
+
+  .. method:: GetEdges()
+
+    :returns:           A list of tuples describing the edges 
+                        connecting nodes with nonzero pairwise interactions   
+
+
+  .. method:: GetActiveEdges()
+    
+    :returns:           A :class:`list` of :class:`tuples` describing the edges 
+                        connecting nodes with nonzero pairwise interactions 
+                        (All edges minus those that have been deactived by edge 
+                        decomposition)
+
+
+  .. method:: GetActiveRotamers(node_idx)
+
+    :param node_idx:    Specifies node from which the active rotamers should be 
+                        extracted
+
+    :type node_idx:     :class:`int`
+
+    :returns:           list of the rotamers that are active
+                        in specified node (all rotamers minus those that have 
+                        been deactivated using DEE) 
+
+
+  .. method:: GetSelfEnergies(node_idx)
+
+    :param node_idx:    Specifies node from which the self energies should be 
+                        extracted
+
+    :type node_idx:     :class:`int`
+
+    :returns:           list of self energies for all rotamers in 
+                        specified node as they are fed into the solving 
+                        algorithms. Note, that they might slightly differ 
+                        from the original self energies in the input rotamers
+                        because of approximations introduced in edge 
+                        decomposition.
+
+
+  .. method:: GetPairwiseEnergies(edge_idx)
+
+    :param edge_idx:    Specifies edge from which the pairwise energies should
+                        be extracted, the idx relates to the list you get back
+                        when calling the :meth:`GetEdges` function.
+
+    :type edge_idx:     :class:`int`
 
+    :returns:           list of list where you can extract 
+                        the energy of rotamer i in the first node in the
+                        edge with rotamer j in the second node in the edge 
+                        with: e = pairwise_energies[i][j]
+                         
 
+                       
diff --git a/doc/html/_sources/sidechain/index.txt b/doc/html/_sources/sidechain/index.txt
index bfca8940..c0a24dce 100644
--- a/doc/html/_sources/sidechain/index.txt
+++ b/doc/html/_sources/sidechain/index.txt
@@ -6,68 +6,18 @@
 
 .. currentmodule:: promod3.sidechain
 
-Tools and algorithms to model sidechains given backbone coordinates. 
-The full module is heavily based on SCWRL4 [krivov2009]_ .
-The according paper describes the modelling of sidechains using two different
-rotamer models. A rigid model, as well as a flexible model. Both models are
-implemented in PROMOD3 and can be applied in flexible ways.
-
-Reconstruct Function
---------------------------------------------------------------------------------
-
-The simplest usage of the module is provided by the :func:`Reconstruct`
-function:
-
-.. literalinclude:: ../../../tests/doc/scripts/sidechain_reconstruct.py
-
-.. method:: Reconstruct(prot, keep_sidechains=False, build_disulfids, \
-                        rotamer_model="frm", consider_hbonds=True, \
-                        rotamer_library=None)
-
-  The function takes a structure and reconstructs its sidechains given the input 
-  parameters.
-
-  :param prot:          Structure for sidechain reconstruction. Note, that the
-                        sidechain reconstruction gets directly applied on the
-                        structure itself.
-
-  :param keep_sidechains: Flag, whether complete sidechains in *prot* (i.e. 
-                          containing all required atoms) should be kept rigid
-                          and directly be added to the frame.
-
-  :param build_disulfids: Flag, whether possible disulfid bonds should be 
-                          searched. If a disulfid bond is found, the two
-                          participating cysteins are fixed and added to
-                          the frame.
-
-  :param rotamer_model: Rotamer model to be used, can either be "frm" or "rrm"
-
-  :param consider_hbonds: Flag, whether hbonds should be evaluated in the energy
-                          function. If set to False, no hydrogens will be built
-                          when building rotamers and frame and the **add_polar_hydrogens**
-                          flag won't have any consequences.
-
-  :param rotamer_library: A rotamer library to extract the 
-                          rotamers from.
-
-
-  :type prot:           :class:`ost.mol.EntityHandle`
-  :type keep_sidechains: :class:`bool`
-  :type build_disulfids: :class:`bool`
-  :type rotamer_model:  :class:`str`
-  :type consider_hbonds: :class:`bool`
-  :type rotamer_library: :class:`BBDepRotamerLib` / :class:`RotamerLib`
-
-
-Sidechain Module Functionality
---------------------------------------------------------------------------------
+Tools and algorithms to model sidechains given backbone coordinates. The full
+module is heavily based on SCWRL4 [krivov2009]_ . The according paper describes
+the modelling of sidechains using two different rotamer models. A rigid model,
+as well as a flexible model. Both models are implemented in PROMOD3 and can be
+applied in flexible ways.
 
 The following code fragment shows an example of a basic sidechain reconstruction
-algorithm using the functionality in the module. Note, that this code will
-crash as soon as you have structures containing all the weirdness the PDB throws
-at us. In this case, you should use the :func:`~promod3.sidechain.Reconstruct` 
-function above. An overview of the full provided functionality can be found at 
-the bottom of this page.
+algorithm using the functionality in the module. Note, that this code will crash
+as soon as you have structures containing all the weirdness the PDB throws at
+us. In this case, you should use the full fletched sidechain reconstruction
+pipelines available in the modelling module. 
+
 
 .. literalinclude:: ../../../tests/doc/scripts/sidechain_steps.py
 
@@ -76,11 +26,15 @@ Contents:
 .. toctree::
    :maxdepth: 2
 
-   RotamerID <rotamer_id>
-   Rotamers <rotamer>
-   Frame <frame>
-   Rotamer Library <rotamer_lib>
-   Graph <graph>
-   The Settings - Control Things... <sidechain_settings>
-   Disulfid Bond Evaluation <disulfid>
-   Loading Libraries <loading>
+   rotamer_id
+   rotamer
+   frame
+   rotamer_lib
+   rotamer_constructor
+   graph
+   disulfid
+   loading
+   subrotamer_optimizer
+
+
+.. [krivov2009] Krivov GG, Shapovalov MV and Dunbrack RL Jr. (2009). Improved prediction of protein side-chain conformations with SCWRL4. Proteins.
diff --git a/doc/html/_sources/sidechain/loading.txt b/doc/html/_sources/sidechain/loading.txt
index 82ad5bf2..b795abc6 100644
--- a/doc/html/_sources/sidechain/loading.txt
+++ b/doc/html/_sources/sidechain/loading.txt
@@ -1,4 +1,4 @@
-Load Rotamer Libraries
+Loading Rotamer Libraries
 ================================================================================
 
 .. currentmodule:: promod3.sidechain
@@ -25,8 +25,8 @@ the backbone independent Penultimate library [lovell2000]_ .
 
   Loads the backbone independent Penultimate library. The values for the dihedral
   angles are directly extracted from the publication without considering the
-  probabilities specifically for helices/sheets. Due to no assigned standard
-  deviations, the flexible rotamer model won't work.
+  probabilities specific for helices/sheets. Due to no assigned standard
+  deviations, the flexible rotamer model won't produce meaningful results.
 
   :returns:             The requested library
   :rtype:               :class:`RotamerLib`
@@ -36,7 +36,7 @@ the backbone independent Penultimate library [lovell2000]_ .
 
   Reads a file as it is provided when you get a licence for the 2010 library of
   the Dunbrack lab. It can only read the classic version, where all rotamers
-  are in a single file. Specific distributions of nonrotameric sidechains also
+  are in a single file. Specific distributions of nonrotameric sidechains 
   cannot be read.
 
   :param filename:      Name of the file
@@ -51,8 +51,6 @@ the backbone independent Penultimate library [lovell2000]_ .
   :rtype:   :class:`BBDepRotamerLib`
 
 
-.. [krivov2009] Krivov GG, Shapovalov MV and Dunbrack RL Jr. (2009). Improved prediction of protein side-chain conformations with SCWRL4. Proteins.
-
 .. [shapovalov2011] Shapovalov MV and Dunbrack RL Jr. (2011). A smoothed backbone-dependent rotamer library for proteins derived from adaptive kernel density estimates and regressions. Structure.
 
 .. [lovell2000] Lovell SC, Word JM, Richardson JS, Richardson DC (2000). The penultimate rotamer library. Proteins.
diff --git a/doc/html/_sources/sidechain/rotamer.txt b/doc/html/_sources/sidechain/rotamer.txt
index 9a420d32..a62ca72a 100644
--- a/doc/html/_sources/sidechain/rotamer.txt
+++ b/doc/html/_sources/sidechain/rotamer.txt
@@ -3,15 +3,17 @@ Rotamers
 
 .. currentmodule:: promod3.sidechain
 
-The rotamers in PROMOD3 are heavily based on the definitions from SCWRL4.
-A rotamer is basically a set of :class:`Particle` and exists in two types.
-The :class:`RRMRotamer` and :class:`FRMRotamer`. Pairwise energies between
-rotamer instances get calculated according to the definitions from SCWRL4.
+A rotamer represents an amino acid sidechain and is basically a set of 
+:class:`Particle` objects. There exist two types. The :class:`RRMRotamer` and 
+:class:`FRMRotamer`. 
 To gather all possible rotamers for one particular sidechain position,
-PROMOD3 has the :class:`RRMRotamerGroup` and :class:`FRMRotamerGroup`.
-Rotamers are not intended to be built from scratch.  
-PROMOD3 offers a built-in construction function, directly accessing a 
-:class:`BBDepRotamerLib`.
+PROMOD3 offers the :class:`RRMRotamerGroup` and :class:`FRMRotamerGroup`.
+Pairwise interactions between particles give raise to pairwise energies between 
+rotamers. Nevertheless, the energy calculation itself happens on the level
+of RotamerGroups and is mostly hidden away in the construction of the
+the :class:`RotamerGraph`. If you're too lazy to build up your rotamers
+by hand, you might be interested in the :class:`SCWRLRotamerConstructor`.
+
 
 
 The Smallest Building Block - The Particle
@@ -114,11 +116,24 @@ Rotamers
 --------------------------------------------------------------------------------
 
 
-.. class:: RRMRotamer
+.. class:: RRMRotamer(particles, probability, internal_e_prefactor)
 
   The RRMRotamer represents a rotamer of the so called rigid rotamer model.
-  The class has no constructor exported to python, the rotamer is expected to
-  be constructed with the convenient functions provided by PROMOD3.
+ 
+  :param particles:     List of :class:`Particle` objects
+  :param probability:   Probability of rotamers. In case of the SCWRL4
+                        energy calculation, this directly controls the 
+                        internal energy of that rotamer. 
+  :param internal_e_prefactor: Factor applied to the internal energy calculated 
+                               as -log(**probability**/max_probability),
+                               where max_probability is the maximum
+                               rotamer probability of any rotamer in a
+                               particular :class:`RRMRotamerGroup`.
+
+  :type particles:      :class:`list`
+  :type probability:    :class:`float`
+  :type internal_e_prefactor: :class:`float`
+
 
   .. method:: __getitem__(index)
 
@@ -137,15 +152,16 @@ Rotamers
 
     :returns:           Number of particles the rotamer contains
 
-  .. method:: ApplyOnResidue(res,[consider_hydrogens=False,new_res_name=""])
+  .. method:: ApplyOnResidue(res, consider_hydrogens=False, new_res_name="")
 
-    Strips all sidechain atom positions of given residue and reconstructs the
-    full sidechain given the positions of the particles in the rotamer.
+    Iterates over every particle and searches for the according atom in
+    **res**. If it's present, the position gets reset to the particle position.
+    If not, a new atom gets added to **res**. 
 
     :param res:         Residue to be reconstructed
     :param consider_hydrogens: Flag, whether polar hydrogens should be added to 
-                               the sidechain
-    :param new_res_name: New name of residue. Nothing happens in case of the 
+                               **res**
+    :param new_res_name: New name of **res**. Nothing happens in case of the 
                          default value ("")
 
     :type res:          :class:`ost.mol.ResidueHandle`
@@ -153,29 +169,34 @@ Rotamers
     :type new_res_name: :class:`str`
 
     :raises: :exc:`~exceptions.RuntimeError` if not all required backbone atoms
-             are present in **res**
+             are present in *res*
 
+  .. method:: ApplyOnResidue(all_atom, res_idx)
 
-  .. method:: GetTransformedCopy(transform)
+    Set all sidechain atom positions for given residue to the positions of the
+    particles in the rotamer.
+    
+    :param all_atom:    Container to which to apply rotamer
+    :param res_idx:     Residue index into *all_atom*
 
-    Transforms all particle positions including their lone pair and polar 
-    directions.
+    :type all_atom:     :class:`~promod3.loop.AllAtomPositions`
+    :type res_idx:      :class:`int`
 
-    :param transform:   Transformation to be applied
+    :raises: :exc:`~exceptions.RuntimeError` if *res_idx* is invalid
 
-    :type transform:    :class:`ost.geom.Transform`
+  .. method:: ToFrameResidue(res_idx)
 
-    :returns:           :class:`RRMRotamer` with all particles transformed
+    Generates and returns a :class:`FrameResidue` based on the internal
+    particles.
 
+    :param res_idx:     Idx passed over to :class:`FrameResidue` constructor
+    :type res_idx:      :class:`int`
 
-  .. method:: CalculateInternalEnergy(normalization_factor)
-    
-    Calculates and sets the rotamer internal energy of the form:
-    -prefactor*log(probability/normalization_factor)
+    :returns:           The constructed :class:`FrameResidue` 
 
-    :param normalization_factor: Normalization factor for internal probability
+  .. method:: GetInternalEnergyPrefactor()
 
-    :type normalization_factor: :class:`float`
+    :returns:           Prefactor used in internal energy calculation
 
 
   .. method:: GetInternalEnergy()
@@ -183,15 +204,11 @@ Rotamers
     :returns:           Internal Energy if calculated, 0.0 otherwise 
 
 
-  .. method:: GetInternalEnergyPrefactor()
-
-    :returns:           Prefactor used in internal energy calculation
-
-
   .. method:: GetFrameEnergy()
 
-    Returns previously calculated frame energy, this energy has to be calculated
-    using a :class:`Frame`.
+    Returns frame energy. This energy can either be manually set or calculated
+    using a :class:`Frame` and the :class:`RRMRotamerGroup` this rotamer 
+    belongs to.
 
     :returns: Frame energy if calculated, 0.0 otherwise 
 
@@ -206,16 +223,16 @@ Rotamers
     :returns:           probability of this rotamer
 
 
-  .. method:: SetInternalEnergy(energy)
+  .. method:: SetInternalEnergyPrefactor(prefactor)
 
-    :param energy:      Internal energy to be set
+    :param energy:      Internal energy prefactor to be set
 
     :type energy:       :class:`float`
 
 
-  .. method:: SetInternalEnergyPrefactor(prefactor)
+  .. method:: SetInternalEnergy(energy)
 
-    :param energy:      Internal energy prefactor to be set
+    :param energy:      Internal energy to be set
 
     :type energy:       :class:`float`
 
@@ -227,6 +244,13 @@ Rotamers
     :type energy:       :class:`float`
 
 
+  .. method:: AddFrameEnergy(energy)
+
+    :param energy:      Frame energy to be added
+
+    :type energy:       :class:`float`
+
+
   .. method:: SetProbability(probability)
 
     :param energy:      Internal probability to be set
@@ -235,14 +259,31 @@ Rotamers
 
 
 
-.. class:: FRMRotamer
+.. class:: FRMRotamer(particles, T, probability, internal_e_prefactor)
+
+  The FRMRotamer represents a rotamer of the so called flexible rotamer model,
+  where one rotamer gets represented by several subrotamers.
+  The idea is, that all particles of all subrotamers are given at
+  initialization. Subrotamers are then defined by providing lists of indices.
+  One particle can be part of several subrotamers.
+
+  :param particles:     List of :class:`Particle` objects
+  :param probability:   Probability of rotamers. In case of the SCWRL4
+                        energy calculation, this directly controls the 
+                        internal energy of that rotamer. 
+  :param T:             Temperature factor, that is used to generate a final
+                        energy given the subrotamers according to the formalism
+                        described in the SCWRL4 paper.
+  :param internal_e_prefactor: Factor applied to the internal energy calculated 
+                               as -log(**probability**/max_probability),
+                               where max_probability is the maximum
+                               rotamer probability of any rotamer in a
+                               particular :class:`FRMRotamerGroup`.
 
-  The FRMRotamer represents a rotamer of the so called flexible rotamer model.
-  The class has no constructor exported to python, the rotamer is expected to
-  be constructed with the convenient functions provided by PROMOD3.
-  The flexible rotamer contains several so called subrotamers. The internal data
-  layout is a list of particles and a list of subrotamer definitions in form
-  of particle indices.
+  :type particles:      :class:`list`
+  :type probability:    :class:`float`
+  :type T:              :class:`float`
+  :type internal_e_prefactor: :class:`float`
 
 
   .. method:: __getitem__(index)
@@ -267,35 +308,11 @@ Rotamers
 
     :returns:           Number of subrotamers
 
+  .. method:: ApplyOnResidue(res, consider_hydrogens=False, new_res_name="")
 
-  .. method:: GetSubrotamerDefinition(index)
-
-    :param index:       Index of subrotamer
-
-    :type index:        :class:`int`
-
-    :returns:           :class:`list` of particle indices belonging to this
-                        particular subrotamer
-
-    :raises:  :exc:`~exceptions.RuntimeError` if index is invalid
-
-
-  .. method:: GetSubrotamerAssociations(index)
-
-    :param index:       Index of particle
-
-    :type index:        :class:`int`
-
-    :returns:           :class:`list` of subrotamer indices this particle is 
-                        associated with
-
-    :raises:  :exc:`~exceptions.RuntimeError` if index is invalid
-
-
-  .. method:: ApplyOnResidue(res,[consider_hydrogens=False,new_res_name=""])
-
-    Strips all sidechain atom positions of given residue and reconstructs the
-    full sidechain given the positions of the particles in the rotamer.
+    Iterates over every particle of the active subrotamer and searches for the 
+    according atom in **res**. If it's present, the position gets reset to the 
+    particle position. If not, a new atom gets added to **res**. 
 
     :param res:         Residue to be reconstructed
     :param consider_hydrogens: Flag, whether polar hydrogens should be added to 
@@ -308,53 +325,71 @@ Rotamers
     :type new_res_name: :class:`str`
 
     :raises: :exc:`~exceptions.RuntimeError` if not all required backbone atoms
-             are present in **res**
+             are present in *res*
 
+  .. method:: ApplyOnResidue(all_atom, res_idx)
 
-  .. method:: GetTransformedCopy(transform)
+    Set all sidechain atom positions for given residue to the positions of the
+    particles in the active surotamer.
+    
+    :param all_atom:    Container to which to apply rotamer
+    :param res_idx:     Residue index into *all_atom*
 
-    Transforms all particle positions including their lone pair and polar 
-    directions.
+    :type all_atom:     :class:`~promod3.loop.AllAtomPositions`
+    :type res_idx:      :class:`int`
 
-    :param transform:   Transformation to be applied
+    :raises: :exc:`~exceptions.RuntimeError` if *res_idx* is invalid
 
-    :type transform:    :class:`ost.geom.Transform`
+  .. method:: ToFrameResidue(res_idx)
 
-    :returns:           :class:`FRMRotamer` with all particles transformed
+    Generates and returns a :class:`FrameResidue` based on the internal
+    particles of the active subrotamer.
 
+    :param res_idx:     Idx passed over to :class:`FrameResidue` constructor
+    :type res_idx:      :class:`int`
 
-  .. method:: CalculateInternalEnergy(normalization_factor)
-    
-    Calculates and sets the rotamer internal energy of the form:
-    -prefactor*log(probability/normalization_factor)
+    :returns:           The constructed :class:`FrameResidue`
 
-    :param normalization_factor: Normalization factor for internal probability
+  .. method:: ToRRMRotamer()
 
-    :type normalization_factor: :class:`float`
+    Generates and returns a :class:`RRMRotamer` based on the internal
+    particles of the active subrotamer. Following parameters of the 
+    returned rotamer get set: probability (probability of the whole FRMRotamer),
+    internal_e_prefactor (prefactor of the whole FRMRotamer),
+    frame_energy (The frame energy of that particular subrotamer if already 
+    calculated), internal_energy (the internal energy of the whole FRMRotamer)
 
+  .. method:: GetSubrotamerDefinition(index)
 
-  .. method:: GetInternalEnergy()
+    :param index:       Index of subrotamer
 
-    :returns:           Internal Energy if calculated, 0.0 otherwise 
+    :type index:        :class:`int`
+
+    :returns:           :class:`list` of particle indices belonging to this
+                        particular subrotamer
+
+    :raises:  :exc:`~exceptions.RuntimeError` if index is invalid
 
 
   .. method:: GetInternalEnergyPrefactor()
 
     :returns:           Prefactor used in internal energy calculation
 
+  .. method:: GetInternalEnergy()
+
+    :returns:           Internal Energy if calculated, 0.0 otherwise 
 
   .. method:: GetFrameEnergy()
 
-    Returns previously calculated frame energy of the full FRMRotamer, this 
-    energy has to be calculated using a :class:`Frame`.
+    Returns frame energy. This energy can either be manually set or calculated
+    using a :class:`Frame` and the :class:`FRMRotamerGroup` this rotamer 
+    belongs to.
 
     :returns: Frame energy if calculated, 0.0 otherwise 
 
-
   .. method:: GetFrameEnergy(index)
 
-    Returns previously calculated frame energy of the subrotamer specified by 
-    **index**, this energy has to be calculated using a :class:`Frame`.
+    Returns frame energy of specified **index**.
 
     :param index:       Index of subrotamer you want the frame energy from
 
@@ -380,35 +415,71 @@ Rotamers
     :returns:           Probability of this rotamer
 
 
-  .. method:: SetInternalEnergy(energy)
+  .. method:: SetInternalEnergyPrefactor(prefactor)
 
-    :param energy:      Internal energy to be set
+    :param energy:      Internal energy prefactor to be set
 
     :type energy:       :class:`float`
 
 
-  .. method:: SetInternalEnergyPrefactor(prefactor)
+  .. method:: SetInternalEnergy(energy)
 
-    :param energy:      Internal energy prefactor to be set
+    :param energy:      Internal energy to be set
 
     :type energy:       :class:`float`
 
 
   .. method:: SetFrameEnergy(energy)
 
-    :param energy:      Frame energy for full rotamer to be set to be set
+    :param energy:      Frame energy for full rotamer to be set
 
     :type energy:       :class:`float`
 
 
   .. method:: SetFrameEnergy(energy, index)
 
-    :param energy:      Frame energy for single  subrotamer to be set to be set
+    :param energy:      Frame energy for single  subrotamer to be set
     :param index:       Index of subrotamer
 
     :type energy:       :class:`float`
     :type index:        :class:
 
+  .. method:: AddFrameEnergy(energy)
+
+    :param energy:      Frame energy for full rotamer to be added
+
+    :type energy:       :class:`float`
+
+
+  .. method:: AddFrameEnergy(energy, index)
+
+    :param energy:      Frame energy for single  subrotamer to be added
+    :param index:       Index of subrotamer
+
+    :type energy:       :class:`float`
+    :type index:        :class:
+
+  .. method:: AddSubrotamerDefinition(indices)
+
+    :param indices:     List of indices defining a subrotamer
+
+    :type indices:      :class:`list`
+
+  .. method:: SetActiveSubrotamer(idx)
+
+    The provided **idx** relates to the subrotamer definitions added at the
+    rotamer buildup. This idx controls which subrotamer is used when
+    :func:`ApplyOnResidue`, :func:`ToFrameResidue` or :func:`ToRRMRotamer` 
+    gets called. By default, the value is 0 => first added subrotamer 
+    definition gets used.
+
+    :param idx:         Index of subrotamer definition applied on residues
+
+    :type idx:          :class:`int`
+
+  .. method:: GetActiveSubrotamer()
+
+    Get the index of the active subrotamer
 
   .. method:: SetTemperature(temperature)
 
@@ -428,17 +499,21 @@ Rotamer Groups
 --------------------------------------------------------------------------------
 
 
-.. class:: RRMRotamerGroup(rotamers)
+.. class:: RRMRotamerGroup(rotamers, residue_index)
 
   The RRMRotamerGroup groups several :class:`RRMRotamer` objects for the same
-  residue position. It can either be constructed by providing a list of
-  :class:`RRMRotamer` objects or by convenience functions provided by PROMOD3.
+  residue position. 
 
   :param rotamers: A list of :class:`RRMRotamer` objects
+  :param residue_index: Location of residue this :class:`FRMRotamerGroup`
+                        represents. This index is important when calculating
+                        frame energies to neglect the interactions to frame 
+                        particles of the same residue.
 
   :type rotamers:       :class:`list`
+  :type residue_index:  :class:`int`
 
-  :raises:  :exc:`~exceptions.RuntimeError` if provided **rotamers** is empty
+  :raises:  :exc:`~exceptions.RuntimeError` if provided *rotamers* is empty
 
 
   .. method:: __len__()
@@ -448,14 +523,16 @@ Rotamer Groups
 
   .. method:: __getitem__(index)
 
-    :returns:           :class:`RRMRotamer` at given **index**
+    :returns:           :class:`RRMRotamer` at given *index*
 
-    :raises:  :exc:`~exceptions.RuntimeError` if **index** is invalid
+    :raises:  :exc:`~exceptions.RuntimeError` if *index* is invalid
 
 
-  .. method:: ApplyOneResidue(index,res,[consider_hydrogens=False,new_res_name=""])
+  .. method:: ApplyOnResidue(index, res, consider_hydrogens=False,\
+                             new_res_name="")
+              ApplyOnResidue(index, all_atom, res_idx)
 
-    Calls ApplyOnResidue function on rotamer at position **index**
+    Calls ApplyOnResidue function on rotamer at position *index*
 
     :param index:       Rotamer index
     :param res:         Residue to be reconstructed
@@ -463,46 +540,65 @@ Rotamer Groups
                                the sidechain
     :param new_res_name: New name of residue. Nothing happens in case of the 
                          default value ("")
+    :param all_atom:    Container to which to apply rotamer
+    :param res_idx:     Residue index into *all_atom*
 
     :type index:        :class:`int`
     :type res:          :class:`ost.mol.ResidueHandle`
     :type consider_hydrogens: :class:`bool`
     :type new_res_name: :class:`str`
+    :type all_atom:     :class:`~promod3.loop.AllAtomPositions`
+    :type res_idx:      :class:`int`
 
     :raises: :exc:`~exceptions.RuntimeError` if not all required backbone atoms
-             are present in **res** or when **index** is invalid
+             are present in *res* or when *index* or *res_idx* are invalid
 
 
   .. method:: Merge(other)
 
-    Adds all rotamers in **other** to current :class:`RRMRotamerGroup`
+    Adds all rotamers in *other* to current :class:`RRMRotamerGroup`
 
     :param other:       RotamerGroup to be merged in
 
     :type other:        :class:`RRMRotamerGroup`
 
+  .. method:: SetFrameEnergy(frame)
+
+    Calculates sets the energy of all rotamers in the group towards the 
+    given **frame**.
+
+    :param frame:       Frame containing rigid particles
+    :type frame:        :class:`Frame`
+
+  .. method:: AddFrameEnergy(frame)
 
-  .. method:: CalculateInternalEnergies()
+    Calculates adds the energy of all rotamers in the group towards the 
+    given **frame**.
 
-    Calculates internal energies of all rotamers in group
+    :param frame:       Frame containing rigid particles
+    :type frame:        :class:`Frame`
 
-  .. method:: ApplySelfEnergyThres([thresh=30])
+  .. method:: ApplySelfEnergyThresh(thresh=30)
 
-    Searches rotamer with lowest self energy **l_e** and deletes all
-    rotamers with **self_energy** > **l_e** + **thresh**
+    Searches rotamer with lowest self energy *l_e* and deletes all
+    rotamers with *self_energy* > *l_e* + *thresh*
 
 
-.. class:: FRMRotamerGroup(rotamers)
+.. class:: FRMRotamerGroup(rotamers, residue_index)
 
   The FRMRotamerGroup groups several :class:`FRMRotamer` objects for the same
-  residue position. It can either be constructed by providing a list of
-  :class:`FRMRotamer` objects or by convenience functions provided by PROMOD3.
+  residue position. 
 
   :param rotamers: A list of :class:`FRMRotamer` objects
+  :param residue_index: Location of residue this :class:`FRMRotamerGroup`
+                        represents. This index is important when calculating
+                        frame energies to neglect the interactions to frame 
+                        particles of the same residue.
 
   :type rotamers:       :class:`list`
+  :type residue_index:  :class:`int`
 
-  :raises:  :exc:`~exceptions.RuntimeError` if provided **rotamers** is empty
+  :raises:  :exc:`~exceptions.RuntimeError` if provided *rotamers* is empty
 
 
   .. method:: __len__()
@@ -512,14 +608,16 @@ Rotamer Groups
 
   .. method:: __getitem__(index)
 
-    :returns:           :class:`FRMRotamer` at given **index**
+    :returns:           :class:`FRMRotamer` at given *index*
 
-    :raises:  :exc:`~exceptions.RuntimeError` if **index** is invalid
+    :raises:  :exc:`~exceptions.RuntimeError` if *index* is invalid
 
 
-  .. method:: ApplyOneResidue(index,res,[consider_hydrogens=False,new_res_name=""])
+  .. method:: ApplyOnResidue(index, res, consider_hydrogens=False,\
+                             new_res_name="")
+              ApplyOnResidue(index, all_atom, res_idx)
 
-    Calls ApplyOnResidue function on rotamer at position **index**
+    Calls ApplyOnResidue function on rotamer at position *index*
 
     :param index:       Rotamer index
     :param res:         Residue to be reconstructed
@@ -527,454 +625,45 @@ Rotamer Groups
                                the sidechain
     :param new_res_name: New name of residue. Nothing happens in case of the 
                          default value ("")
+    :param all_atom:    Container to which to apply rotamer
+    :param res_idx:     Residue index into *all_atom*
 
     :type index:        :class:`int`
     :type res:          :class:`ost.mol.ResidueHandle`
     :type consider_hydrogens: :class:`bool`
     :type new_res_name: :class:`str`
+    :type all_atom:     :class:`~promod3.loop.AllAtomPositions`
+    :type res_idx:      :class:`int`
 
     :raises: :exc:`~exceptions.RuntimeError` if not all required backbone atoms
-             are present in **res** or when **index** is invalid
+             are present in *res* or when *index* or *res_idx* are invalid
 
 
   .. method:: Merge(other)
 
-    Adds all rotamers in **other** to current :class:`FRMRotamerGroup`
+    Adds all rotamers in *other* to current :class:`FRMRotamerGroup`
 
     :param other:       RotamerGroup to be merged in
 
     :type other:        :class:`FRMRotamerGroup`
 
+  .. method:: SetFrameEnergy(frame)
 
-  .. method:: CalculateInternalEnergies()
-
-    Calculates internal energies of all rotamers in group
-
-  .. method:: ApplySelfEnergyThres([thresh=30])
-
-    Searches rotamer with lowest self energy **l_e** and deletes all
-    rotamers with **self_energy** > **l_e** + **thresh**
-
-
-
-
-
-
-
-
-Convenient functions for constructing rotamers
---------------------------------------------------------------------------------
-
-PROMOD3 offers some functionality to directly access a 
-:class:`BBDepRotamerLibrary` and build single rotamers as well as 
-rotamer groups.
-
-.. method:: ConstructRRMRotamer(n_pos,ca_pos,cb_pos,rotamer_id,settings,probability,[chi1=NaN,chi2=NaN,chi3=NaN,chi4=NaN])
-
-  :param n_pos:         Position of nitrogen used as anchor for the rotamer
-  :param ca_pos:        Position of alpha carbon used as anchor for the rotamer
-  :param cb_pos:        Position of beta carbon used as anchor for the rotamer
-  :param rotamer_id:    Type of :class:`RRMRotamer`
-  :param settings:      Settings to control parametrization of the single
-                        particles.
-  :param probability:   Probability of occurence of this particular rotamer.
-  :param chi1:          First sidechain dihedral angle
-  :param chi2:          Second sidechain dihedral angle
-  :param chi3:          Third sidechain dihedral angle
-  :param chi4:          Fourth sidechain dihedral angle
-
-  :type n_pos:          :class:`ost.geom.Vec3`
-  :type ca_pos:         :class:`ost.geom.Vec3`
-  :type cb_pos:         :class:`ost.geom.Vec3`
-  :type rotamer_id:     :class:`RotamerID`
-  :type settings:       :class:`RotamerSettings`
-  :type probability:    :class:`float`
-  :type chi1:           :class:`float`
-  :type chi2:           :class:`float`
-  :type chi3:           :class:`float`
-  :type chi4:           :class:`float`
-
-  :raises:  :exc:`~exceptions.RuntimeError` if not all required chi angles
-            for this particular **id** are given.
-
-
-.. method:: ConstructRRMRotamer(residue,rotamer_id,settings,probability,[chi1=NaN,chi2=NaN,chi3=NaN,chi4=NaN])
-
-  :param residue:       Residue from which the anchor positions will be 
-                        extracted
-  :param rotamer_id:    Type of :class:`RRMRotamer`
-  :param settings:      Settings to control parametrization of the single
-                        particles.
-  :param probability:   Probability of occurence of this particular rotamer.
-  :param chi1:          First sidechain dihedral angle
-  :param chi2:          Second sidechain dihedral angle
-  :param chi3:          Third sidechain dihedral angle
-  :param chi4:          Fourth sidechain dihedral angle
-
-  :type residue:        :class:`ost.mol.ResideHandle`
-  :type rotamer_id:     :class:`RotamerID`
-  :type settings:       :class:`RotamerSettings`
-  :type probability:    :class:`float`
-  :type chi1:           :class:`float`
-  :type chi2:           :class:`float`
-  :type chi3:           :class:`float`
-  :type chi4:           :class:`float`
-
-  :raises:  :exc:`~exceptions.RuntimeError` if not all required chi angles
-            for this particular **id** are given or when not all required
-            anchor atoms are present in **residue**.
-
-
-.. method:: ConstructFRMRotamer(n_pos,ca_pos,cb_pos,rotamer_id,settings,probability,[chi1=NaN,sig1=NaN,chi2=NaN,sig2=NaN,chi3=NaN,sig3=NaN,chi4=NaN,sig4=NaN])
-
-  :param n_pos:         Position of nitrogen used as anchor for the rotamer
-  :param ca_pos:        Position of alpha carbon used as anchor for the rotamer
-  :param cb_pos:        Position of beta carbon used as anchor for the rotamer
-  :param rotamer_id:    Type of :class:`FRMRotamer`
-  :param settings:      Settings to control parametrization of the single
-                        particles.
-  :param probability:   Probability of occurence of this particular rotamer.
-  :param chi1:          First sidechain dihedral angle
-  :param sig1:          Standard deviation of first dihedral angle
-  :param chi2:          Second sidechain dihedral angle
-  :param sig2:          Standard deviation of second dihedral angle
-  :param chi3:          Third sidechain dihedral angle
-  :param sig3:          Standard deviation of third dihedral angle
-  :param chi4:          Fourth sidechain dihedral angle
-  :param sig4:          Standard deviation of fourth dihedral angle
-
-
-  :type n_pos:          :class:`ost.geom.Vec3`
-  :type ca_pos:         :class:`ost.geom.Vec3`
-  :type cb_pos:         :class:`ost.geom.Vec3`
-  :type rotamer_id:     :class:`RotamerID`
-  :type settings:       :class:`RotamerSettings`
-  :type probability:    :class:`float`
-  :type chi1:           :class:`float`
-  :type sig1:           :class:`float`
-  :type chi2:           :class:`float`
-  :type sig2:           :class:`float`
-  :type chi3:           :class:`float`
-  :type sig3:           :class:`float`
-  :type chi4:           :class:`float`
-  :type sig4:           :class:`float`
-
-  :raises:  :exc:`~exceptions.RuntimeError` if not all required chi angles
-            for this particular **id** are given.
-
-
-.. method:: ConstructFRMRotamer(residue,rotamer_id,settings,probability,[chi1=NaN,sig1=NaN,chi2=NaN,sig2=NaN,chi3=NaN,sig3=NaN,chi4=NaN,sig4=NaN])
-
-  :param residue:       Residue from which the anchor positions will be 
-                        extracted
-  :param rotamer_id:    Type of :class:`FRMRotamer`
-  :param settings:      Settings to control parametrization of the single
-                        particles.
-  :param probability:   Probability of occurence of this particular rotamer.
-  :param chi1:          First sidechain dihedral angle
-  :param sig1:          Standard deviation of first dihedral angle
-  :param chi2:          Second sidechain dihedral angle
-  :param sig2:          Standard deviation of second dihedral angle
-  :param chi3:          Third sidechain dihedral angle
-  :param sig3:          Standard deviation of third dihedral angle
-  :param chi4:          Fourth sidechain dihedral angle
-  :param sig4:          Standard deviation of fourth dihedral angle
-
-  :type residue:        :class:`ost.mol.ResideHandle`
-  :type rotamer_id:     :class:`RotamerID`
-  :type settings:       :class:`RotamerSettings`
-  :type probability:    :class:`float`
-  :type chi1:           :class:`float`
-  :type sig1:           :class:`float`
-  :type chi2:           :class:`float`
-  :type sig2:           :class:`float`
-  :type chi3:           :class:`float`
-  :type sig3:           :class:`float`
-  :type chi4:           :class:`float`
-  :type sig4:           :class:`float`
-
-  :raises:  :exc:`~exceptions.RuntimeError` if not all required chi angles
-            or standard deviations for this particular **id** are given or when
-            not all required anchor atoms are present in **residue**.
-
-
-Convenient functions for constructing rotamer groups
---------------------------------------------------------------------------------
-
-Instead of building single rotamers, following convenient functions query a 
-rotamer library and build all possible rotamers for a particular residue 
-position. If hbond scoring is enabled and sample_polar_hydrogens is true (**settings**), 
-several rotamers might be constructed and added to the group per library instance:
-
-#. SER construct three rotamers with hydrogen chi angles 180,-60 and 60 
-#. THR construct three rotamers with hydrogen chi angles 180,-60 and 60
-#. TYR construct two rotamers with hydrogen chi angles 180 and 0
-#. HIS construct both possible protonation states (HSE,HSD)  
-
-.. _rotamer_group_construction_label:
-
-.. method:: ConstructRRMRotamerGroup(n_pos,ca_pos,cb_pos,rotamer_id,residue_index,rot_lib,settings,[phi=-1.0472,psi=-0.7854])
-
-  Constructs a full group of :class:`RRMRotamer` objects. It extracts rotamers
-  from *rot_lib* and adds them to the group until the summed probability
-  reaches the probability cutoff defined in **settings**.
-
-  :param n_pos:         Position of nitrogen used as anchor for the rotamers
-  :param ca_pos:        Position of alpha carbon used as anchor for the rotamers
-  :param cb_pos:        Position of beta carbon used as anchor for the rotamers
-  :param rotamer_id:    Type of of the constructed :class:`RRMRotamer`
-  :param residue_index: Index of :class:`RRMRotamer` objects in constructed
-                        :class:`RRMRotamerGroup`. This matters for calculating
-                        the frame energy. Interactions to frame residues with
-                        same index get neglected.
-  :param rot_lib:       Library from which the data is taken to construct the 
-                        rotamers.
-  :param settings:      Settings to control parametrization of the single
-                        particles.
-  :param phi:           Phi backbone dihedral angle used as input for backbone
-                        dependent rotamer library. Default value is a typical
-                        alpha helical value.
-  :param psi:           Psi backbone dihedral angle used as input for backbone
-                        dependent rotamer library. Default value is a typical
-                        alpha helical value.
-
-  :type n_pos:          :class:`ost.geom.Vec3`
-  :type ca_pos:         :class:`ost.geom.Vec3`
-  :type cb_pos:         :class:`ost.geom.Vec3`
-  :type rotamer_id:     :class:`RotamerID`
-  :type residue_index:  :class:`int`
-  :type rot_lib:        :class:`BBDepRotamerLib`
-  :type settings:       :class:`RotamerSettings`
-  :type phi:            :class:`float`
-  :type psi:            :class:`float`
-
-
-.. method:: ConstructRRMRotamerGroup(residue,rotamer_id,residue_index,rot_lib,settings,[phi=-1.0472,psi=-0.7854])
-
-  Constructs a full group of :class:`RRMRotamer` objects. It extracts rotamers
-  from *rot_lib* and adds them to the group until the summed probability
-  reaches the probability cutoff defined in **settings**.
-
-
-  :param residue:       Residue from which the anchor positions will be 
-                        extracted     
-  :param rotamer_id:    Type of of the constructed :class:`RRMRotamer`
-  :param residue_index: Index of :class:`RRMRotamer` objects in constructed
-                        :class:`RRMRotamerGroup`. This matters for calculating
-                        the frame energy. Interactions to frame residues with
-                        same index get neglected.
-  :param rot_lib:       Library from which the data is taken to construct the 
-                        rotamers.
-  :param settings:      Settings to control parametrization of the single
-                        particles.
-  :param phi:           Phi backbone dihedral angle used as input for backbone
-                        dependent rotamer library. Default value is a typical
-                        alpha helical value.
-  :param psi:           Psi backbone dihedral angle used as input for backbone
-                        dependent rotamer library. Default value is a typical
-                        alpha helical value.
-
-  :type n_pos:          :class:`ost.geom.Vec3`
-  :type ca_pos:         :class:`ost.geom.Vec3`
-  :type cb_pos:         :class:`ost.geom.Vec3`
-  :type rotamer_id:     :class:`RotamerID`
-  :type residue_index:  :class:`int`
-  :type rot_lib:        :class:`BBDepRotamerLib`
-  :type settings:       :class:`RotamerSettings`
-  :type phi:            :class:`float`
-  :type psi:            :class:`float`
-
-  :raises:  :exc:`~exceptions.RuntimeError` if not all required anchor atoms 
-            are present in **residue**.
-
-
-.. method:: ConstructFRMRotamerGroup(n_pos, ca_pos, cb_pos, rotamer_id, residue_index, rot_lib, settings, [phi=-1.0472, psi=-0.7854])
-
-  Constructs a full group of :class:`FRMRotamer` objects. It extracts rotamers
-  from *rot_lib* and adds them to the group until the summed probability
-  reaches the probability cutoff defined in **settings**.
-
-  :param n_pos:         Position of nitrogen used as anchor for the rotamers
-  :param ca_pos:        Position of alpha carbon used as anchor for the rotamers
-  :param cb_pos:        Position of beta carbon used as anchor for the rotamers
-  :param rotamer_id:    Type of of the constructed :class:`FRMRotamer`
-  :param residue_index: Index of :class:`FRMRotamer` objects in constructed
-                        :class:`RRMRotamerGroup`. This matters for calculating
-                        the frame energy. Interactions to frame residues with
-                        same index get neglected.
-  :param rot_lib:       Library from which the data is taken to construct the 
-                        rotamers.
-  :param settings:      Settings to control parametrization of the single
-                        particles.
-  :param phi:           Phi backbone dihedral angle used as input for backbone
-                        dependent rotamer library. Default value is a typical
-                        alpha helical value.
-  :param psi:           Psi backbone dihedral angle used as input for backbone
-                        dependent rotamer library. Default value is a typical
-                        alpha helical value.
-
-  :type n_pos:          :class:`ost.geom.Vec3`
-  :type ca_pos:         :class:`ost.geom.Vec3`
-  :type cb_pos:         :class:`ost.geom.Vec3`
-  :type rotamer_id:     :class:`RotamerID`
-  :type residue_index:  :class:`int`
-  :type rot_lib:        :class:`BBDepRotamerLib`
-  :type settings:       :class:`RotamerSettings`
-  :type phi:            :class:`float`
-  :type psi:            :class:`float`
-
-
-.. method:: ConstructFRMRotamerGroup(residue,rotamer_id,residue_index,rot_lib,settings,[phi=-1.0472,psi=-0.7854])
-
-  Constructs a full group of :class:`FRMRotamer` objects. It extracts rotamers
-  from *rot_lib* and adds them to the group until the summed probability
-  reaches the probability cutoff defined in **settings**.
-
-  :param residue:       Residue from which the anchor positions will be 
-                        extracted     
-  :param rotamer_id:    Type of of the constructed :class:`FRMRotamer`
-  :param residue_index: Index of :class:`FRMRotamer` objects in constructed
-                        :class:`RRMRotamerGroup`. This matters for calculating
-                        the frame energy. Interactions to frame residues with
-                        same index get neglected.
-  :param rot_lib:       Library from which the data is taken to construct the 
-                        rotamers.
-  :param settings:      Settings to control parametrization of the single
-                        particles.
-  :param phi:           Phi backbone dihedral angle used as input for backbone
-                        dependent rotamer library. Default value is a typical
-                        alpha helical value.
-  :param psi:           Psi backbone dihedral angle used as input for backbone
-                        dependent rotamer library. Default value is a typical
-                        alpha helical value.
-
-  :type n_pos:          :class:`ost.geom.Vec3`
-  :type ca_pos:         :class:`ost.geom.Vec3`
-  :type cb_pos:         :class:`ost.geom.Vec3`
-  :type rotamer_id:     :class:`RotamerID`
-  :type residue_index:  :class:`int`
-  :type rot_lib:        :class:`BBDepRotamerLib`
-  :type settings:       :class:`RotamerSettings`
-  :type phi:            :class:`float`
-  :type psi:            :class:`float`
-
-  :raises:  :exc:`~exceptions.RuntimeError` if not all required anchor atoms 
-            are present in **residue**.
-
-
-
-.. method:: ConstructRRMRotamerGroup(n_pos,ca_pos,cb_pos,rotamer_id,residue_index,rot_lib,settings)
-
-  Constructs a full group of :class:`RRMRotamer` objects. It extracts rotamers
-  from *rot_lib* and adds them to the group until the summed probability
-  reaches the probability cutoff defined in **settings**.
-
-  :param n_pos:         Position of nitrogen used as anchor for the rotamers
-  :param ca_pos:        Position of alpha carbon used as anchor for the rotamers
-  :param cb_pos:        Position of beta carbon used as anchor for the rotamers
-  :param rotamer_id:    Type of of the constructed :class:`RRMRotamer`
-  :param residue_index: Index of :class:`RRMRotamer` objects in constructed
-                        :class:`RRMRotamerGroup`. This matters for calculating
-                        the frame energy. Interactions to frame residues with
-                        same index get neglected.
-  :param rot_lib:       Library from which the data is taken to construct the 
-                        rotamers.
-  :param settings:      Settings to control parametrization of the single
-                        particles.
-
-  :type n_pos:          :class:`ost.geom.Vec3`
-  :type ca_pos:         :class:`ost.geom.Vec3`
-  :type cb_pos:         :class:`ost.geom.Vec3`
-  :type rotamer_id:     :class:`RotamerID`
-  :type residue_index:  :class:`int`
-  :type rot_lib:        :class:`RotamerLib`
-  :type settings:       :class:`RotamerSettings`
-
+    Calculates sets the energy of all rotamers in the group towards the 
+    given **frame**.
 
-.. method:: ConstructRRMRotamerGroup(residue,rotamer_id,residue_index,rot_lib,settings)
+    :param frame:       Frame containing rigid particles
+    :type frame:        :class:`Frame`
 
-  Constructs a full group of :class:`RRMRotamer` objects. It extracts rotamers
-  from *rot_lib* and adds them to the group until the summed probability
-  reaches the probability cutoff defined in **settings**.
+  .. method:: AddFrameEnergy(frame)
 
+    Calculates adds the energy of all rotamers in the group towards the 
+    given **frame**.
 
-  :param residue:       Residue from which the anchor positions will be 
-                        extracted     
-  :param rotamer_id:    Type of of the constructed :class:`RRMRotamer`
-  :param residue_index: Index of :class:`RRMRotamer` objects in constructed
-                        :class:`RRMRotamerGroup`. This matters for calculating
-                        the frame energy. Interactions to frame residues with
-                        same index get neglected.
-  :param rot_lib:       Library from which the data is taken to construct the 
-                        rotamers.
-  :param settings:      Settings to control parametrization of the single
-                        particles.
+    :param frame:       Frame containing rigid particles
+    :type frame:        :class:`Frame`
 
-  :type n_pos:          :class:`ost.geom.Vec3`
-  :type ca_pos:         :class:`ost.geom.Vec3`
-  :type cb_pos:         :class:`ost.geom.Vec3`
-  :type rotamer_id:     :class:`RotamerID`
-  :type residue_index:  :class:`int`
-  :type rot_lib:        :class:`RotamerLib`
-  :type settings:       :class:`RotamerSettings`
-
-  :raises:  :exc:`~exceptions.RuntimeError` if not all required anchor atoms 
-            are present in **residue**.
-
-
-.. method:: ConstructFRMRotamerGroup(n_pos,ca_pos,cb_pos,rotamer_id,residue_index,rot_lib,settings)
-
-  Constructs a full group of :class:`FRMRotamer` objects. It extracts rotamers
-  from *rot_lib* and adds them to the group until the summed probability
-  reaches the probability cutoff defined in **settings**.
-
-  :param n_pos:         Position of nitrogen used as anchor for the rotamers
-  :param ca_pos:        Position of alpha carbon used as anchor for the rotamers
-  :param cb_pos:        Position of beta carbon used as anchor for the rotamers
-  :param rotamer_id:    Type of of the constructed :class:`FRMRotamer`
-  :param residue_index: Index of :class:`FRMRotamer` objects in constructed
-                        :class:`RRMRotamerGroup`. This matters for calculating
-                        the frame energy. Interactions to frame residues with
-                        same index get neglected.
-  :param rot_lib:       Library from which the data is taken to construct the 
-                        rotamers.
-  :param settings:      Settings to control parametrization of the single
-                        particles.
-
-  :type n_pos:          :class:`ost.geom.Vec3`
-  :type ca_pos:         :class:`ost.geom.Vec3`
-  :type cb_pos:         :class:`ost.geom.Vec3`
-  :type rotamer_id:     :class:`RotamerID`
-  :type residue_index:  :class:`int`
-  :type rot_lib:        :class:`RotamerLib`
-  :type settings:       :class:`RotamerSettings`
-
-
-.. method:: ConstructFRMRotamerGroup(residue,rotamer_id,residue_index,rot_lib,settings)
-
-  Constructs a full group of :class:`FRMRotamer` objects. It extracts rotamers
-  from *rot_lib* and adds them to the group until the summed probability
-  reaches the probability cutoff defined in **settings**.
-
-  :param residue:       Residue from which the anchor positions will be 
-                        extracted     
-  :param rotamer_id:    Type of of the constructed :class:`FRMRotamer`
-  :param residue_index: Index of :class:`FRMRotamer` objects in constructed
-                        :class:`RRMRotamerGroup`. This matters for calculating
-                        the frame energy. Interactions to frame residues with
-                        same index get neglected.
-  :param rot_lib:       Library from which the data is taken to construct the 
-                        rotamers.
-  :param settings:      Settings to control parametrization of the single
-                        particles.
-
-  :type n_pos:          :class:`ost.geom.Vec3`
-  :type ca_pos:         :class:`ost.geom.Vec3`
-  :type cb_pos:         :class:`ost.geom.Vec3`
-  :type rotamer_id:     :class:`RotamerID`
-  :type residue_index:  :class:`int`
-  :type rot_lib:        :class:`BBDepRotamerLib`
-  :type settings:       :class:`RotamerSettings`
+  .. method:: ApplySelfEnergyThresh(thresh=30)
 
-  :raises:  :exc:`~exceptions.RuntimeError` if not all required anchor atoms 
-            are present in **residue**.
+    Searches rotamer with lowest self energy *l_e* and deletes all
+    rotamers with *self_energy* > *l_e* + *thresh*
diff --git a/doc/html/_sources/sidechain/rotamer_constructor.txt b/doc/html/_sources/sidechain/rotamer_constructor.txt
new file mode 100644
index 00000000..316c0aba
--- /dev/null
+++ b/doc/html/_sources/sidechain/rotamer_constructor.txt
@@ -0,0 +1,251 @@
+Rotamer Constructor
+================================================================================
+
+.. currentmodule:: promod3.sidechain
+
+Instead of creating rotamers by yourself, you can simply use the convenient
+functionality provided by PROMOD3
+
+
+Constructing Rotamers and Frame Residues
+--------------------------------------------------------------------------------
+
+
+.. class:: SCWRLRotamerConstructor()
+
+  Constructing rotamers and frame residues that are parametrized according to
+  the SCWRL4 method. They contain all heavy atoms, but also the
+  polar hydrogens. The rotamers start after the CB atom (typically CG). 
+  In case of the :class:`FrameResidue` construction, the
+  constructor distinguishes between backbone and sidechain frame residues.
+
+  .. method:: ConstructRRMRotamerGroup(res, id, residue_index, rot_lib,\
+                                       [probability_cutoff = 0.98])
+  .. method:: ConstructRRMRotamerGroup(all_atom_pos, aa_res_idx, id,\
+                                       residue_index, rot_lib,\
+                                       [probability_cutoff = 0.98])
+  .. method:: ConstructRRMRotamerGroup(n_pos, ca_pos, cb_pos, id,\
+                                       residue_index, rot_lib,\          
+                                       [probability_cutoff = 0.98])
+  .. method:: ConstructRRMRotamerGroup(res, id, residue_index, rot_lib,\
+                                       [phi = -1.0472, psi = -0.7854,\
+                                        probability_cutoff = 0.98])
+  .. method:: ConstructRRMRotamerGroup(all_atom_pos, aa_res_idx, id,\
+                                       residue_index, rot_lib,\
+                                       [phi = -1.0472, psi = -0.7854,\
+                                        probability_cutoff = 0.98])
+  .. method:: ConstructRRMRotamerGroup(n_pos, ca_pos, cb_pos, id,\
+                                       residue_index, rot_lib,\
+                                       [phi = -1.0472, psi = -0.7854,\
+                                        probability_cutoff = 0.98])
+  .. method:: ConstructRRMRotamerGroup(res, id, residue_index, rot_lib_entries,\
+                                       [probability_cutoff = 0.98])
+  .. method:: ConstructRRMRotamerGroup(all_atom_pos, aa_res_idx, id,\
+                                       residue_index, rot_lib_entries,\
+                                       [probability_cutoff = 0.98])
+  .. method:: ConstructRRMRotamerGroup(n_pos, ca_pos, cb_pos, id,\
+                                       residue_index, rot_lib_entries,\          
+                                       [probability_cutoff = 0.98])
+
+    All functions are also avaible for their flexible rotamer model counterpart.
+    =>ConstructFRMRotamerGroup(...) with exactly the same parameters. 
+
+    :param res:         To extract the N, CA, CB backbone anchor
+    :param all_atom_pos: To extract the N, CA, CB backbone anchor
+    :param aa_res_idx:  Index of residue in **all_atom_pos** from which to
+                        extract the backbone anchor
+    :param n_pos:       To directly feed in the backbone anchor positions
+    :param ca_pos:      To directly feed in the backbone anchor positions
+    :param cb_pos:      To directly feed in the backbone anchor positions
+    :param id:          Identifies the sidechain.
+    :param residue_index: Important for the energy calculations towards the 
+                          :class:`Frame` you don't want to calculate a pairwise
+                          energy of the sidechain particles towards particles
+                          representing the own backbone...
+    :param rot_lib:     To search for rotamers
+    :param rot_lib_entries: :class:`RotamerLibEntry` objects to circumvent the 
+                            direct use of a rotamer library
+    :param phi:         Phi dihedral angle used to search for rotamers if a 
+                        :class:`BBDepRotamerLib` is given as input
+    :param psi:         Psi dihedral angle used to search for rotamers if a 
+                        :class:`BBDepRotamerLib` is given as input
+    :param probability_cutoff: For some rotamers, there might be many low 
+                        probability entries in the library. 
+                        The function adds single rotamers to the group until 
+                        the cumulative probability of the added rotamers is 
+                        larger or equal **probability_cutoff**.
+
+    :returns:           The rotamer group containing all constructed rotamers 
+                        with internal energies assigned based on the 
+                        probabilities extracted from the rotamer library. 
+
+    :type res:          :class:`ost.mol.ResidueHandle`
+    :type all_atom_pos: :class:`promod3.loop.AllAtomPositions`
+    :type aa_res_idx:   :class:`int`
+    :type n_pos:        :class:`ost.geom.Vec3`
+    :type ca_pos:       :class:`ost.geom.Vec3`
+    :type cb_pos:       :class:`ost.geom.Vec3`
+    :type id:           :class:`RotamerID`
+    :type residue_index: :class:`int`
+    :type rot_lib:      :class:`RotamerLib` / :class:`BBDepRotamerLib`
+    :type rot_lib_entries: :class:`list`
+    :type probability_cutoff: :class:`float`
+    :rtype:             :class:`RRMRotamerGroup`
+
+    :raises:  :exc:`~exceptions.RuntimeError` when not all required backbone
+              atoms are present in **residue**, not all required atom
+              positions are set in **all_atom_pos** or when the rotamer library
+              does not contain any entries for **id**
+
+
+  .. method:: ConstructBackboneFrameResidue(res, id, residue_index, Real phi,\
+                                            [n_ter = False, c_ter = False])
+
+  .. method:: ConstructBackboneFrameResidue(all_atom_pos, aa_res_idx, id,\
+                                            residue_index, Real phi,\
+                                            [n_ter = False, c_ter = False])
+
+  .. method:: ConstructBackboneFrameResidue(n_pos, ca_pos, c_pos, o_pos, cb_pos,\ 
+                                            id, residue_index, Real phi,\
+                                            [n_ter = False, c_ter = False])
+
+    Constructs backbone frame residues for amino acid residues. It extracts
+    the n, ca, c, o and cb positions and constructs a frame residue based on
+    the parametrizations of SCWRL4. In case of **n_ter**, there are additional
+    hydrogens added at the nitrogen to represent a proper n-terminus. The same
+    is true for **c_ter**, an additional oxygen is built instead. In any case,
+    a single hydrogen is added to the nitrogen (except proline), this is
+    why the phi angle of the residue is required as an input.
+
+    :param res:         Residue from which to extract the backbone positions
+    :param all_atom_pos: To extract the backbone positions
+    :param aa_res_idx:  Index of residue in **all_atom_pos** from which to 
+                        extract the backbone positions
+    :param n_pos:       To directly feed in the backbone positions
+    :param ca_pos:      To directly feed in the backbone positions
+    :param c_pos:       To directly feed in the backbone positions
+    :param o_pos:       To directly feed in the backbone positions
+    :param cb_pos:      To directly feed in the backbone positions
+    :param id:          Identifies the sidechain
+    :param residue_index: Important for the energy calculations towards the 
+                          :class:`Frame` you don't want to calculate a pairwise
+                          energy of the sidechain particles towards particles
+                          representing the own backbone...
+    :param phi:         The dihedral angle of the current residue, required to 
+                        construct the polar nitrogen hydrogen 
+    :param n_ter:       Whether to add additional hydrogens at the nitrogen
+                        to represent a proper n-terminus
+    :param c_ter:       Whether to add an additional oxygen at the carbon to
+                        represent a proper c-terminus
+
+    :type res:          :class:`ost.mol.ResidueHandle`
+    :type all_atom_pos: :class:`promod3.loop.AllAtomPositions`
+    :type aa_res_idx:   :class:`int`
+    :type n_pos:        :class:`ost.geom.Vec3`
+    :type ca_pos:       :class:`ost.geom.Vec3`
+    :type c_pos:        :class:`ost.geom.Vec3`
+    :type o_pos:        :class:`ost.geom.Vec3`
+    :type cb_pos:       :class:`ost.geom.Vec3`
+    :type id:           :class:`RotamerID`
+    :type residue_index: :class:`int`
+    :type phi:          :class:`float`
+    :type n_ter:        :class:`bool`
+    :type c_ter:        :class:`bool`
+
+    :rtype:             :class:`FrameResidue`
+
+
+    :raises:  :exc:`~exceptions.RuntimeError` when not all required backbone
+              atoms are present in **residue**, not all required atom
+              positions are set in **all_atom_pos**.
+
+
+  .. method:: ConstructSidechainFrameResidue(res, id, residue_index)
+
+  .. method:: ConstructSidechainFrameResidue(all_atom, aa_res_idx, id,\ 
+                                             residue_index)
+
+    Extracts all required positions from the input and generates a sidechain
+    frame residue. Additionally to the heavy atoms, the function also produces
+    particles for all polar hydrogens.
+
+    :param res:         Residue from which to extract the sidechain positions
+    :param all_atom_pos: To extract the sidechain positions
+    :param aa_res_idx:  Index of residue in **all_atom_pos** from which to 
+                        extract the sidechain positions
+    :param id:          Identifies the sidechain
+    :param residue_index: idenfifies residue in frame
+
+    :type res:          :class:`ost.mol.ResidueHandle`
+    :type all_atom_pos: :class:`promod3.loop.AllAtomPositions`
+    :type aa_res_idx:   :class:`int`
+    :type id:           :class:`RotamerID`
+    :type residue_index: :class:`int`
+
+    :rtype:             :class:`FrameResidue`
+
+
+    :raises:  :exc:`~exceptions.RuntimeError` when not all required sidechain
+              atoms are present in **residue** or not all required sidechain 
+              atom positions are set in **all_atom_pos**.
+
+
+  .. method:: ConstructFrameResidue(residue, residue_index)
+  
+    Constructs a :class:`FrameResidue` from a :class:`ost.mol.ResidueHandle`.
+    This can be useful to mark a region occupied by a ligand. Note, that
+    there won't be any parametrization of hbonds in this function. All atoms
+    of the residue will be represented as carbons and hydrogens are skipped.
+  
+
+    :param residue:       Residue from which all atoms will be taken to
+                        construct a :class:`FrameResidue`.
+    :param residue_index: Index this :class:`FrameResidue` belongs to.
+
+    :type residue:        :class:`ost.mol.ResidueHandle`
+    :type residue_index:  :class:`int`
+
+    :returns:             :class:`FrameResidue`
+
+  .. method:: ConstructFrameResidueHeuristic(residue, residue_index, comp_lib)
+
+    Constructs a :class:`FrameResidue` from a :class:`ost.mol.ResidueHandle` using
+    a heuristic treatment of the atoms based on the passed compounds library.
+    This is meant to be used as an alternative to :func:`ConstructFrameResidue`,
+    which will be called by this function if the residue is not known by the given
+    compounds library.
+    Only non-hydrogen atoms are considered and by default added as uncharged
+    carbons. Special treatment is used for atoms known by the compounds library
+    in the following cases:
+  
+    - carbons, nitrogens, oxygens and sulfur particles use an appropriate type
+      as in the :class:`SidechainParticle` enumeration
+    - carbonyls are added as charged oxygen particles as hbond acceptors
+  
+    :param residue:       Residue from which all atoms will be taken to
+                          construct a :class:`FrameResidue`.
+    :param residue_index: Index this :class:`FrameResidue` belongs to.
+    :param comp_lib:      OST compound library to use 
+  
+    :type residue:        :class:`ost.mol.ResidueHandle`
+    :type residue_index:  :class:`int`
+    :type comp_lib:       :class:`ost.conop.CompoundLib`
+  
+    :returns:             :class:`FrameResidue`
+  
+
+  .. method:: AssignInternalEnergies(rot_group)
+
+    Takes the rotamer group and assigns every single rotamer its internal
+    energy based on the probabilistic approach used by SCWRL4.
+    => -internal_e_prefac*log(p/max_p), where internal_e_prefac and p are
+    rotamer specific and max_p is the maximum probablity of any of the rotamers
+    in **rot_group**. If you construct a rotamer group by the
+    ConstructRRMRotamerGroup/ConstructFRMRotamerGroup functions, this function 
+    is already called at construction and the energies are properly assigned.
+
+    :param rot_group:   containing all rotamers for which internal energies have
+                        to be assigned
+
+    :type rot_group:    :class:`RRMRotamerGroup` / :class:`FRMRotamerGroup`
+
diff --git a/doc/html/_sources/sidechain/rotamer_id.txt b/doc/html/_sources/sidechain/rotamer_id.txt
index d85dcb15..7eac7b85 100644
--- a/doc/html/_sources/sidechain/rotamer_id.txt
+++ b/doc/html/_sources/sidechain/rotamer_id.txt
@@ -15,34 +15,37 @@ The RotamerID
 .. class:: RotamerID
 
   Enumerates the amino acids. Possible values:
+
+  .. hlist::
+    :columns: 2
   
-  * ARG - Arginine
-  * ASN - Asparagine
-  * ASP - Aspartate
-  * GLN - Glutamine
-  * GLU - Glutamate
-  * LYS - Lysine
-  * SER - Serine
-  * CYS - Cystein
-  * CYH - "free" Cystein
-  * CYD - disulfid bonded Cystein
-  * MET - Methionine
-  * TRP - Tryptophane
-  * TYR - Tyrosine
-  * THR - Threonine
-  * VAL - Valine
-  * ILE - Isoleucine
-  * LEU - Leucine
-  * PRO - Proline
-  * CPR - cis-Proline
-  * TPR - trans-Proline
-  * HIS - Histidine
-  * HSD - d-protonated Histidine
-  * HSE - e-protonated Histidine
-  * PHE - Phenylalanine
-  * GLY - Glycine
-  * ALA - Alanine
-  * XXX - Invalid
+    * ARG - Arginine
+    * ASN - Asparagine
+    * ASP - Aspartate
+    * GLN - Glutamine
+    * GLU - Glutamate
+    * LYS - Lysine
+    * SER - Serine
+    * CYS - Cystein
+    * CYH - "free" Cystein
+    * CYD - disulfid bonded Cystein
+    * MET - Methionine
+    * TRP - Tryptophane
+    * TYR - Tyrosine
+    * THR - Threonine
+    * VAL - Valine
+    * ILE - Isoleucine
+    * LEU - Leucine
+    * PRO - Proline
+    * CPR - cis-Proline
+    * TPR - trans-Proline
+    * HIS - Histidine
+    * HSD - d-protonated Histidine
+    * HSE - e-protonated Histidine
+    * PHE - Phenylalanine
+    * GLY - Glycine
+    * ALA - Alanine
+    * XXX - Invalid
   
   The RotamerID enum can be accessed either directly as ``promod3.sidechain.ARG``
   or as ``promod3.sidechain.RotamerID.ARG``.
diff --git a/doc/html/_sources/sidechain/rotamer_lib.txt b/doc/html/_sources/sidechain/rotamer_lib.txt
index 9b3f429e..21ca7e4e 100644
--- a/doc/html/_sources/sidechain/rotamer_lib.txt
+++ b/doc/html/_sources/sidechain/rotamer_lib.txt
@@ -28,66 +28,31 @@ The Non Backbone Dependent Rotamer Library
   
   Non backbone dependent rotamer library
 
-  .. method:: Load(filename)
+  .. staticmethod:: Load(filename)
+                    LoadPortable(filename)
 
     Loads raw binary file generated with :meth:`Save` (optimized for fast
-    reading).
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
 
-    :param filename:    Name of file, the library will be loaded from
+    :param filename: Path to the file from which to load.
+    :type filename:  :class:`str`
 
-    :type filename:     :class:`str`
+    :returns: A rotamer library
+    :rtype:   :class:`RotamerLib`
 
-    :returns:           A rotamer library
-    :rtype:             :class:`RotamerLib`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if:
-
-              - file cannot be opened.
-              - version number stored in file is not supported.
-              - file assumes different memory-layout than is available on this
-                machine. Use :meth:`LoadPortable` to convert your file.
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
 
   .. method:: Save(filename)
+              SavePortable(filename)
 
-    Saves raw binary representation (optimized for fast reading).This puts many
-    assumptions on the memory-layout of the target-machine and hence it is not
-    portable. A portable version is provided by :meth:`SavePortable`.
-    Preferably portable files are distributed and converted to a raw binary
-    before using them.
-
-    :param filename:    Name of file, the library will be dumped into
-
-    :type filename:     :class:`str`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
-
-  .. method:: LoadPortable(filename)
-
-    Loads portable file generated with :meth:`SavePortable` (slow but less
-    machine-dependent).
-
-    :param filename:    Name of file, the library will be loaded from
-
-    :type filename:     :class:`str`
-
-    :returns:           A rotamer library
-    :rtype:             :class:`RotamerLib`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if:
-
-              - file cannot be opened.
-              - version number stored in file is not supported.
-              - machine-dependent fundamental types are smaller than required.
-
-  .. method:: SavePortable(filename)
-
-    Saves portable binary representation (slow but less machine-dependent).
-
-    :param filename:    Name of file, the library will be dumped into
-
-    :type filename:     :class:`str`
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
 
-    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
+    :param filename: Path to the file where it will be saved.
+    :type filename:  :class:`str`
 
   .. method:: AddRotamer(id, rotamer)
 
@@ -146,64 +111,31 @@ The Backbone Dependent Rotamer Library
   :type phi_bins:       :class:`int`
   :type psi_bins:       :class:`int`
 
-  .. method:: Load(filename)
+  .. staticmethod:: Load(filename)
+                    LoadPortable(filename)
 
     Loads raw binary file generated with :meth:`Save` (optimized for fast
-    reading).
-
-    :param filename:    Name of file, the library will be loaded from
-
-    :type filename:     :class:`str`
+    reading) / portable file generated with :meth:`SavePortable` (slower but
+    less machine-dependent).
 
-    :returns:           A rotamer library
-    :rtype:             :class:`BBDepRotamerLib`
+    :param filename: Path to the file from which to load.
+    :type filename:  :class:`str`
 
-    :raises:  :exc:`~exceptions.RuntimeError` if:
+    :returns: A rotamer library
+    :rtype:   :class:`BBDepRotamerLib`
 
-              - file cannot be opened.
-              - version number stored in file is not supported.
-              - file assumes different memory-layout than is available on this
-                machine. Use :meth:`LoadPortable` to convert your file.
+    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened or if
+              file cannot be parsed (see :ref:`here <portableIO>` for details).
 
   .. method:: Save(filename)
+              SavePortable(filename)
 
-    Saves raw binary representation (optimized for fast reading).This puts many
-    assumptions on the memory-layout of the target-machine and hence it is not
-    portable. A portable version is provided by :meth:`SavePortable`.
-    Preferably portable files are distributed and converted to a raw binary
-    before using them.
-
-    :param filename:    Name of file, the library will be dumped into
-
-    :type filename:     :class:`str`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
-
-  .. method:: LoadPortable(filename)
-
-    Loads portable file generated with :meth:`SavePortable` (slow but less
-    machine-dependent).
-
-    :param filename:    Name of file, the library will be loaded from
-
-    :type filename:     :class:`str`
-
-    :returns:           A rotamer library
-    :rtype:             :class:`BBDepRotamerLib`
-
-    :raises:  :exc:`~exceptions.RuntimeError` if:
-
-              - file cannot be opened.
-              - version number stored in file is not supported.
-              - machine-dependent fundamental types are smaller than required.
-
-  .. method:: SavePortable(filename)
-
-    Saves portable binary representation (slow but less machine-dependent).
-
-    :param filename:    Name of file, the library will be dumped into
+    Saves a raw / portable binary representation. Use portable files for
+    distribution and convert locally to raw files. See :ref:`here <portableIO>`
+    for details.
 
-    :type filename:     :class:`str`
+    :param filename: Path to the file where it will be saved.
+    :type filename:  :class:`str`
 
     :raises:  :exc:`~exceptions.RuntimeError` if file cannot be opened.
 
@@ -235,7 +167,7 @@ The Backbone Dependent Rotamer Library
     The returned rotamers are either directly returned in the form as they are 
     added to the library or can be interpolated.
     In the first option, *phi* and *psi* simply get transformed to the 
-    according bin using following formalism: bin = int((angle + pi)/bin_size).
+    according bin using following formalism: bin = round((angle + pi)/bin_size).
     In case of interpolation, the chi angles and the according standard 
     deviations of the rotamers get bilinearly interpolated using the 
     corresponding rotamers with same configuration from the neighbouring bins. 
diff --git a/doc/html/_sources/sidechain/sidechain_settings.txt b/doc/html/_sources/sidechain/sidechain_settings.txt
deleted file mode 100644
index 5652f945..00000000
--- a/doc/html/_sources/sidechain/sidechain_settings.txt
+++ /dev/null
@@ -1,193 +0,0 @@
-Rotamer Settings
-================================================================================
-
-.. currentmodule:: promod3.sidechain
-
-The rotamer settings control the sidechain modelling algorithms at different
-stages. Most of the parameters that can be set are related to the flexible
-rotamer model (temperature factor and delta factors to control the
-variability of the subrotamers in the flexible rotamer model) 
-or the internal energy prefactor used for the different amino
-acids. Other parameters include the radius influencing the pseudo Lennard
-Jones term for the different atom types and the max interaction radius.
-The max interaction radius is more a technical thing and is used by a 
-collision detection algorithm to define the collision distance, i.e.
-two particles with max radii a,b collide/interact if the distance between 
-them is smaller than a+b. The last three parameters control the buildup of the
-rotamers. It is possible to deactivate the hbond term, resulting in
-no hydrogens being constructed. The sampling of polar hydrogens can also
-be controlled resulting in several rotamers per rotamer lib entry for
-Ser,Thr and Tyr when using the convenient functions for constructing full
-rotamer groups of them (see :ref:`here <rotamer_group_construction_label>`).
-Constructing the rotamer groups can further be controlled by assigning a max
-summed probability resulting in less very unlikely rotamers added to the
-rotamer group (see :ref:`here <rotamer_group_construction_label>`).
-
-.. class:: RotamerSettings
-  
-  .. attribute:: FRM_T_ARG default: 1.23
-
-  .. attribute:: FRM_T_ASN default: 1.41
-
-  .. attribute:: FRM_T_ASP default: 1.48
-
-  .. attribute:: FRM_T_GLN default: 1.32
-
-  .. attribute:: FRM_T_GLU default: 0.94
-
-  .. attribute:: FRM_T_LYS default: 1.27
-
-  .. attribute:: FRM_T_SER default: 3.53
-
-  .. attribute:: FRM_T_CYS default: 1.69
-
-  .. attribute:: FRM_T_MET default: 1.77
-
-  .. attribute:: FRM_T_TRP default: 0.99
-
-  .. attribute:: FRM_T_TYR default: 1.96
-
-  .. attribute:: FRM_T_THR default: 1.11
-
-  .. attribute:: FRM_T_VAL default: 2.20
-
-  .. attribute:: FRM_T_ILE default: 2.03
-
-  .. attribute:: FRM_T_LEU default: 2.55
-
-  .. attribute:: FRM_T_PRO default: 2.62
-
-  .. attribute:: FRM_T_HIS default: 1.35
-
-  .. attribute:: FRM_T_PHE default: 1.07
-
-  .. attribute:: FRM_delta1_ARG default: 0.87
-
-  .. attribute:: FRM_delta2_ARG default: 1.62
-
-  .. attribute:: FRM_delta3_ARG default: 1.67
-
-  .. attribute:: FRM_delta4_ARG default: 0.78
-
-  .. attribute:: FRM_delta1_ASN default: 0.62
-
-  .. attribute:: FRM_delta2_ASN default: 1.93
-
-  .. attribute:: FRM_delta1_ASP default: 1.59
-
-  .. attribute:: FRM_delta2_ASP default: 0.63
-
-  .. attribute:: FRM_delta1_GLN default: 1.55
-
-  .. attribute:: FRM_delta2_GLN default: 0.68
-
-  .. attribute:: FRM_delta3_GLN default: 1.88
-
-  .. attribute:: FRM_delta1_GLU default: 0.82
-
-  .. attribute:: FRM_delta2_GLU default: 1.57
-
-  .. attribute:: FRM_delta3_GLU default: 0.78
-
-  .. attribute:: FRM_delta1_LYS default: 1.62
-
-  .. attribute:: FRM_delta2_LYS default: 0.99
-
-  .. attribute:: FRM_delta3_LYS default: 0.96
-
-  .. attribute:: FRM_delta4_LYS default: 1.48
-
-  .. attribute:: FRM_delta1_SER default: 0.65
-
-  .. attribute:: FRM_delta2_SER default: 2.98
-
-  .. attribute:: FRM_delta1_CYS default: 1.69
-
-  .. attribute:: FRM_delta1_MET default: 0.97
-
-  .. attribute:: FRM_delta2_MET default: 1.54
-
-  .. attribute:: FRM_delta3_MET default: 1.21
-
-  .. attribute:: FRM_delta1_TRP default: 1.28
-
-  .. attribute:: FRM_delta2_TRP default: 1.48
-
-  .. attribute:: FRM_delta1_TYR default: 1.48
-
-  .. attribute:: FRM_delta2_TYR default: 0.73
-
-  .. attribute:: FRM_delta3_TYR default: 0.96
-
-  .. attribute:: FRM_delta1_THR default: 0.88
-
-  .. attribute:: FRM_delta2_THR default: 0.88
-
-  .. attribute:: FRM_delta1_VAL default: 2.08
-
-  .. attribute:: FRM_delta1_ILE default: 1.23
-
-  .. attribute:: FRM_delta2_ILE default: 0.98
-
-  .. attribute:: FRM_delta1_LEU default: 1.15
-
-  .. attribute:: FRM_delta2_LEU default: 1.48
-
-  .. attribute:: FRM_delta1_PRO default: 0.78
-
-  .. attribute:: FRM_delta2_PRO default: 1.27
-
-  .. attribute:: FRM_delta1_HIS default: 1.84
-
-  .. attribute:: FRM_delta2_HIS default: 0.85
-
-  .. attribute:: FRM_delta1_PHE default: 1.45
-
-  .. attribute:: FRM_delta2_PHE default: 1.35
-
-  .. attribute:: internal_e_prefactor_ARG default: 2.27
-
-  .. attribute:: internal_e_prefactor_ASN default: 1.80
-
-  .. attribute:: internal_e_prefactor_ASP default: 2.44
-
-  .. attribute:: internal_e_prefactor_GLN default: 1.61
-
-  .. attribute:: internal_e_prefactor_GLU default: 1.85
-
-  .. attribute:: internal_e_prefactor_LYS default: 2.13
-
-  .. attribute:: internal_e_prefactor_SER default: 2.78
-
-  .. attribute:: internal_e_prefactor_CYS default: 4.07
-
-  .. attribute:: internal_e_prefactor_MET default: 1.95
-
-  .. attribute:: internal_e_prefactor_TRP default: 3.24
-
-  .. attribute:: internal_e_prefactor_TYR default: 2.00
-
-  .. attribute:: internal_e_prefactor_THR default: 2.96
-
-  .. attribute:: internal_e_prefactor_VAL default: 1.62
-
-  .. attribute:: internal_e_prefactor_ILE default: 2.18
-
-  .. attribute:: internal_e_prefactor_LEU default: 2.25
-
-  .. attribute:: internal_e_prefactor_PRO default: 0.76
-
-  .. attribute:: internal_e_prefactor_HIS default: 2.01
-
-  .. attribute:: internal_e_prefactor_PHE default: 1.71
-
-  .. attribute:: probability_cutoff default: 0.98
-
-  .. attribute:: consider_hbonds default: True
-
-  .. attribute:: sample_polar_hydrogens default: True
-
-  
-
-
-
diff --git a/doc/html/_sources/sidechain/subrotamer_optimizer.txt b/doc/html/_sources/sidechain/subrotamer_optimizer.txt
new file mode 100644
index 00000000..e4124466
--- /dev/null
+++ b/doc/html/_sources/sidechain/subrotamer_optimizer.txt
@@ -0,0 +1,45 @@
+Subrotamer Optimization
+================================================================================
+
+.. currentmodule:: promod3.sidechain
+
+The idea of the flexible rotamer model is to have several subrotamers
+representing one single rotamer. 
+One subrotamer is the representative (the active subrotamer).
+Thats the one that gets inserted in the structure once the reconstruction has
+finished. This is not necessarily the optimal one. The SubrotamerOptimizer
+takes a list of flexible rotamers, converts every single flexible rotamer 
+in a rotamer group of rigid rotamers, solves the sidechain reconstruction
+problem and assigns the optimal subrotamers as active in the original 
+flexible rotamers. In terms of energies, the SubrotamerOptimizer expects
+the energy of the flexible rotamers towards the rigid frame already to be set.
+The internal energies can be controlled as parameters and a constant value is
+set for rotamers that are currently active or not. The reason for that is
+that you might want to prefer the currently active subrotamers if no
+pairwise energies to other rotamers are observed. 
+
+.. method:: SubrotamerOptimizer(rotamers, [active_internal_energy=-2.0, \
+                                inactive_internal_energy=0.0, \
+                                max_complexity=100000000, initial_epsilon=0.02)
+
+  Takes the **rotamers** of type :class:`FRMRotamer`, converts all their 
+  subrotamers into rigid rotamers, solves the sidechain reconstruction problem
+  and assigns the ideal subrotamers as active in the input **rotamers**.
+
+  :param rotamers:      The rotamers to be optimized               
+  :type rotamers:       :class:`list` of :class:`FRMRotamer`
+
+  :param active_internal_energy: Internal energy that gets assigned to all
+                                 currently active subrotamers
+  :type active_internal_energy:  :class:`float`
+
+  :param inactive_internal_energy: Internal energy that gets assigned to all
+                                   currently inactive subrotamers
+  :type inactive_internal_energy: :class:`float`
+
+  :param max_complexity: Max complexity of the internal :class:`RotamerGraph`
+  :type max_complexity: :class:`int`
+
+  :param initial_epsilon: Epsilon value controlling the pruning of 
+                          internal :class:`RotamerGraph`
+  :type initial_epsilon: :class:`float`
diff --git a/doc/html/_sources/users.txt b/doc/html/_sources/users.txt
index d1d77fcf..7764b375 100644
--- a/doc/html/_sources/users.txt
+++ b/doc/html/_sources/users.txt
@@ -10,9 +10,11 @@ Contents:
    :maxdepth: 2
 
    gettingstarted
+   actions/index
    buildsystem
    modelling/index
-   loop/index
    sidechain/index
+   scoring/index
+   loop/index
    core/index
    core/setcompoundschemlib
diff --git a/doc/html/actions/index.html b/doc/html/actions/index.html
new file mode 100644
index 00000000..a58f0592
--- /dev/null
+++ b/doc/html/actions/index.html
@@ -0,0 +1,210 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>ProMod3 Actions &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="Documentation For Users" href="../users.html" />
+    <link rel="next" title="Building ProMod3" href="../buildsystem.html" />
+    <link rel="prev" title="Getting Started" href="../gettingstarted.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="project-actions">
+<span id="promod-actions"></span><h1>ProMod3 Actions<a class="headerlink" href="#project-actions" title="Permalink to this headline">¶</a></h1>
+<p>A pure command line interface of ProMod3 is provided by actions.
+You can execute <code class="docutils literal"><span class="pre">pm</span> <span class="pre">help</span></code> for a list of possible actions and for every action,
+you can type <code class="docutils literal"><span class="pre">pm</span> <span class="pre">&lt;ACTION&gt;</span> <span class="pre">-h</span></code> to get a description on its usage.</p>
+<p>Here we list the most prominent actions with simple examples.</p>
+<div class="section" id="building-models">
+<span id="promod-build-model"></span><h2>Building models<a class="headerlink" href="#building-models" title="Permalink to this headline">¶</a></h2>
+<p>You can run a full protein homology modelling pipeline from the command line
+with</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> pm build-model <span class="o">[</span>-h<span class="o">]</span> <span class="o">(</span>-f &lt;FILE&gt; <span class="p">|</span> -c &lt;FILE&gt; <span class="p">|</span> -j &lt;OBJECT&gt;<span class="p">|</span>&lt;FILE&gt;<span class="o">)</span>
+<span class="go">                 (-p &lt;FILE&gt; | -e &lt;FILE&gt;) [-o &lt;FILENAME&gt;]</span>
+</pre></div>
+</div>
+<p>Example usage:</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> pm build-model -f aln.fasta -p tpl.pdb
+</pre></div>
+</div>
+<p>This reads a target-template alignment from <code class="file docutils literal"><span class="pre">aln.fasta</span></code> and a matching
+structure from <code class="file docutils literal"><span class="pre">tpl.pdb</span></code> and produces a gap-less model which is stored as
+<code class="file docutils literal"><span class="pre">model.pdb</span></code>. The output filename can be controlled with the <code class="docutils literal"><span class="pre">-o</span></code> flag.</p>
+<p>Target-template alignments can be provided in FASTA (<code class="docutils literal"><span class="pre">-f</span></code>), CLUSTAL (<code class="docutils literal"><span class="pre">-c</span></code>)
+or as JSON files/objects (<code class="docutils literal"><span class="pre">-j</span></code>). Files can be plain or gzipped.
+At least one alignment must be given and you cannot mix file formats.
+Multiple alignment files can be given and target chains will be appended in the
+given order. The chains of the target model are named with default chain names
+(A, B, C, ..., see <a class="reference internal" href="../modelling/pipeline.html#promod3.modelling.BuildRawModel" title="promod3.modelling.BuildRawModel"><code class="xref py py-meth docutils literal"><span class="pre">BuildRawModel()</span></code></a>).
+Notes on the input formats:</p>
+<ul>
+<li><p class="first">Leading/trailing whitespaces of sequence names will always be deleted</p>
+</li>
+<li><p class="first">FASTA input example:</p>
+<div class="highlight-none"><div class="highlight"><pre>&gt;target
+HGFHVHEFGDNTNGCMSSGPHFNPYGKEHGAPVDENRHLG
+&gt;2jlp-1.A|55
+RAIHVHQFGDLSQGCESTGPHYNPLAVPH------PQHPG
+</pre></div>
+</div>
+<p>Target sequence is either named &#8220;trg&#8221; or &#8220;target&#8221; or the first sequence is
+used. Template sequence names can encode an identifier for the chain to attach
+to it and optionally an offset (here: 55, see below for details).
+Leading whitespaces of fasta headers will be deleted</p>
+</li>
+<li><p class="first">CLUSTAL input follows the same logic as FASTA input</p>
+</li>
+<li><p class="first">JSON input: filenames are not allowed to start with &#8216;{&#8216;.
+JSON objects contain an entry with key &#8216;alignmentlist&#8217;.
+That in turn is an array of objects with keys &#8216;target&#8217; and &#8216;template&#8217;.
+Those in turn are objects with keys
+&#8216;name&#8217; (string id. for sequence),
+&#8216;seqres&#8217; (string for aligned sequence) and optionally for templates
+&#8216;offset&#8217; (number of residues to skip in structure file attached to it).
+Example:</p>
+<div class="highlight-json"><div class="highlight"><pre><span class="p">{</span><span class="nt">&quot;alignmentlist&quot;</span><span class="p">:</span> <span class="p">[</span> <span class="p">{</span>
+  <span class="nt">&quot;target&quot;</span><span class="p">:</span> <span class="p">{</span>
+      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;mytrg&quot;</span><span class="p">,</span>
+      <span class="nt">&quot;seqres&quot;</span><span class="p">:</span> <span class="s2">&quot;HGFHVHEFGDNTNGCMSSGPHFNPYGKEHGAPVDENRHLG&quot;</span>
+  <span class="p">},</span>
+  <span class="nt">&quot;template&quot;</span><span class="p">:</span> <span class="p">{</span>
+      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;2jlp-1.A&quot;</span><span class="p">,</span>
+      <span class="nt">&quot;offset&quot;</span><span class="p">:</span> <span class="mi">55</span><span class="p">,</span>
+      <span class="nt">&quot;seqres&quot;</span><span class="p">:</span> <span class="s2">&quot;RAIHVHQFGDLSQGCESTGPHYNPLAVPH------PQHPG&quot;</span>
+  <span class="p">}</span>
+<span class="p">}</span> <span class="p">]</span> <span class="p">}</span>
+</pre></div>
+</div>
+</li>
+</ul>
+<p>Structures can be provided in PDB (<code class="docutils literal"><span class="pre">-p</span></code>) or in any format readable by the
+<a class="reference external" href="http://www.openstructure.org/docs/dev/io/io/#ost.io.LoadEntity" title="(in OpenStructure v1.6.0)"><code class="xref py py-func docutils literal"><span class="pre">ost.io.LoadEntity()</span></code></a> method (<code class="docutils literal"><span class="pre">-e</span></code>). In the latter case, the format is
+chosen by file ending. Recognized File Extensions: <code class="docutils literal"><span class="pre">.ent</span></code>, <code class="docutils literal"><span class="pre">.pdb</span></code>,
+<code class="docutils literal"><span class="pre">.ent.gz</span></code>, <code class="docutils literal"><span class="pre">.pdb.gz</span></code>, <code class="docutils literal"><span class="pre">.cif</span></code>, <code class="docutils literal"><span class="pre">.cif.gz</span></code>. At least one structure must be
+given and you cannot mix file formats. Multiple structures can be given and each
+structure may have multiple chains, but care must be taken to identify which
+chain to attach to which template sequence. Chains for each sequence are
+identified based on the sequence name of the templates in the alignments. Valid
+sequence names are:</p>
+<ul class="simple">
+<li>anything, if only one structure with one chain</li>
+<li>&#8220;&lt;FILE&gt;.&lt;CHAIN&gt;&#8221;, where &lt;FILE&gt; is the base file name of an imported structure
+with no extensions and &lt;CHAIN&gt; is the identifier of the chain in the imported
+structure.</li>
+<li>&#8220;&lt;FILE&gt;&#8221; if only one chain in file</li>
+<li>&#8220;&lt;CHAIN&gt;&#8221; if only one file imported</li>
+<li>&#8220;&lt;CHAINID&gt;|&lt;OFFSET&gt;&#8221;, where &lt;CHAINID&gt; identifies the chain as above and
+&lt;OFFSET&gt; is the number of residues to skip for that chain to reach the first
+residue in the aligned sequence. Leading/trailing whitespaces of &lt;CHAINID&gt; and
+&lt;OFFSET&gt; are ignored.</li>
+</ul>
+<p>Example: <code class="docutils literal"><span class="pre">...</span> <span class="pre">-p</span> <span class="pre">data/2jlp.pdb.gz</span></code>, where the pdb file has chains <code class="docutils literal"><span class="pre">A</span></code>,
+<code class="docutils literal"><span class="pre">B</span></code>, <code class="docutils literal"><span class="pre">C</span></code> and the template sequence is named <code class="docutils literal"><span class="pre">2jlp.A|55</span></code>.</p>
+<p>Possible exit codes of the action:</p>
+<ul class="simple">
+<li>0: all went well</li>
+<li>1: an unhandled exception was raised</li>
+<li>2: arguments cannot be parsed or required arguments are missing</li>
+<li>3: failed to perform modelling (internal error)</li>
+<li>4: failed to write results to file</li>
+<li>other non-zero: failure in argument checking
+(see <a class="reference internal" href="../core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser" title="promod3.core.pm3argparse.PM3ArgumentParser"><code class="xref py py-class docutils literal"><span class="pre">promod3.core.pm3argparse.PM3ArgumentParser</span></code></a>)</li>
+</ul>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">ProMod3 Actions</a><ul>
+<li><a class="reference internal" href="#building-models">Building models</a></li>
+</ul>
+</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>Previous: <a href="../gettingstarted.html" title="previous chapter">Getting Started</a></li>
+      <li>Next: <a href="../buildsystem.html" title="next chapter">Building ProMod3</a></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/actions/index.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/actions/index.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/actions/index_dev.html b/doc/html/actions/index_dev.html
index 7bb65002..4b0c5775 100644
--- a/doc/html/actions/index_dev.html
+++ b/doc/html/actions/index_dev.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>test_actions - Testing Actions &mdash; ProMod3 0 documentation</title>
+    <title>test_actions - Testing Actions &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="Documentation For Developers" href="../developers.html" />
     <link rel="next" title="ProMod3‘s Share Of CMake" href="../cmake/index.html" />
     <link rel="prev" title="Contributing" href="../contributing.html" />
@@ -191,7 +191,7 @@ happens if a user throws dirty input data in.</p>
 </div>
 <div class="section" id="making-the-script-executable">
 <h3>Making the Script Executable<a class="headerlink" href="#making-the-script-executable" title="Permalink to this headline">¶</a></h3>
-<p>In ProMod3, unit tests are run via <a class="reference external" href="http://www.OpenStructure.org">OST</a>&#8216;s <a class="reference external" href="http://www.openstructure.org/docs/1.3/base/testutils/#module-ost.testutils" title="(in OpenStructure v1.3.3)"><code class="xref py py-mod docutils literal"><span class="pre">ost.testutils</span></code></a> and Python&#8216;s
+<p>In ProMod3, unit tests are run via <a class="reference external" href="http://www.OpenStructure.org">OST</a>&#8216;s <a class="reference external" href="http://www.openstructure.org/docs/dev/base/testutils/#module-ost.testutils" title="(in OpenStructure v1.6.0)"><code class="xref py py-mod docutils literal"><span class="pre">ost.testutils</span></code></a> and Python&#8216;s
 <a class="reference external" href="https://docs.python.org/2.7/library/unittest.html#unittest.TestCase" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">unittest.TestCase</span></code></a>. Those are called when the test module is executed
 as a script:</p>
 <div class="highlight-python"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>13
@@ -308,7 +308,7 @@ printed first followed by <code class="file docutils literal"><span class="pre">
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>arguments</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; A list of arguments for the call.</li>
+<li><strong>arguments</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; A list of arguments for the call.</li>
 <li><strong>verbose</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If <code class="docutils literal"><span class="pre">True</span></code>, report output of the action.</li>
 </ul>
 </td>
@@ -330,7 +330,7 @@ printed first followed by <code class="file docutils literal"><span class="pre">
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
 <li><strong>exit_code</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The expected return code, <code class="docutils literal"><span class="pre">$?</span></code> in a shell.</li>
-<li><strong>arguments</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; A list of arguments for the call.</li>
+<li><strong>arguments</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; A list of arguments for the call.</li>
 <li><strong>verbose</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If <code class="docutils literal"><span class="pre">True</span></code>, report output of the action.</li>
 </ul>
 </td>
@@ -411,7 +411,7 @@ file (also complains if a directory is found instead).</p>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/buildsystem.html b/doc/html/buildsystem.html
index 38a22bdb..6caf7965 100644
--- a/doc/html/buildsystem.html
+++ b/doc/html/buildsystem.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Building ProMod3 &mdash; ProMod3 0 documentation</title>
+    <title>Building ProMod3 &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    './',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,10 +23,10 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="index.html" />
     <link rel="up" title="Documentation For Users" href="users.html" />
     <link rel="next" title="modelling - Protein Modelling" href="modelling/index.html" />
-    <link rel="prev" title="Getting Started" href="gettingstarted.html" />
+    <link rel="prev" title="ProMod3 Actions" href="actions/index.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -44,21 +44,20 @@
 <div class="section" id="dependencies">
 <h2>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this headline">¶</a></h2>
 <p>ProMod3 is build on top of <a class="reference external" href="http://www.OpenStructure.org">OpenStructure</a> (OST), requiring at least version
-1.5. OST must be configured and compiled with <code class="docutils literal"><span class="pre">ENABLE_MM=1</span></code> to use <a class="reference external" href="https://simtk.org/home/openmm">OpenMM</a>.
+1.7. OST must be configured and compiled with <code class="docutils literal"><span class="pre">ENABLE_MM=1</span></code> to use <a class="reference external" href="http://openmm.org">OpenMM</a>.
 To create the build system, <a class="reference external" href="https://cmake.org/">CMake</a> is required in version
 2.8.7 or higher. <a class="reference external" href="https://www.python.org/">Python</a> works well from version 2.7. For OST and the
-C++ bit of ProMod3, <a class="reference external" href="http://www.boost.org/">Boost</a> is required in version 1.47.0 (the same as
-used for OST). Also <a class="reference external" href="http://eigen.tuxfamily.org/index.php?title=Main_Page">Eigen 3</a> and <a class="reference external" href="http://www.netlib.org/lapack/">LAPACK</a> are needed. To build
+C++ bit of ProMod3, <a class="reference external" href="http://www.boost.org/">Boost</a> is required in version 1.53.0 (the same as
+used for OST). Also <a class="reference external" href="http://eigen.tuxfamily.org/index.php?title=Main_Page">Eigen 3</a> is needed. To build
 documentation, <a class="reference external" href="http://sphinx-doc.org/">Sphinx</a> 1.2b1 is required.</p>
-<p>The currently (Nov. 2015) preferred versions are:</p>
+<p>The currently preferred versions are:</p>
 <ul class="simple">
-<li><a class="reference external" href="http://www.OpenStructure.org">OST</a> 1.5</li>
-<li><a class="reference external" href="https://simtk.org/home/openmm">OpenMM</a> 6.1</li>
+<li><a class="reference external" href="http://www.OpenStructure.org">OST</a> 1.7</li>
+<li><a class="reference external" href="http://openmm.org">OpenMM</a> 7.1.1</li>
 <li><a class="reference external" href="https://cmake.org/">CMake</a> 2.8.12</li>
 <li><a class="reference external" href="https://www.python.org/">Python</a> 2.7.5</li>
 <li><a class="reference external" href="http://www.boost.org/">Boost</a> 1.53.0</li>
-<li><a class="reference external" href="http://eigen.tuxfamily.org/index.php?title=Main_Page">Eigen 3</a> 3.2.1</li>
-<li><a class="reference external" href="http://www.netlib.org/lapack/">LAPACK</a> 3.4.2</li>
+<li><a class="reference external" href="http://eigen.tuxfamily.org/index.php?title=Main_Page">Eigen 3</a> 3.3.0</li>
 <li><a class="reference external" href="http://sphinx-doc.org/">Sphinx</a> 1.3.1</li>
 </ul>
 </div>
@@ -78,11 +77,10 @@ build folder and configure and compile in there:</p>
 <p>For us, at least pointer to the OST installation directory is needed,
 handed over to CMake by <code class="docutils literal"><span class="pre">-D</span></code> into the variable <code class="docutils literal"><span class="pre">OST_ROOT</span></code> (e.g. OST
 headers would be located in <code class="docutils literal"><span class="pre">OST_ROOT/include/ost</span></code>).</p>
-<p>Similarly, one can specify folders for Boost, Python, Eigen 3 and LAPACK
+<p>Similarly, one can specify folders for Boost, Python and Eigen 3
 if multiple versions exist and/or they are not installed in a default location.
 These are set with the <code class="docutils literal"><span class="pre">BOOST_ROOT</span></code> (make sure that&#8217;s the same as for OST),
-<code class="docutils literal"><span class="pre">PYTHON_ROOT</span></code>, <code class="docutils literal"><span class="pre">EIGEN3_INCLUDE_DIR</span></code>, <code class="docutils literal"><span class="pre">BLAS_blas_LIBRARY</span></code> (BLAS library used
-by LAPACK) and <code class="docutils literal"><span class="pre">LAPACK_lapack_LIBRARY</span></code>.</p>
+<code class="docutils literal"><span class="pre">PYTHON_ROOT</span></code> and <code class="docutils literal"><span class="pre">EIGEN3_INCLUDE_DIR</span></code>.</p>
 <p>Here is a list of more options used within ProMod3:</p>
 <ul class="simple">
 <li><code class="docutils literal"><span class="pre">DISABLE_DOCUMENTATION</span></code> Don&#8217;t build documentation, don&#8217;t search for Sphinx</li>
@@ -90,6 +88,10 @@ by LAPACK) and <code class="docutils literal"><span class="pre">LAPACK_lapack_LI
 <code class="docutils literal"><span class="pre">make</span> <span class="pre">check</span></code> (implicit by <code class="docutils literal"><span class="pre">DISABLE_DOCUMENTATION</span></code>)</li>
 <li><code class="docutils literal"><span class="pre">DISABLE_LINKCHECK</span></code> Don&#8217;t test links from documentation on <code class="docutils literal"><span class="pre">make</span> <span class="pre">check</span></code>
 (implicit by <code class="docutils literal"><span class="pre">DISABLE_DOCUMENTATION</span></code>)</li>
+<li><code class="docutils literal"><span class="pre">ENABLE_SSE</span></code> Allow for more agressive optimization by adding -msse4 flag to
+the compiler. At some places within the code, we use SSE intrinsics explicitely.
+This is only enabled if OST has been compiled with single precision.
+(<code class="docutils literal"><span class="pre">OST_DOUBLE_PRECISION</span></code> flag)</li>
 </ul>
 <p>Since we use OST in the background, some of its options for CMake are
 also relevant, here. Basically they need to be set to exactly the same value.
@@ -109,8 +111,9 @@ This way, you can have several builds with different configurations. Also if
 anything goes wrong, just remove the build directory to get to a clean state
 again. No searching for CMake cache files or checking if certain files
 really got rebuild and similar things required.</p>
+</div>
 <div class="section" id="running-make">
-<h3>Running Make<a class="headerlink" href="#running-make" title="Permalink to this headline">¶</a></h3>
+<h2>Running Make<a class="headerlink" href="#running-make" title="Permalink to this headline">¶</a></h2>
 <p>After configuring, you want to build ProMod3 by</p>
 <div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> make
 </pre></div>
@@ -132,6 +135,21 @@ builder</li>
 <li><code class="docutils literal"><span class="pre">help</span></code> <span class="target" id="index-5"></span>make help Prints a list of targets available</li>
 </ul>
 </div>
+<div class="section" id="installing-project">
+<h2>Installing ProMod3<a class="headerlink" href="#installing-project" title="Permalink to this headline">¶</a></h2>
+<p>If you wish to install ProMod3 (note that you can also safely keep it all in
+the <code class="file docutils literal"><span class="pre">stage</span></code> directory), you can use</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> make install
+</pre></div>
+</div>
+<p>By default, this will copy the <code class="file docutils literal"><span class="pre">stage</span></code> directory to <code class="file docutils literal"><span class="pre">/usr/local</span></code>. To
+override this, you can add the <code class="docutils literal"><span class="pre">-DCMAKE_INSTALL_PREFIX=&lt;INSTALL</span> <span class="pre">PATH&gt;</span></code> flag to
+your <code class="docutils literal"><span class="pre">cmake</span></code> call.</p>
+<p>After the installation, you should be able to delete the whole source folder. To
+ensure that everything works, you can use a set of automated &#8220;sanity checks&#8221;.
+Please follow the instructions in <code class="file docutils literal"><span class="pre">extras/sanity_checks/README</span></code> to setup
+and run those tests after moving the source folder. If everything works, you can
+safely delete the whole source folder.</p>
 </div>
 </div>
 
@@ -145,10 +163,9 @@ builder</li>
   <ul>
 <li><a class="reference internal" href="#">Building ProMod3</a><ul>
 <li><a class="reference internal" href="#dependencies">Dependencies</a></li>
-<li><a class="reference internal" href="#using-cmake">Using CMake</a><ul>
+<li><a class="reference internal" href="#using-cmake">Using CMake</a></li>
 <li><a class="reference internal" href="#running-make">Running Make</a></li>
-</ul>
-</li>
+<li><a class="reference internal" href="#installing-project">Installing ProMod3</a></li>
 </ul>
 </li>
 </ul>
@@ -157,7 +174,7 @@ builder</li>
 <ul>
   <li><a href="index.html">Documentation overview</a><ul>
   <li><a href="users.html">Documentation For Users</a><ul>
-      <li>Previous: <a href="gettingstarted.html" title="previous chapter">Getting Started</a></li>
+      <li>Previous: <a href="actions/index.html" title="previous chapter">ProMod3 Actions</a></li>
       <li>Next: <a href="modelling/index.html" title="next chapter"><code class="docutils literal"><span class="pre">modelling</span></code> - Protein Modelling</a></li>
   </ul></li>
   </ul></li>
@@ -188,7 +205,7 @@ builder</li>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/changelog.html b/doc/html/changelog.html
index b9f5c280..c94ead01 100644
--- a/doc/html/changelog.html
+++ b/doc/html/changelog.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Changelog &mdash; ProMod3 0 documentation</title>
+    <title>Changelog &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    './',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,8 +23,8 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="index.html" />
-    <link rel="prev" title="Using binary files in ProMod3" href="portableIO.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="index.html" />
+    <link rel="prev" title="Using Binary Files In ProMod3" href="portableIO.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -66,7 +66,7 @@
 <h3>Related Topics</h3>
 <ul>
   <li><a href="index.html">Documentation overview</a><ul>
-      <li>Previous: <a href="portableIO.html" title="previous chapter">Using binary files in ProMod3</a></li>
+      <li>Previous: <a href="portableIO.html" title="previous chapter">Using Binary Files In ProMod3</a></li>
   </ul></li>
 </ul>
 </div>
@@ -95,7 +95,7 @@
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/cmake/index.html b/doc/html/cmake/index.html
index ee00728c..8d946acf 100644
--- a/doc/html/cmake/index.html
+++ b/doc/html/cmake/index.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>ProMod3‘s Share Of CMake &mdash; ProMod3 0 documentation</title>
+    <title>ProMod3‘s Share Of CMake &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,9 +23,9 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="Documentation For Developers" href="../developers.html" />
-    <link rel="next" title="Using binary files in ProMod3" href="../portableIO.html" />
+    <link rel="next" title="Using Binary Files In ProMod3" href="../portableIO.html" />
     <link rel="prev" title="test_actions - Testing Actions" href="../actions/index_dev.html" />
    
   
@@ -107,8 +107,7 @@ ProMod3 module).</dd>
 <code class="file docutils literal"><span class="pre">promod3/NAME</span></code>.</dd>
 <dt><code class="docutils literal"><span class="pre">LINK</span></code></dt>
 <dd>Add dependencies to external libraries. You may use some predefines set of
-libraries here, such as <code class="docutils literal"><span class="pre">${OST_LIBRARIES}</span></code>, <code class="docutils literal"><span class="pre">${BOOST_LIBRARIES}</span></code> and
-<code class="docutils literal"><span class="pre">${LAPACK_LIBRARIES}</span></code>.</dd>
+libraries here, such as <code class="docutils literal"><span class="pre">${OST_LIBRARIES}</span></code> and <code class="docutils literal"><span class="pre">${BOOST_LIBRARIES}</span></code>.</dd>
 </dl>
 </dd></dl>
 
@@ -125,9 +124,9 @@ libraries here, such as <code class="docutils literal"><span class="pre">${OST_L
       <span class="s">[NEED_CONFIG_HEADER]</span><span class="p">)</span>
 </pre></div>
 </div>
-<p>Define the Python interface of a ProMod3 ProMod3 module from a set of
-C++ wrappers and/or Python files. This will define the following make
-targets (where <code class="docutils literal"><span class="pre">NAME</span></code> is the provided module name):</p>
+<p>Define the Python interface of a ProMod3 module from a set of C++
+wrappers and/or Python files. This will define the following make targets
+(where <code class="docutils literal"><span class="pre">NAME</span></code> is the provided module name):</p>
 <ul class="simple">
 <li><code class="docutils literal"><span class="pre">_NAME</span></code>: builds library <code class="file docutils literal"><span class="pre">_NAME</span></code> for Python wrapper around C++</li>
 <li><code class="docutils literal"><span class="pre">NAME_pymod</span></code>: copies (and/or translates) all Python files</li>
@@ -344,7 +343,7 @@ target has to be created <strong>before</strong> any action may be attached to i
   <li><a href="../index.html">Documentation overview</a><ul>
   <li><a href="../developers.html">Documentation For Developers</a><ul>
       <li>Previous: <a href="../actions/index_dev.html" title="previous chapter"><code class="docutils literal"><span class="pre">test_actions</span></code> - Testing Actions</a></li>
-      <li>Next: <a href="../portableIO.html" title="next chapter">Using binary files in ProMod3</a></li>
+      <li>Next: <a href="../portableIO.html" title="next chapter">Using Binary Files In ProMod3</a></li>
   </ul></li>
   </ul></li>
 </ul>
@@ -374,7 +373,7 @@ target has to be created <strong>before</strong> any action may be attached to i
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/contributing.html b/doc/html/contributing.html
index 4fe0ba21..6963d2e9 100644
--- a/doc/html/contributing.html
+++ b/doc/html/contributing.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Contributing &mdash; ProMod3 0 documentation</title>
+    <title>Contributing &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    './',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,10 +23,10 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="index.html" />
     <link rel="up" title="Documentation For Developers" href="developers.html" />
     <link rel="next" title="test_actions - Testing Actions" href="actions/index_dev.html" />
-    <link rel="prev" title="Documentation For Developers" href="developers.html" />
+    <link rel="prev" title="ProMod3 Setup" href="dev_setup.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -41,301 +41,11 @@
             
   <div class="section" id="contributing">
 <h1>Contributing<a class="headerlink" href="#contributing" title="Permalink to this headline">¶</a></h1>
-<p>The following should explain, in a coarse grain manner, how to add new
-features or your project to ProMod3. Important topics are Git branches, the
-directory structure and tightly linked with this also CMake. The most general
-advice would be to use existing bits and pieces as examples and to be
-consistent with what you already find here. As an example, documentation
-explaining what a whole module is supposed to do usually goes into a
-<code class="file docutils literal"><span class="pre">doc</span></code> directory within the modules tree, while the API itself is
-documented inline. One exception exists on the example-driven approach:
-following the <a class="reference internal" href="core/index.html#module-promod3.core" title="promod3.core: Basic functionality, supporting standard tasks in your code."><code class="xref py py-mod docutils literal"><span class="pre">core</span></code></a> module for your setup is not advisable. This
-one is a bit special and provides core functionality to everybody else.</p>
-<p>In the end of this chapter you will find a little walk-through on how to get
-started.</p>
-<div class="section" id="git-branches">
-<span id="id1"></span><h2>Git Branches<a class="headerlink" href="#git-branches" title="Permalink to this headline">¶</a></h2>
-<p>Basically we have two, sometimes three major branches. <code class="docutils literal"><span class="pre">master</span></code>, <code class="docutils literal"><span class="pre">develop</span></code>
-and in front of a new release a dedicated release branch. For bugs, hotfix
-branches of a rather short life are used.</p>
-<p><code class="docutils literal"><span class="pre">master</span></code> is the stable branch, corresponding to a released version. It is
-solely fed by a release or hotfix branch.</p>
-<p>Release branches, usually labelled <code class="docutils literal"><span class="pre">release-&lt;VERSION&gt;</span></code>, are branched of
-<code class="docutils literal"><span class="pre">develop</span></code> to fix features and thoroughly test them before a new major
-release. Once everything looks trustworthy, such a branch is merged into
-<code class="docutils literal"><span class="pre">master</span></code> and since there should be a few bug fixes in, <code class="docutils literal"><span class="pre">master</span></code> is merged
-into <code class="docutils literal"><span class="pre">develop</span></code>. Bugs are fixed in dedicated hotfix branches, which should
-only exist for the fix and testing itself. Those are forged from release
-branches or <code class="docutils literal"><span class="pre">master</span></code>. If created for <code class="docutils literal"><span class="pre">master</span></code>, they are also merged back
-into <code class="docutils literal"><span class="pre">develop</span></code>.</p>
-<p>The <code class="docutils literal"><span class="pre">develop</span></code> branch exists to introduce new features up to the level of
-whole projects extending ProMod3 and see that they work seamlessly together
-with the rest of the system. There do exist a couple of rather strict rules for
-what goes into this branch:</p>
-<ul class="simple">
-<li>Your code must have been (briefly) reviewed by others</li>
-<li>There have to be unit tests</li>
-<li>It needs to pass <code class="docutils literal"><span class="pre">make</span> <span class="pre">check</span></code> <strong>including</strong> <code class="docutils literal"><span class="pre">doctest</span></code> &amp; <code class="docutils literal"><span class="pre">linkcheck</span></code></li>
-<li>Your project needs documentation</li>
-<li>It must not break the ability of out-of-source builds</li>
-</ul>
-<p>The reason to be a bit restrictive on branches which end up in actual releases,
-should be mostly obvious: ProMod3 is used by productive services as a third
-party toolbox. There it is not an item of active development and people
-probably have no insight in its internals. So messing up a new release creates
-a lot of extra work for a lot of people. First for the developer of a service
-to find out that ProMod3 has turned malicious, then for the maintainer of
-this package to figure out that its your contribution messing things up and in
-the end for you, fixing the problems.</p>
-<p>The place where you may get messy is your own Git branch within the ProMod3
-repository. This is basically where you should develop your project. Once you
-created something that could go into a release, tidy things up according to the
-rules from above and merge it into <code class="docutils literal"><span class="pre">develop</span></code>. From there it will
-automatically find its way into the next release.</p>
-<p>To set up your own branch, start from a current <code class="docutils literal"><span class="pre">develop</span></code> branch:</p>
-<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git checkout develop         <span class="c"># switch to branch develop</span>
-<span class="gp">$</span> git pull --rebase            <span class="c"># update branch develop</span>
-<span class="gp">$</span> git checkout -b &lt;BRANCHNAME&gt; <span class="c"># create branch &lt;BRANCHNAME&gt; and switch to it</span>
-</pre></div>
-</div>
-<p>Over time, <code class="docutils literal"><span class="pre">develop</span></code> may recognise some changes, e.g. new features, which you
-want to make use of in your project. Keeping your branch up to date is a three
-step process. Git does not allow updates on top of changed code, so either
-changes have to be committed, or if in the middle of implementing something,
-stored away temporarily. Making commits is straight forward:</p>
-<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git commit -m <span class="s1">&#39;&lt;DESCRIPTION&gt;&#39;</span> <span class="c"># commit changes including a comment</span>
-</pre></div>
-</div>
-<p>Hiding your changes away from Git just for updating files is a bit more
-involved. Everything is easily stored on an internal stack and needs to be
-fetched from there, once the branch was updated. One major problem in the past
-was a possible loss of code by those operations. If the update changes a file
-you have changed, too, and stashed away, this may end up in a non-resolvable
-merge conflict and your changes are lost. Usually the log tells you, which
-files were recently modified. Moving all current changes to the stack is
-achieved by:</p>
-<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git stash save
-</pre></div>
-</div>
-<p>To revive them, use:</p>
-<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git stash pop
-</pre></div>
-</div>
-<p>After cleaning up your branch, switch to <code class="docutils literal"><span class="pre">develop</span></code>, update it and switch back:</p>
-<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git checkout develop
-<span class="gp">$</span> git pull --rebase
-<span class="gp">$</span> git checkout &lt;BRANCHNAME&gt;
-</pre></div>
-</div>
-<p>Now for actually updating your branch, there are two different ways: merging
-and rebasing. A rebase may only be done, if you <strong>never</strong> pushed your branch to
-the origin of the repository (otherwise you will mess up history, in the worst
-case <code class="docutils literal"><span class="pre">develop</span></code> may be unusable once you merge):</p>
-<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git rebase develop
-</pre></div>
-</div>
-<p>For branches which are available to others, do a proper merge:</p>
-<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git merge develop
-</pre></div>
-</div>
-<p>This may require some manual conflict solving and will end up in a merge commit.</p>
-</div>
-<div class="section" id="git-hooks">
-<h2>Git Hooks<a class="headerlink" href="#git-hooks" title="Permalink to this headline">¶</a></h2>
-<p>Git hooks are scripts invoked by Git in connection to certain commands.
-ProMod3 currently provides one for <strong class="command">commit</strong>. It is installed by</p>
-<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> cp extras/pre_commit/pre-commit .git/hooks/
-</pre></div>
-</div>
-<p>Its task is applying coding standards and doing a bunch of other checks on the
-files involved in a commit. Everything around the script is hosted in
-<code class="file docutils literal"><span class="pre">extras/pre_commit/</span></code>. The checks can be manually executed with</p>
-<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> python .git/hooks/pre-commit
-</pre></div>
-</div>
-<p>If you ever have to skip the hook,</p>
-<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git commit --no-verify
-</pre></div>
-</div>
-<p>does the trick. <strong>But</strong> checks are always run on the complete file containing
-changes, not only on the lines changed. This means if you opt out of an issue,
-it will reappear next time that very file changes.</p>
-<p>For checking Python code, the pre-commit hook employs <a class="reference external" href="http://www.pylint.org">Pylint</a>, to make sure
-we stay close to <a class="reference external" href="https://www.python.org/dev/peps/pep-0008/">PEP 8</a>. If you feel the need to make changes to the Pylint
-call, please make sure you fully understand what the complaints are. Sometimes
-PEP 8 sounds overly restrictive but it may help with performance and
-compatibility with Python 3. For ProMod3 it is also important that the code
-looks similar throughout the various modules. So do not disable a check because
-it just seems inconvenient or you do not understand why Pylint is croaking at
-what looks like &#8216;working&#8217; code. But then there are also cases where Pylint is
-not smart enough to cope with valid PEP 8 code. For changes with valid cause,
-the configuration flushed into Pylint may be found at
-<code class="file docutils literal"><span class="pre">extras/pre_commit/pm3_csc/filecheck/pylintrc</span></code> and
-<code class="file docutils literal"><span class="pre">extras/pre_commit/pm3_csc/filecheck/pylint-unittest-rc</span></code>. The latter one
-is invoked on unit test code, where we may go a little bit less restrictive.</p>
-</div>
-<div class="section" id="directory-structure">
-<h2>Directory Structure<a class="headerlink" href="#directory-structure" title="Permalink to this headline">¶</a></h2>
-<p>The directory structure of the ProMod3 repository is supposed to &#8216;keep
-everything together that belongs together&#8217;. That is, code, documentation and
-extra data should be gathered on a per-module basis immediately in the
-repository root. The directory structure of your module should look like this:</p>
-<div class="highlight-text"><div class="highlight"><pre>promod3.git/                            Project folder
-      your_module/                      Directory housing your project
-            CMakeLists.txt              CMake configuration for this module
-            data/                       Extra data (if needed)
-                  CMakeLists.txt        CMake configuration
-                  ...
-            doc/                        Documentation
-                  CMakeLists.txt        CMake configuration
-                  your_module.rst       Overview/ frame of your module
-                  ...
-            pymod/                      Python code
-                  CMakeLists.txt        CMake configuration
-                  __init__.py           Init file needed for importing
-                  submodule1.py         Code
-                  ...
-            src/                        C/ C++ code
-                  CMakeLists.txt        CMake configuration
-                  source1.cc            C++ code
-                  source2.hh            Header
-                  ...
-            tests/                      Unit tests
-                  CMakeLists.txt        CMake configuration
-                  data/                 Test data (if needed)
-                        ...
-                  test_your_module.py   Unit tests for your_module
-                  test_submodule1.py    Unit tests for submodule1
-                  ...
-</pre></div>
-</div>
-</div>
-<div class="section" id="cmake">
-<h2>CMake<a class="headerlink" href="#cmake" title="Permalink to this headline">¶</a></h2>
-<p>The attentive reader may have noticed all the <code class="file docutils literal"><span class="pre">CMakeLists.txt</span></code> files in
-the directory structure. Those are needed to configure the build system, e.g.
-tell it which files have to be considered packaging, compiling, etc.. Also
-Python modules are declared there as well as which files belong to the
-documentation. CMake is a rather complex topic (unfortunately all usable
-build systems seem to be) so we skip a detailed view, here, and just advice you
-to go by example. There is a tiny bit of documentation on our additions to
-CMake <a class="reference internal" href="cmake/index.html#pm3-cmake-doc"><span>here</span></a>. If you really need to make changes to the
-build system, other than adding new files and modules, you have to dive into
-CMake documentation all by yourself and on your own responsibility. You have
-been warned.</p>
-</div>
-<div class="section" id="the-stage-directory">
-<h2>The <code class="file docutils literal"><span class="pre">stage</span></code> Directory<a class="headerlink" href="#the-stage-directory" title="Permalink to this headline">¶</a></h2>
-<p>Once you hit <strong class="command">make</strong> in your build directory, a directory <code class="file docutils literal"><span class="pre">stage</span></code>
-in this path will be populated. It just resembles a directory structure as of a
-usual Unix file system filled with the build products of ProMod3. The
-<code class="file docutils literal"><span class="pre">stage</span></code> directory tree can already be utilised. You may import Python
-modules from there, use the binaries from <code class="file docutils literal"><span class="pre">stage/bin</span></code>, etc..</p>
-</div>
-<div class="section" id="quick-testing-of-project-features">
-<h2>Quick testing of ProMod3 features<a class="headerlink" href="#quick-testing-of-project-features" title="Permalink to this headline">¶</a></h2>
-<p>High-level features of ProMod3, can be tested directly in an interactive
-Python shell. First, you need to tell Python, where to find the modules by
-defining the <code class="docutils literal"><span class="pre">PYTHONPATH</span></code> env. variable in your shell to include the
-<code class="file docutils literal"><span class="pre">lib64/python2.7/site-packages</span></code> folders of the <code class="file docutils literal"><span class="pre">stage</span></code> folders of
-ProMod3 and OST. For convenience, you can place the export-command in
-your <code class="file docutils literal"><span class="pre">.bashrc</span></code> (or so). Then, you can import modules from <code class="docutils literal"><span class="pre">promod3</span></code>
-and <code class="docutils literal"><span class="pre">ost</span></code> as in the example codes shown in this documentation.</p>
-<p>To test low-level C++ features, you can copy the <code class="file docutils literal"><span class="pre">extras/test_code</span></code>
-folder and adapt it for your purposes. First, you will have to fix the paths
-to ProMod3 and OST in the <code class="file docutils literal"><span class="pre">Makefile</span></code> by changing the following
-lines:</p>
-<div class="highlight-make"><div class="highlight"><pre><span class="c"># path to OST and ProMod3 stage</span>
-<span class="nv">OST_ROOT</span> <span class="o">=</span> &lt;DEFINEME&gt;/ost/build/stage
-<span class="nv">PROMOD3_ROOT</span> <span class="o">=</span> &lt;DEFINEME&gt;/ProMod3/build/stage
-</pre></div>
-</div>
-<p>Afterwards, you should be able to compile and run small sample codes that use
-ProMod3 and OST as in the <code class="file docutils literal"><span class="pre">test.cc</span></code> example. You can compile your
-code by executing <code class="docutils literal"><span class="pre">make</span></code> and run it with <code class="docutils literal"><span class="pre">make</span> <span class="pre">run</span></code>. Also, remember to set
-the <code class="docutils literal"><span class="pre">PROMOD3_SHARED_DATA_PATH</span></code> variable if you moved the stage folder.</p>
-</div>
-<div class="section" id="unit-tests">
-<h2>Unit Tests<a class="headerlink" href="#unit-tests" title="Permalink to this headline">¶</a></h2>
-<p>Of course your code should contain tests. But we cannot give an elaborate
-tutorial on unit testing here. Again, have a look at how other modules treat
-this topic and then there is quite a lot of educated material to be found on
-the Internet. Nevertheless, here is a short list of most important advices:</p>
-<ul class="simple">
-<li>Tests go into dedicated scripts/ source files in the <code class="file docutils literal"><span class="pre">tests</span></code> directory</li>
-<li>No external data dependencies, if tests need data, they find it in
-<code class="file docutils literal"><span class="pre">tests/data</span></code></li>
-<li>If &#8216;exotic&#8217; Python modules are used, consider making the test aware of the
-possibility that the module is not available</li>
-<li>Tests do not fail on purpose</li>
-<li>No failing tests, that are considered &#8216;this does not affect anything&#8217;</li>
-</ul>
-<p>To run the whole test suite, <code class="docutils literal"><span class="pre">make</span> <span class="pre">check</span></code> is enough. This will also trigger
-the <code class="docutils literal"><span class="pre">doctest</span></code> and <code class="docutils literal"><span class="pre">linkcheck</span></code> targets. Alternatively you can run:</p>
-<ul class="simple">
-<li><code class="docutils literal"><span class="pre">make</span> <span class="pre">codetest</span></code> to run only unit tests from all modules in ProMod3.
-Note that <code class="docutils literal"><span class="pre">make</span> <span class="pre">check</span></code> does nothing more but invoking <code class="docutils literal"><span class="pre">doctest</span></code>,
-<code class="docutils literal"><span class="pre">linkcheck</span></code> and <code class="docutils literal"><span class="pre">codetest</span></code> as dependencies.</li>
-<li><code class="docutils literal"><span class="pre">make</span> <span class="pre">check_xml</span></code> to run tests without stopping after each failure.
-Failures are shortly reported to the command line and the result of each test
-is written in &#8216;PYTEST-&lt;TestCaseName&gt;.xml&#8217; files in the &#8216;tests&#8217; subfolders of
-your &#8216;build&#8217; folder.</li>
-<li>Run single tests:
-assuming you have <code class="file docutils literal"><span class="pre">your_module/tests/test_awesome_feature.py</span></code>, CMake
-will provide you with a target <code class="docutils literal"><span class="pre">test_awesome_feature.py_run</span></code>. If your module
-has C++ tests, those will be available by <code class="docutils literal"><span class="pre">test_suite_your_module_run</span></code>.</li>
-</ul>
-</div>
-<div class="section" id="writing-documentation">
-<h2>Writing Documentation<a class="headerlink" href="#writing-documentation" title="Permalink to this headline">¶</a></h2>
-<p>To create documentation, we use <a class="reference external" href="http://sphinx-doc.org/">Sphinx</a> to go from reStructuredText
-(reST) files and API documentation in source files to HTML
-or man pages.</p>
-<p>For each module, at least one reST document exists, that
-gives an idea of concepts and pulls in interfaces from source. Copying files to
-the build directory, issuing the Sphinx call and everything else that is
-needed to create the actual documentation is done by CMake and its makefiles.
-Hence, the <code class="file docutils literal"><span class="pre">CMakeLists.txt</span></code> of the <code class="file docutils literal"><span class="pre">doc</span></code> directory of a module is
-crucial. For documentation which does not relate to a particular module, the
-repository comes with a top-level <code class="file docutils literal"><span class="pre">doc</span></code> directory.</p>
-<p>While you should not spend to much time thinking about how to format
-documentation, here is a helpful list of standard formatters:
-<a class="reference external" href="http://sphinx-doc.org/markup/inline.html">http://sphinx-doc.org/markup/inline.html</a></p>
-<p>If you write new functionality for ProMod3, or fix bugs, feel free to extend
-the Changelog. It will be automatically pulled into the documentation.</p>
-<p>It is highly recommended to add code examples with your documentation. For that
-purpose, you should write a fully runnable script, which is to be placed in the
-<code class="file docutils literal"><span class="pre">doc/tests/scripts</span></code> directory. The script is to be runnable from within
-the <code class="file docutils literal"><span class="pre">doc/tests</span></code> directory as <code class="docutils literal"><span class="pre">pm</span> <span class="pre">SCRIPTPATH</span></code> and may use data stored in
-the <code class="file docutils literal"><span class="pre">doc/tests/data</span></code> directory. The script and any data needed by it, must
-then be referenced in the <code class="file docutils literal"><span class="pre">doc/tests/CMakeLists.txt</span></code> file. Afterwards,
-they can be included in the documentation using the
-<a class="reference external" href="http://www.sphinx-doc.org/en/stable/markup/code.html#includes">literalinclude</a>
-directive. For instance, if you add a new example code <code class="file docutils literal"><span class="pre">loop_main.py</span></code>,
-you would add it in your module documentation as follows:</p>
-<div class="highlight-rest"><div class="highlight"><pre><span class="p">..</span> <span class="ow">literalinclude</span><span class="p">::</span> ../../../tests/doc/scripts/loop_main.py
-</pre></div>
-</div>
-<p>If your example does not relate to a specific module and the documentation is
-in the top-level <code class="file docutils literal"><span class="pre">doc</span></code> directory, you need to drop one of the <code class="docutils literal"><span class="pre">..</span></code> as
-follows:</p>
-<div class="highlight-rest"><div class="highlight"><pre><span class="p">..</span> <span class="ow">literalinclude</span><span class="p">::</span> ../../tests/doc/scripts/hello_world.py
-</pre></div>
-</div>
-<p>To ensure that the code examples keep on working, a unit test has to be defined
-in <code class="file docutils literal"><span class="pre">doc/tests/test_doctests.py</span></code>. Each example code is run by a dedicated
-test function. Usually, the codes are run and the return code is checked.
-Command-line output or resulting files can also be checked (see existing test
-codes for examples). A few more guidelines for example codes:</p>
-<ul class="simple">
-<li>If it generates files as output, please delete them after checking them.</li>
-<li>If it requires external modules or binaries, check for their availablity. If
-the external dependencies are not available, output a warning and skip the
-test.</li>
-</ul>
-</div>
+<p>The following should explain, in a coarse grain manner, how to add new features
+to ProMod3. The most general advice would be to use existing bits and pieces
+as examples and to be consistent with what you already find here.</p>
 <div class="section" id="how-to-start-your-own-module">
-<span id="id2"></span><h2>How To Start Your Own Module<a class="headerlink" href="#how-to-start-your-own-module" title="Permalink to this headline">¶</a></h2>
+<span id="id1"></span><h2>How To Start Your Own Module<a class="headerlink" href="#how-to-start-your-own-module" title="Permalink to this headline">¶</a></h2>
 <p>This is just a walk-through how the topics from above work together when you
 start your own module. For the entry point, lets assume that you already cloned
 the repository into a directory and just changed into it.</p>
@@ -345,21 +55,18 @@ beginning. Therefore you need to switch branches as a first step. Git will
 tell you for which branch you went, a story of failure otherwise.</p>
 <div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git checkout develop
 <span class="go">Switched to branch &#39;develop&#39;</span>
-<span class="gp">$</span>
 </pre></div>
 </div>
 <p>Sitting on top of the right code basis, you should just spawn your own branch
 from it. As an example, your feature will go by the name of &#8216;sidechain&#8217;.</p>
 <div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git checkout -b sidechain
 <span class="go">Switched to a new branch &#39;sidechain&#39;</span>
-<span class="gp">$</span>
 </pre></div>
 </div>
 <p>This time, Git should tell you about going for <strong>a new</strong> branch.</p>
 <p>Before starting to create anything for real, now is the perfect moment to
 install our very own Git hook to check some coding rules on commit.</p>
 <div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> cp extras/pre_commit/pre-commit .git/hooks/
-<span class="gp">$</span>
 </pre></div>
 </div>
 <p>With that in place, changes which break our coding standards will abort any
@@ -369,7 +76,6 @@ list of directories which are likely to be used in every project.</p>
 <div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> mkdir -p sidechain/doc
 <span class="gp">$</span> mkdir -p sidechain/pymod
 <span class="gp">$</span> mkdir -p sidechain/tests
-<span class="gp">$</span>
 </pre></div>
 </div>
 <p>If you run <code class="docutils literal"><span class="pre">git</span> <span class="pre">status</span></code> at this point, you will see basically nothing. That
@@ -378,7 +84,6 @@ version control, create a couple of files which are always needed.</p>
 <div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> touch sidechain/pymod/__init__.py
 <span class="gp">$</span> <span class="nb">echo</span> <span class="s2">&quot;:mod:\`~promod3.sidechain\` - ProMod3 side chain optimiser&quot;</span> &gt;&gt; sidechain/doc/index.rst
 <span class="gp">$</span> <span class="nb">echo</span> <span class="s2">&quot;================================================================================&quot;</span> &gt;&gt; sidechain/doc/index.rst
-<span class="gp">$</span>
 </pre></div>
 </div>
 <p>Having an empty <code class="file docutils literal"><span class="pre">__init__.py</span></code> is perfectly fine for Python, it just
@@ -391,7 +96,6 @@ extending some around the directory root.</p>
 <div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> touch sidechain/CMakeLists.txt
 <span class="gp">$</span> touch sidechain/pymod/CMakeLists.txt
 <span class="gp">$</span> touch sidechain/doc/CMakeLists.txt
-<span class="gp">$</span>
 </pre></div>
 </div>
 <p>Each of those files still needs a bit of content. The simplest one comes from
@@ -496,7 +200,6 @@ sub-directories. ProMod3 comes with a dedicated prefix &#8216;build*&#8217; in
 will not show up in <code class="docutils literal"><span class="pre">git</span> <span class="pre">status</span></code>.</p>
 <div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> mkdir build
 <span class="gp">$</span> <span class="nb">cd </span>build
-<span class="gp">$</span>
 </pre></div>
 </div>
 <p>To actually create all the makefiles and generated files, you may use one of
@@ -515,13 +218,13 @@ good practice to develop new functionality along tests and that right from the
 beginning. At some point, new code needs testing anyway to see if it does what
 it should, so just do this by writing unit tests. Test sources are stored in
 files with a prefix <code class="file docutils literal"><span class="pre">test_</span></code> and usually come per submodule instead of
-sporting a single monolithic <code class="file docutils literal"><span class="pre">test_sidechain.py</span></code>.</p>
+sporting a single monolithic <code class="file docutils literal"><span class="pre">test_sidechain_reconstruction.py</span></code>.</p>
 <p>Python code is evaluated using its own <a class="reference external" href="https://docs.python.org/2.7/library/unittest.html">unit testing framework</a> with a little help from <a class="reference external" href="http://www.OpenStructure.org">OST</a> (C++ uses the
 Boost <a class="reference external" href="http://www.boost.org/doc/libs/1_47_0/libs/test/doc/html/index.html">Test Library</a>). The
 basic scheme is to import your module, subclass <a class="reference external" href="https://docs.python.org/2.7/library/unittest.html#unittest.TestCase" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">unittest.TestCase</span></code></a> and
 make the whole file runnable as script using the most common <a class="reference external" href="https://docs.python.org/2.7/library/__main__.html"><code class="xref py py-attr docutils literal"><span class="pre">__name__</span></code></a>
-attribute. As an example we test the <a class="reference internal" href="sidechain/index.html#promod3.sidechain.Reconstruct" title="promod3.sidechain.Reconstruct"><code class="xref py py-func docutils literal"><span class="pre">promod3.sidechain.Reconstruct()</span></code></a>
-function:</p>
+attribute. As an example we test the
+<a class="reference internal" href="modelling/sidechain_reconstruction.html#promod3.modelling.ReconstructSidechains" title="promod3.modelling.ReconstructSidechains"><code class="xref py py-func docutils literal"><span class="pre">promod3.modelling.ReconstructSidechains()</span></code></a> function:</p>
 <div class="highlight-python"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
  2
  3
@@ -541,7 +244,7 @@ function:</p>
 17
 18
 19</pre></div></td><td class="code"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">unittest</span>
-<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">sidechain</span>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">modelling</span>
 <span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span><span class="p">,</span><span class="n">mol</span>
 <span class="kn">import</span> <span class="nn">os</span>
 
@@ -551,7 +254,7 @@ function:</p>
     	<span class="n">ref_file</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s">&#39;data&#39;</span><span class="p">,</span> <span class="s">&#39;1eye_rec.pdb&#39;</span><span class="p">)</span>
     	<span class="c"># get and reconstruct 1eye</span>
     	<span class="n">prot</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="n">in_file</span><span class="p">)</span>
-    	<span class="n">sidechain</span><span class="o">.</span><span class="n">Reconstruct</span><span class="p">(</span><span class="n">prot</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
+    	<span class="n">modelling</span><span class="o">.</span><span class="n">ReconstructSidechains</span><span class="p">(</span><span class="n">prot</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
     	<span class="c"># compare with reference solution</span>
     	<span class="n">prot_rec</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="n">ref_file</span><span class="p">)</span>
         <span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">GetAtomCount</span><span class="p">(),</span> <span class="n">prot_rec</span><span class="o">.</span><span class="n">GetAtomCount</span><span class="p">())</span>
@@ -562,7 +265,7 @@ function:</p>
 </pre></div>
 </td></tr></table></div>
 <p>To hook up your tests with <code class="docutils literal"><span class="pre">make</span> <span class="pre">codetest</span></code> (and to create a
-<code class="docutils literal"><span class="pre">test_reconstruct.py_run</span></code> target), everything has to be introduced to CMake.
+<code class="docutils literal"><span class="pre">test_reconstruct_sidechains.py_run</span></code> target), everything has to be introduced to CMake.
 First, tell CMake to search <code class="file docutils literal"><span class="pre">tests</span></code> for a <code class="file docutils literal"><span class="pre">CMakeLists.txt</span></code> file
 by extending the list of sub-directories in <code class="file docutils literal"><span class="pre">sidechain/CMakeLists.txt</span></code>:</p>
 <div class="highlight-cmake"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
@@ -587,7 +290,7 @@ you.</p>
 10
 11
 12</pre></div></td><td class="code"><div class="highlight"><pre><span class="nb">set</span><span class="p">(</span><span class="s">SIDECHAIN_UNIT_TESTS</span>
-  <span class="s">test_reconstruct.py</span>
+  <span class="s">test_reconstruct_sidechains.py</span>
 <span class="p">)</span>
 
 <span class="nb">set</span><span class="p">(</span><span class="s">SIDECHAIN_TEST_DATA</span>
@@ -603,10 +306,10 @@ you.</p>
 <p>Note how we listed the test data that we require in the unit test by defining
 <code class="docutils literal"><span class="pre">SIDECHAIN_TEST_DATA</span></code>.</p>
 <p>Now tests should be available by <code class="docutils literal"><span class="pre">make</span> <span class="pre">check</span></code>, <code class="docutils literal"><span class="pre">make</span> <span class="pre">codetest</span></code> and
-<code class="docutils literal"><span class="pre">make</span> <span class="pre">test_reconstruct.py_run</span></code>.</p>
+<code class="docutils literal"><span class="pre">make</span> <span class="pre">test_reconstruct_sidechains.py_run</span></code>.</p>
 </div>
 <div class="section" id="how-to-start-your-own-action">
-<h2>How To Start Your Own Action<a class="headerlink" href="#how-to-start-your-own-action" title="Permalink to this headline">¶</a></h2>
+<span id="id2"></span><h2>How To Start Your Own Action<a class="headerlink" href="#how-to-start-your-own-action" title="Permalink to this headline">¶</a></h2>
 <p>In ProMod3 we call scripts/ programs &#8216;actions&#8217;. They are started by a
 launcher found in your staging directory at <code class="file docutils literal"><span class="pre">stage/bin/pm</span></code>. This little
 guy helps keeping the shell environment in the right mood to carry out your
@@ -685,6 +388,181 @@ things easier when it gets to debugging. So just after</p>
 </li>
 </ul>
 </div>
+<div class="section" id="how-to-write-your-own-scorer">
+<h2>How To Write Your Own Scorer<a class="headerlink" href="#how-to-write-your-own-scorer" title="Permalink to this headline">¶</a></h2>
+<p>The <a class="reference internal" href="scoring/index.html#module-promod3.scoring" title="promod3.scoring: Loop Scoring"><code class="xref py py-mod docutils literal"><span class="pre">scoring</span></code></a> module contains several classes to make it easy to
+add new scorers. As usual, you can use existing bits and pieces as examples and
+try to be consistent with it. Here, we quickly give an overview of the separation of concerns:</p>
+<ul>
+<li><p class="first"><a class="reference internal" href="scoring/backbone_scorers.html#promod3.scoring.BackboneScorer" title="promod3.scoring.BackboneScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneScorer</span></code></a>:
+Defines the scorer with all its parameters and energies and the functionality
+to compute scores. Scorers are setup by the user (or loaded from disk) if
+necessary.</p>
+<p>Scorers do not store any environment data. If needed they can be linked via
+pointers to env. data kept and updated by the score env.. Also, they may be
+linked to a score env. listener to handle specially organized data.</p>
+</li>
+<li><p class="first"><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"><span class="pre">BackboneScoreEnv</span></code></a>:
+Handles all model-specific data used by the scorers. The user sets up the
+environment and updates it whenever something changes.</p>
+<p>Residue-specific data is kept in arrays of fixed size (see <code class="xref py py-class docutils literal"><span class="pre">IdxHandler</span></code>
+for how the indexing is done). An array of bool-like integers can be accessed
+with &#8220;GetEnvSetData()&#8221; and used to determine whether env. data is available
+for a certain residue. The list of sequences handled by the env. is fixed as
+otherwise pointers into the data-storage would be invalidated.</p>
+</li>
+<li><p class="first"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnvListener</span></code>:
+Allows to have score-specific data to be extracted from the model-specific
+data available in the score env. class. It is commonly used to define
+spatially organized structures to quickly access other atoms within a given
+radius.</p>
+<p>All score env. listener are attached to a master score env. and they get
+updated when the score env. gets updated. Multiple scorers can use the same
+listener. Listeners are not accessible by anyone outside of the scorers and
+the score env. object responsible for it. Since the user doesn&#8217;t see them,
+there is no Python API for them.</p>
+</li>
+<li><p class="first"><code class="xref py py-class docutils literal"><span class="pre">IdxHandler</span></code>:
+This takes care of translating chain indices (range [0, GetNumChains()])
+and residue numbers (range [1, GetChainSize(chain_idx)]) into the indexing
+used internally by the score env. (range [0, GetNumResidues()]).
+The score env. takes care of this object and makes it accessible for scorers.</p>
+</li>
+</ul>
+<p>As an example, let&#8217;s look at the <a class="reference internal" href="scoring/backbone_scorers.html#promod3.scoring.CBPackingScorer" title="promod3.scoring.CBPackingScorer"><code class="xref py py-class docutils literal"><span class="pre">CBPackingScorer</span></code></a>:</p>
+<ul class="simple">
+<li>it contains score-specific parameters and energies which can be either
+set manually or loaded from disk</li>
+<li>it is linked to a score env. listener of type <code class="xref py py-class docutils literal"><span class="pre">CBetaEnvListener</span></code>,
+which provides a <code class="xref py py-meth docutils literal"><span class="pre">FindWithin()</span></code> function to quickly access neighboring
+CB atoms (note that the same listener is also used by the
+<a class="reference internal" href="scoring/backbone_scorers.html#promod3.scoring.CBetaScorer" title="promod3.scoring.CBetaScorer"><code class="xref py py-class docutils literal"><span class="pre">CBetaScorer</span></code></a>)</li>
+<li>a pointer to the <code class="xref py py-class docutils literal"><span class="pre">IdxHandler</span></code> object of the score env. is extracted
+when the environment is attached and is used to get sequence-specific data
+when calculating the score</li>
+</ul>
+<p>As a second example, look at the <a class="reference internal" href="scoring/backbone_scorers.html#promod3.scoring.PairwiseScorer" title="promod3.scoring.PairwiseScorer"><code class="xref py py-class docutils literal"><span class="pre">PairwiseScorer</span></code></a>:</p>
+<ul class="simple">
+<li>it does not require any score-specific setup</li>
+<li>it is linked to residue-specific CA/CB positions and the pairwise functions
+defined in the score env.</li>
+<li>&#8220;GetEnvSetData()&#8221; of the score env. is used to determine if env. data is
+available for a given residue</li>
+</ul>
+</div>
+<div class="section" id="quick-testing-of-project-features">
+<h2>Quick testing of ProMod3 features<a class="headerlink" href="#quick-testing-of-project-features" title="Permalink to this headline">¶</a></h2>
+<p>High-level features of ProMod3, can be tested directly in an interactive
+Python shell. First, you need to tell Python, where to find the modules by
+defining the <code class="docutils literal"><span class="pre">PYTHONPATH</span></code> env. variable in your shell to include the
+<code class="file docutils literal"><span class="pre">lib64/python2.7/site-packages</span></code> folders of the <code class="file docutils literal"><span class="pre">stage</span></code> folders of
+ProMod3 and OST. For convenience, you can place the export-command in
+your <code class="file docutils literal"><span class="pre">.bashrc</span></code> (or so). Then, you can import modules from <code class="docutils literal"><span class="pre">promod3</span></code>
+and <code class="docutils literal"><span class="pre">ost</span></code> as in the example codes shown in this documentation.</p>
+<p>To test low-level C++ features, you can copy the <code class="file docutils literal"><span class="pre">extras/test_code</span></code>
+folder and adapt it for your purposes. First, you will have to fix the paths
+to ProMod3 and OST in the <code class="file docutils literal"><span class="pre">Makefile</span></code> by changing the following
+lines:</p>
+<div class="highlight-make"><div class="highlight"><pre><span class="c"># path to OST and ProMod3 stage</span>
+<span class="nv">OST_ROOT</span> <span class="o">=</span> &lt;DEFINEME&gt;/ost/build/stage
+<span class="nv">PROMOD3_ROOT</span> <span class="o">=</span> &lt;DEFINEME&gt;/ProMod3/build/stage
+</pre></div>
+</div>
+<p>Afterwards, you should be able to compile and run small sample codes that use
+ProMod3 and OST as in the <code class="file docutils literal"><span class="pre">test.cc</span></code> example. You can compile your
+code by executing <code class="docutils literal"><span class="pre">make</span></code> and run it with <code class="docutils literal"><span class="pre">make</span> <span class="pre">run</span></code>. Also, remember to set
+the <code class="docutils literal"><span class="pre">PROMOD3_SHARED_DATA_PATH</span></code> variable if you moved the stage folder.</p>
+</div>
+<div class="section" id="unit-tests">
+<h2>Unit Tests<a class="headerlink" href="#unit-tests" title="Permalink to this headline">¶</a></h2>
+<p>Of course your code should contain tests. But we cannot give an elaborate
+tutorial on unit testing here. Again, have a look at how other modules treat
+this topic and then there is quite a lot of educated material to be found on
+the Internet. Nevertheless, here is a short list of most important advices:</p>
+<ul class="simple">
+<li>Tests go into dedicated scripts/ source files in the <code class="file docutils literal"><span class="pre">tests</span></code> directory</li>
+<li>No external data dependencies, if tests need data, they find it in
+<code class="file docutils literal"><span class="pre">tests/data</span></code></li>
+<li>If &#8216;exotic&#8217; Python modules are used, consider making the test aware of the
+possibility that the module is not available</li>
+<li>Tests do not fail on purpose</li>
+<li>No failing tests, that are considered &#8216;this does not affect anything&#8217;</li>
+</ul>
+<p>To run the whole test suite, <code class="docutils literal"><span class="pre">make</span> <span class="pre">check</span></code> is enough. This will also trigger
+the <code class="docutils literal"><span class="pre">doctest</span></code> and <code class="docutils literal"><span class="pre">linkcheck</span></code> targets. Alternatively you can run:</p>
+<ul class="simple">
+<li><code class="docutils literal"><span class="pre">make</span> <span class="pre">codetest</span></code> to run only unit tests from all modules in ProMod3.
+Note that <code class="docutils literal"><span class="pre">make</span> <span class="pre">check</span></code> does nothing more but invoking <code class="docutils literal"><span class="pre">doctest</span></code>,
+<code class="docutils literal"><span class="pre">linkcheck</span></code> and <code class="docutils literal"><span class="pre">codetest</span></code> as dependencies.</li>
+<li><code class="docutils literal"><span class="pre">make</span> <span class="pre">check_xml</span></code> to run tests without stopping after each failure.
+Failures are shortly reported to the command line and the result of each test
+is written in &#8216;PYTEST-&lt;TestCaseName&gt;.xml&#8217; files in the &#8216;tests&#8217; subfolders of
+your &#8216;build&#8217; folder.</li>
+<li>Run single tests:
+assuming you have <code class="file docutils literal"><span class="pre">your_module/tests/test_awesome_feature.py</span></code>, CMake
+will provide you with a target <code class="docutils literal"><span class="pre">test_awesome_feature.py_run</span></code>. If your module
+has C++ tests, those will be available by <code class="docutils literal"><span class="pre">test_suite_your_module_run</span></code>.</li>
+</ul>
+</div>
+<div class="section" id="writing-documentation">
+<span id="id3"></span><h2>Writing Documentation<a class="headerlink" href="#writing-documentation" title="Permalink to this headline">¶</a></h2>
+<p>To create documentation, we use <a class="reference external" href="http://sphinx-doc.org/">Sphinx</a> to go from reStructuredText
+(reST) files and API documentation in source files to HTML
+or man pages.</p>
+<p>For each module, at least one reST document exists, that
+gives an idea of concepts and pulls in interfaces from source. Copying files to
+the build directory, issuing the Sphinx call and everything else that is
+needed to create the actual documentation is done by CMake and its makefiles.
+Hence, the <code class="file docutils literal"><span class="pre">CMakeLists.txt</span></code> of the <code class="file docutils literal"><span class="pre">doc</span></code> directory of a module is
+crucial. For documentation which does not relate to a particular module, the
+repository comes with a top-level <code class="file docutils literal"><span class="pre">doc</span></code> directory.</p>
+<p>While you should not spend to much time thinking about how to format
+documentation, here is a helpful list of standard formatters:
+<a class="reference external" href="http://sphinx-doc.org/markup/inline.html">http://sphinx-doc.org/markup/inline.html</a></p>
+<p>If you write new functionality for ProMod3, or fix bugs, feel free to extend
+the <code class="file docutils literal"><span class="pre">CHANGELOG</span></code> file. It will be automatically pulled into the
+documentation.</p>
+<p>It is highly recommended to add code examples with your documentation. For that
+purpose, you should write a fully runnable script, which is to be placed in the
+<code class="file docutils literal"><span class="pre">doc/tests/scripts</span></code> directory. The script is to be runnable from within
+the <code class="file docutils literal"><span class="pre">doc/tests</span></code> directory as <code class="docutils literal"><span class="pre">pm</span> <span class="pre">SCRIPTPATH</span></code> and may use data stored in
+the <code class="file docutils literal"><span class="pre">doc/tests/data</span></code> directory. The script and any data needed by it, must
+then be referenced in the <code class="file docutils literal"><span class="pre">doc/tests/CMakeLists.txt</span></code> file. Afterwards,
+they can be included in the documentation using the
+<a class="reference external" href="http://www.sphinx-doc.org/en/stable/markup/code.html#includes">literalinclude</a>
+directive. For instance, if you add a new example code <code class="file docutils literal"><span class="pre">loop_main.py</span></code>,
+you would add it in your module documentation as follows:</p>
+<div class="highlight-rest"><div class="highlight"><pre><span class="p">..</span> <span class="ow">literalinclude</span><span class="p">::</span> ../../../tests/doc/scripts/loop_main.py
+</pre></div>
+</div>
+<p>If your example does not relate to a specific module and the documentation is
+in the top-level <code class="file docutils literal"><span class="pre">doc</span></code> directory, you need to drop one of the <code class="docutils literal"><span class="pre">..</span></code> as
+follows:</p>
+<div class="highlight-rest"><div class="highlight"><pre><span class="p">..</span> <span class="ow">literalinclude</span><span class="p">::</span> ../../tests/doc/scripts/hello_world.py
+</pre></div>
+</div>
+<p>To ensure that the code examples keep on working, a unit test has to be defined
+in <code class="file docutils literal"><span class="pre">doc/tests/test_doctests.py</span></code>. Each example code is run by a dedicated
+test function. Usually, the codes are run and the return code is checked.
+Command-line output or resulting files can also be checked (see existing test
+codes for examples). A few more guidelines for example codes:</p>
+<ul class="simple">
+<li>If it generates files as output, please delete them after checking them.</li>
+<li>If it requires external modules or binaries, check for their availablity. If
+the external dependencies are not available, output a warning and skip the
+test.</li>
+</ul>
+<p>A copy of the generated html documentation is kept in <code class="file docutils literal"><span class="pre">doc/html</span></code> so that
+there is no need to compile ProMod3 to read it. Our policy is to keep that
+folder in-sync with the latest documentation at least on the <code class="docutils literal"><span class="pre">master</span></code> branch
+(i.e. for every release). You can use the following commands to do the update:</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> <span class="nb">cd</span> &lt;PROMOD3_PATH&gt;/build
+<span class="gp">$</span> make html
+<span class="gp">$</span> rsync -iv -az --exclude<span class="o">=</span><span class="s2">&quot;.*&quot;</span> --delete <span class="se">\</span>
+<span class="go">        &quot;stage/share/promod3/html/&quot; &quot;../doc/html&quot;</span>
+</pre></div>
+</div>
+</div>
 <div class="section" id="third-party-contributions-license-issues">
 <h2>Third Party Contributions (License Issues)<a class="headerlink" href="#third-party-contributions-license-issues" title="Permalink to this headline">¶</a></h2>
 <p>For some tasks you may want to make use of third party contributions in your
@@ -725,16 +603,12 @@ contributions to web pages using ProMod3.</p>
   <h3><a href="index.html">Table Of Contents</a></h3>
   <ul>
 <li><a class="reference internal" href="#">Contributing</a><ul>
-<li><a class="reference internal" href="#git-branches">Git Branches</a></li>
-<li><a class="reference internal" href="#git-hooks">Git Hooks</a></li>
-<li><a class="reference internal" href="#directory-structure">Directory Structure</a></li>
-<li><a class="reference internal" href="#cmake">CMake</a></li>
-<li><a class="reference internal" href="#the-stage-directory">The <code class="file docutils literal"><span class="pre">stage</span></code> Directory</a></li>
+<li><a class="reference internal" href="#how-to-start-your-own-module">How To Start Your Own Module</a></li>
+<li><a class="reference internal" href="#how-to-start-your-own-action">How To Start Your Own Action</a></li>
+<li><a class="reference internal" href="#how-to-write-your-own-scorer">How To Write Your Own Scorer</a></li>
 <li><a class="reference internal" href="#quick-testing-of-project-features">Quick testing of ProMod3 features</a></li>
 <li><a class="reference internal" href="#unit-tests">Unit Tests</a></li>
 <li><a class="reference internal" href="#writing-documentation">Writing Documentation</a></li>
-<li><a class="reference internal" href="#how-to-start-your-own-module">How To Start Your Own Module</a></li>
-<li><a class="reference internal" href="#how-to-start-your-own-action">How To Start Your Own Action</a></li>
 <li><a class="reference internal" href="#third-party-contributions-license-issues">Third Party Contributions (License Issues)</a></li>
 </ul>
 </li>
@@ -744,7 +618,7 @@ contributions to web pages using ProMod3.</p>
 <ul>
   <li><a href="index.html">Documentation overview</a><ul>
   <li><a href="developers.html">Documentation For Developers</a><ul>
-      <li>Previous: <a href="developers.html" title="previous chapter">Documentation For Developers</a></li>
+      <li>Previous: <a href="dev_setup.html" title="previous chapter">ProMod3 Setup</a></li>
       <li>Next: <a href="actions/index_dev.html" title="next chapter"><code class="docutils literal"><span class="pre">test_actions</span></code> - Testing Actions</a></li>
   </ul></li>
   </ul></li>
@@ -775,7 +649,7 @@ contributions to web pages using ProMod3.</p>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/core/geometry.html b/doc/html/core/geometry.html
new file mode 100644
index 00000000..82ddb87e
--- /dev/null
+++ b/doc/html/core/geometry.html
@@ -0,0 +1,365 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Geometry functions &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="core - ProMod3 Core Functionality" href="index.html" />
+    <link rel="next" title="Runtime profiling" href="runtime_profiling.html" />
+    <link rel="prev" title="helper - Shared Functionality For the Everything" href="helper.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="geometry-functions">
+<h1>Geometry functions<a class="headerlink" href="#geometry-functions" title="Permalink to this headline">¶</a></h1>
+<dl class="function">
+<dt id="promod3.core.EvaluateGromacsPosRule">
+<code class="descclassname">promod3.core.</code><code class="descname">EvaluateGromacsPosRule</code><span class="sig-paren">(</span><em>rule</em>, <em>number</em>, <em>anchors</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.core.EvaluateGromacsPosRule" title="Permalink to this definition">¶</a></dt>
+<dd><p>Constructs <em>number</em> positions with the given Gromacs rule and anchor positions
+(see Gromacs manual for details).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>rule</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Gromacs rule</li>
+<li><strong>number</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Desired number of positions (max. 3)</li>
+<li><strong>anchors</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Anchor positions (max. 4)</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Constructed <em>number</em> positions.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.core.ConstructCTerminalOxygens">
+<code class="descclassname">promod3.core.</code><code class="descname">ConstructCTerminalOxygens</code><span class="sig-paren">(</span><em>c_pos</em>, <em>ca_pos</em>, <em>n_pos</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.core.ConstructCTerminalOxygens" title="Permalink to this definition">¶</a></dt>
+<dd><p>Constructs positions of O and OXT atoms for C terminal.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>c_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of C atom</li>
+<li><strong>n_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of nitrogen atom</li>
+<li><strong>ca_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of C-alpha atom</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Positions of O and OXT atoms.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> of <a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.core.ConstructAtomPos">
+<code class="descclassname">promod3.core.</code><code class="descname">ConstructAtomPos</code><span class="sig-paren">(</span><em>A</em>, <em>B</em>, <em>C</em>, <em>bond_length</em>, <em>angle</em>, <em>dihedral</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.core.ConstructAtomPos" title="Permalink to this definition">¶</a></dt>
+<dd><p>Constructs position of atom &#8220;D&#8221; based on bond length (C-D), angle (B-C-D) and
+dihedral (A-B-C-D).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>A</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of atom A</li>
+<li><strong>B</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of atom B</li>
+<li><strong>C</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of atom C</li>
+<li><strong>bond_length</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Bond length (C-D)</li>
+<li><strong>angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Angle (B-C-D)</li>
+<li><strong>dihedral</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Dihedral (A-B-C-D)</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Position of atom D</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.core.ConstructCBetaPos">
+<code class="descclassname">promod3.core.</code><code class="descname">ConstructCBetaPos</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>c_pos</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.core.ConstructCBetaPos" title="Permalink to this definition">¶</a></dt>
+<dd><p>Constructs position of C-beta atom given the positions of the backbone nitrogen,
+C-alpha and c atoms.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>n_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of nitrogen atom</li>
+<li><strong>ca_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of C-alpha atom</li>
+<li><strong>c_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of C atom</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Position of C-beta atom</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.core.RotationAroundLine">
+<code class="descclassname">promod3.core.</code><code class="descname">RotationAroundLine</code><span class="sig-paren">(</span><em>axis</em>, <em>anchor</em>, <em>angle</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.core.RotationAroundLine" title="Permalink to this definition">¶</a></dt>
+<dd><p>Creates a geometric transform leading to a rotation with specified <cite>angle</cite>
+around a line defined by <cite>axis</cite> and <cite>anchor</cite>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>axis</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Axis of rotation</li>
+<li><strong>anchor</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Anchor for rotation</li>
+<li><strong>angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Angle (in radians in range [-pi,pi]) of rotation</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Transformation matrix</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="http://www.openstructure.org/docs/dev/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Mat4</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt>
+<code class="descclassname">promod3.core.</code><code class="descname">RotationAroundLine</code><span class="sig-paren">(</span><em>axis</em>, <em>angle</em><span class="sig-paren">)</span></dt>
+<dd><p>Creates a 3x3 matrix for a rotation by a specified <cite>angle</cite> around an <cite>axis</cite>
+going through the origin.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>axis</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Axis of rotation</li>
+<li><strong>angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Angle (in radians in range [-pi,pi]) of rotation</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Rotation matrix</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="http://www.openstructure.org/docs/dev/geom/mat/#ost.geom.Mat3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Mat3</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.core.StemCoords">
+<em class="property">class </em><code class="descclassname">promod3.core.</code><code class="descname">StemCoords</code><a class="headerlink" href="#promod3.core.StemCoords" title="Permalink to this definition">¶</a></dt>
+<dt>
+<em class="property">class </em><code class="descclassname">promod3.core.</code><code class="descname">StemCoords</code><span class="sig-paren">(</span><em>res</em><span class="sig-paren">)</span></dt>
+<dd><p>Simple container class to store N, CA and C coordinates.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue handle from which to extract N, CA and C coordinates.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res</em> does not contain N, CA and C
+atoms.</td>
+</tr>
+</tbody>
+</table>
+<dl class="attribute">
+<dt id="promod3.core.StemCoords.n_coord">
+<code class="descname">n_coord</code><a class="headerlink" href="#promod3.core.StemCoords.n_coord" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.core.StemCoords.ca_coord">
+<code class="descname">ca_coord</code><a class="headerlink" href="#promod3.core.StemCoords.ca_coord" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.core.StemCoords.c_coord">
+<code class="descname">c_coord</code><a class="headerlink" href="#promod3.core.StemCoords.c_coord" title="Permalink to this definition">¶</a></dt>
+<dd><p>Position of nitrogen / alpha carbon / carbon atom.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.core.StemPairOrientation">
+<em class="property">class </em><code class="descclassname">promod3.core.</code><code class="descname">StemPairOrientation</code><a class="headerlink" href="#promod3.core.StemPairOrientation" title="Permalink to this definition">¶</a></dt>
+<dt>
+<em class="property">class </em><code class="descclassname">promod3.core.</code><code class="descname">StemPairOrientation</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em><span class="sig-paren">)</span></dt>
+<dd><p>Relative orientation of a pair of stems. Can be used to define gaps with four
+angles and one distance and is used in the fragment database for fast lookups.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>n_stem</strong> (<a class="reference internal" href="#promod3.core.StemCoords" title="promod3.core.StemCoords"><code class="xref py py-class docutils literal"><span class="pre">StemCoords</span></code></a>) &#8211; Coordinates of stem A.</li>
+<li><strong>c_stem</strong> (<a class="reference internal" href="#promod3.core.StemCoords" title="promod3.core.StemCoords"><code class="xref py py-class docutils literal"><span class="pre">StemCoords</span></code></a>) &#8211; Coordinates of stem B.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="attribute">
+<dt id="promod3.core.StemPairOrientation.distance">
+<code class="descname">distance</code><a class="headerlink" href="#promod3.core.StemPairOrientation.distance" title="Permalink to this definition">¶</a></dt>
+<dd><p>Distance of C atom of stem A to N atom of stem B.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.core.StemPairOrientation.angle_one">
+<code class="descname">angle_one</code><a class="headerlink" href="#promod3.core.StemPairOrientation.angle_one" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.core.StemPairOrientation.angle_two">
+<code class="descname">angle_two</code><a class="headerlink" href="#promod3.core.StemPairOrientation.angle_two" title="Permalink to this definition">¶</a></dt>
+<dd><p>Angles defining relative orientation of stem B with respect to stem A.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.core.StemPairOrientation.angle_three">
+<code class="descname">angle_three</code><a class="headerlink" href="#promod3.core.StemPairOrientation.angle_three" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.core.StemPairOrientation.angle_four">
+<code class="descname">angle_four</code><a class="headerlink" href="#promod3.core.StemPairOrientation.angle_four" title="Permalink to this definition">¶</a></dt>
+<dd><p>Angles defining relative orientation of stem A with respect to stem B.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper"><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="docutils literal"><span class="pre">core</span></code> - ProMod3 Core Functionality</a><ul>
+      <li>Previous: <a href="helper.html" title="previous chapter"><code class="docutils literal"><span class="pre">helper</span></code> - Shared Functionality For the Everything</a></li>
+      <li>Next: <a href="runtime_profiling.html" title="next chapter">Runtime profiling</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/core/geometry.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/core/geometry.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/core/helper.html b/doc/html/core/helper.html
index 880e2c6c..a98126d3 100644
--- a/doc/html/core/helper.html
+++ b/doc/html/core/helper.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>helper - Shared Functionality For the Everything &mdash; ProMod3 0 documentation</title>
+    <title>helper - Shared Functionality For the Everything &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,9 +23,9 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="core - ProMod3 Core Functionality" href="index.html" />
-    <link rel="next" title="SetCompoundsChemlib()" href="setcompoundschemlib.html" />
+    <link rel="next" title="Geometry functions" href="geometry.html" />
     <link rel="prev" title="pm3argparse - Parsing Command Lines" href="pm3argparse.html" />
    
   
@@ -56,7 +56,7 @@ rather empty modules left alone.</p>
 <dl class="function">
 <dt id="promod3.core.helper.MsgErrorAndExit">
 <code class="descclassname">promod3.core.helper.</code><code class="descname">MsgErrorAndExit</code><span class="sig-paren">(</span><em>msg</em>, <em>exit_status</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/core/helper.html#MsgErrorAndExit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.core.helper.MsgErrorAndExit" title="Permalink to this definition">¶</a></dt>
-<dd><p>Send a messages to the OST <a class="reference external" href="http://www.openstructure.org/docs/1.3/base/logging/">error log</a> and
+<dd><p>Send a messages to the OST <a class="reference external" href="http://www.openstructure.org/docs/dev/base/logging/">error log</a> and
 exit the Python interpreter.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
@@ -146,7 +146,7 @@ unrecognised extension, this function terminates the script.</p>
 <li><strong>exit_status</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Exit code on missing file, ends up in <code class="docutils literal"><span class="pre">$?</span></code> in the
 shell. <code class="docutils literal"><span class="pre">0</span></code> is traditionally reserved to successful commands.</li>
 <li><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path including file name to be checked.</li>
-<li><strong>extensions</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; List of strings without a leading &#8221;.&#8221;.</li>
+<li><strong>extensions</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; List of strings without a leading &#8221;.&#8221;.</li>
 <li><strong>gzip</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Indicates whether to check for an additional &#8220;gz&#8221; extension.</li>
 </ul>
 </td>
@@ -216,7 +216,7 @@ script will terminate if a gzip file is found.</li>
   <li><a href="../users.html">Documentation For Users</a><ul>
   <li><a href="index.html"><code class="docutils literal"><span class="pre">core</span></code> - ProMod3 Core Functionality</a><ul>
       <li>Previous: <a href="pm3argparse.html" title="previous chapter"><code class="docutils literal"><span class="pre">pm3argparse</span></code> - Parsing Command Lines</a></li>
-      <li>Next: <a href="setcompoundschemlib.html" title="next chapter"><code class="docutils literal"><span class="pre">SetCompoundsChemlib()</span></code></a></li>
+      <li>Next: <a href="geometry.html" title="next chapter">Geometry functions</a></li>
   </ul></li>
   </ul></li>
   </ul></li>
@@ -247,7 +247,7 @@ script will terminate if a gzip file is found.</li>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/core/index.html b/doc/html/core/index.html
index f12371ac..5c821699 100644
--- a/doc/html/core/index.html
+++ b/doc/html/core/index.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>core - ProMod3 Core Functionality &mdash; ProMod3 0 documentation</title>
+    <title>core - ProMod3 Core Functionality &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,10 +23,10 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="Documentation For Users" href="../users.html" />
     <link rel="next" title="pm3argparse - Parsing Command Lines" href="pm3argparse.html" />
-    <link rel="prev" title="Load Rotamer Libraries" href="../sidechain/loading.html" />
+    <link rel="prev" title="Loading Precomputed Objects" href="../loop/load_loop_objects.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -43,6 +43,7 @@
 <span id="core-promod3-core-functionality"></span><h1><a class="reference internal" href="#module-promod3.core" title="promod3.core: Basic functionality, supporting standard tasks in your code."><code class="xref py py-mod docutils literal"><span class="pre">core</span></code></a> - ProMod3 Core Functionality<a class="headerlink" href="#module-promod3.core" title="Permalink to this headline">¶</a></h1>
 <p>This module gathers functions and classes which are not devoted to homology
 modeling per se but cover standard programming issues.</p>
+<p>Contents:</p>
 <div class="toctree-wrapper compound">
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="pm3argparse.html"><code class="docutils literal"><span class="pre">pm3argparse</span></code> - Parsing Command Lines</a><ul>
@@ -56,6 +57,8 @@ modeling per se but cover standard programming issues.</p>
 <li class="toctree-l2"><a class="reference internal" href="helper.html#file-tests">File Tests</a></li>
 </ul>
 </li>
+<li class="toctree-l1"><a class="reference internal" href="geometry.html">Geometry functions</a></li>
+<li class="toctree-l1"><a class="reference internal" href="runtime_profiling.html">Runtime profiling</a></li>
 </ul>
 </div>
 </div>
@@ -70,7 +73,7 @@ modeling per se but cover standard programming issues.</p>
 <ul>
   <li><a href="../index.html">Documentation overview</a><ul>
   <li><a href="../users.html">Documentation For Users</a><ul>
-      <li>Previous: <a href="../sidechain/loading.html" title="previous chapter">Load Rotamer Libraries</a></li>
+      <li>Previous: <a href="../loop/load_loop_objects.html" title="previous chapter">Loading Precomputed Objects</a></li>
       <li>Next: <a href="pm3argparse.html" title="next chapter"><code class="docutils literal"><span class="pre">pm3argparse</span></code> - Parsing Command Lines</a></li>
   </ul></li>
   </ul></li>
@@ -101,7 +104,7 @@ modeling per se but cover standard programming issues.</p>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/core/pm3argparse.html b/doc/html/core/pm3argparse.html
index 67748aea..ec1beb13 100644
--- a/doc/html/core/pm3argparse.html
+++ b/doc/html/core/pm3argparse.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>pm3argparse - Parsing Command Lines &mdash; ProMod3 0 documentation</title>
+    <title>pm3argparse - Parsing Command Lines &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="core - ProMod3 Core Functionality" href="index.html" />
     <link rel="next" title="helper - Shared Functionality For the Everything" href="helper.html" />
     <link rel="prev" title="core - ProMod3 Core Functionality" href="index.html" />
@@ -79,16 +79,13 @@ docstring in your script.</p>
 <dl class="class">
 <dt id="promod3.core.pm3argparse.PM3ArgumentParser">
 <em class="property">class </em><code class="descclassname">promod3.core.pm3argparse.</code><code class="descname">PM3ArgumentParser</code><span class="sig-paren">(</span><em>description</em>, <em>action=True</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/core/pm3argparse.html#PM3ArgumentParser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.core.pm3argparse.PM3ArgumentParser" title="Permalink to this definition">¶</a></dt>
-<dd><p>This class is a child of <a class="reference external" href="https://docs.python.org/2.7/library/argparse.html#argparse.ArgumentParser" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">argparse.ArgumentParser</span></code></a>. It provides a
-set of standard arguments which can be activated, rather than added via the
-traditional way. This helps keeping up a common naming scheme throughout
-all ProMod3 actions. As a real extension, this subclass provides checking
-of input parameters on <a class="reference internal" href="#promod3.core.pm3argparse.PM3ArgumentParser.Parse" title="promod3.core.pm3argparse.PM3ArgumentParser.Parse"><code class="xref py py-meth docutils literal"><span class="pre">Parse()</span></code></a>. Beside
+<dd><p>This class is a child of <a class="reference external" href="https://docs.python.org/2.7/library/argparse.html#argparse.ArgumentParser" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">argparse.ArgumentParser</span></code></a>. It provides a set
+of standard arguments which can be activated with <code class="xref py py-meth docutils literal"><span class="pre">Add*()</span></code> methods and
+then assembled with <a class="reference internal" href="#promod3.core.pm3argparse.PM3ArgumentParser.AssembleParser" title="promod3.core.pm3argparse.PM3ArgumentParser.AssembleParser"><code class="xref py py-meth docutils literal"><span class="pre">AssembleParser()</span></code></a>. This helps keeping up a common
+naming scheme throughout all ProMod3 actions. As a real extension, this
+subclass provides checking of input parameters on <a class="reference internal" href="#promod3.core.pm3argparse.PM3ArgumentParser.Parse" title="promod3.core.pm3argparse.PM3ArgumentParser.Parse"><code class="xref py py-meth docutils literal"><span class="pre">Parse()</span></code></a>. Besides
 this, everything you can do with a &#8216;real&#8217; <a class="reference external" href="https://docs.python.org/2.7/library/argparse.html#argparse.ArgumentParser" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">ArgumentParser</span></code></a>
 instance is possible here.</p>
-<p>A note on exit codes: if <code class="xref py py-meth docutils literal"><span class="pre">Parse()</span></code> is
-called on unrecognised arguments, the script exits with a code 2 by
-<code class="xref py py-class docutils literal"><span class="pre">argparse.ArgumentParser.parse_args()</span></code>.</p>
 <p>Attributes beyond <a class="reference external" href="https://docs.python.org/2.7/library/argparse.html#argparse.ArgumentParser" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">argparse.ArgumentParser</span></code></a>:</p>
 <dl class="attribute">
 <dt id="promod3.core.pm3argparse.PM3ArgumentParser.action">
@@ -133,105 +130,128 @@ first 3 characters of the file name of the script. If
 
 <dl class="method">
 <dt id="promod3.core.pm3argparse.PM3ArgumentParser.AddAlignment">
-<code class="descname">AddAlignment</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/core/pm3argparse.html#PM3ArgumentParser.AddAlignment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.core.pm3argparse.PM3ArgumentParser.AddAlignment" title="Permalink to this definition">¶</a></dt>
+<code class="descname">AddAlignment</code><span class="sig-paren">(</span><em>allow_multitemplate=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/core/pm3argparse.html#PM3ArgumentParser.AddAlignment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.core.pm3argparse.PM3ArgumentParser.AddAlignment" title="Permalink to this definition">¶</a></dt>
 <dd><p>Commandline options for alignments.</p>
-<p>Add everything needed to load alignments to the argument parser. Creates
-several options/ arguments and adds some checks for post processing.
-This method only adds a flag to the parser to add alignment options on
-<a class="reference internal" href="#promod3.core.pm3argparse.PM3ArgumentParser.AssembleParser" title="promod3.core.pm3argparse.PM3ArgumentParser.AssembleParser"><code class="xref py py-meth docutils literal"><span class="pre">AssembleParser()</span></code></a>. Depending on which options you activate, things
-need to be added in a different order or have other constraints.</p>
-<p>Options/ arguments added:</p>
+<p>Activate everything needed to load alignments to the argument parser.
+Command line arguments are then added in <a class="reference internal" href="#promod3.core.pm3argparse.PM3ArgumentParser.AssembleParser" title="promod3.core.pm3argparse.PM3ArgumentParser.AssembleParser"><code class="xref py py-meth docutils literal"><span class="pre">AssembleParser()</span></code></a> and the
+input is post processed and checked in <a class="reference internal" href="#promod3.core.pm3argparse.PM3ArgumentParser.Parse" title="promod3.core.pm3argparse.PM3ArgumentParser.Parse"><code class="xref py py-meth docutils literal"><span class="pre">Parse()</span></code></a>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>allow_multitemplate</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; enable support for multitemplate alignments</td>
+</tr>
+</tbody>
+</table>
+<p>Options/arguments added:</p>
 <ul class="simple">
-<li><code class="docutils literal"><span class="pre">-f/</span> <span class="pre">--fasta</span> <span class="pre">trg:&lt;NAME&gt;</span> <span class="pre">&lt;FILE&gt;</span></code> - describing a target-template
-alignment with <code class="docutils literal"><span class="pre">trg:</span></code> marking the target sequence inside
-<code class="file docutils literal"><span class="pre">&lt;FILE&gt;</span></code>. The order of arguments is arbitrary which means file
-names starting with <code class="file docutils literal"><span class="pre">trg:</span></code> will not work.</li>
-<li><code class="docutils literal"><span class="pre">-j/</span> <span class="pre">--json</span> <span class="pre">&lt;OBJECT&gt;|&lt;FILE&gt;</span></code> - target-template alignments in JSON
-format. Either an object string or a file name. The string variant is
-limited to how many characters your command line can gobble.</li>
+<li><code class="docutils literal"><span class="pre">-f/--fasta</span> <span class="pre">&lt;FILE&gt;</span></code> - Target-template alignment in FASTA format.
+Target sequence is either named &#8220;trg&#8221; or &#8220;target&#8221; or the first
+sequence is used. File can be plain or gzipped.</li>
+<li><code class="docutils literal"><span class="pre">-c/--clustal</span> <span class="pre">&lt;FILE&gt;</span></code> - Target-template alignment in CLUSTAL format.
+Target sequence is either named &#8220;trg&#8221; or &#8220;target&#8221; or the first
+sequence is used. File can be plain or gzipped.</li>
+<li><code class="docutils literal"><span class="pre">-j/--json</span> <span class="pre">&lt;OBJECT&gt;|&lt;FILE&gt;</span></code> - Alignments provided as JSON
+file/object. File can be plain or gzipped.</li>
+</ul>
+<p>See <a class="reference internal" href="../actions/index.html#promod-build-model"><span>here</span></a> for details on the file formats.</p>
+<p>Attributes added to the namespace returned by <a class="reference internal" href="#promod3.core.pm3argparse.PM3ArgumentParser.Parse" title="promod3.core.pm3argparse.PM3ArgumentParser.Parse"><code class="xref py py-meth docutils literal"><span class="pre">Parse()</span></code></a>:</p>
+<ul class="simple">
+<li><code class="xref py py-attr docutils literal"><span class="pre">fasta</span></code> - filled with the input of the <code class="docutils literal"><span class="pre">--fasta</span></code> option, a
+<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> (filenames).</li>
+<li><code class="xref py py-attr docutils literal"><span class="pre">clustal</span></code> - filled with the input of the <code class="docutils literal"><span class="pre">--clustal</span></code> option, a
+<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> (filenames).</li>
+<li><code class="xref py py-attr docutils literal"><span class="pre">json</span></code> - filled with the input of the <code class="docutils literal"><span class="pre">--json</span></code> option, a
+<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>, where each string may be a filename
+or a JSON object string.</li>
+<li><code class="xref py py-attr docutils literal"><span class="pre">alignments</span></code> - <code class="xref py py-class docutils literal"><span class="pre">ost.AlignmentList</span></code>, same order as given.
+First sequence of the alignment is the target sequence, if in doubt,
+check for sequence roles <code class="docutils literal"><span class="pre">TARGET</span></code> or <code class="docutils literal"><span class="pre">TEMPLATE</span></code></li>
+<li><code class="xref py py-attr docutils literal"><span class="pre">aln_sources</span></code> - <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> with the original
+source(s) of the alignment: may be filename(s) or JSON strings.</li>
 </ul>
 <p>Exit codes related to alignment input:</p>
-<ul>
-<li><p class="first">11 - no prefix <code class="docutils literal"><span class="pre">trg:</span></code> found for an argument to <code class="docutils literal"><span class="pre">--fasta</span></code></p>
-</li>
-<li><p class="first">12 - a given alignment file does not exist</p>
-</li>
-<li><p class="first">13 - never raised (parameter for checking gzip files)</p>
-</li>
-<li><p class="first">14 - empty target name found (<code class="docutils literal"><span class="pre">trg:</span></code>)</p>
-</li>
-<li><p class="first">15 - found an empty alignment file</p>
-</li>
-<li><p class="first">16 - alignment with more than 2 sequences found</p>
-</li>
-<li><p class="first">17 - target sequence name not found in alignment</p>
-</li>
-<li><p class="first">18 - sequences in the alignment have different length</p>
-</li>
-<li><p class="first">19 - problem with a JSON formatted file handed over to <code class="docutils literal"><span class="pre">--json</span></code></p>
-</li>
-<li><p class="first">20 - JSON file could not be decoded into a JSON object</p>
-</li>
-<li><p class="first">21 - JSON object has no &#8216;alignmentlist&#8217; key</p>
-</li>
-<li><p class="first">22 - JSON object has no &#8216;target&#8217;/ &#8216;template&#8217; in the &#8216;alignmentlist&#8217;</p>
-</li>
-<li><p class="first">23 - JSON string could not be decoded</p>
-</li>
-<li><p class="first">24 - JSON object &#8216;alignmentlist&#8217; does not point to a list</p>
-</li>
-<li><p class="first">25 - JSON object &#8216;alignmentlist&#8217; member is not a dictionary</p>
-</li>
-<li><dl class="first docutils">
-<dt>26 - JSON object &#8216;alignmentlist&#8217; &#8216;target&#8217;/ &#8216;template&#8217; does not point</dt>
-<dd><p class="first last">to a dictionary</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt>27 - JSON  object &#8216;alignmentlist&#8217; &#8216;target&#8217;/ &#8216;template&#8217; does not have</dt>
-<dd><p class="first last">a needed key</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt>28 - JSON  object &#8216;alignmentlist&#8217; &#8216;target&#8217;/ &#8216;template&#8217; has a value of</dt>
-<dd><p class="first last">wrong type</p>
-</dd>
-</dl>
-</li>
+<ul class="simple">
+<li>12 - a given alignment file does not exist</li>
+<li>13 - never raised (parameter for checking gzip files)</li>
+<li>14 - gzip file cannot be opened</li>
+<li>15 - found an empty alignment file</li>
+<li>16 - unsupported number of sequences in alignment: only 1 sequence or
+(unless <em>allow_multitemplate</em> = True) more than 2 sequences</li>
+<li>17 - mutliple target sequences found in alignment</li>
+<li>18 - error when reading fasta/clustal file</li>
+<li>19 - problem with a JSON formatted file handed over to <code class="docutils literal"><span class="pre">--json</span></code></li>
+<li>20 - JSON file could not be decoded into a JSON object</li>
+<li>21 - JSON object has no &#8216;alignmentlist&#8217; key</li>
+<li>22 - JSON object has no &#8216;target&#8217;/&#8217;template&#8217; in the &#8216;alignmentlist&#8217;</li>
+<li>23 - JSON string could not be decoded</li>
+<li>24 - JSON object &#8216;alignmentlist&#8217; does not point to a list</li>
+<li>25 - JSON object &#8216;alignmentlist&#8217; member is not a dictionary</li>
+<li>26 - JSON object &#8216;alignmentlist&#8217; &#8216;target&#8217;/&#8217;template&#8217; does not point
+to a dictionary</li>
+<li>27 - JSON  object &#8216;alignmentlist&#8217; &#8216;target&#8217;/&#8217;template&#8217; does not have
+a needed key</li>
+<li>28 - JSON  object &#8216;alignmentlist&#8217; &#8216;target&#8217;/&#8217;template&#8217; has a value of
+wrong type</li>
 </ul>
-<p>Attributes added to the namespace returned by
-<a class="reference internal" href="#promod3.core.pm3argparse.PM3ArgumentParser.Parse" title="promod3.core.pm3argparse.PM3ArgumentParser.Parse"><code class="xref py py-meth docutils literal"><span class="pre">Parse()</span></code></a>:</p>
-<ul>
-<li><dl class="first docutils">
-<dt><code class="xref py py-attr docutils literal"><span class="pre">fasta</span></code> - filled with the input of the <code class="docutils literal"><span class="pre">--fasta</span></code> option, a</dt>
-<dd><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> with multiple <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> objects</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt><code class="xref py py-attr docutils literal"><span class="pre">json</span></code> - argument of the <code class="docutils literal"><span class="pre">--json</span></code> option, <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>. May</dt>
-<dd><p class="first last">be a filename of a JSON object string.</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt><code class="xref py py-attr docutils literal"><span class="pre">alignments</span></code> - <code class="xref py py-class docutils literal"><span class="pre">ost.AlignmentList</span></code>, same order as</dt>
-<dd><p class="first last"><code class="xref py py-attr docutils literal"><span class="pre">fasta</span></code>, likely to <strong>not</strong> follow the order
-of JSON input; first sequence of the alignment is
-the target sequence, if in doubt, check for
-sequence roles <code class="docutils literal"><span class="pre">TARGET</span></code> or <code class="docutils literal"><span class="pre">TEMPLATE</span></code></p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt><code class="xref py py-attr docutils literal"><span class="pre">aln_sources</span></code> - the original source of the alignment, may be</dt>
-<dd><p class="first last">filename(s) or a string in JSON format,
-<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of all sources</p>
-</dd>
-</dl>
-</li>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.core.pm3argparse.PM3ArgumentParser.AddStructure">
+<code class="descname">AddStructure</code><span class="sig-paren">(</span><em>attach_views=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/core/pm3argparse.html#PM3ArgumentParser.AddStructure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.core.pm3argparse.PM3ArgumentParser.AddStructure" title="Permalink to this definition">¶</a></dt>
+<dd><p>Commandline options for structures.</p>
+<p>Activate everything needed to load alignments to the argument parser.
+Command line arguments are then added in <a class="reference internal" href="#promod3.core.pm3argparse.PM3ArgumentParser.AssembleParser" title="promod3.core.pm3argparse.PM3ArgumentParser.AssembleParser"><code class="xref py py-meth docutils literal"><span class="pre">AssembleParser()</span></code></a> and the
+input is post processed and checked in <a class="reference internal" href="#promod3.core.pm3argparse.PM3ArgumentParser.Parse" title="promod3.core.pm3argparse.PM3ArgumentParser.Parse"><code class="xref py py-meth docutils literal"><span class="pre">Parse()</span></code></a>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>attach_views</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; if True: attach views to alignments. Requires call
+to <a class="reference internal" href="#promod3.core.pm3argparse.PM3ArgumentParser.AddAlignment" title="promod3.core.pm3argparse.PM3ArgumentParser.AddAlignment"><code class="xref py py-meth docutils literal"><span class="pre">AddAlignment()</span></code></a>. Chains for each sequence
+are identified based on the sequence name of the
+templates in the alignments (see 
+<a class="reference internal" href="../actions/index.html#promod-build-model"><span>here</span></a> for details).</td>
+</tr>
+</tbody>
+</table>
+<p>Options/arguments added:</p>
+<ul class="simple">
+<li><code class="docutils literal"><span class="pre">-p/--pdb</span> <span class="pre">&lt;FILE&gt;</span></code> - Structure in PDB format. File can be plain or
+gzipped.</li>
+<li><code class="docutils literal"><span class="pre">-e/--entity</span> <span class="pre">&lt;FILE&gt;</span></code> - Structure in any format readable by the
+<code class="xref py py-meth docutils literal"><span class="pre">ost.io.LoadEntity()</span></code> method. Format is chosen by file ending.
+Recognized File Extensions: .ent, .pdb, .ent.gz, .pdb.gz, .cif, .cif.gz.</li>
+</ul>
+<p>Notes:</p>
+<ul class="simple">
+<li>one of the inputs must be given and only one type of input acceptable</li>
+<li>callable multiple times (structures appended in given order)</li>
+</ul>
+<p>Attributes added to the namespace returned by <a class="reference internal" href="#promod3.core.pm3argparse.PM3ArgumentParser.Parse" title="promod3.core.pm3argparse.PM3ArgumentParser.Parse"><code class="xref py py-meth docutils literal"><span class="pre">Parse()</span></code></a>:</p>
+<ul class="simple">
+<li><code class="xref py py-attr docutils literal"><span class="pre">pdb</span></code> - filled with the input of the <code class="docutils literal"><span class="pre">--pdb</span></code> option, a
+<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> (filenames).</li>
+<li><code class="xref py py-attr docutils literal"><span class="pre">entity</span></code> - filled with the input of the <code class="docutils literal"><span class="pre">--entity</span></code> option, a
+<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> (filenames).</li>
+<li><code class="xref py py-attr docutils literal"><span class="pre">structures</span></code> - <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <code class="xref py py-class docutils literal"><span class="pre">ost.EntityHandle</span></code>, same
+order as given.</li>
+<li><code class="xref py py-attr docutils literal"><span class="pre">structure_sources</span></code> - <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> with the
+original filenames of the structures.</li>
+</ul>
+<p>Exit codes related to alignment input:</p>
+<ul class="simple">
+<li>32 - a given structure file does not exist</li>
+<li>33 - failure to read a given structure file</li>
+<li>34 - file ending is not a supported format</li>
+</ul>
+<p>Exit codes if <em>attach_views</em> = True:</p>
+<ul class="simple">
+<li>41 - attach_views used without adding alignments</li>
+<li>42 - inconsistent offsets between seq. name and seq. in alignment</li>
+<li>43 - non-integer offset defined in seq. name</li>
+<li>44 - too many &#8220;|&#8221; in seq. name</li>
+<li>45 - chain to attach to sequence could not be identified</li>
 </ul>
 </dd></dl>
 
@@ -248,14 +268,20 @@ and with the right constraints.</p>
 <dl class="method">
 <dt id="promod3.core.pm3argparse.PM3ArgumentParser.Parse">
 <code class="descname">Parse</code><span class="sig-paren">(</span><em>args=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/core/pm3argparse.html#PM3ArgumentParser.Parse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.core.pm3argparse.PM3ArgumentParser.Parse" title="Permalink to this definition">¶</a></dt>
-<dd><p>Parse an argument string.</p>
+<dd><p>Parse an argument string. See <code class="xref py py-meth docutils literal"><span class="pre">Add*()</span></code> methods.</p>
+<p>Options/arguments added by default: <code class="docutils literal"><span class="pre">-h/--help</span></code> shows usage.</p>
+<p>General exit codes:</p>
+<ul class="simple">
+<li>1 - an unhandled exception was raised</li>
+<li>2 - arguments cannot be parsed or required arguments are missing</li>
+</ul>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>args</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; The argument string. As default <a class="reference external" href="https://docs.python.org/2.7/library/sys.html#sys.argv"><code class="xref py py-attr docutils literal"><span class="pre">sys.argv</span></code></a> is used.</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>args</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; The argument string. As default <a class="reference external" href="https://docs.python.org/2.7/library/sys.html#sys.argv"><code class="xref py py-attr docutils literal"><span class="pre">sys.argv</span></code></a> is used.</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">promod3.core.pm3argparse.PM3OptionsNamespace</span></code>.</td>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Namespace filled with attributes (see <code class="xref py py-meth docutils literal"><span class="pre">Add*()</span></code> methods).</td>
 </tr>
 </tbody>
 </table>
@@ -318,7 +344,7 @@ and with the right constraints.</p>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/core/runtime_profiling.html b/doc/html/core/runtime_profiling.html
new file mode 100644
index 00000000..c51469a2
--- /dev/null
+++ b/doc/html/core/runtime_profiling.html
@@ -0,0 +1,219 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Runtime profiling &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="core - ProMod3 Core Functionality" href="index.html" />
+    <link rel="next" title="SetCompoundsChemlib()" href="setcompoundschemlib.html" />
+    <link rel="prev" title="Geometry functions" href="geometry.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="runtime-profiling">
+<h1>Runtime profiling<a class="headerlink" href="#runtime-profiling" title="Permalink to this headline">¶</a></h1>
+<dl class="class">
+<dt id="promod3.core.StaticRuntimeProfiler">
+<em class="property">class </em><code class="descclassname">promod3.core.</code><code class="descname">StaticRuntimeProfiler</code><a class="headerlink" href="#promod3.core.StaticRuntimeProfiler" title="Permalink to this definition">¶</a></dt>
+<dd><p>Defines functionality for runtime profiling.</p>
+<p>All profiling is completely turned off by default and must be activated at
+compile-time by adding <code class="docutils literal"><span class="pre">-DPM3_RUNTIME_PROFILING_LEVEL=N</span></code> to your CMake
+call, where <code class="docutils literal"><span class="pre">N</span></code> must be larger than 0. If turned off, all these functions
+will still exist and work but will not do anything. Functionality in the C++
+code is usually profiled at level 2, while Python functionality is profiled
+at level 1. The default profiling only covers the steps of the modelling
+pipeline.</p>
+<p>You can start multiple timers with the same id and statistics will be
+generated considering the number of timings and the total runtime for that
+timer. If a timer within another timed entity, the outer timer is paused,
+while the inner one is running. Hence, the sum of all timers will be the
+total time spent in any timer (nothing is counted twice!).</p>
+<dl class="staticmethod">
+<dt id="promod3.core.StaticRuntimeProfiler.Start">
+<em class="property">static </em><code class="descname">Start</code><span class="sig-paren">(</span><em>id</em>, <em>level=1</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.core.StaticRuntimeProfiler.Start" title="Permalink to this definition">¶</a></dt>
+<dd><p>Start a timer for the given <cite>id</cite>. This pauses any other currently running
+timer.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>id</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Identifier for this timer.</li>
+<li><strong>level</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Timer only started if level &lt;= <code class="docutils literal"><span class="pre">PM3_RUNTIME_PROFILING_LEVEL</span></code></li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.core.StaticRuntimeProfiler.StartScoped">
+<em class="property">static </em><code class="descname">StartScoped</code><span class="sig-paren">(</span><em>id</em>, <em>level=1</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.core.StaticRuntimeProfiler.StartScoped" title="Permalink to this definition">¶</a></dt>
+<dd><p>Start a timer for the given <cite>id</cite> as in <a class="reference internal" href="#promod3.core.StaticRuntimeProfiler.Start" title="promod3.core.StaticRuntimeProfiler.Start"><code class="xref py py-meth docutils literal"><span class="pre">Start()</span></code></a>, but this will stop it
+automatically when the returned variable goes out of scope.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>id</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Identifier for this timer.</li>
+<li><strong>level</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Timer only started if level &lt;= <code class="docutils literal"><span class="pre">PM3_RUNTIME_PROFILING_LEVEL</span></code></li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Object that will call <a class="reference internal" href="#promod3.core.StaticRuntimeProfiler.Stop" title="promod3.core.StaticRuntimeProfiler.Stop"><code class="xref py py-meth docutils literal"><span class="pre">Stop()</span></code></a> when it goes out of scope</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.core.StaticRuntimeProfiler.Stop">
+<em class="property">static </em><code class="descname">Stop</code><span class="sig-paren">(</span><em>id</em>, <em>level=1</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.core.StaticRuntimeProfiler.Stop" title="Permalink to this definition">¶</a></dt>
+<dd><p>Stop the currently running timer. If a timer was paused when starting this
+timer, it will be resumed now. Note that there is no error checking here, so
+this will fail miserably if no timer is currently running.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>level</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Timer only stopped if level &lt;= <code class="docutils literal"><span class="pre">PM3_RUNTIME_PROFILING_LEVEL</span></code></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.core.StaticRuntimeProfiler.PrintSummary">
+<em class="property">static </em><code class="descname">PrintSummary</code><span class="sig-paren">(</span><em>max_to_show=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.core.StaticRuntimeProfiler.PrintSummary" title="Permalink to this definition">¶</a></dt>
+<dd><p>Display a summary of all timed entities. The timers are collected by id and
+sorted by total runtime. If more than 10 entries are shown and the used id&#8217;s
+have the form &#8220;GROUP::NAME&#8221;, an additional summary is shown with the total
+times spent in each &#8220;GROUP&#8221;.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>max_to_show</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; if &gt;= 0, show only top <cite>max_to_show</cite> entries.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.core.StaticRuntimeProfiler.IsEnabled">
+<em class="property">static </em><code class="descname">IsEnabled</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.core.StaticRuntimeProfiler.IsEnabled" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, if <code class="docutils literal"><span class="pre">PM3_RUNTIME_PROFILING_LEVEL</span></code> &gt; 0. Otherwise, profiling
+is completely turned off.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.core.StaticRuntimeProfiler.Clear">
+<em class="property">static </em><code class="descname">Clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.core.StaticRuntimeProfiler.Clear" title="Permalink to this definition">¶</a></dt>
+<dd><p>Clears all timed entries. Note that there is no error checking here, so this
+will fail miserably if timers are currently running.</p>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper"><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="docutils literal"><span class="pre">core</span></code> - ProMod3 Core Functionality</a><ul>
+      <li>Previous: <a href="geometry.html" title="previous chapter">Geometry functions</a></li>
+      <li>Next: <a href="setcompoundschemlib.html" title="next chapter"><code class="docutils literal"><span class="pre">SetCompoundsChemlib()</span></code></a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/core/runtime_profiling.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/core/runtime_profiling.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/core/setcompoundschemlib.html b/doc/html/core/setcompoundschemlib.html
index 17ead7af..2af7b48a 100644
--- a/doc/html/core/setcompoundschemlib.html
+++ b/doc/html/core/setcompoundschemlib.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>SetCompoundsChemlib() &mdash; ProMod3 0 documentation</title>
+    <title>SetCompoundsChemlib() &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,10 +23,10 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="Documentation For Users" href="../users.html" />
     <link rel="next" title="Documentation For Developers" href="../developers.html" />
-    <link rel="prev" title="helper - Shared Functionality For the Everything" href="helper.html" />
+    <link rel="prev" title="Runtime profiling" href="runtime_profiling.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -75,7 +75,7 @@ enabled globally.</p>
 <ul>
   <li><a href="../index.html">Documentation overview</a><ul>
   <li><a href="../users.html">Documentation For Users</a><ul>
-      <li>Previous: <a href="helper.html" title="previous chapter"><code class="docutils literal"><span class="pre">helper</span></code> - Shared Functionality For the Everything</a></li>
+      <li>Previous: <a href="runtime_profiling.html" title="previous chapter">Runtime profiling</a></li>
       <li>Next: <a href="../developers.html" title="next chapter">Documentation For Developers</a></li>
   </ul></li>
   </ul></li>
@@ -106,7 +106,7 @@ enabled globally.</p>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/dev_setup.html b/doc/html/dev_setup.html
new file mode 100644
index 00000000..fdad7041
--- /dev/null
+++ b/doc/html/dev_setup.html
@@ -0,0 +1,311 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>ProMod3 Setup &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    './',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="index.html" />
+    <link rel="up" title="Documentation For Developers" href="developers.html" />
+    <link rel="next" title="Contributing" href="contributing.html" />
+    <link rel="prev" title="Documentation For Developers" href="developers.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="project-setup">
+<h1>ProMod3 Setup<a class="headerlink" href="#project-setup" title="Permalink to this headline">¶</a></h1>
+<p>The following should give an overview of how this project is set up. Anyone
+planning to develop parts of ProMod3 should read this! Important topics are
+Git branches, the directory structure and tightly linked with this also
+CMake.</p>
+<div class="section" id="git-branches">
+<span id="id1"></span><h2>Git Branches<a class="headerlink" href="#git-branches" title="Permalink to this headline">¶</a></h2>
+<p>Basically we have two, sometimes three major branches. <code class="docutils literal"><span class="pre">master</span></code>, <code class="docutils literal"><span class="pre">develop</span></code>
+and in front of a new release a dedicated release branch. For bugs, hotfix
+branches of a rather short life are used.</p>
+<p><code class="docutils literal"><span class="pre">master</span></code> is the stable branch, corresponding to a released version. It is
+solely fed by a release or hotfix branch.</p>
+<p>Release branches, usually labelled <code class="docutils literal"><span class="pre">release-&lt;VERSION&gt;</span></code>, are branched of
+<code class="docutils literal"><span class="pre">develop</span></code> to fix features and thoroughly test them before a new major
+release. Once everything looks trustworthy, such a branch is merged into
+<code class="docutils literal"><span class="pre">master</span></code> and since there should be a few bug fixes in, <code class="docutils literal"><span class="pre">master</span></code> is merged
+into <code class="docutils literal"><span class="pre">develop</span></code>. Bugs are fixed in dedicated hotfix branches, which should
+only exist for the fix and testing itself. Those are forged from release
+branches or <code class="docutils literal"><span class="pre">master</span></code>. If created for <code class="docutils literal"><span class="pre">master</span></code>, they are also merged back
+into <code class="docutils literal"><span class="pre">develop</span></code>.</p>
+<p>The <code class="docutils literal"><span class="pre">develop</span></code> branch exists to introduce new features up to the level of
+whole projects extending ProMod3 and see that they work seamlessly together
+with the rest of the system. There do exist a couple of rather strict rules for
+what goes into this branch:</p>
+<ul class="simple">
+<li>Your code must have been (briefly) reviewed by others</li>
+<li>There have to be unit tests</li>
+<li>It needs to pass <code class="docutils literal"><span class="pre">make</span> <span class="pre">check</span></code> <strong>including</strong> <code class="docutils literal"><span class="pre">doctest</span></code> &amp; <code class="docutils literal"><span class="pre">linkcheck</span></code></li>
+<li>Your project needs documentation</li>
+<li>It must not break the ability of out-of-source builds</li>
+</ul>
+<p>The reason to be a bit restrictive on branches which end up in actual releases,
+should be mostly obvious: ProMod3 is used by productive services as a third
+party toolbox. There it is not an item of active development and people
+probably have no insight in its internals. So messing up a new release creates
+a lot of extra work for a lot of people. First for the developer of a service
+to find out that ProMod3 has turned malicious, then for the maintainer of
+this package to figure out that its your contribution messing things up and in
+the end for you, fixing the problems.</p>
+<p>The place where you may get messy is your own Git branch within the ProMod3
+repository. This is basically where you should develop your project. Once you
+created something that could go into a release, tidy things up according to the
+rules from above and merge it into <code class="docutils literal"><span class="pre">develop</span></code>. From there it will
+automatically find its way into the next release.</p>
+<p>To set up your own branch, start from a current <code class="docutils literal"><span class="pre">develop</span></code> branch:</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git checkout develop         <span class="c"># switch to branch develop</span>
+<span class="gp">$</span> git pull --rebase            <span class="c"># update branch develop</span>
+<span class="gp">$</span> git checkout -b &lt;BRANCHNAME&gt; <span class="c"># create branch &lt;BRANCHNAME&gt; and switch to it</span>
+</pre></div>
+</div>
+<p>Over time, <code class="docutils literal"><span class="pre">develop</span></code> may recognise some changes, e.g. new features, which you
+want to make use of in your project. Keeping your branch up to date is a three
+step process. Git does not allow updates on top of changed code, so either
+changes have to be committed, or if in the middle of implementing something,
+stored away temporarily. Making commits is straight forward:</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git commit -m <span class="s1">&#39;&lt;DESCRIPTION&gt;&#39;</span> <span class="c"># commit changes including a comment</span>
+</pre></div>
+</div>
+<p>Hiding your changes away from Git just for updating files is a bit more
+involved. Everything is easily stored on an internal stack and needs to be
+fetched from there, once the branch was updated. One major problem in the past
+was a possible loss of code by those operations. If the update changes a file
+you have changed, too, and stashed away, this may end up in a non-resolvable
+merge conflict and your changes are lost. Usually the log tells you, which
+files were recently modified. Moving all current changes to the stack is
+achieved by:</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git stash save
+</pre></div>
+</div>
+<p>To revive them, use:</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git stash pop
+</pre></div>
+</div>
+<p>After cleaning up your branch, switch to <code class="docutils literal"><span class="pre">develop</span></code>, update it and switch back:</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git checkout develop
+<span class="gp">$</span> git pull --rebase
+<span class="gp">$</span> git checkout &lt;BRANCHNAME&gt;
+</pre></div>
+</div>
+<p>Now for actually updating your branch, there are two different ways: merging
+and rebasing. A rebase may only be done, if you <strong>never</strong> pushed your branch to
+the origin of the repository (otherwise you will mess up history, in the worst
+case <code class="docutils literal"><span class="pre">develop</span></code> may be unusable once you merge):</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git rebase develop
+</pre></div>
+</div>
+<p>For branches which are available to others, do a proper merge:</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git merge develop
+</pre></div>
+</div>
+<p>This may require some manual conflict solving and will end up in a merge commit.</p>
+</div>
+<div class="section" id="git-hooks">
+<h2>Git Hooks<a class="headerlink" href="#git-hooks" title="Permalink to this headline">¶</a></h2>
+<p>Git hooks are scripts invoked by Git in connection to certain commands.
+ProMod3 currently provides one for <strong class="command">commit</strong>. It is installed by</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> cp extras/pre_commit/pre-commit .git/hooks/
+</pre></div>
+</div>
+<p>Its task is applying coding standards and doing a bunch of other checks on the
+files involved in a commit. Everything around the script is hosted in
+<code class="file docutils literal"><span class="pre">extras/pre_commit/</span></code>. The checks can be manually executed with</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> python .git/hooks/pre-commit
+</pre></div>
+</div>
+<p>If you ever have to skip the hook,</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">$</span> git commit --no-verify
+</pre></div>
+</div>
+<p>does the trick. <strong>But</strong> checks are always run on the complete file containing
+changes, not only on the lines changed. This means if you opt out of an issue,
+it will reappear next time that very file changes.</p>
+<p>For checking Python code, the pre-commit hook employs <a class="reference external" href="https://www.pylint.org">Pylint</a>, to make sure
+we stay close to <a class="reference external" href="https://www.python.org/dev/peps/pep-0008/">PEP 8</a>. If you feel the need to make changes to the Pylint
+call, please make sure you fully understand what the complaints are. Sometimes
+PEP 8 sounds overly restrictive but it may help with performance and
+compatibility with Python 3. For ProMod3 it is also important that the code
+looks similar throughout the various modules. So do not disable a check because
+it just seems inconvenient or you do not understand why Pylint is croaking at
+what looks like &#8216;working&#8217; code. But then there are also cases where Pylint is
+not smart enough to cope with valid PEP 8 code. For changes with valid cause,
+the configuration flushed into Pylint may be found at
+<code class="file docutils literal"><span class="pre">extras/pre_commit/pm3_csc/filecheck/pylintrc</span></code> and
+<code class="file docutils literal"><span class="pre">extras/pre_commit/pm3_csc/filecheck/pylint-unittest-rc</span></code>. The latter one
+is invoked on unit test code, where we may go a little bit less restrictive.</p>
+</div>
+<div class="section" id="directory-structure">
+<h2>Directory Structure<a class="headerlink" href="#directory-structure" title="Permalink to this headline">¶</a></h2>
+<p>The directory structure of the ProMod3 repository is supposed to &#8216;keep
+everything together that belongs together&#8217;. That is, code, documentation and
+extra data should be gathered on a per-module basis immediately in the
+repository root. The directory structure of your module should look like this:</p>
+<div class="highlight-text"><div class="highlight"><pre>promod3.git/                            Project folder
+      your_module/                      Module directory
+            CMakeLists.txt              CMake configuration
+            data/                       Extra data (if needed)
+                  CMakeLists.txt        CMake configuration
+                  ...
+            doc/                        Documentation
+                  CMakeLists.txt        CMake configuration
+                  your_module.rst       Overview/frame of your module
+                  ...
+            pymod/                      Python code
+                  CMakeLists.txt        CMake configuration
+                  __init__.py           Init file needed for import
+                  submodule1.py         Code
+                  ...
+            src/                        C/ C++ code
+                  CMakeLists.txt        CMake configuration
+                  source1.cc            C++ code
+                  source2.hh            Header
+                  ...
+            tests/                      Unit tests
+                  CMakeLists.txt        CMake configuration
+                  data/                 Test data (if needed)
+                        ...
+                  test_your_module.py   Unit tests for your_module
+                  test_submodule1.py    Unit tests for submodule1
+                  ...
+</pre></div>
+</div>
+<p>Additionally to the module directories there are a few extra folders:</p>
+<ul class="simple">
+<li><code class="file docutils literal"><span class="pre">actions</span></code>: Scripts callable as <code class="docutils literal"><span class="pre">pm</span> <span class="pre">&lt;ACTION_NAME&gt;</span></code>.
+See <a class="reference internal" href="contributing.html#how-to-start-your-own-action"><span>here</span></a> for details.</li>
+<li><code class="file docutils literal"><span class="pre">cmake_support</span></code>: Helper functions for CMake.
+See <a class="reference internal" href="cmake/index.html#pm3-cmake-doc"><span>here</span></a> for details.</li>
+<li><code class="file docutils literal"><span class="pre">doc</span></code>: High-level documentation, test scripts (<code class="file docutils literal"><span class="pre">doc/tests</span></code>) and a
+copy of the generated html documentation (<code class="file docutils literal"><span class="pre">doc/html</span></code>). The latter must
+be kept up-to-date at least on the <code class="docutils literal"><span class="pre">master</span></code> branch.
+See <a class="reference internal" href="contributing.html#writing-documentation"><span>here</span></a> for details.</li>
+<li><code class="file docutils literal"><span class="pre">extras</span></code>: Extra data and information that doesn&#8217;t fit anywhere
+else (e.g. Git hooks or scripts to recreate the binary files).</li>
+<li><code class="file docutils literal"><span class="pre">scripts</span></code>: Input for scripts that end up in <code class="file docutils literal"><span class="pre">stage/bin</span></code></li>
+</ul>
+</div>
+<div class="section" id="cmake">
+<h2>CMake<a class="headerlink" href="#cmake" title="Permalink to this headline">¶</a></h2>
+<p>The attentive reader may have noticed all the <code class="file docutils literal"><span class="pre">CMakeLists.txt</span></code> files in
+the directory structure. Those are needed to configure the build system, e.g.
+tell it which files have to be considered packaging, compiling, etc.. Also
+Python modules are declared there as well as which files belong to the
+documentation. CMake is a rather complex topic (unfortunately all usable
+build systems seem to be) so we skip a detailed view, here, and just advice you
+to go by example. There is a tiny bit of documentation on our additions to
+CMake <a class="reference internal" href="cmake/index.html#pm3-cmake-doc"><span>here</span></a>. If you really need to make changes to the
+build system, other than adding new files and modules, you have to dive into
+CMake documentation all by yourself and on your own responsibility. You have
+been warned.</p>
+</div>
+<div class="section" id="the-stage-directory">
+<h2>The <code class="file docutils literal"><span class="pre">stage</span></code> Directory<a class="headerlink" href="#the-stage-directory" title="Permalink to this headline">¶</a></h2>
+<p>Once you hit <strong class="command">make</strong> in your build directory, a directory <code class="file docutils literal"><span class="pre">stage</span></code>
+in this path will be populated. It just resembles a directory structure as of a
+usual Unix file system filled with the build products of ProMod3. The
+<code class="file docutils literal"><span class="pre">stage</span></code> directory tree can already be utilised. You may import Python
+modules from there, use the binaries from <code class="file docutils literal"><span class="pre">stage/bin</span></code>, etc..</p>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">ProMod3 Setup</a><ul>
+<li><a class="reference internal" href="#git-branches">Git Branches</a></li>
+<li><a class="reference internal" href="#git-hooks">Git Hooks</a></li>
+<li><a class="reference internal" href="#directory-structure">Directory Structure</a></li>
+<li><a class="reference internal" href="#cmake">CMake</a></li>
+<li><a class="reference internal" href="#the-stage-directory">The <code class="file docutils literal"><span class="pre">stage</span></code> Directory</a></li>
+</ul>
+</li>
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+  <li><a href="developers.html">Documentation For Developers</a><ul>
+      <li>Previous: <a href="developers.html" title="previous chapter">Documentation For Developers</a></li>
+      <li>Next: <a href="contributing.html" title="next chapter">Contributing</a></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="_sources/dev_setup.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="_sources/dev_setup.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/developers.html b/doc/html/developers.html
index c22855e1..b581bfa8 100644
--- a/doc/html/developers.html
+++ b/doc/html/developers.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Documentation For Developers &mdash; ProMod3 0 documentation</title>
+    <title>Documentation For Developers &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    './',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,8 +23,8 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="index.html" />
-    <link rel="next" title="Contributing" href="contributing.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="index.html" />
+    <link rel="next" title="ProMod3 Setup" href="dev_setup.html" />
     <link rel="prev" title="SetCompoundsChemlib()" href="core/setcompoundschemlib.html" />
    
   
@@ -46,17 +46,21 @@ new features.</p>
 <p>Contents:</p>
 <div class="toctree-wrapper compound">
 <ul>
+<li class="toctree-l1"><a class="reference internal" href="dev_setup.html">ProMod3 Setup</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="dev_setup.html#git-branches">Git Branches</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dev_setup.html#git-hooks">Git Hooks</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dev_setup.html#directory-structure">Directory Structure</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dev_setup.html#cmake">CMake</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dev_setup.html#the-stage-directory">The <code class="file docutils literal"><span class="pre">stage</span></code> Directory</a></li>
+</ul>
+</li>
 <li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="contributing.html#git-branches">Git Branches</a></li>
-<li class="toctree-l2"><a class="reference internal" href="contributing.html#git-hooks">Git Hooks</a></li>
-<li class="toctree-l2"><a class="reference internal" href="contributing.html#directory-structure">Directory Structure</a></li>
-<li class="toctree-l2"><a class="reference internal" href="contributing.html#cmake">CMake</a></li>
-<li class="toctree-l2"><a class="reference internal" href="contributing.html#the-stage-directory">The <code class="file docutils literal"><span class="pre">stage</span></code> Directory</a></li>
+<li class="toctree-l2"><a class="reference internal" href="contributing.html#how-to-start-your-own-module">How To Start Your Own Module</a></li>
+<li class="toctree-l2"><a class="reference internal" href="contributing.html#how-to-start-your-own-action">How To Start Your Own Action</a></li>
+<li class="toctree-l2"><a class="reference internal" href="contributing.html#how-to-write-your-own-scorer">How To Write Your Own Scorer</a></li>
 <li class="toctree-l2"><a class="reference internal" href="contributing.html#quick-testing-of-project-features">Quick testing of ProMod3 features</a></li>
 <li class="toctree-l2"><a class="reference internal" href="contributing.html#unit-tests">Unit Tests</a></li>
 <li class="toctree-l2"><a class="reference internal" href="contributing.html#writing-documentation">Writing Documentation</a></li>
-<li class="toctree-l2"><a class="reference internal" href="contributing.html#how-to-start-your-own-module">How To Start Your Own Module</a></li>
-<li class="toctree-l2"><a class="reference internal" href="contributing.html#how-to-start-your-own-action">How To Start Your Own Action</a></li>
 <li class="toctree-l2"><a class="reference internal" href="contributing.html#third-party-contributions-license-issues">Third Party Contributions (License Issues)</a></li>
 </ul>
 </li>
@@ -70,11 +74,11 @@ new features.</p>
 <li class="toctree-l2"><a class="reference internal" href="cmake/index.html#functions-for-module-action-maintenance">Functions For Module/ Action Maintenance</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="portableIO.html">Using binary files in ProMod3</a><ul>
+<li class="toctree-l1"><a class="reference internal" href="portableIO.html">Using Binary Files In ProMod3</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="portableIO.html#header">Header</a></li>
-<li class="toctree-l2"><a class="reference internal" href="portableIO.html#portable-binary-data">Portable binary data</a></li>
-<li class="toctree-l2"><a class="reference internal" href="portableIO.html#code-example">Code example</a></li>
-<li class="toctree-l2"><a class="reference internal" href="portableIO.html#exisiting-binary-files">Exisiting binary files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="portableIO.html#portable-binary-data">Portable Binary Data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="portableIO.html#code-example">Code Example</a></li>
+<li class="toctree-l2"><a class="reference internal" href="portableIO.html#exisiting-binary-files">Exisiting Binary Files</a></li>
 </ul>
 </li>
 </ul>
@@ -91,7 +95,7 @@ new features.</p>
 <ul>
   <li><a href="index.html">Documentation overview</a><ul>
       <li>Previous: <a href="core/setcompoundschemlib.html" title="previous chapter"><code class="docutils literal"><span class="pre">SetCompoundsChemlib()</span></code></a></li>
-      <li>Next: <a href="contributing.html" title="next chapter">Contributing</a></li>
+      <li>Next: <a href="dev_setup.html" title="next chapter">ProMod3 Setup</a></li>
   </ul></li>
 </ul>
 </div>
@@ -120,7 +124,7 @@ new features.</p>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/genindex.html b/doc/html/genindex.html
index f5d62dd5..3978693a 100644
--- a/doc/html/genindex.html
+++ b/doc/html/genindex.html
@@ -7,7 +7,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Index &mdash; ProMod3 0 documentation</title>
+    <title>Index &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -15,7 +15,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    './',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -24,7 +24,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="index.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -68,16 +68,20 @@
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.__getitem__">__getitem__() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.__getitem__">__getitem__() (promod3.loop.Fragger method)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.__getitem__">(promod3.loop.Fragger method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.__getitem__">(promod3.loop.FraggerMap method)</a>
   </dt>
 
         
-  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.__getitem__">(promod3.loop.FraggerMap method)</a>
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomOverallScorer.__getitem__">(promod3.scoring.AllAtomOverallScorer method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer.__getitem__">(promod3.scoring.BackboneOverallScorer method)</a>
   </dt>
 
         
@@ -105,10 +109,6 @@
   <dt><a href="core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser.__init__">__init__() (promod3.core.pm3argparse.PM3ArgumentParser method)</a>
   </dt>
 
-      
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.__iter__">__iter__() (promod3.loop.BackboneList method)</a>
-  </dt>
-
   </dl></td>
   <td style="width: 33%" valign="top"><dl>
       
@@ -121,7 +121,7 @@
   </dt>
 
         
-  <dt><a href="loop/helper_classes.html#promod3.loop.PsipredPrediction.__len__">(promod3.loop.PsipredPrediction method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.PsipredPrediction.__len__">(promod3.loop.PsipredPrediction method)</a>
   </dt>
 
         
@@ -146,12 +146,16 @@
 
       </dl></dd>
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.__setitem__">__setitem__() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.__setitem__">__setitem__() (promod3.loop.FraggerMap method)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.__setitem__">(promod3.loop.FraggerMap method)</a>
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomOverallScorer.__setitem__">(promod3.scoring.AllAtomOverallScorer method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer.__setitem__">(promod3.scoring.BackboneOverallScorer method)</a>
   </dt>
 
       </dl></dd>
@@ -162,10 +166,6 @@
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/backbone.html#promod3.loop.Backbone.aa">aa (promod3.loop.Backbone attribute)</a>
-  </dt>
-
-      
   <dt><a href="sidechain/rotamer_id.html#promod3.sidechain.AAToRotID">AAToRotID() (in module promod3.sidechain)</a>
   </dt>
 
@@ -178,12 +178,12 @@
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.Add">Add() (promod3.loop.LoopCandidates method)</a>, <a href="loop/helper_classes.html#promod3.loop.LoopCandidates.Add">[1]</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.PsipredPrediction.Add">Add() (promod3.loop.PsipredPrediction method)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="loop/helper_classes.html#promod3.loop.PsipredPrediction.Add">(promod3.loop.PsipredPrediction method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.Add">(promod3.modelling.LoopCandidates method)</a>
   </dt>
 
       </dl></dd>
@@ -214,23 +214,23 @@
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.AddConstraint">AddConstraint() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.BackboneRelaxer.AddCARestraint">AddCARestraint() (promod3.modelling.BackboneRelaxer method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.AddConstraintFunction">AddConstraintFunction() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.BackboneRelaxer.AddCBRestraint">AddCBRestraint() (promod3.modelling.BackboneRelaxer method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.AddContact">AddContact() (promod3.loop.BackboneLoopScorer method)</a>, <a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.AddContact">[1]</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.AddCoordinates">AddCoordinates() (promod3.loop.StructureDB method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.AddContactFunction">AddContactFunction() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.BackboneRelaxer.AddCRestraint">AddCRestraint() (promod3.modelling.BackboneRelaxer method)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.AddCoordinates">AddCoordinates() (promod3.loop.StructureDB method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.AddFragmentInfo">AddFragmentInfo() (promod3.modelling.LoopCandidates method)</a>
   </dt>
 
       
@@ -238,1889 +238,3173 @@
   </dt>
 
       
-  <dt><a href="sidechain/frame.html#promod3.sidechain.Frame.AddFrameEnergy">AddFrameEnergy() (promod3.sidechain.Frame method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.AddFrameEnergy">AddFrameEnergy() (promod3.sidechain.FRMRotamer method)</a>, <a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.AddFrameEnergy">[1]</a>
   </dt>
 
-      
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.AddLonePair">AddLonePair() (promod3.sidechain.Particle method)</a>
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamerGroup.AddFrameEnergy">(promod3.sidechain.FRMRotamerGroup method)</a>
   </dt>
 
-      
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.AddRotamer">AddRotamer() (promod3.sidechain.BBDepRotamerLib method)</a>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.AddFrameEnergy">(promod3.sidechain.RRMRotamer method)</a>
   </dt>
 
-      <dd><dl>
         
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.AddRotamer">(promod3.sidechain.RotamerLib method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamerGroup.AddFrameEnergy">(promod3.sidechain.RRMRotamerGroup method)</a>
   </dt>
 
       </dl></dd>
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.AddSeqIDParameters">AddSeqIDParameters() (promod3.loop.Fragger method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.AddLonePair">AddLonePair() (promod3.sidechain.Particle method)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.AddSeqSimParameters">AddSeqSimParameters() (promod3.loop.Fragger method)</a>
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.BackboneRelaxer.AddNRestraint">AddNRestraint() (promod3.modelling.BackboneRelaxer method)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.AddSequenceProfileParameters">AddSequenceProfileParameters() (promod3.loop.Fragger method)</a>
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.BackboneRelaxer.AddORestraint">AddORestraint() (promod3.modelling.BackboneRelaxer method)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.AddSSAgreeParameters">AddSSAgreeParameters() (promod3.loop.Fragger method)</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.BackboneScoreEnv.AddPairwiseFunction">AddPairwiseFunction() (promod3.scoring.BackboneScoreEnv method)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.AddStructureProfileParameters">AddStructureProfileParameters() (promod3.loop.Fragger method)</a>
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.AddRotamer">AddRotamer() (promod3.sidechain.BBDepRotamerLib method)</a>
   </dt>
 
-      
-  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.AddTorsionProbabilityParameters">AddTorsionProbabilityParameters() (promod3.loop.Fragger method)</a>
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.AddRotamer">(promod3.sidechain.RotamerLib method)</a>
   </dt>
 
+      </dl></dd>
       
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.after">after (promod3.modelling.StructuralGap attribute)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.AddSeqIDParameters">AddSeqIDParameters() (promod3.loop.Fragger method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.append">append() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.AddSeqSimParameters">AddSeqSimParameters() (promod3.loop.Fragger method)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.ApplyCCD">ApplyCCD() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.AddSequenceProfileParameters">AddSequenceProfileParameters() (promod3.loop.Fragger method)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.ApplyKIC">ApplyKIC() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.AddSSAgreeParameters">AddSSAgreeParameters() (promod3.loop.Fragger method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamerGroup.ApplyOneResidue">ApplyOneResidue() (promod3.sidechain.FRMRotamerGroup method)</a>
-  </dt>
-
-      <dd><dl>
-        
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamerGroup.ApplyOneResidue">(promod3.sidechain.RRMRotamerGroup method)</a>
+  <dt><a href="core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser.AddStructure">AddStructure() (promod3.core.pm3argparse.PM3ArgumentParser method)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.ApplyOnResidue">ApplyOnResidue() (promod3.sidechain.FRMRotamer method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.AddStructureProfileParameters">AddStructureProfileParameters() (promod3.loop.Fragger method)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.ApplyOnResidue">(promod3.sidechain.RRMRotamer method)</a>
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.AddSubrotamerDefinition">AddSubrotamerDefinition() (promod3.sidechain.FRMRotamer method)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamerGroup.ApplySelfEnergyThres">ApplySelfEnergyThres() (promod3.sidechain.FRMRotamerGroup method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.AddTorsionProbabilityParameters">AddTorsionProbabilityParameters() (promod3.loop.Fragger method)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamerGroup.ApplySelfEnergyThres">(promod3.sidechain.RRMRotamerGroup method)</a>
+      
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.after">after (promod3.modelling.StructuralGap attribute)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="loop/backbone.html#promod3.loop.Backbone.ApplyTransform">ApplyTransform() (promod3.loop.Backbone method)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModellingHandle.all_atom_scorer">all_atom_scorer (promod3.modelling.ModellingHandle attribute)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.ApplyTransform">(promod3.loop.BackboneList method)</a>
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModellingHandle.all_atom_scorer_env">all_atom_scorer_env (promod3.modelling.ModellingHandle attribute)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser.AssembleParser">AssembleParser() (promod3.core.pm3argparse.PM3ArgumentParser method)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModellingHandle.all_atom_sidechain_env">all_atom_sidechain_env (promod3.modelling.ModellingHandle attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.AttachScorer">AttachScorer() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomEnvPositions.all_pos">all_pos (promod3.loop.AllAtomEnvPositions attribute)</a>
   </dt>
 
   </dl></td>
-</tr></table>
-
-<h2 id="B">B</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/backbone.html#promod3.loop.Backbone">Backbone (class in promod3.loop)</a>
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomClashScorer">AllAtomClashScorer (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.Backbone.Backbone">Backbone() (promod3.loop.Backbone method)</a>, <a href="loop/backbone.html#promod3.loop.Backbone.Backbone">[1]</a>, <a href="loop/backbone.html#promod3.loop.Backbone.Backbone">[2]</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomEnv">AllAtomEnv (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList">BackboneList (class in promod3.loop)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomEnvPositions">AllAtomEnvPositions (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.BackboneList">BackboneList() (promod3.loop.BackboneList method)</a>, <a href="loop/backbone.html#promod3.loop.BackboneList.BackboneList">[1]</a>, <a href="loop/backbone.html#promod3.loop.BackboneList.BackboneList">[2]</a>, <a href="loop/backbone.html#promod3.loop.BackboneList.BackboneList">[3]</a>
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomInteractionScorer">AllAtomInteractionScorer (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer">BackboneLoopScorer (class in promod3.loop)</a>
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomOverallScorer">AllAtomOverallScorer (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="loop/loop_closing.html#promod3.loop.BackboneRelaxer">BackboneRelaxer (class in promod3.loop)</a>
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomPackingScorer">AllAtomPackingScorer (class in promod3.scoring)</a>
   </dt>
 
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidate.bb_list">bb_list (promod3.loop.LoopCandidate attribute)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions">AllAtomPositions (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib">BBDepRotamerLib (class in promod3.sidechain)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.AllAtomPositions">AllAtomPositions() (promod3.loop.AllAtomPositions method)</a>, <a href="loop/all_atom.html#promod3.loop.AllAtomPositions.AllAtomPositions">[1]</a>, <a href="loop/all_atom.html#promod3.loop.AllAtomPositions.AllAtomPositions">[2]</a>, <a href="loop/all_atom.html#promod3.loop.AllAtomPositions.AllAtomPositions">[3]</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.before">before (promod3.modelling.StructuralGap attribute)</a>
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.AllAtomRelaxer">AllAtomRelaxer (class in promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.BuildFromRawModel">BuildFromRawModel() (in module promod3.modelling)</a>
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomScorer">AllAtomScorer (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.BuildRawModel">BuildRawModel() (in module promod3.modelling)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidAtom">AminoAcidAtom (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.BuildSidechains">BuildSidechains() (in module promod3.modelling)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidHydrogen">AminoAcidHydrogen (class in promod3.loop)</a>
   </dt>
 
-  </dl></td>
-</tr></table>
-
-<h2 id="C">C</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/backbone.html#promod3.loop.Backbone.c_coord">c_coord (promod3.loop.Backbone attribute)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup">AminoAcidLookup (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.Backbone.ca_coord">ca_coord (promod3.loop.Backbone attribute)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldHarmonicAngleInfo.angle">angle (promod3.loop.ForcefieldHarmonicAngleInfo attribute)</a>
   </dt>
 
+      <dd><dl>
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldHarmonicImproperInfo.angle">(promod3.loop.ForcefieldHarmonicImproperInfo attribute)</a>
+  </dt>
+
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldUreyBradleyAngleInfo.angle">(promod3.loop.ForcefieldUreyBradleyAngleInfo attribute)</a>
+  </dt>
+
+      </dl></dd>
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.CalculateBetaScores">CalculateBetaScores() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldUreyBradleyAngleInfo.angle_force_constant">angle_force_constant (promod3.loop.ForcefieldUreyBradleyAngleInfo attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.CalculateCBetaScore">CalculateCBetaScore() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="core/geometry.html#promod3.core.StemPairOrientation.angle_four">angle_four (promod3.core.StemPairOrientation attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.CalculateCBPackingScore">CalculateCBPackingScore() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="core/geometry.html#promod3.core.StemPairOrientation.angle_one">angle_one (promod3.core.StemPairOrientation attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.CalculateClashScore">CalculateClashScore() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="core/geometry.html#promod3.core.StemPairOrientation.angle_three">angle_three (promod3.core.StemPairOrientation attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.CalculateClashScores">CalculateClashScores() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="core/geometry.html#promod3.core.StemPairOrientation.angle_two">angle_two (promod3.core.StemPairOrientation attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.CalculateCombinedScores">CalculateCombinedScores() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.append">append() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.CalculateConstraintScore">CalculateConstraintScore() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.ApplyCCD">ApplyCCD() (promod3.modelling.LoopCandidates method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.CalculateContactScore">CalculateContactScore() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.ApplyDEE">ApplyDEE() (promod3.sidechain.RotamerGraph method)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.CalculateHBondcores">CalculateHBondcores() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.ApplyEdgeDecomposition">ApplyEdgeDecomposition() (promod3.sidechain.RotamerGraph method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.CalculateHBondScore">CalculateHBondScore() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.ApplyKIC">ApplyKIC() (promod3.modelling.LoopCandidates method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamerGroup.CalculateInternalEnergies">CalculateInternalEnergies() (promod3.sidechain.FRMRotamerGroup method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.ApplyOnResidue">ApplyOnResidue() (promod3.sidechain.FRMRotamer method)</a>, <a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.ApplyOnResidue">[1]</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamerGroup.CalculateInternalEnergies">(promod3.sidechain.RRMRotamerGroup method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamerGroup.ApplyOnResidue">(promod3.sidechain.FRMRotamerGroup method)</a>
   </dt>
 
-      </dl></dd>
-      
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.CalculateInternalEnergy">CalculateInternalEnergy() (promod3.sidechain.FRMRotamer method)</a>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.ApplyOnResidue">(promod3.sidechain.RRMRotamer method)</a>, <a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.ApplyOnResidue">[1]</a>
   </dt>
 
-      <dd><dl>
         
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.CalculateInternalEnergy">(promod3.sidechain.RRMRotamer method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamerGroup.ApplyOnResidue">(promod3.sidechain.RRMRotamerGroup method)</a>
   </dt>
 
       </dl></dd>
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.CalculatePackingScores">CalculatePackingScores() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.BackboneScoreEnv.ApplyPairwiseFunction">ApplyPairwiseFunction() (promod3.scoring.BackboneScoreEnv method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.CalculateReducedScore">CalculateReducedScore() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamerGroup.ApplySelfEnergyThresh">ApplySelfEnergyThresh() (promod3.sidechain.FRMRotamerGroup method)</a>
   </dt>
 
-      
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.CalculateReducedScores">CalculateReducedScores() (promod3.loop.LoopCandidates method)</a>
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamerGroup.ApplySelfEnergyThresh">(promod3.sidechain.RRMRotamerGroup method)</a>
   </dt>
 
+      </dl></dd>
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.CalculateSSAgreementScore">CalculateSSAgreementScore() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.ApplyTransform">ApplyTransform() (promod3.loop.BackboneList method)</a>, <a href="loop/backbone.html#promod3.loop.BackboneList.ApplyTransform">[1]</a>, <a href="loop/backbone.html#promod3.loop.BackboneList.ApplyTransform">[2]</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.CalculateSSAgreementScores">CalculateSSAgreementScores() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser.AssembleParser">AssembleParser() (promod3.core.pm3argparse.PM3ArgumentParser method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.CalculateTorsionScore">CalculateTorsionScore() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.AssignInternalEnergies">AssignInternalEnergies() (promod3.sidechain.SCWRLRotamerConstructor method)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.CalculateTorsionScores">CalculateTorsionScores() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.AStarSolve">AStarSolve() (promod3.sidechain.RotamerGraph method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.CARMSD">CARMSD() (promod3.loop.BackboneList method)</a>
+  <dt><a href="modelling/sidechain_reconstruction.html#promod3.modelling.SidechainReconstructor.AttachEnvironment">AttachEnvironment() (promod3.modelling.SidechainReconstructor method)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidate.CARMSD">(promod3.loop.LoopCandidate method)</a>
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomOverallScorer.AttachEnvironment">(promod3.scoring.AllAtomOverallScorer method)</a>
   </dt>
 
-      </dl></dd>
-      
-  <dt><a href="loop/backbone.html#promod3.loop.Backbone.cb_coord">cb_coord (promod3.loop.Backbone attribute)</a>
+        
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomScorer.AttachEnvironment">(promod3.scoring.AllAtomScorer method)</a>
   </dt>
 
-      
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidate.cbeta_score">cbeta_score (promod3.loop.LoopCandidate attribute)</a>
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer.AttachEnvironment">(promod3.scoring.BackboneOverallScorer method)</a>
   </dt>
 
-      
-  <dt><a href="loop/loop_closing.html#promod3.loop.CCD">CCD (class in promod3.loop)</a>
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.BackboneScorer.AttachEnvironment">(promod3.scoring.BackboneScorer method)</a>
   </dt>
 
+      </dl></dd>
+  </dl></td>
+</tr></table>
+
+<h2 id="B">B</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/loop_closing.html#promod3.loop.CCD.CCD">CCD() (promod3.loop.CCD method)</a>, <a href="loop/loop_closing.html#promod3.loop.CCD.CCD">[1]</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModellingHandle.backbone_scorer">backbone_scorer (promod3.modelling.ModellingHandle attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/monte_carlo.html#promod3.loop.CCDCloser">CCDCloser (class in promod3.loop)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModellingHandle.backbone_scorer_env">backbone_scorer_env (promod3.modelling.ModellingHandle attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FragmentInfo.chain_index">chain_index (promod3.loop.FragmentInfo attribute)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList">BackboneList (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.CheckFinalModel">CheckFinalModel() (in module promod3.modelling)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.BackboneList">BackboneList() (promod3.loop.BackboneList method)</a>, <a href="loop/backbone.html#promod3.loop.BackboneList.BackboneList">[1]</a>, <a href="loop/backbone.html#promod3.loop.BackboneList.BackboneList">[2]</a>, <a href="loop/backbone.html#promod3.loop.BackboneList.BackboneList">[3]</a>
   </dt>
 
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.chi1">chi1 (promod3.sidechain.RotamerLibEntry attribute)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer">BackboneOverallScorer (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.chi2">chi2 (promod3.sidechain.RotamerLibEntry attribute)</a>
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.BackboneRelaxer">BackboneRelaxer (class in promod3.modelling)</a>, <a href="modelling/loop_closing.html#promod3.modelling.BackboneRelaxer">[1]</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.chi3">chi3 (promod3.sidechain.RotamerLibEntry attribute)</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.BackboneScoreEnv">BackboneScoreEnv (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.chi4">chi4 (promod3.sidechain.RotamerLibEntry attribute)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.BackboneScorer">BackboneScorer (class in promod3.scoring)</a>
   </dt>
 
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidate.clash_score">clash_score (promod3.loop.LoopCandidate attribute)</a>
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib">BBDepRotamerLib (class in promod3.sidechain)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.ClearEnvironment">ClearEnvironment() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.before">before (promod3.modelling.StructuralGap attribute)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.ClearGaps">ClearGaps() (in module promod3.modelling)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldUreyBradleyAngleInfo.bond_force_constant">bond_force_constant (promod3.loop.ForcefieldUreyBradleyAngleInfo attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/loop_closing.html#promod3.loop.CCD.Close">Close() (promod3.loop.CCD method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldBondInfo.bond_length">bond_length (promod3.loop.ForcefieldBondInfo attribute)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="loop/monte_carlo.html#promod3.loop.CCDCloser.Close">(promod3.loop.CCDCloser method)</a>
-  </dt>
-
-        
-  <dt><a href="loop/monte_carlo.html#promod3.loop.DirtyCCDCloser.Close">(promod3.loop.DirtyCCDCloser method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldUreyBradleyAngleInfo.bond_length">(promod3.loop.ForcefieldUreyBradleyAngleInfo attribute)</a>
   </dt>
 
-        
-  <dt><a href="loop/loop_closing.html#promod3.loop.KIC.Close">(promod3.loop.KIC method)</a>
+      </dl></dd>
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.BuildFromRawModel">BuildFromRawModel() (in module promod3.modelling)</a>
   </dt>
 
-        
-  <dt><a href="loop/monte_carlo.html#promod3.loop.KICCloser.Close">(promod3.loop.KICCloser method)</a>
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.BuildRawModel">BuildRawModel() (in module promod3.modelling)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="modelling/index.html#promod3.modelling.CloseLargeDeletions">CloseLargeDeletions() (in module promod3.modelling)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.BuildSidechains">BuildSidechains() (in module promod3.modelling)</a>
   </dt>
 
+  </dl></td>
+</tr></table>
+
+<h2 id="C">C</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="modelling/index.html#promod3.modelling.CloseSmallDeletions">CloseSmallDeletions() (in module promod3.modelling)</a>
+  <dt><a href="core/geometry.html#promod3.core.StemCoords.c_coord">c_coord (promod3.core.StemCoords attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.ClusterCandidates">ClusterCandidates() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="core/geometry.html#promod3.core.StemCoords.ca_coord">ca_coord (promod3.core.StemCoords attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidate.combined_score">combined_score (promod3.loop.LoopCandidate attribute)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer.Calculate">Calculate() (promod3.scoring.BackboneOverallScorer method)</a>
   </dt>
 
       
-  <dt>
-    command
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.CalculateAllAtomScores">CalculateAllAtomScores() (promod3.modelling.LoopCandidates method)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="cmake/index.html#command:add_doc_dependency"><strong>add_doc_dependency</strong></a>
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.CalculateBackboneScores">CalculateBackboneScores() (promod3.modelling.LoopCandidates method)</a>
   </dt>
 
-        
-  <dt><a href="cmake/index.html#index-0-command:add_doc_source">add_doc_source</a>, <a href="cmake/index.html#index-1-command:add_doc_source">[1]</a>, <a href="cmake/index.html#command:add_doc_source"><strong>[2]</strong></a>
+      
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomOverallScorer.CalculateLinearCombination">CalculateLinearCombination() (promod3.scoring.AllAtomOverallScorer method)</a>
   </dt>
 
+      <dd><dl>
         
-  <dt><a href="cmake/index.html#command:convert_module_data"><strong>convert_module_data</strong></a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer.CalculateLinearCombination">(promod3.scoring.BackboneOverallScorer method)</a>
   </dt>
 
-        
-  <dt><a href="cmake/index.html#command:module"><strong>module</strong></a>
+      </dl></dd>
+      
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomScorer.CalculateScore">CalculateScore() (promod3.scoring.AllAtomScorer method)</a>
   </dt>
 
+      <dd><dl>
         
-  <dt><a href="contributing.html#index-0-command:pm_action">pm_action</a>, <a href="cmake/index.html#command:pm_action"><strong>[1]</strong></a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.BackboneScorer.CalculateScore">(promod3.scoring.BackboneScorer method)</a>
   </dt>
 
-        
-  <dt><a href="cmake/index.html#index-0-command:promod3_unittest">promod3_unittest</a>, <a href="cmake/index.html#index-1-command:promod3_unittest">[1]</a>, <a href="cmake/index.html#command:promod3_unittest"><strong>[2]</strong></a>
+      </dl></dd>
+      
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomScorer.CalculateScoreProfile">CalculateScoreProfile() (promod3.scoring.AllAtomScorer method)</a>
   </dt>
 
+      <dd><dl>
         
-  <dt><a href="cmake/index.html#command:pymod"><strong>pymod</strong></a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.BackboneScorer.CalculateScoreProfile">(promod3.scoring.BackboneScorer method)</a>
   </dt>
 
       </dl></dd>
       
-  <dt><a href="sidechain/frame.html#promod3.sidechain.ConstructBackboneFrameResidue">ConstructBackboneFrameResidue() (in module promod3.sidechain)</a>, <a href="sidechain/frame.html#promod3.sidechain.ConstructBackboneFrameResidue">[1]</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.CalculateSequenceProfileScores">CalculateSequenceProfileScores() (promod3.modelling.LoopCandidates method)</a>, <a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.CalculateSequenceProfileScores">[1]</a>
   </dt>
 
       
-  <dt><a href="sidechain/frame.html#promod3.sidechain.ConstructFrameResidue">ConstructFrameResidue() (in module promod3.sidechain)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.CalculateStemRMSDs">CalculateStemRMSDs() (promod3.modelling.LoopCandidates method)</a>, <a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.CalculateStemRMSDs">[1]</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.ConstructFRMRotamer">ConstructFRMRotamer() (in module promod3.sidechain)</a>, <a href="sidechain/rotamer.html#promod3.sidechain.ConstructFRMRotamer">[1]</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.CalculateStructureProfileScores">CalculateStructureProfileScores() (promod3.modelling.LoopCandidates method)</a>, <a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.CalculateStructureProfileScores">[1]</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.ConstructFRMRotamerGroup">ConstructFRMRotamerGroup() (in module promod3.sidechain)</a>, <a href="sidechain/rotamer.html#promod3.sidechain.ConstructFRMRotamerGroup">[1]</a>, <a href="sidechain/rotamer.html#promod3.sidechain.ConstructFRMRotamerGroup">[2]</a>, <a href="sidechain/rotamer.html#promod3.sidechain.ConstructFRMRotamerGroup">[3]</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.CARMSD">CARMSD() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.ConstructRRMRotamer">ConstructRRMRotamer() (in module promod3.sidechain)</a>, <a href="sidechain/rotamer.html#promod3.sidechain.ConstructRRMRotamer">[1]</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBetaScorer">CBetaScorer (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.ConstructRRMRotamerGroup">ConstructRRMRotamerGroup() (in module promod3.sidechain)</a>, <a href="sidechain/rotamer.html#promod3.sidechain.ConstructRRMRotamerGroup">[1]</a>, <a href="sidechain/rotamer.html#promod3.sidechain.ConstructRRMRotamerGroup">[2]</a>, <a href="sidechain/rotamer.html#promod3.sidechain.ConstructRRMRotamerGroup">[3]</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBPackingScorer">CBPackingScorer (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="sidechain/frame.html#promod3.sidechain.ConstructSidechainFrameResidue">ConstructSidechainFrameResidue() (in module promod3.sidechain)</a>
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.CCD">CCD (class in promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.Contains">Contains() (promod3.loop.FraggerMap method)</a>
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.CCD.CCD">CCD() (promod3.modelling.CCD method)</a>, <a href="modelling/loop_closing.html#promod3.modelling.CCD.CCD">[1]</a>
   </dt>
 
       
-  <dt>
-    convert_module_data
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.CCDCloser">CCDCloser (class in promod3.modelling)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="cmake/index.html#command:convert_module_data"><strong>command</strong></a>
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.FragmentInfo.chain_index">chain_index (promod3.loop.FragmentInfo attribute)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="loop/structure_db.html#promod3.loop.CoordInfo">CoordInfo (class in promod3.loop)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.CheckFinalModel">CheckFinalModel() (in module promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.Copy">Copy() (promod3.modelling.StructuralGap method)</a>
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.chi1">chi1 (promod3.sidechain.RotamerLibEntry attribute)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.CountEnclosedGaps">CountEnclosedGaps() (in module promod3.modelling)</a>
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.chi2">chi2 (promod3.sidechain.RotamerLibEntry attribute)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.CountEnclosedInsertions">CountEnclosedInsertions() (in module promod3.modelling)</a>
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.chi3">chi3 (promod3.sidechain.RotamerLibEntry attribute)</a>
   </dt>
 
       
-  <dt><a href="sidechain/graph.html#promod3.sidechain.Graph.CreateFromFRMList">CreateFromFRMList() (promod3.sidechain.Graph static method)</a>
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.chi4">chi4 (promod3.sidechain.RotamerLibEntry attribute)</a>
   </dt>
 
       
-  <dt><a href="sidechain/graph.html#promod3.sidechain.Graph.CreateFromRRMList">CreateFromRRMList() (promod3.sidechain.Graph static method)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.ClashScorer">ClashScorer (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="loop/monte_carlo.html#promod3.loop.CTerminalCloser">CTerminalCloser (class in promod3.loop)</a>
+  <dt><a href="core/runtime_profiling.html#promod3.core.StaticRuntimeProfiler.Clear">Clear() (promod3.core.StaticRuntimeProfiler static method)</a>
   </dt>
 
-  </dl></td>
-</tr></table>
-
-<h2 id="D">D</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/monte_carlo.html#promod3.loop.DirtyCCDCloser">DirtyCCDCloser (class in promod3.loop)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.clear">clear() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/disulfid.html#promod3.sidechain.DisulfidScore">DisulfidScore() (in module promod3.sidechain)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomEnv.ClearEnvironment">ClearEnvironment() (promod3.loop.AllAtomEnv method)</a>
   </dt>
 
-      
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.Draw">Draw() (promod3.loop.TorsionSampler method)</a>, <a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.Draw">[1]</a>
+      <dd><dl>
+        
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.BackboneScoreEnv.ClearEnvironment">(promod3.scoring.BackboneScoreEnv method)</a>
   </dt>
 
+      </dl></dd>
   </dl></td>
   <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.DrawPhiGivenPsi">DrawPhiGivenPsi() (promod3.loop.TorsionSampler method)</a>, <a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.DrawPhiGivenPsi">[1]</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.ClearGaps">ClearGaps() (in module promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.DrawPsiGivenPhi">DrawPsiGivenPhi() (promod3.loop.TorsionSampler method)</a>, <a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.DrawPsiGivenPhi">[1]</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.ClearPos">ClearPos() (promod3.loop.AllAtomPositions method)</a>
   </dt>
 
-  </dl></td>
-</tr></table>
-
-<h2 id="E">E</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/monte_carlo.html#promod3.loop.ExponentialCooler">ExponentialCooler (class in promod3.loop)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.ClearResidue">ClearResidue() (promod3.loop.AllAtomPositions method)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.FullGapExtender.Extend">Extend() (promod3.modelling.FullGapExtender method)</a>
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.CCD.Close">Close() (promod3.modelling.CCD method)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="modelling/index.html#promod3.modelling.GapExtender.Extend">(promod3.modelling.GapExtender method)</a>
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.CCDCloser.Close">(promod3.modelling.CCDCloser method)</a>
+  </dt>
+
+        
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.DirtyCCDCloser.Close">(promod3.modelling.DirtyCCDCloser method)</a>
   </dt>
 
         
-  <dt><a href="modelling/index.html#promod3.modelling.ScoringGapExtender.Extend">(promod3.modelling.ScoringGapExtender method)</a>
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.KIC.Close">(promod3.modelling.KIC method)</a>
   </dt>
 
         
-  <dt><a href="modelling/index.html#promod3.modelling.ShiftExtension.Extend">(promod3.modelling.ShiftExtension method)</a>
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.KICCloser.Close">(promod3.modelling.KICCloser method)</a>
   </dt>
 
       </dl></dd>
       
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.ExtendAtCTerm">ExtendAtCTerm() (promod3.modelling.StructuralGap method)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.CloseGaps">CloseGaps() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.CloseLargeDeletions">CloseLargeDeletions() (in module promod3.modelling)</a>
   </dt>
 
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.ExtendAtNTerm">ExtendAtNTerm() (promod3.modelling.StructuralGap method)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.CloseSmallDeletions">CloseSmallDeletions() (in module promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.Extract">Extract() (promod3.loop.BackboneList method)</a>
+  <dt>
+    command
   </dt>
 
       <dd><dl>
         
-  <dt><a href="loop/helper_classes.html#promod3.loop.PsipredPrediction.Extract">(promod3.loop.PsipredPrediction method)</a>
+  <dt><a href="cmake/index.html#command:add_doc_dependency"><strong>add_doc_dependency</strong></a>
   </dt>
 
-      </dl></dd>
-      
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.ExtractStatistics">ExtractStatistics() (promod3.loop.TorsionSampler method)</a>
+        
+  <dt><a href="cmake/index.html#index-0-command:add_doc_source">add_doc_source</a>, <a href="cmake/index.html#index-1-command:add_doc_source">[1]</a>, <a href="cmake/index.html#command:add_doc_source"><strong>[2]</strong></a>
   </dt>
 
-  </dl></td>
-</tr></table>
+        
+  <dt><a href="cmake/index.html#command:convert_module_data"><strong>convert_module_data</strong></a>
+  </dt>
 
-<h2 id="F">F</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%" valign="top"><dl>
-      
-  <dt><a href="core/helper.html#promod3.core.helper.FileExists">FileExists() (in module promod3.core.helper)</a>
+        
+  <dt><a href="cmake/index.html#command:module"><strong>module</strong></a>
   </dt>
 
-      
-  <dt><a href="core/helper.html#promod3.core.helper.FileExtension">FileExtension() (in module promod3.core.helper)</a>
+        
+  <dt><a href="contributing.html#index-0-command:pm_action">pm_action</a>, <a href="cmake/index.html#command:pm_action"><strong>[1]</strong></a>
   </dt>
 
-      
-  <dt><a href="core/helper.html#promod3.core.helper.FileGzip">FileGzip() (in module promod3.core.helper)</a>
+        
+  <dt><a href="cmake/index.html#index-0-command:promod3_unittest">promod3_unittest</a>, <a href="cmake/index.html#index-1-command:promod3_unittest">[1]</a>, <a href="cmake/index.html#command:promod3_unittest"><strong>[2]</strong></a>
   </dt>
 
-      
-  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.Fill">Fill() (promod3.loop.Fragger method)</a>
+        
+  <dt><a href="cmake/index.html#command:pymod"><strong>pymod</strong></a>
   </dt>
 
+      </dl></dd>
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.FillFromDatabase">FillFromDatabase() (promod3.loop.LoopCandidates static method)</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.ConstraintFunction">ConstraintFunction (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.FillFromMonteCarloSampler">FillFromMonteCarloSampler() (promod3.loop.LoopCandidates static method)</a>
+  <dt><a href="core/geometry.html#promod3.core.ConstructAtomPos">ConstructAtomPos() (in module promod3.core)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.FillLoopsByDatabase">FillLoopsByDatabase() (in module promod3.modelling)</a>
+  <dt><a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructBackboneFrameResidue">ConstructBackboneFrameResidue() (promod3.sidechain.SCWRLRotamerConstructor method)</a>, <a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructBackboneFrameResidue">[1]</a>, <a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructBackboneFrameResidue">[2]</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.FillLoopsByMonteCarlo">FillLoopsByMonteCarlo() (in module promod3.modelling)</a>
+  <dt><a href="core/geometry.html#promod3.core.ConstructCBetaPos">ConstructCBetaPos() (in module promod3.core)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.FilterCandidates">FilterCandidates() (in module promod3.modelling)</a>
+  <dt><a href="core/geometry.html#promod3.core.ConstructCTerminalOxygens">ConstructCTerminalOxygens() (in module promod3.core)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.FilterCandidatesWithSC">FilterCandidatesWithSC() (in module promod3.modelling)</a>
+  <dt><a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructFrameResidue">ConstructFrameResidue() (promod3.sidechain.SCWRLRotamerConstructor method)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FragDB">FragDB (class in promod3.loop)</a>
+  <dt><a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructFrameResidueHeuristic">ConstructFrameResidueHeuristic() (promod3.sidechain.SCWRLRotamerConstructor method)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.Fragger">Fragger (class in promod3.loop)</a>
+  <dt><a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructRRMRotamerGroup">ConstructRRMRotamerGroup() (promod3.sidechain.SCWRLRotamerConstructor method)</a>, <a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructRRMRotamerGroup">[1]</a>, <a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructRRMRotamerGroup">[2]</a>, <a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructRRMRotamerGroup">[3]</a>, <a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructRRMRotamerGroup">[4]</a>, <a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructRRMRotamerGroup">[5]</a>, <a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructRRMRotamerGroup">[6]</a>, <a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructRRMRotamerGroup">[7]</a>, <a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructRRMRotamerGroup">[8]</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FraggerHandle">FraggerHandle (class in promod3.loop)</a>
+  <dt><a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructSidechainFrameResidue">ConstructSidechainFrameResidue() (promod3.sidechain.SCWRLRotamerConstructor method)</a>, <a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor.ConstructSidechainFrameResidue">[1]</a>
   </dt>
 
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap">FraggerMap (class in promod3.loop)</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.ContactFunction">ContactFunction (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FragmentInfo">FragmentInfo (class in promod3.loop)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.Contains">Contains() (promod3.loop.FraggerMap method)</a>
   </dt>
 
-      
-  <dt><a href="loop/monte_carlo.html#promod3.loop.FragmentSampler">FragmentSampler (class in promod3.loop)</a>
+      <dd><dl>
+        
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoreContainer.Contains">(promod3.modelling.ScoreContainer method)</a>
   </dt>
 
-      
-  <dt><a href="sidechain/frame.html#promod3.sidechain.Frame">Frame (class in promod3.sidechain)</a>
+        
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomOverallScorer.Contains">(promod3.scoring.AllAtomOverallScorer method)</a>
   </dt>
 
-      
-  <dt><a href="sidechain/frame.html#promod3.sidechain.FrameResidue">FrameResidue (class in promod3.sidechain)</a>
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer.Contains">(promod3.scoring.BackboneOverallScorer method)</a>
   </dt>
 
+      </dl></dd>
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer">FRMRotamer (class in promod3.sidechain)</a>
+  <dt>
+    convert_module_data
   </dt>
 
-      
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamerGroup">FRMRotamerGroup (class in promod3.sidechain)</a>
+      <dd><dl>
+        
+  <dt><a href="cmake/index.html#command:convert_module_data"><strong>command</strong></a>
   </dt>
 
+      </dl></dd>
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.PsipredPrediction.FromHHM">FromHHM() (promod3.loop.PsipredPrediction method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.CoordInfo">CoordInfo (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.PsipredPrediction.FromHoriz">FromHoriz() (promod3.loop.PsipredPrediction method)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.Copy">Copy() (promod3.loop.AllAtomPositions method)</a>
   </dt>
 
-      
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.FromResidue">FromResidue() (promod3.sidechain.RotamerLibEntry static method)</a>, <a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.FromResidue">[1]</a>
+      <dd><dl>
+        
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.Copy">(promod3.loop.BackboneList method)</a>
   </dt>
 
-      
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.full_seq">full_seq (promod3.modelling.StructuralGap attribute)</a>
+        
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModellingHandle.Copy">(promod3.modelling.ModellingHandle method)</a>
   </dt>
 
-      
-  <dt><a href="modelling/index.html#promod3.modelling.FullGapExtender">FullGapExtender (class in promod3.modelling)</a>
+        
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoreContainer.Copy">(promod3.modelling.ScoreContainer method)</a>
   </dt>
 
-  </dl></td>
-</tr></table>
-
-<h2 id="G">G</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%" valign="top"><dl>
-      
-  <dt><a href="modelling/index.html#promod3.modelling.GapExtender">GapExtender (class in promod3.modelling)</a>
+        
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.Copy">(promod3.modelling.StructuralGap method)</a>
   </dt>
 
-      
-  <dt><a href="modelling/index.html#promod3.modelling.ModellingHandle.gaps">gaps (promod3.modelling.ModellingHandle attribute)</a>
+        
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.BackboneScoreEnv.Copy">(promod3.scoring.BackboneScoreEnv method)</a>
   </dt>
 
+      </dl></dd>
       
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GenerateStructureProfile">GenerateStructureProfile() (promod3.loop.StructureDB method)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.CountEnclosedGaps">CountEnclosedGaps() (in module promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FraggerHandle.Get">Get() (promod3.loop.FraggerHandle method)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.CountEnclosedInsertions">CountEnclosedInsertions() (in module promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.GetAngularBinSize">GetAngularBinSize() (promod3.loop.FragDB method)</a>
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.CreateFromFRMList">CreateFromFRMList() (promod3.sidechain.RotamerGraph static method)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.GetAVGCBetaScore">GetAVGCBetaScore() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.CreateFromRRMList">CreateFromRRMList() (promod3.sidechain.RotamerGraph static method)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.GetAVGClashScore">GetAVGClashScore() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.CTerminalCloser">CTerminalCloser (class in promod3.modelling)</a>
   </dt>
 
-      
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.GetAVGCombinedScore">GetAVGCombinedScore() (promod3.loop.LoopCandidates method)</a>
-  </dt>
+  </dl></td>
+</tr></table>
 
+<h2 id="D">D</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.GetAVGHBondscore">GetAVGHBondscore() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.DensityScorer">DensityScorer (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.GetAVGPackingScore">GetAVGPackingScore() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.DirtyCCDCloser">DirtyCCDCloser (class in promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.GetAVGReducedScore">GetAVGReducedScore() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.DiscoContainer">DiscoContainer (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.GetAVGSSAgreementscore">GetAVGSSAgreementscore() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.DiscoContainer.AddStructuralInfo">DiscoContainer.AddStructuralInfo() (in module promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.GetAVGTorsionScore">GetAVGTorsionScore() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.DiscoContainer.AttachConstraints">DiscoContainer.AttachConstraints() (in module promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetBackboneList">GetBackboneList() (promod3.loop.StructureDB method)</a>, <a href="loop/structure_db.html#promod3.loop.StructureDB.GetBackboneList">[1]</a>
+  <dt><a href="core/geometry.html#promod3.core.StemPairOrientation.distance">distance (promod3.core.StemPairOrientation attribute)</a>
   </dt>
 
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetBinSize">GetBinSize() (promod3.loop.TorsionSampler method)</a>
+  <dt><a href="modelling/sidechain_reconstruction.html#promod3.modelling.SidechainReconstructionData.disulfid_bridges">disulfid_bridges (promod3.modelling.SidechainReconstructionData attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetBinsPerDimension">GetBinsPerDimension() (promod3.loop.TorsionSampler method)</a>
+  <dt><a href="sidechain/disulfid.html#promod3.sidechain.DisulfidRawScore">DisulfidRawScore() (in module promod3.sidechain)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.GetChain">GetChain() (promod3.modelling.StructuralGap method)</a>
+  <dt><a href="sidechain/disulfid.html#promod3.sidechain.DisulfidScore">DisulfidScore() (in module promod3.sidechain)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.GetChainIndex">GetChainIndex() (promod3.modelling.StructuralGap method)</a>
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.Draw">Draw() (promod3.loop.TorsionSampler method)</a>, <a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.Draw">[1]</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.GetChainName">GetChainName() (promod3.modelling.StructuralGap method)</a>
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.DrawPhiGivenPsi">DrawPhiGivenPsi() (promod3.loop.TorsionSampler method)</a>, <a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.DrawPhiGivenPsi">[1]</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.GetCharge">GetCharge() (promod3.sidechain.Particle method)</a>
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.DrawPsiGivenPhi">DrawPsiGivenPhi() (promod3.loop.TorsionSampler method)</a>, <a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.DrawPsiGivenPhi">[1]</a>
   </dt>
 
+  </dl></td>
+</tr></table>
+
+<h2 id="E">E</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.PsipredPrediction.GetConfidence">GetConfidence() (promod3.loop.PsipredPrediction method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.empty">empty() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.PsipredPrediction.GetConfidences">GetConfidences() (promod3.loop.PsipredPrediction method)</a>
+  <dt><a href="modelling/sidechain_reconstruction.html#promod3.modelling.SidechainReconstructionData.env_pos">env_pos (promod3.modelling.SidechainReconstructionData attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetCoordIndex">GetCoordIndex() (promod3.loop.StructureDB method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLJPairInfo.epsilon">epsilon (promod3.loop.ForcefieldLJPairInfo attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetCoordInfo">GetCoordInfo() (promod3.loop.StructureDB method)</a>
+  <dt><a href="core/geometry.html#promod3.core.EvaluateGromacsPosRule">EvaluateGromacsPosRule() (in module promod3.core)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetDihedralAngles">GetDihedralAngles() (promod3.loop.StructureDB method)</a>
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.ExponentialCooler">ExponentialCooler (class in promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.GetDistBinSize">GetDistBinSize() (promod3.loop.FragDB method)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.FullGapExtender.Extend">Extend() (promod3.modelling.FullGapExtender method)</a>
   </dt>
 
-      
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetDSSPStates">GetDSSPStates() (promod3.loop.StructureDB method)</a>
+      <dd><dl>
+        
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.GapExtender.Extend">(promod3.modelling.GapExtender method)</a>
   </dt>
 
-      
-  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.GetFragmentInfo">GetFragmentInfo() (promod3.loop.Fragger method)</a>
+        
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoreContainer.Extend">(promod3.modelling.ScoreContainer method)</a>
   </dt>
 
-      
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetFrameEnergy">GetFrameEnergy() (promod3.sidechain.FRMRotamer method)</a>, <a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetFrameEnergy">[1]</a>
+        
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.ScoringGapExtender.Extend">(promod3.modelling.ScoringGapExtender method)</a>
   </dt>
 
-      <dd><dl>
         
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.GetFrameEnergy">(promod3.sidechain.RRMRotamer method)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.ShiftExtension.Extend">(promod3.modelling.ShiftExtension method)</a>
   </dt>
 
       </dl></dd>
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetHistogramIndex">GetHistogramIndex() (promod3.loop.TorsionSampler method)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.ExtendAtCTerm">ExtendAtCTerm() (promod3.modelling.StructuralGap method)</a>
   </dt>
 
       
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetHistogramIndices">GetHistogramIndices() (promod3.loop.TorsionSampler method)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.ExtendAtNTerm">ExtendAtNTerm() (promod3.modelling.StructuralGap method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetInternalEnergy">GetInternalEnergy() (promod3.sidechain.FRMRotamer method)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.Extract">Extract() (promod3.loop.AllAtomPositions method)</a>, <a href="loop/all_atom.html#promod3.loop.AllAtomPositions.Extract">[1]</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.GetInternalEnergy">(promod3.sidechain.RRMRotamer method)</a>
-  </dt>
-
-      </dl></dd>
-      
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetInternalEnergyPrefactor">GetInternalEnergyPrefactor() (promod3.sidechain.FRMRotamer method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.Extract">(promod3.loop.BackboneList method)</a>
   </dt>
 
-      <dd><dl>
         
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.GetInternalEnergyPrefactor">(promod3.sidechain.RRMRotamer method)</a>
-  </dt>
-
-      </dl></dd>
-      
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.GetLength">GetLength() (promod3.modelling.StructuralGap method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.PsipredPrediction.Extract">(promod3.loop.PsipredPrediction method)</a>
   </dt>
 
-      
-  <dt><a href="loop/structure_db.html#promod3.loop.FraggerHandle.GetList">GetList() (promod3.loop.FraggerHandle method)</a>
+        
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.Extract">(promod3.modelling.LoopCandidates method)</a>
   </dt>
 
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
-      
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.GetName">GetName() (promod3.sidechain.Particle method)</a>
+        
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoreContainer.Extract">(promod3.modelling.ScoreContainer method)</a>
   </dt>
 
+      </dl></dd>
       
-  <dt><a href="sidechain/graph.html#promod3.sidechain.Graph.GetNumActiveEdges">GetNumActiveEdges() (promod3.sidechain.Graph method)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.ExtractBackbone">ExtractBackbone() (promod3.loop.AllAtomPositions method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/graph.html#promod3.sidechain.Graph.GetNumActiveNodes">GetNumActiveNodes() (promod3.sidechain.Graph method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator.ExtractLoopPositions">ExtractLoopPositions() (promod3.loop.MmSystemCreator method)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetNumCoords">GetNumCoords() (promod3.loop.StructureDB method)</a>
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.ExtractStatistics">ExtractStatistics() (promod3.loop.TorsionSampler method)</a>
   </dt>
 
-      
-  <dt><a href="sidechain/graph.html#promod3.sidechain.Graph.GetNumEdges">GetNumEdges() (promod3.sidechain.Graph method)</a>
-  </dt>
+  </dl></td>
+</tr></table>
 
+<h2 id="F">F</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.GetNumFragments">GetNumFragments() (promod3.loop.FragDB method)</a>
+  <dt><a href="core/helper.html#promod3.core.helper.FileExists">FileExists() (in module promod3.core.helper)</a>
   </dt>
 
       
-  <dt><a href="sidechain/graph.html#promod3.sidechain.Graph.GetNumNodes">GetNumNodes() (promod3.sidechain.Graph method)</a>
+  <dt><a href="core/helper.html#promod3.core.helper.FileExtension">FileExtension() (in module promod3.core.helper)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.GetNumStemPairs">GetNumStemPairs() (promod3.loop.FragDB method)</a>
+  <dt><a href="core/helper.html#promod3.core.helper.FileGzip">FileGzip() (in module promod3.core.helper)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetNumSubrotamers">GetNumSubrotamers() (promod3.sidechain.FRMRotamer method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.Fill">Fill() (promod3.loop.Fragger method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetOmegaTorsion">GetOmegaTorsion() (promod3.loop.BackboneList method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.FillFromDatabase">FillFromDatabase() (promod3.modelling.LoopCandidates static method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.GetParticleType">GetParticleType() (promod3.sidechain.Particle method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.FillFromMonteCarloSampler">FillFromMonteCarloSampler() (promod3.modelling.LoopCandidates static method)</a>
   </dt>
 
       
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetPhiProbabilityGivenPsi">GetPhiProbabilityGivenPsi() (promod3.loop.TorsionSampler method)</a>, <a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetPhiProbabilityGivenPsi">[1]</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.FillLoopsByDatabase">FillLoopsByDatabase() (in module promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetPhiTorsion">GetPhiTorsion() (promod3.loop.BackboneList method)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.FillLoopsByMonteCarlo">FillLoopsByMonteCarlo() (in module promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.GetPos">GetPos() (promod3.sidechain.Particle method)</a>
+  <dt><a href="modelling/model_checking.html#promod3.modelling.FilterCandidates">FilterCandidates() (in module promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.PsipredPrediction.GetPrediction">GetPrediction() (promod3.loop.PsipredPrediction method)</a>
+  <dt><a href="modelling/model_checking.html#promod3.modelling.FilterCandidatesWithSC">FilterCandidatesWithSC() (in module promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.PsipredPrediction.GetPredictions">GetPredictions() (promod3.loop.PsipredPrediction method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldBondInfo.force_constant">force_constant (promod3.loop.ForcefieldBondInfo attribute)</a>
   </dt>
 
-      
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetProbability">GetProbability() (promod3.loop.TorsionSampler method)</a>, <a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetProbability">[1]</a>
+      <dd><dl>
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldHarmonicAngleInfo.force_constant">(promod3.loop.ForcefieldHarmonicAngleInfo attribute)</a>
   </dt>
 
-      <dd><dl>
         
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetProbability">(promod3.sidechain.FRMRotamer method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldHarmonicImproperInfo.force_constant">(promod3.loop.ForcefieldHarmonicImproperInfo attribute)</a>
   </dt>
 
         
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.GetProbability">(promod3.sidechain.RRMRotamer method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldPeriodicDihedralInfo.force_constant">(promod3.loop.ForcefieldPeriodicDihedralInfo attribute)</a>
   </dt>
 
       </dl></dd>
       
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetPsiProbabilityGivenPhi">GetPsiProbabilityGivenPhi() (promod3.loop.TorsionSampler method)</a>, <a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetPsiProbabilityGivenPhi">[1]</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldAminoAcid">ForcefieldAminoAcid (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetPsiTorsion">GetPsiTorsion() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldBondInfo">ForcefieldBondInfo (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetResidueDepths">GetResidueDepths() (promod3.loop.StructureDB method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldConnectivity">ForcefieldConnectivity (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.GetRingPunches">GetRingPunches() (in module promod3.modelling)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldHarmonicAngleInfo">ForcefieldHarmonicAngleInfo (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.GetRings">GetRings() (in module promod3.modelling)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldHarmonicImproperInfo">ForcefieldHarmonicImproperInfo (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.GetScore">GetScore() (promod3.loop.Fragger method)</a>, <a href="loop/structure_db.html#promod3.loop.Fragger.GetScore">[1]</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLJPairInfo">ForcefieldLJPairInfo (class in promod3.loop)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="loop/monte_carlo.html#promod3.loop.LinearScorer.GetScore">(promod3.loop.LinearScorer method)</a>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup">ForcefieldLookup (class in promod3.loop)</a>
   </dt>
 
-      </dl></dd>
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetSelfEnergy">GetSelfEnergy() (promod3.sidechain.FRMRotamer method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldPeriodicDihedralInfo">ForcefieldPeriodicDihedralInfo (class in promod3.loop)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.GetSelfEnergy">(promod3.sidechain.RRMRotamer method)</a>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldUreyBradleyAngleInfo">ForcefieldUreyBradleyAngleInfo (class in promod3.loop)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetSequence">GetSequence() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.FragDB">FragDB (class in promod3.loop)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetSequence">(promod3.loop.StructureDB method)</a>
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.Fragger">Fragger (class in promod3.loop)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetSequenceProfile">GetSequenceProfile() (promod3.loop.StructureDB method)</a>
+  <dt><a href="modelling/algorithms.html#promod3.modelling.FraggerHandle">FraggerHandle (class in promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetSolventAccessibilitites">GetSolventAccessibilitites() (promod3.loop.StructureDB method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap">FraggerMap (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetStructureProfile">GetStructureProfile() (promod3.loop.StructureDB method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.FragmentInfo">FragmentInfo (class in promod3.loop)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetSubrotamerAssociations">GetSubrotamerAssociations() (promod3.sidechain.FRMRotamer method)</a>
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.FragmentSampler">FragmentSampler (class in promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetSubrotamerDefinition">GetSubrotamerDefinition() (promod3.sidechain.FRMRotamer method)</a>
+  <dt><a href="sidechain/frame.html#promod3.sidechain.Frame">Frame (class in promod3.sidechain)</a>
   </dt>
 
       
-  <dt><a href="loop/monte_carlo.html#promod3.loop.ExponentialCooler.GetTemperature">GetTemperature() (promod3.loop.ExponentialCooler method)</a>
+  <dt><a href="sidechain/frame.html#promod3.sidechain.FrameResidue">FrameResidue (class in promod3.sidechain)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetTemperature">(promod3.sidechain.FRMRotamer method)</a>
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer">FRMRotamer (class in promod3.sidechain)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="loop/backbone.html#promod3.loop.Backbone.GetTransform">GetTransform() (promod3.loop.Backbone method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamerGroup">FRMRotamerGroup (class in promod3.sidechain)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetTransform">(promod3.loop.BackboneList method)</a>
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.PsipredPrediction.FromHHM">FromHHM() (promod3.loop.PsipredPrediction method)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetTransformedCopy">GetTransformedCopy() (promod3.sidechain.FRMRotamer method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.PsipredPrediction.FromHoriz">FromHoriz() (promod3.loop.PsipredPrediction method)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.GetTransformedCopy">(promod3.sidechain.RRMRotamer method)</a>
+      
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.FromResidue">FromResidue() (promod3.sidechain.RotamerLibEntry static method)</a>, <a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.FromResidue">[1]</a>
+  </dt>
+
+      
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.full_seq">full_seq (promod3.modelling.StructuralGap attribute)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="sidechain/graph.html#promod3.sidechain.Graph">Graph (class in promod3.sidechain)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.FullGapExtender">FullGapExtender (class in promod3.modelling)</a>
   </dt>
 
   </dl></td>
 </tr></table>
 
-<h2 id="H">H</h2>
+<h2 id="G">G</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.HasFragLength">HasFragLength() (promod3.loop.FragDB method)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.GapExtender">GapExtender (class in promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.HasRingPunches">HasRingPunches() (in module promod3.modelling)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModellingHandle.gaps">gaps (promod3.modelling.ModellingHandle attribute)</a>
   </dt>
 
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidate.hbond_score">hbond_score (promod3.loop.LoopCandidate attribute)</a>
+  <dt><a href="modelling/algorithms.html#promod3.modelling.GenerateDeNovoTrajectories">GenerateDeNovoTrajectories() (in module promod3.modelling)</a>
   </dt>
 
-  </dl></td>
-</tr></table>
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GenerateStructureProfile">GenerateStructureProfile() (promod3.loop.StructureDB method)</a>
+  </dt>
 
-<h2 id="I">I</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.Initialize">Initialize() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="modelling/algorithms.html#promod3.modelling.FraggerHandle.Get">Get() (promod3.modelling.FraggerHandle method)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="loop/monte_carlo.html#promod3.loop.FragmentSampler.Initialize">(promod3.loop.FragmentSampler method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoreContainer.Get">(promod3.modelling.ScoreContainer method)</a>
   </dt>
 
         
-  <dt><a href="loop/monte_carlo.html#promod3.loop.PhiPsiSampler.Initialize">(promod3.loop.PhiPsiSampler method)</a>
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomOverallScorer.Get">(promod3.scoring.AllAtomOverallScorer method)</a>
   </dt>
 
         
-  <dt><a href="loop/monte_carlo.html#promod3.loop.SoftSampler.Initialize">(promod3.loop.SoftSampler method)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer.Get">(promod3.scoring.BackboneOverallScorer method)</a>
   </dt>
 
       </dl></dd>
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.InsertInto">InsertInto() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.GetAA">GetAA() (promod3.loop.AllAtomPositions method)</a>
   </dt>
 
-      
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.IsCTerminal">IsCTerminal() (promod3.modelling.StructuralGap method)</a>
+      <dd><dl>
+        
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetAA">(promod3.loop.AminoAcidLookup static method)</a>
   </dt>
 
-      
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.IsHBondAcceptor">IsHBondAcceptor() (promod3.sidechain.Particle method)</a>
+        
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetAA">(promod3.loop.BackboneList method)</a>
   </dt>
 
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
-      
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.IsHBondDonor">IsHBondDonor() (promod3.sidechain.Particle method)</a>
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetAA">(promod3.loop.ForcefieldLookup method)</a>
   </dt>
 
+      </dl></dd>
       
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.IsNTerminal">IsNTerminal() (promod3.modelling.StructuralGap method)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetAAA">GetAAA() (promod3.loop.AminoAcidLookup static method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.IsSimilar">IsSimilar() (promod3.sidechain.RotamerLibEntry method)</a>, <a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.IsSimilar">[1]</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetAAH">GetAAH() (promod3.loop.AminoAcidLookup static method)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.IsTerminal">IsTerminal() (promod3.modelling.StructuralGap method)</a>
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.GetActiveEdges">GetActiveEdges() (promod3.sidechain.RotamerGraph method)</a>
   </dt>
 
-  </dl></td>
-</tr></table>
-
-<h2 id="K">K</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/loop_closing.html#promod3.loop.KIC">KIC (class in promod3.loop)</a>
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.GetActiveRotamers">GetActiveRotamers() (promod3.sidechain.RotamerGraph method)</a>
   </dt>
 
       
-  <dt><a href="loop/loop_closing.html#promod3.loop.KIC.KIC">KIC() (promod3.loop.KIC method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetActiveSubrotamer">GetActiveSubrotamer() (promod3.sidechain.FRMRotamer method)</a>
   </dt>
 
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/monte_carlo.html#promod3.loop.KICCloser">KICCloser (class in promod3.loop)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomEnv.GetAllAtomPositions">GetAllAtomPositions() (promod3.loop.AllAtomEnv method)</a>
   </dt>
 
-  </dl></td>
-</tr></table>
-
-<h2 id="L">L</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FragmentInfo.length">length (promod3.loop.FragmentInfo attribute)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.GetAllAtomScoringKeys">GetAllAtomScoringKeys() (promod3.modelling.ScoringWeights static method)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.length">(promod3.modelling.StructuralGap attribute)</a>
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.GetAllAtomWeights">GetAllAtomWeights() (promod3.modelling.ScoringWeights static method)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="loop/monte_carlo.html#promod3.loop.LinearScorer">LinearScorer (class in promod3.loop)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetAnchorAtomIndex">GetAnchorAtomIndex() (promod3.loop.AminoAcidLookup static method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.Load">Load() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.GetAngularBinSize">GetAngularBinSize() (promod3.loop.FragDB method)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.Load">(promod3.loop.FragDB method)</a>
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetAtomName">GetAtomName() (promod3.loop.AminoAcidLookup static method)</a>
   </dt>
 
-        
-  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.Load">(promod3.loop.FraggerMap method)</a>
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetAtomNameAmber">GetAtomNameAmber() (promod3.loop.AminoAcidLookup static method)</a>
   </dt>
 
-        
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.Load">(promod3.loop.StructureDB method)</a>
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetAtomNameCharmm">GetAtomNameCharmm() (promod3.loop.AminoAcidLookup static method)</a>
   </dt>
 
-        
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.Load">(promod3.loop.TorsionSampler method)</a>
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetBackboneList">GetBackboneList() (promod3.loop.StructureDB method)</a>
   </dt>
 
-        
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.Load">(promod3.sidechain.BBDepRotamerLib method)</a>
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.GetBackboneScoringKeys">GetBackboneScoringKeys() (promod3.modelling.ScoringWeights static method)</a>
   </dt>
 
-        
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.Load">(promod3.sidechain.RotamerLib method)</a>
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.GetBackboneWeights">GetBackboneWeights() (promod3.modelling.ScoringWeights static method)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="loop/load_loop_objects.html#promod3.loop.LoadBackboneLoopScorer">LoadBackboneLoopScorer() (in module promod3.loop)</a>
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetBinSize">GetBinSize() (promod3.loop.TorsionSampler method)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.LoadBB">LoadBB() (promod3.loop.FraggerMap method)</a>
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetBinsPerDimension">GetBinsPerDimension() (promod3.loop.TorsionSampler method)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FraggerHandle.LoadCached">LoadCached() (promod3.loop.FraggerHandle method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetBounds">GetBounds() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/loading.html#promod3.sidechain.LoadDunbrackLib">LoadDunbrackLib() (in module promod3.sidechain)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetC">GetC() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="loop/load_loop_objects.html#promod3.loop.LoadFragDB">LoadFragDB() (in module promod3.loop)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetCA">GetCA() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/loading.html#promod3.sidechain.LoadPenultimateLib">LoadPenultimateLib() (in module promod3.sidechain)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetCB">GetCB() (promod3.loop.BackboneList method)</a>
   </dt>
 
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.LoadPortable">LoadPortable() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.GetChain">GetChain() (promod3.modelling.StructuralGap method)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.LoadPortable">(promod3.loop.FragDB method)</a>
+      
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.GetChainIndex">GetChainIndex() (promod3.modelling.StructuralGap method)</a>
   </dt>
 
-        
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.LoadPortable">(promod3.loop.StructureDB method)</a>
+      
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.GetChainName">GetChainName() (promod3.modelling.StructuralGap method)</a>
   </dt>
 
-        
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.LoadPortable">(promod3.loop.TorsionSampler method)</a>
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.GetCharge">GetCharge() (promod3.sidechain.Particle method)</a>
   </dt>
 
-        
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.LoadPortable">(promod3.sidechain.BBDepRotamerLib method)</a>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetCharges">GetCharges() (promod3.loop.ForcefieldLookup method)</a>
   </dt>
 
-        
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.LoadPortable">(promod3.sidechain.RotamerLib method)</a>
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.GetClusteredCandidates">GetClusteredCandidates() (promod3.modelling.LoopCandidates method)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="loop/load_loop_objects.html#promod3.loop.LoadStructureDB">LoadStructureDB() (in module promod3.loop)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.GetClusters">GetClusters() (promod3.modelling.LoopCandidates method)</a>
   </dt>
 
       
-  <dt><a href="loop/load_loop_objects.html#promod3.loop.LoadTorsionSampler">LoadTorsionSampler() (in module promod3.loop)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.PsipredPrediction.GetConfidence">GetConfidence() (promod3.loop.PsipredPrediction method)</a>
   </dt>
 
       
-  <dt><a href="loop/load_loop_objects.html#promod3.loop.LoadTorsionSamplerCoil">LoadTorsionSamplerCoil() (in module promod3.loop)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.PsipredPrediction.GetConfidences">GetConfidences() (promod3.loop.PsipredPrediction method)</a>
   </dt>
 
       
-  <dt><a href="loop/load_loop_objects.html#promod3.loop.LoadTorsionSamplerExtended">LoadTorsionSamplerExtended() (in module promod3.loop)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetCoordIndex">GetCoordIndex() (promod3.loop.StructureDB method)</a>
   </dt>
 
       
-  <dt><a href="loop/load_loop_objects.html#promod3.loop.LoadTorsionSamplerHelical">LoadTorsionSamplerHelical() (in module promod3.loop)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetCoordInfo">GetCoordInfo() (promod3.loop.StructureDB method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator.GetCpuPlatformSupport">GetCpuPlatformSupport() (promod3.loop.MmSystemCreator method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetDefault">GetDefault() (promod3.loop.ForcefieldLookup static method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetDihedralAngles">GetDihedralAngles() (promod3.loop.StructureDB method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.GetDistBinSize">GetDistBinSize() (promod3.loop.FragDB method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator.GetDisulfidBridges">GetDisulfidBridges() (promod3.loop.MmSystemCreator method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetDisulfidConnectivity">GetDisulfidConnectivity() (promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetDSSPStates">GetDSSPStates() (promod3.loop.StructureDB method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.GetEdges">GetEdges() (promod3.sidechain.RotamerGraph method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetElement">GetElement() (promod3.loop.AminoAcidLookup static method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomEnv.GetEnvironment">GetEnvironment() (promod3.loop.AllAtomEnv method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetEpsilons">GetEpsilons() (promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.GetFirstIndex">GetFirstIndex() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator.GetForcefieldAminoAcids">GetForcefieldAminoAcids() (promod3.loop.MmSystemCreator method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.GetFragmentInfo">GetFragmentInfo() (promod3.loop.Fragger method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.GetFragmentInfo">(promod3.modelling.LoopCandidates method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetFrameEnergy">GetFrameEnergy() (promod3.sidechain.FRMRotamer method)</a>, <a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetFrameEnergy">[1]</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.GetFrameEnergy">(promod3.sidechain.RRMRotamer method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetFudgeLJ">GetFudgeLJ() (promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetFudgeQQ">GetFudgeQQ() (promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetH1Index">GetH1Index() (promod3.loop.AminoAcidLookup static method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetH2Index">GetH2Index() (promod3.loop.AminoAcidLookup static method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetH3Index">GetH3Index() (promod3.loop.AminoAcidLookup static method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetHeavyIndex">GetHeavyIndex() (promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetHistogramIndex">GetHistogramIndex() (promod3.loop.TorsionSampler method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetHistogramIndices">GetHistogramIndices() (promod3.loop.TorsionSampler method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetHNIndex">GetHNIndex() (promod3.loop.AminoAcidLookup static method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetHydrogenIndex">GetHydrogenIndex() (promod3.loop.AminoAcidLookup static method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetHydrogenIndex">(promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.GetIndex">GetIndex() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetIndex">(promod3.loop.AminoAcidLookup static method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator.GetIndexing">GetIndexing() (promod3.loop.MmSystemCreator method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetInternalConnectivity">GetInternalConnectivity() (promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetInternalEnergy">GetInternalEnergy() (promod3.sidechain.FRMRotamer method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.GetInternalEnergy">(promod3.sidechain.RRMRotamer method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetInternalEnergyPrefactor">GetInternalEnergyPrefactor() (promod3.sidechain.FRMRotamer method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.GetInternalEnergyPrefactor">(promod3.sidechain.RRMRotamer method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.GetLargestCluster">GetLargestCluster() (promod3.modelling.LoopCandidates method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.GetLastIndex">GetLastIndex() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.GetLength">GetLength() (promod3.modelling.StructuralGap method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/algorithms.html#promod3.modelling.FraggerHandle.GetList">GetList() (promod3.modelling.FraggerHandle method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator.GetLoopLengths">GetLoopLengths() (promod3.loop.MmSystemCreator method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator.GetLoopStartIndices">GetLoopStartIndices() (promod3.loop.MmSystemCreator method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetMasses">GetMasses() (promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetMaxNumAtoms">GetMaxNumAtoms() (promod3.loop.AminoAcidLookup static method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetMaxNumHydrogens">GetMaxNumHydrogens() (promod3.loop.AminoAcidLookup static method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetN">GetN() (promod3.loop.BackboneList method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.GetName">GetName() (promod3.sidechain.Particle method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.BackboneRelaxer.GetNonBondedCutoff">GetNonBondedCutoff() (promod3.modelling.BackboneRelaxer method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.GetNumActiveEdges">GetNumActiveEdges() (promod3.sidechain.RotamerGraph method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.GetNumActiveNodes">GetNumActiveNodes() (promod3.sidechain.RotamerGraph method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.GetNumActiveRotamers">GetNumActiveRotamers() (promod3.sidechain.RotamerGraph method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.GetNumAtoms">GetNumAtoms() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetNumAtoms">(promod3.loop.AminoAcidLookup static method)</a>
+  </dt>
+
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetNumAtoms">(promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoreContainer.GetNumCandidates">GetNumCandidates() (promod3.modelling.ScoreContainer method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetNumCoords">GetNumCoords() (promod3.loop.StructureDB method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.GetNumEdges">GetNumEdges() (promod3.sidechain.RotamerGraph method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.GetNumFragments">GetNumFragments() (promod3.loop.FragDB method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetNumHydrogens">GetNumHydrogens() (promod3.loop.AminoAcidLookup static method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator.GetNumLoopResidues">GetNumLoopResidues() (promod3.loop.MmSystemCreator method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.GetNumNodes">GetNumNodes() (promod3.sidechain.RotamerGraph method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.GetNumResidues">GetNumResidues() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator.GetNumResidues">(promod3.loop.MmSystemCreator method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.GetNumRotamers">GetNumRotamers() (promod3.sidechain.RotamerGraph method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.GetNumStemPairs">GetNumStemPairs() (promod3.loop.FragDB method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetNumSubrotamers">GetNumSubrotamers() (promod3.sidechain.FRMRotamer method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetO">GetO() (promod3.loop.BackboneList method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AminoAcidLookup.GetOLC">GetOLC() (promod3.loop.AminoAcidLookup static method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetOLC">(promod3.loop.BackboneList method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.GetOmegaTorsion">GetOmegaTorsion() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetOmegaTorsion">(promod3.loop.BackboneList method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetOXTIndex">GetOXTIndex() (promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.GetPairwiseEnergies">GetPairwiseEnergies() (promod3.sidechain.RotamerGraph method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.GetParticleType">GetParticleType() (promod3.sidechain.Particle method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetPeptideBoundConnectivity">GetPeptideBoundConnectivity() (promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetPhiProbabilityGivenPsi">GetPhiProbabilityGivenPsi() (promod3.loop.TorsionSampler method)</a>, <a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetPhiProbabilityGivenPsi">[1]</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.GetPhiTorsion">GetPhiTorsion() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetPhiTorsion">(promod3.loop.BackboneList method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.GetPos">GetPos() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.GetPos">(promod3.sidechain.Particle method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.PsipredPrediction.GetPrediction">GetPrediction() (promod3.loop.PsipredPrediction method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.PsipredPrediction.GetPredictions">GetPredictions() (promod3.loop.PsipredPrediction method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetProbability">GetProbability() (promod3.loop.TorsionSampler method)</a>, <a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetProbability">[1]</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetProbability">(promod3.sidechain.FRMRotamer method)</a>
+  </dt>
+
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.GetProbability">(promod3.sidechain.RRMRotamer method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetPsiProbabilityGivenPhi">GetPsiProbabilityGivenPhi() (promod3.loop.TorsionSampler method)</a>, <a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.GetPsiProbabilityGivenPhi">[1]</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.GetPsiTorsion">GetPsiTorsion() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetPsiTorsion">(promod3.loop.BackboneList method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetResidueDepths">GetResidueDepths() (promod3.loop.StructureDB method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/model_checking.html#promod3.modelling.GetRingPunches">GetRingPunches() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/model_checking.html#promod3.modelling.GetRings">GetRings() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.Fragger.GetScore">GetScore() (promod3.loop.Fragger method)</a>, <a href="loop/structure_db.html#promod3.loop.Fragger.GetScore">[1]</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.LinearScorer.GetScore">(promod3.modelling.LinearScorer method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.GetSelfEnergies">GetSelfEnergies() (promod3.sidechain.RotamerGraph method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetSelfEnergy">GetSelfEnergy() (promod3.sidechain.FRMRotamer method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.GetSelfEnergy">(promod3.sidechain.RRMRotamer method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomEnv.GetSeqres">GetSeqres() (promod3.loop.AllAtomEnv method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.BackboneScoreEnv.GetSeqres">(promod3.scoring.BackboneScoreEnv method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.GetSequence">GetSequence() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetSequence">(promod3.loop.BackboneList method)</a>
+  </dt>
+
+        
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetSequence">(promod3.loop.StructureDB method)</a>
+  </dt>
+
+        
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.GetSequence">(promod3.modelling.LoopCandidates method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetSequenceProfile">GetSequenceProfile() (promod3.loop.StructureDB method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.GetSequenceProfileScoresKey">GetSequenceProfileScoresKey() (promod3.modelling.ScoringWeights static method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.GetSigmas">GetSigmas() (promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator.GetSimulation">GetSimulation() (promod3.loop.MmSystemCreator method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetSolventAccessibilitites">GetSolventAccessibilitites() (promod3.loop.StructureDB method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.GetStemRMSDsKey">GetStemRMSDsKey() (promod3.modelling.ScoringWeights static method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetStructureProfile">GetStructureProfile() (promod3.loop.StructureDB method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.GetStructureProfileScoresKey">GetStructureProfileScoresKey() (promod3.modelling.ScoringWeights static method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.GetSubDB">GetSubDB() (promod3.loop.StructureDB method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetSubrotamerDefinition">GetSubrotamerDefinition() (promod3.sidechain.FRMRotamer method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.AllAtomRelaxer.GetSystemCreator">GetSystemCreator() (promod3.modelling.AllAtomRelaxer method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.ExponentialCooler.GetTemperature">GetTemperature() (promod3.modelling.ExponentialCooler method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.GetTemperature">(promod3.sidechain.FRMRotamer method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.GetTransform">GetTransform() (promod3.loop.BackboneList method)</a>, <a href="loop/backbone.html#promod3.loop.BackboneList.GetTransform">[1]</a>
+  </dt>
+
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.GetWeights">GetWeights() (promod3.modelling.ScoringWeights static method)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="H">H</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldConnectivity.harmonic_angles">harmonic_angles (promod3.loop.ForcefieldConnectivity attribute)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldConnectivity.harmonic_bonds">harmonic_bonds (promod3.loop.ForcefieldConnectivity attribute)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldConnectivity.harmonic_impropers">harmonic_impropers (promod3.loop.ForcefieldConnectivity attribute)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.HasFragLength">HasFragLength() (promod3.loop.FragDB method)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.HasFragmentInfos">HasFragmentInfos() (promod3.modelling.LoopCandidates method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/model_checking.html#promod3.modelling.HasRingPunches">HasRingPunches() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.HBondScorer">HBondScorer (class in promod3.scoring)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="I">I</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldHarmonicImproperInfo.index_four">index_four (promod3.loop.ForcefieldHarmonicImproperInfo attribute)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldPeriodicDihedralInfo.index_four">(promod3.loop.ForcefieldPeriodicDihedralInfo attribute)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldBondInfo.index_one">index_one (promod3.loop.ForcefieldBondInfo attribute)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldHarmonicAngleInfo.index_one">(promod3.loop.ForcefieldHarmonicAngleInfo attribute)</a>
+  </dt>
+
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldHarmonicImproperInfo.index_one">(promod3.loop.ForcefieldHarmonicImproperInfo attribute)</a>
+  </dt>
+
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLJPairInfo.index_one">(promod3.loop.ForcefieldLJPairInfo attribute)</a>
+  </dt>
+
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldPeriodicDihedralInfo.index_one">(promod3.loop.ForcefieldPeriodicDihedralInfo attribute)</a>
+  </dt>
+
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldUreyBradleyAngleInfo.index_one">(promod3.loop.ForcefieldUreyBradleyAngleInfo attribute)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldHarmonicAngleInfo.index_three">index_three (promod3.loop.ForcefieldHarmonicAngleInfo attribute)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldHarmonicImproperInfo.index_three">(promod3.loop.ForcefieldHarmonicImproperInfo attribute)</a>
+  </dt>
+
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldPeriodicDihedralInfo.index_three">(promod3.loop.ForcefieldPeriodicDihedralInfo attribute)</a>
+  </dt>
+
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldUreyBradleyAngleInfo.index_three">(promod3.loop.ForcefieldUreyBradleyAngleInfo attribute)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldBondInfo.index_two">index_two (promod3.loop.ForcefieldBondInfo attribute)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldHarmonicAngleInfo.index_two">(promod3.loop.ForcefieldHarmonicAngleInfo attribute)</a>
+  </dt>
+
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldHarmonicImproperInfo.index_two">(promod3.loop.ForcefieldHarmonicImproperInfo attribute)</a>
+  </dt>
+
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLJPairInfo.index_two">(promod3.loop.ForcefieldLJPairInfo attribute)</a>
+  </dt>
+
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldPeriodicDihedralInfo.index_two">(promod3.loop.ForcefieldPeriodicDihedralInfo attribute)</a>
+  </dt>
+
+        
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldUreyBradleyAngleInfo.index_two">(promod3.loop.ForcefieldUreyBradleyAngleInfo attribute)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.FragmentSampler.Initialize">Initialize() (promod3.modelling.FragmentSampler method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.PhiPsiSampler.Initialize">(promod3.modelling.PhiPsiSampler method)</a>
+  </dt>
+
+        
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.SoftSampler.Initialize">(promod3.modelling.SoftSampler method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.InsertInto">InsertInto() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.InsertInto">(promod3.loop.BackboneList method)</a>, <a href="loop/backbone.html#promod3.loop.BackboneList.InsertInto">[1]</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.InsertLoop">InsertLoop() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.InsertLoopClearGaps">InsertLoopClearGaps() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/sidechain_reconstruction.html#promod3.modelling.SidechainReconstructionData.is_c_ter">is_c_ter (promod3.modelling.SidechainReconstructionData attribute)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/sidechain_reconstruction.html#promod3.modelling.SidechainReconstructionData.is_n_ter">is_n_ter (promod3.modelling.SidechainReconstructionData attribute)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.IsAllAtomScoringSetUp">IsAllAtomScoringSetUp() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.IsAllSet">IsAllSet() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.IsAnySet">IsAnySet() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.IsBackboneScoringSetUp">IsBackboneScoringSetUp() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.IsCTerminal">IsCTerminal() (promod3.modelling.StructuralGap method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoreContainer.IsEmpty">IsEmpty() (promod3.modelling.ScoreContainer method)</a>
+  </dt>
+
+      
+  <dt><a href="core/runtime_profiling.html#promod3.core.StaticRuntimeProfiler.IsEnabled">IsEnabled() (promod3.core.StaticRuntimeProfiler static method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.IsHBondAcceptor">IsHBondAcceptor() (promod3.sidechain.Particle method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.IsHBondDonor">IsHBondDonor() (promod3.sidechain.Particle method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.IsNTerminal">IsNTerminal() (promod3.modelling.StructuralGap method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.IsSet">IsSet() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.IsSimilar">IsSimilar() (promod3.sidechain.RotamerLibEntry method)</a>, <a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.IsSimilar">[1]</a>
+  </dt>
+
+      
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.IsTerminal">IsTerminal() (promod3.modelling.StructuralGap method)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="K">K</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.KIC">KIC (class in promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.KIC.KIC">KIC() (promod3.modelling.KIC method)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.KICCloser">KICCloser (class in promod3.modelling)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="L">L</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.FragmentInfo.length">length (promod3.loop.FragmentInfo attribute)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.length">(promod3.modelling.StructuralGap attribute)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoreContainer.LinearCombine">LinearCombine() (promod3.modelling.ScoreContainer method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.LinearScorer">LinearScorer (class in promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldConnectivity.lj_pairs">lj_pairs (promod3.loop.ForcefieldConnectivity attribute)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.Load">Load() (promod3.loop.ForcefieldLookup static method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.Load">(promod3.loop.FragDB static method)</a>
+  </dt>
+
+        
+  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.Load">(promod3.loop.FraggerMap method)</a>
+  </dt>
+
+        
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.Load">(promod3.loop.StructureDB static method)</a>
+  </dt>
+
+        
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.Load">(promod3.loop.TorsionSampler static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomInteractionScorer.Load">(promod3.scoring.AllAtomInteractionScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomPackingScorer.Load">(promod3.scoring.AllAtomPackingScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBPackingScorer.Load">(promod3.scoring.CBPackingScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBetaScorer.Load">(promod3.scoring.CBetaScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.HBondScorer.Load">(promod3.scoring.HBondScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.ReducedScorer.Load">(promod3.scoring.ReducedScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.SSAgreementScorer.Load">(promod3.scoring.SSAgreementScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.TorsionScorer.Load">(promod3.scoring.TorsionScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.Load">(promod3.sidechain.BBDepRotamerLib static method)</a>
+  </dt>
+
+        
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.Load">(promod3.sidechain.RotamerLib static method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.LoadAllAtomInteractionScorer">LoadAllAtomInteractionScorer() (in module promod3.scoring)</a>
+  </dt>
+
+      
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.LoadAllAtomPackingScorer">LoadAllAtomPackingScorer() (in module promod3.scoring)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.LoadBB">LoadBB() (promod3.loop.FraggerMap method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/algorithms.html#promod3.modelling.FraggerHandle.LoadCached">LoadCached() (promod3.modelling.FraggerHandle method)</a>
+  </dt>
+
+      
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.LoadCBetaScorer">LoadCBetaScorer() (in module promod3.scoring)</a>
+  </dt>
+
+      
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.LoadCBPackingScorer">LoadCBPackingScorer() (in module promod3.scoring)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.LoadCHARMM">LoadCHARMM() (promod3.loop.ForcefieldLookup static method)</a>
+  </dt>
+
+      
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.LoadDefaultAllAtomOverallScorer">LoadDefaultAllAtomOverallScorer() (in module promod3.scoring)</a>
+  </dt>
+
+      
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.LoadDefaultBackboneOverallScorer">LoadDefaultBackboneOverallScorer() (in module promod3.scoring)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/loading.html#promod3.sidechain.LoadDunbrackLib">LoadDunbrackLib() (in module promod3.sidechain)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="loop/load_loop_objects.html#promod3.loop.LoadFragDB">LoadFragDB() (in module promod3.loop)</a>
+  </dt>
+
+      
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.LoadHBondScorer">LoadHBondScorer() (in module promod3.scoring)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/loading.html#promod3.sidechain.LoadPenultimateLib">LoadPenultimateLib() (in module promod3.sidechain)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.LoadPortable">LoadPortable() (promod3.loop.ForcefieldLookup static method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.LoadPortable">(promod3.loop.FragDB static method)</a>
+  </dt>
+
+        
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.LoadPortable">(promod3.loop.StructureDB static method)</a>
+  </dt>
+
+        
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.LoadPortable">(promod3.loop.TorsionSampler static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomInteractionScorer.LoadPortable">(promod3.scoring.AllAtomInteractionScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomPackingScorer.LoadPortable">(promod3.scoring.AllAtomPackingScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBPackingScorer.LoadPortable">(promod3.scoring.CBPackingScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBetaScorer.LoadPortable">(promod3.scoring.CBetaScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.HBondScorer.LoadPortable">(promod3.scoring.HBondScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.ReducedScorer.LoadPortable">(promod3.scoring.ReducedScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.SSAgreementScorer.LoadPortable">(promod3.scoring.SSAgreementScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.TorsionScorer.LoadPortable">(promod3.scoring.TorsionScorer static method)</a>
+  </dt>
+
+        
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.LoadPortable">(promod3.sidechain.BBDepRotamerLib static method)</a>
+  </dt>
+
+        
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.LoadPortable">(promod3.sidechain.RotamerLib static method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.LoadReducedScorer">LoadReducedScorer() (in module promod3.scoring)</a>
+  </dt>
+
+      
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.LoadSSAgreementScorer">LoadSSAgreementScorer() (in module promod3.scoring)</a>
+  </dt>
+
+      
+  <dt><a href="loop/load_loop_objects.html#promod3.loop.LoadStructureDB">LoadStructureDB() (in module promod3.loop)</a>
+  </dt>
+
+      
+  <dt><a href="loop/load_loop_objects.html#promod3.loop.LoadTorsionSampler">LoadTorsionSampler() (in module promod3.loop)</a>
+  </dt>
+
+      
+  <dt><a href="loop/load_loop_objects.html#promod3.loop.LoadTorsionSamplerCoil">LoadTorsionSamplerCoil() (in module promod3.loop)</a>
+  </dt>
+
+      
+  <dt><a href="loop/load_loop_objects.html#promod3.loop.LoadTorsionSamplerExtended">LoadTorsionSamplerExtended() (in module promod3.loop)</a>
+  </dt>
+
+      
+  <dt><a href="loop/load_loop_objects.html#promod3.loop.LoadTorsionSamplerHelical">LoadTorsionSamplerHelical() (in module promod3.loop)</a>
+  </dt>
+
+      
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.LoadTorsionScorer">LoadTorsionScorer() (in module promod3.scoring)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/sidechain_reconstruction.html#promod3.modelling.SidechainReconstructionData.loop_lengths">loop_lengths (promod3.modelling.SidechainReconstructionData attribute)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/sidechain_reconstruction.html#promod3.modelling.SidechainReconstructionData.loop_start_indices">loop_start_indices (promod3.modelling.SidechainReconstructionData attribute)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates">LoopCandidates (class in promod3.modelling)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="M">M</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="buildsystem.html#index-1">make check</a>
+  </dt>
+
+      
+  <dt><a href="buildsystem.html#index-4">make doc</a>
+  </dt>
+
+      
+  <dt><a href="buildsystem.html#index-5">make help</a>
+  </dt>
+
+      
+  <dt><a href="buildsystem.html#index-2">make html</a>
+  </dt>
+
+      
+  <dt><a href="buildsystem.html#index-3">make man</a>
+  </dt>
+
+      
+  <dt><a href="buildsystem.html#index-0">Make targets</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.MakeStatic">MakeStatic() (promod3.sidechain.BBDepRotamerLib method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.MakeStatic">(promod3.sidechain.RotamerLib method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.MaxFragLength">MaxFragLength() (promod3.loop.FragDB method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.MCSolve">MCSolve() (promod3.sidechain.RotamerGraph method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamerGroup.Merge">Merge() (promod3.sidechain.FRMRotamerGroup method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamerGroup.Merge">(promod3.sidechain.RRMRotamerGroup method)</a>
   </dt>
 
+      </dl></dd>
+      
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.MergeGaps">MergeGaps() (in module promod3.modelling)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.MergeGapsByDistance">MergeGapsByDistance() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.MergeMHandle">MergeMHandle() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.MinCADistance">MinCADistance() (promod3.loop.BackboneList method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.MinimizeModelEnergy">MinimizeModelEnergy() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator">MmSystemCreator (class in promod3.loop)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModellingHandle.model">model (promod3.modelling.ModellingHandle attribute)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModellingHandle">ModellingHandle (class in promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModelTermini">ModelTermini() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt>
+    module
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="cmake/index.html#command:module"><strong>command</strong></a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="core/helper.html#promod3.core.helper.MsgErrorAndExit">MsgErrorAndExit() (in module promod3.core.helper)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldPeriodicDihedralInfo.multiplicity">multiplicity (promod3.loop.ForcefieldPeriodicDihedralInfo attribute)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="N">N</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="core/geometry.html#promod3.core.StemCoords.n_coord">n_coord (promod3.core.StemCoords attribute)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.NTerminalCloser">NTerminalCloser (class in promod3.modelling)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="O">O</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidate">LoopCandidate (class in promod3.loop)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.CoordInfo.offset">offset (promod3.loop.CoordInfo attribute)</a>
   </dt>
 
-      
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates">LoopCandidates (class in promod3.loop)</a>
+      <dd><dl>
+        
+  <dt><a href="loop/structure_db.html#promod3.loop.FragmentInfo.offset">(promod3.loop.FragmentInfo attribute)</a>
   </dt>
 
+      </dl></dd>
   </dl></td>
 </tr></table>
 
-<h2 id="M">M</h2>
+<h2 id="P">P</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="buildsystem.html#index-1">make check</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.PairwiseEnergy">PairwiseEnergy() (promod3.sidechain.Particle method)</a>
   </dt>
 
       
-  <dt><a href="buildsystem.html#index-4">make doc</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.PairwiseFunction">PairwiseFunction (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="buildsystem.html#index-5">make help</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.PairwiseFunctionType">PairwiseFunctionType (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="buildsystem.html#index-2">make html</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.PairwiseScorer">PairwiseScorer (class in promod3.scoring)</a>
   </dt>
 
       
-  <dt><a href="buildsystem.html#index-3">make man</a>
+  <dt><a href="core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser.Parse">Parse() (promod3.core.pm3argparse.PM3ArgumentParser method)</a>
   </dt>
 
       
-  <dt><a href="buildsystem.html#index-0">Make targets</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle">Particle (class in promod3.sidechain)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.MakeStatic">MakeStatic() (promod3.sidechain.BBDepRotamerLib method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.CoordInfo.pdb_id">pdb_id (promod3.loop.CoordInfo attribute)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldConnectivity.periodic_dihedrals">periodic_dihedrals (promod3.loop.ForcefieldConnectivity attribute)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldConnectivity.periodic_impropers">periodic_impropers (promod3.loop.ForcefieldConnectivity attribute)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldPeriodicDihedralInfo.phase">phase (promod3.loop.ForcefieldPeriodicDihedralInfo attribute)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.PhiPsiSampler">PhiPsiSampler (class in promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser">PM3ArgumentParser (class in promod3.core.pm3argparse)</a>
+  </dt>
+
+      
+  <dt>
+    pm_action
   </dt>
 
       <dd><dl>
         
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.MakeStatic">(promod3.sidechain.RotamerLib method)</a>
+  <dt><a href="contributing.html#index-0-command:pm_action">command</a>, <a href="cmake/index.html#command:pm_action"><strong>[1]</strong></a>
   </dt>
 
       </dl></dd>
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.MaxFragLength">MaxFragLength() (promod3.loop.FragDB method)</a>
+  <dt><a href="actions/index_dev.html#test_actions.ActionTestCase.pm_action">pm_action (test_actions.ActionTestCase attribute)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamerGroup.Merge">Merge() (promod3.sidechain.FRMRotamerGroup method)</a>
+  <dt><a href="actions/index_dev.html#test_actions.ActionTestCase.pm_bin">pm_bin (test_actions.ActionTestCase attribute)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.PrintStatistics">PrintStatistics() (promod3.loop.FragDB method)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamerGroup.Merge">(promod3.sidechain.RRMRotamerGroup method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.PrintStatistics">(promod3.loop.StructureDB method)</a>
   </dt>
 
       </dl></dd>
+      
+  <dt><a href="core/runtime_profiling.html#promod3.core.StaticRuntimeProfiler.PrintSummary">PrintSummary() (promod3.core.StaticRuntimeProfiler static method)</a>
+  </dt>
+
   </dl></td>
   <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="modelling/index.html#promod3.modelling.MergeGaps">MergeGaps() (in module promod3.modelling)</a>
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.probability">probability (promod3.sidechain.RotamerLibEntry attribute)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.MergeGapsByDistance">MergeGapsByDistance() (in module promod3.modelling)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModellingHandle.profiles">profiles (promod3.modelling.ModellingHandle attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.MinCADistance">MinCADistance() (promod3.loop.BackboneList method)</a>
+  <dt><a href="core/index.html#module-promod3.core">promod3.core (module)</a>
+  </dt>
+
+      
+  <dt><a href="core/helper.html#module-promod3.core.helper">promod3.core.helper (module)</a>
+  </dt>
+
+      
+  <dt><a href="core/pm3argparse.html#module-promod3.core.pm3argparse">promod3.core.pm3argparse (module)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.MinimizeModelEnergy">MinimizeModelEnergy() (in module promod3.modelling)</a>
+  <dt><a href="loop/index.html#module-promod3.loop">promod3.loop (module)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.ModellingHandle.model">model (promod3.modelling.ModellingHandle attribute)</a>
+  <dt><a href="modelling/index.html#module-promod3.modelling">promod3.modelling (module)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.ModellingHandle">ModellingHandle (class in promod3.modelling)</a>
+  <dt><a href="scoring/index.html#module-promod3.scoring">promod3.scoring (module)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.ModelTermini">ModelTermini() (in module promod3.modelling)</a>
+  <dt><a href="sidechain/index.html#module-promod3.sidechain">promod3.sidechain (module)</a>
   </dt>
 
       
   <dt>
-    module
+    promod3_unittest
   </dt>
 
       <dd><dl>
         
-  <dt><a href="cmake/index.html#command:module"><strong>command</strong></a>
+  <dt><a href="cmake/index.html#index-0-command:promod3_unittest">command</a>, <a href="cmake/index.html#index-1-command:promod3_unittest">[1]</a>, <a href="cmake/index.html#command:promod3_unittest"><strong>[2]</strong></a>
   </dt>
 
       </dl></dd>
       
-  <dt><a href="core/helper.html#promod3.core.helper.MsgErrorAndExit">MsgErrorAndExit() (in module promod3.core.helper)</a>
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.FragmentSampler.ProposeStep">ProposeStep() (promod3.modelling.FragmentSampler method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.PhiPsiSampler.ProposeStep">(promod3.modelling.PhiPsiSampler method)</a>
+  </dt>
+
+        
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.SoftSampler.ProposeStep">(promod3.modelling.SoftSampler method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.Prune">Prune() (promod3.sidechain.RotamerGraph method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModellingHandle.psipred_predictions">psipred_predictions (promod3.modelling.ModellingHandle attribute)</a>
+  </dt>
+
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.PsipredPrediction">PsipredPrediction (class in promod3.loop)</a>
   </dt>
 
+      
+  <dt><a href="loop/structure_db.html#promod3.loop.PsipredPrediction.PsipredPrediction">PsipredPrediction() (promod3.loop.PsipredPrediction method)</a>, <a href="loop/structure_db.html#promod3.loop.PsipredPrediction.PsipredPrediction">[1]</a>
+  </dt>
+
+      
+  <dt>
+    pymod
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="cmake/index.html#command:pymod"><strong>command</strong></a>
+  </dt>
+
+      </dl></dd>
   </dl></td>
 </tr></table>
 
-<h2 id="N">N</h2>
+<h2 id="Q">Q</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/backbone.html#promod3.loop.Backbone.n_coord">n_coord (promod3.loop.Backbone attribute)</a>
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.QueryLib">QueryLib() (promod3.sidechain.BBDepRotamerLib method)</a>
   </dt>
 
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
-      
-  <dt><a href="loop/monte_carlo.html#promod3.loop.NTerminalCloser">NTerminalCloser (class in promod3.loop)</a>
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.QueryLib">(promod3.sidechain.RotamerLib method)</a>
   </dt>
 
+      </dl></dd>
   </dl></td>
 </tr></table>
 
-<h2 id="O">O</h2>
+<h2 id="R">R</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/backbone.html#promod3.loop.Backbone.o_coord">o_coord (promod3.loop.Backbone attribute)</a>
+  <dt><a href="sidechain/loading.html#promod3.sidechain.ReadDunbrackFile">ReadDunbrackFile() (in module promod3.sidechain)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.CoordInfo.offset">offset (promod3.loop.CoordInfo attribute)</a>
+  <dt><a href="modelling/sidechain_reconstruction.html#promod3.modelling.SidechainReconstructor.Reconstruct">Reconstruct() (promod3.modelling.SidechainReconstructor method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.ReconstructCBetaPositions">ReconstructCBetaPositions() (promod3.loop.BackboneList method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.ReconstructCStemOxygen">ReconstructCStemOxygen() (promod3.loop.BackboneList method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.ReconstructOxygenPositions">ReconstructOxygenPositions() (promod3.loop.BackboneList method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/sidechain_reconstruction.html#promod3.modelling.ReconstructSidechains">ReconstructSidechains() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.ReducedScorer">ReducedScorer (class in promod3.scoring)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.LoopCandidates.Remove">Remove() (promod3.modelling.LoopCandidates method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.RemoveTerminalGaps">RemoveTerminalGaps() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ReorderGaps">ReorderGaps() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.ReplaceFragment">ReplaceFragment() (promod3.loop.BackboneList method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/model_checking.html#promod3.modelling.ReportMolProbityScores">ReportMolProbityScores() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomEnvPositions.res_indices">res_indices (promod3.loop.AllAtomEnvPositions attribute)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.ExponentialCooler.Reset">Reset() (promod3.modelling.ExponentialCooler method)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="loop/structure_db.html#promod3.loop.FragmentInfo.offset">(promod3.loop.FragmentInfo attribute)</a>
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.Reset">(promod3.sidechain.RotamerGraph method)</a>
   </dt>
 
       </dl></dd>
+      
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.resize">resize() (promod3.loop.BackboneList method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/disulfid.html#promod3.sidechain.ResolveCysteins">ResolveCysteins() (in module promod3.sidechain)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/algorithms.html#promod3.modelling.RigidBlocks">RigidBlocks() (in module promod3.modelling)</a>, <a href="modelling/algorithms.html#promod3.modelling.RigidBlocks">[1]</a>, <a href="modelling/algorithms.html#promod3.modelling.RigidBlocks">[2]</a>
+  </dt>
+
+      
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.RMSD">RMSD() (promod3.loop.BackboneList method)</a>
+  </dt>
+
   </dl></td>
   <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/backbone.html#promod3.loop.Backbone.one_letter_code">one_letter_code (promod3.loop.Backbone attribute)</a>
+  <dt><a href="modelling/sidechain_reconstruction.html#promod3.modelling.SidechainReconstructionData.rotamer_res_indices">rotamer_res_indices (promod3.modelling.SidechainReconstructionData attribute)</a>
   </dt>
 
-  </dl></td>
-</tr></table>
+      
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph">RotamerGraph (class in promod3.sidechain)</a>
+  </dt>
 
-<h2 id="P">P</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidate.packing_score">packing_score (promod3.loop.LoopCandidate attribute)</a>
+  <dt><a href="sidechain/rotamer_id.html#promod3.sidechain.RotamerID">RotamerID (class in promod3.sidechain)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.PairwiseEnergy">PairwiseEnergy() (promod3.sidechain.Particle method)</a>
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib">RotamerLib (class in promod3.sidechain)</a>
   </dt>
 
       
-  <dt><a href="core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser.Parse">Parse() (promod3.core.pm3argparse.PM3ArgumentParser method)</a>
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry">RotamerLibEntry (class in promod3.sidechain)</a>, <a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry">[1]</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle">Particle (class in promod3.sidechain)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.RotateAroundOmegaTorsion">RotateAroundOmegaTorsion() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.CoordInfo.pdb_id">pdb_id (promod3.loop.CoordInfo attribute)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.RotateAroundPhiPsiTorsion">RotateAroundPhiPsiTorsion() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="loop/monte_carlo.html#promod3.loop.PhiPsiSampler">PhiPsiSampler (class in promod3.loop)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.RotateAroundPhiTorsion">RotateAroundPhiTorsion() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="core/pm3argparse.html#promod3.core.pm3argparse.PM3ArgumentParser">PM3ArgumentParser (class in promod3.core.pm3argparse)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.RotateAroundPsiTorsion">RotateAroundPsiTorsion() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt>
-    pm_action
+  <dt><a href="core/geometry.html#promod3.core.RotationAroundLine">RotationAroundLine() (in module promod3.core)</a>, <a href="core/geometry.html#promod3.core.RotationAroundLine">[1]</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer">RRMRotamer (class in promod3.sidechain)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamerGroup">RRMRotamerGroup (class in promod3.sidechain)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.AllAtomRelaxer.Run">Run() (promod3.modelling.AllAtomRelaxer method)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="contributing.html#index-0-command:pm_action">command</a>, <a href="cmake/index.html#command:pm_action"><strong>[1]</strong></a>
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.BackboneRelaxer.Run">(promod3.modelling.BackboneRelaxer method)</a>
   </dt>
 
       </dl></dd>
       
-  <dt><a href="actions/index_dev.html#test_actions.ActionTestCase.pm_action">pm_action (test_actions.ActionTestCase attribute)</a>
+  <dt><a href="actions/index_dev.html#test_actions.ActionTestCase.RunAction">RunAction() (test_actions.ActionTestCase method)</a>
   </dt>
 
       
-  <dt><a href="actions/index_dev.html#test_actions.ActionTestCase.pm_bin">pm_bin (test_actions.ActionTestCase attribute)</a>
+  <dt><a href="actions/index_dev.html#test_actions.ActionTestCase.RunExitStatusTest">RunExitStatusTest() (test_actions.ActionTestCase method)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/model_checking.html#promod3.modelling.RunMolProbity">RunMolProbity() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="modelling/model_checking.html#promod3.modelling.RunMolProbityEntity">RunMolProbityEntity() (in module promod3.modelling)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="S">S</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.SampleMonteCarlo">SampleMonteCarlo() (in module promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.Save">Save() (promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.Save">(promod3.loop.FragDB method)</a>
+  </dt>
+
+        
+  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.Save">(promod3.loop.FraggerMap method)</a>
+  </dt>
+
+        
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.Save">(promod3.loop.StructureDB method)</a>
+  </dt>
+
+        
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.Save">(promod3.loop.TorsionSampler method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomInteractionScorer.Save">(promod3.scoring.AllAtomInteractionScorer method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomPackingScorer.Save">(promod3.scoring.AllAtomPackingScorer method)</a>
+  </dt>
+
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBPackingScorer.Save">(promod3.scoring.CBPackingScorer method)</a>
   </dt>
 
-      
-  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.PrintStatistics">PrintStatistics() (promod3.loop.FragDB method)</a>
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBetaScorer.Save">(promod3.scoring.CBetaScorer method)</a>
   </dt>
 
-      <dd><dl>
         
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.PrintStatistics">(promod3.loop.StructureDB method)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.HBondScorer.Save">(promod3.scoring.HBondScorer method)</a>
   </dt>
 
-      </dl></dd>
-      
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.probability">probability (promod3.sidechain.RotamerLibEntry attribute)</a>
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.ReducedScorer.Save">(promod3.scoring.ReducedScorer method)</a>
   </dt>
 
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
-      
-  <dt><a href="core/index.html#module-promod3.core">promod3.core (module)</a>
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.SSAgreementScorer.Save">(promod3.scoring.SSAgreementScorer method)</a>
   </dt>
 
-      
-  <dt><a href="core/helper.html#module-promod3.core.helper">promod3.core.helper (module)</a>
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.TorsionScorer.Save">(promod3.scoring.TorsionScorer method)</a>
   </dt>
 
-      
-  <dt><a href="core/pm3argparse.html#module-promod3.core.pm3argparse">promod3.core.pm3argparse (module)</a>
+        
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.Save">(promod3.sidechain.BBDepRotamerLib method)</a>
   </dt>
 
-      
-  <dt><a href="loop/index.html#module-promod3.loop">promod3.loop (module)</a>
+        
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.Save">(promod3.sidechain.RotamerLib method)</a>
   </dt>
 
+      </dl></dd>
       
-  <dt><a href="modelling/index.html#module-promod3.modelling">promod3.modelling (module)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.SaveBB">SaveBB() (promod3.loop.FraggerMap method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/index.html#module-promod3.sidechain">promod3.sidechain (module)</a>
+  <dt><a href="modelling/algorithms.html#promod3.modelling.FraggerHandle.SaveCached">SaveCached() (promod3.modelling.FraggerHandle method)</a>
   </dt>
 
       
-  <dt>
-    promod3_unittest
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.SavePortable">SavePortable() (promod3.loop.ForcefieldLookup method)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="cmake/index.html#index-0-command:promod3_unittest">command</a>, <a href="cmake/index.html#index-1-command:promod3_unittest">[1]</a>, <a href="cmake/index.html#command:promod3_unittest"><strong>[2]</strong></a>
+  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.SavePortable">(promod3.loop.FragDB method)</a>
   </dt>
 
-      </dl></dd>
-      
-  <dt><a href="loop/monte_carlo.html#promod3.loop.FragmentSampler.ProposeStep">ProposeStep() (promod3.loop.FragmentSampler method)</a>
+        
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.SavePortable">(promod3.loop.StructureDB method)</a>
   </dt>
 
-      <dd><dl>
         
-  <dt><a href="loop/monte_carlo.html#promod3.loop.PhiPsiSampler.ProposeStep">(promod3.loop.PhiPsiSampler method)</a>
+  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.SavePortable">(promod3.loop.TorsionSampler method)</a>
   </dt>
 
         
-  <dt><a href="loop/monte_carlo.html#promod3.loop.SoftSampler.ProposeStep">(promod3.loop.SoftSampler method)</a>
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomInteractionScorer.SavePortable">(promod3.scoring.AllAtomInteractionScorer method)</a>
   </dt>
 
-      </dl></dd>
-      
-  <dt><a href="sidechain/graph.html#promod3.sidechain.Graph.Prune">Prune() (promod3.sidechain.Graph method)</a>
+        
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomPackingScorer.SavePortable">(promod3.scoring.AllAtomPackingScorer method)</a>
   </dt>
 
-      
-  <dt><a href="loop/helper_classes.html#promod3.loop.PsipredPrediction">PsipredPrediction (class in promod3.loop)</a>
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBPackingScorer.SavePortable">(promod3.scoring.CBPackingScorer method)</a>
   </dt>
 
-      
-  <dt><a href="loop/helper_classes.html#promod3.loop.PsipredPrediction.PsipredPrediction">PsipredPrediction() (promod3.loop.PsipredPrediction method)</a>, <a href="loop/helper_classes.html#promod3.loop.PsipredPrediction.PsipredPrediction">[1]</a>
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBetaScorer.SavePortable">(promod3.scoring.CBetaScorer method)</a>
   </dt>
 
-      
-  <dt>
-    pymod
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.HBondScorer.SavePortable">(promod3.scoring.HBondScorer method)</a>
   </dt>
 
-      <dd><dl>
         
-  <dt><a href="cmake/index.html#command:pymod"><strong>command</strong></a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.ReducedScorer.SavePortable">(promod3.scoring.ReducedScorer method)</a>
   </dt>
 
-      </dl></dd>
-  </dl></td>
-</tr></table>
-
-<h2 id="Q">Q</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%" valign="top"><dl>
-      
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.QueryLib">QueryLib() (promod3.sidechain.BBDepRotamerLib method)</a>
+        
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.SSAgreementScorer.SavePortable">(promod3.scoring.SSAgreementScorer method)</a>
   </dt>
 
-      <dd><dl>
         
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.QueryLib">(promod3.sidechain.RotamerLib method)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.TorsionScorer.SavePortable">(promod3.scoring.TorsionScorer method)</a>
   </dt>
 
-      </dl></dd>
-  </dl></td>
-</tr></table>
+        
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.SavePortable">(promod3.sidechain.BBDepRotamerLib method)</a>
+  </dt>
 
-<h2 id="R">R</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%" valign="top"><dl>
-      
-  <dt><a href="sidechain/loading.html#promod3.sidechain.ReadDunbrackFile">ReadDunbrackFile() (in module promod3.sidechain)</a>
+        
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.SavePortable">(promod3.sidechain.RotamerLib method)</a>
   </dt>
 
+      </dl></dd>
       
-  <dt><a href="sidechain/index.html#promod3.sidechain.Reconstruct">Reconstruct() (in module promod3.sidechain)</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.PairwiseFunction.Score">Score() (promod3.scoring.PairwiseFunction method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.ReconstructCBetaPositions">ReconstructCBetaPositions() (promod3.loop.BackboneList method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoreContainer">ScoreContainer (class in promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.ReconstructOxygenPositions">ReconstructOxygenPositions() (promod3.loop.BackboneList method)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.ScoringGapExtender">ScoringGapExtender (class in promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidate.reduced_score">reduced_score (promod3.loop.LoopCandidate attribute)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights">ScoringWeights (class in promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidates.Remove">Remove() (promod3.loop.LoopCandidates method)</a>
+  <dt><a href="sidechain/rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor">SCWRLRotamerConstructor (class in promod3.sidechain)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.RemoveTerminalGaps">RemoveTerminalGaps() (in module promod3.modelling)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.SearchDB">SearchDB() (promod3.loop.FragDB method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.ReplaceFragment">ReplaceFragment() (promod3.loop.BackboneList method)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.seq">seq (promod3.modelling.StructuralGap attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/monte_carlo.html#promod3.loop.ExponentialCooler.Reset">Reset() (promod3.loop.ExponentialCooler method)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModellingHandle.seqres">seqres (promod3.modelling.ModellingHandle attribute)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.RMSD">RMSD() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.Set">Set() (promod3.loop.BackboneList method)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidate.RMSD">(promod3.loop.LoopCandidate method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoreContainer.Set">(promod3.modelling.ScoreContainer method)</a>
   </dt>
 
       </dl></dd>
       
-  <dt><a href="sidechain/rotamer_id.html#promod3.sidechain.RotamerID">RotamerID (class in promod3.sidechain)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetAA">SetAA() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib">RotamerLib (class in promod3.sidechain)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.SetActiveSubrotamer">SetActiveSubrotamer() (promod3.sidechain.FRMRotamer method)</a>
   </dt>
 
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry">RotamerLibEntry (class in promod3.sidechain)</a>, <a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry">[1]</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.SetAllAtomScoringKeys">SetAllAtomScoringKeys() (promod3.modelling.ScoringWeights static method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/sidechain_settings.html#promod3.sidechain.RotamerSettings">RotamerSettings (class in promod3.sidechain)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetAroundOmegaTorsion">SetAroundOmegaTorsion() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.RotateAroundOmegaTorsion">RotateAroundOmegaTorsion() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetAroundPhiPsiTorsion">SetAroundPhiPsiTorsion() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.RotateAroundPhiPsiTorsion">RotateAroundPhiPsiTorsion() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetAroundPhiTorsion">SetAroundPhiTorsion() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.RotateAroundPhiTorsion">RotateAroundPhiTorsion() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetAroundPsiTorsion">SetAroundPsiTorsion() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.RotateAroundPsiTorsion">RotateAroundPsiTorsion() (promod3.loop.BackboneList method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.SetBackboneScoringKeys">SetBackboneScoringKeys() (promod3.modelling.ScoringWeights static method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer">RRMRotamer (class in promod3.sidechain)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetBackrub">SetBackrub() (promod3.loop.BackboneList method)</a>, <a href="loop/backbone.html#promod3.loop.BackboneList.SetBackrub">[1]</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamerGroup">RRMRotamerGroup (class in promod3.sidechain)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetC">SetC() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="loop/loop_closing.html#promod3.loop.BackboneRelaxer.Run">Run() (promod3.loop.BackboneRelaxer method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetCA">SetCA() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="actions/index_dev.html#test_actions.ActionTestCase.RunAction">RunAction() (test_actions.ActionTestCase method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetCB">SetCB() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="actions/index_dev.html#test_actions.ActionTestCase.RunExitStatusTest">RunExitStatusTest() (test_actions.ActionTestCase method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.SetCharges">SetCharges() (promod3.loop.ForcefieldLookup method)</a>
   </dt>
 
-  </dl></td>
-</tr></table>
+      
+  <dt><a href="core/setcompoundschemlib.html#promod3.SetCompoundsChemlib">SetCompoundsChemlib() (in module promod3)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator.SetCpuPlatformSupport">SetCpuPlatformSupport() (promod3.loop.MmSystemCreator method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.SetDefault">SetDefault() (promod3.loop.ForcefieldLookup static method)</a>
+  </dt>
 
-<h2 id="S">S</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/monte_carlo.html#promod3.loop.SampleMonteCarlo">SampleMonteCarlo() (in module promod3.loop)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.SetDisulfidConnectivity">SetDisulfidConnectivity() (promod3.loop.ForcefieldLookup method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.Save">Save() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomInteractionScorer.SetEnergy">SetEnergy() (promod3.scoring.AllAtomInteractionScorer method)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.Save">(promod3.loop.FragDB method)</a>
+  <dt><a href="scoring/all_atom_scorers.html#promod3.scoring.AllAtomPackingScorer.SetEnergy">(promod3.scoring.AllAtomPackingScorer method)</a>
   </dt>
 
         
-  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.Save">(promod3.loop.FraggerMap method)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBPackingScorer.SetEnergy">(promod3.scoring.CBPackingScorer method)</a>
   </dt>
 
         
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.Save">(promod3.loop.StructureDB method)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBetaScorer.SetEnergy">(promod3.scoring.CBetaScorer method)</a>
   </dt>
 
         
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.Save">(promod3.loop.TorsionSampler method)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.HBondScorer.SetEnergy">(promod3.scoring.HBondScorer method)</a>
   </dt>
 
         
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.Save">(promod3.sidechain.BBDepRotamerLib method)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.ReducedScorer.SetEnergy">(promod3.scoring.ReducedScorer method)</a>
   </dt>
 
         
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.Save">(promod3.sidechain.RotamerLib method)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.TorsionScorer.SetEnergy">(promod3.scoring.TorsionScorer method)</a>
   </dt>
 
       </dl></dd>
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FraggerMap.SaveBB">SaveBB() (promod3.loop.FraggerMap method)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomEnv.SetEnvironment">SetEnvironment() (promod3.loop.AllAtomEnv method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.BackboneScoreEnv.SetEnvironment">(promod3.scoring.BackboneScoreEnv method)</a>
   </dt>
 
+      </dl></dd>
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FraggerHandle.SaveCached">SaveCached() (promod3.loop.FraggerHandle method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.SetEpsilons">SetEpsilons() (promod3.loop.ForcefieldLookup method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SavePortable">SavePortable() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.SetFrameEnergy">SetFrameEnergy() (promod3.sidechain.FRMRotamer method)</a>, <a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.SetFrameEnergy">[1]</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.SavePortable">(promod3.loop.FragDB method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamerGroup.SetFrameEnergy">(promod3.sidechain.FRMRotamerGroup method)</a>
   </dt>
 
         
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.SavePortable">(promod3.loop.StructureDB method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.SetFrameEnergy">(promod3.sidechain.RRMRotamer method)</a>
   </dt>
 
         
-  <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.SavePortable">(promod3.loop.TorsionSampler method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamerGroup.SetFrameEnergy">(promod3.sidechain.RRMRotamerGroup method)</a>
   </dt>
 
-        
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.SavePortable">(promod3.sidechain.BBDepRotamerLib method)</a>
+      </dl></dd>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.SetFudgeLJ">SetFudgeLJ() (promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.SetFudgeQQ">SetFudgeQQ() (promod3.loop.ForcefieldLookup method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomEnv.SetInitialEnvironment">SetInitialEnvironment() (promod3.loop.AllAtomEnv method)</a>
   </dt>
 
+      <dd><dl>
         
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib.SavePortable">(promod3.sidechain.RotamerLib method)</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.BackboneScoreEnv.SetInitialEnvironment">(promod3.scoring.BackboneScoreEnv method)</a>
   </dt>
 
       </dl></dd>
       
-  <dt><a href="modelling/index.html#promod3.modelling.ScoringGapExtender">ScoringGapExtender (class in promod3.modelling)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.SetInternalConnectivity">SetInternalConnectivity() (promod3.loop.ForcefieldLookup method)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.FragDB.SearchDB">SearchDB() (promod3.loop.FragDB method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.SetInternalEnergy">SetInternalEnergy() (promod3.sidechain.FRMRotamer method)</a>
   </dt>
 
-      
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.seq">seq (promod3.modelling.StructuralGap attribute)</a>
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.SetInternalEnergy">(promod3.sidechain.RRMRotamer method)</a>
   </dt>
 
+      </dl></dd>
       
-  <dt><a href="modelling/index.html#promod3.modelling.ModellingHandle.seqres">seqres (promod3.modelling.ModellingHandle attribute)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.SetInternalEnergyPrefactor">SetInternalEnergyPrefactor() (promod3.sidechain.FRMRotamer method)</a>
   </dt>
 
-      
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetCBetaEnergy">SetCBetaEnergy() (promod3.loop.BackboneLoopScorer method)</a>
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.SetInternalEnergyPrefactor">(promod3.sidechain.RRMRotamer method)</a>
   </dt>
 
+      </dl></dd>
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetCBetaPotentialParameters">SetCBetaPotentialParameters() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.SetInterpolate">SetInterpolate() (promod3.sidechain.BBDepRotamerLib method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetCBPackingEnergy">SetCBPackingEnergy() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.BackboneScoreEnv.SetMap">SetMap() (promod3.scoring.BackboneScoreEnv method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetCBPackingPotentialParameters">SetCBPackingPotentialParameters() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.SetMasses">SetMasses() (promod3.loop.ForcefieldLookup method)</a>
   </dt>
 
       
-  <dt><a href="core/setcompoundschemlib.html#promod3.SetCompoundsChemlib">SetCompoundsChemlib() (in module promod3)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetN">SetN() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetEnvironment">SetEnvironment() (promod3.loop.BackboneLoopScorer method)</a>, <a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetEnvironment">[1]</a>
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.BackboneRelaxer.SetNonBondedCutoff">SetNonBondedCutoff() (promod3.modelling.BackboneRelaxer method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/frame.html#promod3.sidechain.Frame.SetFrameEnergy">SetFrameEnergy() (promod3.sidechain.Frame method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetO">SetO() (promod3.loop.BackboneList method)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.SetFrameEnergy">(promod3.sidechain.FRMRotamer method)</a>, <a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.SetFrameEnergy">[1]</a>
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetOLC">SetOLC() (promod3.loop.BackboneList method)</a>
   </dt>
 
-        
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.SetFrameEnergy">(promod3.sidechain.RRMRotamer method)</a>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.SetPeptideBoundConnectivity">SetPeptideBoundConnectivity() (promod3.loop.ForcefieldLookup method)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetHBondEnergy">SetHBondEnergy() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.SetPolarDirection">SetPolarDirection() (promod3.sidechain.Particle method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetHBondPotentialParameters">SetHBondPotentialParameters() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.SetPos">SetPos() (promod3.loop.AllAtomPositions method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.SetInternalEnergy">SetInternalEnergy() (promod3.sidechain.FRMRotamer method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.SetProbability">SetProbability() (promod3.sidechain.FRMRotamer method)</a>
   </dt>
 
       <dd><dl>
         
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.SetInternalEnergy">(promod3.sidechain.RRMRotamer method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.SetProbability">(promod3.sidechain.RRMRotamer method)</a>
   </dt>
 
       </dl></dd>
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.SetInternalEnergyPrefactor">SetInternalEnergyPrefactor() (promod3.sidechain.FRMRotamer method)</a>
-  </dt>
-
-      <dd><dl>
-        
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.SetInternalEnergyPrefactor">(promod3.sidechain.RRMRotamer method)</a>
+  <dt><a href="scoring/backbone_score_env.html#promod3.scoring.BackboneScoreEnv.SetPsipredPrediction">SetPsipredPrediction() (promod3.scoring.BackboneScoreEnv method)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib.SetInterpolate">SetInterpolate() (promod3.sidechain.BBDepRotamerLib method)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.SetPsipredPredictions">SetPsipredPredictions() (in module promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetOmegaTorsion">SetOmegaTorsion() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.SetResidue">SetResidue() (promod3.loop.AllAtomPositions method)</a>, <a href="loop/all_atom.html#promod3.loop.AllAtomPositions.SetResidue">[1]</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetPhiPsiTorsion">SetPhiPsiTorsion() (promod3.loop.BackboneList method)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.SSAgreementScorer.SetScore">SetScore() (promod3.scoring.SSAgreementScorer method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetPhiTorsion">SetPhiTorsion() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetSequence">SetSequence() (promod3.loop.BackboneList method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.Particle.SetPolarDirection">SetPolarDirection() (promod3.sidechain.Particle method)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.SetSequenceProfiles">SetSequenceProfiles() (in module promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.SetProbability">SetProbability() (promod3.sidechain.FRMRotamer method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.SetSequenceProfileScoresKey">SetSequenceProfileScoresKey() (promod3.modelling.ScoringWeights static method)</a>
   </dt>
 
-      <dd><dl>
-        
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.SetProbability">(promod3.sidechain.RRMRotamer method)</a>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLookup.SetSigmas">SetSigmas() (promod3.loop.ForcefieldLookup method)</a>
   </dt>
 
-      </dl></dd>
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetPsipredPrediction">SetPsipredPrediction() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.SetStemRMSDsKey">SetStemRMSDsKey() (promod3.modelling.ScoringWeights static method)</a>
   </dt>
 
-  </dl></td>
-  <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetPsiTorsion">SetPsiTorsion() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.SetStructureProfile">SetStructureProfile() (promod3.loop.StructureDB method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetReducedEnergy">SetReducedEnergy() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.SetStructureProfileScoresKey">SetStructureProfileScoresKey() (promod3.modelling.ScoringWeights static method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetReducedPotentialParameters">SetReducedPotentialParameters() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.SetTemperature">SetTemperature() (promod3.sidechain.FRMRotamer method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SetSequence">SetSequence() (promod3.loop.BackboneList method)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.SetupDefaultAllAtomScoring">SetupDefaultAllAtomScoring() (in module promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetSSAgreementParameters">SetSSAgreementParameters() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.SetupDefaultBackboneScoring">SetupDefaultBackboneScoring() (in module promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="loop/structure_db.html#promod3.loop.StructureDB.SetStructureProfile">SetStructureProfile() (promod3.loop.StructureDB method)</a>
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator.SetupSystem">SetupSystem() (promod3.loop.MmSystemCreator method)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.SetTemperature">SetTemperature() (promod3.sidechain.FRMRotamer method)</a>
+  <dt><a href="modelling/loop_candidates.html#promod3.modelling.ScoringWeights.SetWeights">SetWeights() (promod3.modelling.ScoringWeights static method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetTorsionEnergy">SetTorsionEnergy() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap.ShiftCTerminal">ShiftCTerminal() (promod3.modelling.StructuralGap method)</a>
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.SetTorsionPotentialParameters">SetTorsionPotentialParameters() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.ShiftExtension">ShiftExtension (class in promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.SetupBackboneScorer">SetupBackboneScorer() (in module promod3.modelling)</a>
+  <dt><a href="modelling/pipeline.html#promod3.modelling.ModellingHandle.sidechain_reconstructor">sidechain_reconstructor (promod3.modelling.ModellingHandle attribute)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap.ShiftCTerminal">ShiftCTerminal() (promod3.modelling.StructuralGap method)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.SidechainParticle">SidechainParticle (class in promod3.sidechain)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.ShiftExtension">ShiftExtension (class in promod3.modelling)</a>
+  <dt><a href="modelling/sidechain_reconstruction.html#promod3.modelling.SidechainReconstructionData">SidechainReconstructionData (class in promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="sidechain/rotamer.html#promod3.sidechain.SidechainParticle">SidechainParticle (class in promod3.sidechain)</a>
+  <dt><a href="modelling/sidechain_reconstruction.html#promod3.modelling.SidechainReconstructor">SidechainReconstructor (class in promod3.modelling)</a>
   </dt>
 
       
@@ -2140,6 +3424,10 @@
   </dt>
 
       
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldLJPairInfo.sigma">sigma (promod3.loop.ForcefieldLJPairInfo attribute)</a>
+  </dt>
+
+      
   <dt><a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.SimilarDihedral">SimilarDihedral() (promod3.sidechain.RotamerLibEntry method)</a>, <a href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLibEntry.SimilarDihedral">[1]</a>
   </dt>
 
@@ -2148,23 +3436,43 @@
   </dt>
 
       
-  <dt><a href="loop/monte_carlo.html#promod3.loop.SoftSampler">SoftSampler (class in promod3.loop)</a>
+  <dt><a href="modelling/monte_carlo.html#promod3.modelling.SoftSampler">SoftSampler (class in promod3.modelling)</a>
+  </dt>
+
+      
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.SSAgreementScorer">SSAgreementScorer (class in promod3.scoring)</a>
+  </dt>
+
+      
+  <dt><a href="core/runtime_profiling.html#promod3.core.StaticRuntimeProfiler.Start">Start() (promod3.core.StaticRuntimeProfiler static method)</a>
+  </dt>
+
+      
+  <dt><a href="core/runtime_profiling.html#promod3.core.StaticRuntimeProfiler.StartScoped">StartScoped() (promod3.core.StaticRuntimeProfiler static method)</a>
+  </dt>
+
+      
+  <dt><a href="core/runtime_profiling.html#promod3.core.StaticRuntimeProfiler">StaticRuntimeProfiler (class in promod3.core)</a>
+  </dt>
+
+      
+  <dt><a href="core/geometry.html#promod3.core.StemCoords">StemCoords (class in promod3.core)</a>
   </dt>
 
       
-  <dt><a href="sidechain/graph.html#promod3.sidechain.Graph.Solve">Solve() (promod3.sidechain.Graph method)</a>
+  <dt><a href="core/geometry.html#promod3.core.StemPairOrientation">StemPairOrientation (class in promod3.core)</a>
   </dt>
 
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidate.ss_agreement_score">ss_agreement_score (promod3.loop.LoopCandidate attribute)</a>
+  <dt><a href="core/runtime_profiling.html#promod3.core.StaticRuntimeProfiler.Stop">Stop() (promod3.core.StaticRuntimeProfiler static method)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGap">StructuralGap (class in promod3.modelling)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGap">StructuralGap (class in promod3.modelling)</a>
   </dt>
 
       
-  <dt><a href="modelling/index.html#promod3.modelling.StructuralGapList">StructuralGapList (class in promod3.modelling)</a>
+  <dt><a href="modelling/gap_handling.html#promod3.modelling.StructuralGapList">StructuralGapList (class in promod3.modelling)</a>
   </dt>
 
       
@@ -2172,6 +3480,10 @@
   </dt>
 
       
+  <dt><a href="sidechain/subrotamer_optimizer.html#promod3.sidechain.SubrotamerOptimizer">SubrotamerOptimizer() (in module promod3.sidechain)</a>
+  </dt>
+
+      
   <dt><a href="loop/backbone.html#promod3.loop.BackboneList.SuperposeOnto">SuperposeOnto() (promod3.loop.BackboneList method)</a>
   </dt>
 
@@ -2194,13 +3506,33 @@
   </dt>
 
       
-  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.ToEntity">ToEntity() (promod3.loop.BackboneList method)</a>
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.ToDensity">ToDensity() (promod3.loop.BackboneList method)</a>
+  </dt>
+
+      
+  <dt><a href="loop/all_atom.html#promod3.loop.AllAtomPositions.ToEntity">ToEntity() (promod3.loop.AllAtomPositions method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.ToEntity">(promod3.loop.BackboneList method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.ToFrameResidue">ToFrameResidue() (promod3.sidechain.FRMRotamer method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.RRMRotamer.ToFrameResidue">(promod3.sidechain.RRMRotamer method)</a>
   </dt>
 
+      </dl></dd>
   </dl></td>
   <td style="width: 33%" valign="top"><dl>
       
-  <dt><a href="loop/helper_classes.html#promod3.loop.LoopCandidate.torsion_score">torsion_score (promod3.loop.LoopCandidate attribute)</a>
+  <dt><a href="sidechain/rotamer.html#promod3.sidechain.FRMRotamer.ToRRMRotamer">ToRRMRotamer() (promod3.sidechain.FRMRotamer method)</a>
   </dt>
 
       
@@ -2208,7 +3540,15 @@
   </dt>
 
       
-  <dt><a href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer.TransOmegaTorsions">TransOmegaTorsions() (promod3.loop.BackboneLoopScorer method)</a>
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.TorsionScorer">TorsionScorer (class in promod3.scoring)</a>
+  </dt>
+
+      
+  <dt><a href="loop/backbone.html#promod3.loop.BackboneList.TransOmegaTorsions">TransOmegaTorsions() (promod3.loop.BackboneList method)</a>
+  </dt>
+
+      
+  <dt><a href="sidechain/graph.html#promod3.sidechain.RotamerGraph.TreeSolve">TreeSolve() (promod3.sidechain.RotamerGraph method)</a>
   </dt>
 
   </dl></td>
@@ -2221,6 +3561,30 @@
   <dt><a href="loop/torsion_sampler.html#promod3.loop.TorsionSampler.UpdateDistributions">UpdateDistributions() (promod3.loop.TorsionSampler method)</a>
   </dt>
 
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.MmSystemCreator.UpdatePositions">UpdatePositions() (promod3.loop.MmSystemCreator method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="modelling/loop_closing.html#promod3.modelling.AllAtomRelaxer.UpdatePositions">(promod3.modelling.AllAtomRelaxer method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="loop/mm_system_creation.html#promod3.loop.ForcefieldConnectivity.urey_bradley_angles">urey_bradley_angles (promod3.loop.ForcefieldConnectivity attribute)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBPackingScorer.UseClassicMode">UseClassicMode() (promod3.scoring.CBPackingScorer method)</a>
+  </dt>
+
+      
+  <dt><a href="scoring/backbone_scorers.html#promod3.scoring.CBPackingScorer.UseIncludeEnvMode">UseIncludeEnvMode() (promod3.scoring.CBPackingScorer method)</a>
+  </dt>
+
   </dl></td>
 </tr></table>
 
@@ -2258,7 +3622,7 @@
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/gettingstarted.html b/doc/html/gettingstarted.html
index 3bb34410..398b8b16 100644
--- a/doc/html/gettingstarted.html
+++ b/doc/html/gettingstarted.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Getting Started &mdash; ProMod3 0 documentation</title>
+    <title>Getting Started &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    './',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,9 +23,9 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="index.html" />
     <link rel="up" title="Documentation For Users" href="users.html" />
-    <link rel="next" title="Building ProMod3" href="buildsystem.html" />
+    <link rel="next" title="ProMod3 Actions" href="actions/index.html" />
     <link rel="prev" title="Documentation For Users" href="users.html" />
    
   
@@ -57,7 +57,7 @@ For convenience, add the folder to your <code class="docutils literal"><span cla
 </div>
 <p>Here <code class="docutils literal"><span class="pre">&lt;COMMAND&gt;</span></code> can be:</p>
 <ul>
-<li><p class="first">a predefined &#8220;action&#8221; (execute <code class="docutils literal"><span class="pre">pm</span> <span class="pre">help</span></code> for a list of possible actions)</p>
+<li><p class="first">a predefined &#8220;action&#8221; (see <a class="reference internal" href="actions/index.html#promod-actions"><span>here</span></a>)</p>
 </li>
 <li><p class="first">the path to a python script, such as the following example:</p>
 <div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span>
@@ -83,11 +83,18 @@ the desired target sequence. The modelling steps then are:</p>
 <ul class="simple">
 <li>Build a raw model from a template by copying the part of the template which
 is conserved</li>
-<li>Perform loop modelling to close all gaps (see <a class="reference internal" href="loop/index.html#module-promod3.loop" title="promod3.loop: Loop Modelling"><code class="xref py py-mod docutils literal"><span class="pre">loop</span></code></a> module)</li>
-<li>Reconstruct sidechains (see <a class="reference internal" href="sidechain/index.html#module-promod3.sidechain" title="promod3.sidechain: Sidechain Modelling"><code class="xref py py-mod docutils literal"><span class="pre">sidechain</span></code></a> module)</li>
+<li>Perform loop modelling to close all gaps (see <a class="reference internal" href="loop/index.html#module-promod3.loop" title="promod3.loop: Loop Handling"><code class="xref py py-mod docutils literal"><span class="pre">loop</span></code></a> module)</li>
+<li>Reconstruct sidechains (using <a class="reference internal" href="sidechain/index.html#module-promod3.sidechain" title="promod3.sidechain: Sidechain Modelling"><code class="xref py py-mod docutils literal"><span class="pre">sidechain</span></code></a> module)</li>
 <li>Minimize energy of final model using molecular mechanics
 (using <code class="xref py py-mod docutils literal"><span class="pre">ost.mol.mm</span></code> from OST)</li>
 </ul>
+<p>Since a good amount of time is spent in OpenMM routines to minimize energy, we
+try to use the fast and multi-threaded &#8220;CPU&#8221; platform of OpenMM (should be
+included and working on any hardware supported by OpenMM). If the platform is
+not available, we use the slower &#8220;Reference&#8221; platform. For the &#8220;CPU&#8221; platform,
+multiple CPU threads can be used by setting the env. variable
+<code class="docutils literal"><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>
 </div>
 </div>
 
@@ -111,7 +118,7 @@ is conserved</li>
   <li><a href="index.html">Documentation overview</a><ul>
   <li><a href="users.html">Documentation For Users</a><ul>
       <li>Previous: <a href="users.html" title="previous chapter">Documentation For Users</a></li>
-      <li>Next: <a href="buildsystem.html" title="next chapter">Building ProMod3</a></li>
+      <li>Next: <a href="actions/index.html" title="next chapter">ProMod3 Actions</a></li>
   </ul></li>
   </ul></li>
 </ul>
@@ -141,7 +148,7 @@ is conserved</li>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/index.html b/doc/html/index.html
index 7859807e..586a609d 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Welcome To ProMod3’s Documentation! &mdash; ProMod3 0 documentation</title>
+    <title>Welcome To ProMod3’s Documentation! &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    './',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="#" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="#" />
     <link rel="next" title="Documentation For Users" href="users.html" />
    
   
@@ -44,19 +44,22 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="users.html">Users</a><ul>
 <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="modelling/index.html"><code class="docutils literal"><span class="pre">modelling</span></code> - Protein Modelling</a></li>
-<li class="toctree-l2"><a class="reference internal" href="loop/index.html"><code class="docutils literal"><span class="pre">loop</span></code> - Loop Modelling</a></li>
 <li class="toctree-l2"><a class="reference internal" href="sidechain/index.html"><code class="docutils literal"><span class="pre">sidechain</span></code> - Sidechain Modelling</a></li>
+<li class="toctree-l2"><a class="reference internal" href="scoring/index.html"><code class="docutils literal"><span class="pre">scoring</span></code> - Loop Scoring</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loop/index.html"><code class="docutils literal"><span class="pre">loop</span></code> - Loop Handling</a></li>
 <li class="toctree-l2"><a class="reference internal" href="core/index.html"><code class="docutils literal"><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="docutils literal"><span class="pre">SetCompoundsChemlib()</span></code></a></li>
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" href="developers.html">Developers</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="dev_setup.html">ProMod3 Setup</a></li>
 <li class="toctree-l2"><a class="reference internal" href="contributing.html">Contributing</a></li>
 <li class="toctree-l2"><a class="reference internal" href="actions/index_dev.html"><code class="docutils literal"><span class="pre">test_actions</span></code> - Testing Actions</a></li>
 <li class="toctree-l2"><a class="reference internal" href="cmake/index.html">ProMod3&#8216;s Share Of CMake</a></li>
-<li class="toctree-l2"><a class="reference internal" href="portableIO.html">Using binary files in ProMod3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="portableIO.html">Using Binary Files In ProMod3</a></li>
 </ul>
 </li>
 </ul>
@@ -122,7 +125,7 @@
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/loop/all_atom.html b/doc/html/loop/all_atom.html
new file mode 100644
index 00000000..cc4982c8
--- /dev/null
+++ b/doc/html/loop/all_atom.html
@@ -0,0 +1,1361 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Handling All Atom Positions &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="loop - Loop Handling" href="index.html" />
+    <link rel="next" title="Generate ost.mol.mm systems" href="mm_system_creation.html" />
+    <link rel="prev" title="Structural Data" href="structure_db.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="handling-all-atom-positions">
+<h1>Handling All Atom Positions<a class="headerlink" href="#handling-all-atom-positions" title="Permalink to this headline">¶</a></h1>
+<p>To represent and handle all atom loops, we provide a container
+(<a class="reference internal" href="#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a>) to represent arbitrary amino acid sequences with the
+positions of all their heavy atoms and an environment (<a class="reference internal" href="#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a>) to
+handle changes during loop modelling.</p>
+<p>The example below showcases some operations on the two classes:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span><span class="p">,</span> <span class="n">geom</span>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span>
+
+<span class="c"># load example (has res. numbering starting at 1)</span>
+<span class="n">ent</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="s">&quot;data/1CRN.pdb&quot;</span><span class="p">)</span>
+<span class="n">res_list</span> <span class="o">=</span> <span class="n">ent</span><span class="o">.</span><span class="n">residues</span>
+<span class="n">seqres_str</span> <span class="o">=</span> <span class="s">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">r</span><span class="o">.</span><span class="n">one_letter_code</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">res_list</span><span class="p">])</span>
+
+<span class="c"># initialize an environment</span>
+<span class="n">env</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">AllAtomEnv</span><span class="p">(</span><span class="n">seqres_str</span><span class="p">)</span>
+<span class="n">env</span><span class="o">.</span><span class="n">SetInitialEnvironment</span><span class="p">(</span><span class="n">ent</span><span class="p">)</span>
+
+<span class="c"># get all atom position for part of it</span>
+<span class="n">all_atoms</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">AllAtomPositions</span><span class="p">(</span><span class="n">res_list</span><span class="p">[</span><span class="mi">35</span><span class="p">:</span><span class="mi">44</span><span class="p">])</span>
+<span class="c"># change pos. at res. index 1 (= res. number 37)</span>
+<span class="n">idx_ca_res_37</span> <span class="o">=</span> <span class="n">all_atoms</span><span class="o">.</span><span class="n">GetIndex</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s">&quot;CA&quot;</span><span class="p">)</span>
+<span class="n">new_pos</span> <span class="o">=</span> <span class="n">all_atoms</span><span class="o">.</span><span class="n">GetPos</span><span class="p">(</span><span class="n">idx_ca_res_37</span><span class="p">)</span> <span class="o">+</span> <span class="n">geom</span><span class="o">.</span><span class="n">Vec3</span><span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="mf">0.2</span><span class="p">,</span> <span class="mf">0.2</span><span class="p">)</span>
+<span class="n">all_atoms</span><span class="o">.</span><span class="n">SetPos</span><span class="p">(</span><span class="n">idx_ca_res_37</span><span class="p">,</span> <span class="n">new_pos</span><span class="p">)</span>
+<span class="c"># insert into ent and store updated entity</span>
+<span class="n">all_atoms</span><span class="o">.</span><span class="n">InsertInto</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">ent</span><span class="o">.</span><span class="n">chains</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="mi">37</span><span class="p">)</span>
+<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">ent</span><span class="p">,</span> <span class="s">&quot;all_atom_pos.pdb&quot;</span><span class="p">)</span>
+
+<span class="c"># update environment with new positions</span>
+<span class="n">env</span><span class="o">.</span><span class="n">SetEnvironment</span><span class="p">(</span><span class="n">all_atoms</span><span class="p">,</span> <span class="mi">36</span><span class="p">)</span>
+<span class="c"># store all positions of environment</span>
+<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">env</span><span class="o">.</span><span class="n">GetAllAtomPositions</span><span class="p">()</span><span class="o">.</span><span class="n">ToEntity</span><span class="p">(),</span> <span class="s">&quot;all_atom_env.pdb&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="section" id="the-allatomenv-class">
+<h2>The AllAtomEnv class<a class="headerlink" href="#the-allatomenv-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.loop.AllAtomEnv">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">AllAtomEnv</code><span class="sig-paren">(</span><em>seqres</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomEnv" title="Permalink to this definition">¶</a></dt>
+<dd><p>The all atom environment contains and handles positions of all atoms during
+loop modelling. It is linked to a (list of) seqres (one per chain) at
+construction. The idea is to initialize it at the beginning of the modelling
+process with all known positions and then update the environment whenever a
+new loop is being added.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>seqres</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceHandle</span></code></a> /
+<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.SequenceList" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceList</span></code></a>) &#8211; Internal SEQRES to be set (single chain or list with one per
+chain). Whenever setting structural data, consistency with this SEQRES is enforced.</td>
+</tr>
+</tbody>
+</table>
+<p>Indexing to access parts of the environment:</p>
+<ul class="simple">
+<li><em>chain_idx</em>: Index of chain as it occurs in <em>seqres</em> (0 for single sequence)</li>
+<li><em>start_resnum</em>: Residue number defining the position in the SEQRES of chain
+with index <em>chain_idx</em>. <strong>The numbering starts for every chain with the
+value 1</strong>.</li>
+<li>internal residue indexing: all residues of all chains are simply
+concatenated one after each other (indexing starts at 0)</li>
+</ul>
+<dl class="method">
+<dt id="promod3.loop.AllAtomEnv.SetInitialEnvironment">
+<code class="descname">SetInitialEnvironment</code><span class="sig-paren">(</span><em>env_structure</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomEnv.SetInitialEnvironment" title="Permalink to this definition">¶</a></dt>
+<dd><p>Sets full environment. Existing data is cleared first.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>env_structure</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityHandle</span></code></a>) &#8211; Structral data to be set as environment. The chains
+in <em>env_structure</em> are expected to be in the same
+order as the SEQRES items provided in constructor.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>env</em> is inconsistent with
+SEQRES set in constructor. This can be because of corrupt residue
+numbers or sequence mismatches.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomEnv.SetEnvironment">
+<code class="descname">SetEnvironment</code><span class="sig-paren">(</span><em>new_env_pos</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomEnv.SetEnvironment" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">SetEnvironment</code><span class="sig-paren">(</span><em>new_pos</em>, <em>start_resnum</em>, <em>chain_idx=0</em><span class="sig-paren">)</span></dt>
+<dt>
+<code class="descname">SetEnvironment</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em>, <em>chain_idx=0</em><span class="sig-paren">)</span></dt>
+<dd><p>Add/update atom positions in environment. In the end, all residues covered
+in <em>new_env_pos</em> / <em>new_pos</em> / <em>bb_list</em> will be set as defined there. This
+means, that positions in the env. may be reset, newly set or cleared.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>new_env_pos</strong> (<a class="reference internal" href="#promod3.loop.AllAtomEnvPositions" title="promod3.loop.AllAtomEnvPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnvPositions</span></code></a>) &#8211; Structural data to be set as environment.</li>
+<li><strong>new_pos</strong> (<a class="reference internal" href="#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a>) &#8211; Structural data to be set as environment.</li>
+<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Backbone data to be set as environment.</li>
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResNum" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResNum</span></code></a>) &#8211; Res. number defining the start position in the SEQRES.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of chain the structural data belongs to.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>new_pos</em> / <em>new_env_pos</em> /
+<em>bb_list</em> is inconsistent with SEQRES set in constructor or when
+either <em>start_resnum</em> or <em>chain_idx</em> point to invalid positions in
+the SEQRES.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomEnv.ClearEnvironment">
+<code class="descname">ClearEnvironment</code><span class="sig-paren">(</span><em>start_resnum</em>, <em>num_residues</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomEnv.ClearEnvironment" title="Permalink to this definition">¶</a></dt>
+<dd><p>Clears a stretch of length <em>num_residues</em> in the environment in chain
+with idx <em>chain_idx</em> starting from residue number <em>start_resnum</em></p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Start of stretch to clear</li>
+<li><strong>num_residues</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length of stretch to clear</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Chain the stretch belongs to</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> when either <em>start_resnum</em> or
+<em>chain_idx</em> point to invalid positions in the SEQRES.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomEnv.GetEnvironment">
+<code class="descname">GetEnvironment</code><span class="sig-paren">(</span><em>start_resnum</em>, <em>num_residues</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomEnv.GetEnvironment" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Copy of stretch of structural data in environment. Useful to store
+a loop to reset later with <a class="reference internal" href="#promod3.loop.AllAtomEnv.SetEnvironment" title="promod3.loop.AllAtomEnv.SetEnvironment"><code class="xref py py-meth docutils literal"><span class="pre">SetEnvironment()</span></code></a>.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.AllAtomEnvPositions" title="promod3.loop.AllAtomEnvPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnvPositions</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Start of stretch to store</li>
+<li><strong>num_residues</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length of stretch to store</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Chain the stretch belongs to</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> when either <em>start_resnum</em> or
+<em>chain_idx</em> point to invalid positions in the SEQRES.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomEnv.GetSeqres">
+<code class="descname">GetSeqres</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomEnv.GetSeqres" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">SEQRES that was set in constructor (one sequence per chain).</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.SequenceList" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceList</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomEnv.GetAllAtomPositions">
+<code class="descname">GetAllAtomPositions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomEnv.GetAllAtomPositions" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Reference (use with caution!) to the internal storage of all atom
+positions for the environment. All residues of all chains are
+stored continuously in there. To get a copy of some positions use
+<a class="reference internal" href="#promod3.loop.AllAtomEnv.GetEnvironment" title="promod3.loop.AllAtomEnv.GetEnvironment"><code class="xref py py-meth docutils literal"><span class="pre">GetEnvironment()</span></code></a>.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="the-allatompositions-class">
+<h2>The AllAtomPositions class<a class="headerlink" href="#the-allatompositions-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.loop.AllAtomPositions">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">AllAtomPositions</code><a class="headerlink" href="#promod3.loop.AllAtomPositions" title="Permalink to this definition">¶</a></dt>
+<dd><p>Container for the positions of all heavy atoms of an arbitrary amino acid sequence. This is tailored for fast operations within C++ codes. The Python export described here, is mainly meant for debugging or to initialize the object and feed it to other classes using it.</p>
+<p>Indexing of positions and residues:</p>
+<ul class="simple">
+<li>residue indexing is in the range [0, <a class="reference internal" href="#promod3.loop.AllAtomPositions.GetNumResidues" title="promod3.loop.AllAtomPositions.GetNumResidues"><code class="xref py py-meth docutils literal"><span class="pre">GetNumResidues()</span></code></a>-1] and is in the
+order of the sequence used to initialize the object</li>
+<li>indexing of single atoms is in the range [0, <a class="reference internal" href="#promod3.loop.AllAtomPositions.GetNumAtoms" title="promod3.loop.AllAtomPositions.GetNumAtoms"><code class="xref py py-meth docutils literal"><span class="pre">GetNumAtoms()</span></code></a>-1]. For
+each residue you can find the bounds with <a class="reference internal" href="#promod3.loop.AllAtomPositions.GetFirstIndex" title="promod3.loop.AllAtomPositions.GetFirstIndex"><code class="xref py py-meth docutils literal"><span class="pre">GetFirstIndex()</span></code></a> and
+<a class="reference internal" href="#promod3.loop.AllAtomPositions.GetLastIndex" title="promod3.loop.AllAtomPositions.GetLastIndex"><code class="xref py py-meth docutils literal"><span class="pre">GetLastIndex()</span></code></a> or find a single atom with <a class="reference internal" href="#promod3.loop.AllAtomPositions.GetIndex" title="promod3.loop.AllAtomPositions.GetIndex"><code class="xref py py-meth docutils literal"><span class="pre">GetIndex()</span></code></a></li>
+</ul>
+<p>Each atom position is initially unset (unless a list of residues is passed
+when constructing it) and can only be set with calls to <a class="reference internal" href="#promod3.loop.AllAtomPositions.SetPos" title="promod3.loop.AllAtomPositions.SetPos"><code class="xref py py-meth docutils literal"><span class="pre">SetPos()</span></code></a> or
+<a class="reference internal" href="#promod3.loop.AllAtomPositions.SetResidue" title="promod3.loop.AllAtomPositions.SetResidue"><code class="xref py py-meth docutils literal"><span class="pre">SetResidue()</span></code></a>.</p>
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.AllAtomPositions">
+<code class="descname">AllAtomPositions</code><span class="sig-paren">(</span><em>sequence</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.AllAtomPositions" title="Permalink to this definition">¶</a></dt>
+<dd><p>Creates a container for the given <em>sequence</em> with all positions unset.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence of amino acid one letter codes.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>sequence</em> contains a one letter
+code which is not one of the 20 default amino acids.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">AllAtomPositions</code><span class="sig-paren">(</span><em>residues</em><span class="sig-paren">)</span></dt>
+<dd><p>Creates a container for the given <em>residues</em>. Both sequence and positions
+are extracted from the given residues.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>residues</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandleList</span></code>) &#8211; List of residues</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if any residue has a one letter
+code which is not one of the 20 default amino acids.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">AllAtomPositions</code><span class="sig-paren">(</span><em>sequence</em>, <em>residues</em><span class="sig-paren">)</span></dt>
+<dd><p>Creates a container for the given <em>sequence</em> and extracts positions from
+<em>residues</em>. The residues may be different amino acids than the given
+<em>sequence</em> (see <a class="reference internal" href="#promod3.loop.AllAtomPositions.SetResidue" title="promod3.loop.AllAtomPositions.SetResidue"><code class="xref py py-meth docutils literal"><span class="pre">SetResidue()</span></code></a>).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence of amino acid one letter codes.</li>
+<li><strong>residues</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandleList</span></code>) &#8211; List of residues from which positions are extracted.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>sequence</em> contains a one letter
+code which is not one of the 20 default amino acids or if
+<em>sequence</em> and <em>residues</em> are inconsistent in size.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">AllAtomPositions</code><span class="sig-paren">(</span><em>bb_list</em><span class="sig-paren">)</span></dt>
+<dd><p>Creates a container for the given backbone. Both sequence and backbone
+positions are extracted from the given residues.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Backbone list of residues</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if any residue has a one letter
+code which is not one of the 20 default amino acids.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.SetResidue">
+<code class="descname">SetResidue</code><span class="sig-paren">(</span><em>res_index</em>, <em>res</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.SetResidue" title="Permalink to this definition">¶</a></dt>
+<dd><p>Set positions for residue at index <em>res_index</em> given the atoms in <em>res</em>.
+For each expected heavy atom, we search for an atom of that name in <em>res</em>
+and if found set the corresponding position, otherwise we unset it.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index</li>
+<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue providing atoms</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_index</em> out of bounds.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">SetResidue</code><span class="sig-paren">(</span><em>res_index</em>, <em>other</em>, <em>other_res_index</em><span class="sig-paren">)</span></dt>
+<dd><p>Set positions for residue at index <em>res_index</em> given the positions of
+residue at index <em>other_res_index</em> in <em>other</em> position container. Each
+position is set or cleared according to the data in <em>other</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index</li>
+<li><strong>other</strong> (<a class="reference internal" href="#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a>) &#8211; Position container from which we take data</li>
+<li><strong>other_res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index in <em>other</em></li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_index</em> or <em>other_res_index</em>
+out of bounds or if residues in the two containers are inconsistent
+(different amino acids).</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.SetPos">
+<code class="descname">SetPos</code><span class="sig-paren">(</span><em>index</em>, <em>pos</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.SetPos" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Set position at that index.</li>
+<li><strong>pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Set position to <em>pos</em>.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>index</em> out of bounds.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.ClearPos">
+<code class="descname">ClearPos</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.ClearPos" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Unset position at that index.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>index</em> out of bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.ClearResidue">
+<code class="descname">ClearResidue</code><span class="sig-paren">(</span><em>res_index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.ClearResidue" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Unset all positions for residue at that index.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_index</em> out of bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.GetPos">
+<code class="descname">GetPos</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.GetPos" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Position at given index.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Atom position index.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>index</em> out of bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.IsSet">
+<code class="descname">IsSet</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.IsSet" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, if the position at that index is currently set.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Atom position index.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>index</em> out of bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.GetIndex">
+<code class="descname">GetIndex</code><span class="sig-paren">(</span><em>res_index</em>, <em>atom_name</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.GetIndex" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Atom position index for atom named <em>atom_name</em> (standard PDB
+naming) for residue at index <em>res_index</em>.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index</li>
+<li><strong>atom_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Atom name</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_index</em> out of bounds or
+if <em>atom_name</em> is not one of that residue&#8217;s heavy atoms.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.GetFirstIndex">
+<code class="descname">GetFirstIndex</code><span class="sig-paren">(</span><em>res_index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.GetFirstIndex" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">First atom position index for residue at index <em>res_index</em>.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_index</em> out of bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.GetLastIndex">
+<code class="descname">GetLastIndex</code><span class="sig-paren">(</span><em>res_index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.GetLastIndex" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Last atom position index for residue at index <em>res_index</em>.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_index</em> out of bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.GetAA">
+<code class="descname">GetAA</code><span class="sig-paren">(</span><em>res_index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.GetAA" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Amino acid type of residue at index <em>res_index</em>.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_index</em> out of bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.IsAnySet">
+<code class="descname">IsAnySet</code><span class="sig-paren">(</span><em>res_index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.IsAnySet" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, if any atom position of residue at index <em>res_index</em> is set.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_index</em> out of bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.IsAllSet">
+<code class="descname">IsAllSet</code><span class="sig-paren">(</span><em>res_index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.IsAllSet" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, if all atom positions of residue at index <em>res_index</em> are set.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_index</em> out of bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.GetPhiTorsion">
+<code class="descname">GetPhiTorsion</code><span class="sig-paren">(</span><em>res_index</em>, <em>def_angle=-1.0472</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.GetPhiTorsion" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Phi torsion angle of residue at index <em>res_index</em> or <em>def_angle</em>
+if required atom positions (C-N-CA-C) are not set.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index</li>
+<li><strong>def_angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Default phi angle.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_index</em> - 1 or <em>res_index</em>
+out of bounds.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.GetPsiTorsion">
+<code class="descname">GetPsiTorsion</code><span class="sig-paren">(</span><em>res_index</em>, <em>def_angle=-0.7854</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.GetPsiTorsion" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Psi torsion angle of residue at index <em>res_index</em> or <em>def_angle</em>
+if required atom positions (N-CA-C-N) are not set.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index</li>
+<li><strong>def_angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Default psi angle.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_index</em> or <em>res_index</em> + 1
+out of bounds.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.GetOmegaTorsion">
+<code class="descname">GetOmegaTorsion</code><span class="sig-paren">(</span><em>res_index</em>, <em>def_angle=3.14159</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.GetOmegaTorsion" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Omega torsion angle of residue at index <em>res_index</em> or <em>def_angle</em>
+if required atom positions (CA-C-N-CA) are not set.
+Here, we use CA-C of residue <em>res_index</em> - 1 and N-CA of residue
+<em>res_index</em> (consistent with OST&#8217;s
+<code class="xref py py-meth docutils literal"><span class="pre">GetOmegaTorsion()</span></code>).</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index</li>
+<li><strong>def_angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Default omega angle.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_index</em> - 1 or <em>res_index</em>
+out of bounds.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.GetNumAtoms">
+<code class="descname">GetNumAtoms</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.GetNumAtoms" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of atom positions stored in this container.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.GetNumResidues">
+<code class="descname">GetNumResidues</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.GetNumResidues" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of residues stored in this container.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.GetSequence">
+<code class="descname">GetSequence</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.GetSequence" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Sequence of one letter codes of all residues stored here.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.Copy">
+<code class="descname">Copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.Copy" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Full copy of this object.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.Extract">
+<code class="descname">Extract</code><span class="sig-paren">(</span><em>from</em>, <em>to</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.Extract" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Container with residues with indices in range [<em>from</em>, <em>to</em>-1].</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>from</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; First residue index</li>
+<li><strong>to</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; One after last residue index</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>from</em> &gt;= <em>to</em> or if any residue
+index is out of bounds.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">Extract</code><span class="sig-paren">(</span><em>res_indices</em><span class="sig-paren">)</span></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Container with residues with indices in <em>res_indices</em>.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>res_indices</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; List of residue index</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if any residue index is out of
+bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.ExtractBackbone">
+<code class="descname">ExtractBackbone</code><span class="sig-paren">(</span><em>from</em>, <em>to</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.ExtractBackbone" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Backbone list of residues with indices in range [<em>from</em>, <em>to</em>-1].
+CB atoms are reconstructed if unset.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>from</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; First residue index</li>
+<li><strong>to</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; One after last residue index</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>from</em> &gt;= <em>to</em>, if any residue
+index is out of bounds or if any residue has any unset backbone
+atom (N, CA, C, O).</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.ToEntity">
+<code class="descname">ToEntity</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.ToEntity" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">All residues packed in a single chain as an OST entity.
+Connectivity resolved with <code class="xref py py-class docutils literal"><span class="pre">ost.conop.HeuristicProcessor</span></code>.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityHandle</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.AllAtomPositions.InsertInto">
+<code class="descname">InsertInto</code><span class="sig-paren">(</span><em>res_index</em>, <em>chain</em>, <em>res_num</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AllAtomPositions.InsertInto" title="Permalink to this definition">¶</a></dt>
+<dd><p>Insert a single residue (taken from given index) into the <em>chain</em> (with
+given res. number). Existing data is replaced and atoms are (re)connected
+according to the default connectivity of that amino acid. Peptide links to
+neighboring residues are set according to residue numbering. To make this
+function efficient, we require the backbone atoms (N, C, CA) to be set.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>res_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index</li>
+<li><strong>chain</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ChainHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ChainHandle</span></code></a>) &#8211; Chain into which we insert</li>
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResNum" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResNum</span></code></a>) &#8211; Residue number for the inserted residue</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_index</em> out of bounds, if
+<em>chain</em> is invalid or if not all backbone atoms (N, C, CA) set.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="the-allatomenvpositions-class">
+<h2>The AllAtomEnvPositions class<a class="headerlink" href="#the-allatomenvpositions-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.loop.AllAtomEnvPositions">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">AllAtomEnvPositions</code><a class="headerlink" href="#promod3.loop.AllAtomEnvPositions" title="Permalink to this definition">¶</a></dt>
+<dd><p>To link the arbitrary amino acid sequence defined in <a class="reference internal" href="#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a>
+and the SEQRES of <a class="reference internal" href="#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a>, we provide a helper class containing
+structural data as well as a mapping to the internal residue indices of
+<a class="reference internal" href="#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a>.</p>
+<dl class="attribute">
+<dt id="promod3.loop.AllAtomEnvPositions.all_pos">
+<code class="descname">all_pos</code><a class="headerlink" href="#promod3.loop.AllAtomEnvPositions.all_pos" title="Permalink to this definition">¶</a></dt>
+<dd><p>Container for the positions of all heavy atoms of some residues.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference internal" href="#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.AllAtomEnvPositions.res_indices">
+<code class="descname">res_indices</code><a class="headerlink" href="#promod3.loop.AllAtomEnvPositions.res_indices" title="Permalink to this definition">¶</a></dt>
+<dd><p>Residue indices to be used by <a class="reference internal" href="#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a> for each residue defined
+in <em>all_pos</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="distinguishing-amino-acid-atoms">
+<h2>Distinguishing amino acid atoms<a class="headerlink" href="#distinguishing-amino-acid-atoms" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.loop.AminoAcidAtom">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">AminoAcidAtom</code><a class="headerlink" href="#promod3.loop.AminoAcidAtom" title="Permalink to this definition">¶</a></dt>
+<dd><p>Enumerates all heavy atoms of all amino acids. The naming scheme is TLC_AN,
+where TLC is the standard three letter code of the amino acid and AN is the
+atom name (standard PDB naming) of the heavy atom. Examples: <em>ALA_CB</em>,
+<em>ARG_CA</em>, <em>ASN_C</em>, <em>ASP_O</em>, <em>CYS_SG</em>, <em>GLU_OE1</em>, <em>GLN_NE2</em>, <em>GLY_N</em>.</p>
+<p>We include all heavy atoms that amino acids have when they are peptide bound
+to other residues (i.e. no OXT).</p>
+<p>Additionally, there is the value <em>XXX_NUM_ATOMS</em>, which corresponds to the
+number of atoms in the enumerator. Each heavy atom hence corresponds to an
+integer in the range [0, <em>XXX_NUM_ATOMS</em>-1].</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.loop.AminoAcidHydrogen">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">AminoAcidHydrogen</code><a class="headerlink" href="#promod3.loop.AminoAcidHydrogen" title="Permalink to this definition">¶</a></dt>
+<dd><p>Enumerates all hydrogens of all amino acids. The naming scheme is TLC_AN,
+where TLC is the standard three letter code of the amino acid and AN is the
+atom name (standard PDB naming) of the hydrogen. Examples: <em>ALA_H</em>,
+<em>ARG_HD3</em>, <em>ASN_HB2</em>, <em>ASP_HA</em>, <em>CYS_HB3</em>, <em>LEU_H</em>.</p>
+<p>We include all hydrogens that amino acids can have including <em>H1</em> (def. PDB
+name = &#8220;H&#8221;), <em>H2</em> and (if not PRO) <em>H3</em> for charged N-terminal residues. Note
+that the H atom attached to N when peptide bound (<em>H</em>) is distinct from the N
+terminal hydrogens (e.g. <em>ALA_H</em> != <em>ALA_H1</em>). For <em>HIS</em> we consider the fully
+protonated state, while <em>ASP</em> and <em>GLU</em> are included in their charged state.</p>
+<p>Additionally, there is the value <em>XXX_NUM_HYDROGENS</em>, which corresponds to the
+number of hydrogens in the enumerator. Each hydrogen hence corresponds to an
+integer in the range [0, <em>XXX_NUM_HYDROGENS</em>-1].</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.loop.AminoAcidLookup">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">AminoAcidLookup</code><a class="headerlink" href="#promod3.loop.AminoAcidLookup" title="Permalink to this definition">¶</a></dt>
+<dd><p>Collection of static methods to lookup properties of amino acid types
+(<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>), heavy atom types (<a class="reference internal" href="#promod3.loop.AminoAcidAtom" title="promod3.loop.AminoAcidAtom"><code class="xref py py-class docutils literal"><span class="pre">AminoAcidAtom</span></code></a>) and
+hydrogen types (<a class="reference internal" href="#promod3.loop.AminoAcidHydrogen" title="promod3.loop.AminoAcidHydrogen"><code class="xref py py-class docutils literal"><span class="pre">AminoAcidHydrogen</span></code></a>).</p>
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetOLC">
+<em class="property">static </em><code class="descname">GetOLC</code><span class="sig-paren">(</span><em>aa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetOLC" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">One letter code for the given amino acid</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>aa</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">AminoAcid</span></code></a>) &#8211; Amino acid type</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetAAA">
+<em class="property">static </em><code class="descname">GetAAA</code><span class="sig-paren">(</span><em>aa</em>, <em>atom_idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetAAA" title="Permalink to this definition">¶</a></dt>
+<dt>
+<em class="property">static </em><code class="descname">GetAAA</code><span class="sig-paren">(</span><em>aa</em>, <em>atom_name</em><span class="sig-paren">)</span></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Heavy atom type for the given amino acid and atom.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.AminoAcidAtom" title="promod3.loop.AminoAcidAtom"><code class="xref py py-class docutils literal"><span class="pre">AminoAcidAtom</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>aa</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">AminoAcid</span></code></a>) &#8211; Amino acid type</li>
+<li><strong>atom_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Atom index (in [0, GetNumAtoms(aa)-1])</li>
+<li><strong>atom_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Atom name</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>atom_idx</em> out of bounds or if
+<em>atom_name</em> is not one of the heavy atoms of <em>aa</em>.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetAAH">
+<em class="property">static </em><code class="descname">GetAAH</code><span class="sig-paren">(</span><em>aa</em>, <em>atom_idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetAAH" title="Permalink to this definition">¶</a></dt>
+<dt>
+<em class="property">static </em><code class="descname">GetAAH</code><span class="sig-paren">(</span><em>aa</em>, <em>atom_name</em><span class="sig-paren">)</span></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Hydrogen type for the given amino acid and atom.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.AminoAcidHydrogen" title="promod3.loop.AminoAcidHydrogen"><code class="xref py py-class docutils literal"><span class="pre">AminoAcidHydrogen</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>aa</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">AminoAcid</span></code></a>) &#8211; Amino acid type</li>
+<li><strong>atom_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Atom index (in [0, GetNumHydrogens(aa)-1])</li>
+<li><strong>atom_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Atom name</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>atom_idx</em> out of bounds or if
+<em>atom_name</em> is not one of the hydrogens of <em>aa</em>.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetIndex">
+<em class="property">static </em><code class="descname">GetIndex</code><span class="sig-paren">(</span><em>aa</em>, <em>atom_name</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetIndex" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Atom index (in [0, GetNumAtoms(aa)-1]) for the given amino acid and
+atom.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>aa</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">AminoAcid</span></code></a>) &#8211; Amino acid type</li>
+<li><strong>atom_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Atom name</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>atom_name</em> is not one of the
+heavy atoms of <em>aa</em>.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetHydrogenIndex">
+<em class="property">static </em><code class="descname">GetHydrogenIndex</code><span class="sig-paren">(</span><em>aa</em>, <em>atom_name</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetHydrogenIndex" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Atom index (in [0, GetNumHydrogens(aa)-1]) for the given amino acid
+and atom.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>aa</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">AminoAcid</span></code></a>) &#8211; Amino acid type</li>
+<li><strong>atom_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Atom name</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>atom_name</em> is not one of the
+hydrogens of <em>aa</em>.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetNumAtoms">
+<em class="property">static </em><code class="descname">GetNumAtoms</code><span class="sig-paren">(</span><em>aa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetNumAtoms" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of heavy atoms of the given amino acid</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>aa</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">AminoAcid</span></code></a>) &#8211; Amino acid type</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetMaxNumAtoms">
+<em class="property">static </em><code class="descname">GetMaxNumAtoms</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetMaxNumAtoms" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Max. number of heavy atoms for any amino acid</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetNumHydrogens">
+<em class="property">static </em><code class="descname">GetNumHydrogens</code><span class="sig-paren">(</span><em>aa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetNumHydrogens" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of hydrogens of the given amino acid</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>aa</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">AminoAcid</span></code></a>) &#8211; Amino acid type</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetMaxNumHydrogens">
+<em class="property">static </em><code class="descname">GetMaxNumHydrogens</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetMaxNumHydrogens" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Max. number of hydrogens for any amino acid</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetAA">
+<em class="property">static </em><code class="descname">GetAA</code><span class="sig-paren">(</span><em>aaa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetAA" title="Permalink to this definition">¶</a></dt>
+<dt>
+<em class="property">static </em><code class="descname">GetAA</code><span class="sig-paren">(</span><em>aah</em><span class="sig-paren">)</span></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Amino acid type of the given heavy atom type</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">AminoAcid</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>aaa</strong> (<a class="reference internal" href="#promod3.loop.AminoAcidAtom" title="promod3.loop.AminoAcidAtom"><code class="xref py py-class docutils literal"><span class="pre">AminoAcidAtom</span></code></a>) &#8211; Heavy atom type</li>
+<li><strong>aah</strong> (<a class="reference internal" href="#promod3.loop.AminoAcidHydrogen" title="promod3.loop.AminoAcidHydrogen"><code class="xref py py-class docutils literal"><span class="pre">AminoAcidHydrogen</span></code></a>) &#8211; Hydrogen type</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetAtomName">
+<em class="property">static </em><code class="descname">GetAtomName</code><span class="sig-paren">(</span><em>aaa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetAtomName" title="Permalink to this definition">¶</a></dt>
+<dt>
+<em class="property">static </em><code class="descname">GetAtomName</code><span class="sig-paren">(</span><em>aah</em><span class="sig-paren">)</span></dt>
+<dt id="promod3.loop.AminoAcidLookup.GetAtomNameCharmm">
+<em class="property">static </em><code class="descname">GetAtomNameCharmm</code><span class="sig-paren">(</span><em>aaa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetAtomNameCharmm" title="Permalink to this definition">¶</a></dt>
+<dt>
+<em class="property">static </em><code class="descname">GetAtomNameCharmm</code><span class="sig-paren">(</span><em>aah</em><span class="sig-paren">)</span></dt>
+<dt id="promod3.loop.AminoAcidLookup.GetAtomNameAmber">
+<em class="property">static </em><code class="descname">GetAtomNameAmber</code><span class="sig-paren">(</span><em>aaa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetAtomNameAmber" title="Permalink to this definition">¶</a></dt>
+<dt>
+<em class="property">static </em><code class="descname">GetAtomNameAmber</code><span class="sig-paren">(</span><em>aah</em><span class="sig-paren">)</span></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Atom name of the given heavy atom type according to PDB (default),
+CHARMM or AMBER naming.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>aaa</strong> (<a class="reference internal" href="#promod3.loop.AminoAcidAtom" title="promod3.loop.AminoAcidAtom"><code class="xref py py-class docutils literal"><span class="pre">AminoAcidAtom</span></code></a>) &#8211; Heavy atom type</li>
+<li><strong>aah</strong> (<a class="reference internal" href="#promod3.loop.AminoAcidHydrogen" title="promod3.loop.AminoAcidHydrogen"><code class="xref py py-class docutils literal"><span class="pre">AminoAcidHydrogen</span></code></a>) &#8211; Hydrogen type</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetElement">
+<em class="property">static </em><code class="descname">GetElement</code><span class="sig-paren">(</span><em>aaa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetElement" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Chemical element of the given heavy atom type</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>aaa</strong> (<a class="reference internal" href="#promod3.loop.AminoAcidAtom" title="promod3.loop.AminoAcidAtom"><code class="xref py py-class docutils literal"><span class="pre">AminoAcidAtom</span></code></a>) &#8211; Heavy atom type</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetAnchorAtomIndex">
+<em class="property">static </em><code class="descname">GetAnchorAtomIndex</code><span class="sig-paren">(</span><em>aah</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetAnchorAtomIndex" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Atom index (in [0, GetNumAtoms(GetAA(aah))-1]) of the anchor to
+which the given hydrogen is attached.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>aah</strong> (<a class="reference internal" href="#promod3.loop.AminoAcidHydrogen" title="promod3.loop.AminoAcidHydrogen"><code class="xref py py-class docutils literal"><span class="pre">AminoAcidHydrogen</span></code></a>) &#8211; Hydrogen type</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetHNIndex">
+<em class="property">static </em><code class="descname">GetHNIndex</code><span class="sig-paren">(</span><em>aa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetHNIndex" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Atom index (in [0, GetNumHydrogens(aa)-1]) of H atom attached to N
+when residue is peptide bound.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>aa</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">AminoAcid</span></code></a>) &#8211; Amino acid type</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if no such atom (i.e. PRO)</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.AminoAcidLookup.GetH1Index">
+<em class="property">static </em><code class="descname">GetH1Index</code><span class="sig-paren">(</span><em>aa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetH1Index" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.AminoAcidLookup.GetH2Index">
+<em class="property">static </em><code class="descname">GetH2Index</code><span class="sig-paren">(</span><em>aa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetH2Index" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.AminoAcidLookup.GetH3Index">
+<em class="property">static </em><code class="descname">GetH3Index</code><span class="sig-paren">(</span><em>aa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.AminoAcidLookup.GetH3Index" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Atom index (in [0, GetNumHydrogens(aa)-1]) of H atom attached to N
+when residue is N terminal.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>aa</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">AminoAcid</span></code></a>) &#8211; Amino acid type</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if no such atom (i.e. H3 for PRO)</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Handling All Atom Positions</a><ul>
+<li><a class="reference internal" href="#the-allatomenv-class">The AllAtomEnv class</a></li>
+<li><a class="reference internal" href="#the-allatompositions-class">The AllAtomPositions class</a></li>
+<li><a class="reference internal" href="#the-allatomenvpositions-class">The AllAtomEnvPositions class</a></li>
+<li><a class="reference internal" href="#distinguishing-amino-acid-atoms">Distinguishing amino acid atoms</a></li>
+</ul>
+</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="docutils literal"><span class="pre">loop</span></code> - Loop Handling</a><ul>
+      <li>Previous: <a href="structure_db.html" title="previous chapter">Structural Data</a></li>
+      <li>Next: <a href="mm_system_creation.html" title="next chapter">Generate <code class="docutils literal"><span class="pre">ost.mol.mm</span></code> systems</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/loop/all_atom.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/loop/all_atom.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/loop/backbone.html b/doc/html/loop/backbone.html
index 79febf09..9d72a54f 100644
--- a/doc/html/loop/backbone.html
+++ b/doc/html/loop/backbone.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Backbone &mdash; ProMod3 0 documentation</title>
+    <title>Representing Loops &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,10 +23,10 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
-    <link rel="up" title="loop - Loop Modelling" href="index.html" />
-    <link rel="next" title="Torsion Sampler" href="torsion_sampler.html" />
-    <link rel="prev" title="loop - Loop Modelling" href="index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="loop - Loop Handling" href="index.html" />
+    <link rel="next" title="Sampling Dihedral Angles" href="torsion_sampler.html" />
+    <link rel="prev" title="loop - Loop Handling" href="index.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -39,14 +39,14 @@
         <div class="bodywrapper">
           <div class="body" role="main">
             
-  <div class="section" id="backbone">
-<h1>Backbone<a class="headerlink" href="#backbone" title="Permalink to this headline">¶</a></h1>
+  <div class="section" id="representing-loops">
+<h1>Representing Loops<a class="headerlink" href="#representing-loops" title="Permalink to this headline">¶</a></h1>
 <p>The most simple representation of structural information in ProMod3 is the
-<a class="reference internal" href="#promod3.loop.Backbone" title="promod3.loop.Backbone"><code class="xref py py-class docutils literal"><span class="pre">Backbone</span></code></a>. It provides a way to store the backbone positions of
-a residue. For simple structural manipulations they can be gathered to a
-<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> that can be inserted into or converted to a
-<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityHandle</span></code></a> at any time.</p>
+<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>. It provides a way to store the backbone positions of
+residues. They provide structural manipulations, they can be manipulated and
+converted from, to, or inserted to a <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityHandle</span></code></a>.</p>
 <div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span>
+<span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">conop</span>
 <span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span>
 
 <span class="n">sequence</span> <span class="o">=</span> <span class="s">&quot;AAAAAAAA&quot;</span>
@@ -66,7 +66,9 @@ a residue. For simple structural manipulations they can be gathered to a
 
 <span class="c"># we now use a TorsionSampler to set random dihedral angles</span>
 <span class="n">torsion_sampler</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadTorsionSampler</span><span class="p">()</span>
-<span class="n">idx</span> <span class="o">=</span> <span class="n">torsion_sampler</span><span class="o">.</span><span class="n">GetHistogramIndex</span><span class="p">(</span><span class="s">&quot;ALA&quot;</span><span class="p">,</span> <span class="s">&quot;ALA&quot;</span><span class="p">,</span> <span class="s">&quot;ALA&quot;</span><span class="p">)</span>
+<span class="n">idx</span> <span class="o">=</span> <span class="n">torsion_sampler</span><span class="o">.</span><span class="n">GetHistogramIndex</span><span class="p">(</span><span class="n">conop</span><span class="o">.</span><span class="n">ALA</span><span class="p">,</span> 
+                                        <span class="n">conop</span><span class="o">.</span><span class="n">ALA</span><span class="p">,</span> 
+                                        <span class="n">conop</span><span class="o">.</span><span class="n">ALA</span><span class="p">)</span>
 <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">bb_list</span><span class="p">)):</span>
     <span class="n">dihedrals</span> <span class="o">=</span> <span class="n">torsion_sampler</span><span class="o">.</span><span class="n">Draw</span><span class="p">(</span><span class="n">idx</span><span class="p">)</span>
     <span class="k">if</span> <span class="n">i</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
@@ -78,27 +80,39 @@ a residue. For simple structural manipulations they can be gathered to a
 <span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">bb_list</span><span class="o">.</span><span class="n">ToEntity</span><span class="p">(),</span> <span class="s">&quot;randomized_fragment.pdb&quot;</span><span class="p">)</span>
 </pre></div>
 </div>
-<div class="section" id="the-basic-building-blocks">
-<h2>The Basic Building Blocks<a class="headerlink" href="#the-basic-building-blocks" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="the-backbonelist-class">
+<h2>The BackboneList class<a class="headerlink" href="#the-backbonelist-class" title="Permalink to this headline">¶</a></h2>
 <dl class="class">
-<dt id="promod3.loop.Backbone">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">Backbone</code><a class="headerlink" href="#promod3.loop.Backbone" title="Permalink to this definition">¶</a></dt>
-<dd><p>Container for the positions of the backbone atoms (N,CA,CB,C and O) of a residue.</p>
+<dt id="promod3.loop.BackboneList">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">BackboneList</code><a class="headerlink" href="#promod3.loop.BackboneList" title="Permalink to this definition">¶</a></dt>
+<dd><p>Container for the positions of the backbone atoms (nitrogen (N), alpha carbon
+(CA), beta carbon (CB), carbon (C), oxygen (O)), the one letter codes and
+amino acid types of a segment. This object allows to get, set or modify the
+atom positions, etc through a set of functions (<strong>indexing to access each
+residue starts at 0</strong>). To simplify algorithms, which use this structure, each
+residue has a CB position defined (i.e. even if it&#8217;s a glycine) and we only
+allow amino acid types belonging to the 20 default amino acids. Note that the
+omega torsion angle defined here for residue <em>i</em> is the dihedral between CA-C
+of residue <em>i</em> and N-CA of residue <em>i+1</em> (this is shifted by 1 residue
+compared to OST&#8217;s <code class="xref py py-meth docutils literal"><span class="pre">GetOmegaTorsion()</span></code>).</p>
 <dl class="method">
-<dt id="promod3.loop.Backbone.Backbone">
-<code class="descname">Backbone</code><span class="sig-paren">(</span><em>n</em>, <em>ca</em>, <em>c</em>, <em>o</em>, <em>olc</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.Backbone.Backbone" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.loop.BackboneList.BackboneList">
+<code class="descname">BackboneList</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.BackboneList" title="Permalink to this definition">¶</a></dt>
+<dd><p>Creates empty BackboneList</p>
+</dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">BackboneList</code><span class="sig-paren">(</span><em>sequence</em><span class="sig-paren">)</span></dt>
+<dd><p>Creates a helical BackboneList from given sequence</p>
+<table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of nitrogen</li>
-<li><strong>ca</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of alpha carbon</li>
-<li><strong>c</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of carbon</li>
-<li><strong>o</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of oxygen</li>
-<li><strong>olc</strong> (<code class="xref py py-class docutils literal"><span class="pre">char</span></code>) &#8211; One letter code of the residue</li>
-</ul>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence of created BackboneList</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>sequence</em> contains a one letter
+code which is not one of the 20 default amino acids.</td>
 </tr>
 </tbody>
 </table>
@@ -106,214 +120,153 @@ a residue. For simple structural manipulations they can be gathered to a
 
 <dl class="method">
 <dt>
-<code class="descname">Backbone</code><span class="sig-paren">(</span><em>n</em>, <em>ca</em>, <em>c</em>, <em>o</em>, <em>cb</em>, <em>olc</em><span class="sig-paren">)</span></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
+<code class="descname">BackboneList</code><span class="sig-paren">(</span><em>sequence</em>, <em>dihedral_angles</em><span class="sig-paren">)</span></dt>
+<dd><p>Creates a BackboneList from given <em>sequence</em> and <em>dihedral_angles</em></p>
+<table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of nitrogen</li>
-<li><strong>ca</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of alpha carbon</li>
-<li><strong>c</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of carbon</li>
-<li><strong>o</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of oxygen</li>
-<li><strong>cb</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Position of beta carbon</li>
-<li><strong>olc</strong> (<code class="xref py py-class docutils literal"><span class="pre">char</span></code>) &#8211; One letter code of the residue</li>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence of created BackboneList</li>
+<li><strong>dihedral_angles</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; List of <code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> objects defining the backbone
+dihedral angles of created BackboneList. Every
+<code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> must either have two or three
+elements. Two elements are considered to define the
+phi and psi angles, leading to an idealized omega
+angle of 180 degrees. In case of three elements, all
+angles are defined.</li>
 </ul>
 </td>
 </tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>sequence</em> contains a one letter
+code which is not one of the 20 default amino acids or if
+<em>sequence</em> and <em>dihedral_angles</em> are inconsistent in size.</p>
+</td>
+</tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
 <dt>
-<code class="descname">Backbone</code><span class="sig-paren">(</span><em>res</em>, <em>olc</em><span class="sig-paren">)</span></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
+<code class="descname">BackboneList</code><span class="sig-paren">(</span><em>sequence</em>, <em>residues</em><span class="sig-paren">)</span></dt>
+<dd><p>Creates a BackboneList from given <em>sequence</em> and positions extracted from
+<em>residues</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ResidueHandle</span></code></a>) &#8211; Residue from which to extract backbone atom positions</li>
-<li><strong>olc</strong> (<code class="xref py py-class docutils literal"><span class="pre">char</span></code>) &#8211; One letter code of the residue</li>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence of created BackboneList</li>
+<li><strong>residues</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; List of <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a> objects from
+which the backbone positions are extracted.</li>
 </ul>
 </td>
 </tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>sequence</em> contains a one letter
+code which is not one of the 20 default amino acids or if
+<em>sequence</em> and <em>residues</em> are inconsistent in size or when there is
+a residue not providing all necessary positions.</p>
+</td>
+</tr>
 </tbody>
 </table>
 </dd></dl>
 
-<dl class="attribute">
-<dt id="promod3.loop.Backbone.n_coord">
-<code class="descname">n_coord</code><a class="headerlink" href="#promod3.loop.Backbone.n_coord" title="Permalink to this definition">¶</a></dt>
-<dd><p>Coordinate of the nitrogen atom (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>)</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.Backbone.ca_coord">
-<code class="descname">ca_coord</code><a class="headerlink" href="#promod3.loop.Backbone.ca_coord" title="Permalink to this definition">¶</a></dt>
-<dd><p>Coordinate of the C-alpha carbon atom (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>)</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.Backbone.c_coord">
-<code class="descname">c_coord</code><a class="headerlink" href="#promod3.loop.Backbone.c_coord" title="Permalink to this definition">¶</a></dt>
-<dd><p>Coordinate of the C carbon atom (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>)</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.Backbone.o_coord">
-<code class="descname">o_coord</code><a class="headerlink" href="#promod3.loop.Backbone.o_coord" title="Permalink to this definition">¶</a></dt>
-<dd><p>Coordinate of the oxygen atom (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>)</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.Backbone.cb_coord">
-<code class="descname">cb_coord</code><a class="headerlink" href="#promod3.loop.Backbone.cb_coord" title="Permalink to this definition">¶</a></dt>
-<dd><p>Coordinate of the C-beta carbon atom (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>)</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.Backbone.one_letter_code">
-<code class="descname">one_letter_code</code><a class="headerlink" href="#promod3.loop.Backbone.one_letter_code" title="Permalink to this definition">¶</a></dt>
-<dd><p>One letter code of the residue (<code class="xref py py-class docutils literal"><span class="pre">char</span></code>)</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.Backbone.aa">
-<code class="descname">aa</code><a class="headerlink" href="#promod3.loop.Backbone.aa" title="Permalink to this definition">¶</a></dt>
-<dd><p>Amino acid type of the residue (<code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code>)</p>
-</dd></dl>
-
 <dl class="method">
-<dt id="promod3.loop.Backbone.ApplyTransform">
-<code class="descname">ApplyTransform</code><span class="sig-paren">(</span><em>transformation_matrix</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.Backbone.ApplyTransform" title="Permalink to this definition">¶</a></dt>
-<dd><p>Applies a transformation to the coordinates of the backbone</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.loop.BackboneList.ToDensity">
+<code class="descname">ToDensity</code><span class="sig-paren">(</span><em>padding=10.0</em>, <em>sampling=Vec3(1.0</em>, <em>1.0</em>, <em>1.0)</em>, <em>resolution=3.0</em>, <em>high_resolution=false</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.ToDensity" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>transformation_matrix</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Mat4</span></code></a> / <code class="xref py py-class docutils literal"><span class="pre">ost.geom.Transform</span></code>) &#8211; The transformation</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The whole backbone list converted to a density map.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/img/base/img/#ost.img.ImageHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.img.ImageHandle</span></code></a></td>
 </tr>
 </tbody>
 </table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.Backbone.GetTransform">
-<code class="descname">GetTransform</code><span class="sig-paren">(</span><em>target</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.Backbone.GetTransform" title="Permalink to this definition">¶</a></dt>
-<dd><blockquote>
-<div>Get transformation performing a minimum RMSD transformation onto
-<em>target</em> considering the positions of the N, CA and C atoms.</div></blockquote>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>target</strong> (<a class="reference internal" href="#promod3.loop.Backbone" title="promod3.loop.Backbone"><code class="xref py py-class docutils literal"><span class="pre">Backbone</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; The target positions</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A 4x4 transformation matrix</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Mat4</span></code></a></td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>padding</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; </li>
+<li><strong>sampling</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; </li>
+<li><strong>resolution</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; </li>
+<li><strong>high_resolution</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; </li>
+</ul>
+</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
-</dd></dl>
-
-</div>
-<div class="section" id="editing-full-stretches-of-backbone-residues">
-<h2>Editing Full Stretches Of Backbone Residues<a class="headerlink" href="#editing-full-stretches-of-backbone-residues" title="Permalink to this headline">¶</a></h2>
-<dl class="class">
-<dt id="promod3.loop.BackboneList">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">BackboneList</code><a class="headerlink" href="#promod3.loop.BackboneList" title="Permalink to this definition">¶</a></dt>
-<dd><p>Container for the positions of the backbone atoms (N,CA,CB,C and O) of a
-segment. This object basically contains a list of <a class="reference internal" href="#promod3.loop.Backbone" title="promod3.loop.Backbone"><code class="xref py py-class docutils literal"><span class="pre">Backbone</span></code></a> and
-allows setting or modifying the positions of the atoms by setting/changing
-torsion angles.</p>
-<dl class="method">
-<dt id="promod3.loop.BackboneList.BackboneList">
-<code class="descname">BackboneList</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.BackboneList" title="Permalink to this definition">¶</a></dt>
-<dd><p>Creates empty BackboneList</p>
-</dd></dl>
-
 <dl class="method">
-<dt>
-<code class="descname">BackboneList</code><span class="sig-paren">(</span><em>sequence</em><span class="sig-paren">)</span></dt>
-<dd><p>Creates a helical BackboneList from given sequence</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.loop.BackboneList.ToEntity">
+<code class="descname">ToEntity</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.ToEntity" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence of created BackboneList</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The whole backbone list converted to an OST entity.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityHandle</span></code></a></td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt>
-<code class="descname">BackboneList</code><span class="sig-paren">(</span><em>sequence</em>, <em>dihedral_angles</em><span class="sig-paren">)</span></dt>
-<dd><p>Creates a BackboneList from given <strong>sequence</strong> and <strong>dihedral_angles</strong></p>
+<dt id="promod3.loop.BackboneList.InsertInto">
+<code class="descname">InsertInto</code><span class="sig-paren">(</span><em>chain</em>, <em>start_resnum</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.InsertInto" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inserts the backbone list into the <em>chain</em>. If the residues corresponding
+to the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> are already present in the entity, they will
+be replaced, otherwise they will be added to the entity.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence of created BackboneList</li>
-<li><strong>dihedral_angles</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; List of <code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> objects defining the backbone
-dihedral angles of created BackboneList. Every
-<code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> must either have two or three
-elements. Two elements are considered to define the
-phi and psi angles, leading to an idealized omega
-angle of 180 degrees. In case of three elements, all
-angles are defined.</li>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>chain</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ChainHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ChainHandle</span></code></a>) &#8211; The chain</li>
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResNum" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResNum</span></code></a>) &#8211; Residue number defining the start location of insertion</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>sequence</strong> and
-<strong>dihedral_angles</strong> are inconsistent in size.</p>
-</td>
-</tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
 <dt>
-<code class="descname">BackboneList</code><span class="sig-paren">(</span><em>sequence</em>, <em>residues</em><span class="sig-paren">)</span></dt>
-<dd><p>Creates a BackboneList from given <strong>sequence</strong> and positions extracted from
-<strong>residues</strong></p>
-<table class="docutils field-list" frame="void" rules="none">
+<code class="descname">InsertInto</code><span class="sig-paren">(</span><em>map</em>, <em>resolution=3.0</em>, <em>high_resolution=false</em><span class="sig-paren">)</span></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence of created BackboneList</li>
-<li><strong>residues</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; List of <a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a> objects from which the
-backbone positions are extracted.</li>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>map</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/img/base/img/#ost.img.ImageHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.img.ImageHandle</span></code></a>) &#8211; </li>
+<li><strong>resolution</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; </li>
+<li><strong>high_resolution</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; </li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>sequence</strong> and
-<strong>residues</strong> are inconsistent in size or when there is
-a residue not providing all necessary positions.</p>
-</td>
-</tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.ToEntity">
-<code class="descname">ToEntity</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.ToEntity" title="Permalink to this definition">¶</a></dt>
-<dd><p>Transforms the backbone list into an <a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityHandle</span></code></a>.</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.loop.BackboneList.GetBounds">
+<code class="descname">GetBounds</code><span class="sig-paren">(</span><em>all_atom=True</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetBounds" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The entity</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/geom/composite/#ost.geom.AlignedCuboid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.AlignedCuboid</span></code></a></td>
 </tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityHandle</span></code></a></td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>all_atom</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; </td>
 </tr>
 </tbody>
 </table>
@@ -326,7 +279,9 @@ a residue not providing all necessary positions.</p>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The amino acid sequence</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The amino acid sequence.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a></td>
 </tr>
 </tbody>
 </table>
@@ -335,7 +290,17 @@ a residue not providing all necessary positions.</p>
 <dl class="method">
 <dt id="promod3.loop.BackboneList.SetSequence">
 <code class="descname">SetSequence</code><span class="sig-paren">(</span><em>sequence</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetSequence" title="Permalink to this definition">¶</a></dt>
-<dd><p>Set amino acid sequence.</p>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Set amino acid sequence to this.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>sequence</em> contains a one letter
+code which is not one of the 20 default amino acids.</td>
+</tr>
+</tbody>
+</table>
 </dd></dl>
 
 <dl class="method">
@@ -354,41 +319,81 @@ a residue not providing all necessary positions.</p>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.MinCADistance">
-<code class="descname">MinCADistance</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.MinCADistance" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates the minimal pairwise CA-distance between this and the <em>other</em>
-<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a></p>
+<dt id="promod3.loop.BackboneList.ReplaceFragment">
+<code class="descname">ReplaceFragment</code><span class="sig-paren">(</span><em>sub_fragment</em>, <em>index</em>, <em>superpose_stems</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.ReplaceFragment" title="Permalink to this definition">¶</a></dt>
+<dd><p>Replaces a fragment of the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> starting at position
+<em>index</em> by the <em>sub_fragment</em>.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The other <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a></td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>sub_fragment</strong> (<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The fragment to be inserted</li>
+<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The position at which the fragment
+replacement will begin</li>
+<li><strong>superpose_stems</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If set to false, the function will simply
+replace the according
+<code class="xref py py-class docutils literal"><span class="pre">Backbone</span></code> objects. If set to True,
+the n-terminal and c-terminal tails are superposed onto the <em>sub_fragment</em>
+stems using the positions at <em>index</em> and
+<em>index</em> + len( <em>sub_fragment</em> )-1.</li>
+</ul>
+</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Minimal pairwise CA-distance</td>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if
+<em>sub_fragment</em> does not fully fit into
+actual fragment at specified <em>index</em></p>
+</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.InsertInto">
-<code class="descname">InsertInto</code><span class="sig-paren">(</span><em>chain</em>, <em>start_resnum</em>, <em>remodel_cterminal_o=True</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.InsertInto" title="Permalink to this definition">¶</a></dt>
-<dd><p>Inserts the backbone list into the <strong>chain</strong>. If the residues corresponding
-to the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> are already present in the entity, they will
-be replaced, otherwise they will be added to the entity.</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.loop.BackboneList.GetN">
+<code class="descname">GetN</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetN" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.GetCA">
+<code class="descname">GetCA</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetCA" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.GetCB">
+<code class="descname">GetCB</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetCB" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.GetC">
+<code class="descname">GetC</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetC" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.GetO">
+<code class="descname">GetO</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetO" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Position of nitrogen / alpha carbon / beta carbon / carbon / oxygen
+atom for residue at given index.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.BackboneList.SetN">
+<code class="descname">SetN</code><span class="sig-paren">(</span><em>index</em>, <em>pos</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetN" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.SetCA">
+<code class="descname">SetCA</code><span class="sig-paren">(</span><em>index</em>, <em>pos</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetCA" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.SetCB">
+<code class="descname">SetCB</code><span class="sig-paren">(</span><em>index</em>, <em>pos</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetCB" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.SetC">
+<code class="descname">SetC</code><span class="sig-paren">(</span><em>index</em>, <em>pos</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetC" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.SetO">
+<code class="descname">SetO</code><span class="sig-paren">(</span><em>index</em>, <em>pos</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetO" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>chain</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ChainHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ChainHandle</span></code></a>) &#8211; The chain</li>
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> / <code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResNum</span></code>) &#8211; Residue number defining the start location of
-insertion</li>
-<li><strong>remodel_cterminal_o</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; The position of the cterminal o is dependent
-on the residue after the c_stem. If this flag
-is set and the residue after the cterminus is
-present in <strong>chain</strong>, the according oxygen
-position gets recalculated.</li>
+<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index.</li>
+<li><strong>pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Set position of nitrogen / alpha carbon / beta carbon / carbon
+/ oxygen atom to this.</li>
 </ul>
 </td>
 </tr>
@@ -397,74 +402,98 @@ position gets recalculated.</li>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.ReconstructCBetaPositions">
-<code class="descname">ReconstructCBetaPositions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.ReconstructCBetaPositions" title="Permalink to this definition">¶</a></dt>
-<dd><p>Does a simple reconstruction of all CBeta positions based on the actual
-n, ca, and c positions.</p>
+<dt id="promod3.loop.BackboneList.GetOLC">
+<code class="descname">GetOLC</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetOLC" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">One letter code of the residue at given index.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">char</span></code></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index.</td>
+</tr>
+</tbody>
+</table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.ReconstructOxygenPositions">
-<code class="descname">ReconstructOxygenPositions</code><span class="sig-paren">(</span><em>last_psi=-0.78540</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.ReconstructOxygenPositions" title="Permalink to this definition">¶</a></dt>
-<dd><p>Does a simple reconstruction of all oxygen positions based on the actual
-n, ca and c positions. The position of the last oxygen depends on the next
-residue, an additional parameter is therefore required.</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.loop.BackboneList.SetOLC">
+<code class="descname">SetOLC</code><span class="sig-paren">(</span><em>index</em>, <em>olc</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetOLC" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>last_psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Psi angle of the last BackboneList residue,
-the default value corresponds to a typical alpha-helix</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index.</li>
+<li><strong>olc</strong> (<code class="xref py py-class docutils literal"><span class="pre">char</span></code>) &#8211; Set one letter code of the residue to this.</li>
+</ul>
+</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.ApplyTransform">
-<code class="descname">ApplyTransform</code><span class="sig-paren">(</span><em>transform</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.ApplyTransform" title="Permalink to this definition">¶</a></dt>
-<dd><p>Applies a transformation to the positions of the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>.</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.loop.BackboneList.GetAA">
+<code class="descname">GetAA</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetAA" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>transform</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.geom.Transform</span></code> / <a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Mat4</span></code></a>) &#8211; The transformation</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Amino acid type of the residue at given index.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index.</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.SetPhiTorsion">
-<code class="descname">SetPhiTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>angle</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetPhiTorsion" title="Permalink to this definition">¶</a></dt>
-<dd><p>Sets the <em>phi</em> torsion angle of the backbone at position <strong>index</strong> in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>.</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.loop.BackboneList.SetAA">
+<code class="descname">SetAA</code><span class="sig-paren">(</span><em>index</em>, <em>aa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetAA" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the residue in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> for which the angle should be set.</li>
-<li><strong>angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The angle</li>
-<li><strong>sequential</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If <em>True</em>, the rotation will be propagated to all residues after the one with <strong>index</strong>. Otherwise it will be propagated in the direction where it will affect the least number of residues.</li>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index.</li>
+<li><strong>aa</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; Set amino acid type of the residue to this.</li>
 </ul>
 </td>
 </tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>aa</em> == ost.conop.XXX.</p>
+</td>
+</tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.SetPsiTorsion">
-<code class="descname">SetPsiTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>angle</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetPsiTorsion" title="Permalink to this definition">¶</a></dt>
-<dd><p>Sets the <em>psi</em> torsion angle of the backbone at position <strong>index</strong> in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>.</p>
+<dt id="promod3.loop.BackboneList.Set">
+<code class="descname">Set</code><span class="sig-paren">(</span><em>index</em>, <em>n_pos</em>, <em>ca_pos</em>, <em>cb_pos</em>, <em>c_pos</em>, <em>o_pos</em>, <em>olc</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.Set" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">Set</code><span class="sig-paren">(</span><em>index</em>, <em>n_pos</em>, <em>ca_pos</em>, <em>c_pos</em>, <em>o_pos</em>, <em>olc</em><span class="sig-paren">)</span></dt>
+<dt>
+<code class="descname">Set</code><span class="sig-paren">(</span><em>index</em>, <em>res</em>, <em>olc</em><span class="sig-paren">)</span></dt>
+<dd><p>Set all backbone informations. This will reconstruct CB positions if needed
+and set the amino acid type according to the given one letter code.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the residue in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> for which the angle should be set.</li>
-<li><strong>angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The angle</li>
-<li><strong>sequential</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If <em>True</em>, the rotation will be propagated to all residues after the one with <strong>index</strong>. Otherwise it will be propagated in the direction where it will affect the least number of residues.</li>
+<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index.</li>
+<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ResidueHandle</span></code></a>) &#8211; Residue from which to extract backbone atom positions</li>
+<li><strong>n_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Set position of nitrogen atom to this.</li>
+<li><strong>ca_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Set position of alpha carbon atom to this.</li>
+<li><strong>cb_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Set position of beta carbon atom to this.</li>
+<li><strong>c_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Set position of carbon atom to this.</li>
+<li><strong>o_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Set position of oxygen atom to this.</li>
+<li><strong>olc</strong> (<code class="xref py py-class docutils literal"><span class="pre">char</span></code>) &#8211; Set one letter code of the residue to this.</li>
 </ul>
 </td>
 </tr>
@@ -473,37 +502,73 @@ the default value corresponds to a typical alpha-helix</td>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.SetOmegaTorsion">
-<code class="descname">SetOmegaTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>angle</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetOmegaTorsion" title="Permalink to this definition">¶</a></dt>
-<dd><p>Sets the <em>omega</em> torsion angle of the backbone at position <strong>index</strong> in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>.</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.loop.BackboneList.__len__">
+<code class="descname">__len__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.__len__" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the residue in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> for which the angle should be set.</li>
-<li><strong>angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The angle</li>
-<li><strong>sequential</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If <em>True</em>, the rotation will be propagated to all residues after the one with <strong>index</strong>. Otherwise it will be propagated in the direction where it will affect the least number of residues.</li>
-</ul>
-</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of residues in this backbone list.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.SetPhiPsiTorsion">
-<code class="descname">SetPhiPsiTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>phi</em>, <em>psi</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetPhiPsiTorsion" title="Permalink to this definition">¶</a></dt>
-<dd><p>Sets the <em>phi</em> and <em>psi</em> torsion angle of the backbone at position <strong>index</strong> in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>.</p>
+<dt id="promod3.loop.BackboneList.resize">
+<code class="descname">resize</code><span class="sig-paren">(</span><em>new_size</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.resize" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>new_size</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Resize backbone list to contain this number of residues.
+If new residues are added, their properties will not be
+initialized. Existing residues are untouched unless the
+list is shrinked (in that case extra residues are deleted).</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.BackboneList.empty">
+<code class="descname">empty</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.empty" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the list is empty (i.e. size 0).</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.BackboneList.append">
+<code class="descname">append</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>cb_pos</em>, <em>c_pos</em>, <em>o_pos</em>, <em>olc</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.append" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">append</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>c_pos</em>, <em>o_pos</em>, <em>olc</em><span class="sig-paren">)</span></dt>
+<dt>
+<code class="descname">append</code><span class="sig-paren">(</span><em>res</em>, <em>olc</em><span class="sig-paren">)</span></dt>
+<dd><p>Appends a new residue at the end of the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>. This will
+reconstruct CB positions if needed and set the amino acid type according
+to the given one letter code.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the residue in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> for which the angle should be set.</li>
-<li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The phi angle</li>
-<li><strong>psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The psi angle</li>
-<li><strong>sequential</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If <em>True</em>, the rotation will be propagated to all residues after the one with <strong>index</strong>. Otherwise it will be propagated in the direction where it will affect the least number of residues.</li>
+<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ResidueHandle</span></code></a>) &#8211; Residue from which to extract backbone atom positions</li>
+<li><strong>n_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Set position of nitrogen atom to this.</li>
+<li><strong>ca_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Set position of alpha carbon atom to this.</li>
+<li><strong>cb_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Set position of beta carbon atom to this.</li>
+<li><strong>c_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Set position of carbon atom to this.</li>
+<li><strong>o_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>) &#8211; Set position of oxygen atom to this.</li>
+<li><strong>olc</strong> (<code class="xref py py-class docutils literal"><span class="pre">char</span></code>) &#8211; Set one letter code of the residue to this.</li>
 </ul>
 </td>
 </tr>
@@ -512,59 +577,78 @@ the default value corresponds to a typical alpha-helix</td>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.GetPhiTorsion">
-<code class="descname">GetPhiTorsion</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetPhiTorsion" title="Permalink to this definition">¶</a></dt>
-<dd><p>Get the <em>phi</em> torsion angle of the residue with <strong>index</strong> in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a></p>
+<dt id="promod3.loop.BackboneList.clear">
+<code class="descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.clear" title="Permalink to this definition">¶</a></dt>
+<dd><p>Remove all residues from this list.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.BackboneList.Copy">
+<code class="descname">Copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.Copy" title="Permalink to this definition">¶</a></dt>
+<dd><p>Creates and returns a deep copy of this <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>. This can be
+useful, since Python uses reference assignments.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index</td>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a></td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.GetPsiTorsion">
-<code class="descname">GetPsiTorsion</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetPsiTorsion" title="Permalink to this definition">¶</a></dt>
-<dd><p>Get the <em>psi</em> torsion angle of the residue with <strong>index</strong> in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a></p>
+<dt id="promod3.loop.BackboneList.ReconstructCBetaPositions">
+<code class="descname">ReconstructCBetaPositions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.ReconstructCBetaPositions" title="Permalink to this definition">¶</a></dt>
+<dd><p>Does a simple reconstruction of all CB positions based on the current
+N, CA and C positions.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.BackboneList.ReconstructOxygenPositions">
+<code class="descname">ReconstructOxygenPositions</code><span class="sig-paren">(</span><em>last_psi=-0.78540</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.ReconstructOxygenPositions" title="Permalink to this definition">¶</a></dt>
+<dd><p>Does a simple reconstruction of all oxygen positions based on the actual
+N, CA and C positions. The position of the last oxygen depends on the next
+residue, an additional parameter is therefore required.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>last_psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Psi angle of the last BackboneList residue,
+the default value corresponds to a typical alpha-helix.</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.GetOmegaTorsion">
-<code class="descname">GetOmegaTorsion</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetOmegaTorsion" title="Permalink to this definition">¶</a></dt>
-<dd><p>Get the <em>omega</em> torsion angle of the residue with <strong>index</strong> in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a></p>
+<dt id="promod3.loop.BackboneList.ReconstructCStemOxygen">
+<code class="descname">ReconstructCStemOxygen</code><span class="sig-paren">(</span><em>after_c_stem</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.ReconstructCStemOxygen" title="Permalink to this definition">¶</a></dt>
+<dd><p>Reconstructs the last oxygen of this backbone list. The oxygen position
+depends on the residue following the C stem. The position is only
+reconstructed if the residue handle is valid.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>after_c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue following the C stem (C stem residue is last
+element of this backbone list)</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.RotateAroundPhiTorsion">
-<code class="descname">RotateAroundPhiTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>angle</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.RotateAroundPhiTorsion" title="Permalink to this definition">¶</a></dt>
-<dd><p>Rotates the <em>phi</em> torsion angle of the backbone at position <strong>index</strong> in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> by <strong>angle</strong>.</p>
+<dt id="promod3.loop.BackboneList.ApplyTransform">
+<code class="descname">ApplyTransform</code><span class="sig-paren">(</span><em>index</em>, <em>transform</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.ApplyTransform" title="Permalink to this definition">¶</a></dt>
+<dd><p>Applies a transformation to the positions of a single residue.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the residue in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> for which the angle should be set.</li>
-<li><strong>angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The angle</li>
-<li><strong>sequential</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If <em>True</em>, the rotation will be propagated to all residues after the one with <strong>index</strong>. Otherwise it will be propagated in the direction where it will affect the least number of residues.</li>
+<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index.</li>
+<li><strong>transform</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Mat4</span></code></a>) &#8211; The transformation</li>
 </ul>
 </td>
 </tr>
@@ -573,17 +657,18 @@ the default value corresponds to a typical alpha-helix</td>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.RotateAroundPsiTorsion">
-<code class="descname">RotateAroundPsiTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>angle</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.RotateAroundPsiTorsion" title="Permalink to this definition">¶</a></dt>
-<dd><p>Rotates the <em>psi</em> torsion angle of the backbone at position <strong>index</strong> in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> by <strong>angle</strong>.</p>
+<dt>
+<code class="descname">ApplyTransform</code><span class="sig-paren">(</span><em>from</em>, <em>to</em>, <em>transform</em><span class="sig-paren">)</span></dt>
+<dd><p>Applies a transformation to the positions of the residues with indices
+<em>from</em>, ..., <em>to</em>-1 of this list.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the residue in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> for which the angle should be set.</li>
-<li><strong>angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The angle</li>
-<li><strong>sequential</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If <em>True</em>, the rotation will be propagated to all residues after the one with <strong>index</strong>. Otherwise it will be propagated in the direction where it will affect the least number of residues.</li>
+<li><strong>from</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Start index.</li>
+<li><strong>to</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; End index (one past last residue to transform).</li>
+<li><strong>transform</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Mat4</span></code></a>) &#8211; The transformation</li>
 </ul>
 </td>
 </tr>
@@ -592,37 +677,41 @@ the default value corresponds to a typical alpha-helix</td>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.RotateAroundOmegaTorsion">
-<code class="descname">RotateAroundOmegaTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>angle</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.RotateAroundOmegaTorsion" title="Permalink to this definition">¶</a></dt>
-<dd><p>Rotates the <em>omega</em> torsion angle of the backbone at position <strong>index</strong> in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> by <strong>angle</strong>.</p>
+<dt>
+<code class="descname">ApplyTransform</code><span class="sig-paren">(</span><em>transform</em><span class="sig-paren">)</span></dt>
+<dd><p>Applies a transformation to all positions of this list.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the residue in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> for which the angle should be set.</li>
-<li><strong>angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The angle</li>
-<li><strong>sequential</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If <em>True</em>, the rotation will be propagated to all residues after the one with <strong>index</strong>. Otherwise it will be propagated in the direction where it will affect the least number of residues.</li>
-</ul>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>transform</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.geom.Transform</span></code> / <a class="reference external" href="http://www.openstructure.org/docs/dev/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Mat4</span></code></a>) &#8211; The transformation</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.RotateAroundPhiPsiTorsion">
-<code class="descname">RotateAroundPhiPsiTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>phi</em>, <em>psi</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.RotateAroundPhiPsiTorsion" title="Permalink to this definition">¶</a></dt>
-<dd><p>Rotates the <em>phi</em> and <em>psi</em> torsion angle of the backbone at position <strong>index</strong> in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> by <strong>phi</strong> and <strong>psi</strong>.</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.loop.BackboneList.GetTransform">
+<code class="descname">GetTransform</code><span class="sig-paren">(</span><em>index</em>, <em>res</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetTransform" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">GetTransform</code><span class="sig-paren">(</span><em>index</em>, <em>other</em>, <em>other_index</em><span class="sig-paren">)</span></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Minimum RMSD transformation of residue <em>index</em> onto <em>res</em> or
+residue <em>other_index</em> of <em>other</em> backbone list considering the
+positions of the N, CA and C atoms.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="http://www.openstructure.org/docs/dev/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Mat4</span></code></a></p>
+</td>
+</tr>
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the residue in the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> for which the angle should be set.</li>
-<li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The phi angle</li>
-<li><strong>psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The psi angle</li>
-<li><strong>sequential</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If <em>True</em>, the rotation will be propagated to all residues after the one with <strong>index</strong>. Otherwise it will be propagated in the direction where it will affect the least number of residues.</li>
+<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index.</li>
+<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; The other residue.</li>
+<li><strong>other</strong> (<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The other backbone list.</li>
+<li><strong>other_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index in <em>other</em> backbone list.</li>
 </ul>
 </td>
 </tr>
@@ -631,65 +720,69 @@ the default value corresponds to a typical alpha-helix</td>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.ReplaceFragment">
-<code class="descname">ReplaceFragment</code><span class="sig-paren">(</span><em>sub_fragment</em>, <em>index</em>, <em>superpose_stems</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.ReplaceFragment" title="Permalink to this definition">¶</a></dt>
-<dd><p>Replaces a fragment of the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> starting at position
-<strong>index</strong> by the <strong>sub_fragment</strong>.</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt>
+<code class="descname">GetTransform</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>sub_fragment</strong> (<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The fragment to be inserted</li>
-<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The position at which the fragment
-replacement will begin</li>
-<li><strong>superpose_stems</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If set to false, the function will simply
-replace the according
-<a class="reference internal" href="#promod3.loop.Backbone" title="promod3.loop.Backbone"><code class="xref py py-class docutils literal"><span class="pre">Backbone</span></code></a> objects. If set to true,
-the n-terminal and c-terminal tails are superposed onto the <strong>sub_fragment</strong>
-stems using the positions at <strong>index</strong> and
-<strong>index</strong> + len( <strong>sub_fragment</strong> )-1.</li>
-</ul>
-</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Get minimum RMSD transformation of CA positions of this backbone
+list onto CA positions of <em>other</em> backbone list.</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if
-<strong>sub_fragment</strong> does not fully fit into
-actual fragment at specified <strong>index</strong></p>
-</td>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Mat4</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The other backbone list.</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.CARMSD">
-<code class="descname">CARMSD</code><span class="sig-paren">(</span><em>other</em>, <em>superposed_rmsd=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.CARMSD" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates the C-alpha RMSD between this <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> and an <strong>other</strong> backbone list.</p>
+<dt id="promod3.loop.BackboneList.SuperposeOnto">
+<code class="descname">SuperposeOnto</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SuperposeOnto" title="Permalink to this definition">¶</a></dt>
+<dd><p>Superposes this backbone list onto another one using CA positions.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>other</strong> (<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Other backbone list</li>
-<li><strong>superposed_rmsd</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; whether to superpose before calculating the RMSD</li>
-</ul>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The other backbone list.</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.RMSD">
-<code class="descname">RMSD</code><span class="sig-paren">(</span><em>other</em>, <em>superposed_rmsd=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.RMSD" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates the RMSD between this <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> and an <strong>other</strong> backbone list.</p>
+<dt id="promod3.loop.BackboneList.RotateAroundPhiTorsion">
+<code class="descname">RotateAroundPhiTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>phi</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.RotateAroundPhiTorsion" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.RotateAroundPsiTorsion">
+<code class="descname">RotateAroundPsiTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>psi</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.RotateAroundPsiTorsion" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.RotateAroundOmegaTorsion">
+<code class="descname">RotateAroundOmegaTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>omega</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.RotateAroundOmegaTorsion" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.RotateAroundPhiPsiTorsion">
+<code class="descname">RotateAroundPhiPsiTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>phi</em>, <em>psi</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.RotateAroundPhiPsiTorsion" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.SetAroundPhiTorsion">
+<code class="descname">SetAroundPhiTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>phi</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetAroundPhiTorsion" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.SetAroundPsiTorsion">
+<code class="descname">SetAroundPsiTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>psi</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetAroundPsiTorsion" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.SetAroundOmegaTorsion">
+<code class="descname">SetAroundOmegaTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>omega</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetAroundOmegaTorsion" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.SetAroundPhiPsiTorsion">
+<code class="descname">SetAroundPhiPsiTorsion</code><span class="sig-paren">(</span><em>index</em>, <em>phi</em>, <em>psi</em>, <em>sequential=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetAroundPhiPsiTorsion" title="Permalink to this definition">¶</a></dt>
+<dd><p>Rotates/sets the phi/psi/omega torsion angle of the backbone at position
+<em>index</em> in the backbone list by/to the given angle(s).</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>other</strong> (<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Other backbone list</li>
-<li><strong>superposed_rmsd</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; whether to superpose before calculating the RMSD</li>
+<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index.</li>
+<li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Angle by which to rotate phi torsion.</li>
+<li><strong>psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Angle by which to rotate psi torsion.</li>
+<li><strong>omega</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Angle by which to rotate omega torsion.</li>
+<li><strong>sequential</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If <em>True</em>, the rotation will be propagated to all
+residues after the one with <em>index</em>. Otherwise, it will
+be propagated in the direction where it will affect the
+least number of residues.</li>
 </ul>
 </td>
 </tr>
@@ -698,73 +791,158 @@ actual fragment at specified <strong>index</strong></p>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.SuperposeOnto">
-<code class="descname">SuperposeOnto</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SuperposeOnto" title="Permalink to this definition">¶</a></dt>
-<dd><p>Superposes this <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> onto another one</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.loop.BackboneList.GetPhiTorsion">
+<code class="descname">GetPhiTorsion</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetPhiTorsion" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.GetPsiTorsion">
+<code class="descname">GetPsiTorsion</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetPsiTorsion" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.GetOmegaTorsion">
+<code class="descname">GetOmegaTorsion</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetOmegaTorsion" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The other backbone list</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The phi/psi/omega torsion angle for residue at given index.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index.</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.GetTransform">
-<code class="descname">GetTransform</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.GetTransform" title="Permalink to this definition">¶</a></dt>
-<dd><p>Get transofrm to superpose this <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> onto another one</p>
+<dt id="promod3.loop.BackboneList.TransOmegaTorsions">
+<code class="descname">TransOmegaTorsions</code><span class="sig-paren">(</span><em>thresh=20/180*pi</em>, <em>allow_prepro_cis=True</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.TransOmegaTorsions" title="Permalink to this definition">¶</a></dt>
+<dd><p>Checks whether this backbone list only contains trans omega torsion angles.
+Usually, you would want this to be the case, but it can fail if you have any
+unfavorable omega torsion angle in your backbone.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The other backbone list</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Allowed deviation from ideal trans angle (pi)</li>
+<li><strong>allow_prepro_cis</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether cis-omega torsions should be
+allowed in case of a subsequent proline.</li>
+</ul>
+</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A 4x4 transformation matrix</td>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">whether <em>bb_list</em> only contains trans-omega torsions.</p>
+</td>
 </tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Mat4</span></code></a></td>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of this backbone list is
+smaller than 3.</p>
+</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.append">
-<code class="descname">append</code><span class="sig-paren">(</span><em>bb</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.append" title="Permalink to this definition">¶</a></dt>
-<dd><p>Appends the backbone <strong>bb</strong> at the end of the <a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>.</p>
+<dt id="promod3.loop.BackboneList.SetBackrub">
+<code class="descname">SetBackrub</code><span class="sig-paren">(</span><em>index</em>, <em>primary_rot_angle</em>, <em>flanking_rot_angle_one</em>, <em>flanking_rot_angle_two</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.SetBackrub" title="Permalink to this definition">¶</a></dt>
+<dd><p>Applies a backrub motion at residue defined by <strong>index</strong>. The first
+rotation axis is defined by the CA positions from residues at
+<strong>index</strong> -1 and <strong>index</strong> +1. All atoms in between get rotated around this
+axis by <strong>primary_rot_angle</strong>. To restore the the hydrogen bond network
+of the two transformed oxygens, the backrub motion gets completed by
+two compensatory rotations. The first rotation is around the axis defined by
+the CA position from residue <strong>index</strong>-1 and the transformed central CA
+position with an angle of <strong>flanking_rot_angle_one</strong>. The second rotation is
+around the axis from the transformed central CA position to the CA position
+from residue at position <strong>index</strong> +1 with an angle of
+<strong>flanking_rot_angle_two</strong>.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bb</strong> (<a class="reference internal" href="#promod3.loop.Backbone" title="promod3.loop.Backbone"><code class="xref py py-class docutils literal"><span class="pre">Backbone</span></code></a>) &#8211; The backbone</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Position of central residue of the backrub motion</li>
+<li><strong>primary_rot_angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Angle of the first rotation in radians</li>
+<li><strong>flanking_rot_angle_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Angle of the first compensatory rotation
+in radians</li>
+<li><strong>flanking_rot_angle_two</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Angle of the second compensatory rotation
+in radians</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>index</strong> is smaller 1 or
+larger size of BackboneList - 2</p>
+</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.__getitem__">
-<code class="descname">__getitem__</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.__getitem__" title="Permalink to this definition">¶</a></dt>
-<dt id="promod3.loop.BackboneList.__setitem__">
-<code class="descname">__setitem__</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.__setitem__" title="Permalink to this definition">¶</a></dt>
-<dd><p>Allow read/write access (with [<em>index</em>]) to backbone at given <em>index</em>.</p>
+<dt>
+<code class="descname">SetBackrub</code><span class="sig-paren">(</span><em>index</em>, <em>primary_rot_angle</em><span class="optional">[</span>, <em>scaling=1.0</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
+<dd><p>Applies the backrub motion described above but calculates the ideal angles
+for the compensatory rotations in a way, that the new oxygen positions are
+as close as possible to the original ones. The ideal angles can be scaled
+down by <strong>scaling</strong> to make them less extreme.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Position of central residue of the backrub motion</li>
+<li><strong>primary_rot_angle</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Angle of the first rotation in radians</li>
+<li><strong>scaling</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The ideal angles for the compensatory rotations will
+be scaled by this value.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>index</strong> is smaller 1 or
+larger size of BackboneList - 2</p>
+</td>
+</tr>
+</tbody>
+</table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.__iter__">
-<code class="descname">__iter__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.__iter__" title="Permalink to this definition">¶</a></dt>
-<dd><p>Makes list iterable.</p>
+<dt id="promod3.loop.BackboneList.MinCADistance">
+<code class="descname">MinCADistance</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.MinCADistance" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Minimal pairwise CA-distance between this and the <em>other</em>
+backbone list.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The other backbone list.</td>
+</tr>
+</tbody>
+</table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.BackboneList.__len__">
-<code class="descname">__len__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.__len__" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.RMSD">
+<code class="descname">RMSD</code><span class="sig-paren">(</span><em>other</em>, <em>superposed_rmsd=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.RMSD" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.BackboneList.CARMSD">
+<code class="descname">CARMSD</code><span class="sig-paren">(</span><em>other</em>, <em>superposed_rmsd=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneList.CARMSD" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of backbones in the list.</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">RMSD / C-alpha RMSD between this and the <em>other</em> backbone list.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>other</strong> (<a class="reference internal" href="#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The other backbone list.</li>
+<li><strong>superposed_rmsd</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether to superpose before calculating the RMSD.</li>
+</ul>
+</td>
 </tr>
 </tbody>
 </table>
@@ -783,9 +961,8 @@ actual fragment at specified <strong>index</strong></p>
         <div class="sphinxsidebarwrapper">
   <h3><a href="../index.html">Table Of Contents</a></h3>
   <ul>
-<li><a class="reference internal" href="#">Backbone</a><ul>
-<li><a class="reference internal" href="#the-basic-building-blocks">The Basic Building Blocks</a></li>
-<li><a class="reference internal" href="#editing-full-stretches-of-backbone-residues">Editing Full Stretches Of Backbone Residues</a></li>
+<li><a class="reference internal" href="#">Representing Loops</a><ul>
+<li><a class="reference internal" href="#the-backbonelist-class">The BackboneList class</a></li>
 </ul>
 </li>
 </ul>
@@ -794,9 +971,9 @@ actual fragment at specified <strong>index</strong></p>
 <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="docutils literal"><span class="pre">loop</span></code> - Loop Modelling</a><ul>
-      <li>Previous: <a href="index.html" title="previous chapter"><code class="docutils literal"><span class="pre">loop</span></code> - Loop Modelling</a></li>
-      <li>Next: <a href="torsion_sampler.html" title="next chapter">Torsion Sampler</a></li>
+  <li><a href="index.html"><code class="docutils literal"><span class="pre">loop</span></code> - Loop Handling</a><ul>
+      <li>Previous: <a href="index.html" title="previous chapter"><code class="docutils literal"><span class="pre">loop</span></code> - Loop Handling</a></li>
+      <li>Next: <a href="torsion_sampler.html" title="next chapter">Sampling Dihedral Angles</a></li>
   </ul></li>
   </ul></li>
   </ul></li>
@@ -827,7 +1004,7 @@ actual fragment at specified <strong>index</strong></p>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/loop/backbone_loop_score.html b/doc/html/loop/backbone_loop_score.html
deleted file mode 100644
index 8587dd80..00000000
--- a/doc/html/loop/backbone_loop_score.html
+++ /dev/null
@@ -1,1227 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    
-    <title>Loop Scoring &mdash; ProMod3 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">
-      var DOCUMENTATION_OPTIONS = {
-        URL_ROOT:    '../',
-        VERSION:     '0',
-        COLLAPSE_INDEX: false,
-        FILE_SUFFIX: '.html',
-        HAS_SOURCE:  true
-      };
-    </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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
-    <link rel="up" title="loop - Loop Modelling" href="index.html" />
-    <link rel="next" title="Monte Carlo Sampling" href="monte_carlo.html" />
-    <link rel="prev" title="Loop Closing" href="loop_closing.html" />
-   
-  
-  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
-
-  </head>
-  <body role="document">  
-
-    <div class="document">
-      <div class="documentwrapper">
-        <div class="bodywrapper">
-          <div class="body" role="main">
-            
-  <div class="section" id="loop-scoring">
-<h1>Loop Scoring<a class="headerlink" href="#loop-scoring" title="Permalink to this headline">¶</a></h1>
-<div class="section" id="the-backboneloopscorer">
-<h2>The BackboneLoopScorer<a class="headerlink" href="#the-backboneloopscorer" title="Permalink to this headline">¶</a></h2>
-<p>The <a class="reference internal" href="#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a> provides several terms to assess a
-loop conformations plausibility. All values of the different scores
-can be set manually. Once the scores are set, the scorer can be
-saved/loaded from/to disk. Setting the scores can be avoided by
-just loading the default scorer, which should satisfy most needs.
-To be used, the scorer must be initialized with a seqres.
-After initialization the structural environment can be set.
-This environment defines the particles a certain loop interacts with
-and can be reset/extended at any time in the modelling process.
-To score a certain loop you must define its exact location in the
-environment using a <em>chain_idx</em> and <em>start_resnum</em>:</p>
-<ul>
-<li><dl class="first docutils">
-<dt><em>chain_idx</em>:</dt>
-<dd><p class="first last">Index of chain as it occurs in the sequence list you initialized
-the scorer with (0 in case of a single sequence)</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt><em>start_resnum</em>:</dt>
-<dd><p class="first last">Residue number defining the position in the SEQRES of chain with
-index <em>chain_idx</em>. <strong>The numbering starts for every chain with
-the value 1</strong>.</p>
-</dd>
-</dl>
-</li>
-</ul>
-<p>The following scores are available:</p>
-<ul>
-<li><dl class="first docutils">
-<dt><strong>ClashScore:</strong> (see <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.CalculateClashScore" title="promod3.loop.BackboneLoopScorer.CalculateClashScore"><code class="xref py py-func docutils literal"><span class="pre">CalculateClashScore()</span></code></a>)</dt>
-<dd><p class="first last">Calculates a simple clash score of a loop itself and with the set
-environment. There is no need to define any parameters if you start with an
-empty scorer.</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt><strong>CBetaScore:</strong> (see <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.CalculateCBetaScore" title="promod3.loop.BackboneLoopScorer.CalculateCBetaScore"><code class="xref py py-func docutils literal"><span class="pre">CalculateCBetaScore()</span></code></a>)</dt>
-<dd><p class="first last">Evaluates a pairwise pseudo interaction energy between CB atoms. If you
-start with an empty scorer you need to parametrize the energy function by
-calling <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.SetCBetaPotentialParameters" title="promod3.loop.BackboneLoopScorer.SetCBetaPotentialParameters"><code class="xref py py-func docutils literal"><span class="pre">SetCBetaPotentialParameters()</span></code></a>. You can
-then set an energy value for every possible pair of residues given the
-distance of their CB atoms (see <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.SetCBetaEnergy" title="promod3.loop.BackboneLoopScorer.SetCBetaEnergy"><code class="xref py py-func docutils literal"><span class="pre">SetCBetaEnergy()</span></code></a>).
-Every pairwise interaction within the loop and to the environment gets
-evaluated according to the given parametrization, summed up and finally
-normalized by the number of total interactions.</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt><strong>ReducedScore:</strong> (see <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.CalculateReducedScore" title="promod3.loop.BackboneLoopScorer.CalculateReducedScore"><code class="xref py py-func docutils literal"><span class="pre">CalculateReducedScore()</span></code></a>)</dt>
-<dd><p class="first">Evaluates a pairwise pseudo  interaction energy between the reduced
-representation of residues. Every residue gets represented by its CA
-position p and a directional component <code class="docutils literal"><span class="pre">v</span> <span class="pre">=</span> <span class="pre">norm(ca_pos-n_pos)</span> <span class="pre">+</span> <span class="pre">norm</span>
-<span class="pre">(ca_pos-c_pos)</span></code>. Assuming an interaction between residues r1 and r2, we can
-define a line l between p1 and p2. The potential then considers:</p>
-<ul class="simple">
-<li>dist =&gt; distance between p1 and p2</li>
-<li>alpha =&gt; angle between v1 and l</li>
-<li>beta =&gt; angle between v2 and l</li>
-<li>gamma =&gt; dihedral between (p1+v1,p1,p2,p2+v2)</li>
-</ul>
-<p class="last">If you start with an empty scorer you need to parametrize the energy
-function by calling
-<a class="reference internal" href="#promod3.loop.BackboneLoopScorer.SetReducedPotentialParameters" title="promod3.loop.BackboneLoopScorer.SetReducedPotentialParameters"><code class="xref py py-func docutils literal"><span class="pre">SetReducedPotentialParameters()</span></code></a>. You can then set
-an energy value for every possible pair of residues given the distance of
-their CA atoms and the according angles (see
-<a class="reference internal" href="#promod3.loop.BackboneLoopScorer.SetReducedEnergy" title="promod3.loop.BackboneLoopScorer.SetReducedEnergy"><code class="xref py py-func docutils literal"><span class="pre">SetReducedEnergy()</span></code></a>). Every pairwise interaction
-within the loop and to the environment gets evaluated according to the given
-parametrization, summed up and finally normalized by the number of total
-interactions.</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt><strong>TorsionScore:</strong> (see <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.CalculateTorsionScore" title="promod3.loop.BackboneLoopScorer.CalculateTorsionScore"><code class="xref py py-func docutils literal"><span class="pre">CalculateTorsionScore()</span></code></a>)</dt>
-<dd><p class="first last">Evaluates pseudo energies based on the identity of three consecutive
-residues and the phi/psi dihedral angles of the central residue. The group
-definitions are the same as they are used in the <a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>. If
-you start with an empty scorer you need to parametrize the energy function
-by calling <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.SetTorsionPotentialParameters" title="promod3.loop.BackboneLoopScorer.SetTorsionPotentialParameters"><code class="xref py py-func docutils literal"><span class="pre">SetTorsionPotentialParameters()</span></code></a>. You
-can then set an energy value for every possible torsion group and dihedral
-angle pair (see <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.SetTorsionEnergy" title="promod3.loop.BackboneLoopScorer.SetTorsionEnergy"><code class="xref py py-func docutils literal"><span class="pre">SetTorsionEnergy()</span></code></a>). Every residue
-gets evaluated according to the set parametrization and the final score gets
-normalized by the total number of summed pseudo energies. The first phi and
-last psi angle get determined with the help of the environment if set.</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt><strong>CBPackingScore:</strong> (see <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.CalculateCBPackingScore" title="promod3.loop.BackboneLoopScorer.CalculateCBPackingScore"><code class="xref py py-func docutils literal"><span class="pre">CalculateCBPackingScore()</span></code></a>)</dt>
-<dd><p class="first last">Evaluates pseudo energies by counting the number of other CB positions
-within a certain cutoff radius of the CB position of the residue to be
-evaluated. If you start with an empty scorer you need to parametrize the
-energy function by calling
-<a class="reference internal" href="#promod3.loop.BackboneLoopScorer.SetCBPackingPotentialParameters" title="promod3.loop.BackboneLoopScorer.SetCBPackingPotentialParameters"><code class="xref py py-func docutils literal"><span class="pre">SetCBPackingPotentialParameters()</span></code></a>. You can then
-set an energy value for every possible residue type and the corresponding
-number of surrounding CB positions (see
-<a class="reference internal" href="#promod3.loop.BackboneLoopScorer.SetCBPackingEnergy" title="promod3.loop.BackboneLoopScorer.SetCBPackingEnergy"><code class="xref py py-func docutils literal"><span class="pre">SetCBPackingEnergy()</span></code></a>). Every residue gets
-evaluated according to the set parametrization and the final score gets
-normalized by the number of residues in the loop.</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt><strong>HBondScore:</strong> (see <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.CalculateHBondScore" title="promod3.loop.BackboneLoopScorer.CalculateHBondScore"><code class="xref py py-func docutils literal"><span class="pre">CalculateHBondScore()</span></code></a>)</dt>
-<dd><p class="first">Evaluates pairwise HBond pseudo energies similar to the one defined in the
-Rosetta energy function. It considers the CA, C and O positions from
-backbone hbond acceptors in interaction with the N and H positions from the
-backbone hbond donors. 4 Parameters describe their relative orientation.</p>
-<ul class="simple">
-<li>dist =&gt; H-O distance</li>
-<li>alpha =&gt; O-H-N angle</li>
-<li>beta =&gt; C-N-H angle</li>
-<li>gamma =&gt; CA-C-O-H dihedral angle</li>
-</ul>
-<p class="last">A pseudo energy function for these parameters is evaluated for three
-different states. State 1 for helical residues, state 2 for extended
-residues and state 0 for other residues. If the state of two interacting
-particles is the same, thats the one from which the energy is extracted. In
-all other cases, the energy is extracted from the 0 state. If you start with
-an empty scorer you need to parametrize the energy function by calling
-<a class="reference internal" href="#promod3.loop.BackboneLoopScorer.SetHBondPotentialParameters" title="promod3.loop.BackboneLoopScorer.SetHBondPotentialParameters"><code class="xref py py-func docutils literal"><span class="pre">SetHBondPotentialParameters()</span></code></a>. You can then set an
-energy value for every possible state and the according parameters (see
-<a class="reference internal" href="#promod3.loop.BackboneLoopScorer.SetHBondEnergy" title="promod3.loop.BackboneLoopScorer.SetHBondEnergy"><code class="xref py py-func docutils literal"><span class="pre">SetHBondEnergy()</span></code></a>). Every pairwise interaction
-within the loop and to the environment gets evaluated according to the given
-parametrization, summed up and finally normalized by the number of total
-interactions.</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt><strong>SSAgreementScore:</strong> (see <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.CalculateSSAgreementScore" title="promod3.loop.BackboneLoopScorer.CalculateSSAgreementScore"><code class="xref py py-func docutils literal"><span class="pre">CalculateSSAgreementScore()</span></code></a>)</dt>
-<dd><p class="first last">Evaluates an SSAgreement score. Despite no parameters being given,
-<a class="reference internal" href="#promod3.loop.BackboneLoopScorer.SetSSAgreementParameters" title="promod3.loop.BackboneLoopScorer.SetSSAgreementParameters"><code class="xref py py-func docutils literal"><span class="pre">SetSSAgreementParameters()</span></code></a> has to be called before
-you can set any SSAgreement scores (see
-<code class="xref py py-func docutils literal"><span class="pre">SetSSAgreementScore()</span></code>) since the memory has to be
-allocated internally. The SSAgreement score itself relates a score to a
-certain combination of psipred prediction, its confidence and the actually
-occurring secondary structure in the model. In every score evaluation, the
-secondary structure of the loop is estimated by searching for hydrogen bonds
-leading to a secondary structure as defined by dssp. The hbonds are searched
-internally in the loop as well as in the environment. Before you can call
-the scoring function, you have to set the psipred prediction in the scorer.
-The final score gets summed up over all residues in the loop and normalized
-by the number of residues.</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt><strong>ContactScore:</strong> (see <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.CalculateContactScore" title="promod3.loop.BackboneLoopScorer.CalculateContactScore"><code class="xref py py-func docutils literal"><span class="pre">CalculateContactScore()</span></code></a>)</dt>
-<dd><p class="first last">Evaluates contacts with the environment and within the loop itself. You can
-set arbitrary contact functions. They are defined by a score that gets
-added when the CB atoms of two specific residues are within a maximal
-distance. When evaluating a loop, the results of all contact functions
-towards the environment get added as well as the loop internal contacts. The
-returned value gets then normalized by the number of residues in the loop.</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt><strong>ConstraintScore:</strong> (see <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.CalculateConstraintScore" title="promod3.loop.BackboneLoopScorer.CalculateConstraintScore"><code class="xref py py-func docutils literal"><span class="pre">CalculateConstraintScore()</span></code></a>)</dt>
-<dd><p class="first last">Evaluates constraints with the environment and within the loop itself. You
-can set arbitrary constraint functions. They are defined by a min and max
-distance and an arbitrary list of score values. If the distance between the
-CB atoms of two specific residues is within the min and max distance, the
-constraint function returns the value at the according position in the score
-list assuming equidistant binning. When evaluating a loop, the results of
-all constraint functions towards the environment get added as well as the
-loop internal constraints. The returned value gets then normalized by the
-number of residues in the loop.</p>
-</dd>
-</dl>
-</li>
-<li><dl class="first docutils">
-<dt><strong>TransOmegaTorsion:</strong> (see <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.TransOmegaTorsions" title="promod3.loop.BackboneLoopScorer.TransOmegaTorsions"><code class="xref py py-func docutils literal"><span class="pre">TransOmegaTorsions()</span></code></a>)</dt>
-<dd><p class="first last">Does not really return a score but rather a boolean value. It evaluates,
-whether there are any unfavorable trans omega torsion angles in the loop. If
-you wish you can decide, whether you want to allow pre-proline trans omega
-torsions.</p>
-</dd>
-</dl>
-</li>
-</ul>
-<dl class="class">
-<dt id="promod3.loop.BackboneLoopScorer">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">BackboneLoopScorer</code><a class="headerlink" href="#promod3.loop.BackboneLoopScorer" title="Permalink to this definition">¶</a></dt>
-<dd><dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.Load">
-<code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.Load" title="Permalink to this definition">¶</a></dt>
-<dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.Save" title="promod3.loop.BackboneLoopScorer.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
-reading).</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file, the scorer will be loaded from.</p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A scorer</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a></p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>version number stored in file is not supported.</li>
-<li>file assumes different memory-layout than is available on this
-machine. Use <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.LoadPortable" title="promod3.loop.BackboneLoopScorer.LoadPortable"><code class="xref py py-meth docutils literal"><span class="pre">LoadPortable()</span></code></a> to convert your file.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.Save">
-<code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.Save" title="Permalink to this definition">¶</a></dt>
-<dd><p>Saves raw binary representation (optimized for fast reading).This puts many
-assumptions on the memory-layout of the target-machine and hence it is not
-portable. A portable version is provided by <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.SavePortable" title="promod3.loop.BackboneLoopScorer.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a>.
-Preferably portable files are distributed and converted to a raw binary
-before using them.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file, the scorer will be dumped into.
-All model specific information is lost.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.LoadPortable">
-<code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.LoadPortable" title="Permalink to this definition">¶</a></dt>
-<dd><p>Loads portable file generated with <a class="reference internal" href="#promod3.loop.BackboneLoopScorer.SavePortable" title="promod3.loop.BackboneLoopScorer.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slow but less
-machine-dependent).</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file, the scorer will be loaded from.</p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A scorer</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a></p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>version number stored in file is not supported.</li>
-<li>machine-dependent fundamental types are smaller than required.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SavePortable">
-<code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SavePortable" title="Permalink to this definition">¶</a></dt>
-<dd><p>Saves portable binary representation (slow but less machine-dependent).</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file, the scorer will be dumped into.
-All model specific information is lost.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SetCBetaPotentialParameters">
-<code class="descname">SetCBetaPotentialParameters</code><span class="sig-paren">(</span><em>cbeta_cutoff</em>, <em>cbeta_bins</em>, <em>cbeta_seq_sep</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SetCBetaPotentialParameters" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>cbeta_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The maximum distance of two cbeta atoms to be
-considered</li>
-<li><strong>cbeta_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to describe the
-cbeta distances in a discrete manner.</li>
-<li><strong>cbeta_seq_sep</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Minimal separation in sequence two cbeta atoms must
-have to be considered</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>cbeta_cutoff</em> is negative or
-<em>cbeta_bins</em> is &lt;= 0</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SetReducedPotentialParameters">
-<code class="descname">SetReducedPotentialParameters</code><span class="sig-paren">(</span><em>dist_cutoff</em>, <em>dist_bins</em>, <em>angle_bins</em>, <em>dihedral_bins</em>, <em>seq_sep</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SetReducedPotentialParameters" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>dist_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The maximum distance of two residues to be
-considered</li>
-<li><strong>dist_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to describe the
-distances in a discrete manner</li>
-<li><strong>angle_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to describe the angle
-parameters in a discrete manner (range of [0, pi])</li>
-<li><strong>dihedral_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to describe the dihedral
-parameter in a discrete manner (range of [-pi,pi])</li>
-<li><strong>seq_sep</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Minimal separation in sequence two residues must
-have to be considered</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>dist_cutoff</em> is negative or
-one of the bin parameters is &lt;= 0</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SetTorsionPotentialParameters">
-<code class="descname">SetTorsionPotentialParameters</code><span class="sig-paren">(</span><em>group_definitions</em>, <em>torsion_bins</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SetTorsionPotentialParameters" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>group_definitions</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; List of strings describing groups of residues
-for which separate phi/psi dependent energies
-can be set.</li>
-<li><strong>torsion_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to describe the
-torsion angles in a discrete manner.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if torsion_bins is &lt;= 0 or
-one possible combination of the 20 standard amino
-acids is not covered by any entry of <em>group_definitions</em></p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SetCBPackingPotentialParameters">
-<code class="descname">SetCBPackingPotentialParameters</code><span class="sig-paren">(</span><em>cb_packing_cutoff</em>, <em>cb_packing_max_count</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SetCBPackingPotentialParameters" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>cb_packing_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Radius in which other cbeta atoms are counted</li>
-<li><strong>cb_packing_max_count</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If number of other cbeta atoms exceeds
-<em>cb_packing_max_count</em>, it will be set to
-this number.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>cb_packing_cutoff</em> is &lt; 0 or
-<em>cb_packing_max_count</em> is &lt;= 0</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SetHBondPotentialParameters">
-<code class="descname">SetHBondPotentialParameters</code><span class="sig-paren">(</span><em>hb_min_d</em>, <em>hb_max_d</em>, <em>hb_min_alpha</em>, <em>hb_max_alpha</em>, <em>hb_min_beta</em>, <em>hb_max_beta</em>, <em>hb_min_gamma</em>, <em>hb_max_gamma</em>, <em>hb_d_bins</em>, <em>hb_alpha_bins</em>, <em>hb_beta_bins</em>, <em>hb_gamma_bins</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SetHBondPotentialParameters" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>hb_min_d</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Minimal H-O distance, that interaction gets considered.</li>
-<li><strong>hb_max_d</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal H-O distance, that interaction gets considered.</li>
-<li><strong>hb_min_alpha</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Minimal O-H-N angle, that interaction gets considered.</li>
-<li><strong>hb_max_alpha</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal O-H-N angle, that interaction gets considered.</li>
-<li><strong>hb_min_beta</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Minimal C-N-H angle, that interaction gets considered.</li>
-<li><strong>hb_max_beta</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal C-N-H angle, that interaction gets considered.</li>
-<li><strong>hb_min_gamma</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Minimal CA-C-O-H dihedral, that interaction gets
-considered.</li>
-<li><strong>hb_max_gamma</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal CA-C-O-H dihedral, that interaction gets
-considered.</li>
-<li><strong>hb_d_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to describe the H-O distance
-in a discrete manner.</li>
-<li><strong>hb_alpha_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to describe the O-H-N
-angle in a discrete angle.</li>
-<li><strong>hb_beta_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to describe the C-N-H
-angle in a discrete angle.</li>
-<li><strong>hb_gamma_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to describe the CA-C-O-H
-dihedral in a discrete angle.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if one of the bin parameters is
-&lt;= 0 or a max parameter is smaller than its min counterpart.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SetSSAgreementParameters">
-<code class="descname">SetSSAgreementParameters</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SetSSAgreementParameters" title="Permalink to this definition">¶</a></dt>
-<dd><p>Required to set SSAgreement scores with <code class="xref py py-func docutils literal"><span class="pre">SetSSAgreementScore()</span></code>).</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SetCBetaEnergy">
-<code class="descname">SetCBetaEnergy</code><span class="sig-paren">(</span><em>a</em>, <em>b</em>, <em>bin</em>, <em>e</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SetCBetaEnergy" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>a</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code>) &#8211; Identity of first interaction partner.</li>
-<li><strong>b</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code>) &#8211; Identity of second interaction partner.</li>
-<li><strong>bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the interaction distance based
-on the previously defined <em>cbeta_cutoff</em> and
-<em>cbeta_bins</em>.</li>
-<li><strong>e</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Energy to be set</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if invalid bin or amino acid is
-given</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SetReducedEnergy">
-<code class="descname">SetReducedEnergy</code><span class="sig-paren">(</span><em>a</em>, <em>b</em>, <em>dist_bin</em>, <em>alpha_bin</em>, <em>beta_bin</em>, <em>gamma_bin</em>, <em>e</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SetReducedEnergy" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>a</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code>) &#8211; Identity of first interaction partner.</li>
-<li><strong>b</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code>) &#8211; Identity of second interaction partner.</li>
-<li><strong>dist_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the interaction distance based
-on the previously defined <em>dist_cutoff</em> and <em>dist_bins</em>.</li>
-<li><strong>alpha_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the alpha angle based
-on the previously defined <em>angle_bins</em>.</li>
-<li><strong>beta_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the beta angle based
-on the previously defined <em>angle_bins</em>.</li>
-<li><strong>gamma_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the gamma dihedral based
-on the previously defined <em>dihedral_bins</em>.</li>
-<li><strong>e</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Energy to be set</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if invalid bin or amino acid is
-given</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SetTorsionEnergy">
-<code class="descname">SetTorsionEnergy</code><span class="sig-paren">(</span><em>group_id_idx</em>, <em>phi_bin</em>, <em>psi_bin</em>, <em>e</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SetTorsionEnergy" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>group_id_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of group identifier given at setting up the
-torsion potential.</li>
-<li><strong>phi_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the phi angle based on
-the previously defined <em>torsion_bins</em></li>
-<li><strong>psi_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the psi angle based on
-the previously defined <em>torsion_bins</em></li>
-<li><strong>e</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Energy to be set</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if invalid angle bin or
-group_id_idx is given.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SetCBPackingEnergy">
-<code class="descname">SetCBPackingEnergy</code><span class="sig-paren">(</span><em>a</em>, <em>count</em>, <em>e</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SetCBPackingEnergy" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>a</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code>) &#8211; Identity of amino acid</li>
-<li><strong>count</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of surrounding cb positions</li>
-<li><strong>e</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Energy to be set</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>a</em> is invalid or <em>count</em>
-exceeds previously defined <em>max_count</em></p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SetHBondEnergy">
-<code class="descname">SetHBondEnergy</code><span class="sig-paren">(</span><em>state</em>, <em>d_bin</em>, <em>alpha_bin</em>, <em>beta_bin</em>, <em>gamma_bin</em>, <em>e</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SetHBondEnergy" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>state</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; State describing the actual secondary structure
-(1:helical, 2:extended, 0: other)</li>
-<li><strong>d_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the H-O distance based on
-the previously set parametrization.</li>
-<li><strong>alpha_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the O-H-N angle based on the
-previously set parametrization.</li>
-<li><strong>beta_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the C-N-H angle based on the
-previously set parametrization.</li>
-<li><strong>gamma_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the CA-C-O-H dihedral based on
-the previously set parametrization.</li>
-<li><strong>e</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Energy to be set</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if state is not in [0,1,2] or one
-of the bins is invalid.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt>
-<code class="descname">SetSSAgreementScore(psipred_state, int psipred_confidence,</code></dt>
-<dt>
-<code class="descname">dssp_state, score)</code></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>psipred_state</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; must be one of [&#8216;H&#8217;,&#8217;E&#8217;,&#8217;C&#8217;]</li>
-<li><strong>psipred_confidence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; must be in [0,9]</li>
-<li><strong>dssp_state</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; must be one of [&#8216;H&#8217;,&#8217;E&#8217;,&#8217;C&#8217;,&#8217;G&#8217;,&#8217;B&#8217;,&#8217;S&#8217;,&#8217;T&#8217;,&#8217;I&#8217;]</li>
-<li><strong>score</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; score to be set</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.Initialize">
-<code class="descname">Initialize</code><span class="sig-paren">(</span><em>seqres</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.Initialize" title="Permalink to this definition">¶</a></dt>
-<dd><p>Set up internal scorer with given seqres</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>seqres</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/1.3/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceHandle</span></code></a> /
-<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/1.3/seq/base/seq/#ost.seq.SequenceList" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceList</span></code></a>) &#8211; Internal SEQRES to be set. Whenever setting structural
-data, consistency with this SEQRES is encorced.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> when <em>seqres</em> contains invalid
-one letter code</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SetPsipredPrediction">
-<code class="descname">SetPsipredPrediction</code><span class="sig-paren">(</span><em>pred</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SetPsipredPrediction" title="Permalink to this definition">¶</a></dt>
-<dd><p>Internally sets the psipred prediction, which is necessary to calculate the
-SSAgreementScore.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pred</strong> (<a class="reference internal" href="helper_classes.html#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code></a> / <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference internal" href="helper_classes.html#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code></a>) &#8211; The prediction</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if the scorer is not yet
-initialized, the number of predictions is inconsistent with the
-number of internal chains or when one of the predictions sizes is
-inconsistent with the according internal seqres</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.SetEnvironment">
-<code class="descname">SetEnvironment</code><span class="sig-paren">(</span><em>env</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.SetEnvironment" title="Permalink to this definition">¶</a></dt>
-<dd><p>Sets structural environment with which loops to be scored interact.
-If structural data for specific residues is already set, the
-data gets resetted for these positions.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>env</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityView</span></code></a>) &#8211; Structral data to be set as environment. The chains
-in <em>env</em> are expected to be in the same order as the
-provided SEQRES items.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if scorer has never been
-initialized with a SEQRES or when <em>env</em> is inconsistent
-with previously set SEQRES. This can be because of
-corrupt residue numbers or sequence mismatches.</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt>
-<code class="descname">SetEnvironment</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
-<dd><p>Sets structural environment with which loops to be scored interact.
-If structural data for specific residues is already set, the
-data gets resetted for these positions.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Structural data to be set as environment.</li>
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; ResNum defining the position in the SEQRES
-(first element starts with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of chain the structural data belongs to.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if sequence of <em>bb_list</em> is
-inconsistent with previously provided SEQRES or when either
-start_resnum or chain_index point to invalid positions in the
-SEQRES.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.ClearEnvironment">
-<code class="descname">ClearEnvironment</code><span class="sig-paren">(</span><em>start_resnum</em>, <em>num_residues</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.ClearEnvironment" title="Permalink to this definition">¶</a></dt>
-<dd><p>Clears a stretch of length <em>num_residues</em> in the environment in chain
-with idx <em>chain_index</em> starting from residue number <em>start_resnum</em></p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Start of stretch to clear</li>
-<li><strong>num_residues</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length of stretch to clear</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Chain the stretch belongs to</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> when either start_resnum or
-chain_index point to invalid positions in the SEQRES.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.AddContactFunction">
-<code class="descname">AddContactFunction</code><span class="sig-paren">(</span><em>max_dist</em>, <em>score</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.AddContactFunction" title="Permalink to this definition">¶</a></dt>
-<dd><p>Adds a contact definition and returns an index, so it can be used later
-when you add specific contacts. While the specific contact definitions
-get cleared when reinitializing the scorer, The contact functions stay
-and their indices remain valid until the scorer object gets destroyed.
-The definition simply returns <em>score</em> , if a certain CA-CA distance is below
-<em>max_dist</em> and 0.0 otherwise.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>max_dist</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal distance between two CA atoms to be in contact</li>
-<li><strong>score</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Value that gets returned if two CA atoms are in contact</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Index of added contact definition</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.AddConstraintFunction">
-<code class="descname">AddConstraintFunction</code><span class="sig-paren">(</span><em>min_dist</em>, <em>max_dist</em>, <em>values</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.AddConstraintFunction" title="Permalink to this definition">¶</a></dt>
-<dd><p>Adds a constraint definition and returns an index, so it can be used later
-when you add specific constraints. While the specific constraint definitions
-get cleared when reinitializing the scorer, the constraint functions stay
-and their indices remain valid until the scorer object gets destroyed.
-The definition returns the value at pos i, where i gets determined given
-a certain CA-CA distance by assuming an equidistant binning of <em>values</em>
-between <em>min_dist</em> and <em>max_dist</em> . If a certain CA-CA distance is outside
-the range defined by <em>min_dist</em> and <em>max_dist</em>, the definition returns 0.0.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>min_dist</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Minimal distance between two CA atoms to be considered</li>
-<li><strong>max_dist</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal distance between two CA atoms to be considered</li>
-<li><strong>values</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The possible values that get returned when two CA
-atoms have a distance between <em>min_dist</em> and <em>max_dist</em></li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Index of added constraint definition</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>min_dist</em> &gt;= <em>max_dist</em> or
-when <em>values</em> contains no elements</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.AddContact">
-<code class="descname">AddContact</code><span class="sig-paren">(</span><em>chain_idx_one</em>, <em>resnum_one</em>, <em>chain_idx_two</em>, <em>resnum_two</em>, <em>max_dist</em>, <em>score</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.AddContact" title="Permalink to this definition">¶</a></dt>
-<dd></dd></dl>
-
-<dl class="method">
-<dt>
-<code class="descname">AddContact</code><span class="sig-paren">(</span><em>chain_idx_one</em>, <em>resnum_one</em>, <em>chain_idx_two</em>, <em>resnum_two</em>, <em>f_idx</em><span class="sig-paren">)</span></dt>
-<dd><p>Two versions to add a specific contact. In version one, the AddContactFunction
-method gets called internally to generate a unique contact definition for
-this pair of residues. In version two you can use a manually defined contact
-definition.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>chain_idx_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Chain idx of residue one in the contact</li>
-<li><strong>resnum_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Resnum of residue one in the contact</li>
-<li><strong>chain_idx_two</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Chain idx of residue two in the contact</li>
-<li><strong>resnum_two</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Resnum of residue two in the contact</li>
-<li><strong>max_dist</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal distance between the two CA atoms to be in contact</li>
-<li><strong>score</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Value that gets returned if the two CA atoms are in contact</li>
-<li><strong>f_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of manually set contact definition</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if any of the chain indices or
-resnums is invalid, the interaction partners are the same residue
-or when <em>f_idx</em> is an invalid index.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.AddConstraint">
-<code class="descname">AddConstraint</code><span class="sig-paren">(</span><em>chain_idx_one</em>, <em>resnum_one</em>, <em>chain_idx_two</em>, <em>resnum_two</em>, <em>min_dist</em>, <em>max_dist</em>, <em>scores</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.AddConstraint" title="Permalink to this definition">¶</a></dt>
-<dt>
-<code class="descname">AddConstraint</code><span class="sig-paren">(</span><em>chain_idx_one</em>, <em>resnum_one</em>, <em>chain_idx_two</em>, <em>resnum_two</em>, <em>f_idx</em><span class="sig-paren">)</span></dt>
-<dd><p>Two versions to add a specific constraint. In version one, the
-AddConstraintFunction method gets called internally to generate a unique
-constraint definition for this pair of residues. In version two you can use
-a manually defined constraint definition.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>chain_idx_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Chain idx of residue one in the constraint</li>
-<li><strong>resnum_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Resnum of residue one in the constraint</li>
-<li><strong>chain_idx_two</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Chain idx of residue two in the constraint</li>
-<li><strong>resnum_two</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Resnum of residue two in the constraint</li>
-<li><strong>min_dist</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Minimal distance between the two CA atoms to be considered</li>
-<li><strong>max_dist</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal distance between the two CA atoms to be considered</li>
-<li><strong>scores</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Values that get returned if the two CA atoms are considered</li>
-<li><strong>f_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of manually set constraint definition</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if any of the chain indices or
-resnums is invalid, the interaction partners are the same residue,
-<em>min_dist</em> &gt;= <em>max_dist</em>, <em>scores</em> is empty or when <em>f_idx</em> is an
-invalid index.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.CalculateClashScore">
-<code class="descname">CalculateClashScore</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.CalculateClashScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to calculate the clash score</li>
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; ResNum defining the position in the SEQRES
-(first element starts with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of the chain the loop belongs to</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">clash score</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <em>bb_list</em> is smaller
-than 3, the <em>chain_index</em>/<em>start_resnum</em> lead to invalid
-positions in the SEQRES or the scorer has never been initialized
-with a SEQRES.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.CalculateCBetaScore">
-<code class="descname">CalculateCBetaScore</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.CalculateCBetaScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to calculate the cbeta score</li>
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; ResNum defining the position in the SEQRES
-(first element starts with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of the chain the loop belongs to</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">cbeta score</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <em>bb_list</em> is smaller
-than 3, the <em>chain_index</em>/<em>start_resnum</em> lead to invalid positions
-in the SEQRES or when the  according potential or scorer have
-never been properly initialized.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.CalculateReducedScore">
-<code class="descname">CalculateReducedScore</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.CalculateReducedScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to calculate the reduced score</li>
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; ResNum defining the position in the SEQRES
-(first element starts with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of the chain the loop belongs to</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">reduced score</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <em>bb_list</em> is smaller
-than 3, the <em>chain_index</em>/<em>start_resnum</em> lead to invalid positions
-in the SEQRES or when the  according potential or scorer have
-never been properly initialized.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.CalculateTorsionScore">
-<code class="descname">CalculateTorsionScore</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.CalculateTorsionScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to calculate the torsion score</li>
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; ResNum defining the position in the SEQRES
-(first element starts with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of the chain the loop belongs to</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">torsion score</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <em>bb_list</em> is smaller
-than 3, the <em>chain_index</em>/<em>start_resnum</em> lead to invalid positions
-in the SEQRES or when the  according potential or scorer have
-never been properly initialized.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.CalculateCBPackingScore">
-<code class="descname">CalculateCBPackingScore</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.CalculateCBPackingScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to calculate the packing score</li>
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; ResNum defining the position in the SEQRES
-(first element starts with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of the chain the loop belongs to</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">packing score</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <em>bb_list</em> is smaller
-than 3, the <em>chain_index</em>/<em>start_resnum</em> lead to invalid positions
-in the SEQRES or when the  according potential or scorer have
-never been properly initialized.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.CalculateHBondScore">
-<code class="descname">CalculateHBondScore</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.CalculateHBondScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to calculate the hbond score</li>
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; ResNum defining the position in the SEQRES
-(first element starts with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of the chain the loop belongs to</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">hbond score</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <em>bb_list</em> is smaller
-than 3, the <em>chain_index</em>/<em>start_resnum</em> lead to invalid positions
-in the SEQRES or when the  according potential or scorer have
-never been properly initialized.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.CalculateSSAgreementScore">
-<code class="descname">CalculateSSAgreementScore</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.CalculateSSAgreementScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to calculate the SSAgreement score</li>
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; ResNum defining the position in the SEQRES
-(first element starts with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of the chain the loop belongs to</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">SSAgreement score</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <em>bb_list</em> is smaller
-than 3, the <em>chain_index</em>/<em>start_resnum</em> lead to invalid positions
-in the SEQRES or the scorer have never been properly initialized
-or when no <a class="reference internal" href="helper_classes.html#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code></a> is set to the scorer.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.CalculateContactScore">
-<code class="descname">CalculateContactScore</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.CalculateContactScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to calculate the contact score</li>
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; ResNum defining the position in the SEQRES
-(first element starts with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of the chain the loop belongs to</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">contact score</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <em>bb_list</em> is smaller
-than 3, the <em>chain_index</em>/<em>start_resnum</em> lead to invalid positions
-in the SEQRES or the scorer have never been properly initialized</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.CalculateConstraintScore">
-<code class="descname">CalculateConstraintScore</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.CalculateConstraintScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to calculate the constraint score</li>
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; ResNum defining the position in the SEQRES
-(first element starts with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of the chain the loop belongs to</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">constraint score</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <em>bb_list</em> is smaller
-than 3, the <em>chain_index</em>/<em>start_resnum</em> lead to invalid positions
-in the SEQRES or the scorer have never been properly initialized</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.BackboneLoopScorer.TransOmegaTorsions">
-<code class="descname">TransOmegaTorsions</code><span class="sig-paren">(</span><em>bb_list</em><span class="optional">[</span>, <em>thresh = 20/180*pi</em>, <em>allow_prepro_cis=True</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneLoopScorer.TransOmegaTorsions" title="Permalink to this definition">¶</a></dt>
-<dd><p>Checks whether <em>bb_list</em> only contains trans omega torsion angles.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to check</li>
-<li><strong>thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Allowed deviation from ideal trans angle (pi)</li>
-<li><strong>allow_prepro_cis</strong> &#8211; Flag, whether cis-omega torsions should be
-allowed in case of a subsequent proline.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a> whether <em>bb_list</em> only contains
-trans-omega torsions.</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <em>bb_list</em> is smaller
-than 3.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-</div>
-</div>
-
-
-          </div>
-        </div>
-      </div>
-      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
-        <div class="sphinxsidebarwrapper">
-  <h3><a href="../index.html">Table Of Contents</a></h3>
-  <ul>
-<li><a class="reference internal" href="#">Loop Scoring</a><ul>
-<li><a class="reference internal" href="#the-backboneloopscorer">The BackboneLoopScorer</a></li>
-</ul>
-</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="docutils literal"><span class="pre">loop</span></code> - Loop Modelling</a><ul>
-      <li>Previous: <a href="loop_closing.html" title="previous chapter">Loop Closing</a></li>
-      <li>Next: <a href="monte_carlo.html" title="next chapter">Monte Carlo Sampling</a></li>
-  </ul></li>
-  </ul></li>
-  </ul></li>
-</ul>
-</div>
-  <div role="note" aria-label="source link">
-    <h3>This Page</h3>
-    <ul class="this-page-menu">
-      <li><a href="../_sources/loop/backbone_loop_score.txt"
-            rel="nofollow">Show Source</a></li>
-    </ul>
-   </div>
-<div id="searchbox" style="display: none" role="search">
-  <h3>Quick search</h3>
-    <form class="search" action="../search.html" method="get">
-      <input type="text" name="q" />
-      <input type="submit" value="Go" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    <p class="searchtip" style="font-size: 90%">
-    Enter search terms or a module, class or function name.
-    </p>
-</div>
-<script type="text/javascript">$('#searchbox').show(0);</script>
-        </div>
-      </div>
-      <div class="clearer"></div>
-    </div>
-    <div class="footer">
-      &copy;2016, Bienchen.
-      
-      |
-      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
-      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
-      
-      |
-      <a href="../_sources/loop/backbone_loop_score.txt"
-          rel="nofollow">Page source</a>
-    </div>
-
-    
-
-    
-  </body>
-</html>
\ No newline at end of file
diff --git a/doc/html/loop/helper_classes.html b/doc/html/loop/helper_classes.html
deleted file mode 100644
index 29bdec5b..00000000
--- a/doc/html/loop/helper_classes.html
+++ /dev/null
@@ -1,1010 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    
-    <title>Helper Classes &mdash; ProMod3 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">
-      var DOCUMENTATION_OPTIONS = {
-        URL_ROOT:    '../',
-        VERSION:     '0',
-        COLLAPSE_INDEX: false,
-        FILE_SUFFIX: '.html',
-        HAS_SOURCE:  true
-      };
-    </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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
-    <link rel="up" title="loop - Loop Modelling" href="index.html" />
-    <link rel="next" title="sidechain - Sidechain Modelling" href="../sidechain/index.html" />
-    <link rel="prev" title="Load Loop Objects" href="load_loop_objects.html" />
-   
-  
-  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
-
-  </head>
-  <body role="document">  
-
-    <div class="document">
-      <div class="documentwrapper">
-        <div class="bodywrapper">
-          <div class="body" role="main">
-            
-  <div class="section" id="helper-classes">
-<h1>Helper Classes<a class="headerlink" href="#helper-classes" title="Permalink to this headline">¶</a></h1>
-<p>This chapter describes helper classes, that are somehow related to the
-functionality in the loop module.</p>
-<div class="section" id="psipred">
-<h2>Psipred<a class="headerlink" href="#psipred" title="Permalink to this headline">¶</a></h2>
-<dl class="class">
-<dt id="promod3.loop.PsipredPrediction">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">PsipredPrediction</code><a class="headerlink" href="#promod3.loop.PsipredPrediction" title="Permalink to this definition">¶</a></dt>
-<dd><p>A container for the secondary structure prediction by Psipred.</p>
-<dl class="method">
-<dt id="promod3.loop.PsipredPrediction.PsipredPrediction">
-<code class="descname">PsipredPrediction</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.PsipredPrediction" title="Permalink to this definition">¶</a></dt>
-<dd><p>Constructs empty container</p>
-</dd></dl>
-
-<dl class="method">
-<dt>
-<code class="descname">PsipredPrediction</code><span class="sig-paren">(</span><em>prediction</em>, <em>confidence</em><span class="sig-paren">)</span></dt>
-<dd><p>Constructs container with given content</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>prediction</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; Secondary structure prediction as element in [&#8216;H&#8217;,&#8217;E&#8217;,&#8217;C&#8217;]</li>
-<li><strong>confidence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; Confidence of prediction as element in [0,9]</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <strong>prediction</strong> and
-<strong>confidence</strong> are inconsistent or if they contain an invalid
-element</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.PsipredPrediction.FromHHM">
-<code class="descname">FromHHM</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.FromHHM" title="Permalink to this definition">¶</a></dt>
-<dd><p>Static function to Load a <a class="reference internal" href="#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code></a> object from hhm file,
-as they are provided by the hhsearch suite</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.PsipredPrediction.FromHoriz">
-<code class="descname">FromHoriz</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.FromHoriz" title="Permalink to this definition">¶</a></dt>
-<dd><p>Static function to Load a <a class="reference internal" href="#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code></a> object from horiz file,
-as they are produced by the psipred executable</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.PsipredPrediction.Add">
-<code class="descname">Add</code><span class="sig-paren">(</span><em>prediction</em>, <em>confidence</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.Add" title="Permalink to this definition">¶</a></dt>
-<dd><p>Adds and appends a single residue psipred prediction at the end</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>prediction</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Prediction, must be one in [&#8216;H&#8217;,&#8217;E&#8217;,&#8217;C&#8217;]</li>
-<li><strong>confidence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Confidence of prediction, must be in [0,9]</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if input contains invalid elements</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.PsipredPrediction.Extract">
-<code class="descname">Extract</code><span class="sig-paren">(</span><em>from</em>, <em>to</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.Extract" title="Permalink to this definition">¶</a></dt>
-<dd><p>Extracts content and returns a sub-<a class="reference internal" href="#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code></a> with range <strong>from</strong>
-to <strong>to</strong>, not including <strong>to</strong> itself</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>from</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Idx to start</li>
-<li><strong>to</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Idx to end</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code></a> with the specified range</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>from</strong> or <strong>to</strong> are invalid</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.PsipredPrediction.GetPrediction">
-<code class="descname">GetPrediction</code><span class="sig-paren">(</span><em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.GetPrediction" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index to get prediction from</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Psipred prediction at pos <strong>idx</strong></td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>idx</strong> is invalid</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.PsipredPrediction.GetConfidence">
-<code class="descname">GetConfidence</code><span class="sig-paren">(</span><em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.GetConfidence" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index to get confidence from</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Psipred confidence at pos <strong>idx</strong></td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>idx</strong> is invalid</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.PsipredPrediction.GetPredictions">
-<code class="descname">GetPredictions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.GetPredictions" title="Permalink to this definition">¶</a></dt>
-<dd><p>Get all the predictions in the container</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> containing all the predictions in the container</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.PsipredPrediction.GetConfidences">
-<code class="descname">GetConfidences</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.GetConfidences" title="Permalink to this definition">¶</a></dt>
-<dd><p>Get all the confidences in the container</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> containing all the confidences in the container</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.PsipredPrediction.__len__">
-<code class="descname">__len__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.__len__" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of elements in container</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-</div>
-<div class="section" id="handling-several-loops-at-once">
-<h2>Handling several loops at once<a class="headerlink" href="#handling-several-loops-at-once" title="Permalink to this headline">¶</a></h2>
-<dl class="class">
-<dt id="promod3.loop.LoopCandidate">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">LoopCandidate</code><span class="sig-paren">(</span><em>backbone_list</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidate" title="Permalink to this definition">¶</a></dt>
-<dd><p>Object representing a possible configuration of the backbone of a particular loop being modelled. Apart from the positions, stored in a <a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>, it also has attributes storing different scores associated with the candidate (will be set by calling the corresponding scoring function in <a class="reference internal" href="#promod3.loop.LoopCandidates" title="promod3.loop.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a>).</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>backbone_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Positions of the backbone atoms</td>
-</tr>
-</tbody>
-</table>
-<dl class="method">
-<dt id="promod3.loop.LoopCandidate.CARMSD">
-<code class="descname">CARMSD</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidate.CARMSD" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates the C-alpha RMSD between this loop candidate and an <em>other</em> loop candidate, after superposition.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>) &#8211; Other loop</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidate.RMSD">
-<code class="descname">RMSD</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidate.RMSD" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates the RMSD between this loop candidate and an <em>other</em> loop candidate, after superposition.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>) &#8211; Other loop</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.LoopCandidate.bb_list">
-<code class="descname">bb_list</code><a class="headerlink" href="#promod3.loop.LoopCandidate.bb_list" title="Permalink to this definition">¶</a></dt>
-<dd><p>The backbone list containing the positions of the backbone atoms</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.LoopCandidate.clash_score">
-<code class="descname">clash_score</code><a class="headerlink" href="#promod3.loop.LoopCandidate.clash_score" title="Permalink to this definition">¶</a></dt>
-<dd><p>The clash score of the loop candidate</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.LoopCandidate.cbeta_score">
-<code class="descname">cbeta_score</code><a class="headerlink" href="#promod3.loop.LoopCandidate.cbeta_score" title="Permalink to this definition">¶</a></dt>
-<dd><p>The C-beta score of the loop candidate</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.LoopCandidate.reduced_score">
-<code class="descname">reduced_score</code><a class="headerlink" href="#promod3.loop.LoopCandidate.reduced_score" title="Permalink to this definition">¶</a></dt>
-<dd><p>The reduced score of the loop candidate</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.LoopCandidate.torsion_score">
-<code class="descname">torsion_score</code><a class="headerlink" href="#promod3.loop.LoopCandidate.torsion_score" title="Permalink to this definition">¶</a></dt>
-<dd><p>The torsion score of the loop candidate</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.LoopCandidate.packing_score">
-<code class="descname">packing_score</code><a class="headerlink" href="#promod3.loop.LoopCandidate.packing_score" title="Permalink to this definition">¶</a></dt>
-<dd><p>The packing score of the loop candidate</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.LoopCandidate.hbond_score">
-<code class="descname">hbond_score</code><a class="headerlink" href="#promod3.loop.LoopCandidate.hbond_score" title="Permalink to this definition">¶</a></dt>
-<dd><p>The HBond score of the loop candidate</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.LoopCandidate.ss_agreement_score">
-<code class="descname">ss_agreement_score</code><a class="headerlink" href="#promod3.loop.LoopCandidate.ss_agreement_score" title="Permalink to this definition">¶</a></dt>
-<dd><p>The SSAgreement score of the loop candidate</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.loop.LoopCandidate.combined_score">
-<code class="descname">combined_score</code><a class="headerlink" href="#promod3.loop.LoopCandidate.combined_score" title="Permalink to this definition">¶</a></dt>
-<dd><p>Score value intended to be a placeholder for an arbitrary combination
-of the other scores</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="class">
-<dt id="promod3.loop.LoopCandidates">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">LoopCandidates</code><span class="sig-paren">(</span><em>seq</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates" title="Permalink to this definition">¶</a></dt>
-<dd><p>The <em>LoopCandidates</em> is a helper class used as a container for
-<a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a> objects enforcing consistent length
-and sequence among them. It can either be filled manually or
-generated using static filling functions using the functionality
-from the <a class="reference internal" href="structure_db.html#promod3.loop.FragDB" title="promod3.loop.FragDB"><code class="xref py py-class docutils literal"><span class="pre">FragDB</span></code></a> or Monte Carlo algorithms. Once it contains
-candidates you can apply closing, scoring or clustering algorithms on the content.
-Note, that you have to attach a scorer object before any scoring action.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>seq</strong> &#8211; The sequence being enforced for all candidates</td>
-</tr>
-</tbody>
-</table>
-<dl class="staticmethod">
-<dt id="promod3.loop.LoopCandidates.FillFromDatabase">
-<em class="property">static </em><code class="descname">FillFromDatabase</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>seq</em>, <em>frag_db</em>, <em>structural_db</em>, <em>extended_search=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.FillFromDatabase" title="Permalink to this definition">¶</a></dt>
-<dd><p>Searches for loop candidates matching the length (number of residues in <em>seq</em>) and geometry (of <em>n_stem</em> and <em>c_stem</em>) of the loop to be modelled in a fragment database.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; The residue at the N-terminal end of the loop</li>
-<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; The residue at the C-terminal end of the loop</li>
-<li><strong>seq</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; The sequence of residues to be added including the
-<em>n_stem</em> and <em>c_stem</em></li>
-<li><strong>frag_db</strong> (<a class="reference internal" href="structure_db.html#promod3.loop.FragDB" title="promod3.loop.FragDB"><code class="xref py py-class docutils literal"><span class="pre">FragDB</span></code></a>) &#8211; The fragment database</li>
-<li><strong>structural_db</strong> (<a class="reference internal" href="structure_db.html#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a>) &#8211; The according structural database</li>
-<li><strong>extended_search</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether search should be extended to fragments
-matching the geometry of the <em>n_stem</em> and <em>c_stem</em>
-a bit less precisely.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A list of loop candidates</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#promod3.loop.LoopCandidates" title="promod3.loop.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a></p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="staticmethod">
-<dt id="promod3.loop.LoopCandidates.FillFromMonteCarloSampler">
-<em class="property">static </em><code class="descname">FillFromMonteCarloSampler</code><span class="sig-paren">(</span><em>seq</em>, <em>num_loops</em>, <em>steps</em>, <em>sampler</em>, <em>closer</em>, <em>scorer</em>, <em>cooler</em><span class="optional">[</span>, <em>random_seed = 0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.FillFromMonteCarloSampler" title="Permalink to this definition">¶</a></dt>
-<dt>
-<em class="property">static </em><code class="descname">FillFromMonteCarloSampler</code><span class="sig-paren">(</span><em>initial_bb</em>, <em>seq</em>, <em>num_loops</em>, <em>steps</em>, <em>sampler</em>, <em>closer</em>, <em>scorer</em>, <em>cooler</em><span class="optional">[</span>, <em>random_seed = 0</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
-<dd><p>Uses Monte Carlo simulated annealing to sample the loop to be modelled.
-If <em>initial_bb</em> is given, every Monte Carlo run starts from that configuration.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>initial_bb</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Initial configuration used for the sampling</li>
-<li><strong>seq</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; The sequence of residues to be sampled</li>
-<li><strong>num_loops</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of loop candidates to return</li>
-<li><strong>steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of MC steps to perform for each loop candidate
-generated</li>
-<li><strong>sampler</strong> (<a class="reference internal" href="monte_carlo.html#mc-sampler-object"><span>Sampler Object</span></a>) &#8211; Used to generate a new configuration at each MC step</li>
-<li><strong>closer</strong> (<a class="reference internal" href="monte_carlo.html#mc-closer-object"><span>Closer Object</span></a>) &#8211; Used to close the loop after each MC step</li>
-<li><strong>scorer</strong> (<a class="reference internal" href="monte_carlo.html#mc-scorer-object"><span>Scorer Object</span></a>) &#8211; Used to score the generated configurations at each MC step</li>
-<li><strong>cooler</strong> (<a class="reference internal" href="monte_carlo.html#mc-cooler-object"><span>Cooler Object</span></a>) &#8211; Controls the temperature profile of the simulated annealing</li>
-<li><strong>random_seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Seed to feed the random number generator for
-accepting/rejecting proposed monte carlo steps.
-For every monte carlo run, the random number generator
-gets refreshed and this seed gets increased by 1.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The resulting candidates</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.LoopCandidates" title="promod3.loop.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a></p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first">A <code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code>, if <em>initial_bb</em> is not given and the Monte
-Carlo sampler failed to initialize (i.e. stems are too far apart)</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">A <code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code>, if <em>initial_bb</em> is given and it is
-inconsistent with <em>seq</em></p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.ClusterCandidates">
-<code class="descname">ClusterCandidates</code><span class="sig-paren">(</span><em>max_dist</em>, <em>neglect_size_one = true</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.ClusterCandidates" title="Permalink to this definition">¶</a></dt>
-<dd><p>Clusters the loop candidates according to their pairwise CARMSD using a greedy
-hierarchical clustering algorithm. Every candidate gets assigned a unique cluster.
-At every clustering step, the two clusters with shortest distance get merged, with
-the distance definition being the maximal CARMSD between any of the members
-of the two clusters.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>max_dist</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal distance two clusters can have to be merged</li>
-<li><strong>neglect_size_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether clusters should be added to the return
-list if they only contain one <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a></li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A list of <a class="reference internal" href="#promod3.loop.LoopCandidates" title="promod3.loop.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a>. Each element in the list
-corresponds to the candidates in one cluster.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.ApplyCCD">
-<code class="descname">ApplyCCD</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>max_iterations=1000</em>, <em>rmsd_cutoff=0.1</em>, <em>keep_non_converged=false</em>, <em>random_seed=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.ApplyCCD" title="Permalink to this definition">¶</a></dt>
-<dt>
-<code class="descname">ApplyCCD</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>torsion_sampler</em>, <em>max_iterations=1000</em>, <em>rmsd_cutoff=0.1</em>, <em>keep_non_converged=false</em>, <em>random_seed=0</em><span class="sig-paren">)</span></dt>
-<dt>
-<code class="descname">ApplyCCD</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>torsion_samplers</em>, <em>max_iterations=1000</em>, <em>rmsd_cutoff=0.1</em>, <em>keep_non_converged=false</em>, <em>random_seed=0</em><span class="sig-paren">)</span></dt>
-<dd><p>Closes all <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a> in <a class="reference internal" href="#promod3.loop.LoopCandidates" title="promod3.loop.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a> using the CCD
-algorithm (i.e. modifies the <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a> so that its stem residues
-match those of <em>n_stem</em> and <em>c_stem</em>). CCD (cyclic coordinate descent, see
-<a class="reference internal" href="loop_closing.html#promod3.loop.CCD" title="promod3.loop.CCD"><code class="xref py py-class docutils literal"><span class="pre">CCD</span></code></a>) is an iterative minimization algorithm.</p>
-<p>If <em>torsion_sampler</em> or <em>torsion_samplers</em> is given, it is used at each step
-of the closing to calculate the probability of the proposed move, which is
-then accepted or not depending on a metropolis criterium.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the n-stem positions every candidate
-should match. See <a class="reference internal" href="loop_closing.html#promod3.loop.CCD.CCD" title="promod3.loop.CCD.CCD"><code class="xref py py-meth docutils literal"><span class="pre">CCD()</span></code></a>.</li>
-<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the c-stem positions every candidate
-should match. See <a class="reference internal" href="loop_closing.html#promod3.loop.CCD.CCD" title="promod3.loop.CCD.CCD"><code class="xref py py-meth docutils literal"><span class="pre">CCD()</span></code></a>.</li>
-<li><strong>torsion_sampler</strong> (<a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; The torsion sampler</li>
-<li><strong>torsion_samplers</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; A list containing one torsion sampler for each
-residue in the loop</li>
-<li><strong>max_iterations</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Maximum number of iteration</li>
-<li><strong>rmsd_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Cutoff in stem residue RMSD used to determine
-convergence</li>
-<li><strong>keep_non_converged</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether to keep loop candidates for which the
-closing did not converge</li>
-<li><strong>random_seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; seed for random number generator used to
-accept/reject moves in CCD algorithm</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.ApplyKIC">
-<code class="descname">ApplyKIC</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>pivot_one</em>, <em>pivot_two</em>, <em>pivot_three</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.ApplyKIC" title="Permalink to this definition">¶</a></dt>
-<dd><p>Closes all <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a> in <a class="reference internal" href="#promod3.loop.LoopCandidates" title="promod3.loop.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a> (i.e. modifies
-the <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a> so that its stem residues match those of
-<em>n_stem</em> and <em>c_stem</em>, which are the stem residues of the loop being
-modelled), using the KIC algorithm. This algorithm finds analytical
-solutions for closing the loop by modifying the torsion angles of just
-three pivot residues. Due to the underlying mathematical formalism in KIC,
-up to 16 solutions can be found for every candidate. This leads to an
-increase in number of loops.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the n-stem positions every candidate
-should match</li>
-<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the c-stem positions every candidate
-should match</li>
-<li><strong>pivot_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; First pivot residue</li>
-<li><strong>pivot_two</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Second pivot residue</li>
-<li><strong>pivot_three</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Third pivot residue</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.Add">
-<code class="descname">Add</code><span class="sig-paren">(</span><em>loop_candidate</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.Add" title="Permalink to this definition">¶</a></dt>
-<dd><p>Add a loop candidate to the list of candidates</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>loop_candidate</strong> (<a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>) &#8211; The loop candidate</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> If sequence of <em>loop_candidate</em>
-is not consistent with internal sequence</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt>
-<code class="descname">Add</code><span class="sig-paren">(</span><em>bb_list</em><span class="sig-paren">)</span></dt>
-<dd><p>Add a loop candidate to the list of candidates from a list of backbone positions</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The backbone list</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> If sequence of <em>bb_list</em> is not
-consistent with internal sequence</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.Remove">
-<code class="descname">Remove</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.Remove" title="Permalink to this definition">¶</a></dt>
-<dd><p>Remove a loop candidate from the list of candidates.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the candidate that will be removed</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.AttachScorer">
-<code class="descname">AttachScorer</code><span class="sig-paren">(</span><em>scorer</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.AttachScorer" title="Permalink to this definition">¶</a></dt>
-<dd><p>Attaches a scorer to the <a class="reference internal" href="#promod3.loop.LoopCandidates" title="promod3.loop.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a>. The scorer contains the information about the environment of the loop candidates and is mandatory to calculate the different scores for the loop candidates.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>scorer</strong> (<a class="reference internal" href="backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>) &#8211; The scorer</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.CalculateClashScores">
-<code class="descname">CalculateClashScores</code><span class="sig-paren">(</span><em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.CalculateClashScores" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates and assigns the clash score for each <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue number of the starting residue of the candidates being scored
-(residue numbers start with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the chain to which the loop belongs (index relative to the entity forming the environment in the <a class="reference internal" href="backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>)</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.CalculateBetaScores">
-<code class="descname">CalculateBetaScores</code><span class="sig-paren">(</span><em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.CalculateBetaScores" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates and assigns the cbeta score for each <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue number of the starting residue of the candidates being scored
-(residue numbers start with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the chain to which the loop belongs (index relative to the entity forming the environment in the <a class="reference internal" href="backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>)</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.CalculateReducedScores">
-<code class="descname">CalculateReducedScores</code><span class="sig-paren">(</span><em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.CalculateReducedScores" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates and assigns the reduced score for each <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue number of the starting residue of the candidates being scored
-(residue numbers start with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the chain to which the loop belongs (index relative to the entity forming the environment in the <a class="reference internal" href="backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>)</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.CalculateTorsionScores">
-<code class="descname">CalculateTorsionScores</code><span class="sig-paren">(</span><em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.CalculateTorsionScores" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates and assigns the torsion score for each <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue number of the starting residue of the candidates being scored
-(residue numbers start with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the chain to which the loop belongs (index relative to the entity forming the environment in the <a class="reference internal" href="backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>)</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.CalculatePackingScores">
-<code class="descname">CalculatePackingScores</code><span class="sig-paren">(</span><em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.CalculatePackingScores" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates and assigns the packing score for each <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue number of the starting residue of the candidates being scored
-(residue numbers start with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the chain to which the loop belongs (index relative to the entity forming the environment in the <a class="reference internal" href="backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>)</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.CalculateHBondcores">
-<code class="descname">CalculateHBondcores</code><span class="sig-paren">(</span><em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.CalculateHBondcores" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates and assigns the HBond score for each <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue number of the starting residue of the candidates being scored
-(residue numbers start with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the chain to which the loop belongs (index relative to the entity forming the environment in the <a class="reference internal" href="backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>)</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.CalculateSSAgreementScores">
-<code class="descname">CalculateSSAgreementScores</code><span class="sig-paren">(</span><em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.CalculateSSAgreementScores" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates and assigns the SSAgreement score for each <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue number of the starting residue of the candidates being scored
-(residue numbers start with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the chain to which the loop belongs (index relative to the entity forming the environment in the <a class="reference internal" href="backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>)</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.CalculateCombinedScores">
-<code class="descname">CalculateCombinedScores</code><span class="sig-paren">(</span><em>linear_weights</em>, <em>start_resnum</em><span class="optional">[</span>, <em>chain_index=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.CalculateCombinedScores" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates and assigns an arbitrary linear combination of all the available scores for each <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>linear_weights</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a>) &#8211; Defining the linear weights of the scores as key value pairs. Allowed
-keys are: [&#8220;cbeta&#8221;,&#8221;clash&#8221;,&#8221;torsion&#8221;,&#8221;cb_packing&#8221;,&#8221;hbond&#8221;,&#8221;ss_agreement&#8221;, &#8220;reduced&#8221;, &#8220;intercept&#8221;]
-For every key, the according function in the attached
-<a class="reference internal" href="backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a> gets called and the returned score added to
-the final score with the according weight. If there is an intercept given,
-the according value also gets added to the final score.</li>
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue number of the starting residue of the candidates being scored
-(residue numbers start with one!)</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the chain to which the loop belongs (index relative to the entity forming the environment in the <a class="reference internal" href="backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>)</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.GetAVGClashScore">
-<code class="descname">GetAVGClashScore</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.GetAVGClashScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The average of the clash scores of all <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)">float</a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.GetAVGCBetaScore">
-<code class="descname">GetAVGCBetaScore</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.GetAVGCBetaScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The average of the cbeta scores of all <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)">float</a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.GetAVGReducedScore">
-<code class="descname">GetAVGReducedScore</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.GetAVGReducedScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The average of the reduced scores of all <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)">float</a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.GetAVGTorsionScore">
-<code class="descname">GetAVGTorsionScore</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.GetAVGTorsionScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The average of the torsion scores of all <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)">float</a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.GetAVGPackingScore">
-<code class="descname">GetAVGPackingScore</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.GetAVGPackingScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The average of the packing scores of all <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)">float</a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.GetAVGHBondscore">
-<code class="descname">GetAVGHBondscore</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.GetAVGHBondscore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The average of the HBond scores of all <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)">float</a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.GetAVGSSAgreementscore">
-<code class="descname">GetAVGSSAgreementscore</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.GetAVGSSAgreementscore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The average of the SSAgreement scores of all <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)">float</a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.LoopCandidates.GetAVGCombinedScore">
-<code class="descname">GetAVGCombinedScore</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoopCandidates.GetAVGCombinedScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The average of the combined scores of all <a class="reference internal" href="#promod3.loop.LoopCandidate" title="promod3.loop.LoopCandidate"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidate</span></code></a>.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)">float</a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-</div>
-</div>
-
-
-          </div>
-        </div>
-      </div>
-      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
-        <div class="sphinxsidebarwrapper">
-  <h3><a href="../index.html">Table Of Contents</a></h3>
-  <ul>
-<li><a class="reference internal" href="#">Helper Classes</a><ul>
-<li><a class="reference internal" href="#psipred">Psipred</a></li>
-<li><a class="reference internal" href="#handling-several-loops-at-once">Handling several loops at once</a></li>
-</ul>
-</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="docutils literal"><span class="pre">loop</span></code> - Loop Modelling</a><ul>
-      <li>Previous: <a href="load_loop_objects.html" title="previous chapter">Load Loop Objects</a></li>
-      <li>Next: <a href="../sidechain/index.html" title="next chapter"><code class="docutils literal"><span class="pre">sidechain</span></code> - Sidechain Modelling</a></li>
-  </ul></li>
-  </ul></li>
-  </ul></li>
-</ul>
-</div>
-  <div role="note" aria-label="source link">
-    <h3>This Page</h3>
-    <ul class="this-page-menu">
-      <li><a href="../_sources/loop/helper_classes.txt"
-            rel="nofollow">Show Source</a></li>
-    </ul>
-   </div>
-<div id="searchbox" style="display: none" role="search">
-  <h3>Quick search</h3>
-    <form class="search" action="../search.html" method="get">
-      <input type="text" name="q" />
-      <input type="submit" value="Go" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    <p class="searchtip" style="font-size: 90%">
-    Enter search terms or a module, class or function name.
-    </p>
-</div>
-<script type="text/javascript">$('#searchbox').show(0);</script>
-        </div>
-      </div>
-      <div class="clearer"></div>
-    </div>
-    <div class="footer">
-      &copy;2016, Bienchen.
-      
-      |
-      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
-      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
-      
-      |
-      <a href="../_sources/loop/helper_classes.txt"
-          rel="nofollow">Page source</a>
-    </div>
-
-    
-
-    
-  </body>
-</html>
\ No newline at end of file
diff --git a/doc/html/loop/index.html b/doc/html/loop/index.html
index 728d8a87..17755293 100644
--- a/doc/html/loop/index.html
+++ b/doc/html/loop/index.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>loop - Loop Modelling &mdash; ProMod3 0 documentation</title>
+    <title>loop - Loop Handling &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,10 +23,10 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="Documentation For Users" href="../users.html" />
-    <link rel="next" title="Backbone" href="backbone.html" />
-    <link rel="prev" title="modelling - Protein Modelling" href="../modelling/index.html" />
+    <link rel="next" title="Representing Loops" href="backbone.html" />
+    <link rel="prev" title="All Atom Scorers" href="../scoring/all_atom_scorers.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -40,121 +40,84 @@
           <div class="body" role="main">
             
   <div class="section" id="module-promod3.loop">
-<span id="loop-loop-modelling"></span><h1><a class="reference internal" href="#module-promod3.loop" title="promod3.loop: Loop Modelling"><code class="xref py py-mod docutils literal"><span class="pre">loop</span></code></a> - Loop Modelling<a class="headerlink" href="#module-promod3.loop" title="Permalink to this headline">¶</a></h1>
-<p>Tools and algorithms for loop modelling.
-This module provides ways for representation and manipulation of peptides and
-finally connect them to larger structures. The following example should give
-you a starting point to get an idea of what can be done.</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span>
+<span id="loop-loop-handling"></span><h1><a class="reference internal" href="#module-promod3.loop" title="promod3.loop: Loop Handling"><code class="xref py py-mod docutils literal"><span class="pre">loop</span></code></a> - Loop Handling<a class="headerlink" href="#module-promod3.loop" title="Permalink to this headline">¶</a></h1>
+<p>Tools and algorithms for loop handling. This module provides ways for
+representation of peptides and to obtain fragments to potentially use as
+loops. The following example should give you an idea of what can be done:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">loop</span>
 
-<span class="c"># let&#39;s load a crambin structure from the pdb</span>
-<span class="n">crambin</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="s">&quot;1crn&quot;</span><span class="p">,</span> <span class="n">remote</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
-<span class="n">SEQRES</span> <span class="o">=</span> <span class="s">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">r</span><span class="o">.</span><span class="n">one_letter_code</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">crambin</span><span class="o">.</span><span class="n">residues</span><span class="p">])</span>
+<span class="c"># load an example structure</span>
+<span class="n">prot</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="s">&#39;data/1CRN.pdb&#39;</span><span class="p">)</span>
 
-<span class="c"># this is the sequence we want to remodel</span>
-<span class="n">loop_seq</span> <span class="o">=</span> <span class="n">SEQRES</span><span class="p">[</span><span class="mi">23</span><span class="p">:</span><span class="mi">31</span><span class="p">]</span>
+<span class="c"># extract some additional information</span>
+<span class="n">seqres</span> <span class="o">=</span> <span class="s">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">r</span><span class="o">.</span><span class="n">one_letter_code</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">])</span>
+<span class="n">frag_pos</span> <span class="o">=</span> <span class="mi">35</span>
+<span class="n">frag_length</span> <span class="o">=</span> <span class="mi">9</span>
+<span class="n">frag_seq</span> <span class="o">=</span> <span class="n">seqres</span><span class="p">[</span><span class="n">frag_pos</span><span class="p">:</span><span class="n">frag_pos</span><span class="o">+</span><span class="n">frag_length</span><span class="p">]</span>
+<span class="n">frag_residues</span> <span class="o">=</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">frag_pos</span><span class="p">:</span><span class="n">frag_pos</span><span class="o">+</span><span class="n">frag_length</span><span class="p">]</span>
+<span class="n">ref_backbone</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">BackboneList</span><span class="p">(</span><span class="n">frag_seq</span><span class="p">,</span> <span class="n">frag_residues</span><span class="p">)</span>
+<span class="n">n_stem</span> <span class="o">=</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">frag_pos</span><span class="p">]</span>
+<span class="n">c_stem</span> <span class="o">=</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">frag_pos</span><span class="o">+</span><span class="n">frag_length</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
 
-<span class="c"># let&#39;s define the stem residues</span>
-<span class="n">n_stem</span> <span class="o">=</span> <span class="n">crambin</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="mi">23</span><span class="p">]</span>
-<span class="n">c_stem</span> <span class="o">=</span> <span class="n">crambin</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="mi">30</span><span class="p">]</span>
-
-<span class="c"># we use the StructureDB as source for structural information</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="c"># the FragDB allows to access the StructureDB based on geometric </span>
-<span class="c"># features of the loop stem residue</span>
+<span class="c"># extract potential loops from fragment database based on geometry</span>
 <span class="n">frag_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="c"># the LoopCandidates allow to handle several loops at once</span>
-<span class="c"># we directly want to find potential loop candidates from the</span>
-<span class="c"># previously loaded databases</span>
-<span class="n">loop_candidates</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoopCandidates</span><span class="o">.</span><span class="n">FillFromDatabase</span><span class="p">(</span><span class="n">n_stem</span><span class="p">,</span>
-                                                       <span class="n">c_stem</span><span class="p">,</span>
-                                                       <span class="n">loop_seq</span><span class="p">,</span>
-                                                       <span class="n">frag_db</span><span class="p">,</span>
-                                                       <span class="n">structure_db</span><span class="p">)</span>
-
-<span class="c"># candidates usually don&#39;t match exactly the required stem coords.</span>
-<span class="c"># CCD (Cyclic Coordinate Descent) is one way to enforce this match.</span>
-<span class="n">loop_candidates</span><span class="o">.</span><span class="n">ApplyCCD</span><span class="p">(</span><span class="n">n_stem</span><span class="p">,</span> <span class="n">c_stem</span><span class="p">)</span>
-
-<span class="c"># load a scorer object to compare candidates</span>
-<span class="n">scorer</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadBackboneLoopScorer</span><span class="p">()</span>
-
-<span class="c"># initialize scorer with the environment given by crambin structure</span>
-<span class="n">scorer</span><span class="o">.</span><span class="n">Initialize</span><span class="p">(</span><span class="n">SEQRES</span><span class="p">)</span>
-<span class="n">scorer</span><span class="o">.</span><span class="n">SetEnvironment</span><span class="p">(</span><span class="n">crambin</span><span class="p">)</span>
-
-<span class="c"># the scorer can then be attached to the LoopCandidates object</span>
-<span class="c"># to calculate several different scores, we use a distance dependent</span>
-<span class="c"># statistical potential considering CBeta positions of each residue</span>
-<span class="c"># and a clash score. To calculate the actual score we pass the</span>
-<span class="c"># location of our loop candidates in the overall structure </span>
-<span class="c">#  =&gt; resnum = 24</span>
-<span class="n">loop_candidates</span><span class="o">.</span><span class="n">AttachScorer</span><span class="p">(</span><span class="n">scorer</span><span class="p">)</span>
-<span class="n">loop_candidates</span><span class="o">.</span><span class="n">CalculateCBetaScores</span><span class="p">(</span><span class="mi">24</span><span class="p">)</span>
-<span class="n">loop_candidates</span><span class="o">.</span><span class="n">CalculateClashScores</span><span class="p">(</span><span class="mi">24</span><span class="p">)</span>
-
-<span class="c"># we simply sum up the previously calculated scores and search for</span>
-<span class="c"># the loop with minimal score</span>
-<span class="n">min_score</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="s">&quot;inf&quot;</span><span class="p">)</span>
-<span class="n">min_candidate</span> <span class="o">=</span> <span class="mi">0</span>
-<span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">lc</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">loop_candidates</span><span class="p">):</span>
-  <span class="n">score</span> <span class="o">=</span> <span class="n">lc</span><span class="o">.</span><span class="n">cbeta_score</span> <span class="o">+</span> <span class="n">lc</span><span class="o">.</span><span class="n">clash_score</span>
-  <span class="k">if</span> <span class="n">score</span> <span class="o">&lt;</span> <span class="n">min_score</span><span class="p">:</span>
-    <span class="n">min_score</span> <span class="o">=</span> <span class="n">score</span>
-    <span class="n">min_candidate</span> <span class="o">=</span> <span class="n">i</span>
-  
-<span class="c"># let&#39;s insert the found loop into our structure and save it down</span>
-<span class="n">bb_list</span> <span class="o">=</span> <span class="n">loop_candidates</span><span class="p">[</span><span class="n">min_candidate</span><span class="p">]</span><span class="o">.</span><span class="n">bb_list</span>
-<span class="n">bb_list</span><span class="o">.</span><span class="n">InsertInto</span><span class="p">(</span><span class="n">crambin</span><span class="o">.</span><span class="n">chains</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">n_stem</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">())</span>
-<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">crambin</span><span class="p">,</span> <span class="s">&quot;modified_crambin.pdb&quot;</span><span class="p">)</span>
+<span class="n">fragments</span> <span class="o">=</span> <span class="n">frag_db</span><span class="o">.</span><span class="n">SearchDB</span><span class="p">(</span><span class="n">n_stem</span><span class="p">,</span> <span class="n">c_stem</span><span class="p">,</span> <span class="n">frag_length</span><span class="p">)</span>
+<span class="k">print</span> <span class="s">&quot;Num. fragments found in FragDB: </span><span class="si">%d</span><span class="s">&quot;</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">fragments</span><span class="p">)</span>
+<span class="c"># compare with reference</span>
+<span class="n">struct_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="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">fragments</span><span class="p">)):</span>
+    <span class="c"># get structure from structural database</span>
+    <span class="n">bb_list</span> <span class="o">=</span> <span class="n">struct_db</span><span class="o">.</span><span class="n">GetBackboneList</span><span class="p">(</span><span class="n">n_stem</span><span class="p">,</span> <span class="n">c_stem</span><span class="p">,</span>
+                                        <span class="n">fragments</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">frag_seq</span><span class="p">)</span>
+    <span class="n">ca_rmsd</span> <span class="o">=</span> <span class="n">bb_list</span><span class="o">.</span><span class="n">CARMSD</span><span class="p">(</span><span class="n">ref_backbone</span><span class="p">,</span> <span class="bp">True</span><span class="p">)</span>
+    <span class="k">print</span> <span class="s">&quot;-&gt; fragment </span><span class="si">%d</span><span class="s"> has CA RMSD of </span><span class="si">%.3f</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">ca_rmsd</span><span class="p">)</span>
+
+<span class="c"># extract potential loops from fragment database based on sequence</span>
+<span class="n">fragger</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">Fragger</span><span class="p">(</span><span class="n">frag_seq</span><span class="p">)</span>
+<span class="c"># for simplicity we just use a sequence similarity score</span>
+<span class="n">fragger</span><span class="o">.</span><span class="n">AddSeqSimParameters</span><span class="p">(</span><span class="mf">1.0</span><span class="p">,</span> <span class="n">seq</span><span class="o">.</span><span class="n">alg</span><span class="o">.</span><span class="n">BLOSUM62</span><span class="p">)</span>
+<span class="n">fragger</span><span class="o">.</span><span class="n">Fill</span><span class="p">(</span><span class="n">struct_db</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span>
+<span class="k">print</span> <span class="s">&quot;Num. fragments found in Fragger: </span><span class="si">%d</span><span class="s">&quot;</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">fragger</span><span class="p">)</span>
+<span class="c"># compare fraggers with reference</span>
+<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">fragger</span><span class="p">)):</span>
+    <span class="n">ca_rmsd</span> <span class="o">=</span> <span class="n">fragger</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">CARMSD</span><span class="p">(</span><span class="n">ref_backbone</span><span class="p">,</span> <span class="bp">True</span><span class="p">)</span>
+    <span class="k">print</span> <span class="s">&quot;-&gt; fragment </span><span class="si">%d</span><span class="s"> has CA RMSD of </span><span class="si">%.3f</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">ca_rmsd</span><span class="p">)</span>
 </pre></div>
 </div>
 <p>Contents:</p>
 <div class="toctree-wrapper compound">
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="backbone.html">Representing Loops</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="backbone.html#the-basic-building-blocks">The Basic Building Blocks</a></li>
-<li class="toctree-l2"><a class="reference internal" href="backbone.html#editing-full-stretches-of-backbone-residues">Editing Full Stretches Of Backbone Residues</a></li>
+<li class="toctree-l2"><a class="reference internal" href="backbone.html#the-backbonelist-class">The BackboneList class</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="torsion_sampler.html">Have a closer look at backbone dihedral angles</a><ul>
+<li class="toctree-l1"><a class="reference internal" href="torsion_sampler.html">Sampling Dihedral Angles</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="torsion_sampler.html#defining-amino-acid-triplets">Defining Amino Acid triplets</a></li>
 <li class="toctree-l2"><a class="reference internal" href="torsion_sampler.html#the-torsion-sampler-class">The Torsion Sampler Class</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="structure_db.html">A dump for structural data</a><ul>
+<li class="toctree-l1"><a class="reference internal" href="structure_db.html">Structural Data</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="structure_db.html#defining-chains-and-fragments">Defining Chains and Fragments</a></li>
-<li class="toctree-l2"><a class="reference internal" href="structure_db.html#the-database">The Database</a></li>
+<li class="toctree-l2"><a class="reference internal" href="structure_db.html#the-structure-database">The Structure Database</a></li>
 <li class="toctree-l2"><a class="reference internal" href="structure_db.html#finding-fragments-based-on-geometric-features">Finding Fragments based on Geometric Features</a></li>
 <li class="toctree-l2"><a class="reference internal" href="structure_db.html#finding-fragments-based-on-sequence-features">Finding Fragments based on Sequence Features</a></li>
+<li class="toctree-l2"><a class="reference internal" href="structure_db.html#the-psipredprediction-class">The PsipredPrediction class</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="loop_closing.html">Closing Loops - adapt them to the environment</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="loop_closing.html#ccd">CCD</a></li>
-<li class="toctree-l2"><a class="reference internal" href="loop_closing.html#kic">KIC</a></li>
-<li class="toctree-l2"><a class="reference internal" href="loop_closing.html#relaxing-backbones">Relaxing Backbones</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="backbone_loop_score.html">Loop Scoring</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="backbone_loop_score.html#the-backboneloopscorer">The BackboneLoopScorer</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="monte_carlo.html">Generating Loops DeNovo</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="monte_carlo.html#sampler-object">Sampler Object</a></li>
-<li class="toctree-l2"><a class="reference internal" href="monte_carlo.html#closer-object">Closer Object</a></li>
-<li class="toctree-l2"><a class="reference internal" href="monte_carlo.html#scorer-object">Scorer Object</a></li>
-<li class="toctree-l2"><a class="reference internal" href="monte_carlo.html#cooler-object">Cooler Object</a></li>
+<li class="toctree-l1"><a class="reference internal" href="all_atom.html">Handling All Atom Positions</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="all_atom.html#the-allatomenv-class">The AllAtomEnv class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="all_atom.html#the-allatompositions-class">The AllAtomPositions class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="all_atom.html#the-allatomenvpositions-class">The AllAtomEnvPositions class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="all_atom.html#distinguishing-amino-acid-atoms">Distinguishing amino acid atoms</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="load_loop_objects.html">Loading Precomputed Loop Objects</a></li>
-<li class="toctree-l1"><a class="reference internal" href="helper_classes.html">Helper Classes</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="helper_classes.html#psipred">Psipred</a></li>
-<li class="toctree-l2"><a class="reference internal" href="helper_classes.html#handling-several-loops-at-once">Handling several loops at once</a></li>
+<li class="toctree-l1"><a class="reference internal" href="mm_system_creation.html">Generate <code class="docutils literal"><span class="pre">ost.mol.mm</span></code> systems</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="mm_system_creation.html#create-mm-systems-for-loops">Create MM systems for loops</a></li>
+<li class="toctree-l2"><a class="reference internal" href="mm_system_creation.html#forcefield-lookup-for-amino-acids">Forcefield lookup for amino acids</a></li>
 </ul>
 </li>
+<li class="toctree-l1"><a class="reference internal" href="load_loop_objects.html">Loading Precomputed Objects</a></li>
 </ul>
 </div>
 </div>
@@ -169,8 +132,8 @@ you a starting point to get an idea of what can be done.</p>
 <ul>
   <li><a href="../index.html">Documentation overview</a><ul>
   <li><a href="../users.html">Documentation For Users</a><ul>
-      <li>Previous: <a href="../modelling/index.html" title="previous chapter"><code class="docutils literal"><span class="pre">modelling</span></code> - Protein Modelling</a></li>
-      <li>Next: <a href="backbone.html" title="next chapter">Backbone</a></li>
+      <li>Previous: <a href="../scoring/all_atom_scorers.html" title="previous chapter">All Atom Scorers</a></li>
+      <li>Next: <a href="backbone.html" title="next chapter">Representing Loops</a></li>
   </ul></li>
   </ul></li>
 </ul>
@@ -200,7 +163,7 @@ you a starting point to get an idea of what can be done.</p>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/loop/load_loop_objects.html b/doc/html/loop/load_loop_objects.html
index 77ab79d8..5635d164 100644
--- a/doc/html/loop/load_loop_objects.html
+++ b/doc/html/loop/load_loop_objects.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Load Loop Objects &mdash; ProMod3 0 documentation</title>
+    <title>Loading Precomputed Objects &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,10 +23,10 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
-    <link rel="up" title="loop - Loop Modelling" href="index.html" />
-    <link rel="next" title="Helper Classes" href="helper_classes.html" />
-    <link rel="prev" title="Monte Carlo Sampling" href="monte_carlo.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="loop - Loop Handling" href="index.html" />
+    <link rel="next" title="core - ProMod3 Core Functionality" href="../core/index.html" />
+    <link rel="prev" title="Generate ost.mol.mm systems" href="mm_system_creation.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -39,13 +39,13 @@
         <div class="bodywrapper">
           <div class="body" role="main">
             
-  <div class="section" id="load-loop-objects">
-<h1>Load Loop Objects<a class="headerlink" href="#load-loop-objects" title="Permalink to this headline">¶</a></h1>
+  <div class="section" id="loading-precomputed-objects">
+<h1>Loading Precomputed Objects<a class="headerlink" href="#loading-precomputed-objects" title="Permalink to this headline">¶</a></h1>
 <p>Several data objects are used throughout the loop module.
 ProMod3 offers to load precomputed instances for direct usage.</p>
 <dl class="method">
 <dt id="promod3.loop.LoadTorsionSampler">
-<code class="descclassname">promod3.loop.</code><code class="descname">LoadTorsionSampler</code><span class="sig-paren">(</span><span class="optional">[</span><em>seed = 0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoadTorsionSampler" title="Permalink to this definition">¶</a></dt>
+<code class="descclassname">promod3.loop.</code><code class="descname">LoadTorsionSampler</code><span class="sig-paren">(</span><em>seed=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoadTorsionSampler" title="Permalink to this definition">¶</a></dt>
 <dd><p>Loads and returns a torsion sampler with an amino acid grouping
 as defined by Solis &amp; Rachovsky [1] that has been trained on
 non-redundant protein structures.</p>
@@ -65,7 +65,7 @@ non-redundant protein structures.</p>
 
 <dl class="method">
 <dt id="promod3.loop.LoadTorsionSamplerCoil">
-<code class="descclassname">promod3.loop.</code><code class="descname">LoadTorsionSamplerCoil</code><span class="sig-paren">(</span><span class="optional">[</span><em>seed = 0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoadTorsionSamplerCoil" title="Permalink to this definition">¶</a></dt>
+<code class="descclassname">promod3.loop.</code><code class="descname">LoadTorsionSamplerCoil</code><span class="sig-paren">(</span><em>seed=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoadTorsionSamplerCoil" title="Permalink to this definition">¶</a></dt>
 <dd><p>Loads and returns a torsion sampler with an amino acid grouping
 as defined by Solis &amp; Rachovsky [1] that has been trained on coil
 residues of  non-redundant protein structures.</p>
@@ -85,7 +85,7 @@ residues of  non-redundant protein structures.</p>
 
 <dl class="method">
 <dt id="promod3.loop.LoadTorsionSamplerHelical">
-<code class="descclassname">promod3.loop.</code><code class="descname">LoadTorsionSamplerHelical</code><span class="sig-paren">(</span><span class="optional">[</span><em>seed = 0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoadTorsionSamplerHelical" title="Permalink to this definition">¶</a></dt>
+<code class="descclassname">promod3.loop.</code><code class="descname">LoadTorsionSamplerHelical</code><span class="sig-paren">(</span><em>seed=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoadTorsionSamplerHelical" title="Permalink to this definition">¶</a></dt>
 <dd><p>Loads and returns a torsion sampler with an amino acid grouping
 as defined by Solis &amp; Rachovsky [1] that has been trained on helical
 residues of  non-redundant protein structures.</p>
@@ -105,7 +105,7 @@ residues of  non-redundant protein structures.</p>
 
 <dl class="method">
 <dt id="promod3.loop.LoadTorsionSamplerExtended">
-<code class="descclassname">promod3.loop.</code><code class="descname">LoadTorsionSamplerExtended</code><span class="sig-paren">(</span><span class="optional">[</span><em>seed = 0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoadTorsionSamplerExtended" title="Permalink to this definition">¶</a></dt>
+<code class="descclassname">promod3.loop.</code><code class="descname">LoadTorsionSamplerExtended</code><span class="sig-paren">(</span><em>seed=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoadTorsionSamplerExtended" title="Permalink to this definition">¶</a></dt>
 <dd><p>Loads and returns a torsion sampler with an amino acid grouping
 as defined by Solis &amp; Rachovsky [1] that has been trained on extended
 residues of  non-redundant protein structures.</p>
@@ -142,7 +142,7 @@ therefore capable of bridging gaps up to the length of 12.</p>
 
 <dl class="method">
 <dt id="promod3.loop.LoadStructureDB">
-<code class="descclassname">promod3.loop.</code><code class="descname">LoadStructureDB</code><span class="sig-paren">(</span><span class="optional">[</span><em>load_frequencies=False</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoadStructureDB" title="Permalink to this definition">¶</a></dt>
+<code class="descclassname">promod3.loop.</code><code class="descname">LoadStructureDB</code><span class="sig-paren">(</span><em>load_frequencies=True</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoadStructureDB" title="Permalink to this definition">¶</a></dt>
 <dd><p>Loads and returns a structure db containing roughly 24000 chains form the
 PDB with redundancy cutoff of 90%</p>
 <table class="docutils field-list" frame="void" rules="none">
@@ -150,11 +150,8 @@ PDB with redundancy cutoff of 90%</p>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>load_frequencies</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If True, the full database including profile
-information for every position gets loaded.
-A database without profiles loads faster and
-requires less memory. But it&#8217;s not possible
-to add new coordinates or call one of the
-profile dependent functions.</td>
+information gets loaded (see
+<a class="reference internal" href="structure_db.html#promod3.loop.StructureDB.Load" title="promod3.loop.StructureDB.Load"><code class="xref py py-meth docutils literal"><span class="pre">StructureDB.Load()</span></code></a>).</td>
 </tr>
 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The structure db</td>
 </tr>
@@ -164,23 +161,6 @@ profile dependent functions.</td>
 </table>
 </dd></dl>
 
-<dl class="method">
-<dt id="promod3.loop.LoadBackboneLoopScorer">
-<code class="descclassname">promod3.loop.</code><code class="descname">LoadBackboneLoopScorer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LoadBackboneLoopScorer" title="Permalink to this definition">¶</a></dt>
-<dd><p>Loads and returns a backbone loop scorer with already set statistical
-potentials.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The scorer</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
 <dl class="docutils">
 <dt>[1] A. D. Solis and S. Rackovsky. Improvement of statistical potentials and</dt>
 <dd>threading score functions using information maximization.
@@ -198,9 +178,9 @@ Proteins, 62(4):892–908, Mar 2006.</dd>
 <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="docutils literal"><span class="pre">loop</span></code> - Loop Modelling</a><ul>
-      <li>Previous: <a href="monte_carlo.html" title="previous chapter">Monte Carlo Sampling</a></li>
-      <li>Next: <a href="helper_classes.html" title="next chapter">Helper Classes</a></li>
+  <li><a href="index.html"><code class="docutils literal"><span class="pre">loop</span></code> - Loop Handling</a><ul>
+      <li>Previous: <a href="mm_system_creation.html" title="previous chapter">Generate <code class="docutils literal"><span class="pre">ost.mol.mm</span></code> systems</a></li>
+      <li>Next: <a href="../core/index.html" title="next chapter"><code class="docutils literal"><span class="pre">core</span></code> - ProMod3 Core Functionality</a></li>
   </ul></li>
   </ul></li>
   </ul></li>
@@ -231,7 +211,7 @@ Proteins, 62(4):892–908, Mar 2006.</dd>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/loop/loop_closing.html b/doc/html/loop/loop_closing.html
deleted file mode 100644
index 49af751d..00000000
--- a/doc/html/loop/loop_closing.html
+++ /dev/null
@@ -1,371 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    
-    <title>Loop Closing &mdash; ProMod3 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">
-      var DOCUMENTATION_OPTIONS = {
-        URL_ROOT:    '../',
-        VERSION:     '0',
-        COLLAPSE_INDEX: false,
-        FILE_SUFFIX: '.html',
-        HAS_SOURCE:  true
-      };
-    </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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
-    <link rel="up" title="loop - Loop Modelling" href="index.html" />
-    <link rel="next" title="Loop Scoring" href="backbone_loop_score.html" />
-    <link rel="prev" title="Structural Database" href="structure_db.html" />
-   
-  
-  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
-
-  </head>
-  <body role="document">  
-
-    <div class="document">
-      <div class="documentwrapper">
-        <div class="bodywrapper">
-          <div class="body" role="main">
-            
-  <div class="section" id="loop-closing">
-<h1>Loop Closing<a class="headerlink" href="#loop-closing" title="Permalink to this headline">¶</a></h1>
-<p>Loops, represented as <a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> objects, often need to undergo
-conformational changes to fit into gaps defined by stem residues.
-ProMod3 implements two algorithms performing this task.</p>
-<blockquote>
-<div><ul class="simple">
-<li>There is cyclic coordinate descent (CCD) <a class="reference internal" href="#canutescu2003" id="id1">[canutescu2003]</a></li>
-<li>and kinematic closure (KIC) <a class="reference internal" href="#mandell2009" id="id2">[mandell2009]</a></li>
-</ul>
-</div></blockquote>
-<p>In case of small gaps or small issues in the <a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> you might
-also consider the <a class="reference internal" href="#promod3.loop.BackboneRelaxer" title="promod3.loop.BackboneRelaxer"><code class="xref py py-class docutils literal"><span class="pre">BackboneRelaxer</span></code></a>.</p>
-<div class="section" id="ccd">
-<h2>CCD<a class="headerlink" href="#ccd" title="Permalink to this headline">¶</a></h2>
-<p>The ProMod3 implementation of the cyclic coordinate descent first superposes
-the n-stem of the input <a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> with the provided n-stem
-positions. In every iteration of the algorithm, one residue of the
-<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> gets randomly selected. If the residue is not the n-stem,
-the ideal phi angle, that minimizes the RMSD between the <a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>
-c-stem and the target c-stem positions gets calculated and directly applied.
-The same thing is done for the psi angle if the selected residue is not the
-c-stem. Iterations continue until a c-stem RMSD threshold is reached or number
-of iterations hit a limit.
-By performing CCD, unfavourable backbone dihedral pairs can be introduced.
-It is therefore optionally possible to use <a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a> to guide the
-iterative process.
-In this case, the algorithm calculates the probablity of observing the dihedral
-pair before and after performing the phi/psi update. If the fraction
-after/before is smaller than a random number in range [0;1[, the proposed
-dihedral pair gets rejected and the next iteration starts. Please note, that
-this increases the probability of non-convergence.</p>
-<dl class="class">
-<dt id="promod3.loop.CCD">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">CCD</code><a class="headerlink" href="#promod3.loop.CCD" title="Permalink to this definition">¶</a></dt>
-<dd><p>Class, that sets up everything you need to perform a particular loop closing
-action.</p>
-<dl class="method">
-<dt id="promod3.loop.CCD.CCD">
-<code class="descname">CCD</code><span class="sig-paren">(</span><em>sequence</em>, <em>n_stem</em>, <em>c_stem</em>, <em>torsion_sampler</em>, <em>max_steps</em>, <em>rmsd_cutoff</em>, <em>seed</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.CCD.CCD" title="Permalink to this definition">¶</a></dt>
-<dd><p>All runs with this CCD object will be with application of torsion samplers
-to avoid moving into unfavourable regions of the backbone dihedrals.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence of the backbones to be closed</li>
-<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the n_stem.
-If the residue before <em>n_stem</em> doesn&#8217;t exist, the
-torsion sampler will use a default residue (ALA) and
-and phi angle (-1.0472) to evaluate the first angle.</li>
-<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the c_stem.
-If the residue after <em>c_stem</em> doesn&#8217;t exist, the
-torsion sampler will use a default residue (ALA) and
-psi angle (-0.7854) to evaluate the last angle.</li>
-<li><strong>torsion_sampler</strong> (<a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a> / <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; To extract probabilities for the analysis of the backbone
-dihedrals. You either pass a list with <a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>
-objects for every residue of the loop to be closed or a single
-<a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>, that will be applied on all residues.</li>
-<li><strong>max_steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Maximal number of iterations</li>
-<li><strong>rmsd_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The algorithm stops as soon as the c_stem of the loop to be
-closed has RMSD below the <strong>c_stem</strong></li>
-<li><strong>seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Seed of random number generator to decide whether new phi/psi pair
-should be accepted.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if a list of torsion samplers is
-given with inconsistent length regarding the sequence. Another
-requirement is that all backbone atoms of the stems must be
-present.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt>
-<code class="descname">CCD</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>max_steps</em>, <em>rmsd_cutoff</em><span class="sig-paren">)</span></dt>
-<dd><p>All runs with this CCD object will be without application of torsion samplers.
-This is faster but might lead to weird backbone dihedral pairs.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the n_stem</li>
-<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the c_stem</li>
-<li><strong>max_steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Maximal number of iterations</li>
-<li><strong>rmsd_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The algorithm stops as soon as the c_stem of the loop to be
-closed has RMSD below the <strong>c_stem</strong></li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.CCD.Close">
-<code class="descname">Close</code><span class="sig-paren">(</span><em>bb_list</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.CCD.Close" title="Permalink to this definition">¶</a></dt>
-<dd><p>Closes given <strong>bb_list</strong> with the settings set at initialization.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to be closed</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a> Whether <strong>rmsd_cutoff</strong> has been reached</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if the CCD object has been
-initialized with <a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a> support and the length of
-the <strong>bb_list</strong> is not consistent with the initial sequence.</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-</div>
-<div class="section" id="kic">
-<h2>KIC<a class="headerlink" href="#kic" title="Permalink to this headline">¶</a></h2>
-<p>The kinematic closure leads to a fragmentation of the loop based on given
-pivot residues. It then calculates possible relative orientations
-of these fragments by considering constraints of bond length and bond angles
-at these pivot residues. Due to the internal mathematical formalism, up to
-16 solutions can be found for a given loop closing problem.</p>
-<dl class="class">
-<dt id="promod3.loop.KIC">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">KIC</code><a class="headerlink" href="#promod3.loop.KIC" title="Permalink to this definition">¶</a></dt>
-<dd><p>Class, that sets up everything you need to perform a particular loop closing
-action.</p>
-<dl class="method">
-<dt id="promod3.loop.KIC.KIC">
-<code class="descname">KIC</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.KIC.KIC" title="Permalink to this definition">¶</a></dt>
-<dd><p>All runs of this KIC closing object will adapt the input loops to these
-stem residues.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n_stem</strong> &#8211; Residue describing the stem towards n_ter</li>
-<li><strong>c_stem</strong> &#8211; Residue describing the stem towards c_ter</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.KIC.Close">
-<code class="descname">Close</code><span class="sig-paren">(</span><em>bb_list</em>, <em>pivot_one</em>, <em>pivot_two</em>, <em>pivot_three</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.KIC.Close" title="Permalink to this definition">¶</a></dt>
-<dd><p>Applies KIC algorithm, so that the output loops match the given stem residues</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to be closed</li>
-<li><strong>pivot_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of first pivot residue</li>
-<li><strong>pivot_two</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of second pivot residue</li>
-<li><strong>pivot_three</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of third pivot residue</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">List of <a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> objects representing
-the closed loops. There is a maximum of 16 entries.</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> in case of invalid pivot indices.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-</div>
-<div class="section" id="relaxing-backbones">
-<h2>Relaxing Backbones<a class="headerlink" href="#relaxing-backbones" title="Permalink to this headline">¶</a></h2>
-<p>In many cases one wants to quickly relax a <a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>. This
-can be useful to close small gaps in the backbone or resolve the most
-severe clashes. The <a class="reference internal" href="#promod3.loop.BackboneRelaxer" title="promod3.loop.BackboneRelaxer"><code class="xref py py-class docutils literal"><span class="pre">BackboneRelaxer</span></code></a> internally sets up a topology
-for the input <a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> based on the CHARMM27 forcefield.
-Once setup, every <a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> of same length and sequence
-can be relaxed by the relaxer.</p>
-<dl class="class">
-<dt id="promod3.loop.BackboneRelaxer">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">BackboneRelaxer</code><span class="sig-paren">(</span><em>bb_list</em><span class="optional">[</span>, <em>fix_nterm=True</em>, <em>fix_cterm=True</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneRelaxer" title="Permalink to this definition">¶</a></dt>
-<dd><p>Sets up a molecular mechanics topology for given <strong>bb_list</strong>. Every
-<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> of same length and sequence can then be
-relaxed.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Basis for topology creation</li>
-<li><strong>fix_nterm</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether n-terminal backbone positions should kept
-rigid during relaxation.</li>
-<li><strong>fix_cterm</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether c-terminal backbone positions should kept
-rigid during relaxation.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <strong>bb_list</strong> is below 2</p>
-</td>
-</tr>
-</tbody>
-</table>
-<dl class="method">
-<dt id="promod3.loop.BackboneRelaxer.Run">
-<code class="descname">Run</code><span class="sig-paren">(</span><em>bb_list</em><span class="optional">[</span>, <em>steps = 100</em>, <em>stop_criterion = 0.01</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.BackboneRelaxer.Run" title="Permalink to this definition">¶</a></dt>
-<dd><p>Performs steepest descent on given BackboneList.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; To be relaxed</li>
-<li><strong>steps</strong> (<code class="xref py py-class docutils literal"><span class="pre">steps</span></code>) &#8211; number of steepest descent steps</li>
-<li><strong>stop_criterion</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; If maximum force acting on a particle
-falls below that threshold, the
-relaxation aborts.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Forcefield energy upon relaxation</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>bb_list</strong> has not the same
-size or sequence as the initial one.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-<table class="docutils citation" frame="void" id="canutescu2003" rules="none">
-<colgroup><col class="label" /><col /></colgroup>
-<tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id1">[canutescu2003]</a></td><td>Canutescu AA and Dunbrack RL Jr. (2003). Cyclic coordinate descent: A robotics algorithm for protein loop closure. Protein Sci. 12(5):963–972.</td></tr>
-</tbody>
-</table>
-<table class="docutils citation" frame="void" id="mandell2009" rules="none">
-<colgroup><col class="label" /><col /></colgroup>
-<tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id2">[mandell2009]</a></td><td>Mandell DJ, Coutsias EA and Kortemme T (2009). Sub-angstrom accuracy in protein loop reconstruction by robotics-inspired conformational sampling. Nat Methods. 6(8):551-2.</td></tr>
-</tbody>
-</table>
-</div>
-</div>
-
-
-          </div>
-        </div>
-      </div>
-      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
-        <div class="sphinxsidebarwrapper">
-  <h3><a href="../index.html">Table Of Contents</a></h3>
-  <ul>
-<li><a class="reference internal" href="#">Loop Closing</a><ul>
-<li><a class="reference internal" href="#ccd">CCD</a></li>
-<li><a class="reference internal" href="#kic">KIC</a></li>
-<li><a class="reference internal" href="#relaxing-backbones">Relaxing Backbones</a></li>
-</ul>
-</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="docutils literal"><span class="pre">loop</span></code> - Loop Modelling</a><ul>
-      <li>Previous: <a href="structure_db.html" title="previous chapter">Structural Database</a></li>
-      <li>Next: <a href="backbone_loop_score.html" title="next chapter">Loop Scoring</a></li>
-  </ul></li>
-  </ul></li>
-  </ul></li>
-</ul>
-</div>
-  <div role="note" aria-label="source link">
-    <h3>This Page</h3>
-    <ul class="this-page-menu">
-      <li><a href="../_sources/loop/loop_closing.txt"
-            rel="nofollow">Show Source</a></li>
-    </ul>
-   </div>
-<div id="searchbox" style="display: none" role="search">
-  <h3>Quick search</h3>
-    <form class="search" action="../search.html" method="get">
-      <input type="text" name="q" />
-      <input type="submit" value="Go" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    <p class="searchtip" style="font-size: 90%">
-    Enter search terms or a module, class or function name.
-    </p>
-</div>
-<script type="text/javascript">$('#searchbox').show(0);</script>
-        </div>
-      </div>
-      <div class="clearer"></div>
-    </div>
-    <div class="footer">
-      &copy;2016, Bienchen.
-      
-      |
-      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
-      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
-      
-      |
-      <a href="../_sources/loop/loop_closing.txt"
-          rel="nofollow">Page source</a>
-    </div>
-
-    
-
-    
-  </body>
-</html>
\ No newline at end of file
diff --git a/doc/html/loop/mm_system_creation.html b/doc/html/loop/mm_system_creation.html
new file mode 100644
index 00000000..572ce28f
--- /dev/null
+++ b/doc/html/loop/mm_system_creation.html
@@ -0,0 +1,1611 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Generate ost.mol.mm systems &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="loop - Loop Handling" href="index.html" />
+    <link rel="next" title="Loading Precomputed Objects" href="load_loop_objects.html" />
+    <link rel="prev" title="Handling All Atom Positions" href="all_atom.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="generate-ost-mol-mm-systems">
+<h1>Generate <code class="xref py py-mod docutils literal"><span class="pre">ost.mol.mm</span></code> systems<a class="headerlink" href="#generate-ost-mol-mm-systems" title="Permalink to this headline">¶</a></h1>
+<p>To simplify the creation of <code class="xref py py-mod docutils literal"><span class="pre">ost.mol.mm</span></code> / OpenMM simulations for loops in
+proteins, we define a system creator for loops (<a class="reference internal" href="#promod3.loop.MmSystemCreator" title="promod3.loop.MmSystemCreator"><code class="xref py py-class docutils literal"><span class="pre">MmSystemCreator</span></code></a>) and a
+specialized forcefield lookup for amino acids (<a class="reference internal" href="#promod3.loop.ForcefieldLookup" title="promod3.loop.ForcefieldLookup"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldLookup</span></code></a>).</p>
+<p>The example below showcases the creation and use of an MM system:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span><span class="p">,</span> <span class="n">geom</span>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span>
+
+<span class="c"># setup system creator</span>
+<span class="n">ff_lookup</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">ForcefieldLookup</span><span class="o">.</span><span class="n">GetDefault</span><span class="p">()</span>
+<span class="n">mm_sys</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">MmSystemCreator</span><span class="p">(</span><span class="n">ff_lookup</span><span class="p">)</span>
+
+<span class="c"># load example (has res. numbering starting at 1)</span>
+<span class="n">ent</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="s">&quot;data/1CRN.pdb&quot;</span><span class="p">)</span>
+<span class="n">res_list</span> <span class="o">=</span> <span class="n">ent</span><span class="o">.</span><span class="n">residues</span>
+<span class="n">num_residues</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">res_list</span><span class="p">)</span>
+
+<span class="c"># get all atom positions for full protein</span>
+<span class="n">all_atoms</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">AllAtomPositions</span><span class="p">(</span><span class="n">res_list</span><span class="p">)</span>
+<span class="c"># here full structure in res_indices but in practice this could</span>
+<span class="c"># be just a subset of residues relevant to the loop of interest</span>
+<span class="n">res_indices</span> <span class="o">=</span> <span class="nb">range</span><span class="p">(</span><span class="n">num_residues</span><span class="p">)</span>
+<span class="c"># define two loops (indices into res_indices list)</span>
+<span class="n">loop_start_indices</span> <span class="o">=</span> <span class="p">[</span><span class="mi">10</span><span class="p">,</span> <span class="mi">20</span><span class="p">]</span>
+<span class="n">loop_lengths</span> <span class="o">=</span> <span class="p">[</span><span class="mi">6</span><span class="p">,</span> <span class="mi">4</span><span class="p">]</span>
+<span class="c"># define which of the res_indices is terminal</span>
+<span class="n">is_n_ter</span> <span class="o">=</span> <span class="p">[</span><span class="bp">True</span><span class="p">]</span> <span class="o">+</span> <span class="p">[</span><span class="bp">False</span><span class="p">]</span> <span class="o">*</span> <span class="p">(</span><span class="n">num_residues</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
+<span class="n">is_c_ter</span> <span class="o">=</span> <span class="p">[</span><span class="bp">False</span><span class="p">]</span> <span class="o">*</span> <span class="p">(</span><span class="n">num_residues</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="p">[</span><span class="bp">True</span><span class="p">]</span>
+<span class="c"># get disulfid bridges</span>
+<span class="n">disulfid_bridges</span> <span class="o">=</span> <span class="n">mm_sys</span><span class="o">.</span><span class="n">GetDisulfidBridges</span><span class="p">(</span><span class="n">all_atoms</span><span class="p">,</span> <span class="n">res_indices</span><span class="p">)</span>
+<span class="c"># setup MM system</span>
+<span class="n">mm_sys</span><span class="o">.</span><span class="n">SetupSystem</span><span class="p">(</span><span class="n">all_atoms</span><span class="p">,</span> <span class="n">res_indices</span><span class="p">,</span> <span class="n">loop_start_indices</span><span class="p">,</span>
+                   <span class="n">loop_lengths</span><span class="p">,</span> <span class="n">is_n_ter</span><span class="p">,</span> <span class="n">is_c_ter</span><span class="p">,</span> <span class="n">disulfid_bridges</span><span class="p">)</span>
+
+<span class="c"># run simulation</span>
+<span class="n">sim</span> <span class="o">=</span> <span class="n">mm_sys</span><span class="o">.</span><span class="n">GetSimulation</span><span class="p">()</span>
+<span class="k">print</span> <span class="s">&quot;Potential energy before: </span><span class="si">%g</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">sim</span><span class="o">.</span><span class="n">GetPotentialEnergy</span><span class="p">()</span>
+<span class="n">sim</span><span class="o">.</span><span class="n">ApplySD</span><span class="p">(</span><span class="mf">0.01</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
+<span class="k">print</span> <span class="s">&quot;Potential energy after: </span><span class="si">%g</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">sim</span><span class="o">.</span><span class="n">GetPotentialEnergy</span><span class="p">()</span>
+
+<span class="c"># extract new loop positions and store it</span>
+<span class="n">mm_sys</span><span class="o">.</span><span class="n">ExtractLoopPositions</span><span class="p">(</span><span class="n">all_atoms</span><span class="p">,</span> <span class="n">res_indices</span><span class="p">)</span>
+<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">all_atoms</span><span class="o">.</span><span class="n">ToEntity</span><span class="p">(),</span> <span class="s">&quot;mm_sys_output.pdb&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">To simplify use when sidechains may be missing and the region of interest for
+the MM system has to be determined, it might be better to use the simpler
+<a class="reference internal" href="../modelling/sidechain_reconstruction.html#promod3.modelling.SidechainReconstructor" title="promod3.modelling.SidechainReconstructor"><code class="xref py py-class docutils literal"><span class="pre">promod3.modelling.SidechainReconstructor</span></code></a> and
+<a class="reference internal" href="../modelling/loop_closing.html#promod3.modelling.AllAtomRelaxer" title="promod3.modelling.AllAtomRelaxer"><code class="xref py py-class docutils literal"><span class="pre">promod3.modelling.AllAtomRelaxer</span></code></a> classes. Even if all the sidechains
+are available, those classes will be helpful since the overhead to check
+sidechains without reconstructing them is minimal.</p>
+</div>
+<div class="section" id="create-mm-systems-for-loops">
+<h2>Create MM systems for loops<a class="headerlink" href="#create-mm-systems-for-loops" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.loop.MmSystemCreator">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">MmSystemCreator</code><span class="sig-paren">(</span><em>ff_lookup</em>, <em>fix_surrounding_hydrogens=True</em>, <em>kill_electrostatics=False</em>, <em>nonbonded_cutoff=8</em>, <em>inaccurate_pot_energy=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator" title="Permalink to this definition">¶</a></dt>
+<dd><p>Setup a system creator for a specific forcefield. The constructor only stores
+the settings. Most setup work is done by <a class="reference internal" href="#promod3.loop.MmSystemCreator.SetupSystem" title="promod3.loop.MmSystemCreator.SetupSystem"><code class="xref py py-meth docutils literal"><span class="pre">SetupSystem()</span></code></a>.</p>
+<p>The idea is to have a set of movable loop residues and a set of fixed
+surrounding residues which interact with the loop.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ff_lookup</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldLookup" title="promod3.loop.ForcefieldLookup"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldLookup</span></code></a>) &#8211; Forcefield to use with this system creator.</li>
+<li><strong>fix_surrounding_hydrogens</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If False, the hydrogens of the surrounding
+residues can move to improve H-bond building
+(True by default as it only has a minor
+impact on the result and a big one on
+performance).</li>
+<li><strong>kill_electrostatics</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If True, all charges are removed from the system.
+This is good for H-bond building, but may be bad
+if residues in the surrounding are missing (gaps).</li>
+<li><strong>nonbonded_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Defines cutoff to set for non bonded interactions.
+Recommended values: 5 if kill_electrostatics = True,
+8 otherwise. Negative value means no cutoff.</li>
+<li><strong>inaccurate_pot_energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If True, we do not set correct non-bonded
+interactions between fixed atoms. This leads
+to inaccurate pot. energies but it is faster and
+has no effect on simulation runs (e.g. ApplySD)
+otherwise.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="method">
+<dt id="promod3.loop.MmSystemCreator.GetDisulfidBridges">
+<code class="descname">GetDisulfidBridges</code><span class="sig-paren">(</span><em>all_pos</em>, <em>res_indices</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator.GetDisulfidBridges" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Pairs of indices (i,j), where res_indices[i] and res_indices[j] are
+assumed to have a disulfid bridge (CYS-SG pairs within 2.5 A).</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> with two <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>all_pos</strong> (<a class="reference internal" href="all_atom.html#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a>) &#8211; Provides positions for each <em>res_indices[i]</em>.</li>
+<li><strong>res_indices</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue indices into <em>all_pos</em>.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.MmSystemCreator.SetupSystem">
+<code class="descname">SetupSystem</code><span class="sig-paren">(</span><em>all_pos</em>, <em>res_indices</em>, <em>loop_length</em>, <em>is_n_ter</em>, <em>is_c_ter</em>, <em>disulfid_bridges</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator.SetupSystem" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">SetupSystem</code><span class="sig-paren">(</span><em>all_pos</em>, <em>res_indices</em>, <em>loop_start_indices</em>, <em>loop_lengths</em>, <em>is_n_ter</em>, <em>is_c_ter</em>, <em>disulfid_bridges</em><span class="sig-paren">)</span></dt>
+<dd><p>Setup a new system for the loop / surrounding defined by <em>all_pos</em> and
+<em>res_indices</em>. Positions are taken from <em>all_pos[res_indices[i]]</em> and each
+of them must have all heavy atoms defined. Residue <em>all_pos[i]</em> is assumed
+to be peptide bound to <em>all_pos[i-1]</em> unless res. <em>i</em> is labelled as
+N-terminal. If <em>all_pos[i-1]</em> has an unset C (could happen for gaps while
+modelling), res. <em>i</em> will still be treated as if peptide-bound and the
+hydrogen attached to N is built assuming a helical structure as an
+approximation. Similarly, we do not generate OXT atoms for residues followed
+by a gap unless they are specifically labelled as C-terminal.</p>
+<p>Each loop is defined by an entry in <em>loop_start_indices</em> and <em>loop_lengths</em>.
+For loop <em>i_loop</em>, <em>res_indices[loop_start_indices[i_loop]]</em> is the N-stem
+and <em>res_indices[loop_start_indices[i_loop] + loop_lengths[i_loop] - 1]</em> is
+the C-stem of the loop. The loop indices are expected to be contiguous in
+<em>res_indices</em> between the stems. The stems of the loop are kept fixed (N,
+CA, CB for N-stem / CA, CB, C, O for C-stem) unless they are terminal
+residues. Overlapping loops are merged and 0-length loops are removed.</p>
+<p>If <em>loop_length</em> is given, a single loop with start index 0 and the given
+loop length is defined.</p>
+<p>If a system was setup previously, it is overwritten completely.</p>
+<p>If possible, this uses the &#8220;CPU&#8221; platform in OpenMM using the env. variable
+<code class="docutils literal"><span class="pre">PM3_OPENMM_CPU_THREADS</span></code> to define the number of desired threads (1 thread
+is used if variable is undefined).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>all_pos</strong> (<a class="reference internal" href="all_atom.html#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a>) &#8211; Provides positions for each <em>res_indices[i]</em>.</li>
+<li><strong>res_indices</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue indices into <em>all_pos</em>.</li>
+<li><strong>loop_length</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length of single loop (incl. stems).</li>
+<li><strong>loop_start_indices</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Start indices of loops.</li>
+<li><strong>loop_lengths</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Lengths of loops (incl. stems).</li>
+<li><strong>is_n_ter</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; For each <em>res_indices[i]</em>, <em>is_n_ter[i]</em> defines whether
+that residue is N-terminal.</li>
+<li><strong>is_c_ter</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; For each <em>res_indices[i]</em>, <em>is_c_ter[i]</em> defines whether
+that residue is C-terminal.</li>
+<li><strong>disulfid_bridges</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> with two
+<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Pairs of indices (i,j), where res_indices[i] and
+res_indices[j] form a disulfid bridge (see
+<a class="reference internal" href="#promod3.loop.MmSystemCreator.GetDisulfidBridges" title="promod3.loop.MmSystemCreator.GetDisulfidBridges"><code class="xref py py-meth docutils literal"><span class="pre">GetDisulfidBridges()</span></code></a>)</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if loops out of bounds with respect
+to <em>res_indices</em>, <em>loop_start_indices</em> / <em>loop_lengths</em> or
+<em>res_indices</em> / <em>is_n_ter</em> / <em>is_c_ter</em> have inconsistent lengths,
+or if any <em>all_pos[res_indices[i]]</em> is invalid or has unset heavy
+atoms.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.MmSystemCreator.UpdatePositions">
+<code class="descname">UpdatePositions</code><span class="sig-paren">(</span><em>all_pos</em>, <em>res_indices</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator.UpdatePositions" title="Permalink to this definition">¶</a></dt>
+<dd><p>Updates the positions in the system. Even though <a class="reference internal" href="#promod3.loop.MmSystemCreator.SetupSystem" title="promod3.loop.MmSystemCreator.SetupSystem"><code class="xref py py-meth docutils literal"><span class="pre">SetupSystem()</span></code></a> is
+already very fast, this can speed up resetting a simulation. The data must
+be consistent with the data used in the last <a class="reference internal" href="#promod3.loop.MmSystemCreator.SetupSystem" title="promod3.loop.MmSystemCreator.SetupSystem"><code class="xref py py-meth docutils literal"><span class="pre">SetupSystem()</span></code></a> call.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>all_pos</strong> (<a class="reference internal" href="all_atom.html#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a>) &#8211; Provides positions for each <em>res_indices[i]</em>.</li>
+<li><strong>res_indices</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue indices into <em>all_pos</em>.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if data is inconsistent with last
+<a class="reference internal" href="#promod3.loop.MmSystemCreator.SetupSystem" title="promod3.loop.MmSystemCreator.SetupSystem"><code class="xref py py-meth docutils literal"><span class="pre">SetupSystem()</span></code></a> call (same number of residues, same AA).</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.MmSystemCreator.ExtractLoopPositions">
+<code class="descname">ExtractLoopPositions</code><span class="sig-paren">(</span><em>loop_pos</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator.ExtractLoopPositions" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">ExtractLoopPositions</code><span class="sig-paren">(</span><em>out_pos</em>, <em>res_indices</em><span class="sig-paren">)</span></dt>
+<dd><p>Extracts loop positions from the current simulation. If the simulation was
+run (via <a class="reference internal" href="#promod3.loop.MmSystemCreator.GetSimulation" title="promod3.loop.MmSystemCreator.GetSimulation"><code class="xref py py-meth docutils literal"><span class="pre">GetSimulation()</span></code></a>), we internally have new positions for the
+residues corresponding to <em>all_pos[res_indices[i]]</em> passed in
+<a class="reference internal" href="#promod3.loop.MmSystemCreator.SetupSystem" title="promod3.loop.MmSystemCreator.SetupSystem"><code class="xref py py-meth docutils literal"><span class="pre">SetupSystem()</span></code></a>. This function then extracts these positions back into a
+compatible output storage.</p>
+<p>If <em>loop_pos</em> is passed, only the loops are stored. The loop residues are
+stored contiguously and the loops are stored in the order given by
+<a class="reference internal" href="#promod3.loop.MmSystemCreator.GetLoopStartIndices" title="promod3.loop.MmSystemCreator.GetLoopStartIndices"><code class="xref py py-meth docutils literal"><span class="pre">GetLoopStartIndices()</span></code></a> / <a class="reference internal" href="#promod3.loop.MmSystemCreator.GetLoopLengths" title="promod3.loop.MmSystemCreator.GetLoopLengths"><code class="xref py py-meth docutils literal"><span class="pre">GetLoopLengths()</span></code></a>. The <em>loop_pos</em> storage
+must have at least <a class="reference internal" href="#promod3.loop.MmSystemCreator.GetNumLoopResidues" title="promod3.loop.MmSystemCreator.GetNumLoopResidues"><code class="xref py py-meth docutils literal"><span class="pre">GetNumLoopResidues()</span></code></a> residues and must have
+matching amino acid types with respect to the loop residues passed as
+<em>all_pos</em> of <a class="reference internal" href="#promod3.loop.MmSystemCreator.SetupSystem" title="promod3.loop.MmSystemCreator.SetupSystem"><code class="xref py py-meth docutils literal"><span class="pre">SetupSystem()</span></code></a>.</p>
+<p>If <em>out_pos</em> and <em>res_indices</em> are passed, residues must have matching amino
+acid types for <em>out_pos[res_indices[i]]</em> and <em>all_pos[res_indices[i]]</em> of
+<a class="reference internal" href="#promod3.loop.MmSystemCreator.SetupSystem" title="promod3.loop.MmSystemCreator.SetupSystem"><code class="xref py py-meth docutils literal"><span class="pre">SetupSystem()</span></code></a>. Only loop residues with <em>i</em> in the ranges defined by
+<a class="reference internal" href="#promod3.loop.MmSystemCreator.GetLoopStartIndices" title="promod3.loop.MmSystemCreator.GetLoopStartIndices"><code class="xref py py-meth docutils literal"><span class="pre">GetLoopStartIndices()</span></code></a> / <a class="reference internal" href="#promod3.loop.MmSystemCreator.GetLoopLengths" title="promod3.loop.MmSystemCreator.GetLoopLengths"><code class="xref py py-meth docutils literal"><span class="pre">GetLoopLengths()</span></code></a> are touched.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>loop_pos</strong> (<a class="reference internal" href="all_atom.html#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a>) &#8211; Reduced storage only covering loop positions.</li>
+<li><strong>out_pos</strong> (<a class="reference internal" href="all_atom.html#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a>) &#8211; Storage for loop positions linked to <em>res_indices</em>.</li>
+<li><strong>res_indices</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue indices into <em>out_pos</em>.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if data is inconsistent with last
+<a class="reference internal" href="#promod3.loop.MmSystemCreator.SetupSystem" title="promod3.loop.MmSystemCreator.SetupSystem"><code class="xref py py-meth docutils literal"><span class="pre">SetupSystem()</span></code></a> call (big enough and matching AA).</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.MmSystemCreator.GetSimulation">
+<code class="descname">GetSimulation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator.GetSimulation" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Simulation object setup by <a class="reference internal" href="#promod3.loop.MmSystemCreator.SetupSystem" title="promod3.loop.MmSystemCreator.SetupSystem"><code class="xref py py-meth docutils literal"><span class="pre">SetupSystem()</span></code></a>. Use this to run
+MM simulations.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/simulation/#ost.mol.mm.Simulation" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.mm.Simulation</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.MmSystemCreator.GetNumResidues">
+<code class="descname">GetNumResidues</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator.GetNumResidues" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of residues of current simulation setup.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.MmSystemCreator.GetNumLoopResidues">
+<code class="descname">GetNumLoopResidues</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator.GetNumLoopResidues" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of loop residues (incl. stems) of current simulation setup.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.MmSystemCreator.GetLoopStartIndices">
+<code class="descname">GetLoopStartIndices</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator.GetLoopStartIndices" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Start indices of loops (see <a class="reference internal" href="#promod3.loop.MmSystemCreator.SetupSystem" title="promod3.loop.MmSystemCreator.SetupSystem"><code class="xref py py-meth docutils literal"><span class="pre">SetupSystem()</span></code></a>).</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.MmSystemCreator.GetLoopLengths">
+<code class="descname">GetLoopLengths</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator.GetLoopLengths" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Lengths of loops (see <a class="reference internal" href="#promod3.loop.MmSystemCreator.SetupSystem" title="promod3.loop.MmSystemCreator.SetupSystem"><code class="xref py py-meth docutils literal"><span class="pre">SetupSystem()</span></code></a>).</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.MmSystemCreator.GetForcefieldAminoAcids">
+<code class="descname">GetForcefieldAminoAcids</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator.GetForcefieldAminoAcids" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Forcefield-specific amino acid type for each residue of last
+<a class="reference internal" href="#promod3.loop.MmSystemCreator.SetupSystem" title="promod3.loop.MmSystemCreator.SetupSystem"><code class="xref py py-meth docutils literal"><span class="pre">SetupSystem()</span></code></a> call.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.loop.ForcefieldAminoAcid" title="promod3.loop.ForcefieldAminoAcid"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldAminoAcid</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.MmSystemCreator.GetIndexing">
+<code class="descname">GetIndexing</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator.GetIndexing" title="Permalink to this definition">¶</a></dt>
+<dd><p>The atoms of residue <em>i</em> are stored from <em>idx[i]</em> to <em>idx[i+1]-1</em>, where
+<em>idx</em> is the list returned by this function. The atoms themselves are
+ordered according to the indexing defined by <a class="reference internal" href="#promod3.loop.ForcefieldLookup" title="promod3.loop.ForcefieldLookup"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldLookup</span></code></a>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Indexing to positions vector used by the simulation object.
+The last item of the list contains the number of atoms in the
+system.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.MmSystemCreator.GetCpuPlatformSupport">
+<code class="descname">GetCpuPlatformSupport</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator.GetCpuPlatformSupport" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, if we will use OpenMM&#8217;s &#8220;CPU&#8221; platform (enabled by default
+if platform is available). False, if we use &#8220;Reference&#8221; platform.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.MmSystemCreator.SetCpuPlatformSupport">
+<code class="descname">SetCpuPlatformSupport</code><span class="sig-paren">(</span><em>cpu_platform_support</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.MmSystemCreator.SetCpuPlatformSupport" title="Permalink to this definition">¶</a></dt>
+<dd><p>Override &#8220;CPU&#8221; platform support setting. Useful to force the use of the
+OpenMM&#8217;s &#8220;Reference&#8221; platform for testing (by default we use &#8220;CPU&#8221; if it is
+available).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>cpu_platform_support</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True, if &#8220;CPU&#8221; platform desired (ignored if
+platform not available). False, if &#8220;Reference&#8221;
+platform desired.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="forcefield-lookup-for-amino-acids">
+<h2>Forcefield lookup for amino acids<a class="headerlink" href="#forcefield-lookup-for-amino-acids" title="Permalink to this headline">¶</a></h2>
+<p>The <a class="reference internal" href="#promod3.loop.ForcefieldLookup" title="promod3.loop.ForcefieldLookup"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldLookup</span></code></a> class and its helpers define a fast way to extract
+FF specific data for amino acids in a protein. We distinguish amino acid types
+(and a few variants thereof) which may all be N- and/or C-terminal.</p>
+<dl class="class">
+<dt id="promod3.loop.ForcefieldLookup">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">ForcefieldLookup</code><a class="headerlink" href="#promod3.loop.ForcefieldLookup" title="Permalink to this definition">¶</a></dt>
+<dd><p>This class provides all functionality to generate <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/simulation/#ost.mol.mm.Simulation" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.mm.Simulation</span></code></a> objects. Specifically, we can:</p>
+<ul class="simple">
+<li>get a consistent indexing of each atom of each residue in [<em>0, N-1</em>], where
+<em>N</em> = <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetNumAtoms" title="promod3.loop.ForcefieldLookup.GetNumAtoms"><code class="xref py py-meth docutils literal"><span class="pre">GetNumAtoms()</span></code></a> (note that only OXT indexing depends on whether a
+residue is terminal)</li>
+<li>extract masses, charges and LJ-parameters for each atom (list of length <em>N</em>)</li>
+<li>extract connectivities (<a class="reference internal" href="#promod3.loop.ForcefieldConnectivity" title="promod3.loop.ForcefieldConnectivity"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldConnectivity</span></code></a>), which include all
+possible bonds, angles, dihedrals, impropers and LJ pairs</li>
+</ul>
+<p>There is functionality to adapt the lookup and store it as needed or you can
+load a predefined one with <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetDefault" title="promod3.loop.ForcefieldLookup.GetDefault"><code class="xref py py-meth docutils literal"><span class="pre">GetDefault()</span></code></a> or <a class="reference internal" href="#promod3.loop.ForcefieldLookup.LoadCHARMM" title="promod3.loop.ForcefieldLookup.LoadCHARMM"><code class="xref py py-meth docutils literal"><span class="pre">LoadCHARMM()</span></code></a>.</p>
+<p>The atom indexing and <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetAA" title="promod3.loop.ForcefieldLookup.GetAA"><code class="xref py py-meth docutils literal"><span class="pre">GetAA()</span></code></a> are independent of the loaded file.</p>
+<dl class="staticmethod">
+<dt id="promod3.loop.ForcefieldLookup.GetDefault">
+<em class="property">static </em><code class="descname">GetDefault</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetDefault" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A default singleton instance (shared throughout the Python process)
+of this class with all data defined. Using this instance has the
+advantage that the object is only loaded once!</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.loop.ForcefieldLookup" title="promod3.loop.ForcefieldLookup"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldLookup</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.ForcefieldLookup.SetDefault">
+<em class="property">static </em><code class="descname">SetDefault</code><span class="sig-paren">(</span><em>new_default</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.SetDefault" title="Permalink to this definition">¶</a></dt>
+<dd><p>Sets default singleton instance for all future <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetDefault" title="promod3.loop.ForcefieldLookup.GetDefault"><code class="xref py py-meth docutils literal"><span class="pre">GetDefault()</span></code></a> calls.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>new_default</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldLookup" title="promod3.loop.ForcefieldLookup"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldLookup</span></code></a>) &#8211; Lookup object to use as the new default.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.ForcefieldLookup.LoadCHARMM">
+<em class="property">static </em><code class="descname">LoadCHARMM</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.LoadCHARMM" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Predefined lookup object extracted from a CHARMM forcefield
+(loaded from disk)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.loop.ForcefieldLookup" title="promod3.loop.ForcefieldLookup"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldLookup</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.loop.ForcefieldLookup.Load">
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.ForcefieldLookup.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.LoadPortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.loop.ForcefieldLookup.Save" title="promod3.loop.ForcefieldLookup.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
+reading) / portable file generated with <a class="reference internal" href="#promod3.loop.ForcefieldLookup.SavePortable" title="promod3.loop.ForcefieldLookup.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The loaded lookup object</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.loop.ForcefieldLookup" title="promod3.loop.ForcefieldLookup"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldLookup</span></code></a></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.Save">
+<code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.Save" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.ForcefieldLookup.SavePortable">
+<code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.SavePortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file where it will be saved.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetAA">
+<code class="descname">GetAA</code><span class="sig-paren">(</span><em>ff_aa</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetAA" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Amino acid type for given <em>ff_aa</em></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ff_aa</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldAminoAcid" title="promod3.loop.ForcefieldAminoAcid"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldAminoAcid</span></code></a>) &#8211; Forcefield-specific amino acid type</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetNumAtoms">
+<code class="descname">GetNumAtoms</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>is_nter</em>, <em>is_cter</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetNumAtoms" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Number of atoms for given input.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ff_aa</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldAminoAcid" title="promod3.loop.ForcefieldAminoAcid"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldAminoAcid</span></code></a>) &#8211; Forcefield-specific amino acid type</li>
+<li><strong>is_nter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if N-terminal variant desired</li>
+<li><strong>is_cter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if C-terminal variant desired</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetHeavyIndex">
+<code class="descname">GetHeavyIndex</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>atom_idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetHeavyIndex" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">GetHeavyIndex</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>atom_name</em><span class="sig-paren">)</span></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Internal index for given heavy atom in [0, <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetNumAtoms" title="promod3.loop.ForcefieldLookup.GetNumAtoms"><code class="xref py py-meth docutils literal"><span class="pre">GetNumAtoms()</span></code></a>]</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ff_aa</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldAminoAcid" title="promod3.loop.ForcefieldAminoAcid"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldAminoAcid</span></code></a>) &#8211; Forcefield-specific amino acid type</li>
+<li><strong>atom_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Atom index as returned by <a class="reference internal" href="all_atom.html#promod3.loop.AminoAcidLookup.GetIndex" title="promod3.loop.AminoAcidLookup.GetIndex"><code class="xref py py-meth docutils literal"><span class="pre">AminoAcidLookup.GetIndex()</span></code></a></li>
+<li><strong>atom_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Atom name</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetHydrogenIndex">
+<code class="descname">GetHydrogenIndex</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>atom_idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetHydrogenIndex" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">GetHydrogenIndex</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>atom_name</em><span class="sig-paren">)</span></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Internal index for given hydrogen atom in [0, <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetNumAtoms" title="promod3.loop.ForcefieldLookup.GetNumAtoms"><code class="xref py py-meth docutils literal"><span class="pre">GetNumAtoms()</span></code></a>]</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ff_aa</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldAminoAcid" title="promod3.loop.ForcefieldAminoAcid"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldAminoAcid</span></code></a>) &#8211; Forcefield-specific amino acid type</li>
+<li><strong>atom_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Atom index as returned by
+<a class="reference internal" href="all_atom.html#promod3.loop.AminoAcidLookup.GetHydrogenIndex" title="promod3.loop.AminoAcidLookup.GetHydrogenIndex"><code class="xref py py-meth docutils literal"><span class="pre">AminoAcidLookup.GetHydrogenIndex()</span></code></a></li>
+<li><strong>atom_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Atom name</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetOXTIndex">
+<code class="descname">GetOXTIndex</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>is_nter</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetOXTIndex" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Internal index of OXT atom for C-terminal residue</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ff_aa</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldAminoAcid" title="promod3.loop.ForcefieldAminoAcid"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldAminoAcid</span></code></a>) &#8211; Forcefield-specific amino acid type</li>
+<li><strong>is_nter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if N-terminal variant desired</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetFudgeLJ">
+<code class="descname">GetFudgeLJ</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetFudgeLJ" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Dampening factor for LJ 1,4 interactions (see
+<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology.SetFudgeLJ" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.mol.mm.Topology.SetFudgeLJ()</span></code></a>)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetFudgeQQ">
+<code class="descname">GetFudgeQQ</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetFudgeQQ" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Dampening factor for electrostatic 1,4 interactions (see
+<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology.SetFudgeQQ" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.mol.mm.Topology.SetFudgeQQ()</span></code></a>)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetMasses">
+<code class="descname">GetMasses</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>is_nter</em>, <em>is_cter</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetMasses" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Mass for each atom (see <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology.SetMasses" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.mol.mm.Topology.SetMasses()</span></code></a>)</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a> (length = <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetNumAtoms" title="promod3.loop.ForcefieldLookup.GetNumAtoms"><code class="xref py py-meth docutils literal"><span class="pre">GetNumAtoms()</span></code></a>)</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ff_aa</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldAminoAcid" title="promod3.loop.ForcefieldAminoAcid"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldAminoAcid</span></code></a>) &#8211; Forcefield-specific amino acid type</li>
+<li><strong>is_nter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if N-terminal variant desired</li>
+<li><strong>is_cter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if C-terminal variant desired</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetCharges">
+<code class="descname">GetCharges</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>is_nter</em>, <em>is_cter</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetCharges" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Charge for each atom (see <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology.SetCharges" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.mol.mm.Topology.SetCharges()</span></code></a>)</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a> (length = <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetNumAtoms" title="promod3.loop.ForcefieldLookup.GetNumAtoms"><code class="xref py py-meth docutils literal"><span class="pre">GetNumAtoms()</span></code></a>)</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ff_aa</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldAminoAcid" title="promod3.loop.ForcefieldAminoAcid"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldAminoAcid</span></code></a>) &#8211; Forcefield-specific amino acid type</li>
+<li><strong>is_nter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if N-terminal variant desired</li>
+<li><strong>is_cter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if C-terminal variant desired</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetSigmas">
+<code class="descname">GetSigmas</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>is_nter</em>, <em>is_cter</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetSigmas" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Sigma in nm for each atom
+(see <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology.SetSigmas" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.mol.mm.Topology.SetSigmas()</span></code></a>)</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a> (length = <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetNumAtoms" title="promod3.loop.ForcefieldLookup.GetNumAtoms"><code class="xref py py-meth docutils literal"><span class="pre">GetNumAtoms()</span></code></a>)</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ff_aa</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldAminoAcid" title="promod3.loop.ForcefieldAminoAcid"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldAminoAcid</span></code></a>) &#8211; Forcefield-specific amino acid type</li>
+<li><strong>is_nter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if N-terminal variant desired</li>
+<li><strong>is_cter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if C-terminal variant desired</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetEpsilons">
+<code class="descname">GetEpsilons</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>is_nter</em>, <em>is_cter</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetEpsilons" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Epsilon in kJ/mol for each atom
+(see <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology.SetEpsilons" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.mol.mm.Topology.SetEpsilons()</span></code></a>)</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a> (length = <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetNumAtoms" title="promod3.loop.ForcefieldLookup.GetNumAtoms"><code class="xref py py-meth docutils literal"><span class="pre">GetNumAtoms()</span></code></a>)</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ff_aa</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldAminoAcid" title="promod3.loop.ForcefieldAminoAcid"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldAminoAcid</span></code></a>) &#8211; Forcefield-specific amino acid type</li>
+<li><strong>is_nter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if N-terminal variant desired</li>
+<li><strong>is_cter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if C-terminal variant desired</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetInternalConnectivity">
+<code class="descname">GetInternalConnectivity</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>is_nter</em>, <em>is_cter</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetInternalConnectivity" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Internal connectivity of a residue</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.ForcefieldConnectivity" title="promod3.loop.ForcefieldConnectivity"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldConnectivity</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ff_aa</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldAminoAcid" title="promod3.loop.ForcefieldAminoAcid"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldAminoAcid</span></code></a>) &#8211; Forcefield-specific amino acid type</li>
+<li><strong>is_nter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if N-terminal variant desired</li>
+<li><strong>is_cter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if C-terminal variant desired</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetPeptideBoundConnectivity">
+<code class="descname">GetPeptideBoundConnectivity</code><span class="sig-paren">(</span><em>ff_aa_one</em>, <em>ff_aa_two</em>, <em>is_nter</em>, <em>is_cter</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetPeptideBoundConnectivity" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">All connectivity which include peptide bond between two residues
+(additional to <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetInternalConnectivity" title="promod3.loop.ForcefieldLookup.GetInternalConnectivity"><code class="xref py py-meth docutils literal"><span class="pre">GetInternalConnectivity()</span></code></a>)</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.ForcefieldConnectivity" title="promod3.loop.ForcefieldConnectivity"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldConnectivity</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ff_aa_one</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldAminoAcid" title="promod3.loop.ForcefieldAminoAcid"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldAminoAcid</span></code></a>) &#8211; Forcefield-specific amino acid type of first residue</li>
+<li><strong>ff_aa_two</strong> (<a class="reference internal" href="#promod3.loop.ForcefieldAminoAcid" title="promod3.loop.ForcefieldAminoAcid"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldAminoAcid</span></code></a>) &#8211; Forcefield-specific amino acid type of second residue</li>
+<li><strong>is_nter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if first residue is N-terminal</li>
+<li><strong>is_cter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True if second residue is C-terminal</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.GetDisulfidConnectivity">
+<code class="descname">GetDisulfidConnectivity</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.GetDisulfidConnectivity" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">All connectivity which include disulfid bridge between two cysteins
+(additional to <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetInternalConnectivity" title="promod3.loop.ForcefieldLookup.GetInternalConnectivity"><code class="xref py py-meth docutils literal"><span class="pre">GetInternalConnectivity()</span></code></a>)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.loop.ForcefieldConnectivity" title="promod3.loop.ForcefieldConnectivity"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldConnectivity</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.SetFudgeLJ">
+<code class="descname">SetFudgeLJ</code><span class="sig-paren">(</span><em>fudge</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.SetFudgeLJ" title="Permalink to this definition">¶</a></dt>
+<dd><p>Set value for future <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetFudgeLJ" title="promod3.loop.ForcefieldLookup.GetFudgeLJ"><code class="xref py py-meth docutils literal"><span class="pre">GetFudgeLJ()</span></code></a> calls to <em>fudge</em>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.SetFudgeQQ">
+<code class="descname">SetFudgeQQ</code><span class="sig-paren">(</span><em>fudge</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.SetFudgeQQ" title="Permalink to this definition">¶</a></dt>
+<dd><p>Set value for future <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetFudgeQQ" title="promod3.loop.ForcefieldLookup.GetFudgeQQ"><code class="xref py py-meth docutils literal"><span class="pre">GetFudgeQQ()</span></code></a> calls to <em>fudge</em>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.SetMasses">
+<code class="descname">SetMasses</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>is_nter</em>, <em>is_cter</em>, <em>masses</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.SetMasses" title="Permalink to this definition">¶</a></dt>
+<dd><p>Set value for future <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetMasses" title="promod3.loop.ForcefieldLookup.GetMasses"><code class="xref py py-meth docutils literal"><span class="pre">GetMasses()</span></code></a> calls to <em>masses</em>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.SetCharges">
+<code class="descname">SetCharges</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>is_nter</em>, <em>is_cter</em>, <em>charges</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.SetCharges" title="Permalink to this definition">¶</a></dt>
+<dd><p>Set value for future <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetCharges" title="promod3.loop.ForcefieldLookup.GetCharges"><code class="xref py py-meth docutils literal"><span class="pre">GetCharges()</span></code></a> calls to <em>charges</em>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.SetSigmas">
+<code class="descname">SetSigmas</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>is_nter</em>, <em>is_cter</em>, <em>sigmas</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.SetSigmas" title="Permalink to this definition">¶</a></dt>
+<dd><p>Set value for future <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetSigmas" title="promod3.loop.ForcefieldLookup.GetSigmas"><code class="xref py py-meth docutils literal"><span class="pre">GetSigmas()</span></code></a> calls to <em>sigmas</em>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.SetEpsilons">
+<code class="descname">SetEpsilons</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>is_nter</em>, <em>is_cter</em>, <em>epsilons</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.SetEpsilons" title="Permalink to this definition">¶</a></dt>
+<dd><p>Set value for future <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetEpsilons" title="promod3.loop.ForcefieldLookup.GetEpsilons"><code class="xref py py-meth docutils literal"><span class="pre">GetEpsilons()</span></code></a> calls to <em>epsilons</em>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.SetInternalConnectivity">
+<code class="descname">SetInternalConnectivity</code><span class="sig-paren">(</span><em>ff_aa</em>, <em>is_nter</em>, <em>is_cter</em>, <em>connectivity</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.SetInternalConnectivity" title="Permalink to this definition">¶</a></dt>
+<dd><p>Set value for future <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetInternalConnectivity" title="promod3.loop.ForcefieldLookup.GetInternalConnectivity"><code class="xref py py-meth docutils literal"><span class="pre">GetInternalConnectivity()</span></code></a> calls to
+<em>connectivity</em>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.SetPeptideBoundConnectivity">
+<code class="descname">SetPeptideBoundConnectivity</code><span class="sig-paren">(</span><em>ff_aa_one</em>, <em>ff_aa_two</em>, <em>is_nter</em>, <em>is_cter</em>, <em>connectivity</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.SetPeptideBoundConnectivity" title="Permalink to this definition">¶</a></dt>
+<dd><p>Set value for future <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetPeptideBoundConnectivity" title="promod3.loop.ForcefieldLookup.GetPeptideBoundConnectivity"><code class="xref py py-meth docutils literal"><span class="pre">GetPeptideBoundConnectivity()</span></code></a> calls to
+<em>connectivity</em>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.ForcefieldLookup.SetDisulfidConnectivity">
+<code class="descname">SetDisulfidConnectivity</code><span class="sig-paren">(</span><em>connectivity</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ForcefieldLookup.SetDisulfidConnectivity" title="Permalink to this definition">¶</a></dt>
+<dd><p>Set value for future <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetDisulfidConnectivity" title="promod3.loop.ForcefieldLookup.GetDisulfidConnectivity"><code class="xref py py-meth docutils literal"><span class="pre">GetDisulfidConnectivity()</span></code></a> calls to
+<em>connectivity</em>.</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.loop.ForcefieldAminoAcid">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">ForcefieldAminoAcid</code><a class="headerlink" href="#promod3.loop.ForcefieldAminoAcid" title="Permalink to this definition">¶</a></dt>
+<dd><p>Enumerates the amino acid types for forcefields. The first 20 values
+correspond to the 20 values of <a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>. Additionally,
+there are values for disulfid bridges (<em>FF_CYS2</em>), d-protonated histidine
+(<em>FF_HISD</em>, default for <em>ost.conop.HIS</em> is <em>FF_HISE</em>) and <em>FF_XXX</em> for unknown
+types. The full list of values is:</p>
+<blockquote>
+<div><em>FF_ALA</em>, <em>FF_ARG</em>, <em>FF_ASN</em>, <em>FF_ASP</em>, <em>FF_GLN</em>, <em>FF_GLU</em>, <em>FF_LYS</em>,
+<em>FF_SER</em>, <em>FF_CYS</em>, <em>FF_MET</em>, <em>FF_TRP</em>, <em>FF_TYR</em>, <em>FF_THR</em>, <em>FF_VAL</em>,
+<em>FF_ILE</em>, <em>FF_LEU</em>, <em>FF_GLY</em>, <em>FF_PRO</em> <em>FF_HISE</em>, <em>FF_PHE</em>, <em>FF_CYS2</em>,
+<em>FF_HISD</em>, <em>FF_XXX</em></div></blockquote>
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.loop.ForcefieldConnectivity">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">ForcefieldConnectivity</code><a class="headerlink" href="#promod3.loop.ForcefieldConnectivity" title="Permalink to this definition">¶</a></dt>
+<dd><p>Contains lists of bonds, angles, dihedrals, impropers and LJ pairs (exclusions
+are the combination of all bonds and 1,3 pairs of angles and are not stored
+separately). Each type of connectivity has it&#8217;s own class (see below) storing
+indices and parameters to be used for methods of <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.mm.Topology</span></code></a>.
+The indexing of atoms for internal connectivities is in [<em>0, N-1</em>], where <em>N</em>
+= <a class="reference internal" href="#promod3.loop.ForcefieldLookup.GetNumAtoms" title="promod3.loop.ForcefieldLookup.GetNumAtoms"><code class="xref py py-meth docutils literal"><span class="pre">ForcefieldLookup.GetNumAtoms()</span></code></a>. For connectivities of pairs of
+residues, atoms of the first residue are in [<em>0, N1-1</em>] and atoms of the
+second one are in [<em>N1, N1+N2-1</em>], where <em>N1</em> and <em>N2</em> are the number of atoms
+of the two residues. For disulfid bridges, <em>N1</em> = <em>N2</em> = <em>GetNumAtoms(FF_CYS2,
+False, False)</em>.</p>
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldConnectivity.harmonic_bonds">
+<code class="descname">harmonic_bonds</code><a class="headerlink" href="#promod3.loop.ForcefieldConnectivity.harmonic_bonds" title="Permalink to this definition">¶</a></dt>
+<dd><p>List of harmonic bonds.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.loop.ForcefieldBondInfo" title="promod3.loop.ForcefieldBondInfo"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldBondInfo</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldConnectivity.harmonic_angles">
+<code class="descname">harmonic_angles</code><a class="headerlink" href="#promod3.loop.ForcefieldConnectivity.harmonic_angles" title="Permalink to this definition">¶</a></dt>
+<dd><p>List of harmonic angles.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.loop.ForcefieldHarmonicAngleInfo" title="promod3.loop.ForcefieldHarmonicAngleInfo"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldHarmonicAngleInfo</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldConnectivity.urey_bradley_angles">
+<code class="descname">urey_bradley_angles</code><a class="headerlink" href="#promod3.loop.ForcefieldConnectivity.urey_bradley_angles" title="Permalink to this definition">¶</a></dt>
+<dd><p>List of Urey-Bradley angles.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.loop.ForcefieldUreyBradleyAngleInfo" title="promod3.loop.ForcefieldUreyBradleyAngleInfo"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldUreyBradleyAngleInfo</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldConnectivity.periodic_dihedrals">
+<code class="descname">periodic_dihedrals</code><a class="headerlink" href="#promod3.loop.ForcefieldConnectivity.periodic_dihedrals" title="Permalink to this definition">¶</a></dt>
+<dd><p>List of periodic dihedrals.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.loop.ForcefieldPeriodicDihedralInfo" title="promod3.loop.ForcefieldPeriodicDihedralInfo"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldPeriodicDihedralInfo</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldConnectivity.periodic_impropers">
+<code class="descname">periodic_impropers</code><a class="headerlink" href="#promod3.loop.ForcefieldConnectivity.periodic_impropers" title="Permalink to this definition">¶</a></dt>
+<dd><p>List of periodic impropers.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.loop.ForcefieldPeriodicDihedralInfo" title="promod3.loop.ForcefieldPeriodicDihedralInfo"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldPeriodicDihedralInfo</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldConnectivity.harmonic_impropers">
+<code class="descname">harmonic_impropers</code><a class="headerlink" href="#promod3.loop.ForcefieldConnectivity.harmonic_impropers" title="Permalink to this definition">¶</a></dt>
+<dd><p>List of harmonic impropers.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.loop.ForcefieldHarmonicImproperInfo" title="promod3.loop.ForcefieldHarmonicImproperInfo"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldHarmonicImproperInfo</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldConnectivity.lj_pairs">
+<code class="descname">lj_pairs</code><a class="headerlink" href="#promod3.loop.ForcefieldConnectivity.lj_pairs" title="Permalink to this definition">¶</a></dt>
+<dd><p>List of LJ pairs.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.loop.ForcefieldLJPairInfo" title="promod3.loop.ForcefieldLJPairInfo"><code class="xref py py-class docutils literal"><span class="pre">ForcefieldLJPairInfo</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.loop.ForcefieldBondInfo">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">ForcefieldBondInfo</code><a class="headerlink" href="#promod3.loop.ForcefieldBondInfo" title="Permalink to this definition">¶</a></dt>
+<dd><p>Define harmonic bond (see <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology.AddHarmonicBond" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.mol.mm.Topology.AddHarmonicBond()</span></code></a>)</p>
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldBondInfo.index_one">
+<code class="descname">index_one</code><a class="headerlink" href="#promod3.loop.ForcefieldBondInfo.index_one" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 1</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldBondInfo.index_two">
+<code class="descname">index_two</code><a class="headerlink" href="#promod3.loop.ForcefieldBondInfo.index_two" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 2</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldBondInfo.bond_length">
+<code class="descname">bond_length</code><a class="headerlink" href="#promod3.loop.ForcefieldBondInfo.bond_length" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bond length in nm</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldBondInfo.force_constant">
+<code class="descname">force_constant</code><a class="headerlink" href="#promod3.loop.ForcefieldBondInfo.force_constant" title="Permalink to this definition">¶</a></dt>
+<dd><p>Force constant in kJ/mol/nm^2</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.loop.ForcefieldHarmonicAngleInfo">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">ForcefieldHarmonicAngleInfo</code><a class="headerlink" href="#promod3.loop.ForcefieldHarmonicAngleInfo" title="Permalink to this definition">¶</a></dt>
+<dd><p>Define harmonic angle (see <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology.AddHarmonicAngle" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.mol.mm.Topology.AddHarmonicAngle()</span></code></a>)</p>
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldHarmonicAngleInfo.index_one">
+<code class="descname">index_one</code><a class="headerlink" href="#promod3.loop.ForcefieldHarmonicAngleInfo.index_one" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 1</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldHarmonicAngleInfo.index_two">
+<code class="descname">index_two</code><a class="headerlink" href="#promod3.loop.ForcefieldHarmonicAngleInfo.index_two" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 2</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldHarmonicAngleInfo.index_three">
+<code class="descname">index_three</code><a class="headerlink" href="#promod3.loop.ForcefieldHarmonicAngleInfo.index_three" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 3</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldHarmonicAngleInfo.angle">
+<code class="descname">angle</code><a class="headerlink" href="#promod3.loop.ForcefieldHarmonicAngleInfo.angle" title="Permalink to this definition">¶</a></dt>
+<dd><p>Angle in radians</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldHarmonicAngleInfo.force_constant">
+<code class="descname">force_constant</code><a class="headerlink" href="#promod3.loop.ForcefieldHarmonicAngleInfo.force_constant" title="Permalink to this definition">¶</a></dt>
+<dd><p>Force constant in kJ/mol/radian^2</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.loop.ForcefieldUreyBradleyAngleInfo">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">ForcefieldUreyBradleyAngleInfo</code><a class="headerlink" href="#promod3.loop.ForcefieldUreyBradleyAngleInfo" title="Permalink to this definition">¶</a></dt>
+<dd><p>Define Urey-Bradley angle
+(see <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology.AddUreyBradleyAngle" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.mol.mm.Topology.AddUreyBradleyAngle()</span></code></a>)</p>
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldUreyBradleyAngleInfo.index_one">
+<code class="descname">index_one</code><a class="headerlink" href="#promod3.loop.ForcefieldUreyBradleyAngleInfo.index_one" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 1</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldUreyBradleyAngleInfo.index_two">
+<code class="descname">index_two</code><a class="headerlink" href="#promod3.loop.ForcefieldUreyBradleyAngleInfo.index_two" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 2</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldUreyBradleyAngleInfo.index_three">
+<code class="descname">index_three</code><a class="headerlink" href="#promod3.loop.ForcefieldUreyBradleyAngleInfo.index_three" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 3</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldUreyBradleyAngleInfo.angle">
+<code class="descname">angle</code><a class="headerlink" href="#promod3.loop.ForcefieldUreyBradleyAngleInfo.angle" title="Permalink to this definition">¶</a></dt>
+<dd><p>Angle in radians</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldUreyBradleyAngleInfo.angle_force_constant">
+<code class="descname">angle_force_constant</code><a class="headerlink" href="#promod3.loop.ForcefieldUreyBradleyAngleInfo.angle_force_constant" title="Permalink to this definition">¶</a></dt>
+<dd><p>Angle force constant kJ/mol/radian^2</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldUreyBradleyAngleInfo.bond_length">
+<code class="descname">bond_length</code><a class="headerlink" href="#promod3.loop.ForcefieldUreyBradleyAngleInfo.bond_length" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bond length in nm</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldUreyBradleyAngleInfo.bond_force_constant">
+<code class="descname">bond_force_constant</code><a class="headerlink" href="#promod3.loop.ForcefieldUreyBradleyAngleInfo.bond_force_constant" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bond force constant kJ/mol/nm^2</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.loop.ForcefieldPeriodicDihedralInfo">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">ForcefieldPeriodicDihedralInfo</code><a class="headerlink" href="#promod3.loop.ForcefieldPeriodicDihedralInfo" title="Permalink to this definition">¶</a></dt>
+<dd><p>Define periodic dihedral or improper (see
+<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology.AddPeriodicDihedral" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.mol.mm.Topology.AddPeriodicDihedral()</span></code></a> and
+<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology.AddPeriodicImproper" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.mol.mm.Topology.AddPeriodicImproper()</span></code></a>)</p>
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldPeriodicDihedralInfo.index_one">
+<code class="descname">index_one</code><a class="headerlink" href="#promod3.loop.ForcefieldPeriodicDihedralInfo.index_one" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 1</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldPeriodicDihedralInfo.index_two">
+<code class="descname">index_two</code><a class="headerlink" href="#promod3.loop.ForcefieldPeriodicDihedralInfo.index_two" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 2</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldPeriodicDihedralInfo.index_three">
+<code class="descname">index_three</code><a class="headerlink" href="#promod3.loop.ForcefieldPeriodicDihedralInfo.index_three" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 3</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldPeriodicDihedralInfo.index_four">
+<code class="descname">index_four</code><a class="headerlink" href="#promod3.loop.ForcefieldPeriodicDihedralInfo.index_four" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 4</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldPeriodicDihedralInfo.multiplicity">
+<code class="descname">multiplicity</code><a class="headerlink" href="#promod3.loop.ForcefieldPeriodicDihedralInfo.multiplicity" title="Permalink to this definition">¶</a></dt>
+<dd><p>Multiplicity</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldPeriodicDihedralInfo.phase">
+<code class="descname">phase</code><a class="headerlink" href="#promod3.loop.ForcefieldPeriodicDihedralInfo.phase" title="Permalink to this definition">¶</a></dt>
+<dd><p>Phase in radians</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldPeriodicDihedralInfo.force_constant">
+<code class="descname">force_constant</code><a class="headerlink" href="#promod3.loop.ForcefieldPeriodicDihedralInfo.force_constant" title="Permalink to this definition">¶</a></dt>
+<dd><p>Force constant in kJ/mol/radian^2</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.loop.ForcefieldHarmonicImproperInfo">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">ForcefieldHarmonicImproperInfo</code><a class="headerlink" href="#promod3.loop.ForcefieldHarmonicImproperInfo" title="Permalink to this definition">¶</a></dt>
+<dd><p>Define harmonic improper (see <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology.AddHarmonicImproper" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.mol.mm.Topology.AddHarmonicImproper()</span></code></a>)</p>
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldHarmonicImproperInfo.index_one">
+<code class="descname">index_one</code><a class="headerlink" href="#promod3.loop.ForcefieldHarmonicImproperInfo.index_one" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 1</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldHarmonicImproperInfo.index_two">
+<code class="descname">index_two</code><a class="headerlink" href="#promod3.loop.ForcefieldHarmonicImproperInfo.index_two" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 2</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldHarmonicImproperInfo.index_three">
+<code class="descname">index_three</code><a class="headerlink" href="#promod3.loop.ForcefieldHarmonicImproperInfo.index_three" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 3</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldHarmonicImproperInfo.index_four">
+<code class="descname">index_four</code><a class="headerlink" href="#promod3.loop.ForcefieldHarmonicImproperInfo.index_four" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 4</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldHarmonicImproperInfo.angle">
+<code class="descname">angle</code><a class="headerlink" href="#promod3.loop.ForcefieldHarmonicImproperInfo.angle" title="Permalink to this definition">¶</a></dt>
+<dd><p>Angle in radians</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldHarmonicImproperInfo.force_constant">
+<code class="descname">force_constant</code><a class="headerlink" href="#promod3.loop.ForcefieldHarmonicImproperInfo.force_constant" title="Permalink to this definition">¶</a></dt>
+<dd><p>Force constant kJ/mol/radian^2</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.loop.ForcefieldLJPairInfo">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">ForcefieldLJPairInfo</code><a class="headerlink" href="#promod3.loop.ForcefieldLJPairInfo" title="Permalink to this definition">¶</a></dt>
+<dd><p>Define LJ pair (see <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/topology/#ost.mol.mm.Topology.AddLJPair" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.mol.mm.Topology.AddLJPair()</span></code></a>)</p>
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldLJPairInfo.index_one">
+<code class="descname">index_one</code><a class="headerlink" href="#promod3.loop.ForcefieldLJPairInfo.index_one" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 1</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldLJPairInfo.index_two">
+<code class="descname">index_two</code><a class="headerlink" href="#promod3.loop.ForcefieldLJPairInfo.index_two" title="Permalink to this definition">¶</a></dt>
+<dd><p>Index of particle 2</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldLJPairInfo.sigma">
+<code class="descname">sigma</code><a class="headerlink" href="#promod3.loop.ForcefieldLJPairInfo.sigma" title="Permalink to this definition">¶</a></dt>
+<dd><p>Sigma in nm</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.loop.ForcefieldLJPairInfo.epsilon">
+<code class="descname">epsilon</code><a class="headerlink" href="#promod3.loop.ForcefieldLJPairInfo.epsilon" title="Permalink to this definition">¶</a></dt>
+<dd><p>Epsilon in kJ/mol</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Generate <code class="docutils literal"><span class="pre">ost.mol.mm</span></code> systems</a><ul>
+<li><a class="reference internal" href="#create-mm-systems-for-loops">Create MM systems for loops</a></li>
+<li><a class="reference internal" href="#forcefield-lookup-for-amino-acids">Forcefield lookup for amino acids</a></li>
+</ul>
+</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="docutils literal"><span class="pre">loop</span></code> - Loop Handling</a><ul>
+      <li>Previous: <a href="all_atom.html" title="previous chapter">Handling All Atom Positions</a></li>
+      <li>Next: <a href="load_loop_objects.html" title="next chapter">Loading Precomputed Objects</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/loop/mm_system_creation.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/loop/mm_system_creation.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/loop/structure_db.html b/doc/html/loop/structure_db.html
index d0c9e0f0..48ecaead 100644
--- a/doc/html/loop/structure_db.html
+++ b/doc/html/loop/structure_db.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Structural Database &mdash; ProMod3 0 documentation</title>
+    <title>Structural Data &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,10 +23,10 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
-    <link rel="up" title="loop - Loop Modelling" href="index.html" />
-    <link rel="next" title="Loop Closing" href="loop_closing.html" />
-    <link rel="prev" title="Torsion Sampler" href="torsion_sampler.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="loop - Loop Handling" href="index.html" />
+    <link rel="next" title="Handling All Atom Positions" href="all_atom.html" />
+    <link rel="prev" title="Sampling Dihedral Angles" href="torsion_sampler.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -39,28 +39,27 @@
         <div class="bodywrapper">
           <div class="body" role="main">
             
-  <div class="section" id="structural-database">
-<h1>Structural Database<a class="headerlink" href="#structural-database" title="Permalink to this headline">¶</a></h1>
+  <div class="section" id="structural-data">
+<h1>Structural Data<a class="headerlink" href="#structural-data" title="Permalink to this headline">¶</a></h1>
 <p>The structural database serves as a container for structural backbone
 and profile data. It can be filled with chains of pdb structures with their
 corresponding profiles as they are produced by the HHSuite tools <a class="reference internal" href="#soding2005" id="id1">[soding2005]</a>.
-Some of the extracted features expect the secondary structure, as well as the solvent
-accessibility to be assigned using dssp <a class="reference internal" href="#kabsch1983" id="id2">[kabsch1983]</a>.
+Structural and profile data get complemented by with additional information.
 Following features get stored on a per residue basis:</p>
 <ul class="simple">
 <li>The amino acid one letter code</li>
 <li>The coordinates of the backbone atoms (N,CA,C,O)</li>
 <li>The phi/psi dihedral angles</li>
 <li>The secondary structure state as defined by dssp</li>
-<li>The solvent accessibility in square Angstrom as calculated by dssp</li>
+<li>The solvent accessibility in square Angstrom</li>
 <li>The residue depth defined as the average distance from all atoms of a
-residue to the closest surface vertex as calculated by msms <a class="reference internal" href="#sanner1996" id="id3">[sanner1996]</a>.
+residue to the closest surface vertex as calculated by msms <a class="reference internal" href="#sanner1996" id="id2">[sanner1996]</a>.
 This is a simplified version of the residue depth as discussed in
-<a class="reference internal" href="#chakravarty1999" id="id4">[chakravarty1999]</a> and gets directly calculated when structural information
+<a class="reference internal" href="#chakravarty1999" id="id3">[chakravarty1999]</a> and gets directly calculated when structural information
 gets added to the StructureDB.</li>
 <li>The amino acid frequencies as given by an input sequence profile</li>
 <li>The amino acid frequency derived from structural alignments as described
-in <a class="reference internal" href="#zhou2005" id="id5">[zhou2005]</a> - Since the calculation of such a profile already requires a
+in <a class="reference internal" href="#zhou2005" id="id4">[zhou2005]</a> - Since the calculation of such a profile already requires a
 StructureDB, we end up in a hen and egg problem here... When adding
 structural information to the StructureDB, the according memory gets
 just allocated and set to zero. The usage of this information
@@ -135,8 +134,8 @@ The offset parameter tells us where it exactly starts. (<a class="reference exte
 </dd></dl>
 
 </div>
-<div class="section" id="the-database">
-<h2>The Database<a class="headerlink" href="#the-database" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="the-structure-database">
+<h2>The Structure Database<a class="headerlink" href="#the-structure-database" title="Permalink to this headline">¶</a></h2>
 <p>The following code example demonstrates how to create a structural database
 and fill it with content.</p>
 <div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span>
@@ -172,8 +171,9 @@ and fill it with content.</p>
     <span class="n">prof_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">prof_dir</span><span class="p">,</span> <span class="n">pdb_id</span> <span class="o">+</span> <span class="n">chain_id</span> <span class="o">+</span> <span class="s">&quot;.hhm&quot;</span><span class="p">)</span>
 
     <span class="c"># let&#39;s load the structure</span>
-    <span class="n">structure</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="n">structure_path</span><span class="p">)</span>\
-                  <span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;cname=&quot;</span> <span class="o">+</span> <span class="n">chain_id</span> <span class="o">+</span> <span class="s">&quot; and peptide=True&quot;</span><span class="p">)</span>
+    <span class="n">structure</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="n">structure_path</span><span class="p">)</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;peptide=True&quot;</span><span class="p">)</span>
+    <span class="n">single_chain_structure</span> <span class="o">=</span> <span class="n">structure</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;cname=&quot;</span> <span class="o">+</span> <span class="n">chain_id</span><span class="p">)</span>
+    
     <span class="c"># and the according profile in hhm format</span>
     <span class="n">prof</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">LoadSequenceProfile</span><span class="p">(</span><span class="n">prof_path</span><span class="p">)</span>
 
@@ -184,9 +184,12 @@ and fill it with content.</p>
     <span class="c"># as a final step we need the surface as calculated by msms</span>
     <span class="n">surf</span> <span class="o">=</span> <span class="n">msms</span><span class="o">.</span><span class="n">CalculateSurface</span><span class="p">(</span><span class="n">structure</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
 
-    <span class="c"># let&#39;s add it</span>
+    <span class="c"># let&#39;s add it! Please note, that we calculated solvent </span>
+    <span class="c"># accessiblity / secondary structure and surface on the full</span>
+    <span class="c"># structure but only add one of the chains.</span>
     <span class="n">structure_db</span><span class="o">.</span><span class="n">AddCoordinates</span><span class="p">(</span><span class="n">pdb_id</span><span class="p">,</span> <span class="n">chain_id</span><span class="p">,</span>
-                                <span class="n">structure</span><span class="o">.</span><span class="n">chains</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">surf</span><span class="p">,</span> <span class="n">prof</span><span class="p">)</span>
+                                <span class="n">single_chain_structure</span><span class="o">.</span><span class="n">chains</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> 
+                                <span class="n">surf</span><span class="p">,</span> <span class="n">prof</span><span class="p">)</span>
 
 <span class="c"># we now have two structures in the database...</span>
 
@@ -201,12 +204,9 @@ and fill it with content.</p>
     <span class="c"># get the CoordInfo for chain with index i </span>
     <span class="n">coord_info</span> <span class="o">=</span> <span class="n">structure_db</span><span class="o">.</span><span class="n">GetCoordInfo</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
     <span class="c"># define a fragment, that covers the full length</span>
-    <span class="n">fragment_info</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">FragmentInfo</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">coord_info</span><span class="o">.</span><span class="n">size</span><span class="p">)</span>
-    <span class="c"># extract the according BackboneList and the residue depths</span>
-    <span class="n">bb_list</span> <span class="o">=</span> <span class="n">structure_db</span><span class="o">.</span><span class="n">GetBackboneList</span><span class="p">(</span><span class="n">fragment_info</span><span class="p">)</span>
-    <span class="n">depths</span> <span class="o">=</span> <span class="n">structure_db</span><span class="o">.</span><span class="n">GetResidueDepths</span><span class="p">(</span><span class="n">fragment_info</span><span class="p">)</span>
+    <span class="n">frag_info</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">FragmentInfo</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">coord_info</span><span class="o">.</span><span class="n">size</span><span class="p">)</span>
     <span class="c"># generate a profile based on the structural data in the src_db</span>
-    <span class="n">prof</span> <span class="o">=</span> <span class="n">src_db</span><span class="o">.</span><span class="n">GenerateStructureProfile</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="n">depths</span><span class="p">)</span>
+    <span class="n">prof</span> <span class="o">=</span> <span class="n">src_db</span><span class="o">.</span><span class="n">GenerateStructureProfile</span><span class="p">(</span><span class="n">structure_db</span><span class="p">,</span> <span class="n">frag_info</span><span class="p">)</span>
     <span class="c"># and add it to the previously created structure_db</span>
     <span class="n">structure_db</span><span class="o">.</span><span class="n">SetStructureProfile</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">prof</span><span class="p">)</span>
 
@@ -220,23 +220,26 @@ database, you might want to consider two things:</p>
 <ol class="arabic simple">
 <li>Use a database of limited size as structural source (something
 in between 5000 and 10000 nonredundant chains is enough)</li>
-<li>Use the <code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileDB</span></code> to gather profiles produced from jobs
+<li>Use the <a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileDB" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileDB</span></code></a> to gather profiles produced from jobs
 running in parallel</li>
 </ol>
 <dl class="class">
 <dt id="promod3.loop.StructureDB">
 <em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">StructureDB</code><a class="headerlink" href="#promod3.loop.StructureDB" title="Permalink to this definition">¶</a></dt>
-<dd><dl class="method">
+<dd><dl class="staticmethod">
 <dt id="promod3.loop.StructureDB.Load">
-<code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="optional">[</span>, <em>load_frequencies=False</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.Load" title="Permalink to this definition">¶</a></dt>
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em>, <em>load_frequencies=True</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.StructureDB.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.LoadPortable" title="Permalink to this definition">¶</a></dt>
 <dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.loop.StructureDB.Save" title="promod3.loop.StructureDB.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
-reading).</p>
+reading) / portable file generated with <a class="reference internal" href="#promod3.loop.StructureDB.SavePortable" title="promod3.loop.StructureDB.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; path to the file from which to load the database.</li>
+<li><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load the database.</li>
 <li><strong>load_frequencies</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If True, the full database including profile
 information for every position gets loaded.
 A database without profiles loads faster and
@@ -252,13 +255,8 @@ profile dependent functions.</li>
 <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a></p>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>version number stored in file is not supported.</li>
-<li>file assumes different memory-layout than is available on this
-machine. Use <a class="reference internal" href="#promod3.loop.StructureDB.LoadPortable" title="promod3.loop.StructureDB.LoadPortable"><code class="xref py py-meth docutils literal"><span class="pre">LoadPortable()</span></code></a> to convert your file.</li>
-</ul>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</p>
 </td>
 </tr>
 </tbody>
@@ -268,78 +266,20 @@ machine. Use <a class="reference internal" href="#promod3.loop.StructureDB.LoadP
 <dl class="method">
 <dt id="promod3.loop.StructureDB.Save">
 <code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.Save" title="Permalink to this definition">¶</a></dt>
-<dd><p>Saves raw binary representation (optimized for fast reading).This puts many
-assumptions on the memory-layout of the target-machine and hence it is not
-portable. A portable version is provided by <a class="reference internal" href="#promod3.loop.StructureDB.SavePortable" title="promod3.loop.StructureDB.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a>.
-Preferably portable files are distributed and converted to a raw binary
-before using them.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; path to the file where the database will be saved</p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>db has been loaded with load_frequencies=False. This enforces
-only complete databases to be saved down.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.StructureDB.LoadPortable">
-<code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.LoadPortable" title="Permalink to this definition">¶</a></dt>
-<dd><p>Loads portable file generated with <a class="reference internal" href="#promod3.loop.StructureDB.SavePortable" title="promod3.loop.StructureDB.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slow but less
-machine-dependent).</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; path to the file from which to load the database.</p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The loaded data base</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a></p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>version number stored in file is not supported.</li>
-<li>machine-dependent fundamental types are smaller than required.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
 <dt id="promod3.loop.StructureDB.SavePortable">
 <code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.SavePortable" title="Permalink to this definition">¶</a></dt>
-<dd><p>Saves portable binary representation (slow but less machine-dependent).</p>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; path to the file where the database will be saved</p>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file where the database will be saved</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>db has been loaded with load_frequencies=False. This enforces
-only complete databases to be saved down.</li>
-</ul>
-</td>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+db has been loaded with load_frequencies=False (enforces only
+complete databases to be saved down)</td>
 </tr>
 </tbody>
 </table>
@@ -347,11 +287,19 @@ only complete databases to be saved down.</li>
 
 <dl class="method">
 <dt id="promod3.loop.StructureDB.AddCoordinates">
-<code class="descname">AddCoordinates</code><span class="sig-paren">(</span><em>pdb_id</em>, <em>chain_name</em>, <em>chain</em>, <em>surf</em>, <em>prof</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.AddCoordinates" title="Permalink to this definition">¶</a></dt>
+<code class="descname">AddCoordinates</code><span class="sig-paren">(</span><em>pdb_id</em>, <em>chain_name</em>, <em>chain</em>, <em>surf</em>, <em>prof</em>, <em>solvent_accessibility_string=&quot;solvent_accessibility&quot;</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.AddCoordinates" title="Permalink to this definition">¶</a></dt>
 <dd><p>This method takes a structural chain and searches the longest stretch of
 connected residues containing all necessary backbone atoms. This stretch
 gets then added to the database. Due to technical reasons, The maximal
-extent along one of the base axis cannot exceed 650 A.</p>
+extent along one of the base axis cannot exceed 650 A.
+Following features are expected to be set on a per residue level in <em>chain</em>:
+The secondary structure (e.g. call <code class="xref py py-meth docutils literal"><span class="pre">ost.mol.alg.AssignSecStruct()</span></code> on the
+full <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityView</span></code></a> the <em>chain</em> belongs to) and
+the solvent accessibility assigned using a float property with name
+<em>solvent_accessibility_string</em> as name on a per residue level (e.g. call
+<code class="xref py py-meth docutils literal"><span class="pre">ost.mol.alg.Accessibility()</span></code> on the full <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityView</span></code></a>
+the chain belongs to and take care to pass the appropriate
+<em>solvent_accessibility_string</em>).</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
@@ -359,19 +307,27 @@ extent along one of the base axis cannot exceed 650 A.</p>
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
 <li><strong>pdb_id</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; 4-letter code of the structure the chain belongs to</li>
 <li><strong>chain_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of the chain consisting of one letter</li>
-<li><strong>chain</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ChainView" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ChainView</span></code></a>) &#8211; The actual chain</li>
-<li><strong>surf</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/surface/#ost.mol.SurfaceHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.SurfaceHandle</span></code></a>) &#8211; A surface describint the solvent accessible surface</li>
-<li><strong>prof</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code>) &#8211; Profile information for this structure.</li>
+<li><strong>chain</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ChainView" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ChainView</span></code></a>) &#8211; The actual chain</li>
+<li><strong>surf</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/surface/#ost.mol.SurfaceHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.SurfaceHandle</span></code></a>) &#8211; A surface describing the solvent accessible surface
+(we advise you to provide a surface estimated with the
+full <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityView</span></code></a> the <em>chain</em> belongs to)</li>
+<li><strong>prof</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code></a>) &#8211; Profile information for this <em>chain</em>.</li>
+<li><strong>solvent_accessibility_string</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of float property where the
+solvent accessibilities are stored
+on a per residue basis in <em>chain</em></li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">DB Index of added chain.</p>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">DB index of added chain.</p>
 </td>
 </tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of chain is too large,
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of chain is too large,
 when db has been loaded with load_frequencies=False or when the
-ATOMSEQ form the <strong>chain</strong> can&#8217;t be aligned with the SEQRES from
-the <strong>prof</strong>.</p>
+ATOMSEQ form the <em>chain</em> can&#8217;t be aligned with the SEQRES from
+the <em>prof</em>.</p>
 </td>
 </tr>
 </tbody>
@@ -385,16 +341,19 @@ the <strong>prof</strong>.</p>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The StructureDB index (in [0, <a class="reference internal" href="#promod3.loop.StructureDB.GetNumCoords" title="promod3.loop.StructureDB.GetNumCoords"><code class="xref py py-meth docutils literal"><span class="pre">GetNumCoords()</span></code></a>-1]) of the
+chain of interest, -1 if it cannot be found.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
 <li><strong>pdb_id</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; 4-letter code of the structure the chain belongs to</li>
 <li><strong>chain_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of the chain consisting of one letter</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">The StructureDB index of the chain of interest, -1 if
-if can&#8217;t be found.</p>
-</td>
-</tr>
 </tbody>
 </table>
 </dd></dl>
@@ -406,10 +365,11 @@ if can&#8217;t be found.</p>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>idx</strong> &#8211; The StructureDB index</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Object describing the chain with index <em>idx</em>.</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The <a class="reference internal" href="#promod3.loop.CoordInfo" title="promod3.loop.CoordInfo"><code class="xref py py-class docutils literal"><span class="pre">CoordInfo</span></code></a> object describing the chain with
-index <strong>idx</strong>.</td>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.loop.CoordInfo" title="promod3.loop.CoordInfo"><code class="xref py py-class docutils literal"><span class="pre">CoordInfo</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The StructureDB index (in [0, <a class="reference internal" href="#promod3.loop.StructureDB.GetNumCoords" title="promod3.loop.StructureDB.GetNumCoords"><code class="xref py py-meth docutils literal"><span class="pre">GetNumCoords()</span></code></a>-1])</td>
 </tr>
 </tbody>
 </table>
@@ -417,47 +377,33 @@ index <strong>idx</strong>.</td>
 
 <dl class="method">
 <dt id="promod3.loop.StructureDB.GetBackboneList">
-<code class="descname">GetBackboneList</code><span class="sig-paren">(</span><em>fragment</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.GetBackboneList" title="Permalink to this definition">¶</a></dt>
+<code class="descname">GetBackboneList</code><span class="sig-paren">(</span><em>fragment</em>, <em>sequence</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.GetBackboneList" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">GetBackboneList</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>fragment</em>, <em>sequence</em><span class="sig-paren">)</span></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Description of the fragment from which a
-<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> should be built.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a></td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Backbone list with positions extracted from <em>fragment</em>.</p>
+</td>
 </tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
-the case when the fragment does not fully fit into one of the
-chains in the database.</td>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a></p>
+</td>
 </tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt>
-<code class="descname">GetBackboneList</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>fragment</em><span class="sig-paren">)</span></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Positions on which the bb_list n-terminus should be
+<li><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Fragment definition from which to extract positions.</li>
+<li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence to set for the returned backbone list.</li>
+<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Positions on which the backbone list&#8217;s N-terminus should be
 superposed onto.</li>
-<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Positions on which th ebb_list c_terminus should be
+<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Positions on which the backbone list&#8217;s C-terminus should be
 superposed onto.</li>
-<li><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Description of the fragment from which a
-<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> should be built.</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a></p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
-the case when the fragment does not fully fit into one of the
-chains in the database.</p>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid (happens
+if the fragment does not fully fit into one of the chains in the
+database) or if <em>sequence</em> contains a one letter code which is not
+one of the 20 default amino acids.</p>
 </td>
 </tr>
 </tbody>
@@ -471,7 +417,9 @@ chains in the database.</p>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of chains, that have been added to the database.</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of chains that have been added to the database.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
 </tr>
 </tbody>
 </table>
@@ -490,11 +438,13 @@ chains in the database.</p>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Fragment definition from which to extract the sequence.</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The sequence of <em>fragment</em></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a></td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The sequence of <strong>fragment</strong></td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Fragment definition from which to extract the sequence.</td>
 </tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
 the case when the fragment does not fully fit into one of the
 chains in the database.</td>
 </tr>
@@ -509,11 +459,13 @@ chains in the database.</td>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Fragment definition from which to extract the states.</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The dssp states of <em>fragment</em></td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The dssp states of <strong>fragment</strong></td>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a></td>
 </tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Fragment definition from which to extract the states.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
 the case when the fragment does not fully fit into one of the
 chains in the database.</td>
 </tr>
@@ -528,12 +480,13 @@ chains in the database.</td>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Fragment definition from which to extract the dihedrals.</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The phi and psi dihedral angles of every residue of <em>fragment</em></td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A list of pairs containing the  phi and psi dihedral angles of every
-residue of the <strong>fragment</strong>.</td>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of pairs (<code class="xref py py-class docutils literal"><span class="pre">tuple</span></code>)</td>
 </tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Fragment definition from which to extract the dihedrals.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
 the case when the fragment does not fully fit into one of the
 chains in the database.</td>
 </tr>
@@ -548,13 +501,14 @@ chains in the database.</td>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Residue depth for each residue of <em>fragment</em>.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Fragment definition from which to extract the residue
 depths</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a> values describing
-the per residue depth</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
 the case when the fragment does not fully fit into one of the
 chains in the database.</td>
 </tr>
@@ -569,14 +523,15 @@ chains in the database.</td>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Solvent accessibility for each residue of <em>fragment</em> in square A
+as calculated by dssp.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Fragment definition from which to extract the solvent
 accessibilities</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a> values describing
-the per residue solvent accessibilities in square A as
-calculated by dssp</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
 the case when the fragment does not fully fit into one of the
 chains in the database.</td>
 </tr>
@@ -591,14 +546,15 @@ chains in the database.</td>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The sequence profile for the residues defined by <em>fragment</em> with
+the BLOSUM62 probabilities as NULL model.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code></a></td>
+</tr>
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Fragment definition from which to extract the sequence
 profile</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The sequence profile for the residues defined by
-<strong>fragment</strong>, represented as a <code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code>
-with the BLOSUM62 probabilities as NULL model</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
 the case when the fragment does not fully fit into one of the
 chains in the database.</td>
 </tr>
@@ -613,14 +569,15 @@ chains in the database.</td>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The structure profile for the residues defined by <em>fragment</em> with
+the BLOSUM62 probabilities as NULL model.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code></a></td>
+</tr>
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Fragment definition from which to extract the structure
 profile</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The structure profile for the residues defined by
-<strong>fragment</strong>, represented as a <code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code>
-with the BLOSUM62 probabilities as NULL model</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if fragment is invalid. This is
 the case when the fragment does not fully fit into one of the
 chains in the database.</td>
 </tr>
@@ -630,28 +587,30 @@ chains in the database.</td>
 
 <dl class="method">
 <dt id="promod3.loop.StructureDB.GenerateStructureProfile">
-<code class="descname">GenerateStructureProfile</code><span class="sig-paren">(</span><em>bb_list</em>, <em>residue_depths</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.GenerateStructureProfile" title="Permalink to this definition">¶</a></dt>
-<dd><p>Takes the <strong>bb_list</strong> with its corresponding <strong>residue_depths</strong> to
-calculate a structure profile using the full internal structural data
-with their corresponding residue depths.</p>
+<code class="descname">GenerateStructureProfile</code><span class="sig-paren">(</span><em>other_db</em>, <em>fragment</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.GenerateStructureProfile" title="Permalink to this definition">¶</a></dt>
+<dd><p>Takes the CA positions and residue depths for <em>fragment</em> defined from
+<em>other_db</em> to calculate a structure profile using the full internal
+structural data of this database with their corresponding residue depths.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Structural data from which do extract structural
-profile</li>
-<li><strong>residue_depths</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a> values) &#8211; Residue depth values for <strong>bb_list</strong></li>
+<li><strong>fragment</strong> (<a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; Fragment definition from <em>other_db</em>.</li>
+<li><strong>other_db</strong> (<a class="reference internal" href="#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a>) &#8211; Structural database from which we extract CA positions and
+residue depths for <em>fragment</em>.</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The structure profile for the input,
-represented as a <code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code>
-with the BLOSUM62 probabilities as NULL model</p>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The structure profile for the input with the BLOSUM62
+probabilities as NULL model.</p>
 </td>
 </tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>bb_list</strong> and
-<strong>residue_depths</strong> differ in size or when their size is 0</p>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>bb_list</em> and
+<em>residue_depths</em> differ in size or when their size is 0</p>
 </td>
 </tr>
 </tbody>
@@ -661,27 +620,50 @@ with the BLOSUM62 probabilities as NULL model</p>
 <dl class="method">
 <dt id="promod3.loop.StructureDB.SetStructureProfile">
 <code class="descname">SetStructureProfile</code><span class="sig-paren">(</span><em>chain_idx</em>, <em>prof</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.SetStructureProfile" title="Permalink to this definition">¶</a></dt>
-<dd><p>Takes the <strong>prof</strong> and sets the corresponding StructureProfile
-frequencies in entry with <strong>chain_idx</strong></p>
+<dd><p>Takes the <em>prof</em> and sets the corresponding StructureProfile
+frequencies in entry with <em>chain_idx</em></p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>prof</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code>) &#8211; Source of profile frequencies</li>
-<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; idx of entry for which to set the frequencies</li>
+<li><strong>prof</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code></a>) &#8211; Source of profile frequencies</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; StructureDB index of entry for which to set frequencies
+(in [0, <a class="reference internal" href="#promod3.loop.StructureDB.GetNumCoords" title="promod3.loop.StructureDB.GetNumCoords"><code class="xref py py-meth docutils literal"><span class="pre">GetNumCoords()</span></code></a>-1])</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>chain_idx</strong> does not match
-any entry in the db or when the size of the <strong>prof</strong> does not
-exactly match the size of entry at <strong>chain_idx</strong></p>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>chain_idx</em> does not match
+any entry in the db or when the size of the <em>prof</em> does not
+exactly match the size of entry at <em>chain_idx</em></p>
 </td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
+<dl class="method">
+<dt id="promod3.loop.StructureDB.GetSubDB">
+<code class="descname">GetSubDB</code><span class="sig-paren">(</span><em>indices</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.StructureDB.GetSubDB" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A new database containing only the structural infos specified by
+your input. This might be useful if you&#8217;re testing stuff and want
+to make sure that you have no close homologue in the database.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>indices</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; StructureDB indices to be added to the sub database (in [0,
+<a class="reference internal" href="#promod3.loop.StructureDB.GetNumCoords" title="promod3.loop.StructureDB.GetNumCoords"><code class="xref py py-meth docutils literal"><span class="pre">GetNumCoords()</span></code></a>-1])</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if you provide an invalid index</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
 </dd></dl>
 
 </div>
@@ -704,11 +686,13 @@ accessed through a hash table, making searching the database ultra fast.</p>
 <span class="c"># structure_db = loop.LoadStructureDB()</span>
 
 <span class="c"># and our beloved crambin...</span>
-<span class="n">structure</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="s">&quot;1crn&quot;</span><span class="p">,</span> <span class="n">remote</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+<span class="n">structure</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="s">&#39;data/1CRN.pdb&#39;</span><span class="p">)</span>
 
 <span class="c"># we now want to connect the residue with index 17 and 21</span>
-<span class="n">n_stem</span> <span class="o">=</span> <span class="n">structure</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="mi">17</span><span class="p">]</span>
-<span class="n">c_stem</span> <span class="o">=</span> <span class="n">structure</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="mi">21</span><span class="p">]</span>
+<span class="n">sub_res_list</span> <span class="o">=</span> <span class="n">structure</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="mi">17</span><span class="p">:</span><span class="mi">22</span><span class="p">]</span>
+<span class="n">n_stem</span> <span class="o">=</span> <span class="n">sub_res_list</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
+<span class="n">c_stem</span> <span class="o">=</span> <span class="n">sub_res_list</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
+<span class="n">frag_seq</span> <span class="o">=</span> <span class="s">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">r</span><span class="o">.</span><span class="n">one_letter_code</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">sub_res_list</span><span class="p">])</span>
 
 <span class="c"># a custom FragDB can be built to identify fragments</span>
 <span class="c"># fulfilling these particular geometric constraints</span>
@@ -724,7 +708,8 @@ accessed through a hash table, making searching the database ultra fast.</p>
 
 <span class="c"># get the fragments in form of BackboneList objects and store them</span>
 <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">f_i</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">fragment_infos</span><span class="p">):</span>
-    <span class="n">bb_list</span> <span class="o">=</span> <span class="n">structure_db</span><span class="o">.</span><span class="n">GetBackboneList</span><span class="p">(</span><span class="n">n_stem</span><span class="p">,</span> <span class="n">c_stem</span><span class="p">,</span> <span class="n">f_i</span><span class="p">)</span>
+    <span class="n">bb_list</span> <span class="o">=</span> <span class="n">structure_db</span><span class="o">.</span><span class="n">GetBackboneList</span><span class="p">(</span><span class="n">n_stem</span><span class="p">,</span> <span class="n">c_stem</span><span class="p">,</span>
+                                           <span class="n">f_i</span><span class="p">,</span> <span class="n">frag_seq</span><span class="p">)</span>
     <span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">bb_list</span><span class="o">.</span><span class="n">ToEntity</span><span class="p">(),</span> <span class="nb">str</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">+</span> <span class="s">&quot;.pdb&quot;</span><span class="p">)</span>
 </pre></div>
 </div>
@@ -743,32 +728,26 @@ accessed through a hash table, making searching the database ultra fast.</p>
 </tr>
 </tbody>
 </table>
-<dl class="method">
+<dl class="staticmethod">
 <dt id="promod3.loop.FragDB.Load">
-<code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.FragDB.Load" title="Permalink to this definition">¶</a></dt>
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.FragDB.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.FragDB.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.FragDB.LoadPortable" title="Permalink to this definition">¶</a></dt>
 <dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.loop.FragDB.Save" title="promod3.loop.FragDB.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
-reading).</p>
+reading) / portable file generated with <a class="reference internal" href="#promod3.loop.FragDB.SavePortable" title="promod3.loop.FragDB.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; path to the file from which to load the database.</p>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load the database.</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The loaded database</p>
-</td>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The loaded database</td>
 </tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.FragDB" title="promod3.loop.FragDB"><code class="xref py py-class docutils literal"><span class="pre">FragDB</span></code></a></p>
-</td>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.loop.FragDB" title="promod3.loop.FragDB"><code class="xref py py-class docutils literal"><span class="pre">FragDB</span></code></a></td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>version number stored in file is not supported.</li>
-<li>file assumes different memory-layout than is available on this
-machine. Use <a class="reference internal" href="#promod3.loop.FragDB.LoadPortable" title="promod3.loop.FragDB.LoadPortable"><code class="xref py py-meth docutils literal"><span class="pre">LoadPortable()</span></code></a> to convert your file.</li>
-</ul>
-</td>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</td>
 </tr>
 </tbody>
 </table>
@@ -777,57 +756,11 @@ machine. Use <a class="reference internal" href="#promod3.loop.FragDB.LoadPortab
 <dl class="method">
 <dt id="promod3.loop.FragDB.Save">
 <code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.FragDB.Save" title="Permalink to this definition">¶</a></dt>
-<dd><p>Saves raw binary representation (optimized for fast reading).This puts many
-assumptions on the memory-layout of the target-machine and hence it is not
-portable. A portable version is provided by <a class="reference internal" href="#promod3.loop.FragDB.SavePortable" title="promod3.loop.FragDB.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a>.
-Preferably portable files are distributed and converted to a raw binary
-before using them.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; path to the file where the database will be saved</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.FragDB.LoadPortable">
-<code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.FragDB.LoadPortable" title="Permalink to this definition">¶</a></dt>
-<dd><p>Loads portable file generated with <a class="reference internal" href="#promod3.loop.FragDB.SavePortable" title="promod3.loop.FragDB.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slow but less
-machine-dependent).</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; path to the file from which to load the database.</p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The loaded database</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.FragDB" title="promod3.loop.FragDB"><code class="xref py py-class docutils literal"><span class="pre">FragDB</span></code></a></p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>version number stored in file is not supported.</li>
-<li>machine-dependent fundamental types are smaller than required.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
 <dt id="promod3.loop.FragDB.SavePortable">
 <code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.FragDB.SavePortable" title="Permalink to this definition">¶</a></dt>
-<dd><p>Saves portable binary representation (slow but less machine-dependent).</p>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
@@ -981,22 +914,27 @@ a given length.</p>
 
 <dl class="method">
 <dt id="promod3.loop.FragDB.SearchDB">
-<code class="descname">SearchDB</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>frag_size</em><span class="optional">[</span>, <em>extended_search=False</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.FragDB.SearchDB" title="Permalink to this definition">¶</a></dt>
-<dd><p>Search the database for fragments matching the geometry of the <strong>n_stem</strong> and <strong>c_stem</strong> and of the same length as the <strong>frag_size</strong>.</p>
+<code class="descname">SearchDB</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>frag_size</em>, <em>extra_bins=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.FragDB.SearchDB" title="Permalink to this definition">¶</a></dt>
+<dd><p>Search the database for fragments matching the geometry of the <strong>n_stem</strong>
+and <strong>c_stem</strong> and of the same length as the <strong>frag_size</strong>.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a> / <a class="reference internal" href="backbone.html#promod3.loop.Backbone" title="promod3.loop.Backbone"><code class="xref py py-class docutils literal"><span class="pre">Backbone</span></code></a>) &#8211; The N-stem</li>
-<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a> / <a class="reference internal" href="backbone.html#promod3.loop.Backbone" title="promod3.loop.Backbone"><code class="xref py py-class docutils literal"><span class="pre">Backbone</span></code></a>) &#8211; The C-stem</li>
-<li><strong>frag_size</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The length of the fragment</li>
-<li><strong>extended_search</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether an extended search should be performed, which will include fragments from bins surrounding the bin describing the  <strong>n_stem</strong> and <strong>c_stem</strong> geometry.</li>
+<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; The N-stem</li>
+<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; The C-stem</li>
+<li><strong>frag_size</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of residues of the fragment</li>
+<li><strong>extra_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Whether to extend the search to include fragments from
+<em>extra_bins</em> additional bins surrounding the bin given by
+the <em>n_stem</em> and <em>c_stem</em> geometry. If odd, we extend to
+the closer bin, otherwise symmetrically.</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A list of <a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a> objects. These objects are related to the
-structural database with which you called the AddFragments function.</p>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A list of <a class="reference internal" href="#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a> objects. These objects are related
+to the structural database with which you called the AddFragments
+function.</p>
 </td>
 </tr>
 </tbody>
@@ -1012,8 +950,10 @@ structural database with which you called the AddFragments function.</p>
 for fragments that possibly represent the structural conformation of interest.
 The <a class="reference internal" href="#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code></a> searches a <a class="reference internal" href="#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a> for n fragments,
 that maximize a certain score and gathers a set of fragments with a guaranteed
-structural diversity based on an rmsd_threshold. The score can be built using an
-arbitrary linear combination of following components:</p>
+structural diversity based on an rmsd_threshold. You can use the <a class="reference internal" href="#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code></a>
+wrapped in a full fletched pipeline implemented in
+<a class="reference internal" href="../modelling/algorithms.html#promod3.modelling.FraggerHandle" title="promod3.modelling.FraggerHandle"><code class="xref py py-class docutils literal"><span class="pre">FraggerHandle</span></code></a> or search for fragments from scratch
+using an arbitrary linear combination of scores:</p>
 <ul class="simple">
 <li><strong>SeqID</strong>:
 Calculates the fraction of amino acids being identical when comparing
@@ -1023,9 +963,9 @@ Calculates the avg. substitution matrix based sequence similarity of amino acids
 when comparing a potential fragment from the <a class="reference internal" href="#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a> and the target
 sequence</li>
 <li><strong>SSAgree</strong>:
-Calculates the avg. agreement of the predicted secondary structure by PSIPRED <a class="reference internal" href="#jones1999" id="id6">[Jones1999]</a>
-and the dssp <a class="reference internal" href="#kabsch1983" id="id7">[kabsch1983]</a> assignment stored in the <a class="reference internal" href="#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a>.
-The Agreement term is based on a probabilistic approach also used in HHSearch <a class="reference internal" href="#soding2005" id="id8">[soding2005]</a>.</li>
+Calculates the avg. agreement of the predicted secondary structure by PSIPRED <a class="reference internal" href="#jones1999" id="id5">[Jones1999]</a>
+and the dssp <a class="reference internal" href="#kabsch1983" id="id6">[kabsch1983]</a> assignment stored in the <a class="reference internal" href="#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a>.
+The Agreement term is based on a probabilistic approach also used in HHSearch <a class="reference internal" href="#soding2005" id="id7">[soding2005]</a>.</li>
 <li><strong>TorsionProbability</strong>:
 Calculates the avg. probability of observing the phi/psi dihedral angles of a potential
 fragment from the <a class="reference internal" href="#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a> given the target sequence. The probabilities are
@@ -1033,18 +973,18 @@ extracted from the <a class="reference internal" href="torsion_sampler.html#prom
 <li><strong>SequenceProfile</strong>:
 Calculates the avg. profile score between the amino acid frequencies of a potential
 fragment from the <a class="reference internal" href="#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a> and a target profile assuming a gapfree alignment
-in between them. The scores are calculated as described for HHSearch <a class="reference internal" href="#soding2005" id="id9">[soding2005]</a>.</li>
+in between them. The scores are calculated as L1 distances between the profile columns.</li>
 <li><strong>StructureProfile</strong>:
 Calculates the avg. profile score between the amino acid frequencies of a potential
 fragment from the <a class="reference internal" href="#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a> and a target profile assuming a gapfree alignment
-in between them. The scores are calculated as described for HHSearch <a class="reference internal" href="#soding2005" id="id10">[soding2005]</a>.
+in between them. The scores are calculated as L1 distances between the profile columns.
 In this case, the amino acid frequencies extracted from structural alignments are used.</li>
 </ul>
 <div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">loop</span>
 
 <span class="c"># load an example structure</span>
-<span class="n">prot</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="s">&quot;1crn&quot;</span><span class="p">,</span> <span class="n">remote</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+<span class="n">prot</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="s">&#39;data/1CRN.pdb&#39;</span><span class="p">)</span>
 
 <span class="c"># extract some additional information</span>
 <span class="n">seqres</span> <span class="o">=</span> <span class="s">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">r</span><span class="o">.</span><span class="n">one_letter_code</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">])</span>
@@ -1164,7 +1104,7 @@ There will be no pair of fragments with RMSD below <strong>rmsd_thresh</strong>.
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
 <li><strong>w</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; linear weight</li>
-<li><strong>psipred_prediction</strong> (<a class="reference internal" href="helper_classes.html#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code></a>) &#8211; Psipred prediction for fraggers target_sequence</li>
+<li><strong>psipred_prediction</strong> (<a class="reference internal" href="#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code></a>) &#8211; Psipred prediction for fraggers target_sequence</li>
 </ul>
 </td>
 </tr>
@@ -1185,7 +1125,7 @@ There will be no pair of fragments with RMSD below <strong>rmsd_thresh</strong>.
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
 <li><strong>w</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; linear weight</li>
 <li><strong>torsion_sampler</strong> (<a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; Torsion sampler to be used for all residues.</li>
-<li><strong>torsion_sampler_list</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; One torsion sampler for each residue.</li>
+<li><strong>torsion_sampler_list</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; One torsion sampler for each residue.</li>
 <li><strong>aa_before</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue before the sequence
 linked to this object.</li>
 <li><strong>aa_after</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue after the sequence
@@ -1207,7 +1147,7 @@ linked to this object.</li>
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
 <li><strong>w</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; linear weight</li>
-<li><strong>prof</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code>) &#8211; Profile for the fraggers target_sequence</li>
+<li><strong>prof</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code></a>) &#8211; Profile for the fraggers target_sequence</li>
 </ul>
 </td>
 </tr>
@@ -1225,7 +1165,7 @@ linked to this object.</li>
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
 <li><strong>w</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; linear weight</li>
-<li><strong>prof</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code>) &#8211; Profile for the fraggers target_sequence</li>
+<li><strong>prof</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code></a>) &#8211; Profile for the fraggers target_sequence</li>
 </ul>
 </td>
 </tr>
@@ -1435,74 +1375,112 @@ coordinates. This file will hence be much larger than the one saved with
 
 </dd></dl>
 
+</div>
+<div class="section" id="the-psipredprediction-class">
+<h2>The PsipredPrediction class<a class="headerlink" href="#the-psipredprediction-class" title="Permalink to this headline">¶</a></h2>
 <dl class="class">
-<dt id="promod3.loop.FraggerHandle">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">FraggerHandle</code><span class="sig-paren">(</span><em>prof</em>, <em>psipred_pred</em>, <em>fragment_length=9</em>, <em>fragments_per_position=100</em>, <em>rmsd_thresh=0.0</em>, <em>ss_agreement_weight=1.0</em>, <em>sequence_profile_weight=0.8</em>, <em>structure_profile_weight=2.0</em>, <em>torsion_weight=13.0</em>, <em>structure_db=None</em>, <em>torsion_sampler_coil=None</em>, <em>torsion_sampler_helix=None</em>, <em>torsion_sampler_extended=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/loop/_fragger.html#FraggerHandle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.loop.FraggerHandle" title="Permalink to this definition">¶</a></dt>
-<dd><p>Handler for Fragger objects linked to a specific chain.</p>
-<p>Fragments are chosen by a combined score of SSAgree, TorsionProbability,
-SequenceProfile and StructureProfile (see <a class="reference internal" href="#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code></a> for details).</p>
+<dt id="promod3.loop.PsipredPrediction">
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">PsipredPrediction</code><a class="headerlink" href="#promod3.loop.PsipredPrediction" title="Permalink to this definition">¶</a></dt>
+<dd><p>A container for the secondary structure prediction by Psipred.</p>
+<dl class="method">
+<dt id="promod3.loop.PsipredPrediction.PsipredPrediction">
+<code class="descname">PsipredPrediction</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.PsipredPrediction" title="Permalink to this definition">¶</a></dt>
+<dd><p>Constructs empty container</p>
+</dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">PsipredPrediction</code><span class="sig-paren">(</span><em>prediction</em>, <em>confidence</em><span class="sig-paren">)</span></dt>
+<dd><p>Constructs container with given content</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>prof</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code>) &#8211; Sequence profile for this chain.</li>
-<li><strong>psipred_pred</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.seq.PsipredPrediction</span></code>) &#8211; Psipred prediction for this chain.</li>
-<li><strong>fragment_length</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length (num. residues) of fragments to be extracted.</li>
-<li><strong>fragments_per_position</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of fragments to be extracted at each
-position.</li>
-<li><strong>rmsd_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; To guarantee structural diversity, no pair of fragments
-at a given position will have RMSD below <cite>rmsd_thresh</cite>.</li>
-<li><strong>ss_agreement_weight</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Linear weight for SSAgree score.</li>
-<li><strong>sequence_profile_weight</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Linear weight for SequenceProfile score.</li>
-<li><strong>structure_profile_weight</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Linear weight for StructureProfile score.</li>
-<li><strong>torsion_weight</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Linear weight for TorsionProbability score.</li>
-<li><strong>structure_db</strong> (<a class="reference internal" href="#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a>) &#8211; Source of structural data</li>
-<li><strong>torsion_sampler_coil</strong> (<a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; Torsion sampler for coil residues.</li>
-<li><strong>torsion_sampler_helix</strong> (<a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; Torsion sampler for helical residues.</li>
-<li><strong>torsion_sampler_extended</strong> (<a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; Torsion sampler for extended residues.</li>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>prediction</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; Secondary structure prediction as element in [&#8216;H&#8217;,&#8217;E&#8217;,&#8217;C&#8217;]</li>
+<li><strong>confidence</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; Confidence of prediction as element in [0,9]</li>
 </ul>
 </td>
 </tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <strong>prediction</strong> and
+<strong>confidence</strong> are inconsistent or if they contain an invalid
+element</p>
+</td>
+</tr>
 </tbody>
 </table>
+</dd></dl>
+
 <dl class="method">
-<dt id="promod3.loop.FraggerHandle.Get">
-<code class="descname">Get</code><span class="sig-paren">(</span><em>frag_pos</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/loop/_fragger.html#FraggerHandle.Get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.loop.FraggerHandle.Get" title="Permalink to this definition">¶</a></dt>
-<dd><p>Get fragger for sequence at index frag_pos..frag_pos+frag_length-1.</p>
+<dt id="promod3.loop.PsipredPrediction.FromHHM">
+<code class="descname">FromHHM</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.FromHHM" title="Permalink to this definition">¶</a></dt>
+<dd><p>Static function to Load a <a class="reference internal" href="#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code></a> object from hhm file,
+as they are provided by the hhsearch suite</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>frag_pos</strong> (<em>:class`int`</em>) &#8211; Start-index (note that sequence-indexing starts at 0)</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A <a class="reference internal" href="#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code></a> object.</td>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.PsipredPrediction.FromHoriz">
+<code class="descname">FromHoriz</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.FromHoriz" title="Permalink to this definition">¶</a></dt>
+<dd><p>Static function to Load a <a class="reference internal" href="#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code></a> object from horiz file,
+as they are produced by the psipred executable</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file</td>
 </tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.ValueError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">ValueError</span></code></a> if index out-of-bounds.</td>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.PsipredPrediction.Add">
+<code class="descname">Add</code><span class="sig-paren">(</span><em>prediction</em>, <em>confidence</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.Add" title="Permalink to this definition">¶</a></dt>
+<dd><p>Adds and appends a single residue psipred prediction at the end</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>prediction</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Prediction, must be one in [&#8216;H&#8217;,&#8217;E&#8217;,&#8217;C&#8217;]</li>
+<li><strong>confidence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Confidence of prediction, must be in [0,9]</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if input contains invalid elements</p>
+</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.FraggerHandle.GetList">
-<code class="descname">GetList</code><span class="sig-paren">(</span><em>pos_start=0</em>, <em>pos_end=-1</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/loop/_fragger.html#FraggerHandle.GetList"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.loop.FraggerHandle.GetList" title="Permalink to this definition">¶</a></dt>
-<dd><p>Get List of fragments covering sequence indices pos_start..pos_end.</p>
-<p>This will return an empty list if range is smaller than fragment_length.</p>
+<dt id="promod3.loop.PsipredPrediction.Extract">
+<code class="descname">Extract</code><span class="sig-paren">(</span><em>from</em>, <em>to</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.Extract" title="Permalink to this definition">¶</a></dt>
+<dd><p>Extracts content and returns a sub-<a class="reference internal" href="#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code></a> with range <strong>from</strong>
+to <strong>to</strong>, not including <strong>to</strong> itself</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>pos_start</strong> (<em>:class`int`</em>) &#8211; Start-index (note that sequence-indexing starts at 0)</li>
-<li><strong>pos_end</strong> (<em>:class`int`</em>) &#8211; End-index or -1 if it should go to the sequence-end.</li>
+<li><strong>from</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Idx to start</li>
+<li><strong>to</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Idx to end</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference internal" href="#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code></a> objects.</p>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code></a> with the specified range</p>
 </td>
 </tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.ValueError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">ValueError</span></code></a> if indices out-of-bounds.</p>
+<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>from</strong> or <strong>to</strong> are invalid</p>
 </td>
 </tr>
 </tbody>
@@ -1510,17 +1488,78 @@ at a given position will have RMSD below <cite>rmsd_thresh</cite>.</li>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.FraggerHandle.LoadCached">
-<code class="descname">LoadCached</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/loop/_fragger.html#FraggerHandle.LoadCached"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.loop.FraggerHandle.LoadCached" title="Permalink to this definition">¶</a></dt>
-<dd><p>Load fragger objects stored with <a class="reference internal" href="#promod3.loop.FraggerHandle.SaveCached" title="promod3.loop.FraggerHandle.SaveCached"><code class="xref py py-meth docutils literal"><span class="pre">SaveCached()</span></code></a>.
-Note that here we require that the same structure db is set as was
-used when <cite>filename</cite> was saved.</p>
+<dt id="promod3.loop.PsipredPrediction.GetPrediction">
+<code class="descname">GetPrediction</code><span class="sig-paren">(</span><em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.GetPrediction" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index to get prediction from</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Psipred prediction at pos <strong>idx</strong></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>idx</strong> is invalid</td>
+</tr>
+</tbody>
+</table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.FraggerHandle.SaveCached">
-<code class="descname">SaveCached</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/loop/_fragger.html#FraggerHandle.SaveCached"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.loop.FraggerHandle.SaveCached" title="Permalink to this definition">¶</a></dt>
-<dd><p>Save cached fraggers.</p>
+<dt id="promod3.loop.PsipredPrediction.GetConfidence">
+<code class="descname">GetConfidence</code><span class="sig-paren">(</span><em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.GetConfidence" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index to get confidence from</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Psipred confidence at pos <strong>idx</strong></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>idx</strong> is invalid</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.PsipredPrediction.GetPredictions">
+<code class="descname">GetPredictions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.GetPredictions" title="Permalink to this definition">¶</a></dt>
+<dd><p>Get all the predictions in the container</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> containing all the predictions in the container</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.PsipredPrediction.GetConfidences">
+<code class="descname">GetConfidences</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.GetConfidences" title="Permalink to this definition">¶</a></dt>
+<dd><p>Get all the confidences in the container</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> containing all the confidences in the container</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.loop.PsipredPrediction.__len__">
+<code class="descname">__len__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PsipredPrediction.__len__" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of elements in container</td>
+</tr>
+</tbody>
+</table>
 </dd></dl>
 
 </dd></dl>
@@ -1528,37 +1567,37 @@ used when <cite>filename</cite> was saved.</p>
 <table class="docutils citation" frame="void" id="soding2005" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label">[soding2005]</td><td><em>(<a class="fn-backref" href="#id1">1</a>, <a class="fn-backref" href="#id8">2</a>, <a class="fn-backref" href="#id9">3</a>, <a class="fn-backref" href="#id10">4</a>)</em> Söding J (2005). Protein homology detection by HMM-HMM comparison. Bioinformatics 21 (7): 951–960.</td></tr>
+<tr><td class="label">[soding2005]</td><td><em>(<a class="fn-backref" href="#id1">1</a>, <a class="fn-backref" href="#id7">2</a>)</em> Söding J (2005). Protein homology detection by HMM-HMM comparison. Bioinformatics 21 (7): 951–960.</td></tr>
 </tbody>
 </table>
 <table class="docutils citation" frame="void" id="sanner1996" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id3">[sanner1996]</a></td><td>Sanner M, Olson AJ, Spehner JC (1996). Reduced Surface: an Efficient Way to Compute Molecular Surfaces. Biopolymers 38 (3): 305-320.</td></tr>
+<tr><td class="label"><a class="fn-backref" href="#id2">[sanner1996]</a></td><td>Sanner M, Olson AJ, Spehner JC (1996). Reduced Surface: an Efficient Way to Compute Molecular Surfaces. Biopolymers 38 (3): 305-320.</td></tr>
 </tbody>
 </table>
 <table class="docutils citation" frame="void" id="chakravarty1999" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id4">[chakravarty1999]</a></td><td>Chakravarty S, Varadarajan R (1999). Residue depth: a novel parameter for the analysis of protein structure and stability. Structure 7 (7): 723–732.</td></tr>
+<tr><td class="label"><a class="fn-backref" href="#id3">[chakravarty1999]</a></td><td>Chakravarty S, Varadarajan R (1999). Residue depth: a novel parameter for the analysis of protein structure and stability. Structure 7 (7): 723–732.</td></tr>
 </tbody>
 </table>
 <table class="docutils citation" frame="void" id="zhou2005" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id5">[zhou2005]</a></td><td>Zhou H, Zhou Y (2005). Fold Recognition by Combining Sequence Profiles Derived From Evolution and From Depth-Dependent Structural Alignment of Fragments. Proteins 58 (2): 321–328.</td></tr>
+<tr><td class="label"><a class="fn-backref" href="#id4">[zhou2005]</a></td><td>Zhou H, Zhou Y (2005). Fold Recognition by Combining Sequence Profiles Derived From Evolution and From Depth-Dependent Structural Alignment of Fragments. Proteins 58 (2): 321–328.</td></tr>
 </tbody>
 </table>
 <table class="docutils citation" frame="void" id="jones1999" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id6">[Jones1999]</a></td><td>Jones DT (1999) Protein secondary structure prediction based on position-specific scoring matrices. J. Mol. Biol. 292: 195-202.</td></tr>
+<tr><td class="label"><a class="fn-backref" href="#id5">[Jones1999]</a></td><td>Jones DT (1999) Protein secondary structure prediction based on position-specific scoring matrices. J. Mol. Biol. 292: 195-202.</td></tr>
 </tbody>
 </table>
 <table class="docutils citation" frame="void" id="kabsch1983" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label">[kabsch1983]</td><td><em>(<a class="fn-backref" href="#id2">1</a>, <a class="fn-backref" href="#id7">2</a>)</em> Kabsch W, Sander C (1983) Dictionary of protein secondary structure: pattern recognition of hydrogen-bonded and geometrical features. Biopolymers 22 2577-2637.</td></tr>
+<tr><td class="label"><a class="fn-backref" href="#id6">[kabsch1983]</a></td><td>Kabsch W, Sander C (1983) Dictionary of protein secondary structure: pattern recognition of hydrogen-bonded and geometrical features. Biopolymers 22 2577-2637.</td></tr>
 </tbody>
 </table>
 </div>
@@ -1572,11 +1611,12 @@ used when <cite>filename</cite> was saved.</p>
         <div class="sphinxsidebarwrapper">
   <h3><a href="../index.html">Table Of Contents</a></h3>
   <ul>
-<li><a class="reference internal" href="#">Structural Database</a><ul>
+<li><a class="reference internal" href="#">Structural Data</a><ul>
 <li><a class="reference internal" href="#defining-chains-and-fragments">Defining Chains and Fragments</a></li>
-<li><a class="reference internal" href="#the-database">The Database</a></li>
+<li><a class="reference internal" href="#the-structure-database">The Structure Database</a></li>
 <li><a class="reference internal" href="#finding-fragments-based-on-geometric-features">Finding Fragments based on Geometric Features</a></li>
 <li><a class="reference internal" href="#finding-fragments-based-on-sequence-features">Finding Fragments based on Sequence Features</a></li>
+<li><a class="reference internal" href="#the-psipredprediction-class">The PsipredPrediction class</a></li>
 </ul>
 </li>
 </ul>
@@ -1585,9 +1625,9 @@ used when <cite>filename</cite> was saved.</p>
 <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="docutils literal"><span class="pre">loop</span></code> - Loop Modelling</a><ul>
-      <li>Previous: <a href="torsion_sampler.html" title="previous chapter">Torsion Sampler</a></li>
-      <li>Next: <a href="loop_closing.html" title="next chapter">Loop Closing</a></li>
+  <li><a href="index.html"><code class="docutils literal"><span class="pre">loop</span></code> - Loop Handling</a><ul>
+      <li>Previous: <a href="torsion_sampler.html" title="previous chapter">Sampling Dihedral Angles</a></li>
+      <li>Next: <a href="all_atom.html" title="next chapter">Handling All Atom Positions</a></li>
   </ul></li>
   </ul></li>
   </ul></li>
@@ -1618,7 +1658,7 @@ used when <cite>filename</cite> was saved.</p>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/loop/torsion_sampler.html b/doc/html/loop/torsion_sampler.html
index 511bc81a..3523bc27 100644
--- a/doc/html/loop/torsion_sampler.html
+++ b/doc/html/loop/torsion_sampler.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Torsion Sampler &mdash; ProMod3 0 documentation</title>
+    <title>Sampling Dihedral Angles &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,10 +23,10 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
-    <link rel="up" title="loop - Loop Modelling" href="index.html" />
-    <link rel="next" title="Structural Database" href="structure_db.html" />
-    <link rel="prev" title="Backbone" href="backbone.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="loop - Loop Handling" href="index.html" />
+    <link rel="next" title="Structural Data" href="structure_db.html" />
+    <link rel="prev" title="Representing Loops" href="backbone.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -39,8 +39,8 @@
         <div class="bodywrapper">
           <div class="body" role="main">
             
-  <div class="section" id="torsion-sampler">
-<h1>Torsion Sampler<a class="headerlink" href="#torsion-sampler" title="Permalink to this headline">¶</a></h1>
+  <div class="section" id="sampling-dihedral-angles">
+<h1>Sampling Dihedral Angles<a class="headerlink" href="#sampling-dihedral-angles" title="Permalink to this headline">¶</a></h1>
 <p>The torsion sampler is the basic object used to sample the backbone torsion
 angles phi and psi. It can be used to calculate the probability distributions
 of backbone torsion angles from structures and save them, as well as loading
@@ -55,6 +55,7 @@ residue names or an index as input.</p>
 <p>As a showcase example, we randomly sample from a given torsion sample and
 store the resulting samples as a scatter plot:</p>
 <div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span>
+<span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">conop</span>
 <span class="c"># this requires matplotlib and numpy</span>
 <span class="kn">import</span> <span class="nn">matplotlib</span>
 <span class="c"># change next line, if you wish to use a GUI-based plot-output</span>
@@ -71,7 +72,9 @@ store the resulting samples as a scatter plot:</p>
 
 <span class="c"># draw from a random distribution</span>
 <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1000</span><span class="p">):</span>
-    <span class="n">dihedral_pair</span> <span class="o">=</span> <span class="n">t_sampler</span><span class="o">.</span><span class="n">Draw</span><span class="p">(</span><span class="s">&quot;ALA&quot;</span><span class="p">,</span> <span class="s">&quot;PRO&quot;</span><span class="p">,</span> <span class="s">&quot;ALA&quot;</span><span class="p">)</span>
+    <span class="n">dihedral_pair</span> <span class="o">=</span> <span class="n">t_sampler</span><span class="o">.</span><span class="n">Draw</span><span class="p">(</span><span class="n">conop</span><span class="o">.</span><span class="n">ALA</span><span class="p">,</span> 
+                                   <span class="n">conop</span><span class="o">.</span><span class="n">PRO</span><span class="p">,</span> 
+                                   <span class="n">conop</span><span class="o">.</span><span class="n">ALA</span><span class="p">)</span>
     <span class="n">phi</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">dihedral_pair</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
     <span class="n">psi</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">dihedral_pair</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
 
@@ -96,24 +99,24 @@ amino acids. They are combined by &#8220;-&#8221;. It is either possible to
 use the keyword &#8220;all&#8221;, or write out all allowed amino acids by their
 three letter code and separate them by &#8221;,&#8221;. An example would be: &#8220;all-
 VAL,ILE-PRO&#8221;. There are cases where a tripeptide can match several
-group definitions. The group definitions are stored internally as a
-list. This list is iterated at
-every evaluation of three consecutive amino acids and the first hit is
+group definitions. The list of group definitions is iterated for every
+combination of three consecutive amino acids and the first hit is
 decisive.</p>
 </div>
 <div class="section" id="the-torsion-sampler-class">
 <h2>The Torsion Sampler Class<a class="headerlink" href="#the-torsion-sampler-class" title="Permalink to this headline">¶</a></h2>
 <dl class="class">
 <dt id="promod3.loop.TorsionSampler">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">TorsionSampler</code><span class="sig-paren">(</span><em>group_definitions</em>, <em>bin_size</em>, <em>seed</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.TorsionSampler" title="Permalink to this definition">¶</a></dt>
+<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">TorsionSampler</code><span class="sig-paren">(</span><em>group_definitions</em>, <em>bins_per_dimension</em>, <em>seed</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.TorsionSampler" title="Permalink to this definition">¶</a></dt>
 <dd><p>Basic object used to sample the backbone torsion angles phi and psi.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>group_definitions</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; List of group definitions defining amino acid triplets</li>
-<li><strong>bin_size</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Size of bins in distributions (in degrees)</li>
+<li><strong>group_definitions</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; List of group definitions defining amino acid triplets</li>
+<li><strong>bins_per_dimension</strong> &#8211; Number of bins to represent the 360 degrees of each
+torsion angle</li>
 <li><strong>seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Seed for random number generator</li>
 </ul>
 </td>
@@ -133,7 +136,7 @@ acids not matching any of the group definitions.</p>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>view</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityView</span></code></a>) &#8211; structure from which parameters will be extracted</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>view</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityView</span></code></a>) &#8211; structure from which parameters will be extracted</td>
 </tr>
 </tbody>
 </table>
@@ -145,18 +148,21 @@ acids not matching any of the group definitions.</p>
 <dd><p>Recalculates the probability distributions from the histograms.</p>
 </dd></dl>
 
-<dl class="method">
+<dl class="staticmethod">
 <dt id="promod3.loop.TorsionSampler.Load">
-<code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em>, <em>seed</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.TorsionSampler.Load" title="Permalink to this definition">¶</a></dt>
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em>, <em>seed</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.TorsionSampler.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.loop.TorsionSampler.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em>, <em>seed</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.TorsionSampler.LoadPortable" title="Permalink to this definition">¶</a></dt>
 <dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.loop.TorsionSampler.Save" title="promod3.loop.TorsionSampler.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
-reading).</p>
+reading) / portable file generated with <a class="reference internal" href="#promod3.loop.TorsionSampler.SavePortable" title="promod3.loop.TorsionSampler.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; path to the file from which to load the sampler.</li>
-<li><strong>seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; seed for random number generator (not saved in file).</li>
+<li><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load the sampler.</li>
+<li><strong>seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Seed for random number generator (not saved in file).</li>
 </ul>
 </td>
 </tr>
@@ -166,13 +172,8 @@ reading).</p>
 <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a></p>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>version number stored in file is not supported.</li>
-<li>file assumes different memory-layout than is available on this
-machine. Use <a class="reference internal" href="#promod3.loop.TorsionSampler.LoadPortable" title="promod3.loop.TorsionSampler.LoadPortable"><code class="xref py py-meth docutils literal"><span class="pre">LoadPortable()</span></code></a> to convert your file.</li>
-</ul>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</p>
 </td>
 </tr>
 </tbody>
@@ -182,65 +183,16 @@ machine. Use <a class="reference internal" href="#promod3.loop.TorsionSampler.Lo
 <dl class="method">
 <dt id="promod3.loop.TorsionSampler.Save">
 <code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.TorsionSampler.Save" title="Permalink to this definition">¶</a></dt>
-<dd><p>Saves raw binary representation (optimized for fast reading).This puts many
-assumptions on the memory-layout of the target-machine and hence it is not
-portable. A portable version is provided by <a class="reference internal" href="#promod3.loop.TorsionSampler.SavePortable" title="promod3.loop.TorsionSampler.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a>.
-Preferably portable files are distributed and converted to a raw binary
-before using them.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; path to the file where the sampler will be saved</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.loop.TorsionSampler.LoadPortable">
-<code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em>, <em>seed</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.TorsionSampler.LoadPortable" title="Permalink to this definition">¶</a></dt>
-<dd><p>Loads portable file generated with <a class="reference internal" href="#promod3.loop.TorsionSampler.SavePortable" title="promod3.loop.TorsionSampler.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slow but less
-machine-dependent).</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; path to the file from which to load the sampler.</li>
-<li><strong>seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; seed for random number generator (not saved in file).</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A torsion sampler</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a></p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>version number stored in file is not supported.</li>
-<li>machine-dependent fundamental types are smaller than required.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
 <dt id="promod3.loop.TorsionSampler.SavePortable">
 <code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.TorsionSampler.SavePortable" title="Permalink to this definition">¶</a></dt>
-<dd><p>Saves portable binary representation (slow but less machine-dependent).</p>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; path to the file where the sampler will be saved</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file where the sampler will be saved</td>
 </tr>
 <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
 </tr>
@@ -256,9 +208,9 @@ machine-dependent).</p>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>before</strong> &#8211; Name (3 letter code) of the residue before <em>central</em></li>
-<li><strong>central</strong> &#8211; Name (3 letter code) of the residue for the central residue</li>
-<li><strong>after</strong> &#8211; Name (3 letter code) of the residue after <em>central</em></li>
+<li><strong>before</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue before <em>central</em></li>
+<li><strong>central</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue for the central residue</li>
+<li><strong>after</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue after <em>central</em></li>
 </ul>
 </td>
 </tr>
@@ -298,9 +250,9 @@ standard amino acid</td>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>before</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue before <em>central</em></li>
-<li><strong>central</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue for which torsion angles will be drawn</li>
-<li><strong>after</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue after <em>central</em></li>
+<li><strong>before</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue before <em>central</em></li>
+<li><strong>central</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue for which torsion angles will be drawn</li>
+<li><strong>after</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue after <em>central</em></li>
 </ul>
 </td>
 </tr>
@@ -336,9 +288,9 @@ standard amino acid</td>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>before</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue before <em>central</em></li>
-<li><strong>central</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue for which the <em>phi</em> will be drawn</li>
-<li><strong>after</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue after <em>central</em></li>
+<li><strong>before</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue before <em>central</em></li>
+<li><strong>central</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue for which the <em>phi</em> will be drawn</li>
+<li><strong>after</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue after <em>central</em></li>
 <li><strong>psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; <em>psi</em> angle</li>
 </ul>
 </td>
@@ -380,9 +332,9 @@ standard amino acid</td>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>before</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue before <em>central</em></li>
-<li><strong>central</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue for which the <em>psi</em> angle will be drawn</li>
-<li><strong>after</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue after <em>central</em></li>
+<li><strong>before</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue before <em>central</em></li>
+<li><strong>central</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue for which the <em>psi</em> angle will be drawn</li>
+<li><strong>after</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue after <em>central</em></li>
 <li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; <em>phi</em> angle</li>
 </ul>
 </td>
@@ -424,9 +376,9 @@ standard amino acid</td>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>before</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue before <em>central</em></li>
-<li><strong>central</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue for which the probability is calculated.</li>
-<li><strong>after</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue after <em>central</em></li>
+<li><strong>before</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue before <em>central</em></li>
+<li><strong>central</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue for which the probability is calculated.</li>
+<li><strong>after</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue after <em>central</em></li>
 <li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; phi angle</li>
 <li><strong>psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; psi angle</li>
 </ul>
@@ -470,9 +422,9 @@ standard amino acid</td>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>before</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue before <em>central</em></li>
-<li><strong>central</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue for which the probability is calculated.</li>
-<li><strong>after</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue after <em>central</em></li>
+<li><strong>before</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue before <em>central</em></li>
+<li><strong>central</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue for which the probability is calculated.</li>
+<li><strong>after</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue after <em>central</em></li>
 <li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; phi angle</li>
 <li><strong>psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; psi angle</li>
 </ul>
@@ -494,9 +446,9 @@ standard amino acid</td>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>before</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue before <em>central</em></li>
-<li><strong>central</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue for which the probability is calculated.</li>
-<li><strong>after</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name (3 letter code) of the residue after <em>central</em></li>
+<li><strong>before</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue before <em>central</em></li>
+<li><strong>central</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue for which the probability is calculated.</li>
+<li><strong>after</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; id of the residue after <em>central</em></li>
 <li><strong>psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; phi angle</li>
 <li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; psi angle</li>
 </ul>
@@ -594,7 +546,7 @@ standard amino acid</td>
         <div class="sphinxsidebarwrapper">
   <h3><a href="../index.html">Table Of Contents</a></h3>
   <ul>
-<li><a class="reference internal" href="#">Torsion Sampler</a><ul>
+<li><a class="reference internal" href="#">Sampling Dihedral Angles</a><ul>
 <li><a class="reference internal" href="#defining-amino-acid-triplets">Defining Amino Acid triplets</a></li>
 <li><a class="reference internal" href="#the-torsion-sampler-class">The Torsion Sampler Class</a></li>
 </ul>
@@ -605,9 +557,9 @@ standard amino acid</td>
 <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="docutils literal"><span class="pre">loop</span></code> - Loop Modelling</a><ul>
-      <li>Previous: <a href="backbone.html" title="previous chapter">Backbone</a></li>
-      <li>Next: <a href="structure_db.html" title="next chapter">Structural Database</a></li>
+  <li><a href="index.html"><code class="docutils literal"><span class="pre">loop</span></code> - Loop Handling</a><ul>
+      <li>Previous: <a href="backbone.html" title="previous chapter">Representing Loops</a></li>
+      <li>Next: <a href="structure_db.html" title="next chapter">Structural Data</a></li>
   </ul></li>
   </ul></li>
   </ul></li>
@@ -638,7 +590,7 @@ standard amino acid</td>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/modelling/algorithms.html b/doc/html/modelling/algorithms.html
new file mode 100644
index 00000000..9268530e
--- /dev/null
+++ b/doc/html/modelling/algorithms.html
@@ -0,0 +1,430 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Modelling Algorithms &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="modelling - Protein Modelling" href="index.html" />
+    <link rel="next" title="sidechain - Sidechain Modelling" href="../sidechain/index.html" />
+    <link rel="prev" title="Sidechain Reconstruction" href="sidechain_reconstruction.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="modelling-algorithms">
+<h1>Modelling Algorithms<a class="headerlink" href="#modelling-algorithms" title="Permalink to this headline">¶</a></h1>
+<p>A collection of algorithms that can be useful in modelling</p>
+<div class="section" id="rigid-blocks">
+<h2>Rigid Blocks<a class="headerlink" href="#rigid-blocks" title="Permalink to this headline">¶</a></h2>
+<p>RMSD is a typical measure for similarity of two structures. Given an atom atom
+mapping between two structures, the minimum RMSD and the according superposition
+can efficiently be calculated using an approach based on singular value
+decomposition. This approach is problematic if there are very dissimilar regions
+or when domain movement events occur. We can therefore implement an iterative
+superposition. The two structures undergo an initial superposition. For every
+iteration we then select a subset of atoms that are within a certain distance
+threshold that serve as input for the next superposition. This iterative
+superpostion typically converges to the largest common subpart but is
+non-deterministic since it depends on the initial superposition.
+The RigidBlocks algorithm is based on only the CA positions and performs this
+iterative superposition multiple times by using a sliding window to select the
+initial subset and gathers all unique results. These results can be very
+similar and only differ by single positions. The algorithm therefore reduces
+the amount of solutions by merging them based on a threshold of similarity.
+If the sum of matching positions within the distance threshold divided by
+the maximum length of the two solutions is above a cluster thresh, the two
+solutions get merged by producing a common solution containing the shared
+positions. As a final result, the algorithm therefore detects common rigid
+subsets of positions.</p>
+<dl class="method">
+<dt id="promod3.modelling.RigidBlocks">
+<code class="descclassname">promod3.modelling.</code><code class="descname">RigidBlocks</code><span class="sig-paren">(</span><em>bb_list_one</em>, <em>bb_list_two</em><span class="optional">[</span>, <em>window_length = 12</em>, <em>max_iterations=20</em>, <em>distance_thresh=3.0</em>, <em>cluster_thresh=0.9</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.RigidBlocks" title="Permalink to this definition">¶</a></dt>
+<dd><p>Performs the RigidBlock algorithm on given input</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>bb_list_one</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">promod3.loop.BackboneList</span></code></a>) &#8211; First piece structural information from which CA
+positions will be extracted</li>
+<li><strong>bb_list_two</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">promod3.loop.BackboneList</span></code></a>) &#8211; Second piece of structural information from which CA
+positions will be extracted</li>
+<li><strong>window_length</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length of sliding window to generate initial subsets</li>
+<li><strong>max_iterations</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Maximal numbers of iterations for every single
+iterative superposition</li>
+<li><strong>distance_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal distance two CA positions can have to be
+considered in the same rigid block and to select
+the common subset for the next iteration of the
+iterative superposition</li>
+<li><strong>cluster_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Threshold of similarity to perform the final merging
+of the solutions</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> with the first element being a
+<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <code class="xref py py-class docutils literal"><span class="pre">list</span></code> defining the
+indices of the common subsets (rigid blocks) relative
+to the input <a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">promod3.loop.BackboneList</span></code></a> objects
+and the second element being a <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of
+<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Mat4</span></code></a> defining the transformations to
+superpose the according positions in <strong>bb_list_one</strong>
+onto <strong>bb_list_two</strong></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descclassname">promod3.modelling.</code><code class="descname">RigidBlocks</code><span class="sig-paren">(</span><em>aln</em><span class="optional">[</span>, <em>seq_one_idx=0</em>, <em>seq_two_idx=1</em>, <em>window_length = 12</em>, <em>max_iterations=20</em>, <em>distance_thresh=3.0</em>, <em>cluster_thresh=0.9</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
+<dd><p>Performs the RigidBlock algorithm on given input</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>aln</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.AlignmentHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.AlignmentHandle</span></code></a>) &#8211; An alignment with attached <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityView</span></code></a>
+objects from which the positions are extracted</li>
+<li><strong>seq_idx_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The idx of the first sequence from which the CA
+positions will be extracted</li>
+<li><strong>seq_idx_two</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The idx of the second sequence from which the CA
+positions will be extracted</li>
+<li><strong>window_length</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length of sliding window to generate initial subsets</li>
+<li><strong>max_iterations</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Maximal numbers of iterations for every single
+iterative superposition</li>
+<li><strong>distance_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal distance two CA positions can have to be
+considered in the same rigid block and to select
+the common subset for the next iteration of the
+iterative superposition</li>
+<li><strong>cluster_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Threshold of similarity to perform the final merging
+of the solutions</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> with the first element being a
+<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <code class="xref py py-class docutils literal"><span class="pre">list</span></code> defining the
+column indices of the common subsets (rigid blocks)
+relative to the input <a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.AlignmentHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.AlignmentHandle</span></code></a>
+and the second element being a <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of
+<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Mat4</span></code></a> defining the transformations to
+superpose the according positions from the first
+sequence onto the second sequence.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descclassname">promod3.modelling.</code><code class="descname">RigidBlocks</code><span class="sig-paren">(</span><em>pos_one</em>, <em>pos_two</em><span class="optional">[</span>, <em>window_length = 12</em>, <em>max_iterations=20</em>, <em>distance_thresh=3.0</em>, <em>cluster_thresh=0.9</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
+<dd><p>Performs the RigidBlock algorithm on given input</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>pos_one</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3List</span></code>) &#8211; First piece position information</li>
+<li><strong>pos_two</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3List</span></code>) &#8211; Second piece of position information</li>
+<li><strong>window_length</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length of sliding window to generate initial subsets</li>
+<li><strong>max_iterations</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Maximal numbers of iterations for every single
+iterative superposition</li>
+<li><strong>distance_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal distance two CA positions can have to be
+considered in the same rigid block and to select
+the common subset for the next iteration of the
+iterative superposition</li>
+<li><strong>cluster_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Threshold of similarity to perform the final merging
+of the solutions</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> with the first element being a
+<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <code class="xref py py-class docutils literal"><span class="pre">list</span></code> defining the
+indices of the common subsets (rigid blocks) relative
+to the input <code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3List</span></code> objects
+and the second element being a <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of
+<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Mat4</span></code></a> defining the transformations to
+superpose the according positions in <strong>pos_one</strong>
+onto <strong>pos_two</strong></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="de-novo-modelling">
+<h2>De Novo Modelling<a class="headerlink" href="#de-novo-modelling" title="Permalink to this headline">¶</a></h2>
+<p>ProMod3 provides algorithms for sampling and fragment detection.
+Here we provide an object, that facilitates fragment detection and caching,
+as well as a convenient function to combine the functionalities into an
+example pipeline.</p>
+<dl class="class">
+<dt id="promod3.modelling.FraggerHandle">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">FraggerHandle</code><span class="sig-paren">(</span><em>sequence</em>, <em>profile=None</em>, <em>psipred_pred=None</em>, <em>fragment_length=9</em>, <em>fragments_per_position=100</em>, <em>rmsd_thresh=0.0</em>, <em>structure_db=None</em>, <em>torsion_sampler_coil=None</em>, <em>torsion_sampler_helix=None</em>, <em>torsion_sampler_extended=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_fragger_handle.html#FraggerHandle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.FraggerHandle" title="Permalink to this definition">¶</a></dt>
+<dd><p>Handler for <a class="reference internal" href="../loop/structure_db.html#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code></a> objects linked to a 
+specific chain.</p>
+<p>Tries to get the most accurate fragments given your input.
+You can only provide a SEQRES, the returned fragments are
+then searched by using sequence similarity as the only target value.
+You can massively increase the accuracy of the found fragments by
+providing a secondary structure prediction and / or sequence profile.</p>
+<p>Following features influence the fragment search given your input:</p>
+<ul class="simple">
+<li><strong>sequence</strong>:<ul>
+<li>Sequence Similarity with BLOSUM62</li>
+</ul>
+</li>
+<li><strong>sequence</strong>, <strong>psipred_pred</strong>:<ul>
+<li>Sequence Similarity with BLOSUM62</li>
+<li>Secondary Structure Agreement</li>
+<li>Secondary Structure Dependent Torsion Probabilities</li>
+</ul>
+</li>
+<li><strong>sequence</strong>, <strong>profile</strong>:<ul>
+<li>Sequence Profile Score</li>
+<li>Structure Profile Score</li>
+</ul>
+</li>
+<li><strong>sequence</strong>, <strong>psipred_pred</strong>, <strong>profile</strong>:<ul>
+<li>Secondary Structure Agreement</li>
+<li>Secondary Structure Dependent Torsion Probabilities</li>
+<li>Sequence Profile Score</li>
+<li>Structure Profile Score</li>
+</ul>
+</li>
+</ul>
+<p>The FraggerHandle internally uses the <a class="reference internal" href="../loop/structure_db.html#promod3.loop.FraggerMap" title="promod3.loop.FraggerMap"><code class="xref py py-class docutils literal"><span class="pre">promod3.loop.FraggerMap</span></code></a> for caching. You
+can therefore request fragments for a certain position several times and the
+search is performed only once. This also allows to save the FraggerHandle to
+disk. When loading the FraggerHandle again, you need to provide all parameters
+again. These parameters must be exactly the same than the ones you used when
+initially constructing the FraggerHandle, especially the structure database.
+Weird things are happening otherwise.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>/<a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceHandle</span></code></a>) &#8211; SEQRES for this chain</li>
+<li><strong>profile</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code></a>) &#8211; Sequence profile for this chain.</li>
+<li><strong>psipred_pred</strong> (<a class="reference internal" href="../loop/structure_db.html#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">promod3.loop.PsipredPrediction</span></code></a>) &#8211; Psipred prediction for this chain.</li>
+<li><strong>fragment_length</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length (num. residues) of fragments to be extracted.</li>
+<li><strong>fragments_per_position</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of fragments to be extracted at each
+position.</li>
+<li><strong>rmsd_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; To guarantee structural diversity, no pair of fragments
+at a given position will have RMSD below <cite>rmsd_thresh</cite>.</li>
+<li><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"><span class="pre">promod3.loop.StructureDB</span></code></a>) &#8211; Source of structural data</li>
+<li><strong>torsion_sampler_coil</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"><span class="pre">promod3.loop.TorsionSampler</span></code></a>) &#8211; Torsion sampler for coil residues.</li>
+<li><strong>torsion_sampler_helix</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"><span class="pre">promod3.loop.TorsionSampler</span></code></a>) &#8211; Torsion sampler for helical residues.</li>
+<li><strong>torsion_sampler_extended</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"><span class="pre">promod3.loop.TorsionSampler</span></code></a>) &#8211; Torsion sampler for extended residues.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="method">
+<dt id="promod3.modelling.FraggerHandle.Get">
+<code class="descname">Get</code><span class="sig-paren">(</span><em>frag_pos</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_fragger_handle.html#FraggerHandle.Get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.FraggerHandle.Get" title="Permalink to this definition">¶</a></dt>
+<dd><p>Get fragger for sequence at index frag_pos..frag_pos+frag_length-1.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>frag_pos</strong> (<em>:class`int`</em>) &#8211; Start-index (note that sequence-indexing starts at 0)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A <code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code> object.</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.ValueError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">ValueError</span></code></a> if index out-of-bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.FraggerHandle.GetList">
+<code class="descname">GetList</code><span class="sig-paren">(</span><em>pos_start=0</em>, <em>pos_end=-1</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_fragger_handle.html#FraggerHandle.GetList"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.FraggerHandle.GetList" title="Permalink to this definition">¶</a></dt>
+<dd><p>Get List of fraggers covering sequence indices pos_start..pos_end.</p>
+<p>This will return an empty list if range is smaller than fragment_length.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>pos_start</strong> (<em>:class`int`</em>) &#8211; Start-index (note that sequence-indexing starts at 0)</li>
+<li><strong>pos_end</strong> (<em>:class`int`</em>) &#8211; End-index or -1 if it should go to the sequence-end.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code> objects.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.ValueError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">ValueError</span></code></a> if indices out-of-bounds.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.FraggerHandle.LoadCached">
+<code class="descname">LoadCached</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_fragger_handle.html#FraggerHandle.LoadCached"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.FraggerHandle.LoadCached" title="Permalink to this definition">¶</a></dt>
+<dd><p>Load fragger objects stored with <a class="reference internal" href="#promod3.modelling.FraggerHandle.SaveCached" title="promod3.modelling.FraggerHandle.SaveCached"><code class="xref py py-meth docutils literal"><span class="pre">SaveCached()</span></code></a>.
+Note that here we require that the same structure db is set as was
+used when <cite>filename</cite> was saved.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.FraggerHandle.SaveCached">
+<code class="descname">SaveCached</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_fragger_handle.html#FraggerHandle.SaveCached"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.FraggerHandle.SaveCached" title="Permalink to this definition">¶</a></dt>
+<dd><p>Save cached fraggers.</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.GenerateDeNovoTrajectories">
+<code class="descclassname">promod3.modelling.</code><code class="descname">GenerateDeNovoTrajectories</code><span class="sig-paren">(</span><em>sequence</em>, <em>num_trajectories=200</em>, <em>avg_sampling_per_position=600</em>, <em>profile=None</em>, <em>psipred_prediction=None</em>, <em>fragment_handler=None</em>, <em>scorer=None</em>, <em>scoring_weights=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_denovo.html#GenerateDeNovoTrajectories"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.GenerateDeNovoTrajectories" title="Permalink to this definition">¶</a></dt>
+<dd><p>Example de novo modelling pipeline based on Fragment sampling and
+backbone scoring. Take this as a starting point for more advanced
+de novo procedures.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; The sequence you want to sample</li>
+<li><strong>num_trajectories</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The number of sampling trajectories you
+want to generate</li>
+<li><strong>avg_sampling_per_position</strong> &#8211; Number of Monte Carlo sampling steps
+the total number is: 
+len(<strong>sequence</strong>) * <strong>avg_sampling_per_position</strong></li>
+<li><strong>profile</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code></a>) &#8211; The sequence profile for <strong>sequence</strong>. This increases the 
+fragment search performance.</li>
+<li><strong>psipred_prediction</strong> (<a class="reference internal" href="../loop/structure_db.html#promod3.loop.PsipredPrediction" title="promod3.loop.PsipredPrediction"><code class="xref py py-class docutils literal"><span class="pre">promod3.loop.PsipredPrediction</span></code></a>) &#8211; The psipred prediction for <strong>sequence</strong>. This
+increases the fragment search performance</li>
+<li><strong>fragment_handler</strong> (<a class="reference internal" href="#promod3.modelling.FraggerHandle" title="promod3.modelling.FraggerHandle"><code class="xref py py-class docutils literal"><span class="pre">promod3.modelling.FraggerHandle</span></code></a>) &#8211; You can provide already initialized fragments.
+If you pass this parameter, <strong>profile</strong> and
+<strong>psipred_prediction</strong> get neglected and do
+not influence the fragment search, the
+ones you initialized <strong>fragment_handler</strong> with
+get used instead.</li>
+<li><strong>scorer</strong> (<a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer" title="promod3.scoring.BackboneOverallScorer"><code class="xref py py-class docutils literal"><span class="pre">promod3.scoring.BackboneOverallScorer</span></code></a>) &#8211; Scorer doing the backbone scoring. If not provided, a 
+default one gets loaded with default objects with
+following keys: clash, reduced, cb_packing, hbond, cbeta, 
+torsion and pairwise</li>
+<li><strong>scoring_weights</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a>) &#8211; Linear weights for different scores. If not provided,
+the output of ScoringWeights.GetWeights() is used.
+Please note, that the weights must be consistent
+with the keys of the scores in <strong>scorer</strong></li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A <code class="xref py py-class docutils literal"><span class="pre">promod3.loop.LoopCandidates</span></code> object containing
+<strong>num_trajectories</strong> elements for further processing</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Modelling Algorithms</a><ul>
+<li><a class="reference internal" href="#rigid-blocks">Rigid Blocks</a></li>
+<li><a class="reference internal" href="#de-novo-modelling">De Novo Modelling</a></li>
+</ul>
+</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="docutils literal"><span class="pre">modelling</span></code> - Protein Modelling</a><ul>
+      <li>Previous: <a href="sidechain_reconstruction.html" title="previous chapter">Sidechain Reconstruction</a></li>
+      <li>Next: <a href="../sidechain/index.html" title="next chapter"><code class="docutils literal"><span class="pre">sidechain</span></code> - Sidechain Modelling</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/modelling/algorithms.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/modelling/algorithms.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/modelling/gap_handling.html b/doc/html/modelling/gap_handling.html
new file mode 100644
index 00000000..c992b14a
--- /dev/null
+++ b/doc/html/modelling/gap_handling.html
@@ -0,0 +1,671 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Handling Gaps &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="modelling - Protein Modelling" href="index.html" />
+    <link rel="next" title="Handling Loop Candidates" href="loop_candidates.html" />
+    <link rel="prev" title="Model Checking" href="model_checking.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="handling-gaps">
+<h1>Handling Gaps<a class="headerlink" href="#handling-gaps" title="Permalink to this headline">¶</a></h1>
+<p>This chapter describes the gap classes and functionality attached to them. These
+classes / functions are used within the modelling pipeline.</p>
+<div class="section" id="gap-classes">
+<h2>Gap classes<a class="headerlink" href="#gap-classes" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.modelling.StructuralGap">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">StructuralGap</code><span class="sig-paren">(</span><em>before</em>, <em>after</em>, <em>seq</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap" title="Permalink to this definition">¶</a></dt>
+<dd><p>Describes a structural gap, i.e. a loop to be modeled. The gap may either be
+terminal or between two defined regions. The gap stores information of the
+last residue before and the first residue after the gap as well as the
+sequence of gap. Gaps at the N- and C-terminals can be defined by passing
+invalid residue handles to <cite>before</cite> or <cite>after</cite>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>before</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Fills <a class="reference internal" href="#promod3.modelling.StructuralGap.before" title="promod3.modelling.StructuralGap.before"><code class="xref py py-attr docutils literal"><span class="pre">before</span></code></a></li>
+<li><strong>after</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Fills <a class="reference internal" href="#promod3.modelling.StructuralGap.after" title="promod3.modelling.StructuralGap.after"><code class="xref py py-attr docutils literal"><span class="pre">after</span></code></a></li>
+<li><strong>seq</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Fills <a class="reference internal" href="#promod3.modelling.StructuralGap.seq" title="promod3.modelling.StructuralGap.seq"><code class="xref py py-attr docutils literal"><span class="pre">seq</span></code></a></li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first">A <code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code> if both residues are invalid or when both
+are valid and:</p>
+<ul class="last simple">
+<li>residues are from different chains (if both valid)</li>
+<li><cite>before</cite> is located after <cite>after</cite></li>
+<li><cite>seq</cite> has a length which is inconsistent with the gap</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="method">
+<dt id="promod3.modelling.StructuralGap.GetChainIndex">
+<code class="descname">GetChainIndex</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.GetChainIndex" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Index of chain, the gap is belonging to</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.StructuralGap.GetChainName">
+<code class="descname">GetChainName</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.GetChainName" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Name of chain, the gap is belonging to</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.StructuralGap.GetChain">
+<code class="descname">GetChain</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.GetChain" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Chain, the gap is belonging to</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ChainHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ChainHandle</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.StructuralGap.IsNTerminal">
+<code class="descname">IsNTerminal</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.IsNTerminal" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, iff gap is N-terminal (i.e. <a class="reference internal" href="#promod3.modelling.StructuralGap.before" title="promod3.modelling.StructuralGap.before"><code class="xref py py-attr docutils literal"><span class="pre">before</span></code></a> is invalid
+and <a class="reference internal" href="#promod3.modelling.StructuralGap.after" title="promod3.modelling.StructuralGap.after"><code class="xref py py-attr docutils literal"><span class="pre">after</span></code></a> is valid)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.StructuralGap.IsCTerminal">
+<code class="descname">IsCTerminal</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.IsCTerminal" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, iff gap is C-terminal (i.e. <a class="reference internal" href="#promod3.modelling.StructuralGap.before" title="promod3.modelling.StructuralGap.before"><code class="xref py py-attr docutils literal"><span class="pre">before</span></code></a> is valid
+and <a class="reference internal" href="#promod3.modelling.StructuralGap.after" title="promod3.modelling.StructuralGap.after"><code class="xref py py-attr docutils literal"><span class="pre">after</span></code></a> is invalid)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.StructuralGap.IsTerminal">
+<code class="descname">IsTerminal</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.IsTerminal" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, iff gap is N- or C-terminal</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.StructuralGap.ShiftCTerminal">
+<code class="descname">ShiftCTerminal</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.ShiftCTerminal" title="Permalink to this definition">¶</a></dt>
+<dd><p>Try to shift gap by one position towards C-terminal. Only possible if new
+gap is not terminal and it doesn&#8217;t try to shift the gap past another gap.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, iff shift succeeded (gap is only updated in that case)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.StructuralGap.ExtendAtNTerm">
+<code class="descname">ExtendAtNTerm</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.ExtendAtNTerm" title="Permalink to this definition">¶</a></dt>
+<dd><p>Try to extend gap at N-terminal end of gap.
+Only possible if the gap is not at N-terminal and it doesn&#8217;t try to
+extend the gap past another gap.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, iff extend succeeded (gap is only updated in that case)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.StructuralGap.ExtendAtCTerm">
+<code class="descname">ExtendAtCTerm</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.ExtendAtCTerm" title="Permalink to this definition">¶</a></dt>
+<dd><p>Try to extend gap at C-terminal end of gap.
+Only possible if the gap is not at C-terminal and it doesn&#8217;t try to
+extend the gap past another gap.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, iff extend succeeded (gap is only updated in that case)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.StructuralGap.GetLength">
+<code class="descname">GetLength</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.GetLength" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Length of the gap.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.StructuralGap.Copy">
+<code class="descname">Copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.Copy" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Copy of the gap.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.StructuralGap.length">
+<code class="descname">length</code><a class="headerlink" href="#promod3.modelling.StructuralGap.length" title="Permalink to this definition">¶</a></dt>
+<dd><p>Alias for <a class="reference internal" href="#promod3.modelling.StructuralGap.GetLength" title="promod3.modelling.StructuralGap.GetLength"><code class="xref py py-meth docutils literal"><span class="pre">GetLength()</span></code></a> (read-only, <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>)</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.StructuralGap.seq">
+<code class="descname">seq</code><a class="headerlink" href="#promod3.modelling.StructuralGap.seq" title="Permalink to this definition">¶</a></dt>
+<dd><p>Sequence string for the gap (read-only, <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>)</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.StructuralGap.before">
+<code class="descname">before</code><a class="headerlink" href="#promod3.modelling.StructuralGap.before" title="Permalink to this definition">¶</a></dt>
+<dd><p>Residue before the gap (read-only, <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>)</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.StructuralGap.after">
+<code class="descname">after</code><a class="headerlink" href="#promod3.modelling.StructuralGap.after" title="Permalink to this definition">¶</a></dt>
+<dd><p>Residue after the gap (read-only, <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>)</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.StructuralGap.full_seq">
+<code class="descname">full_seq</code><a class="headerlink" href="#promod3.modelling.StructuralGap.full_seq" title="Permalink to this definition">¶</a></dt>
+<dd><p>Full sequence, including stem residues (read-only)</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.modelling.StructuralGapList">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">StructuralGapList</code><a class="headerlink" href="#promod3.modelling.StructuralGapList" title="Permalink to this definition">¶</a></dt>
+<dd><p>Represents a <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>.</p>
+</dd></dl>
+
+</div>
+<div class="section" id="gap-extender-classes">
+<h2>Gap Extender classes<a class="headerlink" href="#gap-extender-classes" title="Permalink to this headline">¶</a></h2>
+<p>The extender classes work on a given <a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a> and provide an
+Extend() function to propose new gaps for loop modelling. The function returns
+False if no new extension possible.</p>
+<dl class="class">
+<dt id="promod3.modelling.GapExtender">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">GapExtender</code><span class="sig-paren">(</span><em>gap</em>, <em>seqres</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.GapExtender" title="Permalink to this definition">¶</a></dt>
+<dd><p>The extender cycles through the following steps:</p>
+<div class="highlight-none"><div class="highlight"><pre>   -
+  --
+   --
+ ---
+  ---
+   ---
+----
+ ----
+  ----
+   ----
+</pre></div>
+</div>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>gap</strong> (<a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>) &#8211; The gap which will be extended by <a class="reference internal" href="#promod3.modelling.GapExtender.Extend" title="promod3.modelling.GapExtender.Extend"><code class="xref py py-meth docutils literal"><span class="pre">Extend()</span></code></a>.</li>
+<li><strong>seqres</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceHandle</span></code></a>) &#8211; The full sequence of the chain, the gap is associated with.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">An exception if a terminal gap is used to construct this.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="method">
+<dt id="promod3.modelling.GapExtender.Extend">
+<code class="descname">Extend</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.GapExtender.Extend" title="Permalink to this definition">¶</a></dt>
+<dd><p>Tries to extend <em>gap</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">False, if the <em>gap</em> cannot be extended any further. This happens
+if it reaches a terminal or another insertion gap.
+Otherwise, the <em>gap</em> passed to the constructor is changed.
+The gaps are extended with ascending length and will always have
+valid termini.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.modelling.FullGapExtender">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">FullGapExtender</code><span class="sig-paren">(</span><em>gap</em>, <em>seqres</em>, <em>max_length=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.FullGapExtender" title="Permalink to this definition">¶</a></dt>
+<dd><p>Cycles as GapExtender, but continues even if another gap was encountered.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>gap</strong> (<a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>) &#8211; The gap which will be extended by <a class="reference internal" href="#promod3.modelling.FullGapExtender.Extend" title="promod3.modelling.FullGapExtender.Extend"><code class="xref py py-meth docutils literal"><span class="pre">Extend()</span></code></a>.</li>
+<li><strong>seqres</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceHandle</span></code></a>) &#8211; The full sequence of the chain, the gap is associated with.</li>
+<li><strong>max_length</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; <ul>
+<li>If -1, all possible non-terminal gaps are returned.</li>
+<li>If &gt;= 0, this restricts the max. gap-length
+(w/o termini) producable by <a class="reference internal" href="#promod3.modelling.FullGapExtender.Extend" title="promod3.modelling.FullGapExtender.Extend"><code class="xref py py-meth docutils literal"><span class="pre">Extend()</span></code></a>.</li>
+</ul>
+</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">An exception if a terminal gap is used to construct this.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="method">
+<dt id="promod3.modelling.FullGapExtender.Extend">
+<code class="descname">Extend</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.FullGapExtender.Extend" title="Permalink to this definition">¶</a></dt>
+<dd><p>Tries to extend <em>gap</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">False, if the <em>gap</em> cannot be extended without exceeding <em>max_length</em>.
+Otherwise, the <em>gap</em> passed to the constructor is changed.
+The gaps are extended with ascending length and will always have
+valid termini.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.modelling.ScoringGapExtender">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">ScoringGapExtender</code><span class="sig-paren">(</span><em>gap</em>, <em>extension_penalty</em>, <em>penalties</em>, <em>seqres</em>, <em>max_length=-2</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringGapExtender" title="Permalink to this definition">¶</a></dt>
+<dd><p>The extender scores possible gap extensions and returns them in order of
+their score when <a class="reference internal" href="#promod3.modelling.ScoringGapExtender.Extend" title="promod3.modelling.ScoringGapExtender.Extend"><code class="xref py py-meth docutils literal"><span class="pre">Extend()</span></code></a> is called.
+The score is penalized according to length and according to certain (well
+conserved) regions in the structure as defined by <em>penalties</em>.
+score = num_gap_extensions * <cite>extension_penalty</cite> + sum( <cite>penalties</cite> [i] )
+(i = resnum - 1 of residues in extension)</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>gap</strong> (<a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>) &#8211; The gap which will be extended by <a class="reference internal" href="#promod3.modelling.ScoringGapExtender.Extend" title="promod3.modelling.ScoringGapExtender.Extend"><code class="xref py py-meth docutils literal"><span class="pre">Extend()</span></code></a>.</li>
+<li><strong>extension_penalty</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Penalty for length of gap.</li>
+<li><strong>penalties</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Penalty for each residue added to gap.</li>
+<li><strong>seqres</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceHandle</span></code></a>) &#8211; The full sequence of the chain, the gap is associated with.</li>
+<li><strong>max_length</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; <ul>
+<li>If -2, <a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><span class="pre">GapExtender</span></code></a> is used instead of <a class="reference internal" href="#promod3.modelling.FullGapExtender" title="promod3.modelling.FullGapExtender"><code class="xref py py-class docutils literal"><span class="pre">FullGapExtender</span></code></a>
+(i.e. it stops at gaps and termini).</li>
+<li>If -1, all possible non-terminal gaps are returned.</li>
+<li>If &gt;= 0, this restricts the max. gap-length (w/o termini)
+producable by <a class="reference internal" href="#promod3.modelling.ScoringGapExtender.Extend" title="promod3.modelling.ScoringGapExtender.Extend"><code class="xref py py-meth docutils literal"><span class="pre">Extend()</span></code></a>.</li>
+</ul>
+</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">An exception if a terminal gap is used to construct this.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="method">
+<dt id="promod3.modelling.ScoringGapExtender.Extend">
+<code class="descname">Extend</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringGapExtender.Extend" title="Permalink to this definition">¶</a></dt>
+<dd><p>Tries to extend <em>gap</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">False, if the gap cannot be extended any further.
+Otherwise, <em>gap</em> is changed and returned in ascending score.
+The updated <em>gap</em> will always have valid termini.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.modelling.ShiftExtension">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">ShiftExtension</code><span class="sig-paren">(</span><em>n_num</em>, <em>c_num</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ShiftExtension" title="Permalink to this definition">¶</a></dt>
+<dd><p>Implements the underlying extension scheme of the <a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><span class="pre">GapExtender</span></code></a>.
+It is not associated to any structural data, it just spits out the
+residue numbers according to the extension scheme described above.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>n_num</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; N residue number to start with</li>
+<li><strong>c_num</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; C residue number to start with</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="method">
+<dt id="promod3.modelling.ShiftExtension.Extend">
+<code class="descname">Extend</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ShiftExtension.Extend" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The next residue numbers for n_stem and c_stem</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">tuple</span></code></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="gap-handling-functions">
+<h2>Gap Handling Functions<a class="headerlink" href="#gap-handling-functions" title="Permalink to this headline">¶</a></h2>
+<dl class="function">
+<dt id="promod3.modelling.CountEnclosedGaps">
+<code class="descclassname">promod3.modelling.</code><code class="descname">CountEnclosedGaps</code><span class="sig-paren">(</span><em>mhandle</em>, <em>gap</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.CountEnclosedGaps" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.CountEnclosedInsertions">
+<code class="descclassname">promod3.modelling.</code><code class="descname">CountEnclosedInsertions</code><span class="sig-paren">(</span><em>mhandle</em>, <em>gap</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.CountEnclosedInsertions" title="Permalink to this definition">¶</a></dt>
+<dd><p>Counts all gaps from <cite>mhandle</cite> which are fully enclosed by given <cite>gap</cite>.
+This is either all gaps or only insertions.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="pipeline.html#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><strong>gap</strong> (<a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>) &#8211; Gap defining range in which gaps are to be removed.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Number of gaps.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.ClearGaps">
+<code class="descclassname">promod3.modelling.</code><code class="descname">ClearGaps</code><span class="sig-paren">(</span><em>mhandle</em>, <em>gap</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ClearGaps" title="Permalink to this definition">¶</a></dt>
+<dd><p>Removes all gaps from <cite>mhandle</cite> which are fully enclosed by given <cite>gap</cite>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="pipeline.html#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><strong>gap</strong> (<a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>) &#8211; Gap defining range in which gaps are to be removed.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Index of next gap in mhandle.gaps after removal.
+Returns -1 if last gap was removed or no gaps in <em>mhandle</em>.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">A <code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code> if any gap in mhandle.gaps is only partially
+enclosed by given gap.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.InsertLoopClearGaps">
+<code class="descclassname">promod3.modelling.</code><code class="descname">InsertLoopClearGaps</code><span class="sig-paren">(</span><em>mhandle</em>, <em>bb_list</em>, <em>gap</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.InsertLoopClearGaps" title="Permalink to this definition">¶</a></dt>
+<dd><p>Insert loop into model, update scoring environments and remove all gaps from
+<em>mhandle</em> which are fully enclosed by given <em>gap</em> (see <a class="reference internal" href="pipeline.html#promod3.modelling.InsertLoop" title="promod3.modelling.InsertLoop"><code class="xref py py-meth docutils literal"><span class="pre">InsertLoop()</span></code></a> and
+<a class="reference internal" href="#promod3.modelling.ClearGaps" title="promod3.modelling.ClearGaps"><code class="xref py py-meth docutils literal"><span class="pre">ClearGaps()</span></code></a>).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="pipeline.html#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><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"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to insert (backbone only).</li>
+<li><strong>gap</strong> (<a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>) &#8211; Gap defining range of loop to insert (must be consistent!).</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Index of next gap in mhandle.gaps after removal.
+Returns -1 if last gap was removed or no gaps in <em>mhandle</em>.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">A <code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code> if <em>bb_list</em> and <em>gap</em> are inconsistent or
+if any gap in mhandle.gaps is only partially enclosed by <em>gap</em>.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.MergeGaps">
+<code class="descclassname">promod3.modelling.</code><code class="descname">MergeGaps</code><span class="sig-paren">(</span><em>mhandle</em>, <em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.MergeGaps" title="Permalink to this definition">¶</a></dt>
+<dd><p>Merges two gaps <cite>mhandle.gaps[index]</cite> and <cite>mhandle.gaps[index+1]</cite>.
+The residues in between the gaps are removed from <cite>mhandle.model</cite> and added
+to the new <cite>mhandle.gaps[index]</cite>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="pipeline.html#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of gap to merge with next one.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">A <code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code> if indices out of range or if trying to merge
+gaps of different chains or an N-terminal gap with a C-terminal gap.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Handling Gaps</a><ul>
+<li><a class="reference internal" href="#gap-classes">Gap classes</a></li>
+<li><a class="reference internal" href="#gap-extender-classes">Gap Extender classes</a></li>
+<li><a class="reference internal" href="#gap-handling-functions">Gap Handling Functions</a></li>
+</ul>
+</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="docutils literal"><span class="pre">modelling</span></code> - Protein Modelling</a><ul>
+      <li>Previous: <a href="model_checking.html" title="previous chapter">Model Checking</a></li>
+      <li>Next: <a href="loop_candidates.html" title="next chapter">Handling Loop Candidates</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/modelling/gap_handling.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/modelling/gap_handling.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/modelling/index.html b/doc/html/modelling/index.html
index 7541f9ff..502211b8 100644
--- a/doc/html/modelling/index.html
+++ b/doc/html/modelling/index.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>modelling - Protein Modelling &mdash; ProMod3 0 documentation</title>
+    <title>modelling - Protein Modelling &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,9 +23,9 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="Documentation For Users" href="../users.html" />
-    <link rel="next" title="loop - Loop Modelling" href="../loop/index.html" />
+    <link rel="next" title="Modelling Pipeline" href="pipeline.html" />
     <link rel="prev" title="Building ProMod3" href="../buildsystem.html" />
    
   
@@ -41,23 +41,13 @@
             
   <div class="section" id="module-promod3.modelling">
 <span id="modelling-protein-modelling"></span><h1><a class="reference internal" href="#module-promod3.modelling" title="promod3.modelling: Protein Modelling"><code class="xref py py-mod docutils literal"><span class="pre">modelling</span></code></a> - Protein Modelling<a class="headerlink" href="#module-promod3.modelling" title="Permalink to this headline">¶</a></h1>
-<p>High-level functionality for protein modelling.
-Commonly, your input is a template structure and an alignment of the template to
-the desired target sequence.
-A protein homology modelling pipeline then has the following main steps:</p>
-<ul class="simple">
-<li>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"><span class="pre">BuildRawModel()</span></code></a> function)</li>
-<li>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"><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"><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"><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"><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"><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"><span class="pre">CloseLargeDeletions()</span></code></a>)</li>
-<li>Build sidechains (see <a class="reference internal" href="#promod3.modelling.BuildSidechains" title="promod3.modelling.BuildSidechains"><code class="xref py py-func docutils literal"><span class="pre">BuildSidechains()</span></code></a> function)</li>
-<li>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"><span class="pre">MinimizeModelEnergy()</span></code></a> function)</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"><span class="pre">BuildFromRawModel()</span></code></a> function. In its simplest form, one can run
-a full protein homology modelling pipeline as follows:</p>
+<p>High-level functionality for protein modelling. The goal is to model a given
+target sequence (or list of sequences for oligomers) given some template data.
+Commonly, the template does not cover the full target. This module offers
+capabilities to extract useful template data for the target and to fill the
+remaining structural data to create a full model of the target. In its simplest
+form, you can use a target-template alignment and a template structure to create
+a model fully automatically as follows:</p>
 <div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span>
 <span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">modelling</span>
 
@@ -72,1300 +62,58 @@ a full protein homology modelling pipeline as follows:</p>
 <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="s">&#39;model.pdb&#39;</span><span class="p">)</span>
 </pre></div>
 </div>
-<p>If you want to run and tweak the internal steps, you can start with the
-following code which is equivalent to the example above:</p>
-<div class="highlight-python" id="modelling-steps-example"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span>
-<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span>
-
-<span class="c"># 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="c"># 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="s">&#39;data/1crn_cut.pdb&#39;</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="s">&#39;data/1crn.fasta&#39;</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="c"># perform loop modelling to close all gaps</span>
-<span class="n">scorer</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">SetupBackboneScorer</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</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="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="n">scorer</span><span class="p">)</span>
-<span class="k">for</span> <span class="n">distance</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">merge_distance</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="n">distance</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">scorer</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="n">min_loops_required</span><span class="o">=-</span><span class="mi">1</span><span class="p">,</span>
-                                  <span class="n">max_res_extension</span><span class="o">=</span><span class="mi">6</span><span class="p">)</span>
-<span class="c"># if above fails, try DB-fill with less restrictions</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">scorer</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="n">min_loops_required</span><span class="o">=-</span><span class="mi">1</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">scorer</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="c"># if above fails on some gaps, use Monte Carlo</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">scorer</span><span class="p">,</span> <span class="n">torsion_sampler</span><span class="p">)</span>
-<span class="c"># as a last resort, try to close large deletions</span>
-<span class="n">modelling</span><span class="o">.</span><span class="n">CloseLargeDeletions</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">structure_db</span><span class="p">)</span>
-<span class="c"># 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">scorer</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="c"># 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="c"># 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="c"># 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="s">&#39;model.pdb&#39;</span><span class="p">)</span>
-</pre></div>
-</div>
-<p>In the default pipeline above, we call <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal"><span class="pre">FillLoopsByDatabase()</span></code></a> multiple
-times. First, we try to close &#8220;easy&#8221; gaps which require few extensions (we wish
-to limit the damage we do on the template) and for which we have plenty of loop
-candidates. If some gaps cannot be closed like this, we try less restrictive
-options. This approach is helpful if neighboring gaps are close together and the
-one closer to the C-terminus is easier to close. Several variants of the
-pipeline were evaluated on 1752 target-template-pairs and this one worked best.</p>
-<div class="section" id="modelling-pipeline">
-<h2>Modelling Pipeline<a class="headerlink" href="#modelling-pipeline" title="Permalink to this headline">¶</a></h2>
-<dl class="function">
-<dt id="promod3.modelling.BuildRawModel">
-<code class="descclassname">promod3.modelling.</code><code class="descname">BuildRawModel</code><span class="sig-paren">(</span><em>aln</em>, <em>include_ligands=False</em>, <em>chain_names=            &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz&quot;</em>, <em>spdbv_style=False</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="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">EntityView</span></code></a> attached.</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>Selenium methionine residues are converted to methionine</li>
-<li>Side chains which contain all atoms of the parent amino acid, e.g.
-phosphoserine are copied as a whole with the modifications stripped off.</li>
-</ul>
-</div></blockquote>
-<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"><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>
-<p>Note, that this class is used in SWISS-MODEL and hence, legacy code must be
-preserved.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>aln</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/seq/base/seq/#ost.seq.AlignmentHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">AlignmentHandle</span></code></a> / <code class="xref py py-class docutils literal"><span class="pre">AlignmentList</span></code>) &#8211; Single alignment handle for raw model with single chain or
-list of alignment handles for raw model with multiple chains.</li>
-<li><strong>include_ligands</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True, if we wish to include ligands in the model.</li>
-<li><strong>chain_names</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Chains are named by a single chanacter taken from this.</li>
-<li><strong>spdbv_style</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True, if we need a model in the old SPDBV style.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Raw (pseudo) model from the alignment.</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a></p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first">A <code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code> when:</p>
-<ul class="last simple">
-<li>the alignments do not have two sequences</li>
-<li>the second sequence does not have an attached structure</li>
-<li>the residues of the template structure do not match with the
-alignment sequence (note that you can set an &#8220;offset&#8221; (see
-<a class="reference external" href="http://www.openstructure.org/docs/1.3/seq/base/seq/#ost.seq.AlignmentHandle.SetSequenceOffset" title="(in OpenStructure v1.3.3)"><code class="xref py py-meth docutils literal"><span class="pre">SetSequenceOffset()</span></code></a>) for the
-template sequence (but not for the target))</li>
-<li>the target sequence has a non-zero offset (cannot be honored as
-the resulting model will always start its residue numbering at 1)</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.BuildFromRawModel">
-<code class="descclassname">promod3.modelling.</code><code class="descname">BuildFromRawModel</code><span class="sig-paren">(</span><em>mhandle</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_pipeline.html#BuildFromRawModel"><span class="viewcode-link">[source]</span></a><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"><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>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>If the function fails to close all gaps, it will produce a warning and
-return an incomplete model.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; The prepared template coordinates loaded with the input
-alignment.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Delivers the model as an OST entity.</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">Entity</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.BuildSidechains">
-<code class="descclassname">promod3.modelling.</code><code class="descname">BuildSidechains</code><span class="sig-paren">(</span><em>mhandle</em>, <em>merge_distance=4</em>, <em>scorer=None</em>, <em>fragment_db=None</em>, <em>structure_db=None</em>, <em>torsion_sampler=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_pipeline.html#BuildSidechains"><span class="viewcode-link">[source]</span></a><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/index.html#promod3.sidechain.Reconstruct" title="promod3.sidechain.Reconstruct"><code class="xref py py-func docutils literal"><span class="pre">promod3.sidechain.Reconstruct()</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"><span class="pre">FillLoopsByDatabase()</span></code></a> with <em>ring_punch_detection=2</em>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
-<li><strong>merge_distance</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Used as parameter for <a class="reference internal" href="#promod3.modelling.MergeGapsByDistance" title="promod3.modelling.MergeGapsByDistance"><code class="xref py py-func docutils literal"><span class="pre">MergeGapsByDistance()</span></code></a>
-if ring punches are found.</li>
-<li><strong>scorer</strong> (<a class="reference internal" href="../loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>) &#8211; Used as parameter for <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal"><span class="pre">FillLoopsByDatabase()</span></code></a>
-if ring punches are found. A default one is created
-if None.</li>
-<li><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"><span class="pre">FragDB</span></code></a>) &#8211; Used as parameter for <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal"><span class="pre">FillLoopsByDatabase()</span></code></a>
-if ring punches are found. A default one is loaded
-if None.</li>
-<li><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"><span class="pre">StructureDB</span></code></a>) &#8211; Used as parameter for <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal"><span class="pre">FillLoopsByDatabase()</span></code></a>
-if ring punches are found. A default one is loaded
-if None.</li>
-<li><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"><span class="pre">TorsionSampler</span></code></a>) &#8211; Used as parameter for <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal"><span class="pre">FillLoopsByDatabase()</span></code></a>
-if ring punches are found. A default one is loaded
-if None.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.MinimizeModelEnergy">
-<code class="descclassname">promod3.modelling.</code><code class="descname">MinimizeModelEnergy</code><span class="sig-paren">(</span><em>mhandle</em>, <em>max_iterations=12</em>, <em>max_iter_sd=20</em>, <em>max_iter_lbfgs=10</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_pipeline.html#MinimizeModelEnergy"><span class="viewcode-link">[source]</span></a><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 <code class="xref py py-mod docutils literal"><span class="pre">ost.mol.mm</span></code> to perform energy minimization.
-It will iteratively (at most <em>max_iterations</em> times):</p>
-<ul class="simple">
-<li>run up to <em>max_iter_sd</em> minimization iter. of a steepest descend method</li>
-<li>run up to <em>max_iter_lbfgs</em> minimization iter. of a Limited-memory 
-Broyden-Fletcher-Goldfarb-Shanno method</li>
-<li>abort if no stereochemical problems found</li>
-</ul>
-<p>The idea is that we don&#8217;t want to minimize &#8220;too much&#8221;. 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"><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>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
-<li><strong>max_iterations</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Max. number of iterations for SD+LBFGS</li>
-<li><strong>max_iter_sd</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Max. number of iterations within SD method</li>
-<li><strong>max_iter_lbfgs</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Max. number of iterations within LBFGS method</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.CheckFinalModel">
-<code class="descclassname">promod3.modelling.</code><code class="descname">CheckFinalModel</code><span class="sig-paren">(</span><em>mhandle</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_pipeline.html#CheckFinalModel"><span class="viewcode-link">[source]</span></a><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>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle for which to perform checks.</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</div>
-<div class="section" id="closing-gaps">
-<h2>Closing Gaps<a class="headerlink" href="#closing-gaps" title="Permalink to this headline">¶</a></h2>
-<dl class="function">
-<dt id="promod3.modelling.SetupBackboneScorer">
-<code class="descclassname">promod3.modelling.</code><code class="descname">SetupBackboneScorer</code><span class="sig-paren">(</span><em>mhandle</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#SetupBackboneScorer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.SetupBackboneScorer" title="Permalink to this definition">¶</a></dt>
-<dd><p>Get a scorer for medling with backbones.</p>
-<p>This one is already tailored towards a certain modelling job.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; The modelling handle this scorer should be dedicated to.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A scorer instance.</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="../loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.CloseSmallDeletions">
-<code class="descclassname">promod3.modelling.</code><code class="descname">CloseSmallDeletions</code><span class="sig-paren">(</span><em>mhandle</em>, <em>scorer</em>, <em>max_extension=9</em>, <em>clash_thresh=1.0</em>, <em>e_thresh=200</em>, <em>use_scoring_extender=True</em>, <em>use_full_extender=True</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#CloseSmallDeletions"><span class="viewcode-link">[source]</span></a><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"><span class="pre">mhandle.gaps</span></code>.</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">modelling</span>
-
-<span class="c"># 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="s">&#39;data/gly.pdb&#39;</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="s">&#39;trg&#39;</span><span class="p">,</span> <span class="s">&#39;GGG-GGG&#39;</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="s">&#39;tpl&#39;</span><span class="p">,</span> <span class="s">&#39;GGGAGGG&#39;</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="c"># close small deletion</span>
-<span class="k">print</span> <span class="s">&#39;Number of gaps before: </span><span class="si">%d</span><span class="s">&#39;</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">scorer</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">SetupBackboneScorer</span><span class="p">(</span><span class="n">mhandle</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="n">scorer</span><span class="p">)</span>
-<span class="k">print</span> <span class="s">&#39;Number of gaps after: </span><span class="si">%d</span><span class="s">&#39;</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>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
-<li><strong>scorer</strong> (<a class="reference internal" href="../loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>) &#8211; A scorer dedicated to this model.
-If gaps are closed, the <em>scorer</em> is updated.</li>
-<li><strong>max_extension</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Maximal number of gap extension steps to perform
-(see <a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><span class="pre">GapExtender</span></code></a>)</li>
-<li><strong>clash_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Threshold for the clash score, acceptance means being
-lower than this.</li>
-<li><strong>e_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Potential energy should be lower than this.</li>
-<li><strong>use_scoring_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True = use <a class="reference internal" href="#promod3.modelling.ScoringGapExtender" title="promod3.modelling.ScoringGapExtender"><code class="xref py py-class docutils literal"><span class="pre">ScoringGapExtender</span></code></a> instead
-of <a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><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"><span class="pre">BuildRawModel()</span></code></a> is
-called (e.g. with <a class="reference external" href="http://www.openstructure.org/docs/1.3/bindings/dssp/#module-ost.bindings.dssp" title="(in OpenStructure v1.3.3)"><code class="xref py py-mod docutils literal"><span class="pre">ost.bindings.dssp</span></code></a>).</li>
-<li><strong>use_full_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True = use <a class="reference internal" href="#promod3.modelling.FullGapExtender" title="promod3.modelling.FullGapExtender"><code class="xref py py-class docutils literal"><span class="pre">FullGapExtender</span></code></a> instead of
-of <a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><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.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.RemoveTerminalGaps">
-<code class="descclassname">promod3.modelling.</code><code class="descname">RemoveTerminalGaps</code><span class="sig-paren">(</span><em>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>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Number of gaps which were removed.</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.MergeGapsByDistance">
-<code class="descclassname">promod3.modelling.</code><code class="descname">MergeGapsByDistance</code><span class="sig-paren">(</span><em>mhandle</em>, <em>distance</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#MergeGapsByDistance"><span class="viewcode-link">[source]</span></a><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-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">modelling</span>
-
-<span class="c"># 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="s">&#39;data/1crn_cut.pdb&#39;</span><span class="p">)</span>
-<span class="n">seq_trg</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEAICATGYTCIIIPGATCPGDYAN&#39;</span>
-<span class="n">seq_tpl</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEA----G--CIIIPGATCPGDYAN&#39;</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="s">&#39;trg&#39;</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="s">&#39;tpl&#39;</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="c"># merge gaps</span>
-<span class="k">print</span> <span class="s">&#39;Number of gaps before: </span><span class="si">%d</span><span class="s">&#39;</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="k">print</span> <span class="s">&#39;Number of gaps after: </span><span class="si">%d</span><span class="s">&#39;</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>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
-<li><strong>distance</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The max. no. of residues between two gaps up to which
-merge happens.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.FillLoopsByDatabase">
-<code class="descclassname">promod3.modelling.</code><code class="descname">FillLoopsByDatabase</code><span class="sig-paren">(</span><em>mhandle</em>, <em>scorer</em>, <em>fragment_db</em>, <em>structure_db</em>, <em>torsion_sampler</em>, <em>max_loops_to_search=40</em>, <em>min_loops_required=4</em>, <em>max_res_extension=-1</em>, <em>extended_search=True</em>, <em>use_scoring_extender=True</em>, <em>use_full_extender=True</em>, <em>score_variant=0</em>, <em>ring_punch_detection=1</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#FillLoopsByDatabase"><span class="viewcode-link">[source]</span></a><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-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span>
-
-<span class="c"># 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="s">&#39;data/1crn_cut.pdb&#39;</span><span class="p">)</span>
-<span class="n">seq_trg</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEAICATYTGCIIIPGATCPGDYAN&#39;</span>
-<span class="n">seq_tpl</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEA------GCIIIPGATCPGDYAN&#39;</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="s">&#39;trg&#39;</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="s">&#39;tpl&#39;</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="c"># merge gaps</span>
-<span class="k">print</span> <span class="s">&#39;Number of gaps before: </span><span class="si">%d</span><span class="s">&#39;</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">scorer</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">SetupBackboneScorer</span><span class="p">(</span><span class="n">mhandle</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">scorer</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="k">print</span> <span class="s">&#39;Number of gaps after: </span><span class="si">%d</span><span class="s">&#39;</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>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
-<li><strong>scorer</strong> (<a class="reference internal" href="../loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>) &#8211; A scorer dedicated to this model.
-If gaps are closed, the <em>scorer</em> is updated.</li>
-<li><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"><span class="pre">FragDB</span></code></a>) &#8211; A fragment database coupled to the <em>structure_db</em>.</li>
-<li><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"><span class="pre">StructureDB</span></code></a>) &#8211; Backbone/ profile data.</li>
-<li><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"><span class="pre">TorsionSampler</span></code></a>) &#8211; A sampler for torsion angles.</li>
-<li><strong>max_loops_to_search</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Define how many candidates are &#8216;enough&#8217; to be
-evaluated per loop. The actual found candidates
-may be more (if we found &#8216;enough&#8217;) or less (if
-not enough candidates exist) of this number.</li>
-<li><strong>min_loops_required</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; 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"><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.</li>
-<li><strong>max_res_extension</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; 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).</li>
-<li><strong>extended_search</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True = more loop candidates are considered.
-The candidate search is done less precisely (see
-<a class="reference internal" href="../loop/helper_classes.html#promod3.loop.LoopCandidates.FillFromDatabase" title="promod3.loop.LoopCandidates.FillFromDatabase"><code class="xref py py-meth docutils literal"><span class="pre">FillFromDatabase()</span></code></a>).
-The candidates are still scored and evaluated the
-same though (only more of them considered).</li>
-<li><strong>use_scoring_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True = use <a class="reference internal" href="#promod3.modelling.ScoringGapExtender" title="promod3.modelling.ScoringGapExtender"><code class="xref py py-class docutils literal"><span class="pre">ScoringGapExtender</span></code></a> instead
-of <a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><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"><span class="pre">CloseSmallDeletions()</span></code></a>.</li>
-<li><strong>use_full_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True = use <a class="reference internal" href="#promod3.modelling.FullGapExtender" title="promod3.modelling.FullGapExtender"><code class="xref py py-class docutils literal"><span class="pre">FullGapExtender</span></code></a> instead of
-<a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><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"><span class="pre">CloseSmallDeletions()</span></code></a>.</li>
-<li><strong>score_variant</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; <p>How to score loop candidates. Options:</p>
+<p>The various steps involved in protein modelling are described here:</p>
+<div class="toctree-wrapper compound">
 <ul>
-<li><strong>0</strong>: put frame of backbone residues enclosing all
-candidates and score frame. This will also &#8220;score&#8221;
-non-modelled residues!</li>
-<li><strong>1</strong>: score candidates directly</li>
-<li><strong>2</strong>: like <strong>1</strong> but penalize length of candidate</li>
+<li class="toctree-l1"><a class="reference internal" href="pipeline.html">Modelling Pipeline</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="pipeline.html#build-raw-modelling-handle">Build Raw Modelling Handle</a></li>
+<li class="toctree-l2"><a class="reference internal" href="pipeline.html#the-default-pipeline">The Default Pipeline</a></li>
+<li class="toctree-l2"><a class="reference internal" href="pipeline.html#modelling-steps">Modelling Steps</a></li>
 </ul>
 </li>
-<li><strong>ring_punch_detection</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; <p>How to deal with ring punchings. Options:</p>
-<ul>
-<li><strong>0</strong>: not at all (fastest)</li>
-<li><strong>1</strong>: check for punchings with existing rings</li>
-<li><strong>2</strong>: check incl. sidechain for loop cand.</li>
+<li class="toctree-l1"><a class="reference internal" href="model_checking.html">Model Checking</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="model_checking.html#detecting-ring-punches">Detecting Ring Punches</a></li>
+<li class="toctree-l2"><a class="reference internal" href="model_checking.html#model-checking-with-molprobity">Model Checking With MolProbity</a></li>
 </ul>
 </li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.FillLoopsByMonteCarlo">
-<code class="descclassname">promod3.modelling.</code><code class="descname">FillLoopsByMonteCarlo</code><span class="sig-paren">(</span><em>mhandle</em>, <em>scorer</em>, <em>torsion_sampler</em>, <em>max_loops_to_search=6</em>, <em>max_extension=30</em>, <em>mc_num_loops=2</em>, <em>mc_steps=5000</em>, <em>use_scoring_extender=True</em>, <em>use_full_extender=True</em>, <em>score_variant=0</em>, <em>ring_punch_detection=1</em>, <em>fragger_handles=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#FillLoopsByMonteCarlo"><span class="viewcode-link">[source]</span></a><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 &#8220;last-resort&#8221; 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"><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"><span class="pre">Fragger</span></code></a> lists. The latter
-is only used if the gap length is &gt;= the length of fragments stored.</p>
-<p>This function cannot fill gaps at C- or N-terminal.</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span>
-
-<span class="c"># 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="s">&#39;data/1crn_cut.pdb&#39;</span><span class="p">)</span>
-<span class="n">seq_trg</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEAICATYTGCIIIPGATCPGDYAN&#39;</span>
-<span class="n">seq_tpl</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEA------GCIIIPGATCPGDYAN&#39;</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="s">&#39;trg&#39;</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="s">&#39;tpl&#39;</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="c"># merge gaps</span>
-<span class="k">print</span> <span class="s">&#39;Number of gaps before: </span><span class="si">%d</span><span class="s">&#39;</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">scorer</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">SetupBackboneScorer</span><span class="p">(</span><span class="n">mhandle</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">scorer</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="k">print</span> <span class="s">&#39;Number of gaps after: </span><span class="si">%d</span><span class="s">&#39;</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>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
-<li><strong>scorer</strong> (<a class="reference internal" href="../loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>) &#8211; A scorer dedicated to this model.
-If gaps are closed, the <em>scorer</em> is updated.</li>
-<li><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"><span class="pre">TorsionSampler</span></code></a>) &#8211; A sampler for torsion angles.</li>
-<li><strong>max_loops_to_search</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Define how many candidates are &#8216;enough&#8217; to be
-evaluated per loop.</li>
-<li><strong>max_extension</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Maximal number of gap extension steps to perform
-(see <a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><span class="pre">GapExtender</span></code></a>)</li>
-<li><strong>mc_num_loops</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of loop candidates to consider for each extended gap
-(see <a class="reference internal" href="../loop/helper_classes.html#promod3.loop.LoopCandidates.FillFromMonteCarloSampler" title="promod3.loop.LoopCandidates.FillFromMonteCarloSampler"><code class="xref py py-meth docutils literal"><span class="pre">FillFromMonteCarloSampler()</span></code></a>)</li>
-<li><strong>mc_steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of MC steps to perform for each loop candidate
-(see <a class="reference internal" href="../loop/helper_classes.html#promod3.loop.LoopCandidates.FillFromMonteCarloSampler" title="promod3.loop.LoopCandidates.FillFromMonteCarloSampler"><code class="xref py py-meth docutils literal"><span class="pre">FillFromMonteCarloSampler()</span></code></a>)</li>
-<li><strong>use_scoring_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True = use <a class="reference internal" href="#promod3.modelling.ScoringGapExtender" title="promod3.modelling.ScoringGapExtender"><code class="xref py py-class docutils literal"><span class="pre">ScoringGapExtender</span></code></a> instead
-of <a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><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"><span class="pre">CloseSmallDeletions()</span></code></a>.</li>
-<li><strong>use_full_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True = use <a class="reference internal" href="#promod3.modelling.FullGapExtender" title="promod3.modelling.FullGapExtender"><code class="xref py py-class docutils literal"><span class="pre">FullGapExtender</span></code></a> instead of
-<a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><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"><span class="pre">CloseSmallDeletions()</span></code></a>.</li>
-<li><strong>score_variant</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; How to score loop candidates.
-See <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal"><span class="pre">FillLoopsByDatabase()</span></code></a>.</li>
-<li><strong>ring_punch_detection</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; 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"><span class="pre">FillLoopsByDatabase()</span></code></a>.</li>
-<li><strong>fragger_handles</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference internal" href="../loop/structure_db.html#promod3.loop.FraggerHandle" title="promod3.loop.FraggerHandle"><code class="xref py py-class docutils literal"><span class="pre">FraggerHandle</span></code></a>) &#8211; Either None (no fragger sampling used) or one
-fragger handle for each chain in <em>mhandle</em>.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.ModelTermini">
-<code class="descclassname">promod3.modelling.</code><code class="descname">ModelTermini</code><span class="sig-paren">(</span><em>mhandle</em>, <em>scorer</em>, <em>torsion_sampler</em>, <em>fragger_handles=None</em>, <em>mc_num_loops=20</em>, <em>mc_steps=5000</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#ModelTermini"><span class="viewcode-link">[source]</span></a><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"><span class="pre">Fragger</span></code></a> lists. The latter
-is only used if the gap length is &gt;= the length of fragments stored.</p>
-<p>Terminal gaps of length 1 are ignored by this function!</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span>
-
-<span class="c"># 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="s">&#39;data/gly.pdb&#39;</span><span class="p">)</span>
-<span class="n">seq_trg</span> <span class="o">=</span> <span class="s">&#39;AAAAGGGGGGGGGGGGGGGGGGGGAAAAAA&#39;</span>
-<span class="n">seq_tpl</span> <span class="o">=</span> <span class="s">&#39;----GGGGGGGGGGGGGGGGGGGG------&#39;</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="s">&#39;trg&#39;</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="s">&#39;tpl&#39;</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="c"># merge gaps</span>
-<span class="k">print</span> <span class="s">&#39;Number of gaps before: </span><span class="si">%d</span><span class="s">&#39;</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">scorer</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">SetupBackboneScorer</span><span class="p">(</span><span class="n">mhandle</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">scorer</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="k">print</span> <span class="s">&#39;Number of gaps after: </span><span class="si">%d</span><span class="s">&#39;</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>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
-<li><strong>scorer</strong> (<a class="reference internal" href="../loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>) &#8211; A scorer dedicated to this model.
-If gaps are closed, the <em>scorer</em> is updated.</li>
-<li><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"><span class="pre">TorsionSampler</span></code></a>) &#8211; A sampler for torsion angles.</li>
-<li><strong>fragger_handles</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference internal" href="../loop/structure_db.html#promod3.loop.FraggerHandle" title="promod3.loop.FraggerHandle"><code class="xref py py-class docutils literal"><span class="pre">FraggerHandle</span></code></a>) &#8211; Either None (no fragger sampling used) or one
-fragger handle for each chain in <em>mhandle</em>.</li>
-<li><strong>mc_num_loops</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of loop candidates to consider for each terminal gap
-(see <a class="reference internal" href="../loop/helper_classes.html#promod3.loop.LoopCandidates.FillFromMonteCarloSampler" title="promod3.loop.LoopCandidates.FillFromMonteCarloSampler"><code class="xref py py-meth docutils literal"><span class="pre">FillFromMonteCarloSampler()</span></code></a>)</li>
-<li><strong>mc_steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of MC steps to perform for each loop candidate
-(see <a class="reference internal" href="../loop/helper_classes.html#promod3.loop.LoopCandidates.FillFromMonteCarloSampler" title="promod3.loop.LoopCandidates.FillFromMonteCarloSampler"><code class="xref py py-meth docutils literal"><span class="pre">FillFromMonteCarloSampler()</span></code></a>)</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.CloseLargeDeletions">
-<code class="descclassname">promod3.modelling.</code><code class="descname">CloseLargeDeletions</code><span class="sig-paren">(</span><em>mhandle</em>, <em>scorer</em>, <em>structure_db</em>, <em>linker_length=8</em>, <em>num_fragments=500</em>, <em>use_scoring_extender=True</em>, <em>use_full_extender=True</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#CloseLargeDeletions"><span class="viewcode-link">[source]</span></a><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 &#8220;last-resort&#8221; 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>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
-<li><strong>scorer</strong> (<a class="reference internal" href="../loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>) &#8211; A scorer dedicated to this model.
-If gaps are closed, the <em>scorer</em> is updated.</li>
-<li><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"><span class="pre">StructureDB</span></code></a>) &#8211; The database from which to extract fragments for
-the linker region.</li>
-<li><strong>linker_length</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Desired length (in residues w/o stems) for the
-linker. This may be shorter if extender cannot
-extend further.</li>
-<li><strong>num_fragments</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of fragments to sample the linker.</li>
-<li><strong>use_scoring_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True = use <a class="reference internal" href="#promod3.modelling.ScoringGapExtender" title="promod3.modelling.ScoringGapExtender"><code class="xref py py-class docutils literal"><span class="pre">ScoringGapExtender</span></code></a> instead
-of <a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><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"><span class="pre">CloseSmallDeletions()</span></code></a>.</li>
-<li><strong>use_full_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True = use <a class="reference internal" href="#promod3.modelling.FullGapExtender" title="promod3.modelling.FullGapExtender"><code class="xref py py-class docutils literal"><span class="pre">FullGapExtender</span></code></a> instead of
-<a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><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"><span class="pre">CloseSmallDeletions()</span></code></a>.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.CountEnclosedGaps">
-<code class="descclassname">promod3.modelling.</code><code class="descname">CountEnclosedGaps</code><span class="sig-paren">(</span><em>mhandle</em>, <em>gap</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.CountEnclosedGaps" title="Permalink to this definition">¶</a></dt>
-<dt id="promod3.modelling.CountEnclosedInsertions">
-<code class="descclassname">promod3.modelling.</code><code class="descname">CountEnclosedInsertions</code><span class="sig-paren">(</span><em>mhandle</em>, <em>gap</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.CountEnclosedInsertions" title="Permalink to this definition">¶</a></dt>
-<dd><p>Counts all gaps from <cite>mhandle</cite> which are fully enclosed by given <cite>gap</cite>.
-This is either all gaps or only insertions.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
-<li><strong>gap</strong> (<a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>) &#8211; Gap defining range in which gaps are to be removed.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Number of gaps.</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.ClearGaps">
-<code class="descclassname">promod3.modelling.</code><code class="descname">ClearGaps</code><span class="sig-paren">(</span><em>mhandle</em>, <em>gap</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ClearGaps" title="Permalink to this definition">¶</a></dt>
-<dd><p>Removes all gaps from <cite>mhandle</cite> which are fully enclosed by given <cite>gap</cite>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
-<li><strong>gap</strong> (<a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>) &#8211; Gap defining range in which gaps are to be removed.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Index of next gap in mhandle.gaps after removal.
-Returns -1 if last gap was removed or no gaps in <em>mhandle</em>.</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">A <code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code> if any gap in mhandle.gaps is only partially
-enclosed by given gap.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.MergeGaps">
-<code class="descclassname">promod3.modelling.</code><code class="descname">MergeGaps</code><span class="sig-paren">(</span><em>mhandle</em>, <em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.MergeGaps" title="Permalink to this definition">¶</a></dt>
-<dd><p>Merges two gaps <cite>mhandle.gaps[index]</cite> and <cite>mhandle.gaps[index+1]</cite>.
-The residues in between the gaps are removed from <cite>mhandle.model</cite> and added
-to the new <cite>mhandle.gaps[index]</cite>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
-<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of gap to merge with next one.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">A <code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code> if indices out of range or if trying to merge
-gaps of different chains or an N-terminal gap with a C-terminal gap.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</div>
-<div class="section" id="modelling-handle-class">
-<h2>Modelling Handle class<a class="headerlink" href="#modelling-handle-class" title="Permalink to this headline">¶</a></h2>
-<dl class="class">
-<dt id="promod3.modelling.ModellingHandle">
-<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="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"><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="descname">model</code><a class="headerlink" href="#promod3.modelling.ModellingHandle.model" title="Permalink to this definition">¶</a></dt>
-<dd><p>The resulting model.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">EntityHandle</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.modelling.ModellingHandle.gaps">
-<code class="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>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference internal" href="#promod3.modelling.StructuralGapList" title="promod3.modelling.StructuralGapList"><code class="xref py py-class docutils literal"><span class="pre">StructuralGapList</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.modelling.ModellingHandle.seqres">
-<code class="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="http://www.openstructure.org/docs/1.3/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">SequenceHandle</span></code></a> for each chain
-of target protein.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/1.3/seq/base/seq/#ost.seq.SequenceList" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">SequenceList</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-</div>
-<div class="section" id="gap-classes">
-<h2>Gap classes<a class="headerlink" href="#gap-classes" title="Permalink to this headline">¶</a></h2>
-<dl class="class">
-<dt id="promod3.modelling.StructuralGap">
-<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">StructuralGap</code><span class="sig-paren">(</span><em>before</em>, <em>after</em>, <em>seq</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap" title="Permalink to this definition">¶</a></dt>
-<dd><p>Describes a structural gap, i.e. a loop to be modeled. The gap may either be
-terminal or between two defined regions. The gap stores information of the
-last residue before and the first residue after the gap as well as the
-sequence of gap. Gaps at the N- and C-terminals can be defined by passing
-invalid residue handles to <cite>before</cite> or <cite>after</cite>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>before</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Fills <a class="reference internal" href="#promod3.modelling.StructuralGap.before" title="promod3.modelling.StructuralGap.before"><code class="xref py py-attr docutils literal"><span class="pre">before</span></code></a></li>
-<li><strong>after</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Fills <a class="reference internal" href="#promod3.modelling.StructuralGap.after" title="promod3.modelling.StructuralGap.after"><code class="xref py py-attr docutils literal"><span class="pre">after</span></code></a></li>
-<li><strong>seq</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Fills <a class="reference internal" href="#promod3.modelling.StructuralGap.seq" title="promod3.modelling.StructuralGap.seq"><code class="xref py py-attr docutils literal"><span class="pre">seq</span></code></a></li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first">A <code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code> if both residues are invalid or when both
-are valid and:</p>
-<ul class="last simple">
-<li>residues are from different chains (if both valid)</li>
-<li><cite>before</cite> is located after <cite>after</cite></li>
-<li><cite>seq</cite> has a length which is inconsistent with the gap</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-<dl class="method">
-<dt id="promod3.modelling.StructuralGap.GetChainIndex">
-<code class="descname">GetChainIndex</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.GetChainIndex" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Index of chain, the gap is belonging to</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.modelling.StructuralGap.GetChainName">
-<code class="descname">GetChainName</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.GetChainName" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Name of chain, the gap is belonging to</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.modelling.StructuralGap.GetChain">
-<code class="descname">GetChain</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.GetChain" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Chain, the gap is belonging to</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ChainHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ChainHandle</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.modelling.StructuralGap.IsNTerminal">
-<code class="descname">IsNTerminal</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.IsNTerminal" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, iff gap is N-terminal (i.e. <a class="reference internal" href="#promod3.modelling.StructuralGap.before" title="promod3.modelling.StructuralGap.before"><code class="xref py py-attr docutils literal"><span class="pre">before</span></code></a> is invalid
-and <a class="reference internal" href="#promod3.modelling.StructuralGap.after" title="promod3.modelling.StructuralGap.after"><code class="xref py py-attr docutils literal"><span class="pre">after</span></code></a> is valid)</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.modelling.StructuralGap.IsCTerminal">
-<code class="descname">IsCTerminal</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.IsCTerminal" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, iff gap is C-terminal (i.e. <a class="reference internal" href="#promod3.modelling.StructuralGap.before" title="promod3.modelling.StructuralGap.before"><code class="xref py py-attr docutils literal"><span class="pre">before</span></code></a> is valid
-and <a class="reference internal" href="#promod3.modelling.StructuralGap.after" title="promod3.modelling.StructuralGap.after"><code class="xref py py-attr docutils literal"><span class="pre">after</span></code></a> is invalid)</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.modelling.StructuralGap.IsTerminal">
-<code class="descname">IsTerminal</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.IsTerminal" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, iff gap is N- or C-terminal</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.modelling.StructuralGap.ShiftCTerminal">
-<code class="descname">ShiftCTerminal</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.ShiftCTerminal" title="Permalink to this definition">¶</a></dt>
-<dd><p>Try to shift gap by one position towards C-terminal. Only possible if new
-gap is not terminal and it doesn&#8217;t try to shift the gap past another gap.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, iff shift succeeded (gap is only updated in that case)</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.modelling.StructuralGap.ExtendAtNTerm">
-<code class="descname">ExtendAtNTerm</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.ExtendAtNTerm" title="Permalink to this definition">¶</a></dt>
-<dd><p>Try to extend gap at N-terminal end of gap.
-Only possible if the gap is not at N-terminal and it doesn&#8217;t try to
-extend the gap past another gap.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, iff extend succeeded (gap is only updated in that case)</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.modelling.StructuralGap.ExtendAtCTerm">
-<code class="descname">ExtendAtCTerm</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.ExtendAtCTerm" title="Permalink to this definition">¶</a></dt>
-<dd><p>Try to extend gap at C-terminal end of gap.
-Only possible if the gap is not at C-terminal and it doesn&#8217;t try to
-extend the gap past another gap.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, iff extend succeeded (gap is only updated in that case)</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.modelling.StructuralGap.GetLength">
-<code class="descname">GetLength</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.GetLength" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Length of the gap.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.modelling.StructuralGap.Copy">
-<code class="descname">Copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.StructuralGap.Copy" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Copy of the gap.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.modelling.StructuralGap.length">
-<code class="descname">length</code><a class="headerlink" href="#promod3.modelling.StructuralGap.length" title="Permalink to this definition">¶</a></dt>
-<dd><p>Alias for <a class="reference internal" href="#promod3.modelling.StructuralGap.GetLength" title="promod3.modelling.StructuralGap.GetLength"><code class="xref py py-meth docutils literal"><span class="pre">GetLength()</span></code></a> (read-only, <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>)</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.modelling.StructuralGap.seq">
-<code class="descname">seq</code><a class="headerlink" href="#promod3.modelling.StructuralGap.seq" title="Permalink to this definition">¶</a></dt>
-<dd><p>Sequence string for the gap (read-only, <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>)</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.modelling.StructuralGap.before">
-<code class="descname">before</code><a class="headerlink" href="#promod3.modelling.StructuralGap.before" title="Permalink to this definition">¶</a></dt>
-<dd><p>Residue before the gap (read-only, <a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>)</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.modelling.StructuralGap.after">
-<code class="descname">after</code><a class="headerlink" href="#promod3.modelling.StructuralGap.after" title="Permalink to this definition">¶</a></dt>
-<dd><p>Residue after the gap (read-only, <a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>)</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="promod3.modelling.StructuralGap.full_seq">
-<code class="descname">full_seq</code><a class="headerlink" href="#promod3.modelling.StructuralGap.full_seq" title="Permalink to this definition">¶</a></dt>
-<dd><p>Full sequence, including stem residues (read-only)</p>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="class">
-<dt id="promod3.modelling.StructuralGapList">
-<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">StructuralGapList</code><a class="headerlink" href="#promod3.modelling.StructuralGapList" title="Permalink to this definition">¶</a></dt>
-<dd><p>Represents a <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>.</p>
-</dd></dl>
-
-</div>
-<div class="section" id="gap-extender-classes">
-<h2>Gap Extender classes<a class="headerlink" href="#gap-extender-classes" title="Permalink to this headline">¶</a></h2>
-<p>The extender classes work on a given <a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a> and provide an
-Extend() function to propose new gaps for loop modelling. The function returns
-False if no new extension possible.</p>
-<dl class="class">
-<dt id="promod3.modelling.GapExtender">
-<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">GapExtender</code><span class="sig-paren">(</span><em>gap</em>, <em>seqres</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.GapExtender" title="Permalink to this definition">¶</a></dt>
-<dd><p>The extender cycles through the following steps:</p>
-<div class="highlight-none"><div class="highlight"><pre>   -
-  --
-   --
- ---
-  ---
-   ---
-----
- ----
-  ----
-   ----
-</pre></div>
-</div>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>gap</strong> (<a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>) &#8211; The gap which will be extended by <a class="reference internal" href="#promod3.modelling.GapExtender.Extend" title="promod3.modelling.GapExtender.Extend"><code class="xref py py-meth docutils literal"><span class="pre">Extend()</span></code></a>.</li>
-<li><strong>seqres</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/1.3/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceHandle</span></code></a>) &#8211; The full sequence of the chain, the gap is associated with.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">An exception if a terminal gap is used to construct this.</p>
-</td>
-</tr>
-</tbody>
-</table>
-<dl class="method">
-<dt id="promod3.modelling.GapExtender.Extend">
-<code class="descname">Extend</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.GapExtender.Extend" title="Permalink to this definition">¶</a></dt>
-<dd><p>Tries to extend <em>gap</em>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">False, if the <em>gap</em> cannot be extended any further. This happens
-if it reaches a terminal or another insertion gap.
-Otherwise, the <em>gap</em> passed to the constructor is changed.
-The gaps are extended with ascending length and will always have
-valid termini.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="class">
-<dt id="promod3.modelling.FullGapExtender">
-<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">FullGapExtender</code><span class="sig-paren">(</span><em>gap</em>, <em>seqres</em>, <em>max_length=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.FullGapExtender" title="Permalink to this definition">¶</a></dt>
-<dd><p>Cycles as GapExtender, but continues even if another gap was encountered.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>gap</strong> (<a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>) &#8211; The gap which will be extended by <a class="reference internal" href="#promod3.modelling.FullGapExtender.Extend" title="promod3.modelling.FullGapExtender.Extend"><code class="xref py py-meth docutils literal"><span class="pre">Extend()</span></code></a>.</li>
-<li><strong>seqres</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/1.3/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceHandle</span></code></a>) &#8211; The full sequence of the chain, the gap is associated with.</li>
-<li><strong>max_length</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; <ul>
-<li>If -1, all possible non-terminal gaps are returned.</li>
-<li>If &gt;= 0, this restricts the max. gap-length
-(w/o termini) producable by <a class="reference internal" href="#promod3.modelling.FullGapExtender.Extend" title="promod3.modelling.FullGapExtender.Extend"><code class="xref py py-meth docutils literal"><span class="pre">Extend()</span></code></a>.</li>
+<li class="toctree-l1"><a class="reference internal" href="gap_handling.html">Handling Gaps</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="gap_handling.html#gap-classes">Gap classes</a></li>
+<li class="toctree-l2"><a class="reference internal" href="gap_handling.html#gap-extender-classes">Gap Extender classes</a></li>
+<li class="toctree-l2"><a class="reference internal" href="gap_handling.html#gap-handling-functions">Gap Handling Functions</a></li>
 </ul>
 </li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">An exception if a terminal gap is used to construct this.</p>
-</td>
-</tr>
-</tbody>
-</table>
-<dl class="method">
-<dt id="promod3.modelling.FullGapExtender.Extend">
-<code class="descname">Extend</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.FullGapExtender.Extend" title="Permalink to this definition">¶</a></dt>
-<dd><p>Tries to extend <em>gap</em>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">False, if the <em>gap</em> cannot be extended without exceeding <em>max_length</em>.
-Otherwise, the <em>gap</em> passed to the constructor is changed.
-The gaps are extended with ascending length and will always have
-valid termini.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="class">
-<dt id="promod3.modelling.ScoringGapExtender">
-<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">ScoringGapExtender</code><span class="sig-paren">(</span><em>gap</em>, <em>extension_penalty</em>, <em>penalties</em>, <em>seqres</em>, <em>max_length=-2</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringGapExtender" title="Permalink to this definition">¶</a></dt>
-<dd><p>The extender scores possible gap extensions and returns them in order of
-their score when <a class="reference internal" href="#promod3.modelling.ScoringGapExtender.Extend" title="promod3.modelling.ScoringGapExtender.Extend"><code class="xref py py-meth docutils literal"><span class="pre">Extend()</span></code></a> is called.
-The score is penalized according to length and according to certain (well
-conserved) regions in the structure as defined by <em>penalties</em>.
-score = num_gap_extensions * <cite>extension_penalty</cite> + sum( <cite>penalties</cite> [i] )
-(i = resnum - 1 of residues in extension)</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>gap</strong> (<a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>) &#8211; The gap which will be extended by <a class="reference internal" href="#promod3.modelling.ScoringGapExtender.Extend" title="promod3.modelling.ScoringGapExtender.Extend"><code class="xref py py-meth docutils literal"><span class="pre">Extend()</span></code></a>.</li>
-<li><strong>extension_penalty</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Penalty for length of gap.</li>
-<li><strong>penalties</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Penalty for each residue added to gap.</li>
-<li><strong>seqres</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/1.3/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceHandle</span></code></a>) &#8211; The full sequence of the chain, the gap is associated with.</li>
-<li><strong>max_length</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; <ul>
-<li>If -2, <a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><span class="pre">GapExtender</span></code></a> is used instead of <a class="reference internal" href="#promod3.modelling.FullGapExtender" title="promod3.modelling.FullGapExtender"><code class="xref py py-class docutils literal"><span class="pre">FullGapExtender</span></code></a>
-(i.e. it stops at gaps and termini).</li>
-<li>If -1, all possible non-terminal gaps are returned.</li>
-<li>If &gt;= 0, this restricts the max. gap-length (w/o termini)
-producable by <a class="reference internal" href="#promod3.modelling.ScoringGapExtender.Extend" title="promod3.modelling.ScoringGapExtender.Extend"><code class="xref py py-meth docutils literal"><span class="pre">Extend()</span></code></a>.</li>
+<li class="toctree-l1"><a class="reference internal" href="loop_candidates.html">Handling Loop Candidates</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="loop_candidates.html#the-loopcandidates-class">The LoopCandidates class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loop_candidates.html#keeping-track-of-loop-candidate-scores">Keeping track of loop candidate scores</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loop_candidates.html#example-loop-scoring-in-modelling">Example: loop scoring in modelling</a></li>
 </ul>
 </li>
+<li class="toctree-l1"><a class="reference internal" href="loop_closing.html">Fitting Loops Into Gaps</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="loop_closing.html#ccd">CCD</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loop_closing.html#kic">KIC</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loop_closing.html#relaxing-backbones">Relaxing Backbones</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loop_closing.html#relaxing-all-atom-loops">Relaxing All Atom Loops</a></li>
 </ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">An exception if a terminal gap is used to construct this.</p>
-</td>
-</tr>
-</tbody>
-</table>
-<dl class="method">
-<dt id="promod3.modelling.ScoringGapExtender.Extend">
-<code class="descname">Extend</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringGapExtender.Extend" title="Permalink to this definition">¶</a></dt>
-<dd><p>Tries to extend <em>gap</em>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">False, if the gap cannot be extended any further.
-Otherwise, <em>gap</em> is changed and returned in ascending score.
-The updated <em>gap</em> will always have valid termini.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="class">
-<dt id="promod3.modelling.ShiftExtension">
-<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">ShiftExtension</code><span class="sig-paren">(</span><em>n_num</em>, <em>c_num</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ShiftExtension" title="Permalink to this definition">¶</a></dt>
-<dd><p>Implements the underlying extension scheme of the <a class="reference internal" href="#promod3.modelling.GapExtender" title="promod3.modelling.GapExtender"><code class="xref py py-class docutils literal"><span class="pre">GapExtender</span></code></a>.
-It is not associated to any structural data, it just spits out the
-residue numbers according to the extension scheme described above.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n_num</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; N residue number to start with</li>
-<li><strong>c_num</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; C residue number to start with</li>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="monte_carlo.html">Generating Loops De Novo</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="monte_carlo.html#sampler-object">Sampler Object</a></li>
+<li class="toctree-l2"><a class="reference internal" href="monte_carlo.html#closer-object">Closer Object</a></li>
+<li class="toctree-l2"><a class="reference internal" href="monte_carlo.html#scorer-object">Scorer Object</a></li>
+<li class="toctree-l2"><a class="reference internal" href="monte_carlo.html#cooler-object">Cooler Object</a></li>
 </ul>
-</td>
-</tr>
-</tbody>
-</table>
-<dl class="method">
-<dt id="promod3.modelling.ShiftExtension.Extend">
-<code class="descname">Extend</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ShiftExtension.Extend" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The next residue numbers for n_stem and c_stem</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">tuple</span></code></td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-</div>
-<div class="section" id="detecting-ring-punches">
-<h2>Detecting ring punches<a class="headerlink" href="#detecting-ring-punches" title="Permalink to this headline">¶</a></h2>
-<dl class="function">
-<dt id="promod3.modelling.GetRings">
-<code class="descclassname">promod3.modelling.</code><code class="descname">GetRings</code><span class="sig-paren">(</span><em>ent</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_ring_punches.html#GetRings"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.GetRings" title="Permalink to this definition">¶</a></dt>
-<dd><p>Get rings for a protein structure.
-A ring is only added if all ring-atoms exist or if it is a proline and
-three of the atoms exist (center and radii are estimated then).</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ent</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">EntityHandle</span></code></a> or <a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">EntityView</span></code></a>) &#8211; Structure for which to detect rings.</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of rings to perform ring checks. Each ring is a named
-tuple with:
-center (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>),
-plane (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/composite/#ost.geom.Plane" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">Plane</span></code></a>),
-radius (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>),
-residue (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ResidueHandle</span></code></a>).</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.GetRingPunches">
-<code class="descclassname">promod3.modelling.</code><code class="descname">GetRingPunches</code><span class="sig-paren">(</span><em>rings</em>, <em>ent</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_ring_punches.html#GetRingPunches"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.GetRingPunches" title="Permalink to this definition">¶</a></dt>
-<dd><p>Get list of residues with rings that are punched by the given structure.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>rings</strong> &#8211; List of rings as provided by <a class="reference internal" href="#promod3.modelling.GetRings" title="promod3.modelling.GetRings"><code class="xref py py-func docutils literal"><span class="pre">GetRings()</span></code></a>.</li>
-<li><strong>ent</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">EntityHandle</span></code></a> or <a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">EntityView</span></code></a>) &#8211; Structure for which to detect punches.</li>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="sidechain_reconstruction.html">Sidechain Reconstruction</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="sidechain_reconstruction.html#reconstruct-function">Reconstruct Function</a></li>
+<li class="toctree-l2"><a class="reference internal" href="sidechain_reconstruction.html#sidechainreconstructor-class">SidechainReconstructor Class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="sidechain_reconstruction.html#the-sidechainreconstructiondata-class">The SidechainReconstructionData class</a></li>
 </ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of residues (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ResidueHandle</span></code></a>) which
-have a punched ring.</p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.HasRingPunches">
-<code class="descclassname">promod3.modelling.</code><code class="descname">HasRingPunches</code><span class="sig-paren">(</span><em>rings</em>, <em>ent</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_ring_punches.html#HasRingPunches"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.HasRingPunches" title="Permalink to this definition">¶</a></dt>
-<dd><p>Check if any ring is punched by the given structure.
-This check is faster than using <a class="reference internal" href="#promod3.modelling.GetRingPunches" title="promod3.modelling.GetRingPunches"><code class="xref py py-func docutils literal"><span class="pre">GetRingPunches()</span></code></a>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>rings</strong> &#8211; List of rings as provided by <a class="reference internal" href="#promod3.modelling.GetRings" title="promod3.modelling.GetRings"><code class="xref py py-func docutils literal"><span class="pre">GetRings()</span></code></a>.</li>
-<li><strong>ent</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">EntityHandle</span></code></a> or <a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">EntityView</span></code></a>) &#8211; Structure for which to detect punches.</li>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="algorithms.html">Modelling Algorithms</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="algorithms.html#rigid-blocks">Rigid Blocks</a></li>
+<li class="toctree-l2"><a class="reference internal" href="algorithms.html#de-novo-modelling">De Novo Modelling</a></li>
 </ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True, iff any ring is punched</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.FilterCandidates">
-<code class="descclassname">promod3.modelling.</code><code class="descname">FilterCandidates</code><span class="sig-paren">(</span><em>candidates</em>, <em>model</em>, <em>gap</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_ring_punches.html#FilterCandidates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.FilterCandidates" title="Permalink to this definition">¶</a></dt>
-<dd><p>Remove loop candidates if they cause ring punches.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>candidates</strong> (<a class="reference internal" href="../loop/helper_classes.html#promod3.loop.LoopCandidates" title="promod3.loop.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a>) &#8211; Loop candidates meant to fill <em>gap</em> within <em>model</em>.
-Offending candidates are removed from this list.</li>
-<li><strong>model</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">EntityHandle</span></code></a>) &#8211; Model for which loop is to be filled.</li>
-<li><strong>gap</strong> (<a class="reference internal" href="#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>.) &#8211; Gap for which loop is to be filled.</li>
+</li>
 </ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="function">
-<dt id="promod3.modelling.FilterCandidatesWithSC">
-<code class="descclassname">promod3.modelling.</code><code class="descname">FilterCandidatesWithSC</code><span class="sig-paren">(</span><em>candidates</em>, <em>model</em>, <em>gap</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_ring_punches.html#FilterCandidatesWithSC"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.FilterCandidatesWithSC" title="Permalink to this definition">¶</a></dt>
-<dd><p>Remove loop candidates if they (with sidechain) cause ring punches.
-See <a class="reference internal" href="#promod3.modelling.FilterCandidates" title="promod3.modelling.FilterCandidates"><code class="xref py py-func docutils literal"><span class="pre">FilterCandidates()</span></code></a>.</p>
-</dd></dl>
-
 </div>
 </div>
 
@@ -1374,26 +122,13 @@ See <a class="reference internal" href="#promod3.modelling.FilterCandidates" tit
         </div>
       </div>
       <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
-        <div class="sphinxsidebarwrapper">
-  <h3><a href="../index.html">Table Of Contents</a></h3>
-  <ul>
-<li><a class="reference internal" href="#"><code class="docutils literal"><span class="pre">modelling</span></code> - Protein Modelling</a><ul>
-<li><a class="reference internal" href="#modelling-pipeline">Modelling Pipeline</a></li>
-<li><a class="reference internal" href="#closing-gaps">Closing Gaps</a></li>
-<li><a class="reference internal" href="#modelling-handle-class">Modelling Handle class</a></li>
-<li><a class="reference internal" href="#gap-classes">Gap classes</a></li>
-<li><a class="reference internal" href="#gap-extender-classes">Gap Extender classes</a></li>
-<li><a class="reference internal" href="#detecting-ring-punches">Detecting ring punches</a></li>
-</ul>
-</li>
-</ul>
-<div class="relations">
+        <div class="sphinxsidebarwrapper"><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>Previous: <a href="../buildsystem.html" title="previous chapter">Building ProMod3</a></li>
-      <li>Next: <a href="../loop/index.html" title="next chapter"><code class="docutils literal"><span class="pre">loop</span></code> - Loop Modelling</a></li>
+      <li>Next: <a href="pipeline.html" title="next chapter">Modelling Pipeline</a></li>
   </ul></li>
   </ul></li>
 </ul>
@@ -1423,7 +158,7 @@ See <a class="reference internal" href="#promod3.modelling.FilterCandidates" tit
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/modelling/loop_candidates.html b/doc/html/modelling/loop_candidates.html
new file mode 100644
index 00000000..12cd6c27
--- /dev/null
+++ b/doc/html/modelling/loop_candidates.html
@@ -0,0 +1,1123 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Handling Loop Candidates &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="modelling - Protein Modelling" href="index.html" />
+    <link rel="next" title="Fitting Loops Into Gaps" href="loop_closing.html" />
+    <link rel="prev" title="Handling Gaps" href="gap_handling.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="handling-loop-candidates">
+<h1>Handling Loop Candidates<a class="headerlink" href="#handling-loop-candidates" title="Permalink to this headline">¶</a></h1>
+<p>For convenience, we provide the <a class="reference internal" href="#promod3.modelling.LoopCandidates" title="promod3.modelling.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a> class as a container of
+loop candidates with consistent length and sequence among them. It can either be
+filled manually or generated using static filling functions using the
+functionality from the <a class="reference internal" href="../loop/structure_db.html#promod3.loop.FragDB" title="promod3.loop.FragDB"><code class="xref py py-class docutils literal"><span class="pre">FragDB</span></code></a> or Monte Carlo algorithms.
+Once it contains candidates you can apply closing, scoring or clustering
+algorithms on all loop candidates. Example:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span><span class="p">,</span> <span class="n">scoring</span><span class="p">,</span> <span class="n">modelling</span>
+
+<span class="c"># let&#39;s load a crambin structure from the pdb</span>
+<span class="n">crambin</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="s">&#39;data/1CRN.pdb&#39;</span><span class="p">)</span>
+<span class="n">SEQRES</span> <span class="o">=</span> <span class="s">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">r</span><span class="o">.</span><span class="n">one_letter_code</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">crambin</span><span class="o">.</span><span class="n">residues</span><span class="p">])</span>
+
+<span class="c"># this is the sequence we want to remodel</span>
+<span class="n">loop_seq</span> <span class="o">=</span> <span class="n">SEQRES</span><span class="p">[</span><span class="mi">23</span><span class="p">:</span><span class="mi">31</span><span class="p">]</span>
+
+<span class="c"># let&#39;s define the stem residues</span>
+<span class="n">n_stem</span> <span class="o">=</span> <span class="n">crambin</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="mi">23</span><span class="p">]</span>
+<span class="n">c_stem</span> <span class="o">=</span> <span class="n">crambin</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="mi">30</span><span class="p">]</span>
+
+<span class="c"># we use the StructureDB as source for structural information</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="c"># the FragDB allows to access the StructureDB based on geometric </span>
+<span class="c"># features of the loop stem residue</span>
+<span class="n">frag_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="c"># the LoopCandidates allow to handle several loops at once</span>
+<span class="c"># we directly want to find potential loop candidates from the</span>
+<span class="c"># previously loaded databases</span>
+<span class="n">loop_candidates</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">LoopCandidates</span><span class="o">.</span><span class="n">FillFromDatabase</span><span class="p">(</span>\
+                    <span class="n">n_stem</span><span class="p">,</span> <span class="n">c_stem</span><span class="p">,</span> <span class="n">loop_seq</span><span class="p">,</span> <span class="n">frag_db</span><span class="p">,</span> <span class="n">structure_db</span><span class="p">)</span>
+
+<span class="c"># candidates usually don&#39;t match exactly the required stem coords.</span>
+<span class="c"># CCD (Cyclic Coordinate Descent) is one way to enforce this match.</span>
+<span class="n">loop_candidates</span><span class="o">.</span><span class="n">ApplyCCD</span><span class="p">(</span><span class="n">n_stem</span><span class="p">,</span> <span class="n">c_stem</span><span class="p">)</span>
+
+<span class="c"># setup backbone scorer with clash and cbeta scoring</span>
+<span class="n">score_env</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">BackboneScoreEnv</span><span class="p">(</span><span class="n">SEQRES</span><span class="p">)</span>
+<span class="n">score_env</span><span class="o">.</span><span class="n">SetInitialEnvironment</span><span class="p">(</span><span class="n">crambin</span><span class="p">)</span>
+<span class="n">scorer</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">BackboneOverallScorer</span><span class="p">()</span>
+<span class="n">scorer</span><span class="p">[</span><span class="s">&quot;cbeta&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">LoadCBetaScorer</span><span class="p">()</span>
+<span class="n">scorer</span><span class="p">[</span><span class="s">&quot;clash&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">ClashScorer</span><span class="p">()</span>
+<span class="n">scorer</span><span class="o">.</span><span class="n">AttachEnvironment</span><span class="p">(</span><span class="n">score_env</span><span class="p">)</span>
+
+<span class="c"># the scorer can then be used on the LoopCandidates object to</span>
+<span class="c"># calculate desired scores (here: cbeta &amp; clash, start resnum = 24)</span>
+<span class="n">bb_scores</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">ScoreContainer</span><span class="p">()</span>
+<span class="n">loop_candidates</span><span class="o">.</span><span class="n">CalculateBackboneScores</span><span class="p">(</span><span class="n">bb_scores</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span>
+                                        <span class="p">[</span><span class="s">&quot;cbeta&quot;</span><span class="p">,</span> <span class="s">&quot;clash&quot;</span><span class="p">],</span> <span class="mi">24</span><span class="p">)</span>
+<span class="c"># we finally perform a weighted linear combination of the scores,</span>
+<span class="c"># pick the best one, insert it into our structure and save it</span>
+<span class="n">weights</span> <span class="o">=</span> <span class="p">{</span><span class="s">&quot;cbeta&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s">&quot;clash&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">}</span>
+<span class="n">scores</span> <span class="o">=</span> <span class="n">bb_scores</span><span class="o">.</span><span class="n">LinearCombine</span><span class="p">(</span><span class="n">weights</span><span class="p">)</span>
+<span class="n">min_score</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="n">scores</span><span class="p">)</span>
+<span class="n">min_candidate</span> <span class="o">=</span> <span class="n">scores</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="n">min_score</span><span class="p">)</span>
+<span class="n">bb_list</span> <span class="o">=</span> <span class="n">loop_candidates</span><span class="p">[</span><span class="n">min_candidate</span><span class="p">]</span>
+<span class="n">bb_list</span><span class="o">.</span><span class="n">InsertInto</span><span class="p">(</span><span class="n">crambin</span><span class="o">.</span><span class="n">chains</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">n_stem</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">())</span>
+<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">crambin</span><span class="p">,</span> <span class="s">&quot;modified_crambin.pdb&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="section" id="the-loopcandidates-class">
+<h2>The LoopCandidates class<a class="headerlink" href="#the-loopcandidates-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.modelling.LoopCandidates">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">LoopCandidates</code><span class="sig-paren">(</span><em>seq</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates" title="Permalink to this definition">¶</a></dt>
+<dd><p>Initializes an empty container of loop candidates.</p>
+<p>Candidates can be accessed and iterated as if it was a <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of
+<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>seq</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; The sequence being enforced for all candidates</td>
+</tr>
+</tbody>
+</table>
+<dl class="staticmethod">
+<dt id="promod3.modelling.LoopCandidates.FillFromDatabase">
+<em class="property">static </em><code class="descname">FillFromDatabase</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>seq</em>, <em>frag_db</em>, <em>structural_db</em>, <em>extended_search=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.FillFromDatabase" title="Permalink to this definition">¶</a></dt>
+<dd><p>Searches for loop candidates matching the length (number of residues in
+<em>seq</em>) and geometry (of <em>n_stem</em> and <em>c_stem</em>) of the loop to be modelled in
+a fragment database.</p>
+<p>This call also adds fragment infos (<a class="reference internal" href="#promod3.modelling.LoopCandidates.HasFragmentInfos" title="promod3.modelling.LoopCandidates.HasFragmentInfos"><code class="xref py py-meth docutils literal"><span class="pre">HasFragmentInfos()</span></code></a> will be True).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; The residue at the N-terminal end of the loop</li>
+<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; The residue at the C-terminal end of the loop</li>
+<li><strong>seq</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; The sequence of residues to be added including the
+<em>n_stem</em> and <em>c_stem</em></li>
+<li><strong>frag_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"><span class="pre">FragDB</span></code></a>) &#8211; The fragment database</li>
+<li><strong>structural_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"><span class="pre">StructureDB</span></code></a>) &#8211; The according structural database</li>
+<li><strong>extended_search</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether search should be extended to fragments
+matching the geometry of the <em>n_stem</em> and <em>c_stem</em>
+a bit less precisely.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A list of loop candidates</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.modelling.LoopCandidates" title="promod3.modelling.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if stems do no contain N, CA and C
+atoms.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.modelling.LoopCandidates.FillFromMonteCarloSampler">
+<em class="property">static </em><code class="descname">FillFromMonteCarloSampler</code><span class="sig-paren">(</span><em>seq</em>, <em>num_loops</em>, <em>steps</em>, <em>sampler</em>, <em>closer</em>, <em>scorer</em>, <em>cooler</em>, <em>random_seed=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.FillFromMonteCarloSampler" title="Permalink to this definition">¶</a></dt>
+<dt>
+<em class="property">static </em><code class="descname">FillFromMonteCarloSampler</code><span class="sig-paren">(</span><em>initial_bb</em>, <em>seq</em>, <em>num_loops</em>, <em>steps</em>, <em>sampler</em>, <em>closer</em>, <em>scorer</em>, <em>cooler</em>, <em>random_seed=0</em><span class="sig-paren">)</span></dt>
+<dd><p>Uses Monte Carlo simulated annealing to sample the loop to be modelled.
+If <em>initial_bb</em> is given, every Monte Carlo run starts from that configuration.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>initial_bb</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Initial configuration used for the sampling</li>
+<li><strong>seq</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; The sequence of residues to be sampled</li>
+<li><strong>num_loops</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of loop candidates to return</li>
+<li><strong>steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of MC steps to perform for each loop candidate
+generated</li>
+<li><strong>sampler</strong> (<a class="reference internal" href="monte_carlo.html#mc-sampler-object"><span>Sampler Object</span></a>) &#8211; Used to generate a new configuration at each MC step</li>
+<li><strong>closer</strong> (<a class="reference internal" href="monte_carlo.html#mc-closer-object"><span>Closer Object</span></a>) &#8211; Used to close the loop after each MC step</li>
+<li><strong>scorer</strong> (<a class="reference internal" href="monte_carlo.html#mc-scorer-object"><span>Scorer Object</span></a>) &#8211; Used to score the generated configurations at each MC step</li>
+<li><strong>cooler</strong> (<a class="reference internal" href="monte_carlo.html#mc-cooler-object"><span>Cooler Object</span></a>) &#8211; Controls the temperature profile of the simulated annealing</li>
+<li><strong>random_seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Seed to feed the random number generator for
+accepting/rejecting proposed monte carlo steps.
+For every monte carlo run, the random number generator
+gets refreshed and this seed gets increased by 1.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The resulting candidates</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.modelling.LoopCandidates" title="promod3.modelling.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a>, if <em>initial_bb</em> is not given and
+the Monte Carlo sampler failed to initialize (i.e. stems are too
+far apart) or if <em>initial_bb</em> is given and it is inconsistent with
+<em>seq</em>.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.GetSequence">
+<code class="descname">GetSequence</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.GetSequence" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The Sequence</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.ApplyCCD">
+<code class="descname">ApplyCCD</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>max_iterations=1000</em>, <em>rmsd_cutoff=0.1</em>, <em>keep_non_converged=false</em>, <em>random_seed=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.ApplyCCD" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">ApplyCCD</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>torsion_sampler</em>, <em>max_iterations=1000</em>, <em>rmsd_cutoff=0.1</em>, <em>keep_non_converged=false</em>, <em>random_seed=0</em><span class="sig-paren">)</span></dt>
+<dt>
+<code class="descname">ApplyCCD</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>torsion_samplers</em>, <em>max_iterations=1000</em>, <em>rmsd_cutoff=0.1</em>, <em>keep_non_converged=false</em>, <em>random_seed=0</em><span class="sig-paren">)</span></dt>
+<dd><p>Closes all loop candidates in this container using the CCD algorithm (i.e.
+modifies the candidates so that its stem residues match those of <em>n_stem</em>
+and <em>c_stem</em>). CCD (cyclic coordinate descent, see <a class="reference internal" href="loop_closing.html#promod3.modelling.CCD" title="promod3.modelling.CCD"><code class="xref py py-class docutils literal"><span class="pre">CCD</span></code></a>) is an
+iterative minimization algorithm.</p>
+<p>If <em>torsion_sampler</em> is given, it is used at each step of the closing to
+calculate the probability of the proposed move, which is then accepted or
+not depending on a metropolis criterium.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the n-stem positions every candidate
+should match. See <a class="reference internal" href="loop_closing.html#promod3.modelling.CCD.CCD" title="promod3.modelling.CCD.CCD"><code class="xref py py-meth docutils literal"><span class="pre">CCD()</span></code></a>.</li>
+<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the c-stem positions every candidate
+should match. See <a class="reference internal" href="loop_closing.html#promod3.modelling.CCD.CCD" title="promod3.modelling.CCD.CCD"><code class="xref py py-meth docutils literal"><span class="pre">CCD()</span></code></a>.</li>
+<li><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"><span class="pre">TorsionSampler</span></code></a> / <code class="xref py py-class docutils literal"><span class="pre">list</span></code>
+of <a class="reference internal" href="../loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; A torsion sampler (used for all residues) or a list
+of samplers (one per residue).</li>
+<li><strong>max_iterations</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Maximum number of iterations</li>
+<li><strong>rmsd_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Cutoff in stem residue RMSD used to determine
+convergence</li>
+<li><strong>keep_non_converged</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether to keep loop candidates for which the
+closing did not converge</li>
+<li><strong>random_seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; seed for random number generator used to
+accept/reject moves in CCD algorithm</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">An index for each kept candidate corresponding to the candidate
+index before this function was called. This is useful to keep track
+of scores and other data extracted before.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.ApplyKIC">
+<code class="descname">ApplyKIC</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>pivot_one</em>, <em>pivot_two</em>, <em>pivot_three</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.ApplyKIC" title="Permalink to this definition">¶</a></dt>
+<dd><p>Closes all loop candidates in this container (i.e. modifies the candidates
+so that its stem residues match those of <em>n_stem</em> and <em>c_stem</em>, which are
+the stem residues of the loop being modelled), using the KIC algorithm. This
+algorithm finds analytical solutions for closing the loop by modifying the
+torsion angles of just three pivot residues. Due to the underlying
+mathematical formalism in KIC, up to 16 solutions can be found for every
+candidate. This leads to an increase in number of loops.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the n-stem positions every candidate
+should match</li>
+<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the c-stem positions every candidate
+should match</li>
+<li><strong>pivot_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; First pivot residue</li>
+<li><strong>pivot_two</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Second pivot residue</li>
+<li><strong>pivot_three</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Third pivot residue</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">An index for each added candidate corresponding to the original
+candidate index before this function was called (each candidate can
+lead to multiple or no candidates after KIC is applied). This is
+useful to keep track of scores and other data extracted before.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.CalculateBackboneScores">
+<code class="descname">CalculateBackboneScores</code><span class="sig-paren">(</span><em>score_container</em>, <em>scorer</em>, <em>start_resnum</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.CalculateBackboneScores" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">CalculateBackboneScores</code><span class="sig-paren">(</span><em>score_container</em>, <em>scorer</em>, <em>keys</em>, <em>start_resnum</em>, <em>chain_idx=0</em><span class="sig-paren">)</span></dt>
+<dt id="promod3.modelling.LoopCandidates.CalculateAllAtomScores">
+<code class="descname">CalculateAllAtomScores</code><span class="sig-paren">(</span><em>score_container</em>, <em>mhandle</em>, <em>start_resnum</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.CalculateAllAtomScores" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">CalculateAllAtomScores</code><span class="sig-paren">(</span><em>score_container</em>, <em>mhandle</em>, <em>keys</em>, <em>start_resnum</em>, <em>chain_idx=0</em><span class="sig-paren">)</span></dt>
+<dd><p>Calculate backbone / all-atom scores for each loop candidate.
+Note that (unless otherwise noted) a lower &#8220;score&#8221; is better!</p>
+<p>The computed scores are in the same same order as the candidates in here.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>score_container</strong> (<a class="reference internal" href="#promod3.modelling.ScoreContainer" title="promod3.modelling.ScoreContainer"><code class="xref py py-class docutils literal"><span class="pre">ScoreContainer</span></code></a>) &#8211; Add scores to this score container using the given
+key names (or the ones from <a class="reference internal" href="#promod3.modelling.ScoringWeights" title="promod3.modelling.ScoringWeights"><code class="xref py py-class docutils literal"><span class="pre">ScoringWeights</span></code></a>)</li>
+<li><strong>scorer</strong> (<a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer" title="promod3.scoring.BackboneOverallScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneOverallScorer</span></code></a>) &#8211; Backbone scoring object with set environment for the
+particular loop modelling problem.</li>
+<li><strong>mhandle</strong> (<a class="reference internal" href="pipeline.html#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle set up for all atom scoring (see
+<a class="reference internal" href="pipeline.html#promod3.modelling.SetupDefaultAllAtomScoring" title="promod3.modelling.SetupDefaultAllAtomScoring"><code class="xref py py-func docutils literal"><span class="pre">SetupDefaultAllAtomScoring()</span></code></a>).</li>
+<li><strong>keys</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Keys of the desired scorers. If not given, we use the set of
+keys given by <a class="reference internal" href="#promod3.modelling.ScoringWeights.GetBackboneScoringKeys" title="promod3.modelling.ScoringWeights.GetBackboneScoringKeys"><code class="xref py py-meth docutils literal"><span class="pre">ScoringWeights.GetBackboneScoringKeys()</span></code></a> /
+<a class="reference internal" href="#promod3.modelling.ScoringWeights.GetAllAtomScoringKeys" title="promod3.modelling.ScoringWeights.GetAllAtomScoringKeys"><code class="xref py py-meth docutils literal"><span class="pre">ScoringWeights.GetAllAtomScoringKeys()</span></code></a>.</li>
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Res. number defining the position in the SEQRES.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of chain the loops belong to.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <a class="reference internal" href="pipeline.html#promod3.modelling.IsAllAtomScoringSetUp" title="promod3.modelling.IsAllAtomScoringSetUp"><code class="xref py py-func docutils literal"><span class="pre">IsAllAtomScoringSetUp()</span></code></a>
+is False, if <em>keys</em> has a key for which no scorer exists or if
+anything is raised when calculating the scores.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.CalculateSequenceProfileScores">
+<code class="descname">CalculateSequenceProfileScores</code><span class="sig-paren">(</span><em>score_container</em>, <em>structure_db</em>, <em>prof</em>, <em>offset=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.CalculateSequenceProfileScores" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.LoopCandidates.CalculateStructureProfileScores">
+<code class="descname">CalculateStructureProfileScores</code><span class="sig-paren">(</span><em>score_container</em>, <em>structure_db</em>, <em>prof</em>, <em>offset=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.CalculateStructureProfileScores" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calculates a score comparing the given profile <em>prof</em> starting at <em>offset</em>
+with the sequence / structure profile of each candidate as extracted from
+<em>structure_db</em> (see <a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle.GetAverageScore" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">ost.seq.ProfileHandle.GetAverageScore()</span></code></a> for
+details, <em>prof.null_model</em> is used for weighting).</p>
+<p>Note that for profile scores a higher &#8220;score&#8221; is better! So take care when
+combining this to other scores, where it is commonly the other way around.</p>
+<p>This requires that each candidate has a connected fragment info into the
+given <em>structure_db</em> (e.g. <a class="reference internal" href="#promod3.modelling.LoopCandidates.FillFromDatabase" title="promod3.modelling.LoopCandidates.FillFromDatabase"><code class="xref py py-meth docutils literal"><span class="pre">FillFromDatabase()</span></code></a> must have been called
+with this DB).</p>
+<p>The computed scores are in the same same order as the candidates in here.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>score_container</strong> (<a class="reference internal" href="#promod3.modelling.ScoreContainer" title="promod3.modelling.ScoreContainer"><code class="xref py py-class docutils literal"><span class="pre">ScoreContainer</span></code></a>) &#8211; Add scores to this score container using the default
+key name defined in <a class="reference internal" href="#promod3.modelling.ScoringWeights" title="promod3.modelling.ScoringWeights"><code class="xref py py-class docutils literal"><span class="pre">ScoringWeights</span></code></a></li>
+<li><strong>structural_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"><span class="pre">StructureDB</span></code></a>) &#8211; Structural database used in <a class="reference internal" href="#promod3.modelling.LoopCandidates.FillFromDatabase" title="promod3.modelling.LoopCandidates.FillFromDatabase"><code class="xref py py-meth docutils literal"><span class="pre">FillFromDatabase()</span></code></a></li>
+<li><strong>prof</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code></a>) &#8211; Profile information for target.</li>
+<li><strong>offset</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Loop starts at index <em>offset</em> in <em>prof</em>.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <a class="reference internal" href="#promod3.modelling.LoopCandidates.HasFragmentInfos" title="promod3.modelling.LoopCandidates.HasFragmentInfos"><code class="xref py py-meth docutils literal"><span class="pre">HasFragmentInfos()</span></code></a> is
+False, if <em>structure_db</em> is incompatible with the stored fragment
+infos or if <em>prof</em> has less than <em>offset+len</em> elements (len =
+length of loops stored in here).</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.CalculateStemRMSDs">
+<code class="descname">CalculateStemRMSDs</code><span class="sig-paren">(</span><em>score_container</em>, <em>n_stem</em>, <em>c_stem</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.CalculateStemRMSDs" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calculates RMSD between the given stems and the first and last residue of
+the loop candidates. This first superposes the first loop residue with
+<em>n_stem</em> and then computes the RMSD between the last residue&#8217;s N, CA, C
+positions and the corresponding atoms in <em>c_stem</em>.</p>
+<p>Note that this score is only useful before calling <a class="reference internal" href="#promod3.modelling.LoopCandidates.ApplyCCD" title="promod3.modelling.LoopCandidates.ApplyCCD"><code class="xref py py-meth docutils literal"><span class="pre">ApplyCCD()</span></code></a> or
+<a class="reference internal" href="#promod3.modelling.LoopCandidates.ApplyKIC" title="promod3.modelling.LoopCandidates.ApplyKIC"><code class="xref py py-meth docutils literal"><span class="pre">ApplyKIC()</span></code></a>.</p>
+<p>The computed scores are in the same same order as the candidates in here.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>score_container</strong> (<a class="reference internal" href="#promod3.modelling.ScoreContainer" title="promod3.modelling.ScoreContainer"><code class="xref py py-class docutils literal"><span class="pre">ScoreContainer</span></code></a>) &#8211; Add scores to this score container using the default
+key name defined in <a class="reference internal" href="#promod3.modelling.ScoringWeights" title="promod3.modelling.ScoringWeights"><code class="xref py py-class docutils literal"><span class="pre">ScoringWeights</span></code></a></li>
+<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; The residue at the N-terminal end of the loop.</li>
+<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; The residue at the C-terminal end of the loop.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if stems do no contain N, CA and C
+atoms.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">CalculateSequenceProfileScores</code><span class="sig-paren">(</span><em>structure_db</em>, <em>prof</em>, <em>offset=0</em><span class="sig-paren">)</span></dt>
+<dt>
+<code class="descname">CalculateStructureProfileScores</code><span class="sig-paren">(</span><em>structure_db</em>, <em>prof</em>, <em>offset=0</em><span class="sig-paren">)</span></dt>
+<dt>
+<code class="descname">CalculateStemRMSDs</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em><span class="sig-paren">)</span></dt>
+<dd><p>Same as the <em>score_container</em> variant above, but here we directly return the
+score vector instead of storing it in a container.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Score for each candidate (same order as candidates in here).</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.Add">
+<code class="descname">Add</code><span class="sig-paren">(</span><em>bb_list</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.Add" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><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"><span class="pre">BackboneList</span></code></a>) &#8211; The loop candidate to be added.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if sequence of <em>bb_list</em> is not
+consistent with internal sequence</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.AddFragmentInfo">
+<code class="descname">AddFragmentInfo</code><span class="sig-paren">(</span><em>fragment</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.AddFragmentInfo" title="Permalink to this definition">¶</a></dt>
+<dd><p>Adds a fragment info for the last candidate added with <a class="reference internal" href="#promod3.modelling.LoopCandidates.Add" title="promod3.modelling.LoopCandidates.Add"><code class="xref py py-meth docutils literal"><span class="pre">Add()</span></code></a>. Note
+that these infos are added automatically with <a class="reference internal" href="#promod3.modelling.LoopCandidates.FillFromDatabase" title="promod3.modelling.LoopCandidates.FillFromDatabase"><code class="xref py py-meth docutils literal"><span class="pre">FillFromDatabase()</span></code></a> and
+updated whenever the candidates are copied, removed, clustered etc.. So you
+will probably never need this function.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fragment</strong> (<a class="reference internal" href="../loop/structure_db.html#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a>) &#8211; The fragment info to add.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.Remove">
+<code class="descname">Remove</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.Remove" title="Permalink to this definition">¶</a></dt>
+<dd><p>Remove a loop candidate from the list of candidates.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the candidate that will be removed</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>index</em> is out of bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.HasFragmentInfos">
+<code class="descname">HasFragmentInfos</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.HasFragmentInfos" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, if each loop candidate has a connected fragment info.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.GetFragmentInfo">
+<code class="descname">GetFragmentInfo</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.GetFragmentInfo" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Fragment info connected to loop candidate at given <em>index</em>.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="../loop/structure_db.html#promod3.loop.FragmentInfo" title="promod3.loop.FragmentInfo"><code class="xref py py-class docutils literal"><span class="pre">FragmentInfo</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The index of the candidate.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <a class="reference internal" href="#promod3.modelling.LoopCandidates.HasFragmentInfos" title="promod3.modelling.LoopCandidates.HasFragmentInfos"><code class="xref py py-meth docutils literal"><span class="pre">HasFragmentInfos()</span></code></a> is
+False or if <em>index</em> is out of bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.Extract">
+<code class="descname">Extract</code><span class="sig-paren">(</span><em>indices</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.Extract" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Container with candidates with given <em>indices</em>.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.modelling.LoopCandidates" title="promod3.modelling.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>indices</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Candidate indices to extract.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if any index is out of bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.GetClusters">
+<code class="descname">GetClusters</code><span class="sig-paren">(</span><em>max_dist</em>, <em>superposed_rmsd = False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.GetClusters" title="Permalink to this definition">¶</a></dt>
+<dd><p>Clusters the loop candidates according to their pairwise CA RMSD using an
+agglomerative hierarchical clustering algorithm. Every candidate gets
+assigned a unique cluster. At every clustering step, the two clusters with
+shortest distance get merged, with the distance definition being the average
+CA RMSD between any of the members of the two clusters.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>max_dist</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal distance two clusters can have to be merged</li>
+<li><strong>superposed_rmsd</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether to calculate the RMSD based on a minimal
+RMSD superposition or simply consider the current
+positions</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Lists of loop candidate indices into this container</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.GetClusteredCandidates">
+<code class="descname">GetClusteredCandidates</code><span class="sig-paren">(</span><em>max_dist</em>, <em>neglect_size_one=True</em>, <em>superposed_rmsd=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.GetClusteredCandidates" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">List of loop candidates clustered as in <a class="reference internal" href="#promod3.modelling.LoopCandidates.GetClusters" title="promod3.modelling.LoopCandidates.GetClusters"><code class="xref py py-meth docutils literal"><span class="pre">GetClusters()</span></code></a>.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.modelling.LoopCandidates" title="promod3.modelling.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>max_dist</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal distance two clusters can have to be merged</li>
+<li><strong>neglect_size_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether clusters should be added to the returned
+list if they only contain one loop candidate</li>
+<li><strong>superposed_rmsd</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether to calculate the RMSD based on a minimal
+RMSD superposition or simply consider the current
+positions</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.LoopCandidates.GetLargestCluster">
+<code class="descname">GetLargestCluster</code><span class="sig-paren">(</span><em>max_dist</em>, <em>superposed_rmsd = False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LoopCandidates.GetLargestCluster" title="Permalink to this definition">¶</a></dt>
+<dd><p>Instead of performing a full clustering, the algorithm simply searches for
+the candidate with the most other candidates having a CA RMSD below
+<strong>max_dist</strong>. This candidate then serves as centroid for the return
+cluster.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>max_dist</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal CA RMSD to cluster centroid</li>
+<li><strong>superposed_rmsd</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether to calculate the RMSD based on a minimal
+RMSD superposition or simply consider the current
+positions</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Largest possible cluster with all members having a
+CA RMSD below <strong>max_dist</strong> to cluster centroid.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#promod3.modelling.LoopCandidates" title="promod3.modelling.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="keeping-track-of-loop-candidate-scores">
+<h2>Keeping track of loop candidate scores<a class="headerlink" href="#keeping-track-of-loop-candidate-scores" title="Permalink to this headline">¶</a></h2>
+<p>Two helper classes are used to keep track and combine different scores computed
+on loop candidates.</p>
+<dl class="class">
+<dt id="promod3.modelling.ScoreContainer">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">ScoreContainer</code><a class="headerlink" href="#promod3.modelling.ScoreContainer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Container to keep vectors of scores (one for each loop candidate) for each
+scorer (one vector for each single scorer). Each score vector is guaranteed
+to have the same number of values.</p>
+<dl class="method">
+<dt id="promod3.modelling.ScoreContainer.IsEmpty">
+<code class="descname">IsEmpty</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoreContainer.IsEmpty" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, if no loop candidates have been scored with any scorer yet.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.ScoreContainer.Contains">
+<code class="descname">Contains</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoreContainer.Contains" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, if a score vector for this key was already added.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>key</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Key for desired scorer.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.ScoreContainer.Get">
+<code class="descname">Get</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoreContainer.Get" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Score vector for the given <em>key</em>.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.modelling.ScoreContainer.GetNumCandidates" title="promod3.modelling.ScoreContainer.GetNumCandidates"><code class="xref py py-meth docutils literal"><span class="pre">GetNumCandidates()</span></code></a> <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>key</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Key for desired score vector.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if there are no scores for that
+<em>key</em>.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.ScoreContainer.Set">
+<code class="descname">Set</code><span class="sig-paren">(</span><em>key</em>, <em>scores</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoreContainer.Set" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>key</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Set scores for that <em>key</em>.</li>
+<li><strong>scores</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Score vector to set.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if this container contains other
+score vectors with a different number of entries.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.ScoreContainer.GetNumCandidates">
+<code class="descname">GetNumCandidates</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoreContainer.GetNumCandidates" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of loop candidates that are scored here. This is the length
+of each score vector in this container.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.ScoreContainer.LinearCombine">
+<code class="descname">LinearCombine</code><span class="sig-paren">(</span><em>linear_weights</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoreContainer.LinearCombine" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Weighted, linear combination of scores.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.modelling.ScoreContainer.GetNumCandidates" title="promod3.modelling.ScoreContainer.GetNumCandidates"><code class="xref py py-meth docutils literal"><span class="pre">GetNumCandidates()</span></code></a> <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>linear_weights</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a> (keys: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>,
+values: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)) &#8211; Weights for each scorer.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>linear_weights</em> has a key for
+which no scores were added.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.ScoreContainer.Copy">
+<code class="descname">Copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoreContainer.Copy" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Full copy of this container.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.modelling.ScoreContainer" title="promod3.modelling.ScoreContainer"><code class="xref py py-class docutils literal"><span class="pre">ScoreContainer</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.ScoreContainer.Extract">
+<code class="descname">Extract</code><span class="sig-paren">(</span><em>indices</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoreContainer.Extract" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Container with scores for a subset of loop candidates.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.modelling.ScoreContainer" title="promod3.modelling.ScoreContainer"><code class="xref py py-class docutils literal"><span class="pre">ScoreContainer</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>indices</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; List of loop candidate indices to pick
+(in [0, <a class="reference internal" href="#promod3.modelling.ScoreContainer.GetNumCandidates" title="promod3.modelling.ScoreContainer.GetNumCandidates"><code class="xref py py-meth docutils literal"><span class="pre">GetNumCandidates()</span></code></a>-1])</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if any index is out of bounds.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.ScoreContainer.Extend">
+<code class="descname">Extend</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoreContainer.Extend" title="Permalink to this definition">¶</a></dt>
+<dd><p>Extend each score vector with the score vector of <em>other</em> (must have
+matching keys).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#promod3.modelling.ScoreContainer" title="promod3.modelling.ScoreContainer"><code class="xref py py-class docutils literal"><span class="pre">ScoreContainer</span></code></a>) &#8211; Score container to be added to this one.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.modelling.ScoringWeights">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">ScoringWeights</code><a class="headerlink" href="#promod3.modelling.ScoringWeights" title="Permalink to this definition">¶</a></dt>
+<dd><p>Globally accessible set of weights to be used in scoring. This also defines
+a consistent naming of keys used for backbone and all atom scorers as set up
+by <a class="reference internal" href="pipeline.html#promod3.modelling.SetupDefaultBackboneScoring" title="promod3.modelling.SetupDefaultBackboneScoring"><code class="xref py py-func docutils literal"><span class="pre">SetupDefaultBackboneScoring()</span></code></a> and <a class="reference internal" href="pipeline.html#promod3.modelling.SetupDefaultAllAtomScoring" title="promod3.modelling.SetupDefaultAllAtomScoring"><code class="xref py py-func docutils literal"><span class="pre">SetupDefaultAllAtomScoring()</span></code></a>.</p>
+<p>If you choose to modify the weights, please ensure to set consistently named
+keys in here and to use consistently named scorers and scoring computations!</p>
+<dl class="staticmethod">
+<dt id="promod3.modelling.ScoringWeights.GetWeights">
+<em class="property">static </em><code class="descname">GetWeights</code><span class="sig-paren">(</span><em>with_db=False</em>, <em>with_aa=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.GetWeights" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Named weights to be used when scoring loop candidates. The default
+weights were optimized to give the best performance when choosing
+the loop candidate with the lowest combined score. Each set of
+weights includes (different) backbone scoring weights.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a> (keys: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>, values: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>with_db</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True to choose a set of weights including DB specific scores
+(stem RMSD and profile scores)</li>
+<li><strong>with_aa</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True to choose a set of weights including all atom scores</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.modelling.ScoringWeights.SetWeights">
+<em class="property">static </em><code class="descname">SetWeights</code><span class="sig-paren">(</span><em>with_db</em>, <em>with_aa</em>, <em>weights</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.SetWeights" title="Permalink to this definition">¶</a></dt>
+<dd><p>Overwrite a set of weights as returned by <a class="reference internal" href="#promod3.modelling.ScoringWeights.GetWeights" title="promod3.modelling.ScoringWeights.GetWeights"><code class="xref py py-meth docutils literal"><span class="pre">GetWeights()</span></code></a>.</p>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.modelling.ScoringWeights.GetBackboneWeights">
+<em class="property">static </em><code class="descname">GetBackboneWeights</code><span class="sig-paren">(</span><em>with_db=False</em>, <em>with_aa=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.GetBackboneWeights" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Subset of <a class="reference internal" href="#promod3.modelling.ScoringWeights.GetWeights" title="promod3.modelling.ScoringWeights.GetWeights"><code class="xref py py-meth docutils literal"><span class="pre">GetWeights()</span></code></a> for backbone scoring as in
+<code class="xref py py-meth docutils literal"><span class="pre">scoring.BackboneOverallScorer.CalculateLinearCombination()</span></code>.</p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a> (keys: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>, values: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>with_db</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; As in <a class="reference internal" href="#promod3.modelling.ScoringWeights.GetWeights" title="promod3.modelling.ScoringWeights.GetWeights"><code class="xref py py-meth docutils literal"><span class="pre">GetWeights()</span></code></a></li>
+<li><strong>with_aa</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; As in <a class="reference internal" href="#promod3.modelling.ScoringWeights.GetWeights" title="promod3.modelling.ScoringWeights.GetWeights"><code class="xref py py-meth docutils literal"><span class="pre">GetWeights()</span></code></a></li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.modelling.ScoringWeights.GetAllAtomWeights">
+<em class="property">static </em><code class="descname">GetAllAtomWeights</code><span class="sig-paren">(</span><em>with_db=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.GetAllAtomWeights" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Subset of <a class="reference internal" href="#promod3.modelling.ScoringWeights.GetWeights" title="promod3.modelling.ScoringWeights.GetWeights"><code class="xref py py-meth docutils literal"><span class="pre">GetWeights()</span></code></a> for all atom scoring as in
+<code class="xref py py-meth docutils literal"><span class="pre">scoring.AllAtomOverallScorer.CalculateLinearCombination()</span></code>.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a> (keys: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>, values: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>with_db</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; As in <a class="reference internal" href="#promod3.modelling.ScoringWeights.GetWeights" title="promod3.modelling.ScoringWeights.GetWeights"><code class="xref py py-meth docutils literal"><span class="pre">GetWeights()</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.modelling.ScoringWeights.GetStemRMSDsKey">
+<em class="property">static </em><code class="descname">GetStemRMSDsKey</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.GetStemRMSDsKey" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.ScoringWeights.GetSequenceProfileScoresKey">
+<em class="property">static </em><code class="descname">GetSequenceProfileScoresKey</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.GetSequenceProfileScoresKey" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.ScoringWeights.GetStructureProfileScoresKey">
+<em class="property">static </em><code class="descname">GetStructureProfileScoresKey</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.GetStructureProfileScoresKey" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Default key for stem RMSD / sequence profile / structure profile
+scores.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.modelling.ScoringWeights.SetStemRMSDsKey">
+<em class="property">static </em><code class="descname">SetStemRMSDsKey</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.SetStemRMSDsKey" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.ScoringWeights.SetSequenceProfileScoresKey">
+<em class="property">static </em><code class="descname">SetSequenceProfileScoresKey</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.SetSequenceProfileScoresKey" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.ScoringWeights.SetStructureProfileScoresKey">
+<em class="property">static </em><code class="descname">SetStructureProfileScoresKey</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.SetStructureProfileScoresKey" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>key</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; New default key for stem RMSD / sequence profile / structure
+profile scores.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.modelling.ScoringWeights.GetBackboneScoringKeys">
+<em class="property">static </em><code class="descname">GetBackboneScoringKeys</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.GetBackboneScoringKeys" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.ScoringWeights.GetAllAtomScoringKeys">
+<em class="property">static </em><code class="descname">GetAllAtomScoringKeys</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.GetAllAtomScoringKeys" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">List of backbone / all-atom scorers to be computed for any set of
+weights defined in here.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.modelling.ScoringWeights.SetBackboneScoringKeys">
+<em class="property">static </em><code class="descname">SetBackboneScoringKeys</code><span class="sig-paren">(</span><em>keys</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.SetBackboneScoringKeys" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.ScoringWeights.SetAllAtomScoringKeys">
+<em class="property">static </em><code class="descname">SetAllAtomScoringKeys</code><span class="sig-paren">(</span><em>keys</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ScoringWeights.SetAllAtomScoringKeys" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>keys</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; New list of backbone / all-atom scorers to be computed for any
+set of weights defined in here.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="example-loop-scoring-in-modelling">
+<h2>Example: loop scoring in modelling<a class="headerlink" href="#example-loop-scoring-in-modelling" title="Permalink to this headline">¶</a></h2>
+<p>In the example below, we show how we find and choose a loop candidate to close a
+gap for a model. This shows the combined usage of <a class="reference internal" href="pipeline.html#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a> to
+keep a consistent modelling environment, <a class="reference internal" href="#promod3.modelling.LoopCandidates" title="promod3.modelling.LoopCandidates"><code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code></a> with its
+scoring routines, <a class="reference internal" href="#promod3.modelling.ScoreContainer" title="promod3.modelling.ScoreContainer"><code class="xref py py-class docutils literal"><span class="pre">ScoreContainer</span></code></a> for keeping track of scores and
+<a class="reference internal" href="#promod3.modelling.ScoringWeights" title="promod3.modelling.ScoringWeights"><code class="xref py py-class docutils literal"><span class="pre">ScoringWeights</span></code></a> to combine scores:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span>
+
+<span class="c"># setup 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="s">&#39;data/1crn_cut.pdb&#39;</span><span class="p">)</span>
+<span class="n">seq_trg</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEAICATYTGCIIIPGATCPGDYAN&#39;</span>
+<span class="n">seq_tpl</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEA------GCIIIPGATCPGDYAN&#39;</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="s">&#39;trg&#39;</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="s">&#39;tpl&#39;</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="k">print</span><span class="p">(</span><span class="s">&quot;Number of gaps in raw model: </span><span class="si">%d</span><span class="s">&quot;</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="c"># setup default scorers for modelling handle</span>
+<span class="n">modelling</span><span class="o">.</span><span class="n">SetupDefaultBackboneScoring</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span>
+<span class="n">modelling</span><span class="o">.</span><span class="n">SetupDefaultAllAtomScoring</span><span class="p">(</span><span class="n">mhandle</span><span class="p">)</span>
+
+<span class="c"># setup databases</span>
+<span class="n">frag_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="c"># get data for gap to close</span>
+<span class="n">gap</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">gaps</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">Copy</span><span class="p">()</span>
+<span class="k">print</span><span class="p">(</span><span class="s">&quot;Gap to close: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">gap</span><span class="p">))</span>
+<span class="n">n_stem</span> <span class="o">=</span> <span class="n">gap</span><span class="o">.</span><span class="n">before</span>
+<span class="n">c_stem</span> <span class="o">=</span> <span class="n">gap</span><span class="o">.</span><span class="n">after</span>
+<span class="n">start_resnum</span> <span class="o">=</span> <span class="n">n_stem</span><span class="o">.</span><span class="n">GetNumber</span><span class="p">()</span><span class="o">.</span><span class="n">GetNum</span><span class="p">()</span>
+<span class="n">start_idx</span> <span class="o">=</span> <span class="n">start_resnum</span> <span class="o">-</span> <span class="mi">1</span>   <span class="c"># res. num. starts at 1</span>
+
+<span class="c"># get loop candidates from FragDB</span>
+<span class="n">candidates</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">LoopCandidates</span><span class="o">.</span><span class="n">FillFromDatabase</span><span class="p">(</span>\
+                <span class="n">n_stem</span><span class="p">,</span> <span class="n">c_stem</span><span class="p">,</span> <span class="n">gap</span><span class="o">.</span><span class="n">full_seq</span><span class="p">,</span> <span class="n">frag_db</span><span class="p">,</span> <span class="n">structure_db</span><span class="p">)</span>
+<span class="k">print</span><span class="p">(</span><span class="s">&quot;Number of loop candidates: </span><span class="si">%d</span><span class="s">&quot;</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">candidates</span><span class="p">))</span>
+
+<span class="c"># all scores will be kept in a score container which we update</span>
+<span class="n">all_scores</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">ScoreContainer</span><span class="p">()</span>
+<span class="c"># the keys used to identify scores are globally defined</span>
+<span class="k">print</span><span class="p">(</span><span class="s">&quot;Stem RMSD key = &#39;</span><span class="si">%s</span><span class="s">&#39;&quot;</span> \
+      <span class="o">%</span> <span class="n">modelling</span><span class="o">.</span><span class="n">ScoringWeights</span><span class="o">.</span><span class="n">GetStemRMSDsKey</span><span class="p">())</span>
+<span class="k">print</span><span class="p">(</span><span class="s">&quot;Profile keys = [&#39;</span><span class="si">%s</span><span class="s">&#39;, &#39;</span><span class="si">%s</span><span class="s">&#39;]&quot;</span> \
+      <span class="o">%</span> <span class="p">(</span><span class="n">modelling</span><span class="o">.</span><span class="n">ScoringWeights</span><span class="o">.</span><span class="n">GetSequenceProfileScoresKey</span><span class="p">(),</span>
+         <span class="n">modelling</span><span class="o">.</span><span class="n">ScoringWeights</span><span class="o">.</span><span class="n">GetStructureProfileScoresKey</span><span class="p">()))</span>
+<span class="k">print</span><span class="p">(</span><span class="s">&quot;Backbone scoring keys = </span><span class="si">%s</span><span class="s">&quot;</span> \
+      <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">modelling</span><span class="o">.</span><span class="n">ScoringWeights</span><span class="o">.</span><span class="n">GetBackboneScoringKeys</span><span class="p">()))</span>
+<span class="k">print</span><span class="p">(</span><span class="s">&quot;All atom scoring keys = </span><span class="si">%s</span><span class="s">&quot;</span> \
+      <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">modelling</span><span class="o">.</span><span class="n">ScoringWeights</span><span class="o">.</span><span class="n">GetAllAtomScoringKeys</span><span class="p">()))</span>
+
+<span class="c"># get stem RMSDs for each candidate (i.e. how well does it fit?)</span>
+<span class="c"># -&gt; this must be done before CCD to be meaningful</span>
+<span class="n">candidates</span><span class="o">.</span><span class="n">CalculateStemRMSDs</span><span class="p">(</span><span class="n">all_scores</span><span class="p">,</span> <span class="n">n_stem</span><span class="p">,</span> <span class="n">c_stem</span><span class="p">)</span>
+
+<span class="c"># close the candidates with CCD</span>
+<span class="n">orig_indices</span> <span class="o">=</span> <span class="n">candidates</span><span class="o">.</span><span class="n">ApplyCCD</span><span class="p">(</span><span class="n">n_stem</span><span class="p">,</span> <span class="n">c_stem</span><span class="p">,</span> <span class="n">torsion_sampler</span><span class="p">)</span>
+<span class="k">print</span><span class="p">(</span><span class="s">&quot;Number of closed loop candidates: </span><span class="si">%d</span><span class="s">&quot;</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">candidates</span><span class="p">))</span>
+
+<span class="c"># get subset of previously computed scores</span>
+<span class="n">all_scores</span> <span class="o">=</span> <span class="n">all_scores</span><span class="o">.</span><span class="n">Extract</span><span class="p">(</span><span class="n">orig_indices</span><span class="p">)</span>
+
+<span class="c"># add profile scores (needs profile for target sequence)</span>
+<span class="n">prof</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">LoadSequenceProfile</span><span class="p">(</span><span class="s">&quot;data/1CRNA.hhm&quot;</span><span class="p">)</span>
+<span class="n">candidates</span><span class="o">.</span><span class="n">CalculateSequenceProfileScores</span><span class="p">(</span><span class="n">all_scores</span><span class="p">,</span> <span class="n">structure_db</span><span class="p">,</span>
+                                          <span class="n">prof</span><span class="p">,</span> <span class="n">start_idx</span><span class="p">)</span>
+<span class="n">candidates</span><span class="o">.</span><span class="n">CalculateStructureProfileScores</span><span class="p">(</span><span class="n">all_scores</span><span class="p">,</span> <span class="n">structure_db</span><span class="p">,</span>
+                                           <span class="n">prof</span><span class="p">,</span> <span class="n">start_idx</span><span class="p">)</span>
+<span class="c"># add backbone scores</span>
+<span class="n">scorer</span> <span class="o">=</span> <span class="n">mhandle</span><span class="o">.</span><span class="n">backbone_scorer</span>
+<span class="n">candidates</span><span class="o">.</span><span class="n">CalculateBackboneScores</span><span class="p">(</span><span class="n">all_scores</span><span class="p">,</span> <span class="n">scorer</span><span class="p">,</span> <span class="n">start_resnum</span><span class="p">)</span>
+<span class="c"># add all atom scores</span>
+<span class="n">candidates</span><span class="o">.</span><span class="n">CalculateAllAtomScores</span><span class="p">(</span><span class="n">all_scores</span><span class="p">,</span> <span class="n">mhandle</span><span class="p">,</span> <span class="n">start_resnum</span><span class="p">)</span>
+
+<span class="c"># use default weights to combine scores</span>
+<span class="n">weights</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">ScoringWeights</span><span class="o">.</span><span class="n">GetWeights</span><span class="p">(</span><span class="n">with_db</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span>
+                                              <span class="n">with_aa</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+<span class="n">scores</span> <span class="o">=</span> <span class="n">all_scores</span><span class="o">.</span><span class="n">LinearCombine</span><span class="p">(</span><span class="n">weights</span><span class="p">)</span>
+
+<span class="c"># rank them (best = lowest &quot;score&quot;)</span>
+<span class="n">arg_sorted_scores</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">([(</span><span class="n">v</span><span class="p">,</span><span class="n">i</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">v</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">scores</span><span class="p">)])</span>
+<span class="k">print</span><span class="p">(</span><span class="s">&quot;Ranked candidates: score, index&quot;</span><span class="p">)</span>
+<span class="k">for</span> <span class="n">v</span><span class="p">,</span><span class="n">i</span> <span class="ow">in</span> <span class="n">arg_sorted_scores</span><span class="p">:</span>
+  <span class="k">print</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%g</span><span class="s">, </span><span class="si">%d</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">v</span><span class="p">,</span><span class="n">i</span><span class="p">))</span>
+
+<span class="c"># insert best into model, update scorers and clear gaps</span>
+<span class="n">best_candidate</span> <span class="o">=</span> <span class="n">candidates</span><span class="p">[</span><span class="n">arg_sorted_scores</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">1</span><span class="p">]]</span>
+<span class="n">modelling</span><span class="o">.</span><span class="n">InsertLoopClearGaps</span><span class="p">(</span><span class="n">mhandle</span><span class="p">,</span> <span class="n">best_candidate</span><span class="p">,</span> <span class="n">gap</span><span class="p">)</span>
+<span class="k">print</span><span class="p">(</span><span class="s">&quot;Number of gaps in closed model: </span><span class="si">%d</span><span class="s">&quot;</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">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">mhandle</span><span class="o">.</span><span class="n">model</span><span class="p">,</span> <span class="s">&quot;model.pdb&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Handling Loop Candidates</a><ul>
+<li><a class="reference internal" href="#the-loopcandidates-class">The LoopCandidates class</a></li>
+<li><a class="reference internal" href="#keeping-track-of-loop-candidate-scores">Keeping track of loop candidate scores</a></li>
+<li><a class="reference internal" href="#example-loop-scoring-in-modelling">Example: loop scoring in modelling</a></li>
+</ul>
+</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="docutils literal"><span class="pre">modelling</span></code> - Protein Modelling</a><ul>
+      <li>Previous: <a href="gap_handling.html" title="previous chapter">Handling Gaps</a></li>
+      <li>Next: <a href="loop_closing.html" title="next chapter">Fitting Loops Into Gaps</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/modelling/loop_candidates.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/modelling/loop_candidates.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/modelling/loop_closing.html b/doc/html/modelling/loop_closing.html
new file mode 100644
index 00000000..a742f46c
--- /dev/null
+++ b/doc/html/modelling/loop_closing.html
@@ -0,0 +1,666 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Fitting Loops Into Gaps &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="modelling - Protein Modelling" href="index.html" />
+    <link rel="next" title="Generating Loops De Novo" href="monte_carlo.html" />
+    <link rel="prev" title="Handling Loop Candidates" href="loop_candidates.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="fitting-loops-into-gaps">
+<h1>Fitting Loops Into Gaps<a class="headerlink" href="#fitting-loops-into-gaps" title="Permalink to this headline">¶</a></h1>
+<p>Loops often need to undergo conformational changes to fit into gaps defined by
+stem residues. ProMod3 implements two algorithms performing this task:</p>
+<blockquote>
+<div><ul class="simple">
+<li>Cyclic coordinate descent (CCD) <a class="reference internal" href="#canutescu2003" id="id1">[canutescu2003]</a></li>
+<li>Kinematic closure (KIC) <a class="reference internal" href="#mandell2009" id="id2">[mandell2009]</a></li>
+</ul>
+</div></blockquote>
+<p>In case of small gaps or small issues in the loop you might also consider the
+<a class="reference internal" href="#promod3.modelling.BackboneRelaxer" title="promod3.modelling.BackboneRelaxer"><code class="xref py py-class docutils literal"><span class="pre">BackboneRelaxer</span></code></a>.</p>
+<div class="section" id="ccd">
+<h2>CCD<a class="headerlink" href="#ccd" title="Permalink to this headline">¶</a></h2>
+<p>The ProMod3 implementation of the cyclic coordinate descent first superposes
+the n-stem of the input loop with the provided n-stem positions. In every
+iteration of the algorithm, we loop over all residues of the loop and find the
+ideal phi/psi angles to minimize the RMSD between the c-stem and the target
+c-stem positions. Iterations continue until a c-stem RMSD threshold is reached
+or the number of iterations hits a limit. By performing CCD, unfavorable
+backbone dihedral pairs can be introduced. It is therefore optionally possible
+to use torsion samplers to guide the iterative process.  In this case, the
+algorithm calculates the probability of observing the dihedral pair before and
+after performing the phi/psi update. If the fraction after/before is smaller
+than a uniform random number in the range [0,1[, the proposed dihedral pair gets
+rejected. Please note, that this increases the probability of non-convergence.</p>
+<dl class="class">
+<dt id="promod3.modelling.CCD">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">CCD</code><a class="headerlink" href="#promod3.modelling.CCD" title="Permalink to this definition">¶</a></dt>
+<dd><p>Class, that sets up everything you need to perform a particular loop closing
+action.</p>
+<dl class="method">
+<dt id="promod3.modelling.CCD.CCD">
+<code class="descname">CCD</code><span class="sig-paren">(</span><em>sequence</em>, <em>n_stem</em>, <em>c_stem</em>, <em>torsion_sampler</em>, <em>max_steps</em>, <em>rmsd_cutoff</em>, <em>seed</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.CCD.CCD" title="Permalink to this definition">¶</a></dt>
+<dd><p>All runs with this CCD object will be with application of torsion samplers
+to avoid moving into unfavourable regions of the backbone dihedrals.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence of the backbones to be closed</li>
+<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the n_stem.
+If the residue before <em>n_stem</em> doesn&#8217;t exist, the
+torsion sampler will use a default residue (ALA) and
+and phi angle (-1.0472) to evaluate the first angle.</li>
+<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the c_stem.
+If the residue after <em>c_stem</em> doesn&#8217;t exist, the
+torsion sampler will use a default residue (ALA) and
+psi angle (-0.7854) to evaluate the last angle.</li>
+<li><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"><span class="pre">TorsionSampler</span></code></a> / <code class="xref py py-class docutils literal"><span class="pre">list</span></code>
+of <a class="reference internal" href="../loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; To extract probabilities for the analysis of the
+backbone dihedrals. Either a list of torsion
+samplers (one for for every residue of the loop to
+be closed) or a single one (used for all residues).</li>
+<li><strong>max_steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Maximal number of iterations</li>
+<li><strong>rmsd_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The algorithm stops as soon as the c_stem of the loop to
+be closed has RMSD below the <em>c_stem</em></li>
+<li><strong>seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Seed of random number generator to decide whether new phi/psi pair
+should be accepted.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if a list of torsion samplers is
+given with inconsistent length regarding the sequence. Another
+requirement is that all backbone atoms of the stems must be
+present.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">CCD</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>max_steps</em>, <em>rmsd_cutoff</em><span class="sig-paren">)</span></dt>
+<dd><p>All runs with this CCD object will be without application of torsion samplers.
+This is faster but might lead to weird backbone dihedral pairs.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the n_stem</li>
+<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue defining the c_stem</li>
+<li><strong>max_steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Maximal number of iterations</li>
+<li><strong>rmsd_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The algorithm stops as soon as the c_stem of the loop to
+be  closed has RMSD below the given <em>c_stem</em></li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.CCD.Close">
+<code class="descname">Close</code><span class="sig-paren">(</span><em>bb_list</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.CCD.Close" title="Permalink to this definition">¶</a></dt>
+<dd><p>Closes given <em>bb_list</em> with the settings set at initialization.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><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"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to be closed</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Whether <em>rmsd_cutoff</em> has been reached</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if the CCD object has been
+initialized with <a class="reference internal" href="../loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a> support
+and the length of the <em>bb_list</em> is not consistent with the initial
+<em>sequence</em>.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="kic">
+<h2>KIC<a class="headerlink" href="#kic" title="Permalink to this headline">¶</a></h2>
+<p>The kinematic closure leads to a fragmentation of the loop based on given
+pivot residues. It then calculates possible relative orientations
+of these fragments by considering constraints of bond length and bond angles
+at these pivot residues. Due to the internal mathematical formalism, up to
+16 solutions can be found for a given loop closing problem.</p>
+<dl class="class">
+<dt id="promod3.modelling.KIC">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">KIC</code><a class="headerlink" href="#promod3.modelling.KIC" title="Permalink to this definition">¶</a></dt>
+<dd><p>Class, that sets up everything you need to perform a particular loop closing
+action.</p>
+<dl class="method">
+<dt id="promod3.modelling.KIC.KIC">
+<code class="descname">KIC</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.KIC.KIC" title="Permalink to this definition">¶</a></dt>
+<dd><p>All runs of this KIC closing object will adapt the input loops to these
+stem residues.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>n_stem</strong> &#8211; Residue describing the stem towards n_ter</li>
+<li><strong>c_stem</strong> &#8211; Residue describing the stem towards c_ter</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.KIC.Close">
+<code class="descname">Close</code><span class="sig-paren">(</span><em>bb_list</em>, <em>pivot_one</em>, <em>pivot_two</em>, <em>pivot_three</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.KIC.Close" title="Permalink to this definition">¶</a></dt>
+<dd><p>Applies KIC algorithm, so that the output loops match the given stem residues</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><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"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to be closed</li>
+<li><strong>pivot_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of first pivot residue</li>
+<li><strong>pivot_two</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of second pivot residue</li>
+<li><strong>pivot_three</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of third pivot residue</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">List of closed loops (maximum of 16 entries)</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> in case of invalid pivot indices.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="relaxing-backbones">
+<h2>Relaxing Backbones<a class="headerlink" href="#relaxing-backbones" title="Permalink to this headline">¶</a></h2>
+<p>In many cases one wants to quickly relax a loop. This can be useful to close
+small gaps in the backbone or resolve the most severe clashes. The
+<a class="reference internal" href="#promod3.modelling.BackboneRelaxer" title="promod3.modelling.BackboneRelaxer"><code class="xref py py-class docutils literal"><span class="pre">BackboneRelaxer</span></code></a> internally sets up a topology for the input loop.
+Once setup, every loop of the same length and sequence can be relaxed by
+the relaxer.</p>
+<dl class="class">
+<dt id="promod3.modelling.BackboneRelaxer">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">BackboneRelaxer</code><span class="sig-paren">(</span><em>bb_list</em>, <em>ff</em>, <em>fix_nterm=True</em>, <em>fix_cterm=True</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.BackboneRelaxer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Sets up a molecular mechanics topology for given <em>bb_list</em>. Every
+<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> of same length and sequence can then be
+relaxed. The parametrization is taken from <em>ff</em>, simply neglecting all
+interactions to non backbone atoms. The electrostatics get neglected
+completely by setting all charges to 0.0.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><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"><span class="pre">BackboneList</span></code></a>) &#8211; Basis for topology creation</li>
+<li><strong>ff</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"><span class="pre">promod3.loop.ForcefieldLookup</span></code></a>) &#8211; Source for parametrization</li>
+<li><strong>fix_nterm</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether N-terminal backbone positions (N, CA, CB) should
+be kept rigid during relaxation
+(C and O are left to move).</li>
+<li><strong>fix_cterm</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether C-terminal backbone positions (CA, CB, C, O)
+should be kept rigid during relaxation
+(N is left to move).</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="class">
+<dt>
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">BackboneRelaxer</code><span class="sig-paren">(</span><em>bb_list</em>, <em>density</em>, <em>resolution</em>, <em>fix_nterm=True</em>, <em>fix_cterm=True</em><span class="sig-paren">)</span></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><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"><span class="pre">BackboneList</span></code></a>) &#8211; Basis for topology creation</li>
+<li><strong>fix_nterm</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether N-terminal backbone positions (N, CA, CB) should
+be kept rigid during relaxation.</li>
+<li><strong>fix_cterm</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether C-terminal backbone positions (CA, CB, C, O)
+should be kept rigid during relaxation.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if size of <em>bb_list</em> is below 2</p>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="method">
+<dt id="promod3.modelling.BackboneRelaxer.Run">
+<code class="descname">Run</code><span class="sig-paren">(</span><em>bb_list</em>, <em>steps=100</em>, <em>stop_criterion=0.01</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.BackboneRelaxer.Run" title="Permalink to this definition">¶</a></dt>
+<dd><p>Performs steepest descent on given BackboneList.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><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"><span class="pre">BackboneList</span></code></a>) &#8211; To be relaxed</li>
+<li><strong>steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; number of steepest descent steps</li>
+<li><strong>stop_criterion</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; If maximum force acting on a particle
+falls below that threshold, the
+relaxation aborts.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Forcefield energy upon relaxation</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>bb_list</em> has not the same
+size or sequence as the initial one.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.BackboneRelaxer.AddNRestraint">
+<code class="descname">AddNRestraint</code><span class="sig-paren">(</span><em>idx</em>, <em>pos</em>, <em>force_constant=100000</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.BackboneRelaxer.AddNRestraint" title="Permalink to this definition">¶</a></dt>
+<dd><p>Adds harmonic position restraint for nitrogen atom at specified residue</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Idx of residue</li>
+<li><strong>pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Restraint Position (in Angstrom)</li>
+<li><strong>force_constant</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Force constant in kJ/mol/nm^2</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>idx</em> is too large</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.BackboneRelaxer.AddCARestraint">
+<code class="descname">AddCARestraint</code><span class="sig-paren">(</span><em>idx</em>, <em>pos</em>, <em>force_constant=100000</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.BackboneRelaxer.AddCARestraint" title="Permalink to this definition">¶</a></dt>
+<dd><p>Adds harmonic position restraint for CA atom at specified residue</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Idx of residue</li>
+<li><strong>pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Restraint Position (in Angstrom)</li>
+<li><strong>force_constant</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Force constant in kJ/mol/nm^2</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>idx</em> is too large</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.BackboneRelaxer.AddCBRestraint">
+<code class="descname">AddCBRestraint</code><span class="sig-paren">(</span><em>idx</em>, <em>pos</em>, <em>force_constant=100000</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.BackboneRelaxer.AddCBRestraint" title="Permalink to this definition">¶</a></dt>
+<dd><p>Adds harmonic position restraint for CB atom at specified residue,
+doesn&#8217;t do anything if specified residue is a glycine</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Idx of residue</li>
+<li><strong>pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Restraint Position (in Angstrom)</li>
+<li><strong>force_constant</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Force constant in kJ/mol/nm^2</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>idx</em> is too large</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.BackboneRelaxer.AddCRestraint">
+<code class="descname">AddCRestraint</code><span class="sig-paren">(</span><em>idx</em>, <em>pos</em>, <em>force_constant=100000</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.BackboneRelaxer.AddCRestraint" title="Permalink to this definition">¶</a></dt>
+<dd><p>Adds harmonic position restraint for C atom at specified residue</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Idx of residue</li>
+<li><strong>pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Restraint Position (in Angstrom)</li>
+<li><strong>force_constant</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Force constant in kJ/mol/nm^2</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>idx</em> is too large</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.BackboneRelaxer.AddORestraint">
+<code class="descname">AddORestraint</code><span class="sig-paren">(</span><em>idx</em>, <em>pos</em>, <em>force_constant=100000</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.BackboneRelaxer.AddORestraint" title="Permalink to this definition">¶</a></dt>
+<dd><p>Adds harmonic position restraint for O atom at specified residue</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Idx of residue</li>
+<li><strong>pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Restraint Position (in Angstrom)</li>
+<li><strong>force_constant</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Force constant in kJ/mol/nm^2</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>idx</em> is too large</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.BackboneRelaxer.SetNonBondedCutoff">
+<code class="descname">SetNonBondedCutoff</code><span class="sig-paren">(</span><em>nonbonded_cutoff</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.BackboneRelaxer.SetNonBondedCutoff" title="Permalink to this definition">¶</a></dt>
+<dd><p>Defines cutoff to set for non bonded interactions. By default, all atom-
+pairs are compared which is the fastest for small backbones (e.g. in
+<a class="reference internal" href="pipeline.html#promod3.modelling.CloseSmallDeletions" title="promod3.modelling.CloseSmallDeletions"><code class="xref py py-meth docutils literal"><span class="pre">CloseSmallDeletions()</span></code></a>). Otherwise, a cutoff around 5 is reasonable as
+we ignore electrostatics.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>nonbonded_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Cutoff to set for non bonded interactions. Negative
+means no cutoff.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.BackboneRelaxer.GetNonBondedCutoff">
+<code class="descname">GetNonBondedCutoff</code><span class="sig-paren">(</span><em>nonbonded_cutoff</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.BackboneRelaxer.GetNonBondedCutoff" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Cutoff for non bonded interactions.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="relaxing-all-atom-loops">
+<h2>Relaxing All Atom Loops<a class="headerlink" href="#relaxing-all-atom-loops" title="Permalink to this headline">¶</a></h2>
+<p>After the reconstruction of loop sidechains with the
+<a class="reference internal" href="sidechain_reconstruction.html#promod3.modelling.SidechainReconstructor.Reconstruct" title="promod3.modelling.SidechainReconstructor.Reconstruct"><code class="xref py py-meth docutils literal"><span class="pre">Reconstruct()</span></code></a> method of
+<a class="reference internal" href="sidechain_reconstruction.html#promod3.modelling.SidechainReconstructor" title="promod3.modelling.SidechainReconstructor"><code class="xref py py-class docutils literal"><span class="pre">SidechainReconstructor</span></code></a>, it may be desired to
+quickly relax the loop. The <a class="reference internal" href="#promod3.modelling.AllAtomRelaxer" title="promod3.modelling.AllAtomRelaxer"><code class="xref py py-class docutils literal"><span class="pre">AllAtomRelaxer</span></code></a> class takes care of that.</p>
+<p>Example usage:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span>
+
+<span class="c"># load example (has res. numbering starting at 1)</span>
+<span class="n">prot</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="s">&#39;data/1CRN.pdb&#39;</span><span class="p">)</span>
+<span class="n">res_list</span> <span class="o">=</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span>
+<span class="n">seqres_str</span> <span class="o">=</span> <span class="s">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">r</span><span class="o">.</span><span class="n">one_letter_code</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">res_list</span><span class="p">])</span>
+
+<span class="c"># initialize AllAtom environment and sidechain reconstructor</span>
+<span class="n">env</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">AllAtomEnv</span><span class="p">(</span><span class="n">seqres_str</span><span class="p">)</span>
+<span class="n">env</span><span class="o">.</span><span class="n">SetInitialEnvironment</span><span class="p">(</span><span class="n">prot</span><span class="p">)</span>
+<span class="n">sc_rec</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">SidechainReconstructor</span><span class="p">()</span>
+<span class="n">sc_rec</span><span class="o">.</span><span class="n">AttachEnvironment</span><span class="p">(</span><span class="n">env</span><span class="p">)</span>
+
+<span class="c"># &quot;reconstruct&quot; subset (res. num. 6..10) -&gt; sidechains kept here</span>
+<span class="n">sc_result</span> <span class="o">=</span> <span class="n">sc_rec</span><span class="o">.</span><span class="n">Reconstruct</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span>
+<span class="c"># setup sys creator</span>
+<span class="n">ff_lookup</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">ForcefieldLookup</span><span class="o">.</span><span class="n">GetDefault</span><span class="p">()</span>
+<span class="n">mm_sys</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">MmSystemCreator</span><span class="p">(</span><span class="n">ff_lookup</span><span class="p">)</span>
+<span class="n">relaxer</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">AllAtomRelaxer</span><span class="p">(</span><span class="n">sc_result</span><span class="p">,</span> <span class="n">mm_sys</span><span class="p">)</span>
+<span class="c"># relax loop</span>
+<span class="n">pot_e</span> <span class="o">=</span> <span class="n">relaxer</span><span class="o">.</span><span class="n">Run</span><span class="p">(</span><span class="n">sc_result</span><span class="p">,</span> <span class="mi">300</span><span class="p">,</span> <span class="mf">0.1</span><span class="p">)</span>
+<span class="k">print</span> <span class="s">&quot;Potential energy after: </span><span class="si">%g</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">pot_e</span>
+<span class="c"># update environment with solution</span>
+<span class="n">env</span><span class="o">.</span><span class="n">SetEnvironment</span><span class="p">(</span><span class="n">sc_result</span><span class="o">.</span><span class="n">env_pos</span><span class="p">)</span>
+<span class="c"># store all positions of environment</span>
+<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">env</span><span class="o">.</span><span class="n">GetAllAtomPositions</span><span class="p">()</span><span class="o">.</span><span class="n">ToEntity</span><span class="p">(),</span> <span class="s">&#39;aa_relax_test.pdb&#39;</span><span class="p">)</span>
+</pre></div>
+</div>
+<dl class="class">
+<dt id="promod3.modelling.AllAtomRelaxer">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">AllAtomRelaxer</code><span class="sig-paren">(</span><em>sc_data</em>, <em>mm_system_creator</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.AllAtomRelaxer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Setup relaxer for a given sidechain reconstruction result and a given MM
+system creator, which takes care of generating a simulation object.</p>
+<p>N/C stems of loop are fixed if they are non-terminal.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>sc_data</strong> (<a class="reference internal" href="sidechain_reconstruction.html#promod3.modelling.SidechainReconstructionData" title="promod3.modelling.SidechainReconstructionData"><code class="xref py py-class docutils literal"><span class="pre">SidechainReconstructionData</span></code></a>) &#8211; Sidechain reconstruction result</li>
+<li><strong>mm_system_creator</strong> (<a class="reference internal" href="../loop/mm_system_creation.html#promod3.loop.MmSystemCreator" title="promod3.loop.MmSystemCreator"><code class="xref py py-class docutils literal"><span class="pre">MmSystemCreator</span></code></a>) &#8211; System creator to be used here</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="method">
+<dt id="promod3.modelling.AllAtomRelaxer.Run">
+<code class="descname">Run</code><span class="sig-paren">(</span><em>sc_data</em>, <em>steps=100</em>, <em>stop_criterion=0.01</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.AllAtomRelaxer.Run" title="Permalink to this definition">¶</a></dt>
+<dd><p>Performs steepest descent for this system and writes updated positions into
+<em>sc_data.env_pos.all_pos</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>sc_data</strong> (<a class="reference internal" href="sidechain_reconstruction.html#promod3.modelling.SidechainReconstructionData" title="promod3.modelling.SidechainReconstructionData"><code class="xref py py-class docutils literal"><span class="pre">SidechainReconstructionData</span></code></a>) &#8211; Sidechain reconstruction result to be updated</li>
+<li><strong>steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of steepest descent steps</li>
+<li><strong>stop_criterion</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; If maximum force acting on a particle falls below
+that threshold, the relaxation aborts.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Potential energy after relaxation</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>sc_data</em> is incompatible with
+the one given in the constructor.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.AllAtomRelaxer.UpdatePositions">
+<code class="descname">UpdatePositions</code><span class="sig-paren">(</span><em>sc_data</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.AllAtomRelaxer.UpdatePositions" title="Permalink to this definition">¶</a></dt>
+<dd><p>Resets simulation positions to a new set of positions. It is assumed that
+this <em>sc_data</em> object has the same amino acids as loops and surrounding and
+the same disulfid bridges as the one given in the constructor.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sc_data</strong> (<a class="reference internal" href="sidechain_reconstruction.html#promod3.modelling.SidechainReconstructionData" title="promod3.modelling.SidechainReconstructionData"><code class="xref py py-class docutils literal"><span class="pre">SidechainReconstructionData</span></code></a>) &#8211; Get new positions from <em>sc_data.env_pos.all_pos</em></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>sc_data</em> is incompatible with
+the one given in the constructor.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.AllAtomRelaxer.GetSystemCreator">
+<code class="descname">GetSystemCreator</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.AllAtomRelaxer.GetSystemCreator" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">MM system creator passed in the constructor</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="../loop/mm_system_creation.html#promod3.loop.MmSystemCreator" title="promod3.loop.MmSystemCreator"><code class="xref py py-class docutils literal"><span class="pre">MmSystemCreator</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<p class="rubric">Citations</p>
+<table class="docutils citation" frame="void" id="canutescu2003" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a class="fn-backref" href="#id1">[canutescu2003]</a></td><td>Canutescu AA and Dunbrack RL Jr. (2003). Cyclic coordinate descent: A robotics algorithm for protein loop closure. Protein Sci. 12(5):963–972.</td></tr>
+</tbody>
+</table>
+<table class="docutils citation" frame="void" id="mandell2009" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a class="fn-backref" href="#id2">[mandell2009]</a></td><td>Mandell DJ, Coutsias EA and Kortemme T (2009). Sub-angstrom accuracy in protein loop reconstruction by robotics-inspired conformational sampling. Nat Methods. 6(8):551-2.</td></tr>
+</tbody>
+</table>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Fitting Loops Into Gaps</a><ul>
+<li><a class="reference internal" href="#ccd">CCD</a></li>
+<li><a class="reference internal" href="#kic">KIC</a></li>
+<li><a class="reference internal" href="#relaxing-backbones">Relaxing Backbones</a></li>
+<li><a class="reference internal" href="#relaxing-all-atom-loops">Relaxing All Atom Loops</a></li>
+</ul>
+</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="docutils literal"><span class="pre">modelling</span></code> - Protein Modelling</a><ul>
+      <li>Previous: <a href="loop_candidates.html" title="previous chapter">Handling Loop Candidates</a></li>
+      <li>Next: <a href="monte_carlo.html" title="next chapter">Generating Loops De Novo</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/modelling/loop_closing.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/modelling/loop_closing.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/modelling/model_checking.html b/doc/html/modelling/model_checking.html
new file mode 100644
index 00000000..9445862a
--- /dev/null
+++ b/doc/html/modelling/model_checking.html
@@ -0,0 +1,301 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Model Checking &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="modelling - Protein Modelling" href="index.html" />
+    <link rel="next" title="Handling Gaps" href="gap_handling.html" />
+    <link rel="prev" title="Modelling Pipeline" href="pipeline.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="model-checking">
+<h1>Model Checking<a class="headerlink" href="#model-checking" title="Permalink to this headline">¶</a></h1>
+<p>This chapter describes additional functionality to check models. Some of this
+functionality is used within the modelling pipeline.</p>
+<div class="section" id="detecting-ring-punches">
+<h2>Detecting Ring Punches<a class="headerlink" href="#detecting-ring-punches" title="Permalink to this headline">¶</a></h2>
+<dl class="function">
+<dt id="promod3.modelling.GetRings">
+<code class="descclassname">promod3.modelling.</code><code class="descname">GetRings</code><span class="sig-paren">(</span><em>ent</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_ring_punches.html#GetRings"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.GetRings" title="Permalink to this definition">¶</a></dt>
+<dd><p>Get rings for a protein structure.
+A ring is only added if all ring-atoms exist or if it is a proline and
+three of the atoms exist (center and radii are estimated then).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ent</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">EntityHandle</span></code></a> or <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">EntityView</span></code></a>) &#8211; Structure for which to detect rings.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of rings to perform ring checks. Each ring is a named
+tuple with:
+center (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Vec3</span></code></a>),
+plane (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/composite/#ost.geom.Plane" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Plane</span></code></a>),
+radius (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>),
+residue (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ResidueHandle</span></code></a>).</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.GetRingPunches">
+<code class="descclassname">promod3.modelling.</code><code class="descname">GetRingPunches</code><span class="sig-paren">(</span><em>rings</em>, <em>ent</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_ring_punches.html#GetRingPunches"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.GetRingPunches" title="Permalink to this definition">¶</a></dt>
+<dd><p>Get list of residues with rings that are punched by the given structure.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>rings</strong> &#8211; List of rings as provided by <a class="reference internal" href="#promod3.modelling.GetRings" title="promod3.modelling.GetRings"><code class="xref py py-func docutils literal"><span class="pre">GetRings()</span></code></a>.</li>
+<li><strong>ent</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">EntityHandle</span></code></a> or <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">EntityView</span></code></a>) &#8211; Structure for which to detect punches.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of residues (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ResidueHandle</span></code></a>) which
+have a punched ring.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.HasRingPunches">
+<code class="descclassname">promod3.modelling.</code><code class="descname">HasRingPunches</code><span class="sig-paren">(</span><em>rings</em>, <em>ent</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_ring_punches.html#HasRingPunches"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.HasRingPunches" title="Permalink to this definition">¶</a></dt>
+<dd><p>Check if any ring is punched by the given structure.
+This check is faster than using <a class="reference internal" href="#promod3.modelling.GetRingPunches" title="promod3.modelling.GetRingPunches"><code class="xref py py-func docutils literal"><span class="pre">GetRingPunches()</span></code></a>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>rings</strong> &#8211; List of rings as provided by <a class="reference internal" href="#promod3.modelling.GetRings" title="promod3.modelling.GetRings"><code class="xref py py-func docutils literal"><span class="pre">GetRings()</span></code></a>.</li>
+<li><strong>ent</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">EntityHandle</span></code></a> or <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">EntityView</span></code></a>) &#8211; Structure for which to detect punches.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True, iff any ring is punched</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.FilterCandidates">
+<code class="descclassname">promod3.modelling.</code><code class="descname">FilterCandidates</code><span class="sig-paren">(</span><em>candidates</em>, <em>model</em>, <em>gap</em>, <em>orig_indices=[]</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_ring_punches.html#FilterCandidates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.FilterCandidates" title="Permalink to this definition">¶</a></dt>
+<dd><p>Remove loop candidates if they cause ring punches.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>candidates</strong> (<code class="xref py py-class docutils literal"><span class="pre">LoopCandidates</span></code>) &#8211; Loop candidates meant to fill <em>gap</em> within <em>model</em>.
+Offending candidates are removed from this list.</li>
+<li><strong>model</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">EntityHandle</span></code></a>) &#8211; Model for which loop is to be filled.</li>
+<li><strong>gap</strong> (<a class="reference internal" href="gap_handling.html#promod3.modelling.StructuralGap" title="promod3.modelling.StructuralGap"><code class="xref py py-class docutils literal"><span class="pre">StructuralGap</span></code></a>.) &#8211; Gap for which loop is to be filled.</li>
+<li><strong>orig_indices</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; Mapping to old indexing of candidates. If given, it
+must have as many elements as <em>candidates</em>.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.FilterCandidatesWithSC">
+<code class="descclassname">promod3.modelling.</code><code class="descname">FilterCandidatesWithSC</code><span class="sig-paren">(</span><em>candidates</em>, <em>model</em>, <em>gap</em>, <em>orig_indices=[]</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_ring_punches.html#FilterCandidatesWithSC"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.FilterCandidatesWithSC" title="Permalink to this definition">¶</a></dt>
+<dd><p>Remove loop candidates if they (with sidechain) cause ring punches.
+See <a class="reference internal" href="#promod3.modelling.FilterCandidates" title="promod3.modelling.FilterCandidates"><code class="xref py py-func docutils literal"><span class="pre">FilterCandidates()</span></code></a>.</p>
+</dd></dl>
+
+</div>
+<div class="section" id="model-checking-with-molprobity">
+<h2>Model Checking With MolProbity<a class="headerlink" href="#model-checking-with-molprobity" title="Permalink to this headline">¶</a></h2>
+<dl class="function">
+<dt id="promod3.modelling.RunMolProbity">
+<code class="descclassname">promod3.modelling.</code><code class="descname">RunMolProbity</code><span class="sig-paren">(</span><em>target_pdb</em>, <em>molprobity_bin=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_molprobity.html#RunMolProbity"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.RunMolProbity" title="Permalink to this definition">¶</a></dt>
+<dd><p>Run <code class="docutils literal"><span class="pre">MolProbity</span></code> from <code class="docutils literal"><span class="pre">Phenix</span></code> on a given PDB file.</p>
+<p>MolProbity score computation: (formula from molprobity source code)</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">clashscore</span> <span class="o">=</span> <span class="n">result</span><span class="p">[</span><span class="s">&quot;Clashscore&quot;</span><span class="p">]</span>
+<span class="n">rota_out</span> <span class="o">=</span> <span class="n">result</span><span class="p">[</span><span class="s">&quot;Rotamer outliers&quot;</span><span class="p">]</span>
+<span class="n">rama_iffy</span> <span class="o">=</span> <span class="mf">100.</span> <span class="o">-</span> <span class="n">result</span><span class="p">[</span><span class="s">&quot;Ramachandran favored&quot;</span><span class="p">]</span>
+<span class="n">mpscore</span> <span class="o">=</span> <span class="p">((</span> <span class="mf">0.426</span> <span class="o">*</span> <span class="n">math</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">clashscore</span><span class="p">)</span> <span class="p">)</span> <span class="o">+</span>
+         <span class="p">(</span> <span class="mf">0.33</span> <span class="o">*</span> <span class="n">math</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="nb">max</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">rota_out</span> <span class="o">-</span> <span class="mi">1</span><span class="p">))</span> <span class="p">)</span> <span class="o">+</span>
+         <span class="p">(</span> <span class="mf">0.25</span> <span class="o">*</span> <span class="n">math</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="nb">max</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">rama_iffy</span> <span class="o">-</span> <span class="mi">2</span><span class="p">))</span> <span class="p">))</span> <span class="o">+</span> <span class="mf">0.5</span>
+</pre></div>
+</div>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>target_pdb</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to PDB file on which to do analysis.</li>
+<li><strong>molprobity_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to <code class="docutils literal"><span class="pre">phenix.molprobity</span></code> executable. If None, it
+searches for it in the <code class="docutils literal"><span class="pre">PATH</span></code> or (if set) in the
+env. variable <code class="docutils literal"><span class="pre">MOLPROBITY_EXECUTABLE</span></code>.
+The function was tested with <code class="docutils literal"><span class="pre">Phenix</span> <span class="pre">1.9-1692</span></code> and
+with <code class="docutils literal"><span class="pre">MolProbity</span> <span class="pre">4.2</span></code> which also includes it.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><p>Dictionary with scores produced by MolProbity. Entries:</p>
+<ul class="simple">
+<li>&#8220;Ramachandran outliers&#8221; (percentage [0,100] as <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)</li>
+<li>&#8220;Ramachandran favored&#8221; (percentage [0,100] as <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)</li>
+<li>&#8220;Rotamer outliers&#8221; (percentage [0,100] as <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)</li>
+<li>&#8220;C-beta deviations&#8221; (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>)</li>
+<li>&#8220;Clashscore&#8221; (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)</li>
+<li>&#8220;MolProbity score&#8221; (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)</li>
+<li>&#8220;RMS(bonds)&#8221; (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)</li>
+<li>&#8220;RMS(angles)&#8221; (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)</li>
+</ul>
+</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="http://www.openstructure.org/docs/dev/base/settings/#ost.settings.FileNotFound" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">FileNotFound</span></code></a> if the &#8220;phenix.molprobity&#8221;
+executable is not found.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.RunMolProbityEntity">
+<code class="descclassname">promod3.modelling.</code><code class="descname">RunMolProbityEntity</code><span class="sig-paren">(</span><em>ost_ent</em>, <em>molprobity_bin=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_molprobity.html#RunMolProbityEntity"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.RunMolProbityEntity" title="Permalink to this definition">¶</a></dt>
+<dd><p>Run molprobity from phenix on given OST entity.</p>
+<p>See <a class="reference internal" href="#promod3.modelling.RunMolProbity" title="promod3.modelling.RunMolProbity"><code class="xref py py-func docutils literal"><span class="pre">RunMolProbity()</span></code></a> for details.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ost_ent</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Entity</span></code></a>) &#8211; OST entity on which to do analysis.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.ReportMolProbityScores">
+<code class="descclassname">promod3.modelling.</code><code class="descname">ReportMolProbityScores</code><span class="sig-paren">(</span><em>scores</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_molprobity.html#ReportMolProbityScores"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.ReportMolProbityScores" title="Permalink to this definition">¶</a></dt>
+<dd><p>Print MolProbity score and its components to LogInfo.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>scores</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a>) &#8211; MolProbity scores as generated by <a class="reference internal" href="#promod3.modelling.RunMolProbity" title="promod3.modelling.RunMolProbity"><code class="xref py py-func docutils literal"><span class="pre">RunMolProbity()</span></code></a>.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Model Checking</a><ul>
+<li><a class="reference internal" href="#detecting-ring-punches">Detecting Ring Punches</a></li>
+<li><a class="reference internal" href="#model-checking-with-molprobity">Model Checking With MolProbity</a></li>
+</ul>
+</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="docutils literal"><span class="pre">modelling</span></code> - Protein Modelling</a><ul>
+      <li>Previous: <a href="pipeline.html" title="previous chapter">Modelling Pipeline</a></li>
+      <li>Next: <a href="gap_handling.html" title="next chapter">Handling Gaps</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/modelling/model_checking.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/modelling/model_checking.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/loop/monte_carlo.html b/doc/html/modelling/monte_carlo.html
similarity index 58%
rename from doc/html/loop/monte_carlo.html
rename to doc/html/modelling/monte_carlo.html
index 55fcf9cc..0a266380 100644
--- a/doc/html/loop/monte_carlo.html
+++ b/doc/html/modelling/monte_carlo.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Monte Carlo Sampling &mdash; ProMod3 0 documentation</title>
+    <title>Generating Loops De Novo &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,10 +23,10 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
-    <link rel="up" title="loop - Loop Modelling" href="index.html" />
-    <link rel="next" title="Load Loop Objects" href="load_loop_objects.html" />
-    <link rel="prev" title="Loop Scoring" href="backbone_loop_score.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="modelling - Protein Modelling" href="index.html" />
+    <link rel="next" title="Sidechain Reconstruction" href="sidechain_reconstruction.html" />
+    <link rel="prev" title="Fitting Loops Into Gaps" href="loop_closing.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -39,29 +39,83 @@
         <div class="bodywrapper">
           <div class="body" role="main">
             
-  <div class="section" id="monte-carlo-sampling">
-<h1>Monte Carlo Sampling<a class="headerlink" href="#monte-carlo-sampling" title="Permalink to this headline">¶</a></h1>
+  <div class="section" id="generating-loops-de-novo">
+<h1>Generating Loops De Novo<a class="headerlink" href="#generating-loops-de-novo" title="Permalink to this headline">¶</a></h1>
 <p>The Monte Carlo capabilities of ProMod3 are mainly targeted at generating de
 novo structure candidates for loops or N-/C-Termini. Every iteration of the
-sampling process consists basically of four steps.</p>
+sampling process consists basically of four steps and we define objects for
+each step:</p>
 <ul class="simple">
-<li>Propose new conformation</li>
-<li>Adapt new conformation to the environment</li>
-<li>Score the new conformation</li>
-<li>Accept/Reject new conformation based on the score and a temperature controlled metropolis criterion</li>
+<li><a class="reference internal" href="#mc-sampler-object"><span>Sampler Object</span></a>: Propose new conformation</li>
+<li><a class="reference internal" href="#mc-closer-object"><span>Closer Object</span></a>: Adapt new conformation to the environment</li>
+<li><a class="reference internal" href="#mc-scorer-object"><span>Scorer Object</span></a>: Score the new conformation</li>
+<li><a class="reference internal" href="#mc-cooler-object"><span>Cooler Object</span></a>: Accept/Reject new conformation based on the score and
+a temperature controlled Metropolis criterion</li>
 </ul>
-<p>These steps are performed by sampler, closer, scorer and cooler objects, that
-can be arbitrarily combined to generate custom Monte Carlo sampling pipelines.
-This combination either happens manually or by using a convenient function
-provided by ProMod3.</p>
+<p>These steps can be arbitrarily combined to generate custom Monte Carlo sampling
+pipelines. This combination either happens manually or by using the convenient
+<a class="reference internal" href="#promod3.modelling.SampleMonteCarlo" title="promod3.modelling.SampleMonteCarlo"><code class="xref py py-func docutils literal"><span class="pre">SampleMonteCarlo()</span></code></a> function. For example, here we show how to apply Monte
+Carlo sampling to the N-terminal part of crambin:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span><span class="p">,</span> <span class="n">scoring</span><span class="p">,</span> <span class="n">modelling</span>
+<span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
+
+<span class="c"># setup protein</span>
+<span class="n">prot</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="s">&#39;data/1CRN.pdb&#39;</span><span class="p">)</span>
+
+<span class="n">chain_index</span> <span class="o">=</span> <span class="mi">0</span>
+<span class="n">start_resnum</span> <span class="o">=</span> <span class="mi">1</span>
+<span class="n">terminal_len</span> <span class="o">=</span> <span class="mi">8</span>
+
+<span class="n">seqres</span> <span class="o">=</span> <span class="s">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">r</span><span class="o">.</span><span class="n">one_letter_code</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">])</span>
+<span class="n">terminal_seqres</span> <span class="o">=</span> <span class="n">seqres</span><span class="p">[:</span><span class="n">terminal_len</span><span class="p">]</span>
+
+<span class="c"># setup mc_sampler</span>
+<span class="n">torsion_sampler</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadTorsionSampler</span><span class="p">()</span>
+<span class="n">mc_sampler</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">SoftSampler</span><span class="p">(</span><span class="n">terminal_seqres</span><span class="p">,</span> <span class="n">torsion_sampler</span><span class="p">,</span>
+                                   <span class="mf">10.0</span> <span class="o">/</span> <span class="mi">180</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">pi</span><span class="p">)</span>
+
+<span class="c"># setup mc_closer</span>
+<span class="n">mc_closer</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">NTerminalCloser</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">terminal_len</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
+
+<span class="c"># setup backbone scorer with clash and cbeta scoring</span>
+<span class="n">score_env</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">BackboneScoreEnv</span><span class="p">(</span><span class="n">seqres</span><span class="p">)</span>
+<span class="n">score_env</span><span class="o">.</span><span class="n">SetInitialEnvironment</span><span class="p">(</span><span class="n">prot</span><span class="p">)</span>
+<span class="n">scorer</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">BackboneOverallScorer</span><span class="p">()</span>
+<span class="n">scorer</span><span class="p">[</span><span class="s">&quot;cbeta&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">LoadCBetaScorer</span><span class="p">()</span>
+<span class="n">scorer</span><span class="p">[</span><span class="s">&quot;clash&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">ClashScorer</span><span class="p">()</span>
+<span class="n">scorer</span><span class="o">.</span><span class="n">AttachEnvironment</span><span class="p">(</span><span class="n">score_env</span><span class="p">)</span>
+
+<span class="c"># set up mc_scorer</span>
+<span class="n">weights</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
+<span class="n">weights</span><span class="p">[</span><span class="s">&quot;cbeta&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">10.0</span>
+<span class="n">weights</span><span class="p">[</span><span class="s">&quot;clash&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">0.1</span>
+<span class="n">mc_scorer</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">LinearScorer</span><span class="p">(</span><span class="n">scorer</span><span class="p">,</span> <span class="n">start_resnum</span><span class="p">,</span>
+                                   <span class="n">chain_index</span><span class="p">,</span> <span class="n">weights</span><span class="p">)</span>
+
+<span class="c"># setup mc_cooler</span>
+<span class="n">mc_cooler</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">ExponentialCooler</span><span class="p">(</span><span class="mi">100</span><span class="p">,</span> <span class="mi">100</span><span class="p">,</span> <span class="mf">0.9</span><span class="p">)</span>
+
+<span class="c"># create BackboneList from n-terminus</span>
+<span class="n">bb_list</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">BackboneList</span><span class="p">(</span><span class="n">terminal_seqres</span><span class="p">,</span>
+                            <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[:</span><span class="n">terminal_len</span><span class="p">])</span>
+
+<span class="c"># shake it!</span>
+<span class="n">modelling</span><span class="o">.</span><span class="n">SampleMonteCarlo</span><span class="p">(</span><span class="n">mc_sampler</span><span class="p">,</span> <span class="n">mc_closer</span><span class="p">,</span> <span class="n">mc_scorer</span><span class="p">,</span>
+                           <span class="n">mc_cooler</span><span class="p">,</span> <span class="mi">10000</span><span class="p">,</span> <span class="n">bb_list</span><span class="p">,</span> <span class="bp">False</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
+
+<span class="c"># save down the result</span>
+<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">bb_list</span><span class="o">.</span><span class="n">ToEntity</span><span class="p">(),</span> <span class="s">&quot;sampled_frag.pdb&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
 <dl class="method">
-<dt id="promod3.loop.SampleMonteCarlo">
-<code class="descclassname">promod3.loop.</code><code class="descname">SampleMonteCarlo</code><span class="sig-paren">(</span><em>sampler</em>, <em>closer</em>, <em>scorer</em>, <em>cooler</em>, <em>steps</em>, <em>bb_list</em>, <em>initialize=true</em>, <em>seed=0</em>, <em>lowest_energy_conformation=true</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.SampleMonteCarlo" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.SampleMonteCarlo">
+<code class="descclassname">promod3.modelling.</code><code class="descname">SampleMonteCarlo</code><span class="sig-paren">(</span><em>sampler</em>, <em>closer</em>, <em>scorer</em>, <em>cooler</em>, <em>steps</em>, <em>bb_list</em>, <em>initialize=True</em>, <em>seed=0</em>, <em>lowest_energy_conformation=True</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.SampleMonteCarlo" title="Permalink to this definition">¶</a></dt>
 <dd><p>A convenient function to perform Monte Carlo sampling using a simulated
 annealing scheme. In every iteration, a new loop conformation gets proposed by
-the provided <strong>sampler</strong> and closed by the <strong>closer</strong>. Upon scoring, this new
+the provided <em>sampler</em> and closed by the <em>closer</em>. Upon scoring, this new
 conformation gets accepted/rejected using a metropolis criterion based on the
-temperature given by the <strong>cooler</strong>
+temperature given by the <em>cooler</em>
 =&gt; acceptance probability: exp(-delta_score/T).
 The result is stored in <em>bb_list</em> and is either the lowest energy conformation
 ever encountered or the last accepted proposal.</p>
@@ -78,12 +132,12 @@ the environment.</li>
 <li><strong>cooler</strong> (<a class="reference internal" href="#mc-cooler-object"><span>Cooler Object</span></a>) &#8211; Cooler object to control the temperature of the
 Monte Carlo trajectory.</li>
 <li><strong>steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of Monte Carlo iterations to be performed.</li>
-<li><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The chosen conformation gets stored here.</li>
+<li><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"><span class="pre">BackboneList</span></code></a>) &#8211; The chosen conformation gets stored here.</li>
 <li><strong>initialize</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether a new bb_list should be generated as starting
 point, based on the samplers Initialize function.
-The input <strong>bb_list</strong> gets used otherwise.</li>
+The input <em>bb_list</em> gets used otherwise.</li>
 <li><strong>seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Seed for internal random number generator.</li>
-<li><strong>lowest_energy_conformation</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If true, we choose the lowest scoring
+<li><strong>lowest_energy_conformation</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If True, we choose the lowest scoring
 conformation of the trajectory. Otherwise,
 the last accepted proposal.</li>
 </ul>
@@ -93,91 +147,41 @@ the last accepted proposal.</li>
 </table>
 </dd></dl>
 
-<p>In this example, we apply Monte Carlo sampling to the N-terminal part of
-crambin:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span>
-<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span>
-<span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
-
-<span class="c"># setup protein</span>
-<span class="n">prot</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="s">&quot;1crn&quot;</span><span class="p">,</span> <span class="n">remote</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
-
-<span class="n">chain_index</span> <span class="o">=</span> <span class="mi">0</span>
-<span class="n">start_resnum</span> <span class="o">=</span> <span class="mi">1</span>
-<span class="n">n_terminal_length</span> <span class="o">=</span> <span class="mi">8</span>  
-
-<span class="n">seqres</span> <span class="o">=</span> <span class="s">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">r</span><span class="o">.</span><span class="n">one_letter_code</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">])</span>
-<span class="n">terminal_sequence</span> <span class="o">=</span> <span class="n">seqres</span><span class="p">[:</span><span class="n">n_terminal_length</span><span class="p">]</span>
-
-<span class="c"># setup mc_sampler</span>
-<span class="n">torsion_sampler</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadTorsionSampler</span><span class="p">()</span>
-<span class="n">mc_sampler</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">SoftSampler</span><span class="p">(</span><span class="n">terminal_sequence</span><span class="p">,</span> <span class="n">torsion_sampler</span><span class="p">,</span>
-                              <span class="mf">10.0</span> <span class="o">/</span> <span class="mi">180</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">pi</span><span class="p">)</span>
-
-<span class="c"># setup mc_closer</span>
-<span class="n">mc_closer</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">NTerminalCloser</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[</span><span class="n">n_terminal_length</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
-
-<span class="c"># set up mc_scorer</span>
-<span class="n">scorer</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LoadBackboneLoopScorer</span><span class="p">()</span>
-<span class="n">scorer</span><span class="o">.</span><span class="n">Initialize</span><span class="p">(</span><span class="n">seqres</span><span class="p">)</span>
-<span class="n">scorer</span><span class="o">.</span><span class="n">SetEnvironment</span><span class="p">(</span><span class="n">prot</span><span class="p">)</span>
-
-<span class="n">weights</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
-<span class="n">weights</span><span class="p">[</span><span class="s">&quot;cbeta&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">10.0</span>
-<span class="n">weights</span><span class="p">[</span><span class="s">&quot;clash&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">0.1</span>
-<span class="n">mc_scorer</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">LinearScorer</span><span class="p">(</span><span class="n">scorer</span><span class="p">,</span> <span class="n">start_resnum</span><span class="p">,</span> <span class="n">chain_index</span><span class="p">,</span>
-                              <span class="n">weights</span><span class="p">)</span>
-
-<span class="c"># setup mc_cooler</span>
-<span class="n">mc_cooler</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">ExponentialCooler</span><span class="p">(</span><span class="mi">100</span><span class="p">,</span> <span class="mi">100</span><span class="p">,</span> <span class="mf">0.9</span><span class="p">)</span>
-
-<span class="c"># create BackboneList from n-terminus</span>
-<span class="n">bb_list</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">BackboneList</span><span class="p">(</span><span class="n">terminal_sequence</span><span class="p">,</span>
-                            <span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">[:</span><span class="n">n_terminal_length</span><span class="p">])</span>
-
-<span class="c"># shake it!</span>
-<span class="n">loop</span><span class="o">.</span><span class="n">SampleMonteCarlo</span><span class="p">(</span><span class="n">mc_sampler</span><span class="p">,</span> <span class="n">mc_closer</span><span class="p">,</span> <span class="n">mc_scorer</span><span class="p">,</span> <span class="n">mc_cooler</span><span class="p">,</span>
-	                  <span class="mi">10000</span><span class="p">,</span> <span class="n">bb_list</span><span class="p">,</span> <span class="bp">False</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
-
-<span class="c"># save down the result</span>
-<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">bb_list</span><span class="o">.</span><span class="n">ToEntity</span><span class="p">(),</span> <span class="s">&quot;sampled_frag.pdb&quot;</span><span class="p">)</span>
-</pre></div>
-</div>
 <div class="section" id="sampler-object">
 <span id="mc-sampler-object"></span><h2>Sampler Object<a class="headerlink" href="#sampler-object" title="Permalink to this headline">¶</a></h2>
 <p>The sampler objects can be used to generate initial conformations and
 propose new conformations for a sequence of interest. They build the basis
 for any Monte Carlo sampling pipeline.</p>
 <dl class="class">
-<dt id="promod3.loop.PhiPsiSampler">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">PhiPsiSampler</code><span class="sig-paren">(</span><em>sequence</em>, <em>torsion_sampler</em><span class="optional">[</span>, <em>n_stem_phi=-1.0472</em>, <em>c_stem_psi=-0.78540</em>, <em>prev_aa='A'</em>, <em>next_aa='A'</em>, <em>seed=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PhiPsiSampler" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.PhiPsiSampler">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">PhiPsiSampler</code><span class="sig-paren">(</span><em>sequence</em>, <em>torsion_sampler</em>, <em>n_stem_phi=-1.0472</em>, <em>c_stem_psi=-0.78540</em>, <em>prev_aa='A'</em>, <em>next_aa='A'</em>, <em>seed=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.PhiPsiSampler" title="Permalink to this definition">¶</a></dt>
 <dd><p>The PhiPsiSampler randomly draws and sets phi/psi dihedral angles from
-a distribution provided by the <strong>torsion_sampler</strong>.</p>
+a distribution provided by the <em>torsion_sampler</em>.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
 <li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence that should be sampled</li>
-<li><strong>torsion_sampler</strong> (<a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; Sampler, from which the phi/psi pairs are drawn. It
+<li><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"><span class="pre">TorsionSampler</span></code></a>) &#8211; Sampler, from which the phi/psi pairs are drawn. It
 is also possible to pass a list of samplers with same
 size as the sequence to assign a specific sampler per
 residue.</li>
 <li><strong>n_stem_phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Phi angle of the n_stem. This angle is not defined in
 the sampling region. If the first residue gets selected
 for changing the dihedral angles, it draws a psi angle
-given <strong>n_stem_phi</strong>.</li>
+given <em>n_stem_phi</em>.</li>
 <li><strong>c_stem_psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Psi angle of c_stem. This angle is not defined in
 the sampling region. If the last residue gets selected
 for changing the dihedral angles, it draws a phi angle
-given <strong>c_stem_psi</strong>.</li>
+given <em>c_stem_psi</em>.</li>
 <li><strong>prev_aa</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; This parameter is necessary to extract the according
 histogram index for the first residue from the
-<strong>torsion_sampler</strong>. (Remember: The torsion sampler
+<em>torsion_sampler</em>. (Remember: The torsion sampler
 always considers triplets)</li>
 <li><strong>next_aa</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; This parameter is necessary to extract the according
 histogram index for the last residue from the
-<strong>torsion_sampler</strong>. (Remember: The torsion sampler
+<em>torsion_sampler</em>. (Remember: The torsion sampler
 always considers triplets)</li>
 <li><strong>seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Seed for the internal random number generators.</li>
 </ul>
@@ -186,23 +190,23 @@ always considers triplets)</li>
 </tbody>
 </table>
 <dl class="method">
-<dt id="promod3.loop.PhiPsiSampler.Initialize">
-<code class="descname">Initialize</code><span class="sig-paren">(</span><em>bb_list</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PhiPsiSampler.Initialize" title="Permalink to this definition">¶</a></dt>
-<dd><p>Sets up a new <a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> by randomly drawing phi/psi dihedral
-angles.</p>
+<dt id="promod3.modelling.PhiPsiSampler.Initialize">
+<code class="descname">Initialize</code><span class="sig-paren">(</span><em>bb_list</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.PhiPsiSampler.Initialize" title="Permalink to this definition">¶</a></dt>
+<dd><p>Sets up a new <a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> by randomly drawing
+phi/psi dihedral angles.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The newly created conformation gets stored in here</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><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"><span class="pre">BackboneList</span></code></a>) &#8211; The newly created conformation gets stored in here</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.PhiPsiSampler.ProposeStep">
-<code class="descname">ProposeStep</code><span class="sig-paren">(</span><em>actual_positions</em>, <em>proposed_position</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.PhiPsiSampler.ProposeStep" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.PhiPsiSampler.ProposeStep">
+<code class="descname">ProposeStep</code><span class="sig-paren">(</span><em>actual_positions</em>, <em>proposed_position</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.PhiPsiSampler.ProposeStep" title="Permalink to this definition">¶</a></dt>
 <dd><p>Randomly selects one of the residues and resets its phi/psi values
 according to a random draw from the internal torsion samplers.
 In case of the first residue, only a psi given phi is drawn. Same
@@ -212,12 +216,12 @@ principle also applies for the last residue.</p>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>actual_positions</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Conformation to be changed</li>
-<li><strong>proposed_positions</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Changed conformation gets stored in here</li>
+<li><strong>actual_positions</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Conformation to be changed</li>
+<li><strong>proposed_positions</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Changed conformation gets stored in here</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> If size of <strong>actual_positions</strong>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> If size of <em>actual_positions</em>
 is not consistent with the internal sequence. Note, that the
 sequence itself doesn&#8217;t get checked for efficiency reasons.</p>
 </td>
@@ -229,10 +233,10 @@ sequence itself doesn&#8217;t get checked for efficiency reasons.</p>
 </dd></dl>
 
 <dl class="class">
-<dt id="promod3.loop.SoftSampler">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">SoftSampler</code><span class="sig-paren">(</span><em>sequence</em>, <em>torsion_sampler</em>, <em>max_dev</em><span class="optional">[</span>, <em>n_stem_phi=-1.0472</em>, <em>c_stem_psi=-0.78540</em>, <em>prev_aa='A'</em>, <em>next_aa='A'</em>, <em>seed=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.SoftSampler" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.SoftSampler">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">SoftSampler</code><span class="sig-paren">(</span><em>sequence</em>, <em>torsion_sampler</em>, <em>max_dev</em>, <em>n_stem_phi=-1.0472</em>, <em>c_stem_psi=-0.78540</em>, <em>prev_aa='A'</em>, <em>next_aa='A'</em>, <em>seed=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.SoftSampler" title="Permalink to this definition">¶</a></dt>
 <dd><p>Instead of drawing completely new values for a residues phi/psi angles,
-only one angle gets altered by a maximum value of <strong>max_dev</strong> in the
+only one angle gets altered by a maximum value of <em>max_dev</em> in the
 SoftSampler.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
@@ -240,7 +244,7 @@ SoftSampler.</p>
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
 <li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence that should be sampled</li>
-<li><strong>torsion_sampler</strong> (<a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; Sampler, from which the phi/psi probablities are
+<li><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"><span class="pre">TorsionSampler</span></code></a>) &#8211; Sampler, from which the phi/psi probablities are
 extracted. It is also possible to pass a list of
 samplers with same size as the sequence to assign
 a specific sampler per residue.</li>
@@ -248,21 +252,21 @@ a specific sampler per residue.</li>
 value per sampling step.</li>
 <li><strong>n_stem_phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Phi angle of the n_stem. This angle is not defined in
 the sampling region. If the psi angle of the first
-residue gets selected to be changed, <strong>n_stem_phi</strong> is
+residue gets selected to be changed, <em>n_stem_phi</em> is
 used to calculate the phi/psi probability to estimate
 the acceptance probability.</li>
 <li><strong>c_stem_psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Psi angle of c_stem. This angle is not defined in
 the sampling region. If the phi angle of the last
-residue gets selected to be changed, <strong>c_stem_psi</strong> is
+residue gets selected to be changed, <em>c_stem_psi</em> is
 used to calculate the phi/psi probability to estimate
 the acceptance probability.</li>
 <li><strong>prev_aa</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; This parameter is necessary to extract the according
 histogram index for the first residue from the
-<strong>torsion_sampler</strong>. (Remember: The torsion sampler
+<em>torsion_sampler</em>. (Remember: The torsion sampler
 always considers triplets)</li>
 <li><strong>next_aa</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; This parameter is necessary to extract the according
 histogram index for the last residue from the
-<strong>torsion_sampler</strong>. (Remember: The torsion sampler
+<em>torsion_sampler</em>. (Remember: The torsion sampler
 always considers triplets)</li>
 <li><strong>seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Seed for the internal random number generators.</li>
 </ul>
@@ -271,26 +275,26 @@ always considers triplets)</li>
 </tbody>
 </table>
 <dl class="method">
-<dt id="promod3.loop.SoftSampler.Initialize">
-<code class="descname">Initialize</code><span class="sig-paren">(</span><em>bb_list</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.SoftSampler.Initialize" title="Permalink to this definition">¶</a></dt>
-<dd><p>Sets up a new <a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> by randomly drawing phi/psi dihedral
-angles.</p>
+<dt id="promod3.modelling.SoftSampler.Initialize">
+<code class="descname">Initialize</code><span class="sig-paren">(</span><em>bb_list</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.SoftSampler.Initialize" title="Permalink to this definition">¶</a></dt>
+<dd><p>Sets up a new <a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> by randomly drawing
+phi/psi dihedral angles.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The newly created conformation gets stored in here</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><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"><span class="pre">BackboneList</span></code></a>) &#8211; The newly created conformation gets stored in here</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.SoftSampler.ProposeStep">
-<code class="descname">ProposeStep</code><span class="sig-paren">(</span><em>actual_positions</em>, <em>proposed_position</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.SoftSampler.ProposeStep" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.SoftSampler.ProposeStep">
+<code class="descname">ProposeStep</code><span class="sig-paren">(</span><em>actual_positions</em>, <em>proposed_position</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.SoftSampler.ProposeStep" title="Permalink to this definition">¶</a></dt>
 <dd><p>In an iterative process, the SoftSampler randomly selects one of the
 possible dihedral angles in a conformation and changes it by a random value
-in [-<strong>max_dev</strong>,**max_dev**]. The acceptance probability of this change is
+in [-<em>max_dev</em>, <em>max_dev</em>]. The acceptance probability of this change is
 the fraction of the phi/psi probability before and after changing the
 single angle in the particular residue. There is a maximum of 100
 iterations. It is therefore theoretically possible, that nothing happens
@@ -300,12 +304,12 @@ when a new step should be proposed</p>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>actual_positions</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Conformation to be changed</li>
-<li><strong>proposed_positions</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Changed conformation gets stored in here</li>
+<li><strong>actual_positions</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Conformation to be changed</li>
+<li><strong>proposed_positions</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Changed conformation gets stored in here</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> If size of <strong>actual_positions</strong>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> If size of <em>actual_positions</em>
 is not consistent with the internal sequence. Note, that the
 sequence itself doesn&#8217;t get checked for efficiency reasons.</p>
 </td>
@@ -317,30 +321,31 @@ sequence itself doesn&#8217;t get checked for efficiency reasons.</p>
 </dd></dl>
 
 <dl class="class">
-<dt id="promod3.loop.FragmentSampler">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">FragmentSampler</code><span class="sig-paren">(</span><em>sequence</em>, <em>fraggers</em><span class="optional">[</span>, <em>init_bb_list = BackboneList(sequence)</em>, <em>sampling_start_index = 0</em>, <em>init_fragments = 3</em>, <em>seed = 0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.FragmentSampler" title="Permalink to this definition">¶</a></dt>
-<dd><p>The FragmentSampler samples by replacing full fragments originating from a list
-of <a class="reference internal" href="structure_db.html#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code></a> objects. The region, that actually gets sampled is
-determined by <strong>sampling_start_index</strong> and number of <a class="reference internal" href="structure_db.html#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code></a> objects
-being available. All parts not covered by any fragger remain rigid.</p>
+<dt id="promod3.modelling.FragmentSampler">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">FragmentSampler</code><span class="sig-paren">(</span><em>sequence</em>, <em>fraggers</em>, <em>init_bb_list=BackboneList(sequence)</em>, <em>sampling_start_index=0</em>, <em>init_fragments=3</em>, <em>seed=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.FragmentSampler" title="Permalink to this definition">¶</a></dt>
+<dd><p>The FragmentSampler samples by replacing full fragments originating from a
+list of <a class="reference internal" href="../loop/structure_db.html#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code></a> objects. The region, that actually gets
+sampled is determined by <em>sampling_start_index</em> and number of
+<a class="reference internal" href="../loop/structure_db.html#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code></a> objects  being available. All parts not covered
+by any fragger remain rigid.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
 <li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Overall sequence</li>
-<li><strong>fraggers</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; A list of <a class="reference internal" href="structure_db.html#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code></a> objects. The first fragger
-covers the region starting at the letter
-<strong>sampling_start_index</strong> of the <strong>sequence</strong> and so on.
+<li><strong>fraggers</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; A list of <a class="reference internal" href="../loop/structure_db.html#promod3.loop.Fragger" title="promod3.loop.Fragger"><code class="xref py py-class docutils literal"><span class="pre">Fragger</span></code></a> objects. The first
+fragger covers the region starting at the letter
+<em>sampling_start_index</em> of the <em>sequence</em> and so on.
 All fraggers must contain fragments of equal size.</li>
-<li><strong>init_bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Initial conformation, that serves as a starting point for
+<li><strong>init_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"><span class="pre">BackboneList</span></code></a>) &#8211; Initial conformation, that serves as a starting point for
 sampling. The default gets constructed using the default
-constructor of <a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> and results in
-a helix.</li>
+constructor of <a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> and
+results in a helix.</li>
 <li><strong>sampling_start_index</strong> &#8211; Defines the beginning of the region, that actually
 gets sampled.</li>
 <li><strong>init_fragments</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; When calling the Initialize function, the positions get set
-to the ones of <strong>init_bb_list</strong>. This is the number of
+to the ones of <em>init_bb_list</em>. This is the number of
 fragments that gets randomly selected and inserted.</li>
 <li><strong>seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Seed for the internal random number generators</li>
 </ul>
@@ -349,24 +354,24 @@ fragments that gets randomly selected and inserted.</li>
 </tbody>
 </table>
 <dl class="method">
-<dt id="promod3.loop.FragmentSampler.Initialize">
-<code class="descname">Initialize</code><span class="sig-paren">(</span><em>bb_list</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.FragmentSampler.Initialize" title="Permalink to this definition">¶</a></dt>
-<dd><p>Sets up a new <a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> by setting the setting
-bb_list = <strong>init_bb_list</strong> and randomly replace n fragments
-with n = <strong>init_fragments</strong></p>
+<dt id="promod3.modelling.FragmentSampler.Initialize">
+<code class="descname">Initialize</code><span class="sig-paren">(</span><em>bb_list</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.FragmentSampler.Initialize" title="Permalink to this definition">¶</a></dt>
+<dd><p>Sets up a new <a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> by setting the setting
+bb_list = <em>init_bb_list</em> and randomly replace n fragments
+with n = <em>init_fragments</em></p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; The newly created conformation gets stored in here</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><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"><span class="pre">BackboneList</span></code></a>) &#8211; The newly created conformation gets stored in here</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.FragmentSampler.ProposeStep">
-<code class="descname">ProposeStep</code><span class="sig-paren">(</span><em>actual_step</em>, <em>proposed_position</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.FragmentSampler.ProposeStep" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.FragmentSampler.ProposeStep">
+<code class="descname">ProposeStep</code><span class="sig-paren">(</span><em>actual_step</em>, <em>proposed_position</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.FragmentSampler.ProposeStep" title="Permalink to this definition">¶</a></dt>
 <dd><p>Randomly selects a position and selects a random fragment from the according
 fragger object to alter the conformation.</p>
 <table class="docutils field-list" frame="void" rules="none">
@@ -374,8 +379,8 @@ fragger object to alter the conformation.</p>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>actual_positions</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Conformation to be changed</li>
-<li><strong>proposed_positions</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Changed conformation gets stored in here</li>
+<li><strong>actual_positions</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Conformation to be changed</li>
+<li><strong>proposed_positions</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Changed conformation gets stored in here</li>
 </ul>
 </td>
 </tr>
@@ -394,26 +399,27 @@ fit to a given environment. This can either be structural changes, that
 the stems of the sampled conformation overlap with given stem residues or
 or simple stem superposition in case of terminal sampling.</p>
 <dl class="class">
-<dt id="promod3.loop.CCDCloser">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">CCDCloser</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>sequence</em>, <em>torsion_sampler</em>, <em>seed</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.CCDCloser" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.CCDCloser">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">CCDCloser</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>sequence</em>, <em>torsion_sampler</em>, <em>seed</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.CCDCloser" title="Permalink to this definition">¶</a></dt>
 <dd><p>The CCDCloser applies the CCD algorithm to the sampled conformation
 to enforce the match between the conformations stem residue and
-the stems given by the closer. The <strong>torsion_sampler</strong> is used to
+the stems given by the closer. The <em>torsion_sampler</em> is used to
 avoid moving into unfavourable phi/psi ranges.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation
-should adapt. See <a class="reference internal" href="loop_closing.html#promod3.loop.CCD.CCD" title="promod3.loop.CCD.CCD"><code class="xref py py-meth docutils literal"><span class="pre">CCD()</span></code></a>.</li>
-<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation
-should adapt. See <a class="reference internal" href="loop_closing.html#promod3.loop.CCD.CCD" title="promod3.loop.CCD.CCD"><code class="xref py py-meth docutils literal"><span class="pre">CCD()</span></code></a>.</li>
+<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation
+should adapt. See <a class="reference internal" href="loop_closing.html#promod3.modelling.CCD.CCD" title="promod3.modelling.CCD.CCD"><code class="xref py py-meth docutils literal"><span class="pre">CCD()</span></code></a>.</li>
+<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation
+should adapt. See <a class="reference internal" href="loop_closing.html#promod3.modelling.CCD.CCD" title="promod3.modelling.CCD.CCD"><code class="xref py py-meth docutils literal"><span class="pre">CCD()</span></code></a>.</li>
 <li><strong>sequence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Sequence of the conformation to be closed.</li>
-<li><strong>torsion_sampler</strong> (<a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; To enforce valid phi/psi ranges. Alternatively
-you can also pass a list of <a class="reference internal" href="torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>
-objects to assign a unique torsion sampler to
-every residue of the conformation to be closed.</li>
+<li><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"><span class="pre">TorsionSampler</span></code></a> / <code class="xref py py-class docutils literal"><span class="pre">list</span></code>
+of <a class="reference internal" href="../loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>) &#8211; To enforce valid phi/psi ranges. Alternatively, you
+can also pass a list of sampler objects to assign a
+unique torsion sampler to every residue of the
+conformation to be closed.</li>
 <li><strong>seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Seed for internal random generators.</li>
 </ul>
 </td>
@@ -421,15 +427,15 @@ every residue of the conformation to be closed.</li>
 </tbody>
 </table>
 <dl class="method">
-<dt id="promod3.loop.CCDCloser.Close">
-<code class="descname">Close</code><span class="sig-paren">(</span><em>actual_positions</em>, <em>closed_positions</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.CCDCloser.Close" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.CCDCloser.Close">
+<code class="descname">Close</code><span class="sig-paren">(</span><em>actual_positions</em>, <em>closed_positions</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.CCDCloser.Close" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>actual_positions</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Conformation to be closed.</li>
-<li><strong>closed_positions</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Closed conformation gets stored in here.</li>
+<li><strong>actual_positions</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Conformation to be closed.</li>
+<li><strong>closed_positions</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Closed conformation gets stored in here.</li>
 </ul>
 </td>
 </tr>
@@ -443,8 +449,8 @@ every residue of the conformation to be closed.</li>
 </dd></dl>
 
 <dl class="class">
-<dt id="promod3.loop.DirtyCCDCloser">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">DirtyCCDCloser</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.DirtyCCDCloser" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.DirtyCCDCloser">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">DirtyCCDCloser</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.DirtyCCDCloser" title="Permalink to this definition">¶</a></dt>
 <dd><p>The DirtyCCDCloser applies the CCD algorithm to the sampled conformation
 to enforce the match between the conformations stem residue and
 the stems given by the closer.</p>
@@ -453,9 +459,9 @@ the stems given by the closer.</p>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation
+<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation
 should adapt.</li>
-<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation
+<li><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation
 should adapt.</li>
 </ul>
 </td>
@@ -463,15 +469,15 @@ should adapt.</li>
 </tbody>
 </table>
 <dl class="method">
-<dt id="promod3.loop.DirtyCCDCloser.Close">
-<code class="descname">Close</code><span class="sig-paren">(</span><em>actual_positions</em>, <em>closed_positions</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.DirtyCCDCloser.Close" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.DirtyCCDCloser.Close">
+<code class="descname">Close</code><span class="sig-paren">(</span><em>actual_positions</em>, <em>closed_positions</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.DirtyCCDCloser.Close" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>actual_positions</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Conformation to be closed.</li>
-<li><strong>closed_positions</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Closed conformation gets stored in here.</li>
+<li><strong>actual_positions</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Conformation to be closed.</li>
+<li><strong>closed_positions</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Closed conformation gets stored in here.</li>
 </ul>
 </td>
 </tr>
@@ -485,8 +491,8 @@ should adapt.</li>
 </dd></dl>
 
 <dl class="class">
-<dt id="promod3.loop.KICCloser">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">KICCloser</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>seed</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.KICCloser" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.KICCloser">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">KICCloser</code><span class="sig-paren">(</span><em>n_stem</em>, <em>c_stem</em>, <em>seed</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.KICCloser" title="Permalink to this definition">¶</a></dt>
 <dd><p>The KIC closer randomly picks three pivot residues in the conformation
 to be closed and applies the KIC algorithm. KIC gives up to 16 possible
 solutions. The KICCloser simply picks the first one.</p>
@@ -495,7 +501,7 @@ solutions. The KICCloser simply picks the first one.</p>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation should
+<li><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation should
 adapt.</li>
 <li><strong>c_stem</strong> &#8211; Defining stem positions the closed conformation should
 adapt.</li>
@@ -506,15 +512,15 @@ adapt.</li>
 </tbody>
 </table>
 <dl class="method">
-<dt id="promod3.loop.KICCloser.Close">
-<code class="descname">Close</code><span class="sig-paren">(</span><em>actual_positions</em>, <em>closed_positions</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.KICCloser.Close" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.KICCloser.Close">
+<code class="descname">Close</code><span class="sig-paren">(</span><em>actual_positions</em>, <em>closed_positions</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.KICCloser.Close" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>actual_positions</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Conformation to be closed.</li>
-<li><strong>closed_positions</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Closed conformation gets stored in here.</li>
+<li><strong>actual_positions</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Conformation to be closed.</li>
+<li><strong>closed_positions</strong> (<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Closed conformation gets stored in here.</li>
 </ul>
 </td>
 </tr>
@@ -528,15 +534,15 @@ adapt.</li>
 </dd></dl>
 
 <dl class="class">
-<dt id="promod3.loop.NTerminalCloser">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">NTerminalCloser</code><span class="sig-paren">(</span><em>c_stem</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.NTerminalCloser" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.NTerminalCloser">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">NTerminalCloser</code><span class="sig-paren">(</span><em>c_stem</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.NTerminalCloser" title="Permalink to this definition">¶</a></dt>
 <dd><p>The NTerminalCloser simply takes the conformation and closes by superposing
 the c_stem with the desired positions.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation should
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>c_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation should
 adapt.</td>
 </tr>
 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Whether closing was successful</td>
@@ -546,15 +552,15 @@ adapt.</td>
 </dd></dl>
 
 <dl class="class">
-<dt id="promod3.loop.CTerminalCloser">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">CTerminalCloser</code><span class="sig-paren">(</span><em>n_stem</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.CTerminalCloser" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.CTerminalCloser">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">CTerminalCloser</code><span class="sig-paren">(</span><em>n_stem</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.CTerminalCloser" title="Permalink to this definition">¶</a></dt>
 <dd><p>The CTerminalCloser simply takes the conformation and closes by superposing
 the n_stem with the desired positions.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation should
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>n_stem</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Defining stem positions the closed conformation should
 adapt.</td>
 </tr>
 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Whether closing was successful</td>
@@ -569,44 +575,45 @@ adapt.</td>
 <p>The scorer asses a proposed conformation and are intended to return a pseudo
 energy, the lower the better.</p>
 <dl class="class">
-<dt id="promod3.loop.LinearScorer">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">LinearScorer</code><span class="sig-paren">(</span><em>scorer</em>, <em>start_resnum</em>, <em>chain_index</em>, <em>weights</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LinearScorer" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.LinearScorer">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">LinearScorer</code><span class="sig-paren">(</span><em>scorer</em>, <em>start_resnum</em>, <em>chain_idx</em>, <em>linear_weights</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LinearScorer" title="Permalink to this definition">¶</a></dt>
 <dd><p>The LinearScorer allows to combine the scores available from
-<a class="reference internal" href="backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a> in a linear manner.</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"><span class="pre">BackboneOverallScorer</span></code></a> in a linear manner. See
+<a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer.CalculateLinearCombination" title="promod3.scoring.BackboneOverallScorer.CalculateLinearCombination"><code class="xref py py-meth docutils literal"><span class="pre">CalculateLinearCombination()</span></code></a> for a
+detailed description of the arguments.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>scorer</strong> (<a class="reference internal" href="backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>) &#8211; Scorer Object with set environment for the particular loop
+<li><strong>scorer</strong> (<a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer" title="promod3.scoring.BackboneOverallScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneOverallScorer</span></code></a>) &#8211; Scorer Object with set environment for the particular loop
 modelling problem.</li>
-<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The starting residue number of the loop. Note, that the
-residue numbers start from one.</li>
-<li><strong>chain_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The chain the loop belongs to.</li>
-<li><strong>weights</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a>) &#8211; Assigns every score, that should be combined a linear
-weight. Key of dict is a score name and can be any of:
-[&#8220;cbeta&#8221;, &#8220;clash&#8221;, &#8220;torsion&#8221;, &#8220;cb_packing&#8221;, &#8220;hbond&#8221;, &#8220;ss_agreement&#8221;,
-&#8220;reduced&#8221;, &#8220;contact&#8221;, &#8220;constraint&#8221;].
-An additional possible key is: &#8220;intercept&#8221;.</li>
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Res. number defining the position in the SEQRES.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of chain the loop(s) belong to.</li>
+<li><strong>linear_weights</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a> (keys: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>,
+values: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)) &#8211; Weights for each desired scorer.</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if there is an invalid weight name.</p>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>linear_weights</em> has a <em>key</em> for
+which no scorer exists</p>
 </td>
 </tr>
 </tbody>
 </table>
 <dl class="method">
-<dt id="promod3.loop.LinearScorer.GetScore">
-<code class="descname">GetScore</code><span class="sig-paren">(</span><em>bb_list</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.LinearScorer.GetScore" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.LinearScorer.GetScore">
+<code class="descname">GetScore</code><span class="sig-paren">(</span><em>bb_list</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.LinearScorer.GetScore" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bb_list</strong> (<a class="reference internal" href="backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Current loop conformation to be scored.</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><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"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to be scored.</td>
 </tr>
 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A linear combination of the scores</td>
 </tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
 </tbody>
 </table>
 </dd></dl>
@@ -620,11 +627,11 @@ An additional possible key is: &#8220;intercept&#8221;.</li>
 They&#8217;re intended to deliver steadily decreasing temperatures with calls
 to their GetTemperature function.</p>
 <dl class="class">
-<dt id="promod3.loop.ExponentialCooler">
-<em class="property">class </em><code class="descclassname">promod3.loop.</code><code class="descname">ExponentialCooler</code><span class="sig-paren">(</span><em>change_frequency</em>, <em>start_temperature</em>, <em>cooling_factor</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ExponentialCooler" title="Permalink to this definition">¶</a></dt>
-<dd><p>The exponential cooler starts with a given <strong>start_temperature</strong> and counts the
-calls to its GetTemperature function. According to the <strong>change_frequency</strong>,
-the returned temperature gets multiplied by the <strong>cooling_factor</strong>.</p>
+<dt id="promod3.modelling.ExponentialCooler">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">ExponentialCooler</code><span class="sig-paren">(</span><em>change_frequency</em>, <em>start_temperature</em>, <em>cooling_factor</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ExponentialCooler" title="Permalink to this definition">¶</a></dt>
+<dd><p>The exponential cooler starts with a given <em>start_temperature</em> and counts the
+calls to its GetTemperature function. According to the <em>change_frequency</em>,
+the returned temperature gets multiplied by the <em>cooling_factor</em>.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
@@ -639,8 +646,8 @@ the returned temperature gets multiplied by the <strong>cooling_factor</strong>.
 </tbody>
 </table>
 <dl class="method">
-<dt id="promod3.loop.ExponentialCooler.GetTemperature">
-<code class="descname">GetTemperature</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ExponentialCooler.GetTemperature" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.ExponentialCooler.GetTemperature">
+<code class="descname">GetTemperature</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ExponentialCooler.GetTemperature" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
@@ -652,9 +659,9 @@ the returned temperature gets multiplied by the <strong>cooling_factor</strong>.
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.loop.ExponentialCooler.Reset">
-<code class="descname">Reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.loop.ExponentialCooler.Reset" title="Permalink to this definition">¶</a></dt>
-<dd><p>Sets current temperature back to <strong>start_temperature</strong></p>
+<dt id="promod3.modelling.ExponentialCooler.Reset">
+<code class="descname">Reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.ExponentialCooler.Reset" title="Permalink to this definition">¶</a></dt>
+<dd><p>Sets current temperature back to <em>start_temperature</em></p>
 </dd></dl>
 
 </dd></dl>
@@ -670,7 +677,7 @@ the returned temperature gets multiplied by the <strong>cooling_factor</strong>.
         <div class="sphinxsidebarwrapper">
   <h3><a href="../index.html">Table Of Contents</a></h3>
   <ul>
-<li><a class="reference internal" href="#">Monte Carlo Sampling</a><ul>
+<li><a class="reference internal" href="#">Generating Loops De Novo</a><ul>
 <li><a class="reference internal" href="#sampler-object">Sampler Object</a></li>
 <li><a class="reference internal" href="#closer-object">Closer Object</a></li>
 <li><a class="reference internal" href="#scorer-object">Scorer Object</a></li>
@@ -683,9 +690,9 @@ the returned temperature gets multiplied by the <strong>cooling_factor</strong>.
 <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="docutils literal"><span class="pre">loop</span></code> - Loop Modelling</a><ul>
-      <li>Previous: <a href="backbone_loop_score.html" title="previous chapter">Loop Scoring</a></li>
-      <li>Next: <a href="load_loop_objects.html" title="next chapter">Load Loop Objects</a></li>
+  <li><a href="index.html"><code class="docutils literal"><span class="pre">modelling</span></code> - Protein Modelling</a><ul>
+      <li>Previous: <a href="loop_closing.html" title="previous chapter">Fitting Loops Into Gaps</a></li>
+      <li>Next: <a href="sidechain_reconstruction.html" title="next chapter">Sidechain Reconstruction</a></li>
   </ul></li>
   </ul></li>
   </ul></li>
@@ -694,7 +701,7 @@ the returned temperature gets multiplied by the <strong>cooling_factor</strong>.
   <div role="note" aria-label="source link">
     <h3>This Page</h3>
     <ul class="this-page-menu">
-      <li><a href="../_sources/loop/monte_carlo.txt"
+      <li><a href="../_sources/modelling/monte_carlo.txt"
             rel="nofollow">Show Source</a></li>
     </ul>
    </div>
@@ -716,14 +723,14 @@ the returned temperature gets multiplied by the <strong>cooling_factor</strong>.
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
       &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
       
       |
-      <a href="../_sources/loop/monte_carlo.txt"
+      <a href="../_sources/modelling/monte_carlo.txt"
           rel="nofollow">Page source</a>
     </div>
 
diff --git a/doc/html/modelling/pipeline.html b/doc/html/modelling/pipeline.html
new file mode 100644
index 00000000..2e88e1a5
--- /dev/null
+++ b/doc/html/modelling/pipeline.html
@@ -0,0 +1,1245 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Modelling Pipeline &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="modelling - Protein Modelling" href="index.html" />
+    <link rel="next" title="Model Checking" href="model_checking.html" />
+    <link rel="prev" title="modelling - Protein Modelling" href="index.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <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>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"><span class="pre">BuildRawModel()</span></code></a> function)</li>
+<li>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"><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"><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"><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"><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"><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"><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"><span class="pre">CloseGaps()</span></code></a> that calls all these functions using predefined
+heuristics)</li>
+<li>Build sidechains (see <a class="reference internal" href="#promod3.modelling.BuildSidechains" title="promod3.modelling.BuildSidechains"><code class="xref py py-func docutils literal"><span class="pre">BuildSidechains()</span></code></a> function)</li>
+<li>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"><span class="pre">MinimizeModelEnergy()</span></code></a> function)</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"><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-python" id="modelling-steps-example"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span>
+
+<span class="c"># 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="c"># 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="s">&#39;data/1crn_cut.pdb&#39;</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="s">&#39;data/1crn.fasta&#39;</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="c"># we&#39;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="c"># 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="c"># 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="c"># 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="c"># 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="c"># 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="s">&#39;model.pdb&#39;</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="descclassname">promod3.modelling.</code><code class="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"><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="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"><span class="pre">seqres</span></code></a>) and (if they were included) a
+chain named &#8216;_&#8217; 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"><span class="pre">seqres</span></code></a> items with the same indexing and the optional ligand
+chain follows afterwards.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">EntityHandle</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.ModellingHandle.gaps">
+<code class="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>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference internal" href="gap_handling.html#promod3.modelling.StructuralGapList" title="promod3.modelling.StructuralGapList"><code class="xref py py-class docutils literal"><span class="pre">StructuralGapList</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.ModellingHandle.seqres">
+<code class="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="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">SequenceHandle</span></code></a> for each chain
+of the target protein.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.SequenceList" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">SequenceList</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.ModellingHandle.profiles">
+<code class="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="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><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"><span class="pre">seqres</span></code></a>). Please note, that this
+attribute won&#8217;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"><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"><span class="pre">SetSequenceProfiles()</span></code></a>,  to ensure consistency with the seqres.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.ModellingHandle.psipred_predictions">
+<code class="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"><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"><span class="pre">seqres</span></code></a>). Please
+note, that this attribute won&#8217;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"><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"><span class="pre">SetPsipredPredictions()</span></code></a>,  to ensure
+consistency with the seqres.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> 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"><span class="pre">PsipredPrediction</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.ModellingHandle.backbone_scorer_env">
+<code class="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"><span class="pre">SetupDefaultBackboneScoring()</span></code></a> when needed. Additional
+information can be added to the environment before running the pipeline
+steps.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><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"><span class="pre">BackboneScoreEnv</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.ModellingHandle.backbone_scorer">
+<code class="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"><span class="pre">SetupDefaultBackboneScoring()</span></code></a> when needed.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.BackboneOverallScorer" title="promod3.scoring.BackboneOverallScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneOverallScorer</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.ModellingHandle.all_atom_scorer_env">
+<code class="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"><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>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.ModellingHandle.all_atom_scorer">
+<code class="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"><span class="pre">SetupDefaultAllAtomScoring()</span></code></a> when needed.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><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"><span class="pre">AllAtomOverallScorer</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.ModellingHandle.all_atom_sidechain_env">
+<code class="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"><span class="pre">SetupDefaultAllAtomScoring()</span></code></a> when
+needed.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.ModellingHandle.sidechain_reconstructor">
+<code class="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"><span class="pre">SetupDefaultAllAtomScoring()</span></code></a> when
+needed.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference internal" href="sidechain_reconstruction.html#promod3.modelling.SidechainReconstructor" title="promod3.modelling.SidechainReconstructor"><code class="xref py py-class docutils literal"><span class="pre">SidechainReconstructor</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.ModellingHandle.Copy">
+<code class="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"><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"><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"><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"><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"><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"><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"><span class="pre">sidechain_reconstructor</span></code></a>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A deep copy of the current handle</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.BuildRawModel">
+<code class="descclassname">promod3.modelling.</code><code class="descname">BuildRawModel</code><span class="sig-paren">(</span><em>aln</em>, <em>include_ligands=False</em>, <em>chain_names=            &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz&quot;</em>, <em>spdbv_style=False</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="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityView" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">EntityView</span></code></a> attached.</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>Selenium methionine residues are converted to methionine</li>
+<li>Side chains which contain all atoms of the parent amino acid, e.g.
+phosphoserine are copied as a whole with the modifications stripped off.</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"><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>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>aln</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.AlignmentHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">AlignmentHandle</span></code></a> / <code class="xref py py-class docutils literal"><span class="pre">AlignmentList</span></code>) &#8211; Single alignment handle for raw model with single chain or
+list of alignment handles for raw model with multiple chains.</li>
+<li><strong>include_ligands</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; 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 &#8216;_&#8217; (as set
+in SMTL). All ligands are added to a new chain named
+&#8216;_&#8217;.</li>
+<li><strong>chain_names</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Chains are named by a single chanacter taken from this.</li>
+<li><strong>spdbv_style</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; True, if we need a model in the old SPDBV style.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Raw (pseudo) model from the alignment.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first">A <code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code> when:</p>
+<ul class="last simple">
+<li>the alignments do not have two sequences</li>
+<li>the second sequence does not have an attached structure</li>
+<li>the residues of the template structure do not match with the
+alignment sequence (note that you can set an &#8220;offset&#8221; (see
+<a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.AlignmentHandle.SetSequenceOffset" title="(in OpenStructure v1.6.0)"><code class="xref py py-meth docutils literal"><span class="pre">SetSequenceOffset()</span></code></a>) for the
+template sequence (but not for the target))</li>
+<li>the target sequence has a non-zero offset (cannot be honored as
+the resulting model will always start its residue numbering at 1)</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</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="descclassname">promod3.modelling.</code><code class="descname">BuildFromRawModel</code><span class="sig-paren">(</span><em>mhandle</em>, <em>use_amber_ff=False</em>, <em>extra_force_fields=[]</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_pipeline.html#BuildFromRawModel"><span class="viewcode-link">[source]</span></a><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"><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>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"><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"><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>If the function fails to close all gaps, it will produce a warning and
+return an incomplete model.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; The prepared template coordinates loaded with the input
+alignment.</li>
+<li><strong>use_amber_ff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; if True, use the AMBER force field instead of the def.
+CHARMM one (see <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/forcefield/#ost.mol.mm.LoadAMBERForcefield" title="(in OpenStructure v1.6.0)"><code class="xref py py-func docutils literal"><span class="pre">ost.mol.mm.LoadAMBERForcefield()</span></code></a>
+and <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/forcefield/#ost.mol.mm.LoadCHARMMForcefield" title="(in OpenStructure v1.6.0)"><code class="xref py py-func docutils literal"><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>.</li>
+<li><strong>extra_force_fields</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/forcefield/#ost.mol.mm.Forcefield" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.mm.Forcefield</span></code></a>) &#8211; 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.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Delivers the model as an OST entity.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Entity</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</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="descclassname">promod3.modelling.</code><code class="descname">SetupDefaultBackboneScoring</code><span class="sig-paren">(</span><em>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>&#8220;cb_packing&#8221;: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.CBPackingScorer" title="promod3.scoring.CBPackingScorer"><code class="xref py py-class docutils literal"><span class="pre">CBPackingScorer</span></code></a></li>
+<li>&#8220;cbeta&#8221;: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.CBetaScorer" title="promod3.scoring.CBetaScorer"><code class="xref py py-class docutils literal"><span class="pre">CBetaScorer</span></code></a></li>
+<li>&#8220;reduced&#8221;: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.ReducedScorer" title="promod3.scoring.ReducedScorer"><code class="xref py py-class docutils literal"><span class="pre">ReducedScorer</span></code></a></li>
+<li>&#8220;clash&#8221;: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.ClashScorer" title="promod3.scoring.ClashScorer"><code class="xref py py-class docutils literal"><span class="pre">ClashScorer</span></code></a></li>
+<li>&#8220;hbond&#8221;: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.HBondScorer" title="promod3.scoring.HBondScorer"><code class="xref py py-class docutils literal"><span class="pre">HBondScorer</span></code></a></li>
+<li>&#8220;ss_agreement&#8221;: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.SSAgreementScorer" title="promod3.scoring.SSAgreementScorer"><code class="xref py py-class docutils literal"><span class="pre">SSAgreementScorer</span></code></a></li>
+<li>&#8220;torsion&#8221;: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.TorsionScorer" title="promod3.scoring.TorsionScorer"><code class="xref py py-class docutils literal"><span class="pre">TorsionScorer</span></code></a></li>
+<li>&#8220;pairwise&#8221;: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.PairwiseScorer" title="promod3.scoring.PairwiseScorer"><code class="xref py py-class docutils literal"><span class="pre">PairwiseScorer</span></code></a></li>
+<li>&#8220;density&#8221;: <a class="reference internal" href="../scoring/backbone_scorers.html#promod3.scoring.DensityScorer" title="promod3.scoring.DensityScorer"><code class="xref py py-class docutils literal"><span class="pre">DensityScorer</span></code></a></li>
+</ul>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; 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"><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"><span class="pre">backbone_scorer_env</span></code></a> of <cite>mhandle</cite>.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.IsBackboneScoringSetUp">
+<code class="descclassname">promod3.modelling.</code><code class="descname">IsBackboneScoringSetUp</code><span class="sig-paren">(</span><em>mhandle</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.IsBackboneScoringSetUp" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">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"><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"><span class="pre">backbone_scorer_env</span></code></a> of <cite>mhandle</cite> are set.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle to check.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.SetupDefaultAllAtomScoring">
+<code class="descclassname">promod3.modelling.</code><code class="descname">SetupDefaultAllAtomScoring</code><span class="sig-paren">(</span><em>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>&#8220;aa_interaction&#8221;: <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"><span class="pre">AllAtomInteractionScorer</span></code></a></li>
+<li>&#8220;aa_packing&#8221;: <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"><span class="pre">AllAtomPackingScorer</span></code></a></li>
+<li>&#8220;aa_clash&#8221;: <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"><span class="pre">AllAtomClashScorer</span></code></a></li>
+</ul>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; 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"><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"><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"><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"><span class="pre">sidechain_reconstructor</span></code></a>.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.IsAllAtomScoringSetUp">
+<code class="descclassname">promod3.modelling.</code><code class="descname">IsAllAtomScoringSetUp</code><span class="sig-paren">(</span><em>mhandle</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.IsAllAtomScoringSetUp" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">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"><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"><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"><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"><span class="pre">sidechain_reconstructor</span></code></a> of <cite>mhandle</cite> are set.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle to check.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.InsertLoop">
+<code class="descclassname">promod3.modelling.</code><code class="descname">InsertLoop</code><span class="sig-paren">(</span><em>mhandle</em>, <em>bb_list</em>, <em>start_resnum</em>, <em>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"><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"><span class="pre">InsertLoopClearGaps()</span></code></a>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><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"><span class="pre">BackboneList</span></code></a>) &#8211; Loop to insert (backbone only).</li>
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Res. number defining the start position in the SEQRES.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of chain the loop belongs to.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.RemoveTerminalGaps">
+<code class="descclassname">promod3.modelling.</code><code class="descname">RemoveTerminalGaps</code><span class="sig-paren">(</span><em>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>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Number of gaps which were removed.</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.ReorderGaps">
+<code class="descclassname">promod3.modelling.</code><code class="descname">ReorderGaps</code><span class="sig-paren">(</span><em>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="descclassname">promod3.modelling.</code><code class="descname">MergeMHandle</code><span class="sig-paren">(</span><em>source_mhandle</em>, <em>target_mhandle</em>, <em>source_chain_idx</em>, <em>target_chain_idx</em>, <em>start_resnum</em>, <em>end_resnum</em>, <em>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>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>source_mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Source of structural information and gaps</li>
+<li><strong>target_mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Structural information and gaps will be copied in here</li>
+<li><strong>source_chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; This is the chain where the info comes from</li>
+<li><strong>target_chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; This is the chain where the info goes to</li>
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; First residue of the copied stretch</li>
+<li><strong>end_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Last residue of the copied stretch</li>
+<li><strong>transform</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/mat/#ost.geom.Mat4" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Mat4</span></code></a>) &#8211; Transformation to be applied to all atom positions when
+they&#8217;re copied over</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first">A <code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code> when:</p>
+<ul class="last simple">
+<li>the chain indices are invalid</li>
+<li>the SEQRES of the specified chains do not match</li>
+<li>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</li>
+<li>a gap in the <strong>source_mhandle</strong> encloses the residues specified by
+<strong>start_resnum</strong> and <strong>end_resnum</strong></li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.SetSequenceProfiles">
+<code class="descclassname">promod3.modelling.</code><code class="descname">SetSequenceProfiles</code><span class="sig-paren">(</span><em>mhandle</em>, <em>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"><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"><span class="pre">seqres</span></code></a>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Will have the profiles attached afterwards</li>
+<li><strong>profiles</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.ProfileHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.ProfileHandle</span></code></a>) &#8211; The sequence profiles to attach</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><code class="xref py py-class docutils literal"><span class="pre">ValueError</span></code> when the given <strong>profiles</strong> are not consistent
+with seqres in <strong>mhandle</strong></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.SetPsipredPredictions">
+<code class="descclassname">promod3.modelling.</code><code class="descname">SetPsipredPredictions</code><span class="sig-paren">(</span><em>mhandle</em>, <em>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"><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"><span class="pre">seqres</span></code></a>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Will have the predictions attached afterwards</li>
+<li><strong>predictions</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> 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"><span class="pre">PsipredPrediction</span></code></a>) &#8211; The predictions to attach</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><code class="xref py py-class docutils literal"><span class="pre">ValueError</span></code> when the given <strong>predictions</strong> are not consistent
+with seqres in <strong>mhandle</strong></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.CloseGaps">
+<code class="descclassname">promod3.modelling.</code><code class="descname">CloseGaps</code><span class="sig-paren">(</span><em>mhandle</em>, <em>merge_distance=4</em>, <em>fragment_db=None</em>, <em>structure_db=None</em>, <em>torsion_sampler=None</em>, <em>fragger_handles=None</em>, <em>chain_idx=None</em>, <em>resnum_range=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#CloseGaps"><span class="viewcode-link">[source]</span></a><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>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"><span class="pre">CloseSmallDeletions()</span></code></a>)</li>
+<li>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"><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"><span class="pre">FillLoopsByDatabase()</span></code></a>)</li>
+<li>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"><span class="pre">FillLoopsByMonteCarlo()</span></code></a>)</li>
+<li>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"><span class="pre">CloseLargeDeletions()</span></code></a>)</li>
+</ul>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><strong>merge_distance</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Max. merge distance when performing the database 
+approach</li>
+<li><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"><span class="pre">FragDB</span></code></a>) &#8211; Database for searching fragments in database 
+approach, must be consistent with provided
+<strong>structure_db</strong>. A default is loaded if None.</li>
+<li><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"><span class="pre">StructureDB</span></code></a>) &#8211; Structure db from which the <strong>fragment_db</strong> gets
+it&#8217;s structural information. A default is loaded 
+if None.</li>
+<li><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"><span class="pre">promod3.loop.TorsionSampler</span></code></a>) &#8211; Used as parameter for <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal"><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"><span class="pre">FillLoopsByMonteCarlo()</span></code></a> A default one is 
+loaded if None.</li>
+<li><strong>fragger_handles</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; 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"><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"><span class="pre">FillLoopsByMonteCarlo()</span></code></a>
+gets executed.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If not None, only gaps from chain with given index get
+processed</li>
+<li><strong>resnum_range</strong> (<code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> containing two <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If not None, only gaps within this resnum range get
+processed.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.CloseSmallDeletions">
+<code class="descclassname">promod3.modelling.</code><code class="descname">CloseSmallDeletions</code><span class="sig-paren">(</span><em>mhandle</em>, <em>max_extension=9</em>, <em>clash_thresh=1.0</em>, <em>e_thresh=200</em>, <em>use_scoring_extender=True</em>, <em>use_full_extender=True</em>, <em>chain_idx=None</em>, <em>resnum_range=None</em>, <em>ff_lookup=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#CloseSmallDeletions"><span class="viewcode-link">[source]</span></a><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"><span class="pre">mhandle.gaps</span></code>.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">modelling</span>
+
+<span class="c"># 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="s">&#39;data/gly.pdb&#39;</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="s">&#39;trg&#39;</span><span class="p">,</span> <span class="s">&#39;GGG-GGG&#39;</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="s">&#39;tpl&#39;</span><span class="p">,</span> <span class="s">&#39;GGGAGGG&#39;</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="c"># close small deletion</span>
+<span class="k">print</span> <span class="s">&#39;Number of gaps before: </span><span class="si">%d</span><span class="s">&#39;</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="k">print</span> <span class="s">&#39;Number of gaps after: </span><span class="si">%d</span><span class="s">&#39;</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>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><strong>max_extension</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; 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"><span class="pre">GapExtender</span></code></a>)</li>
+<li><strong>clash_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Threshold for the backbone clash score. Acceptance
+means being lower than this.</li>
+<li><strong>e_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Potential energy should be lower than this.</li>
+<li><strong>use_scoring_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; 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"><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"><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"><span class="pre">BuildRawModel()</span></code></a> is
+called (e.g. with <a class="reference external" href="http://www.openstructure.org/docs/dev/bindings/dssp/#module-ost.bindings.dssp" title="(in OpenStructure v1.6.0)"><code class="xref py py-mod docutils literal"><span class="pre">ost.bindings.dssp</span></code></a>).</li>
+<li><strong>use_full_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; 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"><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"><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.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If not None, only gaps from chain with given index get
+processed</li>
+<li><strong>resnum_range</strong> (<code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> containing two <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If not None, only gaps within this resnum range get
+processed.</li>
+<li><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"><span class="pre">promod3.loop.ForcefieldLookup</span></code></a>) &#8211; 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"><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"><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"><span class="pre">promod3.loop.ForcefieldLookup.GetDefault()</span></code></a> 
+gets used.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.MergeGapsByDistance">
+<code class="descclassname">promod3.modelling.</code><code class="descname">MergeGapsByDistance</code><span class="sig-paren">(</span><em>mhandle</em>, <em>distance</em>, <em>chain_idx=None</em>, <em>resnum_range=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#MergeGapsByDistance"><span class="viewcode-link">[source]</span></a><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-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">modelling</span>
+
+<span class="c"># 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="s">&#39;data/1crn_cut.pdb&#39;</span><span class="p">)</span>
+<span class="n">seq_trg</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEAICATGYTCIIIPGATCPGDYAN&#39;</span>
+<span class="n">seq_tpl</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEA----G--CIIIPGATCPGDYAN&#39;</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="s">&#39;trg&#39;</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="s">&#39;tpl&#39;</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="c"># merge gaps</span>
+<span class="k">print</span> <span class="s">&#39;Number of gaps before: </span><span class="si">%d</span><span class="s">&#39;</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="k">print</span> <span class="s">&#39;Number of gaps after: </span><span class="si">%d</span><span class="s">&#39;</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>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><strong>distance</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The max. no. of residues between two gaps up to which
+merge happens.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If not None, only gaps from chain with given index get
+processed</li>
+<li><strong>resnum_range</strong> (<code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> containing two <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If not None, two gaps only get merged if they&#8217;re
+both in this resnum range.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.FillLoopsByDatabase">
+<code class="descclassname">promod3.modelling.</code><code class="descname">FillLoopsByDatabase</code><span class="sig-paren">(</span><em>mhandle</em>, <em>fragment_db</em>, <em>structure_db</em>, <em>torsion_sampler</em>, <em>max_loops_to_search=40</em>, <em>min_loops_required=4</em>, <em>max_res_extension=-1</em>, <em>extended_search=True</em>, <em>use_scoring_extender=True</em>, <em>use_full_extender=True</em>, <em>score_variant=0</em>, <em>ring_punch_detection=1</em>, <em>chain_idx=None</em>, <em>resnum_range=None</em>, <em>max_num_all_atom=0</em>, <em>clash_thresh=-1</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#FillLoopsByDatabase"><span class="viewcode-link">[source]</span></a><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-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span>
+
+<span class="c"># 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="s">&#39;data/1crn_cut.pdb&#39;</span><span class="p">)</span>
+<span class="n">seq_trg</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEAICATYTGCIIIPGATCPGDYAN&#39;</span>
+<span class="n">seq_tpl</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEA------GCIIIPGATCPGDYAN&#39;</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="s">&#39;trg&#39;</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="s">&#39;tpl&#39;</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="c"># close gaps</span>
+<span class="k">print</span> <span class="s">&#39;Number of gaps before: </span><span class="si">%d</span><span class="s">&#39;</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="k">print</span> <span class="s">&#39;Number of gaps after: </span><span class="si">%d</span><span class="s">&#39;</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>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><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"><span class="pre">FragDB</span></code></a>) &#8211; A fragment database coupled to the <em>structure_db</em>.</li>
+<li><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"><span class="pre">StructureDB</span></code></a>) &#8211; Backbone/profile data.</li>
+<li><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"><span class="pre">TorsionSampler</span></code></a>) &#8211; A sampler for torsion angles.</li>
+<li><strong>max_loops_to_search</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Define how many candidates are &#8216;enough&#8217; to be
+evaluated per loop. The actual found candidates
+may be more (if we found &#8216;enough&#8217;) or less (if
+not enough candidates exist) of this number.</li>
+<li><strong>min_loops_required</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; 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"><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.</li>
+<li><strong>max_res_extension</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; 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).</li>
+<li><strong>extended_search</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; 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"><span class="pre">FillFromDatabase()</span></code></a>).
+The candidates are still scored and evaluated the
+same though (only more of them considered).</li>
+<li><strong>use_scoring_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; 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"><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"><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"><span class="pre">CloseSmallDeletions()</span></code></a>.</li>
+<li><strong>use_full_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; 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"><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"><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"><span class="pre">CloseSmallDeletions()</span></code></a>.</li>
+<li><strong>score_variant</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; <p>How to score loop candidates. Options:</p>
+<ul>
+<li><strong>0</strong>: put frame of backbone residues enclosing all
+candidates and score frame. This will also &#8220;score&#8221;
+non-modelled residues!</li>
+<li><strong>1</strong>: score candidates directly</li>
+<li><strong>2</strong>: like <strong>1</strong> but penalize length of candidate</li>
+</ul>
+</li>
+<li><strong>ring_punch_detection</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; <p>How to deal with ring punchings. Options:</p>
+<ul>
+<li><strong>0</strong>: not at all (fastest)</li>
+<li><strong>1</strong>: check for punchings with existing rings</li>
+<li><strong>2</strong>: check incl. sidechain for loop cand.</li>
+</ul>
+</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If not None, only gaps from chain with given index get
+processed</li>
+<li><strong>resnum_range</strong> (<code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> containing two <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If not None, only gaps within this resnum range get
+processed</li>
+<li><strong>max_num_all_atom</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If &gt; 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.</li>
+<li><strong>clash_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; If &gt; 0, we only keep loop candidates which have a
+backbone clash score lower than this.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.FillLoopsByMonteCarlo">
+<code class="descclassname">promod3.modelling.</code><code class="descname">FillLoopsByMonteCarlo</code><span class="sig-paren">(</span><em>mhandle</em>, <em>torsion_sampler</em>, <em>max_loops_to_search=6</em>, <em>max_extension=30</em>, <em>mc_num_loops=2</em>, <em>mc_steps=5000</em>, <em>use_scoring_extender=True</em>, <em>use_full_extender=True</em>, <em>score_variant=0</em>, <em>ring_punch_detection=1</em>, <em>fragger_handles=None</em>, <em>chain_idx=None</em>, <em>resnum_range=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#FillLoopsByMonteCarlo"><span class="viewcode-link">[source]</span></a><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 &#8220;last-resort&#8221; 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"><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"><span class="pre">Fragger</span></code></a> lists. The latter
+is only used if the gap length is &gt;= the length of fragments stored.</p>
+<p>This function cannot fill gaps at C- or N-terminal.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span>
+
+<span class="c"># 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="s">&#39;data/1crn_cut.pdb&#39;</span><span class="p">)</span>
+<span class="n">seq_trg</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEAICATYTGCIIIPGATCPGDYAN&#39;</span>
+<span class="n">seq_tpl</span> <span class="o">=</span> <span class="s">&#39;TTCCPSIVARSNFNVCRLPGTPEA------GCIIIPGATCPGDYAN&#39;</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="s">&#39;trg&#39;</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="s">&#39;tpl&#39;</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="c"># close gaps</span>
+<span class="k">print</span> <span class="s">&#39;Number of gaps before: </span><span class="si">%d</span><span class="s">&#39;</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="k">print</span> <span class="s">&#39;Number of gaps after: </span><span class="si">%d</span><span class="s">&#39;</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>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><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"><span class="pre">TorsionSampler</span></code></a>) &#8211; A sampler for torsion angles.</li>
+<li><strong>max_loops_to_search</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Define how many candidates are &#8216;enough&#8217; to be
+evaluated per loop.</li>
+<li><strong>max_extension</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; 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"><span class="pre">GapExtender</span></code></a>)</li>
+<li><strong>mc_num_loops</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; 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"><span class="pre">FillFromMonteCarloSampler()</span></code></a>)</li>
+<li><strong>mc_steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; 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"><span class="pre">FillFromMonteCarloSampler()</span></code></a>)</li>
+<li><strong>use_scoring_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; 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"><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"><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"><span class="pre">CloseSmallDeletions()</span></code></a>.</li>
+<li><strong>use_full_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; 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"><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"><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"><span class="pre">CloseSmallDeletions()</span></code></a>.</li>
+<li><strong>score_variant</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; 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"><span class="pre">FillLoopsByDatabase()</span></code></a>.</li>
+<li><strong>ring_punch_detection</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; 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"><span class="pre">FillLoopsByDatabase()</span></code></a>.</li>
+<li><strong>fragger_handles</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="algorithms.html#promod3.modelling.FraggerHandle" title="promod3.modelling.FraggerHandle"><code class="xref py py-class docutils literal"><span class="pre">FraggerHandle</span></code></a>) &#8211; Either None (no fragger sampling used) or one
+fragger handle for each chain in <em>mhandle</em>.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If not None, only gaps from chain with given index get
+processed</li>
+<li><strong>resnum_range</strong> (<code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> containing two <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If not None, only gaps within this resnum range get
+processed</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.CloseLargeDeletions">
+<code class="descclassname">promod3.modelling.</code><code class="descname">CloseLargeDeletions</code><span class="sig-paren">(</span><em>mhandle</em>, <em>structure_db</em>, <em>linker_length=8</em>, <em>num_fragments=500</em>, <em>use_scoring_extender=True</em>, <em>use_full_extender=True</em>, <em>chain_idx=None</em>, <em>resnum_range=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#CloseLargeDeletions"><span class="viewcode-link">[source]</span></a><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 &#8220;last-resort&#8221; 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>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><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"><span class="pre">StructureDB</span></code></a>) &#8211; The database from which to extract fragments for
+the linker region.</li>
+<li><strong>linker_length</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Desired length (in residues w/o stems) for the
+linker. This may be shorter if extender cannot
+extend further.</li>
+<li><strong>num_fragments</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of fragments to sample the linker.</li>
+<li><strong>use_scoring_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; 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"><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"><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"><span class="pre">CloseSmallDeletions()</span></code></a>.</li>
+<li><strong>use_full_extender</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; 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"><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"><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"><span class="pre">CloseSmallDeletions()</span></code></a>.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If not None, only gaps from chain with given index get
+processed</li>
+<li><strong>resnum_range</strong> (<code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> containing two <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If not None, only gaps within this resnum range get
+processed</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.ModelTermini">
+<code class="descclassname">promod3.modelling.</code><code class="descname">ModelTermini</code><span class="sig-paren">(</span><em>mhandle</em>, <em>torsion_sampler</em>, <em>fragger_handles=None</em>, <em>mc_num_loops=20</em>, <em>mc_steps=5000</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_closegaps.html#ModelTermini"><span class="viewcode-link">[source]</span></a><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"><span class="pre">Fragger</span></code></a> lists. The latter
+is only used if the gap length is &gt;= the length of fragments stored.</p>
+<p>Terminal gaps of length 1 are ignored by this function!</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">modelling</span><span class="p">,</span> <span class="n">loop</span>
+
+<span class="c"># 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="s">&#39;data/gly.pdb&#39;</span><span class="p">)</span>
+<span class="n">seq_trg</span> <span class="o">=</span> <span class="s">&#39;AAAAGGGGGGGGGGGGGGGGGGGGAAAAAA&#39;</span>
+<span class="n">seq_tpl</span> <span class="o">=</span> <span class="s">&#39;----GGGGGGGGGGGGGGGGGGGG------&#39;</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="s">&#39;trg&#39;</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="s">&#39;tpl&#39;</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="c"># close gaps</span>
+<span class="k">print</span> <span class="s">&#39;Number of gaps before: </span><span class="si">%d</span><span class="s">&#39;</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="k">print</span> <span class="s">&#39;Number of gaps after: </span><span class="si">%d</span><span class="s">&#39;</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>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><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"><span class="pre">TorsionSampler</span></code></a>) &#8211; A sampler for torsion angles.</li>
+<li><strong>fragger_handles</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="algorithms.html#promod3.modelling.FraggerHandle" title="promod3.modelling.FraggerHandle"><code class="xref py py-class docutils literal"><span class="pre">FraggerHandle</span></code></a>) &#8211; Either None (no fragger sampling used) or one
+fragger handle for each chain in <em>mhandle</em>.</li>
+<li><strong>mc_num_loops</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; 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"><span class="pre">FillFromMonteCarloSampler()</span></code></a>)</li>
+<li><strong>mc_steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; 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"><span class="pre">FillFromMonteCarloSampler()</span></code></a>)</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.BuildSidechains">
+<code class="descclassname">promod3.modelling.</code><code class="descname">BuildSidechains</code><span class="sig-paren">(</span><em>mhandle</em>, <em>merge_distance=4</em>, <em>fragment_db=None</em>, <em>structure_db=None</em>, <em>torsion_sampler=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_pipeline.html#BuildSidechains"><span class="viewcode-link">[source]</span></a><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"><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"><span class="pre">FillLoopsByDatabase()</span></code></a> with <em>ring_punch_detection=2</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><strong>merge_distance</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Used as parameter for <a class="reference internal" href="#promod3.modelling.MergeGapsByDistance" title="promod3.modelling.MergeGapsByDistance"><code class="xref py py-func docutils literal"><span class="pre">MergeGapsByDistance()</span></code></a>
+if ring punches are found.</li>
+<li><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"><span class="pre">FragDB</span></code></a>) &#8211; Used as parameter for <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal"><span class="pre">FillLoopsByDatabase()</span></code></a>
+if ring punches are found. A default one is loaded
+if None.</li>
+<li><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"><span class="pre">StructureDB</span></code></a>) &#8211; Used as parameter for <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal"><span class="pre">FillLoopsByDatabase()</span></code></a>
+if ring punches are found. A default one is loaded
+if None.</li>
+<li><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"><span class="pre">TorsionSampler</span></code></a>) &#8211; Used as parameter for <a class="reference internal" href="#promod3.modelling.FillLoopsByDatabase" title="promod3.modelling.FillLoopsByDatabase"><code class="xref py py-func docutils literal"><span class="pre">FillLoopsByDatabase()</span></code></a>
+if ring punches are found. A default one is loaded
+if None.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.MinimizeModelEnergy">
+<code class="descclassname">promod3.modelling.</code><code class="descname">MinimizeModelEnergy</code><span class="sig-paren">(</span><em>mhandle</em>, <em>max_iterations=12</em>, <em>max_iter_sd=20</em>, <em>max_iter_lbfgs=10</em>, <em>use_amber_ff=False</em>, <em>extra_force_fields=[]</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_pipeline.html#MinimizeModelEnergy"><span class="viewcode-link">[source]</span></a><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 <code class="xref py py-mod docutils literal"><span class="pre">ost.mol.mm</span></code> to perform energy minimization.
+It will iteratively (at most <em>max_iterations</em> times):</p>
+<ul class="simple">
+<li>run up to <em>max_iter_sd</em> minimization iter. of a steepest descend method</li>
+<li>run up to <em>max_iter_lbfgs</em> minimization iter. of a Limited-memory 
+Broyden-Fletcher-Goldfarb-Shanno method</li>
+<li>abort if no stereochemical problems found</li>
+</ul>
+<p>The idea is that we don&#8217;t want to minimize &#8220;too much&#8221;. 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"><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>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle on which to apply change.</li>
+<li><strong>max_iterations</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Max. number of iterations for SD+LBFGS</li>
+<li><strong>max_iter_sd</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Max. number of iterations within SD method</li>
+<li><strong>max_iter_lbfgs</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Max. number of iterations within LBFGS method</li>
+<li><strong>use_amber_ff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; 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"><span class="pre">BuildFromRawModel()</span></code></a>).</li>
+<li><strong>extra_force_fields</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/mm/forcefield/#ost.mol.mm.Forcefield" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.mm.Forcefield</span></code></a>) &#8211; 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"><span class="pre">BuildFromRawModel()</span></code></a>).</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The model including all oxygens as used in the minimizer.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">Entity</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.modelling.CheckFinalModel">
+<code class="descclassname">promod3.modelling.</code><code class="descname">CheckFinalModel</code><span class="sig-paren">(</span><em>mhandle</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_pipeline.html#CheckFinalModel"><span class="viewcode-link">[source]</span></a><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>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mhandle</strong> (<a class="reference internal" href="#promod3.modelling.ModellingHandle" title="promod3.modelling.ModellingHandle"><code class="xref py py-class docutils literal"><span class="pre">ModellingHandle</span></code></a>) &#8211; Modelling handle for which to perform checks.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Modelling Pipeline</a><ul>
+<li><a class="reference internal" href="#build-raw-modelling-handle">Build Raw Modelling Handle</a></li>
+<li><a class="reference internal" href="#the-default-pipeline">The Default Pipeline</a></li>
+<li><a class="reference internal" href="#modelling-steps">Modelling Steps</a></li>
+</ul>
+</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="docutils literal"><span class="pre">modelling</span></code> - Protein Modelling</a><ul>
+      <li>Previous: <a href="index.html" title="previous chapter"><code class="docutils literal"><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 role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/modelling/pipeline.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/modelling/pipeline.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/modelling/sidechain_reconstruction.html b/doc/html/modelling/sidechain_reconstruction.html
new file mode 100644
index 00000000..7f63e4f9
--- /dev/null
+++ b/doc/html/modelling/sidechain_reconstruction.html
@@ -0,0 +1,458 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Sidechain Reconstruction &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="modelling - Protein Modelling" href="index.html" />
+    <link rel="next" title="Modelling Algorithms" href="algorithms.html" />
+    <link rel="prev" title="Generating Loops De Novo" href="monte_carlo.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="sidechain-reconstruction">
+<h1>Sidechain Reconstruction<a class="headerlink" href="#sidechain-reconstruction" title="Permalink to this headline">¶</a></h1>
+<p>Two methods are provided to fully reconstruct sidechains of residues:</p>
+<ul class="simple">
+<li>the <a class="reference internal" href="#promod3.modelling.ReconstructSidechains" title="promod3.modelling.ReconstructSidechains"><code class="xref py py-func docutils literal"><span class="pre">ReconstructSidechains()</span></code></a> function handles a full OST
+<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">EntityHandle</span></code></a></li>
+<li>the <a class="reference internal" href="#promod3.modelling.SidechainReconstructor" title="promod3.modelling.SidechainReconstructor"><code class="xref py py-class docutils literal"><span class="pre">SidechainReconstructor</span></code></a> is linked to an all atom environment
+and used to reconstruct sidechains of single loops</li>
+</ul>
+<p>Example usage:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span><span class="p">,</span> <span class="n">mol</span>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">modelling</span>
+
+<span class="c"># load a protein </span>
+<span class="n">prot</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="s">&#39;data/1CRN.pdb&#39;</span><span class="p">)</span>
+<span class="c"># get only amino acids</span>
+<span class="n">prot</span> <span class="o">=</span> <span class="n">mol</span><span class="o">.</span><span class="n">CreateEntityFromView</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;peptide=true&quot;</span><span class="p">),</span> <span class="bp">True</span><span class="p">)</span>
+<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">prot</span><span class="p">,</span> <span class="s">&#39;sidechain_test_orig.pdb&#39;</span><span class="p">)</span>
+<span class="c"># reconstruct sidechains</span>
+<span class="n">modelling</span><span class="o">.</span><span class="n">ReconstructSidechains</span><span class="p">(</span><span class="n">prot</span><span class="p">,</span> <span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
+<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">prot</span><span class="p">,</span> <span class="s">&#39;sidechain_test_rec.pdb&#39;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span>
+<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span><span class="p">,</span> <span class="n">modelling</span>
+
+<span class="c"># load example (has res. numbering starting at 1)</span>
+<span class="n">prot</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="s">&#39;data/1CRN.pdb&#39;</span><span class="p">)</span>
+<span class="n">res_list</span> <span class="o">=</span> <span class="n">prot</span><span class="o">.</span><span class="n">residues</span>
+<span class="n">seqres_str</span> <span class="o">=</span> <span class="s">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">r</span><span class="o">.</span><span class="n">one_letter_code</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">res_list</span><span class="p">])</span>
+
+<span class="c"># initialize AllAtom environment and sidechain reconstructor</span>
+<span class="n">env</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">AllAtomEnv</span><span class="p">(</span><span class="n">seqres_str</span><span class="p">)</span>
+<span class="n">env</span><span class="o">.</span><span class="n">SetInitialEnvironment</span><span class="p">(</span><span class="n">prot</span><span class="p">)</span>
+<span class="n">sc_rec</span> <span class="o">=</span> <span class="n">modelling</span><span class="o">.</span><span class="n">SidechainReconstructor</span><span class="p">(</span><span class="n">keep_sidechains</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
+<span class="n">sc_rec</span><span class="o">.</span><span class="n">AttachEnvironment</span><span class="p">(</span><span class="n">env</span><span class="p">)</span>
+
+<span class="c"># reconstruct subset (res. num. 6..10)</span>
+<span class="n">res</span> <span class="o">=</span> <span class="n">sc_rec</span><span class="o">.</span><span class="n">Reconstruct</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span>
+<span class="c"># reconstruct two loops (6..10 and 20..25)</span>
+<span class="n">res</span> <span class="o">=</span> <span class="n">sc_rec</span><span class="o">.</span><span class="n">Reconstruct</span><span class="p">(</span><span class="n">start_resnum_list</span><span class="o">=</span><span class="p">[</span><span class="mi">6</span><span class="p">,</span> <span class="mi">20</span><span class="p">],</span>
+                         <span class="n">num_residues_list</span><span class="o">=</span><span class="p">[</span><span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">],</span>
+                         <span class="n">chain_idx_list</span><span class="o">=</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">])</span>
+<span class="c"># update environment with solution</span>
+<span class="n">env</span><span class="o">.</span><span class="n">SetEnvironment</span><span class="p">(</span><span class="n">res</span><span class="o">.</span><span class="n">env_pos</span><span class="p">)</span>
+<span class="c"># store all positions of environment</span>
+<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">env</span><span class="o">.</span><span class="n">GetAllAtomPositions</span><span class="p">()</span><span class="o">.</span><span class="n">ToEntity</span><span class="p">(),</span> <span class="s">&#39;sc_rec_test.pdb&#39;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="section" id="reconstruct-function">
+<h2>Reconstruct Function<a class="headerlink" href="#reconstruct-function" title="Permalink to this headline">¶</a></h2>
+<dl class="function">
+<dt id="promod3.modelling.ReconstructSidechains">
+<code class="descclassname">promod3.modelling.</code><code class="descname">ReconstructSidechains</code><span class="sig-paren">(</span><em>ent</em>, <em>keep_sidechains=False</em>, <em>build_disulfids=True</em>, <em>rotamer_model='frm'</em>, <em>consider_ligands=True</em>, <em>rotamer_library=None</em>, <em>optimize_subrotamers=True</em>, <em>graph_max_complexity=100000000</em>, <em>graph_initial_epsilon=0.02</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/modelling/_reconstruct_sidechains.html#ReconstructSidechains"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.modelling.ReconstructSidechains" title="Permalink to this definition">¶</a></dt>
+<dd><p>Reconstruct sidechains for the given structure.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>ent</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityHandle</span></code></a>) &#8211; Structure for sidechain reconstruction. Note, that the sidechain
+reconstruction gets directly applied on the structure itself.</li>
+<li><strong>keep_sidechains</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether complete sidechains in <em>ent</em> (i.e. 
+containing all required atoms) should be kept rigid
+and directly be added to the frame.</li>
+<li><strong>build_disulfids</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether possible disulfid bonds should be 
+searched. If a disulfid bond is found, the two
+participating cysteins are fixed and added to
+the frame.</li>
+<li><strong>rotamer_model</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Rotamer model to be used, can either be &#8220;frm&#8221; or &#8220;rrm&#8221;</li>
+<li><strong>consider_ligands</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether to add ligands (anything in chain
+&#8216;_&#8217;) as static objects.</li>
+<li><strong>rotamer_library</strong> (<code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code> / <code class="xref py py-class docutils literal"><span class="pre">RotamerLib</span></code>) &#8211; A rotamer library to extract the rotamers from. The
+default is the <code class="xref py py-meth docutils literal"><span class="pre">Dunbrack</span></code>
+library.</li>
+<li><strong>optimize_subrotamers</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Only considered when <em>rotamer_model</em>
+is &#8220;frm&#8221;.
+If set to True, the FRM solution undergoes 
+some postprocessing by calling 
+<code class="xref py py-func docutils literal"><span class="pre">SubrotamerOptimizer()</span></code> with default 
+parametrization.</li>
+<li><strong>graph_max_complexity</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Max. complexity for
+<code class="xref py py-meth docutils literal"><span class="pre">RotamerGraph.TreeSolve()</span></code>.</li>
+<li><strong>graph_intial_epsilon</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Initial epsilon for
+<code class="xref py py-meth docutils literal"><span class="pre">RotamerGraph.TreeSolve()</span></code>.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="sidechainreconstructor-class">
+<h2>SidechainReconstructor Class<a class="headerlink" href="#sidechainreconstructor-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.modelling.SidechainReconstructor">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">SidechainReconstructor</code><span class="sig-paren">(</span><em>keep_sidechains=True</em>, <em>build_disulfids=True</em>, <em>optimize_subrotamers=False</em>, <em>remodel_cutoff=20</em>, <em>rigid_frame_cutoff=0</em>, <em>graph_max_complexity=100000000</em>, <em>graph_intial_epsilon=0.02</em>, <em>disulfid_score_thresh=45</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.SidechainReconstructor" title="Permalink to this definition">¶</a></dt>
+<dd><p>Reconstruct sidechains for single loops or residues. Must be linked to an
+all atom env. (<a class="reference internal" href="#promod3.modelling.SidechainReconstructor.AttachEnvironment" title="promod3.modelling.SidechainReconstructor.AttachEnvironment"><code class="xref py py-meth docutils literal"><span class="pre">AttachEnvironment()</span></code></a>) containing the structural data.
+Residues are identified as N- or C-terminal according to the seqres in the
+environment. This means that residues preceeded / followed by gaps are not
+treated as terminal! In the reconstruction procedure you can specify
+residues that should be remodelled. Everything within <em>remodel_cutoff</em> will
+also be considered and potentially remodelled. To enforce the visibility
+of the rigid frame to all of those close residues you can specify the
+<em>rigid_frame_cutoff</em>. In the example of <em>remodel_cutoff</em>=20 and
+<em>rigid_frame_cutoff</em>=10, all residues within 20A of any of the input residues
+will be considered for remodelling. Everything further away than 20A but
+within 20A + 10A = 30A will also be considered as rigid frame (all
+backbone atoms and the sidechain if present). The distance criteria is the
+CB atom distance between residues (CA in case of glycine).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>keep_sidechains</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether complete sidechains in env. (i.e.
+containing all required atoms) should be kept rigid
+and directly be added to the result.</li>
+<li><strong>build_disulfids</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether possible disulfid bonds should be
+searched. If a disulfid bond is found, the two
+participating cysteins are fixed and added to
+the result.</li>
+<li><strong>optimize_subrotamers</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether the
+<a class="reference internal" href="../sidechain/subrotamer_optimizer.html#promod3.sidechain.SubrotamerOptimizer" title="promod3.sidechain.SubrotamerOptimizer"><code class="xref py py-func docutils literal"><span class="pre">SubrotamerOptimizer()</span></code></a>
+with default parametrization should be called
+if we&#8217;re dealing with FRM rotamers.</li>
+<li><strong>remodel_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Cutoff to identify all residues that need to be
+remodelled.</li>
+<li><strong>rigid_frame_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Cutoff to control the visibility of the rigid
+frame to the reconstruction procedure.
+Everything within
+[<em>remodel_cutoff</em>,
+<em>remodel_cutoff</em> + <em>rigid_frame_cutoff</em>]
+will be considered as ridig frame. Small sidenote:
+if the <em>keep_sidechains</em> flag is true and all
+residues within <em>remodel_cutoff</em> already have a
+sidechain, the <em>rigid_frame_cutoff</em> won&#8217;t have any
+effect.</li>
+<li><strong>graph_max_complexity</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Max. complexity for
+<a class="reference internal" href="../sidechain/graph.html#promod3.sidechain.RotamerGraph.TreeSolve" title="promod3.sidechain.RotamerGraph.TreeSolve"><code class="xref py py-meth docutils literal"><span class="pre">promod3.sidechain.RotamerGraph.TreeSolve()</span></code></a>.</li>
+<li><strong>graph_intial_epsilon</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Initial epsilon for
+<a class="reference internal" href="../sidechain/graph.html#promod3.sidechain.RotamerGraph.TreeSolve" title="promod3.sidechain.RotamerGraph.TreeSolve"><code class="xref py py-meth docutils literal"><span class="pre">promod3.sidechain.RotamerGraph.TreeSolve()</span></code></a>.</li>
+<li><strong>disulfid_score_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; If <code class="xref py py-meth docutils literal"><span class="pre">DisulfidScore()</span></code> between two CYS is
+below this threshold, we consider them to be
+disulfid-bonded.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="method">
+<dt id="promod3.modelling.SidechainReconstructor.Reconstruct">
+<code class="descname">Reconstruct</code><span class="sig-paren">(</span><em>start_resnum</em>, <em>num_residues</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.SidechainReconstructor.Reconstruct" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">Reconstruct</code><span class="sig-paren">(</span><em>start_resnum_list</em>, <em>num_residues_list</em>, <em>chain_idx_list</em><span class="sig-paren">)</span></dt>
+<dd><p>Reconstruct sidechains for one or several loops extracted from environment.
+Overlapping loops are merged and 0-length loops are removed. All residues in
+the loop(s) are expected to contain valid CB positions (or CA for GLY),
+which are used to look for other potentially relevant residues in the
+surrounding. The resulting structural data will contain all residues in the
+loop(s) and in the surrounding with all backbone and sidechain heavy atom
+positions set.</p>
+<p>Note that the structural data of the loop(s) is expected to be in the linked
+environment before calling this!</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResNum" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResNum</span></code></a>) &#8211; Start of loop.</li>
+<li><strong>num_residues</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length of loop.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Chain the loop belongs to.</li>
+<li><strong>start_resnum_list</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Starts of loops.</li>
+<li><strong>num_residues_list</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Lengths of loops.</li>
+<li><strong>chain_idx_list</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Chains the loops belong to.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A helper object with all the reconstruction results.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.modelling.SidechainReconstructionData" title="promod3.modelling.SidechainReconstructionData"><code class="xref py py-class docutils literal"><span class="pre">SidechainReconstructionData</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if reconstructor was never attached
+to an environment or if parameters lead to invalid / unset
+positions in environment.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.modelling.SidechainReconstructor.AttachEnvironment">
+<code class="descname">AttachEnvironment</code><span class="sig-paren">(</span><em>env</em>, <em>use_frm=True</em>, <em>use_bbdep_lib=True</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.modelling.SidechainReconstructor.AttachEnvironment" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">AttachEnvironment</code><span class="sig-paren">(</span><em>env</em>, <em>use_frm</em>, <em>rotamer_library</em><span class="sig-paren">)</span></dt>
+<dd><p>Link reconstructor to given <em>env</em>. A helper class is used in the background
+to provide sidechain-objects for the environment. As this class is reused by
+every reconstructor linked to <em>env</em>, the used parameters must be consistent
+if multiple reconstructors are used (or you must use a distinct <em>env</em>).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>env</strong> (<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a>) &#8211; Link to this environment.</li>
+<li><strong>use_frm</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If True, use flexible rotamer model, else rigid.</li>
+<li><strong>use_bbdep_lib</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If True, use default backbone dependent rot. library
+(<code class="xref py py-meth docutils literal"><span class="pre">Dunbrack</span></code>), else use
+backbone independent one
+(<code class="xref py py-meth docutils literal"><span class="pre">Penultimate</span></code>).</li>
+<li><strong>rotamer_library</strong> (<code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code> / <code class="xref py py-class docutils literal"><span class="pre">RotamerLib</span></code>) &#8211; Custom rotamer library to be used.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>env</em> was already linked to
+another reconstructor with inconsistent parameters. Acceptable
+changes:</p>
+<ul class="last simple">
+<li><em>keep_sidechains</em> = True, if previously False</li>
+<li><em>build_disulfids</em> = False, if previously True</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="the-sidechainreconstructiondata-class">
+<h2>The SidechainReconstructionData class<a class="headerlink" href="#the-sidechainreconstructiondata-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.modelling.SidechainReconstructionData">
+<em class="property">class </em><code class="descclassname">promod3.modelling.</code><code class="descname">SidechainReconstructionData</code><a class="headerlink" href="#promod3.modelling.SidechainReconstructionData" title="Permalink to this definition">¶</a></dt>
+<dd><p>Contains the results of a sidechain reconstruction
+(<a class="reference internal" href="#promod3.modelling.SidechainReconstructor.Reconstruct" title="promod3.modelling.SidechainReconstructor.Reconstruct"><code class="xref py py-meth docutils literal"><span class="pre">SidechainReconstructor.Reconstruct()</span></code></a>). All attributes are read only!</p>
+<dl class="attribute">
+<dt id="promod3.modelling.SidechainReconstructionData.env_pos">
+<code class="descname">env_pos</code><a class="headerlink" href="#promod3.modelling.SidechainReconstructionData.env_pos" title="Permalink to this definition">¶</a></dt>
+<dd><p>Container for structural data and mapping to the internal residue indices
+of the used <a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a>. Useful for scoring and env.
+updates.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnvPositions" title="promod3.loop.AllAtomEnvPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnvPositions</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.SidechainReconstructionData.loop_start_indices">
+<code class="descname">loop_start_indices</code><a class="headerlink" href="#promod3.modelling.SidechainReconstructionData.loop_start_indices" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.modelling.SidechainReconstructionData.loop_lengths">
+<code class="descname">loop_lengths</code><a class="headerlink" href="#promod3.modelling.SidechainReconstructionData.loop_lengths" title="Permalink to this definition">¶</a></dt>
+<dd><p>The first <em>sum(loop_lengths)</em> residues in
+<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnvPositions.res_indices" title="promod3.loop.AllAtomEnvPositions.res_indices"><code class="xref py py-attr docutils literal"><span class="pre">res_indices</span></code></a> of <em>env_pos</em> are
+guaranteed to belong to the actual input, all the rest comes from the close
+environment.</p>
+<p>Each input loop (apart from overlapping and 0-length loops) is defined by an
+entry in <em>loop_start_indices</em> and <em>loop_lengths</em>. For loop <em>i_loop</em>,
+<em>res_indices[loop_start_indices[i_loop]]</em> is the N-stem and
+<em>res_indices[loop_start_indices[i_loop] + loop_lengths[i_loop] - 1]</em> is the
+C-stem of the loop. The loop indices are contiguous in <em>res_indices</em> between
+the stems.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.SidechainReconstructionData.rotamer_res_indices">
+<code class="descname">rotamer_res_indices</code><a class="headerlink" href="#promod3.modelling.SidechainReconstructionData.rotamer_res_indices" title="Permalink to this definition">¶</a></dt>
+<dd><p>Indices of residues within <em>env_pos</em> for which we generated a new sidechain
+(in [<em>0, len(env_pos.res_indices)-1</em>]).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.SidechainReconstructionData.disulfid_bridges">
+<code class="descname">disulfid_bridges</code><a class="headerlink" href="#promod3.modelling.SidechainReconstructionData.disulfid_bridges" title="Permalink to this definition">¶</a></dt>
+<dd><p>Pairs of residue indices within <em>env_pos</em> for which we generated a disulfid
+bridge (indices in [<em>0, len(env_pos.res_indices)-1</em>]).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> with two <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.SidechainReconstructionData.is_n_ter">
+<code class="descname">is_n_ter</code><a class="headerlink" href="#promod3.modelling.SidechainReconstructionData.is_n_ter" title="Permalink to this definition">¶</a></dt>
+<dd><p>True/False depending on whether a given residue in <em>env_pos</em> is N-terminal
+in the environment (same length as <em>env_pos.res_indices</em>)</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="promod3.modelling.SidechainReconstructionData.is_c_ter">
+<code class="descname">is_c_ter</code><a class="headerlink" href="#promod3.modelling.SidechainReconstructionData.is_c_ter" title="Permalink to this definition">¶</a></dt>
+<dd><p>True/False depending on whether a given residue in <em>env_pos</em> is C-terminal
+in the environment (same length as <em>env_pos.res_indices</em>)</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Sidechain Reconstruction</a><ul>
+<li><a class="reference internal" href="#reconstruct-function">Reconstruct Function</a></li>
+<li><a class="reference internal" href="#sidechainreconstructor-class">SidechainReconstructor Class</a></li>
+<li><a class="reference internal" href="#the-sidechainreconstructiondata-class">The SidechainReconstructionData class</a></li>
+</ul>
+</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="docutils literal"><span class="pre">modelling</span></code> - Protein Modelling</a><ul>
+      <li>Previous: <a href="monte_carlo.html" title="previous chapter">Generating Loops De Novo</a></li>
+      <li>Next: <a href="algorithms.html" title="next chapter">Modelling Algorithms</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/modelling/sidechain_reconstruction.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/modelling/sidechain_reconstruction.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/objects.inv b/doc/html/objects.inv
index 3b1433795f7e946480615f1553be4ad1f551c390..7cd62f688b29f6169b2615581ad3e1c004284c56 100644
GIT binary patch
delta 6072
zcmdlY_e+05Mg7sa(Z!FqO=`IRJbXpg_N@79QjB&-r+-@3ZTrn~+S&<zsoy(UCr)VL
z@ibu2=>POuoI(FltkT5~c0Rp2g7M7>i=}x@8e_c<H5_T*-Ey&m%~-D~-g(R6hi~3}
z&RJgfBweq-#J)@8&-VKHx}RUCN4uGu{P=Xzy->^G`{nq$e?PtJ_wIP|&|r%Af03YB
z6?Gmv|14Ixd$s%Bt5i$Q4fQT6|1=eBc)zQxm}0%?J<nVL;pgY$_t&iz4_Q?AsA=gw
z56N#$cbDE_Jg&m`p}(r}(d{?8ZchI7=cU7uyL}69*eAv9w>hBRpFB~G^}Dp-=G3~E
z%av>Q3xDb3j@-H1*!QMvZU6iF3HltpuVv;RYnm9VrRDp{<9>R6$+K0LHvgZxG=2U1
zk2wpyzb{CYUamN=>)wk?^ZzX|e71PjC+k~<|9|{^ZNKkMT+2jZ+mr5px4!obmuuD%
zxHLILKJvlyeN2k3j=qbPMA#!|u74b2`04$X@(8n6@BH6%@4GZHC+f}5j@B(2doDe#
zPg}oh4qKp<AJfYsQ33Zrqs}L3tgAKVZ}L=$UB@Ciz3P&R%ALdZTNc>GISJ|5Ki~<g
zt6$E2U$phT$hO7tYR`8+YTuKcc5Bx63o5^gp1Z%W-p9S-{)PIlrLnV%vcJmLJd+bV
zy!rayoUIeXYrQmtGsKgeq%VDbKR=H9$a}BkH1B#L<+6FU69S~#mhUiWp84}kb=BdN
zC-G(1G~VCc!;mq#dim{FY#y1trHubN7h4?j`S#@hzMauUJu~Waz8L(Cz4t1w?4X$J
z2lYA^PTPe6Umu^JpZ{)JjP3E}H&g$Y7H_>L8TicG_KwM+jSkx*FW7HN+FZKz#`69B
zCbFt`mrpcO-Cw^*;X?}V9tQP@ZPjn)8$bPJx<BFC%AB{KVx(f^`?a<6-?z;CV8s2N
z)nh?n!yVHet;sHN@75d>y?pBTQSW4>CGO(N-t(`Xc)Uz$=YpNxN4wlOeIGZh@3Y`K
z=_l0_|2=cg)woRd!}gx;Z^ftoyqTIiZC8-!x!bRwugP#N_;xsUbN!hb)!&Q5=C>}m
zIPKFqDH(&_4GGWlHi{p~>SQ%a-IFNh`CDY)Ka10WXGN~<eRD@s=*R3oLO)}|P6Xx}
z$vwHS=DqHWtUu{5S=Ah3j((VHBBpZaQo_5=Pg#>5w|9JII<)EjUYGa)W1H)lpF=g?
z&Q2=&yLrvIiEIWh)a&H6<%Mn>tk0M1Y@L1TpOWk(QO=tg7v-Y*^n{|<KIWP=V{)O2
zd#cU@-KD!%?Q}i4^Zn0P%}NRrEp==fn;Z-_N~U&mRHrWaa$GoSY2%E=KNR-fj&oHp
zn0l(yWV1zqLt%=9)K9;K4MtvKMr?CK4l46aKC|vxY{Iv{8~D$x4}ARaxBMo)xqi#*
zxun!MUT!NoI*aS)H*?Qr)9!ybY@0kq_mRWBUWwj`j+{yDEQa?C7p?eXac9|8?(MVn
zxyvpj-(34^(c6DfHwyRsRN@d*v^?@kJND(Ql`IQ(9~HRGG`CpBlfODsD&pU^nn?>H
z&MOx!cvJb|NzI3QsVr<4wZv9suHoxzJAUBRq@POlJXc?Qx3dcs4W90n_(Jh#^!6=Y
zCv$kz>;>FzXIV`8%G>=%-?BnA(j>2~dG(C$|4BDiSm{NSs=V~nQgl@0*>LUF<u40d
z&V)`>;ci=1Wh1IC9s6xZ!;c#*nN{u6e>rHrXkAeqAZN!kLFSC-gd_$j-*eAIEcFsD
zZE9?scH;lO)Aj5fX%4BmVhS_Z5AC=RJX^uS;*xRGn(N+DE8km)=v)txxR>3+|DtzO
z5=R!#9XU>ozC(AOPiqeI-nCWa`Nnq1H=5I$C06D(F>ToK$E(UxAgG2-sWBl&A#{R_
zf%kv6_sNb&ShD3O&d{q7(zus#JxZj`hP_9wz((?e&&%&7hC20iAK7~|m!H%LxS_0|
z^R3^=Z(6F?eFm0k;rkbG92OS8$Y)&f=2b_8$ic$*&M`bk6C3*HH_BgptbgHv{)GeL
z83}oD4I2;a;QbXS8}I1U&BnlTIQ*)gZT$Rj;Y8OtAANRYR8EWi_n0^JdAADZ`Fx(E
zHU5!T$~GoPob~cmUn_R5{#dNEkrne1!<Ksw3V4>N_epm~ylPELK67eLLY@BVrG}4=
z&iIh!S7DZa_Th#Cl^hKfneImkEB*=Osc@X|;AL$}wvZNDFZTM>ts5m%cCIbnaNp<q
zi`oBYcZGU4M}A|MFh1OP)s%B$zr2K1$$9hsrj;_nb5ds<_<B(*v@C3e-?jP!hm0Fv
z-L!Nx6iRsICCc<;<us22?op{s%n!3x{7ZXzZpLOK^%>c%FBcp!m7B8TShJ9LLck-Z
z${cfF18<Gv>yNGb*1InBQ=7%?q+ibj-2<-}EXlIv`8(}-t3{s9jsCU;E~$dE4gV;`
z7Fsd6cV>PzI&<>=<4}L~g|<hlZ*jHluD`rtH~0CMb?1%suST7eJ?hys*PW@@@1j_+
z2LF_w75)VhQ;hl79_v)nujV}cS@PVaz3UE6GkKSn!F(;o?xw@n=4Oksd+Ru>*YErE
zWr6TfCYkldk-LhR8c)d1tO-7;Ep_~c_>(Epj+c*zKRtUj#<aKd{Yw^?yv66lCB5Qx
zx)mnY?}^!EV4ZZxelLrlcR^&f6LTd$qvfN9g%>tS?Dkddy>s)np-9W8`iQ4hXXL**
z1upD~;-0niN!04is?67?G3UMf<x=v@xtY6h^Xk@)<$L5EvV*2(yU)xLdh;sSH{_ef
zuAncv9UB+ylnq*=kw0C=;&1K0<)?nOU%JJe+b8UIsI2~y0fXe9&TTisZiVx`;1^_i
zT&6zFNA2s{P)Wv6p~DNcyU%s(I#xZUZSP8+v^O=;9nT6R1CG>QGh7h;RFRkO$Itm@
zEB60o^Qk@ZqU7Dle<sZ4!deVB{Wl)aaa-tm^~Q;LJojRM6({#@SpWZX+Ty9(Ed*5#
zRGqz@<h}cpShLwl<9b)dJ)S{Vu0B3=Gw02Q?LXT@K9q>hHAwlb6}NR;LX39asjV-T
z#r)1Ywe|5bFz?Z_nBQXew<dnP+rM$4-U{Bk&n|nuuDQgeCHL}CR9B(3>%rqYn3EWk
z7cpusFnl*bW{1R@U@w(iV^60?&t(tKTJWU9BBJ^4xet{y&$c)D#nhJ-CN7`-OSPiR
zDrLFD-Wy*oeo7GEZuPVwx`9!1fmnh^-$vGi7aQXIB1O-6t;%KVnzM<|zTDb<|IH!~
z=Ofcp%B-*Na6cIGN|DEttv#SzBk-u0lG_URBUhI{-*nlBmDe@pvBvd9OKxXMe_?+1
zY*X&6kk}n-`U0EF-LoE_`tF`quWV7}ec)@6(c^&o$5T=Q_pa>NZQ=2Fn=8*rsRU+M
zy@ns_mz!#wQx(+kUtaz6cQj*D_v(WuE1yk$^6o-kOVJm$BXtUi87u*pm+sWnZA(?t
z*?z~dK<mh7z6gP*8n(`U{<Chq?cw#}*|kh(?KfqSjw5$Ah%F5_NY$CXOhkEibYlIC
z>nt9DMk3~Jq16{edNog-|9WhroaVBX>ZzAPE18*pZq(SE<Gi$C`o-M66R+CsoOiF^
z>h|=R{03gexm>5#7HxDjQOI`n<T!bG_d!;Rh7`L;6MmdnFl+XStAb~}SWTw*_P>x`
z@W}L7`p?@3cAHK9nAL0Uxm{7{)l(gF-z#j_H`M=0T2+10Bf-q`KI8inlUb)NxPIcw
zy^9M%zS?Y-Xgb{dRc)33^xm}(UKqKAF#RgOZrF00@wDJ}p1ZEkvyCV3T=#U|<5h=M
zHmzq^xnG@8NaE0>97|6LzHOi6KhEC0@7^o6XaP|LAE~k}o_qBh{1@4tm@hAHKEdSF
ziTe&VsmC&Pdh2t(ueN{Y!^gfho5w_W)uOqtcn_Fz9+hg|yK(N?pqNtQzl*p!ms&np
zwsm5^!ZDvovo^CaBpB{7JX#U=ugNd{+3A#9M{YK;<-FY$ZK}%g$;D-3$5xHY?|eHi
zImdsqHE(^ouda9UImZhX3IA93Uyf|3dUNT6O7rnn{k59vRnNK^>TNTn@1FB57fvr)
zt#DZLj~Z8k-2SeX8O`fIsrhr5D!Og{Xeu$GXv=c;tb6V$_SHWxhL}4(%Wk`Od+N-d
zTXHAOm8xfa**PI(UT}ZFm6{l<C1sO$oC^J>t0~3sQ*5(or=IkO!xQA6?!C<H9N4ek
z_Mq(e{@{~Y?H#9Qv2IxP(lDo<lfC6r+0uh1l_z%iv&9*IoP6MJTcy#e`!@bgX^uNj
zah^D*`?@D--K5jaU$UgX#rNHnzPEM%o^>}4T|KDyE71JwbwBSt$1WZ2dS;SYIsI6P
zdT(N*^JLY>4_#%LFKytR(f3@e$VE4nJM+za7UuX{Ezv3aBU1L?N?IMzeJo3#QKo)P
zkmL921jc8vOFc^tu3mF)L&)b8zN-5#iuGSFfA?jsx|Kt-^3J0Rr`_q;8nyQ9nFbaS
zf#zk`L`q}UTB_TB-S&Bz)wzkXOL(rm42vlIrs#6C@5cXs3lg41E$P4fqis^%U&{qY
ztQT2utT)}YYop_(+^-X-q<<AVE7iWEq&&^W+^Ig1<H+Jnop;H#62%Oc^Fouht$&iB
zoBwnjr*Qg=c>(T@CGEfEJGb22XmwBBKJ3<#I^9|KUJAQ+&f?CKd&BB5{hb)M@rqM|
z!P+xwD&v$b+s+&RR)3w^x;@Y|VkOrMA=WhQm6<9UX-(FNza~G|UR>g;I{Souhs7>!
zj)G}sUsmj@XMGo@Dk7&b`IAzeu}5a$`QUjT*}Aeb1ixC(^)L%y;0P^L6$p8%QF`V|
z?|YrnYc}>0Yb+0^oVjbX>YG#vs~^w7ObM^&6Vf@p-ubh(Z4cw@bonZ+3T=@!WgkpW
zPycZ3N9(*7(#~3UJ+<yMu<r6zz8cj3r(T=WU7&axvtmGhNB!Yzy3!st&yTD5l`)C)
z+;Iq$uUWFpJS1+@A1Ak*{nFPai3ci3e2Vwi-rV8A<d7tJ^rUvO8>0mKG?5O)1y;qf
zhI41<g{{_FVSTsOCP=d;_sQku98X=hKaN`I>Tu>>IGe+dS1tY7g8x!Jn6l1iid%Rg
z{ASsXq+EmT>dUg4a!%D}rm#eas~0Tk6WgG*XrDpO%W1nleNfn;^(E+Y^Hqy=8xvSG
zp9$RyZM!D+WaXSi22YI=4m;izixNt1&AqDe>azRQHvOZzHzr(|>C1BPTztQ76#KrP
zvN9Ki9rl_>Y%@G@VY7<v`K!+1YW+f{`NcEKX7DK)cBa^@Rxf#<%1~l4yZ+;q<vFKj
z&S<`}eBsWioD04kj7r<_Xo+$Ebmmj9UI#2F;7?zE^0q+0n&$^jYkb?c{gM-}Ma^6O
z%J1#UZbxr%${3wIrhh=xchj9*{guzB9p-%SL!T}7Ww+Ai(}BKM0$#^4h+o`PT&9qw
zo~^QB=SeHkoU~0v1=o19kI(hr_&IdWs(O~EU%S;)_b9wbIK^~^!Q$246}-HmQc{A?
zy(c7ETz)oznRA-r*ZswdIg8bM^|v;!2%lPRx%t?HS(+)eoteALUbRoy-)}#sv*fbF
z#=h5e7v<URSeMP@lbvH@e&~?PUf#U_w`K?i@4d+=kz>YU^YQn!hfV@_a=40I7t3}U
zTHI}|&&v8~e`A;bZ1&B6CKvxd@T5RQ=7>s6LDl~?w;mnd|6!)H?}9I<R^925wd{S$
zzuP>NV{={jT;sW)?&)~xs9EcJznt}ci`J!gn~Ur>gzuDJ`SxAA_QKzaUN7qQ2<`gd
zwc@_k%Kg`J#FV$lZ#UHU{d9NtYgrba+b_7&?kL~netV>{K3TezGjGo^CMhYAiz|Y;
z-LCHPE>B(FvYy%Lnd83Zp6$DH6ffJ(X4I8DuCBjOUSmSR`R_+Am@H)N{CM2!$~Lt<
zIdz{KgLdAMbbqTJwnyrR;U-B@jYB?{ejMjqekSkzlAL`4Oh1qR{^26g8_m8wS}^h_
zcaX&0<`kbWiv;6Ip=$LvYEle&E*iJC=`HV)nzeW)+nJafPA|+Y*Gz~%aPsEKNR@3&
zx%&-xUF#;gaY^0T7`RFEYv=U*uMEZUI)!T!z6PB4^Iq`xK|_L6N&EN8CIyw!`E3i2
ze~iCy=iOW<-<2Okb>ng+viJW~EzrC#dVc@zPs=LmLO*W$;>BgR?Xo9#SbZ|@{O{M6
zJa}nbJ>lC8vz4{8#TmRMZk%NZ2+FQzPAGd`$3DSm!w!}EGq@{kJ?kWxR{8f<q~73G
zS>khfjb70f^NlT&u5C?YKa!^x$(Z>2+a9*V#SwqRUWUdwtX(5`kT+^}-r*TnmmZMZ
zWF~&C!}P}nHl6_YH?!6(Tbs3?nW_6-{jEbeds>n{eOom@W6AYi*Lyc!EekrOw#j?{
zS$@fG=^~e9AME^7PVIfxb>^qcjP(b<M{awu;o9msmu^?SYSk!hxMKbA$HEAKopDb$
zI$b&K{q5+Ba{c39?`;&CwK-McN)GS-pL+ZpQPx)7yo>mAuYO*(?dTKsTMfnS=6z<<
zn4T=xskdHn`#7t^n}v-B-ztTjUfulV<c93W#l|0aoj<>1s&aptcH$u8PR6PN9lN=|
zt&eA|>lThzy?glZ{3LrH=2SO_9}x-?x_XWiq+;5cvfs1vE!tTsGviv=h5#vR8&PYf
zCDVPc9&5XLaOz2mK>pXY26v*KZhxXLEOGDktP}oocYc^$uNAg9ls{<CoX$8;ktTtK
zu|J-67BUF-XUV&F99!G)V2!&lSC;Ln0*2QYk1$5|ONpJRTCq$fs`=%GmA9A2XnnXQ
za9ZMyVb1PbjO&cE`L4_e_jk`ZYa_YcQCa_^7~|u-1&P8vm3(|b^3Fn^H`jkXmsD^i
zX?>nV()A^+o%=ICJ*(gD7WH^T{&N=RP|-u{w@hK@V12&iRz!e#=y7I?Rb~PwLQM}i
zoLjYdy?=O<7@wcuu8Rv!T@YhjAaFN8Vd;y8@>~ToxjUP#T`pbJ)^xeuOe{qFRRx1>
z26JP{0!A}a9@lI6wu@K(_!i|CTzI!;W5r@VQU9;9*Y)NoO`XlcTslL)etPyCi<?W&
zr-TO|5z|uHEvO?J{H#89<s*;0`EAYx?ICxj?03As(az^&dv5>zpfl%w9&TQ|ty+a;
z<8E)M$ybwldRT;S#l^~<*7IvDyHMReS3mRUYP;<Vd@T9TExR<a>i6^9jvDn79OaQ4
zUwW9|eVUrm;GT3TE@0NFFz*%X3+w7RlsSU-R_HEn72X#j)x~{x)BU2eeSsO1ccmI>
zeV@%PEBPS)(u+$wWV&vZf11H~>F7hbZK-R&wlo@ZFH?&3wmsPTo^##Qc@J*A<<#4A
zZr6vX4{l!%H<@fK%84qDI(FdRnWZQ9eEWD!IP$)PuQ0>;HI`y`iqElrUo86WXxBbj
z$!GQM7JKeF3iGk&&oI*4P$d=+ESvhXyD0bUoz?T#O<SAMt@x--OzO0B)|}NkdqpN5
zvsPpN_V0$~l<?C1Q$v_@3+J>oxmf+Y(y-Ol$E{s)UXBk}!zQKkCdab0s(1aGvgOTQ
z@5Ox)saxaj&+*Z+6TkeA!Q~XAgMZ9=r<KZAgcomgsh_-KnIXrzh{pz7n^gmPOH#g^
zz1EU=Kj*~j8ST6IYIeLn(7uGP=EaK$PFdOA3l}rXKe2q^IFDKWu0_})>En4Nj}N$;
z^VMiPVsPi<OL+2t!IiIX>4}3IMJz4Kl-b$MiVAdG`TBZK9Bk~9k*SfCv!8J9=P&7F
zTY_>kDh_Fv&Z(+@UAi*x@`I<ci=N!Lo5}ZTd9>i?R&9ae(5F>erb5fFRMyt>v+w4=
zqPg9!chaAfa)B*&m*iGYPD<Gm`R3Gx-PcT~zHQiiI`a4Lq-;}*CB`;^wzIgRj!rk(
zRPb2!Yb%@BiVM102QO^ruYG)BdrbF5j+jvI>D))}ta-5J#k8e{JS*#KIX;J6l0Gc)
zh;MUD@4r7?v+vB$oYvOL!ppr=QtYykPD)CHdUC_F#0bxWI~?98A3W!vwKB5Uwr+=u
zbOFE3Vf(`AE-EfOTUei2miYErB=pvv>v{NZVohG&30B6xN7=q~^S-EWa-RI_4y(rO
z$%oUWFU03K?7z`4%U-|yYy0Op^^?Qz&OW+r=2hK@<C~vz>#df%u6Fj9yQhQE>GMae
z4Y&I@Hg^827yH=}thV^*>N*Lpvg0Cm*gbU1xwc)nbyWSa>Je|X3)xCvW=^iHn>0PV
zYRit2jz8b_NX_4*V<0ZK>&@NxG@s}9Q-5BHYw%w?=VjK#pGwuX9<oPg$sdf~;>Z8O
zkjqha{?-ir65sZ_{}r5iU4z%{Yi&>q{O5gH$p86U4iTTf+wPv2{jBMJ)#m@~J40ix
F0|3)(se=Fj

delta 3808
zcmeyRzeR3BMg88n-o=l12sXU`C%WoX*i)6W6?2yu6;D>R580U0`bBN3Ft?H-r?tuf
zR)^cO;^iCk10Nk$xp3$3yAwjc4>vn3-hEMFJ0~Zz)A!3WHg~WJD>lDZy!EKSXz#q7
zul<iSRQl4`C0px%rWVbPx4&7iE$!ghsr?yB8$V2r-(R=aQk-A1zI*?R|CMzoT7<L|
zE*GzSyK{yD<2U|}3;K+Lo;#EsUEej-6?|#iVG~#X``g-uHj0&xPPZiM-<bF0+YBM8
z2mQs3k8Z!&b<(ST-z{OwyG1U4nZ=$@|J~!|x2<!H$<xLYCv)q*UTxg#uR5D+<tuaB
zO)dU6t>>=F^L6@T`D)@`|G1m=N3LF){9p6s$<x+z*95;@eP8luQo!W;1#3U>U%&sa
z@^XC3Wb<#!@=k8wW-VkSGUx7z340$Jgeb*Vce{9eE!O(H_IpL=pOydkR?FS}*H?Q}
zL1Lxe(Ruw9C%AUHY8h2}x(2Z&KMZiw3QFV<IqIyKrxv{QM-PAN5+&8<mwq90pRBBZ
zDap-Wza(|e;#1xGLXK7bd}=avj@YE&vpF+VKNd#)nczPq$LHB+)xNxCbuD!dG7tRe
z4qUf?o!DRRg=YV>)ZQ@`+Em{370WKY8hU1j%WVPSvcRf;e_t(i__M72Sc<pCqvI$0
zTC!#dMZHo!r_yEc{o5SXECs_^yrqX$OgD^f%dFR%E;{MIp|9d)t&~~aahxui&$8V9
zE&l#RNTTq6L15#T-FxEizG>pU^;o;m!LZtS;k^Fq*Y~PVzfhjF{@Jzr)#0z7H>x(X
z)QG*b{3FZSxcuEt@dpyCt9||^mmS~#T--;>-61wkBlh{@#7(c}?Mc+z>$9_paZ-ka
z!u3<lDUVJ#*T2+|(3qyT);!LsGo*W-j7II1*G2jh_biy%{j|x|&^tpxj9sQRWp&!e
z@3BssZ@vE7{#c*Md;g9z=k-=^{xUVn;{E#dGhghq3bgmpPfcT&Ip!66)n)Vh-zUz!
zyZU6`Zw05WWv{{=@3M5RywD^zp?$uJ+0^*%zp~GJ&Sx%&Qf5!CpVH=9Bd@F{_0Hw#
z@ppD><90;eKl9VB(_pIfU)QSHe*`!KLsqoO9-Do(IYDlc?bZ0DQ;&T*z+|vXz#^#o
z(8^C6{`lU!z98bfvKMQGoQ-9;cUN~xTEwHcjI~eC9}8LaZFl<ieJN$#f8?W6Cx@~7
zY3)8+pP{#U%Ivd`Eo}B_osO)3Bhi1ZDn(#<l%Vk;=4lLH9bRnu&ffX^R7j%DhGYef
z6JiWbj1oLejvK|3w!SE0<=(*i+EdqgS##`ZC*B`ZN+UIkFD1QOb9bq%v+jl%O$F<Y
zS*`kl_ZEjA>)v{cYn!Ej!4wAPoj>|rBv0LtVlkNz7P3~Z$W?Xo<29VIXQsaruHTe5
z=Wj(x!OM-hc^h4%)jHzjSS7waeZ1qiNRM>;iR0g8-ezCBR50UHjOx7N+$)FAF4qe6
z)mgz=*w~uRboFxU72mv7vl&*iT`ks|v#fZb$=ul*+cnad_D8H<5nkr5I?>&_>-pP_
ziypi<)Md^fm^&>Z*vaRuBGWQojcbhx#cjXpmHCUdNk+v<$%)M@zbm|~_M+>moq{ie
z)_;5R`_O9n#XL7NlOmhkSN&vatrOC!-LvEFig?buyHjm4rvzQevd`np3XnUdyHLhA
zS$y&P-z!pW?ioq-L^U-xA36Sb+QVI+ZI4IHPFp-}vi_dMQv{QayniA6u%~SH47VSm
zp=kzOC;jVRRM{Jf^fcUg676*$Lws*<qs;1U5!1YW_9gAJ?~6Fl=4txoio{KYz7WY7
z-G*Mlx9aySThjMr{)L{8&sH`q*Q#7&=k>7OOJ37n^_j(u75`62lyz$<#YY``wOZ!?
z@-JbjtkRoj)G$h~K3??ahwZesYped*c`)+vU370wzdYytrTW$xmY#<z-XDzAnWlDB
zd!y5pB_|?hwI*xLUH%~^Y`3EAGT&`$|HyTOpHX%S%!uRM+q`j+b=c(Gb89lh=54&|
zSNWoMw|KKf;fAjs3FifOu1t4|6w>QAGyf)&P*?umF3EIxQ0S!R6};=cdndL%D-=oY
zD=}}llKt$#pLhJOFDHDe|8y<oP3j~ohk%x)(o+)Z`(918ysK^AeqZR7nH5)aLe+A{
zwl8yB0(3((!XITcb8L6ARa$6oo49K_yL7<j-zGl$?*4vpK5{Yt47S`IeBB-@SKq4d
z3spC_&OZD^@t2zS&(mrv1(WYD*zv3TmE^qH?XlmkI4Jx}-pX=xrwY^4rPlSr(&tLP
zX(;U2AvGuF#=beZ7pJwj$Ti;huEMjH!Rx)~ugx2Zb0Tyvu4kNZj(3*hoN05X{_Amf
zX%>h+bB<@h@1y&qW?h=2XEbBU^;XtT{1yxinXXy<(Ti^^nm_f64sVCBmQHr!_7`Ci
z+qZ8MS*^P6(1!J#7v`J^I3yJs8m6YaY(o9~rItV9%2EzpkhOZ;y0kT=cT=$>cSvDg
z>W=gh#}{{$CH#W97y5ApJS)p-`h7hsQHUcjN$enx?p*O4rR+EQ(>Fa^_epr+DWBY%
zv*gw8Z9MUvA#?AI89D_w7i*kQD!%zs>*7J{pC_L6T>7w?RkXTcc_#bOC<7s<PnVoU
z9WO7+tv^?DMDgRqP}9gg0cot96V}|0y(!79|CjH()0VX3QVR|^++HjGtSrWNtMr3E
zy3;he6PguEC$Shza*bZ<$`tX+QBx=(WlnCzA*af1ku2Pzhn$aY6VQoF+bkub#jtGi
zg>@!JWJDs3>K`xbFkE}l%wUn{%0DZ&ZN1nM@odGEpP@|k5;dn*GpRqHl`K-R>#;4{
zj#;|wXV<CuI&RjVymZ0Ot16lrWivQd@+>j-P42%saclM0-$I^STxZ_ZEqQUPJ$e1s
zqkAr}6(3D%(Q<iz^Uw2z+Dk7r-J0l@>A2Rf)T6-aEUU>@YvpTmZqF6TJh%2t?uUIZ
z{OU{|T3ICJFI$uTdhY-FHy!Pjf1dc<GpZ^&x2b2Y$+9?J^D|iz+_%@9%d(xAapLl+
zZyyVJPbbg$!=h~W!rktIEa$BAcN_v(RkmrD@;7mX-;~?g*7oF@?y|T&Id=1X7$%>5
zvuUnt&vvEUl?zv?c>gUC?3R|gzrG{=c(Mfl6{iasVthwz6INYr`ta1ukfA=JOrAsj
z-09-IpL%%}W<C7&fi>slF6p_<OhxWbCdm{W2((!KTcGX79GA>$#{@nx6^{=>$3HPJ
z<=9WlJjWz+T#x(ylv>O0SBsQAX1#J~cxUosi}Ageds`x&3Wg>M{0t18_mS_DD$ANy
zy$iK#^0&;<6-i|=j-UL?A<et*-s`D`^=_K0|2D2Tx!?_($Ep)6*)_8Avdej`mDj~x
zy%l7m+mO`!bCSz)^`?Up<U?=YoVR#I>cy4^liZ~5Oj)z{P_UikhXC)~k3xJLqF=q5
zd!MAW=JjNSSGk=?OU>zFT6Z^pBj4^9d)~a+xUE<2#_}hhE-pzwuaaHe_3~-+$y2Y>
zUIus7Z=L*h!S}8IzCD^*-Ft*jMBte2yxW>*9J`sn)!%u2V@hi8CFg_u8rxQO_x0H-
z?h9wj>Nq_+kFi);q)otJT0o`y<#aaoX}xO}ZF;VH^Qy1=`_c_TcjQ*jX1=!Jb3lXP
zx^3c2&cF00vX>_w^ga}D_k_*+CudTOm!H|hpFS&#;q1P8yN1%hbBpXU=ce%MnZJ8J
zC)u&Wg=vXe_8O7yyLWU2vsQ)5`K56vPjNXV<NNj9%PFfBed<q@Np`5Z)~{MVYj$wj
z?>*;NXG)9hSP`+jp@QlE#Qc9!Oq<s(OzJ+K*YZ+U`|J9>YAc#`M4O7HPTtYMJ#UjE
z&+JMC>&kBmsgu>_Io9XQo^Ji~C9lcafT;_`e*NGGn!P8rc&3~}o2%Vn#nOZ@>BSqi
z?E0VGTjM6krffFH$>i8tmr55It{*(SEl-yQOYFFqp>BLNWyQJknbCW)Pgt28dpqUe
zi<P46JU42N9hP8^*m_!Brv8*>ymR5Rwe#crF1}qm{rcHwpTnOS?6f++tbWbjS%+8e
z<5=Ohb8qaU8z=Q@PsLRPY+2HmRddx*+xtDsv-;Ygqm6f>j&Qczkhrx`?e+F8OC00m
zr~Q7<@;SNg@PidwGbA|*=gbS8cFSw$JDaq`y1avP_G-ul#zfS8|23yzU+;~kdoR7K
z9N*6^U0-P+@NGf-W@g8hoYl-X!`Sz%txwevTy*jDAJ^=!e|E2%zVWK%^T&%r|9*2$
z$^59lWq0o338_kjRu89eUjDE}E4Zvo#O~0B6NOq;es>G@IPXi5;aV@>Iw_~vkkK{w
zcHkz5T^4r^etWa>Zn5GF|A1P3mX>`-tp6I#JnielU3R;;J7>btXs&{Q&+B|Q>isb(
zcAuG6|8B?SGp+Ll^!_MhSpUjDxB9t{)TUEYZxqe-vOJp9${4<y>&KGias1QO<JY`6
z%dOO?qr`jY@WTf85XP;tVK)3hSJ^KwzZR}F+dliP@ZM{auX?+GOAbA@IrDOnOTV@G
zl<TFJ?NV(EMC51P-g@1>R?9lNU`<-zIpcuGD>>%J%-LVRsllq?!Wp&MzbEZ^xI5v#
z)n49$^EwR&8?SONaFd=FkkjrF9O)}))w9{>#WZdGeYR#n)xWciGnzAnyo6RJrXIbe
zu#PRUqxbq5rUj*Ug%?NIYh8?aI&DkN`~z7NS8mF>&3kOgqtCAm+mwtL8KOGBxGX-m
zsc-F>i{6hW1q#fOlc<015^?*7YJl`<9hVwUi*Ik|s2#UE_VB=Qi#dYHGJG{Xhb2{y
zJ?xQwT<~DAAYX;aA<5&6<qu>F(nZ+sNL~js*>6ObG3-rcKM`Ga?9;TlfqPTaYw~Y4
zew{Yga8D}xt?053C->}CU;8`LHs{hQZ_8+f`MGiDKP_83?QZn3yY<%c4$|k9-&i*1
znfGtHY;#D>_{Tq^7uP;%>^`ObLU!sO4ilc>uwQ$cx>n`&x=B0=Kcp%c_{=hc|4dOv
z;Sq7Mck(B`rat3k`EuQGfqAmSe>T3}^Jg^!wkiC6ZMa~6ALCw0X0EdRQyyw}D>Idf
z2G?Ek&+=RU+G$!Q&$WX~uP;9u`N71fv-L~B(@sTKvFLxXX|@%Nb*rCl40TQa{N;Z5
z*Q-kQ=YqE^Wc|YFxc_lx9Dm4+!|&`os$9$ke?@a-$UNO2!>3(*Z<@owFZr{#W^LI~
OvDTaY{r?}T9>M^k?_Zn%

diff --git a/doc/html/portableIO.html b/doc/html/portableIO.html
index 7513d9e6..00cc6bc9 100644
--- a/doc/html/portableIO.html
+++ b/doc/html/portableIO.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Using binary files in ProMod3 &mdash; ProMod3 0 documentation</title>
+    <title>Using Binary Files In ProMod3 &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    './',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="index.html" />
     <link rel="up" title="Documentation For Developers" href="developers.html" />
     <link rel="next" title="Changelog" href="changelog.html" />
     <link rel="prev" title="ProMod3‘s Share Of CMake" href="cmake/index.html" />
@@ -40,7 +40,7 @@
           <div class="body" role="main">
             
   <div class="section" id="using-binary-files-in-project">
-<span id="portableio"></span><h1>Using binary files in ProMod3<a class="headerlink" href="#using-binary-files-in-project" title="Permalink to this headline">¶</a></h1>
+<span id="portableio"></span><h1>Using Binary Files In ProMod3<a class="headerlink" href="#using-binary-files-in-project" title="Permalink to this headline">¶</a></h1>
 <p>A few features in ProMod3 (and potentially your next addition) require binary
 files to be loaded and stored. Here, we provide guidelines and describe helper
 tools to perform tasks related to loading and storing binary files.</p>
@@ -64,9 +64,8 @@ case you should still distribute only the portable file and provide a
 converter which loads the portable file and stores a raw binary file for
 further use. Storing and loading of raw binary files on the same machine with
 the same compiler should never be an issue.</p>
-<p>The classes <a class="reference internal" href="loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>,
+<p>For instance, the classes <a class="reference internal" href="loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>,
 <a class="reference internal" href="loop/structure_db.html#promod3.loop.FragDB" title="promod3.loop.FragDB"><code class="xref py py-class docutils literal"><span class="pre">FragDB</span></code></a>, <a class="reference internal" href="loop/structure_db.html#promod3.loop.StructureDB" title="promod3.loop.StructureDB"><code class="xref py py-class docutils literal"><span class="pre">StructureDB</span></code></a>,
-<a class="reference internal" href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>,
 <a class="reference internal" href="sidechain/rotamer_lib.html#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a> and
 <a class="reference internal" href="sidechain/rotamer_lib.html#promod3.sidechain.RotamerLib" title="promod3.sidechain.RotamerLib"><code class="xref py py-class docutils literal"><span class="pre">RotamerLib</span></code></a> use this approach and the conversion is
 automatically done in the <code class="docutils literal"><span class="pre">make</span></code> process. Code examples are given in the unit
@@ -98,7 +97,7 @@ corresponding check (or get) function in the exact same order when loading.</p>
 and overloaded to work with <code class="docutils literal"><span class="pre">std::ofstream</span></code> and <code class="docutils literal"><span class="pre">std::ifstream</span></code>.</p>
 </div>
 <div class="section" id="portable-binary-data">
-<h2>Portable binary data<a class="headerlink" href="#portable-binary-data" title="Permalink to this headline">¶</a></h2>
+<h2>Portable Binary Data<a class="headerlink" href="#portable-binary-data" title="Permalink to this headline">¶</a></h2>
 <p>Portable files are written/read with functions and classes provided in the
 header file <code class="file docutils literal"><span class="pre">promod3/core/portable_binary_serializer.hh</span></code>.
 Generally, we store any data-structure value-by-value as fixed-width types!</p>
@@ -141,7 +140,7 @@ serialize the values manually and convert each element appropriately.</li>
 </ul>
 </div>
 <div class="section" id="code-example">
-<h2>Code example<a class="headerlink" href="#code-example" title="Permalink to this headline">¶</a></h2>
+<h2>Code Example<a class="headerlink" href="#code-example" title="Permalink to this headline">¶</a></h2>
 <p>Here is an example of a class which provides functionality for portable
 and non-portable I/O:</p>
 <div class="highlight-cpp"><div class="highlight"><pre><span class="c1">// includes for this class</span>
@@ -367,12 +366,10 @@ and non-portable I/O:</p>
 </div>
 </div>
 <div class="section" id="exisiting-binary-files">
-<h2>Exisiting binary files<a class="headerlink" href="#exisiting-binary-files" title="Permalink to this headline">¶</a></h2>
+<h2>Exisiting Binary Files<a class="headerlink" href="#exisiting-binary-files" title="Permalink to this headline">¶</a></h2>
 <p>The following binary files are currently in ProMod3:</p>
 <ul class="simple">
 <li>module <code class="docutils literal"><span class="pre">loop</span></code>:<ul>
-<li><code class="file docutils literal"><span class="pre">backbone_loop_scorer.dat</span></code>
-(<a class="reference internal" href="loop/backbone_loop_score.html#promod3.loop.BackboneLoopScorer" title="promod3.loop.BackboneLoopScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneLoopScorer</span></code></a>)</li>
 <li><code class="file docutils literal"><span class="pre">frag_db.dat</span></code>
 (<a class="reference internal" href="loop/structure_db.html#promod3.loop.FragDB" title="promod3.loop.FragDB"><code class="xref py py-class docutils literal"><span class="pre">FragDB</span></code></a>)</li>
 <li><code class="file docutils literal"><span class="pre">structure_db.dat</span></code>
@@ -385,6 +382,27 @@ and non-portable I/O:</p>
 (<a class="reference internal" href="loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>)</li>
 <li><code class="file docutils literal"><span class="pre">torsion_sampler_helical.dat</span></code>
 (<a class="reference internal" href="loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a>)</li>
+<li><code class="file docutils literal"><span class="pre">ff_lookup_charmm.dat</span></code>
+(<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"><span class="pre">ForcefieldLookup</span></code></a>)</li>
+</ul>
+</li>
+<li>module <code class="docutils literal"><span class="pre">scoring</span></code>:<ul>
+<li><code class="file docutils literal"><span class="pre">cbeta_scorer.dat</span></code>
+(<a class="reference internal" href="scoring/backbone_scorers.html#promod3.scoring.CBetaScorer" title="promod3.scoring.CBetaScorer"><code class="xref py py-class docutils literal"><span class="pre">CBetaScorer</span></code></a>)</li>
+<li><code class="file docutils literal"><span class="pre">cb_packing_scorer.dat</span></code>
+(<a class="reference internal" href="scoring/backbone_scorers.html#promod3.scoring.CBPackingScorer" title="promod3.scoring.CBPackingScorer"><code class="xref py py-class docutils literal"><span class="pre">CBPackingScorer</span></code></a>)</li>
+<li><code class="file docutils literal"><span class="pre">hbond_scorer.dat</span></code>
+(<a class="reference internal" href="scoring/backbone_scorers.html#promod3.scoring.HBondScorer" title="promod3.scoring.HBondScorer"><code class="xref py py-class docutils literal"><span class="pre">HBondScorer</span></code></a>)</li>
+<li><code class="file docutils literal"><span class="pre">reduced_scorer.dat</span></code>
+(<a class="reference internal" href="scoring/backbone_scorers.html#promod3.scoring.ReducedScorer" title="promod3.scoring.ReducedScorer"><code class="xref py py-class docutils literal"><span class="pre">ReducedScorer</span></code></a>)</li>
+<li><code class="file docutils literal"><span class="pre">ss_agreement_scorer.dat</span></code>
+(<a class="reference internal" href="scoring/backbone_scorers.html#promod3.scoring.SSAgreementScorer" title="promod3.scoring.SSAgreementScorer"><code class="xref py py-class docutils literal"><span class="pre">SSAgreementScorer</span></code></a>)</li>
+<li><code class="file docutils literal"><span class="pre">torsion_scorer.dat</span></code>
+(<a class="reference internal" href="scoring/backbone_scorers.html#promod3.scoring.TorsionScorer" title="promod3.scoring.TorsionScorer"><code class="xref py py-class docutils literal"><span class="pre">TorsionScorer</span></code></a>)</li>
+<li><code class="file docutils literal"><span class="pre">aa_scorer.dat</span></code>
+(<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"><span class="pre">AllAtomInteractionScorer</span></code></a>)</li>
+<li><code class="file docutils literal"><span class="pre">aa_packing_scorer.dat</span></code>
+(<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"><span class="pre">AllAtomPackingScorer</span></code></a>)</li>
 </ul>
 </li>
 <li>module <code class="docutils literal"><span class="pre">sidechain</span></code>:<ul>
@@ -416,11 +434,11 @@ in the <code class="file docutils literal"><span class="pre">extras/data_generat
         <div class="sphinxsidebarwrapper">
   <h3><a href="index.html">Table Of Contents</a></h3>
   <ul>
-<li><a class="reference internal" href="#">Using binary files in ProMod3</a><ul>
+<li><a class="reference internal" href="#">Using Binary Files In ProMod3</a><ul>
 <li><a class="reference internal" href="#header">Header</a></li>
-<li><a class="reference internal" href="#portable-binary-data">Portable binary data</a></li>
-<li><a class="reference internal" href="#code-example">Code example</a></li>
-<li><a class="reference internal" href="#exisiting-binary-files">Exisiting binary files</a></li>
+<li><a class="reference internal" href="#portable-binary-data">Portable Binary Data</a></li>
+<li><a class="reference internal" href="#code-example">Code Example</a></li>
+<li><a class="reference internal" href="#exisiting-binary-files">Exisiting Binary Files</a></li>
 </ul>
 </li>
 </ul>
@@ -460,7 +478,7 @@ in the <code class="file docutils literal"><span class="pre">extras/data_generat
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/py-modindex.html b/doc/html/py-modindex.html
index fbb333e4..b0d01c2a 100644
--- a/doc/html/py-modindex.html
+++ b/doc/html/py-modindex.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Python Module Index &mdash; ProMod3 0 documentation</title>
+    <title>Python Module Index &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    './',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="index.html" />
 
    
   
@@ -76,12 +76,17 @@
        <td></td>
        <td>&nbsp;&nbsp;&nbsp;
        <a href="loop/index.html#module-promod3.loop"><code class="xref">promod3.loop</code></a></td><td>
-       <em>Loop Modelling</em></td></tr>
+       <em>Loop Handling</em></td></tr>
      <tr class="cg-1">
        <td></td>
        <td>&nbsp;&nbsp;&nbsp;
        <a href="modelling/index.html#module-promod3.modelling"><code class="xref">promod3.modelling</code></a></td><td>
        <em>Protein Modelling</em></td></tr>
+     <tr class="cg-1">
+       <td></td>
+       <td>&nbsp;&nbsp;&nbsp;
+       <a href="scoring/index.html#module-promod3.scoring"><code class="xref">promod3.scoring</code></a></td><td>
+       <em>Loop Scoring</em></td></tr>
      <tr class="cg-1">
        <td></td>
        <td>&nbsp;&nbsp;&nbsp;
@@ -127,7 +132,7 @@
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/scoring/all_atom_scorers.html b/doc/html/scoring/all_atom_scorers.html
new file mode 100644
index 00000000..02379eee
--- /dev/null
+++ b/doc/html/scoring/all_atom_scorers.html
@@ -0,0 +1,592 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>All Atom Scorers &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="scoring - Loop Scoring" href="index.html" />
+    <link rel="next" title="loop - Loop Handling" href="../loop/index.html" />
+    <link rel="prev" title="Backbone Scorers" href="backbone_scorers.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="all-atom-scorers">
+<h1>All Atom Scorers<a class="headerlink" href="#all-atom-scorers" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="allatomoverallscorer-class">
+<h2>AllAtomOverallScorer class<a class="headerlink" href="#allatomoverallscorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.AllAtomOverallScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">AllAtomOverallScorer</code><a class="headerlink" href="#promod3.scoring.AllAtomOverallScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Container that allows for the storage of multiple scorers identified by a key
+(<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) and the computation of combined scores.</p>
+<p>Scorers need to be individually set or loaded by
+<a class="reference internal" href="#promod3.scoring.LoadDefaultAllAtomOverallScorer" title="promod3.scoring.LoadDefaultAllAtomOverallScorer"><code class="xref py py-func docutils literal"><span class="pre">LoadDefaultAllAtomOverallScorer()</span></code></a></p>
+<dl class="method">
+<dt id="promod3.scoring.AllAtomOverallScorer.Contains">
+<code class="descname">Contains</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomOverallScorer.Contains" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, if a scorer object for this key was already added.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>key</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Key for desired scorer.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.AllAtomOverallScorer.Get">
+<code class="descname">Get</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomOverallScorer.Get" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Scorer with the given <em>key</em> (read-only access).</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.AllAtomScorer" title="promod3.scoring.AllAtomScorer"><code class="xref py py-class docutils literal"><span class="pre">AllAtomScorer</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>key</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Key for desired scorer.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if there is no scorer with that
+<em>key</em>.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.AllAtomOverallScorer.AttachEnvironment">
+<code class="descname">AttachEnvironment</code><span class="sig-paren">(</span><em>env</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomOverallScorer.AttachEnvironment" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>env</strong> (<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a>) &#8211; Link all scorers to this score environment.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.AllAtomOverallScorer.CalculateLinearCombination">
+<code class="descname">CalculateLinearCombination</code><span class="sig-paren">(</span><em>linear_weights</em>, <em>start_resnum</em>, <em>num_residues</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomOverallScorer.CalculateLinearCombination" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calculate linear combination of scores for the desired loop (extracted from
+environment) against the set environment (see
+<a class="reference internal" href="#promod3.scoring.AllAtomScorer.CalculateScore" title="promod3.scoring.AllAtomScorer.CalculateScore"><code class="xref py py-meth docutils literal"><span class="pre">AllAtomScorer.CalculateScore()</span></code></a>).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>linear_weights</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a> (keys: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>,
+values: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)) &#8211; Weights for each desired scorer. You can add a
+constant value to each score by defining a weight
+with key &#8220;intercept&#8221;.</li>
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResNum" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResNum</span></code></a>) &#8211; Res. number defining the position in the SEQRES
+(see <a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a> for indexing)</li>
+<li><strong>num_residues</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length of loop.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of chain the loop belongs to
+(see <a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a> for indexing)</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Score for the given set of atoms.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>linear_weights</em> has a <em>key</em> for
+which no scorer exists or anything raised in
+<a class="reference internal" href="#promod3.scoring.AllAtomScorer.CalculateScore" title="promod3.scoring.AllAtomScorer.CalculateScore"><code class="xref py py-meth docutils literal"><span class="pre">AllAtomScorer.CalculateScore()</span></code></a> for any of the used scorers.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.AllAtomOverallScorer.__getitem__">
+<code class="descname">__getitem__</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomOverallScorer.__getitem__" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.AllAtomOverallScorer.__setitem__">
+<code class="descname">__setitem__</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomOverallScorer.__setitem__" title="Permalink to this definition">¶</a></dt>
+<dd><p>Allow read/write access (with [<em>key</em>]) to scorer object with given key.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>key</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Key for desired scorer.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.scoring.LoadDefaultAllAtomOverallScorer">
+<code class="descclassname">promod3.scoring.</code><code class="descname">LoadDefaultAllAtomOverallScorer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.LoadDefaultAllAtomOverallScorer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Loads or creates the default scorers accessible through
+following keys:
+&#8220;aa_interaction&#8221;, &#8220;aa_packing&#8221;, &#8220;aa_clash&#8221;</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.AllAtomOverallScorer" title="promod3.scoring.AllAtomOverallScorer"><code class="xref py py-class docutils literal"><span class="pre">AllAtomOverallScorer</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="allatomscorer-base-class">
+<h2>AllAtomScorer base class<a class="headerlink" href="#allatomscorer-base-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.AllAtomScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">AllAtomScorer</code><a class="headerlink" href="#promod3.scoring.AllAtomScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Base class for all the all atom scorers listed below.</p>
+<dl class="method">
+<dt id="promod3.scoring.AllAtomScorer.AttachEnvironment">
+<code class="descname">AttachEnvironment</code><span class="sig-paren">(</span><em>env</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomScorer.AttachEnvironment" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>env</strong> (<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a>) &#8211; Link scorer to this score environment.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.AllAtomScorer.CalculateScore">
+<code class="descname">CalculateScore</code><span class="sig-paren">(</span><em>start_resnum</em>, <em>num_residues</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomScorer.CalculateScore" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calculates score for the desired loop (extracted from environment) against
+the set environment. Unless otherwise noted in the scorer, a lower &#8220;score&#8221;
+is better!</p>
+<p>Note that the structural data of the loop is expected to be in the linked
+environment before calling this! This behavior is different from the
+corresponding function in <a class="reference internal" href="backbone_scorers.html#promod3.scoring.BackboneScorer" title="promod3.scoring.BackboneScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneScorer</span></code></a> as, for performance
+reasons, we require all the comparisons to be done against the environment.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResNum" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResNum</span></code></a>) &#8211; Res. number defining the position in the SEQRES
+(see <a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a> for indexing)</li>
+<li><strong>num_residues</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length of loop.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of chain the loop belongs to
+(see <a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a> for indexing)</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Score for the given set of atoms.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">(for most scorers) <a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if scorer was
+never attached to a score environment, if scorer has never been
+properly initialized or if <em>chain_index</em> / <em>start_resnum</em> lead to
+invalid positions.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.AllAtomScorer.CalculateScoreProfile">
+<code class="descname">CalculateScoreProfile</code><span class="sig-paren">(</span><em>start_resnum</em>, <em>num_residues</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomScorer.CalculateScoreProfile" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calculates per residue scores for the desired loop (extracted from
+environment) against the set environment.</p>
+<p>Note that the structural data of the loop is expected to be in the linked
+environment before calling this! This behavior is different from the
+corresponding function in <a class="reference internal" href="backbone_scorers.html#promod3.scoring.BackboneScorer" title="promod3.scoring.BackboneScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneScorer</span></code></a> as, for performance
+reasons, we require all the comparisons to be done against the environment.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResNum" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResNum</span></code></a>) &#8211; Res. number defining the position in the SEQRES
+(see <a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a> for indexing)</li>
+<li><strong>num_residues</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length of loop.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of chain the loop belongs to
+(see <a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomEnv" title="promod3.loop.AllAtomEnv"><code class="xref py py-class docutils literal"><span class="pre">AllAtomEnv</span></code></a> for indexing)</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Scores for the given loop, one for each residue.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">same <a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> as <a class="reference internal" href="#promod3.scoring.AllAtomScorer.CalculateScore" title="promod3.scoring.AllAtomScorer.CalculateScore"><code class="xref py py-meth docutils literal"><span class="pre">CalculateScore()</span></code></a>.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="allatominteractionscorer-class">
+<h2>AllAtomInteractionScorer class<a class="headerlink" href="#allatominteractionscorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.AllAtomInteractionScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">AllAtomInteractionScorer</code><span class="sig-paren">(</span><em>cutoff</em>, <em>bins</em>, <em>seq_sep</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomInteractionScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.AllAtomScorer" title="promod3.scoring.AllAtomScorer"><code class="xref py py-class docutils literal"><span class="pre">AllAtomScorer</span></code></a>. Evaluates a pairwise
+pseudo interaction energy between all atoms which are located within a
+<em>cutoff</em> and which are at least <em>seq_sep</em> residues apart. An energy is
+assigned to each distance using equally sized bins and distinguishing all
+possible pairs of atoms (usually the energy only differs for chemically
+distinguishable heavy atoms). The calculated score is normalized by the number
+of interacting atom pairs.</p>
+<p>The scorer needs to be initialized either by loading a predefined scorer (e.g.
+<a class="reference internal" href="#promod3.scoring.LoadAllAtomInteractionScorer" title="promod3.scoring.LoadAllAtomInteractionScorer"><code class="xref py py-func docutils literal"><span class="pre">LoadAllAtomInteractionScorer()</span></code></a>) or by setting all energies (see <a class="reference internal" href="#promod3.scoring.AllAtomInteractionScorer.SetEnergy" title="promod3.scoring.AllAtomInteractionScorer.SetEnergy"><code class="xref py py-meth docutils literal"><span class="pre">SetEnergy()</span></code></a>).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Radius in which other atoms are counted.</li>
+<li><strong>bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to discretize distances (range
+of [0,*cutoff*]).</li>
+<li><strong>seq_sep</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Minimal separation in sequence two residues must have to
+be considered.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>cutoff</em> &lt; 0, <em>bins</em> &lt; 1 or
+<em>seq_sep</em> &lt; 1.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="staticmethod">
+<dt id="promod3.scoring.AllAtomInteractionScorer.Load">
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomInteractionScorer.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.AllAtomInteractionScorer.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomInteractionScorer.LoadPortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.scoring.AllAtomInteractionScorer.Save" title="promod3.scoring.AllAtomInteractionScorer.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
+reading) / portable file generated with <a class="reference internal" href="#promod3.scoring.AllAtomInteractionScorer.SavePortable" title="promod3.scoring.AllAtomInteractionScorer.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The loaded scorer</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.AllAtomInteractionScorer" title="promod3.scoring.AllAtomInteractionScorer"><code class="xref py py-class docutils literal"><span class="pre">AllAtomInteractionScorer</span></code></a></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.AllAtomInteractionScorer.Save">
+<code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomInteractionScorer.Save" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.AllAtomInteractionScorer.SavePortable">
+<code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomInteractionScorer.SavePortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file where it will be saved.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.AllAtomInteractionScorer.SetEnergy">
+<code class="descname">SetEnergy</code><span class="sig-paren">(</span><em>aaa1</em>, <em>aaa2</em>, <em>bin</em>, <em>energy</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomInteractionScorer.SetEnergy" title="Permalink to this definition">¶</a></dt>
+<dd><p>Setup one energy value. Unless a predefined scorer is loaded, this must be
+called for every pair of heavy atom types and for every <em>bin</em> &lt; <em>bins</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>aaa1</strong> (<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AminoAcidAtom" title="promod3.loop.AminoAcidAtom"><code class="xref py py-class docutils literal"><span class="pre">AminoAcidAtom</span></code></a>) &#8211; Heavy atom type for first interaction partner.</li>
+<li><strong>aaa2</strong> (<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AminoAcidAtom" title="promod3.loop.AminoAcidAtom"><code class="xref py py-class docutils literal"><span class="pre">AminoAcidAtom</span></code></a>) &#8211; Heavy atom type for second interaction partner.</li>
+<li><strong>bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the interaction distance.</li>
+<li><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Energy to set for those parameters.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if inputs are invalid</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.scoring.LoadAllAtomInteractionScorer">
+<code class="descclassname">promod3.scoring.</code><code class="descname">LoadAllAtomInteractionScorer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.LoadAllAtomInteractionScorer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The default predefined AllAtomInteractionScorer (loaded from disk)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.AllAtomInteractionScorer" title="promod3.scoring.AllAtomInteractionScorer"><code class="xref py py-class docutils literal"><span class="pre">AllAtomInteractionScorer</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="allatompackingscorer-class">
+<h2>AllAtomPackingScorer class<a class="headerlink" href="#allatompackingscorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.AllAtomPackingScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">AllAtomPackingScorer</code><span class="sig-paren">(</span><em>cutoff</em>, <em>max_count</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomPackingScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.AllAtomScorer" title="promod3.scoring.AllAtomScorer"><code class="xref py py-class docutils literal"><span class="pre">AllAtomScorer</span></code></a>. Evaluates pseudo
+energies by counting surrounding atoms within a certain <em>cutoff</em> radius around
+all heavy atoms not belonging to the assessed residue itself. The calculated
+score is normalized by the number of atoms being assessed.</p>
+<p>The scorer needs to be initialized either by loading a predefined scorer (e.g.
+<a class="reference internal" href="#promod3.scoring.LoadAllAtomPackingScorer" title="promod3.scoring.LoadAllAtomPackingScorer"><code class="xref py py-func docutils literal"><span class="pre">LoadAllAtomPackingScorer()</span></code></a>) or by setting all energies (see
+<a class="reference internal" href="#promod3.scoring.AllAtomPackingScorer.SetEnergy" title="promod3.scoring.AllAtomPackingScorer.SetEnergy"><code class="xref py py-meth docutils literal"><span class="pre">SetEnergy()</span></code></a>).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Radius in which other atoms are counted.</li>
+<li><strong>max_count</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If number of other atoms exceeds <em>max_count</em>, it will
+be set to this number.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>cutoff</em> &lt; 0, <em>max_count</em> &lt; 1.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="staticmethod">
+<dt id="promod3.scoring.AllAtomPackingScorer.Load">
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomPackingScorer.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.AllAtomPackingScorer.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomPackingScorer.LoadPortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.scoring.AllAtomPackingScorer.Save" title="promod3.scoring.AllAtomPackingScorer.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
+reading) / portable file generated with <a class="reference internal" href="#promod3.scoring.AllAtomPackingScorer.SavePortable" title="promod3.scoring.AllAtomPackingScorer.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The loaded scorer</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.AllAtomPackingScorer" title="promod3.scoring.AllAtomPackingScorer"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPackingScorer</span></code></a></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.AllAtomPackingScorer.Save">
+<code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomPackingScorer.Save" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.AllAtomPackingScorer.SavePortable">
+<code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomPackingScorer.SavePortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file where it will be saved.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.AllAtomPackingScorer.SetEnergy">
+<code class="descname">SetEnergy</code><span class="sig-paren">(</span><em>aaa</em>, <em>count</em>, <em>energy</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.AllAtomPackingScorer.SetEnergy" title="Permalink to this definition">¶</a></dt>
+<dd><p>Setup one energy value. Unless a predefined scorer is loaded, this must be
+called for every heavy atom type and for every <em>count</em> &lt;= <em>max_count</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>aaa</strong> (<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AminoAcidAtom" title="promod3.loop.AminoAcidAtom"><code class="xref py py-class docutils literal"><span class="pre">AminoAcidAtom</span></code></a>) &#8211; Heavy atom type for which to set energy.</li>
+<li><strong>count</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of surrounding atoms for which to set energy.</li>
+<li><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Energy to set for those parameters.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if inputs are invalid</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.scoring.LoadAllAtomPackingScorer">
+<code class="descclassname">promod3.scoring.</code><code class="descname">LoadAllAtomPackingScorer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.LoadAllAtomPackingScorer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The default predefined AllAtomPackingScorer (loaded from disk)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.AllAtomPackingScorer" title="promod3.scoring.AllAtomPackingScorer"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPackingScorer</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="allatomclashscorer-class">
+<h2>AllAtomClashScorer class<a class="headerlink" href="#allatomclashscorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.AllAtomClashScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">AllAtomClashScorer</code><a class="headerlink" href="#promod3.scoring.AllAtomClashScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.AllAtomScorer" title="promod3.scoring.AllAtomScorer"><code class="xref py py-class docutils literal"><span class="pre">AllAtomScorer</span></code></a>. Calculates a simple
+clash score of all atoms against the environment. There is no need to define
+any parameters here as all interaction energies are fixed (see Eq. (11) in
+<a class="reference internal" href="../sidechain/disulfid.html#canutescu2003b" id="id1">[canutescu2003b]</a>). The calculated score is normalized by the number of atoms
+being assessed.</p>
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">All Atom Scorers</a><ul>
+<li><a class="reference internal" href="#allatomoverallscorer-class">AllAtomOverallScorer class</a></li>
+<li><a class="reference internal" href="#allatomscorer-base-class">AllAtomScorer base class</a></li>
+<li><a class="reference internal" href="#allatominteractionscorer-class">AllAtomInteractionScorer class</a></li>
+<li><a class="reference internal" href="#allatompackingscorer-class">AllAtomPackingScorer class</a></li>
+<li><a class="reference internal" href="#allatomclashscorer-class">AllAtomClashScorer class</a></li>
+</ul>
+</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="docutils literal"><span class="pre">scoring</span></code> - Loop Scoring</a><ul>
+      <li>Previous: <a href="backbone_scorers.html" title="previous chapter">Backbone Scorers</a></li>
+      <li>Next: <a href="../loop/index.html" title="next chapter"><code class="docutils literal"><span class="pre">loop</span></code> - Loop Handling</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/scoring/all_atom_scorers.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/scoring/all_atom_scorers.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/scoring/backbone_score_env.html b/doc/html/scoring/backbone_score_env.html
new file mode 100644
index 00000000..963ad3d4
--- /dev/null
+++ b/doc/html/scoring/backbone_score_env.html
@@ -0,0 +1,511 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Backbone Score Environment &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="scoring - Loop Scoring" href="index.html" />
+    <link rel="next" title="Backbone Scorers" href="backbone_scorers.html" />
+    <link rel="prev" title="scoring - Loop Scoring" href="index.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="backbone-score-environment">
+<h1>Backbone Score Environment<a class="headerlink" href="#backbone-score-environment" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="backbonescoreenv-class">
+<h2>BackboneScoreEnv class<a class="headerlink" href="#backbonescoreenv-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.BackboneScoreEnv">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">BackboneScoreEnv</code><span class="sig-paren">(</span><em>seqres</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneScoreEnv" title="Permalink to this definition">¶</a></dt>
+<dd><p>The backbone score environment contains and handles all model-specific data
+used by the scorers. It is linked to a (list of) seqres (one per chain) at
+construction. The idea is to initialize it at the beginning of the modelling
+process with all known data (positions extracted from template, psipred
+prediction, density map, etc) and then update the environment whenever a new
+loop is being added. Note that, depending on the used scorers, some
+information must be provided for the score to make sense and any env. data can
+be set at any time before actually calculating a score.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>seqres</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceHandle</span></code></a> /
+<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.SequenceList" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceList</span></code></a>) &#8211; Internal SEQRES to be set (single chain or list with one per
+chain). Whenever setting structural data, consistency with this SEQRES is enforced.</td>
+</tr>
+</tbody>
+</table>
+<p>To access parts of the environment there are two key arguments to consider:</p>
+<ul class="simple">
+<li><em>chain_idx</em>: Index of chain as it occurs in <em>seqres</em> (0 for single sequence)</li>
+<li><em>start_resnum</em>: Residue number defining the position in the SEQRES of chain
+with index <em>chain_idx</em>. <strong>The numbering starts for every chain with the
+value 1</strong>.</li>
+</ul>
+<dl class="method">
+<dt id="promod3.scoring.BackboneScoreEnv.Copy">
+<code class="descname">Copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneScoreEnv.Copy" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A copy of the current <a class="reference internal" href="#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a> without any scorers
+attached</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneScoreEnv.SetInitialEnvironment">
+<code class="descname">SetInitialEnvironment</code><span class="sig-paren">(</span><em>env_structure</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneScoreEnv.SetInitialEnvironment" title="Permalink to this definition">¶</a></dt>
+<dd><p>Sets structural environment with which loops to be scored interact. If
+structural data was already set, all the existing data gets cleared first.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>env_structure</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityHandle</span></code></a>) &#8211; Structral data to be set as environment. The chains
+in <em>env_structure</em> are expected to be in the same
+order as the SEQRES items provided in constructor.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>env</em> is inconsistent with
+SEQRES set in constructor. This can be because of corrupt residue
+numbers or sequence mismatches.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneScoreEnv.SetEnvironment">
+<code class="descname">SetEnvironment</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneScoreEnv.SetEnvironment" title="Permalink to this definition">¶</a></dt>
+<dd><p>Add/update structural information in environment. If structural data for
+specific residues is already set, the data gets resetted for these
+positions.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><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"><span class="pre">BackboneList</span></code></a>) &#8211; Structural data to be set as environment.</li>
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> / <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResNum" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResNum</span></code></a>) &#8211; Res. number defining the position in the SEQRES.</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of chain the structural data belongs to.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if sequence of <em>bb_list</em> is
+inconsistent with previously SEQRES set in constructor or when
+either <em>start_resnum</em> or <em>chain_idx</em> point to invalid positions in
+the SEQRES.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneScoreEnv.ClearEnvironment">
+<code class="descname">ClearEnvironment</code><span class="sig-paren">(</span><em>start_resnum</em>, <em>num_residues</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneScoreEnv.ClearEnvironment" title="Permalink to this definition">¶</a></dt>
+<dd><p>Clears a stretch of length <em>num_residues</em> in the environment in chain
+with idx <em>chain_idx</em> starting from residue number <em>start_resnum</em></p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Start of stretch to clear</li>
+<li><strong>num_residues</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Length of stretch to clear</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Chain the stretch belongs to</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> when either <em>start_resnum</em> or
+<em>chain_idx</em> point to invalid positions in the SEQRES.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneScoreEnv.SetPsipredPrediction">
+<code class="descname">SetPsipredPrediction</code><span class="sig-paren">(</span><em>pred</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneScoreEnv.SetPsipredPrediction" title="Permalink to this definition">¶</a></dt>
+<dd><p>Set the psipred prediction, which is necessary to calculate some scores.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pred</strong> (<code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code> / <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of
+<code class="xref py py-class docutils literal"><span class="pre">PsipredPrediction</span></code>) &#8211; Psipred prediction to set (one per chain).</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if the number of predictions is
+inconsistent with the number of internal chains or when one of the
+predictions&#8217; sizes is inconsistent with the internal SEQRES size.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneScoreEnv.SetMap">
+<code class="descname">SetMap</code><span class="sig-paren">(</span><em>map</em>, <em>resolution</em>, <em>all_atom=False</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneScoreEnv.SetMap" title="Permalink to this definition">¶</a></dt>
+<dd><p>Sets an internal density map, which is necessary to calculate some scores.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>map</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/img/base/img/#ost.img.ImageHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.img.ImageHandle</span></code></a>) &#8211; The density map</li>
+<li><strong>resolution</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Expected resolution of the density map.</li>
+<li><strong>all_atom</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether the map is accurate enough to resolve all atoms.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneScoreEnv.AddPairwiseFunction">
+<code class="descname">AddPairwiseFunction</code><span class="sig-paren">(</span><em>function</em>, <em>function_type</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneScoreEnv.AddPairwiseFunction" title="Permalink to this definition">¶</a></dt>
+<dd><p>Adds a pairwise function that can be used in <a class="reference internal" href="#promod3.scoring.BackboneScoreEnv.ApplyPairwiseFunction" title="promod3.scoring.BackboneScoreEnv.ApplyPairwiseFunction"><code class="xref py py-meth docutils literal"><span class="pre">ApplyPairwiseFunction()</span></code></a>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>function</strong> (<a class="reference internal" href="#promod3.scoring.PairwiseFunction" title="promod3.scoring.PairwiseFunction"><code class="xref py py-class docutils literal"><span class="pre">PairwiseFunction</span></code></a>) &#8211; Pairwise function to be added.</li>
+<li><strong>function_type</strong> (<a class="reference internal" href="#promod3.scoring.PairwiseFunctionType" title="promod3.scoring.PairwiseFunctionType"><code class="xref py py-class docutils literal"><span class="pre">PairwiseFunctionType</span></code></a>) &#8211; What distances should be looked at for this function.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Function index to be used in <a class="reference internal" href="#promod3.scoring.BackboneScoreEnv.ApplyPairwiseFunction" title="promod3.scoring.BackboneScoreEnv.ApplyPairwiseFunction"><code class="xref py py-meth docutils literal"><span class="pre">ApplyPairwiseFunction()</span></code></a>.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneScoreEnv.ApplyPairwiseFunction">
+<code class="descname">ApplyPairwiseFunction</code><span class="sig-paren">(</span><em>chain_idx_one</em>, <em>resnum_one</em>, <em>chain_idx_two</em>, <em>resnum_two</em>, <em>f_idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneScoreEnv.ApplyPairwiseFunction" title="Permalink to this definition">¶</a></dt>
+<dd><p>Define two residues to be evaluated with a given pairwise function. This
+data can then be used by scorers. Note that the pairs are symmetric and so
+there is no need to add them twice with switched residues.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>chain_idx_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Chain index of first residue</li>
+<li><strong>resnum_one</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Res. number of first residue</li>
+<li><strong>chain_idx_two</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Chain index of second residue</li>
+<li><strong>resnum_two</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Res. number of second residue</li>
+<li><strong>f_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of pairwise function (as returned by
+<a class="reference internal" href="#promod3.scoring.BackboneScoreEnv.AddPairwiseFunction" title="promod3.scoring.BackboneScoreEnv.AddPairwiseFunction"><code class="xref py py-meth docutils literal"><span class="pre">AddPairwiseFunction()</span></code></a>)</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if any of the chain indices or
+res. numbers is invalid, the interaction partners are the same
+residue or when <em>f_idx</em> is an invalid index.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneScoreEnv.GetSeqres">
+<code class="descname">GetSeqres</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneScoreEnv.GetSeqres" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">SEQRES that was set in constructor (one sequence per chain).</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.SequenceList" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceList</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="pairwise-function-classes">
+<h2>Pairwise function classes<a class="headerlink" href="#pairwise-function-classes" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.PairwiseFunctionType">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">PairwiseFunctionType</code><a class="headerlink" href="#promod3.scoring.PairwiseFunctionType" title="Permalink to this definition">¶</a></dt>
+<dd><p>Enumerates the pairwise function types. Possible values:</p>
+<ul class="simple">
+<li><em>CA_PAIRWISE_FUNCTION</em> - Evaluate CA atoms distances.</li>
+<li><em>CB_PAIRWISE_FUNCTION</em> - Evaluate CB atoms distances.</li>
+</ul>
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.scoring.PairwiseFunction">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">PairwiseFunction</code><a class="headerlink" href="#promod3.scoring.PairwiseFunction" title="Permalink to this definition">¶</a></dt>
+<dd><p>Base class for any pairwise function.</p>
+<dl class="method">
+<dt id="promod3.scoring.PairwiseFunction.Score">
+<code class="descname">Score</code><span class="sig-paren">(</span><em>distance</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.PairwiseFunction.Score" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Score for a given pairwise distance</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>distance</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Pairwise distance</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.scoring.ConstraintFunction">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">ConstraintFunction</code><span class="sig-paren">(</span><em>min_dist</em>, <em>max_dist</em>, <em>values</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.ConstraintFunction" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.PairwiseFunction" title="promod3.scoring.PairwiseFunction"><code class="xref py py-class docutils literal"><span class="pre">PairwiseFunction</span></code></a>.
+Defines a constraint function. The score for a distance between <em>min_dist</em> and
+<em>max_dist</em> is determined by liner interpolation assuming the first and last
+value exactly lying on <em>min_dist</em> ang <em>max_dist</em>. For distances outside the
+range defined by <em>min_dist</em> and <em>max_dist</em>, the score is 0.0.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>min_dist</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Minimal distance to be considered</li>
+<li><strong>max_dist</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal distance to be considered</li>
+<li><strong>values</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The possible values that get returned when the distance is
+between <em>min_dist</em> and <em>max_dist</em></li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Index of added constraint definition</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>min_dist</em> &gt;= <em>max_dist</em> or when
+<em>min_dist</em> or <em>max_dist</em> are negative or when <em>values</em> contains no
+elements</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="class">
+<dt id="promod3.scoring.ContactFunction">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">ContactFunction</code><span class="sig-paren">(</span><em>max_dist</em>, <em>score</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.ContactFunction" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.PairwiseFunction" title="promod3.scoring.PairwiseFunction"><code class="xref py py-class docutils literal"><span class="pre">PairwiseFunction</span></code></a>.
+Defines a simple contact function. The score value is <em>score</em> if
+distance &lt; <em>max_dist</em> and 0 otherwise.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>max_dist</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal distance to be in contact</li>
+<li><strong>score</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Value that gets returned if in contact</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="convenient-construction-of-pairwise-functions">
+<h2>Convenient construction of pairwise functions<a class="headerlink" href="#convenient-construction-of-pairwise-functions" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.DiscoContainer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">DiscoContainer</code><span class="sig-paren">(</span><em>seqres</em><span class="optional">[</span>, <em>function_type = CA_PAIRWISE_FUNCTION</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.DiscoContainer" title="Permalink to this definition">¶</a></dt>
+<dd><p>A container collecting structural information until it can be added in form
+of <a class="reference internal" href="#promod3.scoring.ConstraintFunction" title="promod3.scoring.ConstraintFunction"><code class="xref py py-class docutils literal"><span class="pre">ConstraintFunction</span></code></a> to a <a class="reference internal" href="#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a> .
+The constraint functions are built after the principle of QMEANDisCo.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>seqres</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.SequenceHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.SequenceHandle</span></code></a>) &#8211; The sequence with which all added structures must match</li>
+<li><strong>function_type</strong> (<a class="reference internal" href="#promod3.scoring.PairwiseFunctionType" title="promod3.scoring.PairwiseFunctionType"><code class="xref py py-class docutils literal"><span class="pre">PairwiseFunctionType</span></code></a>) &#8211; Whether you want to assess pairwise distances between CA
+or CB atoms</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="function">
+<dt id="promod3.scoring.DiscoContainer.AddStructuralInfo">
+<code class="descname">AddStructuralInfo</code><span class="sig-paren">(</span><em>aln</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.DiscoContainer.AddStructuralInfo" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>aln</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/seq/base/seq/#ost.seq.AlignmentHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.seq.AlignmentHandle</span></code></a>) &#8211; Alignment, where first sequence represent the initial
+SEQRES and the second sequence the actual structural
+info. The second sequence must have a view attached.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if number of sequences in <em>aln</em> is
+not two, the SEQRES does not match or when the second sequence in
+<em>aln</em> has no view attached.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.scoring.DiscoContainer.AttachConstraints">
+<code class="descname">AttachConstraints</code><span class="sig-paren">(</span><em>env</em>, <em>chain_indices</em><span class="optional">[</span>, <em>cluster_thresh = 0.5</em>, <em>gamma = 70.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.DiscoContainer.AttachConstraints" title="Permalink to this definition">¶</a></dt>
+<dd><p>Generates distance constraints and adds it to <em>env</em>.
+It first clusters the added sequences with a pairwise normalised sequence
+similarity based on BLOSUM62. It&#8217;s a hierarchical clustering with with an
+average distance metric and <em>cluster_thresh</em> as threshold to merge two
+clusters. Constraint functions are built for every cluster and finally
+merged. The influence of the per cluster constraint functions to the overall
+function depends on the clusters average sequence similarity to the
+target SEQRES. How fast this influence vanishes gets controlled by gamma.
+The higher it is, the faster vanishes the influence of structural info
+from distant clusters. The final pairwise cluster functions get then
+directly added to the scoring <em>env</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>env</strong> (<a class="reference internal" href="#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a>) &#8211; The scoring env to which the constraint
+should be added</li>
+<li><strong>chain_indices</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Indices of chains for which the constraints should
+be added</li>
+<li><strong>cluster_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Controls the clustering behaviour at the initial
+stage of constraint construction</li>
+<li><strong>gamma</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Controls how fast the influence of constraint
+functions of distant clusters vanishes</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if one of the <em>chain_indices</em> is
+invalid or the SEQRES set in <em>env</em> for specified chain is
+inconsistent with SEQRES you initialized the DiscoContainer with</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Backbone Score Environment</a><ul>
+<li><a class="reference internal" href="#backbonescoreenv-class">BackboneScoreEnv class</a></li>
+<li><a class="reference internal" href="#pairwise-function-classes">Pairwise function classes</a></li>
+<li><a class="reference internal" href="#convenient-construction-of-pairwise-functions">Convenient construction of pairwise functions</a></li>
+</ul>
+</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="docutils literal"><span class="pre">scoring</span></code> - Loop Scoring</a><ul>
+      <li>Previous: <a href="index.html" title="previous chapter"><code class="docutils literal"><span class="pre">scoring</span></code> - Loop Scoring</a></li>
+      <li>Next: <a href="backbone_scorers.html" title="next chapter">Backbone Scorers</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/scoring/backbone_score_env.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/scoring/backbone_score_env.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/scoring/backbone_scorers.html b/doc/html/scoring/backbone_scorers.html
new file mode 100644
index 00000000..27a66eef
--- /dev/null
+++ b/doc/html/scoring/backbone_scorers.html
@@ -0,0 +1,1214 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Backbone Scorers &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="scoring - Loop Scoring" href="index.html" />
+    <link rel="next" title="All Atom Scorers" href="all_atom_scorers.html" />
+    <link rel="prev" title="Backbone Score Environment" href="backbone_score_env.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="backbone-scorers">
+<h1>Backbone Scorers<a class="headerlink" href="#backbone-scorers" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="backboneoverallscorer-class">
+<h2>BackboneOverallScorer class<a class="headerlink" href="#backboneoverallscorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.BackboneOverallScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">BackboneOverallScorer</code><a class="headerlink" href="#promod3.scoring.BackboneOverallScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Container that allows for the storage of multiple scorers identified by a key
+(<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) and the computation of combined scores.</p>
+<p>Scorers need to be individually set or loaded by
+<a class="reference internal" href="#promod3.scoring.LoadDefaultBackboneOverallScorer" title="promod3.scoring.LoadDefaultBackboneOverallScorer"><code class="xref py py-func docutils literal"><span class="pre">LoadDefaultBackboneOverallScorer()</span></code></a></p>
+<dl class="method">
+<dt id="promod3.scoring.BackboneOverallScorer.Contains">
+<code class="descname">Contains</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneOverallScorer.Contains" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, if a scorer object for this key was already added.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>key</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Key for desired scorer.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneOverallScorer.Get">
+<code class="descname">Get</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneOverallScorer.Get" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Scorer with the given <em>key</em> (read-only access).</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.BackboneScorer" title="promod3.scoring.BackboneScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneScorer</span></code></a></td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>key</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Key for desired scorer.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if there is no scorer with that
+<em>key</em>.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneOverallScorer.AttachEnvironment">
+<code class="descname">AttachEnvironment</code><span class="sig-paren">(</span><em>env</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneOverallScorer.AttachEnvironment" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>env</strong> (<a class="reference internal" href="backbone_score_env.html#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a>) &#8211; Link all scorers to this score environment.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneOverallScorer.Calculate">
+<code class="descname">Calculate</code><span class="sig-paren">(</span><em>key</em>, <em>bb_list</em>, <em>start_resnum</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneOverallScorer.Calculate" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calculate score(s) for one or many loop(s) with
+<a class="reference internal" href="#promod3.scoring.BackboneScorer.CalculateScore" title="promod3.scoring.BackboneScorer.CalculateScore"><code class="xref py py-meth docutils literal"><span class="pre">BackboneScorer.CalculateScore()</span></code></a>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>key</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Key for desired scorer.</li>
+<li><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"><span class="pre">BackboneList</span></code></a> / <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of
+<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop(s) for which to calculate the given score</li>
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Res. number defining the position in the SEQRES
+(see <a class="reference internal" href="backbone_score_env.html#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a> for indexing)</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of chain the loop(s) belong to
+(see <a class="reference internal" href="backbone_score_env.html#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a> for indexing)</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Score(s) calculated with the desired scorer for the given loop(s).
+In the case of multiple loops, the returned list has the same
+order as the input.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a> / <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if there is no scorer with that
+<em>key</em> or anything raised in <a class="reference internal" href="#promod3.scoring.BackboneScorer.CalculateScore" title="promod3.scoring.BackboneScorer.CalculateScore"><code class="xref py py-meth docutils literal"><span class="pre">BackboneScorer.CalculateScore()</span></code></a>.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneOverallScorer.CalculateLinearCombination">
+<code class="descname">CalculateLinearCombination</code><span class="sig-paren">(</span><em>linear_weights</em>, <em>bb_list</em>, <em>start_resnum</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneOverallScorer.CalculateLinearCombination" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calculate linear combination(s) of scores for one or many loop(s).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>linear_weights</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a> (keys: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>,
+values: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>)) &#8211; Weights for each desired scorer. You can add a
+constant value to each score by defining a weight
+with key &#8220;intercept&#8221;.</li>
+<li><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"><span class="pre">BackboneList</span></code></a> / <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of
+<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a>) &#8211; Loop(s) for which to calculate the given score</li>
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Res. number defining the position in the SEQRES
+(see <a class="reference internal" href="backbone_score_env.html#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a> for indexing)</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of chain the loop(s) belong to
+(see <a class="reference internal" href="backbone_score_env.html#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a> for indexing)</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Linear combination(s) of the scores calculated with the desired
+scorers for the given loop(s). In the case of multiple loops, the
+returned list has the same order as the input.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a> / <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>linear_weights</em> has a <em>key</em> for
+which no scorer exists or anything raised in
+<a class="reference internal" href="#promod3.scoring.BackboneScorer.CalculateScore" title="promod3.scoring.BackboneScorer.CalculateScore"><code class="xref py py-meth docutils literal"><span class="pre">BackboneScorer.CalculateScore()</span></code></a> for any of the used scorers.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneOverallScorer.__getitem__">
+<code class="descname">__getitem__</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneOverallScorer.__getitem__" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.BackboneOverallScorer.__setitem__">
+<code class="descname">__setitem__</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneOverallScorer.__setitem__" title="Permalink to this definition">¶</a></dt>
+<dd><p>Allow read/write access (with [<em>key</em>]) to scorer object with given key.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>key</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Key for desired scorer.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.scoring.LoadDefaultBackboneOverallScorer">
+<code class="descclassname">promod3.scoring.</code><code class="descname">LoadDefaultBackboneOverallScorer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.LoadDefaultBackboneOverallScorer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Loads or creates the default scorers accessible through
+following keys:
+&#8220;cb_packing&#8221;, &#8220;cbeta&#8221;, &#8220;reduced&#8221;, &#8220;clash&#8221;, &#8220;hbond&#8221;, &#8220;ss_agreement&#8221;,&#8221;torsion&#8221;, &#8220;pairwise&#8221;, &#8220;density&#8221;</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.BackboneOverallScorer" title="promod3.scoring.BackboneOverallScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneOverallScorer</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="backbonescorer-base-class">
+<h2>BackboneScorer base class<a class="headerlink" href="#backbonescorer-base-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.BackboneScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">BackboneScorer</code><a class="headerlink" href="#promod3.scoring.BackboneScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Base class for all the backbone scorers listed below.</p>
+<dl class="method">
+<dt id="promod3.scoring.BackboneScorer.AttachEnvironment">
+<code class="descname">AttachEnvironment</code><span class="sig-paren">(</span><em>env</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneScorer.AttachEnvironment" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>env</strong> (<a class="reference internal" href="backbone_score_env.html#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a>) &#8211; Link scorer to this score environment.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneScorer.CalculateScore">
+<code class="descname">CalculateScore</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneScorer.CalculateScore" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calculates score for the given loop internally and against the set
+environment. Data in the environment, which overlaps with the given
+<em>bb_list</em> is ignored. Unless otherwise noted in the scorer, a lower &#8220;score&#8221;
+is better!</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><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"><span class="pre">BackboneList</span></code></a>) &#8211; Loop for which to calculate the given score</li>
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Res. number defining the position in the SEQRES
+(see <a class="reference internal" href="backbone_score_env.html#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a> for indexing)</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of chain the loop belongs to
+(see <a class="reference internal" href="backbone_score_env.html#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a> for indexing)</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Score for the given loop.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">(for most scorers) <a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if scorer was
+never attached to a score environment, if scorer has never been
+properly initialized or if <em>chain_index</em> / <em>start_resnum</em> lead to
+invalid positions.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.BackboneScorer.CalculateScoreProfile">
+<code class="descname">CalculateScoreProfile</code><span class="sig-paren">(</span><em>bb_list</em>, <em>start_resnum</em>, <em>chain_idx=0</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.BackboneScorer.CalculateScoreProfile" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calculates per residue scores for the given loop internally and against the
+set environment. Data in the environment, which overlaps with the given
+<em>bb_list</em> is ignored.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><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"><span class="pre">BackboneList</span></code></a>) &#8211; Loop for which to calculate the given scores</li>
+<li><strong>start_resnum</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Res. number defining the position in the SEQRES
+(see <a class="reference internal" href="backbone_score_env.html#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a> for indexing)</li>
+<li><strong>chain_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of chain the loop belongs to
+(see <a class="reference internal" href="backbone_score_env.html#promod3.scoring.BackboneScoreEnv" title="promod3.scoring.BackboneScoreEnv"><code class="xref py py-class docutils literal"><span class="pre">BackboneScoreEnv</span></code></a> for indexing)</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Scores for the given loop, one for each residue.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">same <a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> as <a class="reference internal" href="#promod3.scoring.BackboneScorer.CalculateScore" title="promod3.scoring.BackboneScorer.CalculateScore"><code class="xref py py-meth docutils literal"><span class="pre">CalculateScore()</span></code></a>.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="cbpackingscorer-class">
+<h2>CBPackingScorer class<a class="headerlink" href="#cbpackingscorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.CBPackingScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">CBPackingScorer</code><span class="sig-paren">(</span><em>cutoff</em>, <em>max_count</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBPackingScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.BackboneScorer" title="promod3.scoring.BackboneScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneScorer</span></code></a>. Evaluates pseudo
+energies by counting the number of other CB positions within a certain
+<em>cutoff</em> radius of the CB position of the residue to be evaluated. The
+calculated score is normalized by the number of residues in the loop.
+In the default mode, the scorer scores a <a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">promod3.loop.BackboneList</span></code></a>
+given the defined environment. By placing this
+<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">promod3.loop.BackboneList</span></code></a>, the score of the residues in the
+environment also change. It is possible to honour this effect by using the
+&#8220;IncludeEnv&#8221; mode. In this alternative mode, every environment residue close
+to the input <a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">promod3.loop.BackboneList</span></code></a> also contributes
+to the final score by adding the difference in score when the environment
+residue sees the original environment and the score when the environment would
+be modified by the <a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">promod3.loop.BackboneList</span></code></a>. You choose the mode
+by specifically calling the according CalculateEnergy functions.
+If you call the CalculateScore function from the parent class
+(e.g. when the scorer is part of the <a class="reference internal" href="#promod3.scoring.BackboneOverallScorer" title="promod3.scoring.BackboneOverallScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneOverallScorer</span></code></a>), it
+gets checked what mode is currently active. You can toggle the mode by calling
+the appropriate functions in this class. By default (when you load a scorer or
+when you create a new scorer) the classic version gets called. If you want to
+get per residue scores, the &#8220;IncludeEnv&#8221; mode makes not much sense and the
+scorer throws an error if a profile is requeset in this mode.</p>
+<p>The scorer needs to be initialized either by loading a predefined scorer (e.g.
+<a class="reference internal" href="#promod3.scoring.LoadCBPackingScorer" title="promod3.scoring.LoadCBPackingScorer"><code class="xref py py-func docutils literal"><span class="pre">LoadCBPackingScorer()</span></code></a>) or by setting all energies (see
+<a class="reference internal" href="#promod3.scoring.CBPackingScorer.SetEnergy" title="promod3.scoring.CBPackingScorer.SetEnergy"><code class="xref py py-meth docutils literal"><span class="pre">SetEnergy()</span></code></a>).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Radius in which other cbeta atoms are counted.</li>
+<li><strong>max_count</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; If number of other cbeta atoms exceeds <em>max_count</em>, it will
+be set to this number.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>cutoff</em> &lt; 0 or <em>max_count</em> &lt; 1.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="staticmethod">
+<dt id="promod3.scoring.CBPackingScorer.Load">
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBPackingScorer.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.CBPackingScorer.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBPackingScorer.LoadPortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.scoring.CBPackingScorer.Save" title="promod3.scoring.CBPackingScorer.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
+reading) / portable file generated with <a class="reference internal" href="#promod3.scoring.CBPackingScorer.SavePortable" title="promod3.scoring.CBPackingScorer.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The loaded scorer</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.CBPackingScorer" title="promod3.scoring.CBPackingScorer"><code class="xref py py-class docutils literal"><span class="pre">CBPackingScorer</span></code></a></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.CBPackingScorer.Save">
+<code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBPackingScorer.Save" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.CBPackingScorer.SavePortable">
+<code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBPackingScorer.SavePortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file where it will be saved.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.CBPackingScorer.SetEnergy">
+<code class="descname">SetEnergy</code><span class="sig-paren">(</span><em>aa</em>, <em>count</em>, <em>energy</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBPackingScorer.SetEnergy" title="Permalink to this definition">¶</a></dt>
+<dd><p>Setup one energy value. Unless a predefined scorer is loaded, this must be
+called for every type of amino acids and for every <em>count</em> &lt;= <em>max_count</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>aa</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; Amino acid for which to set energy.</li>
+<li><strong>count</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of surrounding CB positions for which to set energy.</li>
+<li><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Energy to set for those parameters.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if inputs are invalid</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.CBPackingScorer.UseClassicMode">
+<code class="descname">UseClassicMode</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBPackingScorer.UseClassicMode" title="Permalink to this definition">¶</a></dt>
+<dd><p>If you call this function, the default mode is set to classic if the
+CalculateScore function from the parent class gets called.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.CBPackingScorer.UseIncludeEnvMode">
+<code class="descname">UseIncludeEnvMode</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBPackingScorer.UseIncludeEnvMode" title="Permalink to this definition">¶</a></dt>
+<dd><p>If you call this function, the default mode is set to the
+described alternative mode if the CalculateScore function from the parent
+class gets called.</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.scoring.LoadCBPackingScorer">
+<code class="descclassname">promod3.scoring.</code><code class="descname">LoadCBPackingScorer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.LoadCBPackingScorer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The default predefined CBPackingScorer (loaded from disk)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.CBPackingScorer" title="promod3.scoring.CBPackingScorer"><code class="xref py py-class docutils literal"><span class="pre">CBPackingScorer</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="cbetascorer-class">
+<h2>CBetaScorer class<a class="headerlink" href="#cbetascorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.CBetaScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">CBetaScorer</code><span class="sig-paren">(</span><em>cutoff</em>, <em>bins</em>, <em>seq_sep</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBetaScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.BackboneScorer" title="promod3.scoring.BackboneScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneScorer</span></code></a>. Evaluates a pairwise
+pseudo interaction energy between CB atoms which are located within a <em>cutoff</em>
+and which are at least <em>seq_sep</em> residues apart. An energy is assigned to each
+distance using <em>bins</em> equally sized bins and distinguishing all possible pairs
+of amino acids. The calculated score is normalized by the number of
+interacting CB pairs.</p>
+<p>The scorer needs to be initialized either by loading a predefined scorer (e.g.
+<a class="reference internal" href="#promod3.scoring.LoadCBetaScorer" title="promod3.scoring.LoadCBetaScorer"><code class="xref py py-func docutils literal"><span class="pre">LoadCBetaScorer()</span></code></a>) or by setting all energies (see <a class="reference internal" href="#promod3.scoring.CBetaScorer.SetEnergy" title="promod3.scoring.CBetaScorer.SetEnergy"><code class="xref py py-meth docutils literal"><span class="pre">SetEnergy()</span></code></a>).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Radius in which other cbeta atoms are counted.</li>
+<li><strong>bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to discretize distances (range
+of [0,*cutoff*]).</li>
+<li><strong>seq_sep</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Minimal separation in sequence two cbeta atoms must have to
+be considered.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>cutoff</em> &lt; 0, <em>bins</em> &lt; 1 or
+<em>seq_sep</em> &lt; 1.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="staticmethod">
+<dt id="promod3.scoring.CBetaScorer.Load">
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBetaScorer.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.CBetaScorer.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBetaScorer.LoadPortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.scoring.CBetaScorer.Save" title="promod3.scoring.CBetaScorer.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
+reading) / portable file generated with <a class="reference internal" href="#promod3.scoring.CBetaScorer.SavePortable" title="promod3.scoring.CBetaScorer.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The loaded scorer</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.CBetaScorer" title="promod3.scoring.CBetaScorer"><code class="xref py py-class docutils literal"><span class="pre">CBetaScorer</span></code></a></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.CBetaScorer.Save">
+<code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBetaScorer.Save" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.CBetaScorer.SavePortable">
+<code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBetaScorer.SavePortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file where it will be saved.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.CBetaScorer.SetEnergy">
+<code class="descname">SetEnergy</code><span class="sig-paren">(</span><em>aa1</em>, <em>aa2</em>, <em>bin</em>, <em>energy</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.CBetaScorer.SetEnergy" title="Permalink to this definition">¶</a></dt>
+<dd><p>Setup one energy value. Unless a predefined scorer is loaded, this must be
+called for every pair of amino acids and for every <em>bin</em> &lt; <em>bins</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>aa1</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; Amino acid for first interaction partner.</li>
+<li><strong>aa2</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; Amino acid for second interaction partner.</li>
+<li><strong>bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the interaction distance.</li>
+<li><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Energy to set for those parameters.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if inputs are invalid</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.scoring.LoadCBetaScorer">
+<code class="descclassname">promod3.scoring.</code><code class="descname">LoadCBetaScorer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.LoadCBetaScorer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The default predefined CBetaScorer (loaded from disk)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.CBetaScorer" title="promod3.scoring.CBetaScorer"><code class="xref py py-class docutils literal"><span class="pre">CBetaScorer</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="reducedscorer-class">
+<h2>ReducedScorer class<a class="headerlink" href="#reducedscorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.ReducedScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">ReducedScorer</code><span class="sig-paren">(</span><em>cutoff</em>, <em>dist_bins</em>, <em>angle_bins</em>, <em>dihedral_bins</em>, <em>seq_sep</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.ReducedScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.BackboneScorer" title="promod3.scoring.BackboneScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneScorer</span></code></a>. Evaluates a pairwise
+pseudo interaction energy between the reduced representation of residues.
+Every residue gets represented by its CA position p and a directional
+component <code class="docutils literal"><span class="pre">v</span> <span class="pre">=</span> <span class="pre">norm(ca_pos-n_pos)</span> <span class="pre">+</span> <span class="pre">norm</span> <span class="pre">(ca_pos-c_pos)</span></code>. Residues with CA
+distance &lt; <em>cutoff</em> and which are at least <em>seq_sep</em> residues apart are
+considered to be interacting. For interacting residues r1 and r2, we can
+define a line l between p1 and p2. The potential then considers:</p>
+<ul class="simple">
+<li>dist =&gt; distance between p1 and p2</li>
+<li>alpha =&gt; angle between v1 and l</li>
+<li>beta =&gt; angle between v2 and l</li>
+<li>gamma =&gt; dihedral between (p1+v1,p1,p2,p2+v2)</li>
+</ul>
+<p>Every pairwise interaction within the loop and to the environment gets
+evaluated according to the given parametrization, summed up and finally
+normalized by the number of total interactions.</p>
+<p>The scorer needs to be initialized either by loading a predefined scorer (e.g.
+<a class="reference internal" href="#promod3.scoring.LoadReducedScorer" title="promod3.scoring.LoadReducedScorer"><code class="xref py py-func docutils literal"><span class="pre">LoadReducedScorer()</span></code></a>) or by setting all energies (see <a class="reference internal" href="#promod3.scoring.ReducedScorer.SetEnergy" title="promod3.scoring.ReducedScorer.SetEnergy"><code class="xref py py-meth docutils literal"><span class="pre">SetEnergy()</span></code></a>).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Radius in which other CA atoms are searched.</li>
+<li><strong>dist_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to discretize distances (range
+of [0, <em>cutoff</em>]).</li>
+<li><strong>angle_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to discretize angles (range
+of [0, pi]).</li>
+<li><strong>dihedral_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to discretize dihedrals
+(range of [-pi, pi]).</li>
+<li><strong>seq_sep</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Minimal separation in sequence two residues must have to
+be considered.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>cutoff</em> &lt; 0, <em>dist_bins</em> &lt; 1,
+<em>angle_bins</em> &lt; 1, <em>dihedral_bins</em> &lt; 1 or <em>seq_sep</em> &lt; 1.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="staticmethod">
+<dt id="promod3.scoring.ReducedScorer.Load">
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.ReducedScorer.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.ReducedScorer.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.ReducedScorer.LoadPortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.scoring.ReducedScorer.Save" title="promod3.scoring.ReducedScorer.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
+reading) / portable file generated with <a class="reference internal" href="#promod3.scoring.ReducedScorer.SavePortable" title="promod3.scoring.ReducedScorer.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The loaded scorer</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.ReducedScorer" title="promod3.scoring.ReducedScorer"><code class="xref py py-class docutils literal"><span class="pre">ReducedScorer</span></code></a></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.ReducedScorer.Save">
+<code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.ReducedScorer.Save" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.ReducedScorer.SavePortable">
+<code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.ReducedScorer.SavePortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file where it will be saved.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.ReducedScorer.SetEnergy">
+<code class="descname">SetEnergy</code><span class="sig-paren">(</span><em>aa1</em>, <em>aa2</em>, <em>dist_bin</em>, <em>alpha_bin</em>, <em>beta_bin</em>, <em>gamma_bin</em>, <em>energy</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.ReducedScorer.SetEnergy" title="Permalink to this definition">¶</a></dt>
+<dd><p>Setup one energy value. Unless a predefined scorer is loaded, this must be
+called for every pair of amino acids, every <em>dist_bin</em> &lt; <em>dist_bins</em>, every
+<em>alpha_bin</em> &lt; <em>angle_bins</em>, every <em>beta_bin</em> &lt; <em>angle_bins</em> and every
+<em>gamma_bin</em> &lt; <em>dihedral_bins</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>aa1</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; Amino acid for first interaction partner.</li>
+<li><strong>aa2</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; Amino acid for second interaction partner.</li>
+<li><strong>dist_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the interaction distance.</li>
+<li><strong>alpha_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the alpha angle.</li>
+<li><strong>beta_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the beta angle.</li>
+<li><strong>gamma_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the gamma dihedral.</li>
+<li><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Energy to set for those parameters.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if inputs are invalid</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.scoring.LoadReducedScorer">
+<code class="descclassname">promod3.scoring.</code><code class="descname">LoadReducedScorer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.LoadReducedScorer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The default predefined ReducedScorer (loaded from disk)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.ReducedScorer" title="promod3.scoring.ReducedScorer"><code class="xref py py-class docutils literal"><span class="pre">ReducedScorer</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="clashscorer-class">
+<h2>ClashScorer class<a class="headerlink" href="#clashscorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.ClashScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">ClashScorer</code><a class="headerlink" href="#promod3.scoring.ClashScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.BackboneScorer" title="promod3.scoring.BackboneScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneScorer</span></code></a>. Calculates a simple
+clash score of a loop itself and with the set environment. There is no need to
+define any parameters here as all interaction energies are fixed. The
+calculated score is normalized by the number of residues in the loop.</p>
+</dd></dl>
+
+</div>
+<div class="section" id="densityscorer-class">
+<h2>DensityScorer class<a class="headerlink" href="#densityscorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.DensityScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">DensityScorer</code><a class="headerlink" href="#promod3.scoring.DensityScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.BackboneScorer" title="promod3.scoring.BackboneScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneScorer</span></code></a>. Calculates the
+normalized cross correlation between a density generated from the input
+<a class="reference internal" href="../loop/backbone.html#promod3.loop.BackboneList" title="promod3.loop.BackboneList"><code class="xref py py-class docutils literal"><span class="pre">BackboneList</span></code></a> and a set map.</p>
+<p>This scorer requires that the attached environment has a density map defined
+(see <a class="reference internal" href="backbone_score_env.html#promod3.scoring.BackboneScoreEnv.SetMap" title="promod3.scoring.BackboneScoreEnv.SetMap"><code class="xref py py-meth docutils literal"><span class="pre">BackboneScoreEnv.SetMap()</span></code></a>) as soon as a score is to be calculated.
+The <em>resolution</em> and <em>all_atom</em> flags that were specified in SetMap determine
+how the backbone list is translated into an artificial density map. If
+<em>all_atom</em> is set to False (which is recommended for low resolution maps), the
+artificial map gets constructed by only using CA positions instead of all
+atoms.</p>
+<p>Note that for this scorer a higher &#8220;score&#8221; is better! So take care when
+combining this to other scores, where it is commonly the other way around.</p>
+</dd></dl>
+
+</div>
+<div class="section" id="hbondscorer-class">
+<h2>HBondScorer class<a class="headerlink" href="#hbondscorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.HBondScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">HBondScorer</code><span class="sig-paren">(</span><em>min_d</em>, <em>max_d</em>, <em>min_alpha</em>, <em>max_alpha</em>, <em>min_beta</em>, <em>max_beta</em>, <em>min_gamma</em>, <em>max_gamma</em>, <em>d_bins</em>, <em>alpha_bins</em>, <em>beta_bins</em>, <em>gamma_bins</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.HBondScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.BackboneScorer" title="promod3.scoring.BackboneScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneScorer</span></code></a>. Evaluates pairwise
+HBond pseudo energies similar to the one defined in the Rosetta energy
+function. It considers the CA, C and O positions from backbone hbond acceptors
+in interaction with the N and H positions from the backbone hbond donors. 4
+Parameters describe their relative orientation.</p>
+<ul class="simple">
+<li>dist =&gt; H-O distance</li>
+<li>alpha =&gt; O-H-N angle</li>
+<li>beta =&gt; C-N-H angle</li>
+<li>gamma =&gt; CA-C-O-H dihedral angle</li>
+</ul>
+<p>A pseudo energy function for these parameters is evaluated for three different
+states. State 1 for helical residues, state 2 for extended residues and state
+0 for other residues. If the state of two interacting particles is the same,
+thats the one from which the energy is extracted. In all other cases, the
+energy is extracted from the 0 state.</p>
+<p>Every pairwise interaction within the loop and to the environment gets
+evaluated according to the given parametrization, summed up and finally
+normalized by the number of residues in the loop.</p>
+<p>The scorer needs to be initialized either by loading a predefined scorer (e.g.
+<a class="reference internal" href="#promod3.scoring.LoadHBondScorer" title="promod3.scoring.LoadHBondScorer"><code class="xref py py-func docutils literal"><span class="pre">LoadHBondScorer()</span></code></a>) or by setting all energies (see <a class="reference internal" href="#promod3.scoring.HBondScorer.SetEnergy" title="promod3.scoring.HBondScorer.SetEnergy"><code class="xref py py-meth docutils literal"><span class="pre">SetEnergy()</span></code></a>).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>min_d</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Minimal H-O distance to consider interaction</li>
+<li><strong>max_d</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal H-O distance to consider interaction</li>
+<li><strong>min_alpha</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Minimal O-H-N angle to consider interaction</li>
+<li><strong>max_alpha</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal O-H-N angle to consider interaction</li>
+<li><strong>min_beta</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Minimal C-N-H angle to consider interaction</li>
+<li><strong>max_beta</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal C-N-H angle to consider interaction</li>
+<li><strong>min_gamma</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Minimal CA-C-O-H dihedral to consider interaction</li>
+<li><strong>max_gamma</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal CA-C-O-H dihedral to consider interaction</li>
+<li><strong>d_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to discretize H-O distances
+(range of [<em>min_d</em>, <em>max_d</em>]).</li>
+<li><strong>alpha_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to discretize O-H-N angles
+(range of [<em>min_alpha</em>, <em>max_alpha</em>]).</li>
+<li><strong>beta_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to discretize C-N-H angles
+(range of [<em>min_beta</em>, <em>max_beta</em>]).</li>
+<li><strong>gamma_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to discretize CA-C-O-H angles
+(range of [<em>min_gamma</em>, <em>max_gamma</em>]).</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if one of the bin parameters is
+&lt; 1 or a max parameter is smaller than its min counterpart.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="staticmethod">
+<dt id="promod3.scoring.HBondScorer.Load">
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.HBondScorer.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.HBondScorer.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.HBondScorer.LoadPortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.scoring.HBondScorer.Save" title="promod3.scoring.HBondScorer.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
+reading) / portable file generated with <a class="reference internal" href="#promod3.scoring.HBondScorer.SavePortable" title="promod3.scoring.HBondScorer.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The loaded scorer</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.HBondScorer" title="promod3.scoring.HBondScorer"><code class="xref py py-class docutils literal"><span class="pre">HBondScorer</span></code></a></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.HBondScorer.Save">
+<code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.HBondScorer.Save" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.HBondScorer.SavePortable">
+<code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.HBondScorer.SavePortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file where it will be saved.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.HBondScorer.SetEnergy">
+<code class="descname">SetEnergy</code><span class="sig-paren">(</span><em>state</em>, <em>d_bin</em>, <em>alpha_bin</em>, <em>beta_bin</em>, <em>gamma_bin</em>, <em>energy</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.HBondScorer.SetEnergy" title="Permalink to this definition">¶</a></dt>
+<dd><p>Setup one energy value. Unless a predefined scorer is loaded, this must be
+called for every state ([0, 1, 2]), every <em>d_bin</em> &lt; <em>d_bins</em>, every
+<em>alpha_bin</em> &lt; <em>alpha_bins</em>, every <em>beta_bin</em> &lt; <em>beta_bins</em> and every
+<em>gamma_bin</em> &lt; <em>gamma_bins</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>state</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; State describing the actual secondary structure
+(1: helical, 2: extended, 0: other)</li>
+<li><strong>d_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the H-O distance.</li>
+<li><strong>alpha_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the O-H-N angle.</li>
+<li><strong>beta_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the C-N-H angle.</li>
+<li><strong>gamma_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the CA-C-O-H dihedral.</li>
+<li><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Energy to set for those parameters.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if inputs are invalid</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.scoring.LoadHBondScorer">
+<code class="descclassname">promod3.scoring.</code><code class="descname">LoadHBondScorer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.LoadHBondScorer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The default predefined HBondScorer (loaded from disk)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.HBondScorer" title="promod3.scoring.HBondScorer"><code class="xref py py-class docutils literal"><span class="pre">HBondScorer</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="ssagreementscorer-class">
+<h2>SSAgreementScorer class<a class="headerlink" href="#ssagreementscorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.SSAgreementScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">SSAgreementScorer</code><a class="headerlink" href="#promod3.scoring.SSAgreementScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.BackboneScorer" title="promod3.scoring.BackboneScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneScorer</span></code></a>. Evaluates a secondary
+structure agreement score. The scorer has a score for each  combination of
+psipred prediction, its confidence and the actually occurring secondary
+structure in the model. In every score evaluation, the secondary structure of
+the loop is estimated by searching for hydrogen bonds leading to a secondary
+structure as defined by dssp. The hbonds are searched internally in the loop
+as well as in the environment. The final score gets summed up over all
+residues in the loop and normalized by the number of residues.</p>
+<p>The scorer needs to be initialized either by loading a predefined scorer (e.g.
+<a class="reference internal" href="#promod3.scoring.LoadSSAgreementScorer" title="promod3.scoring.LoadSSAgreementScorer"><code class="xref py py-func docutils literal"><span class="pre">LoadSSAgreementScorer()</span></code></a>) or by setting scores for all possible states
+(see <a class="reference internal" href="#promod3.scoring.SSAgreementScorer.SetScore" title="promod3.scoring.SSAgreementScorer.SetScore"><code class="xref py py-meth docutils literal"><span class="pre">SetScore()</span></code></a>).</p>
+<p>This scorer assumes that the attached environment has a psipred prediction
+defined (see <a class="reference internal" href="backbone_score_env.html#promod3.scoring.BackboneScoreEnv.SetPsipredPrediction" title="promod3.scoring.BackboneScoreEnv.SetPsipredPrediction"><code class="xref py py-meth docutils literal"><span class="pre">BackboneScoreEnv.SetPsipredPrediction()</span></code></a>) as soon as a score
+is to be calculated.</p>
+<p>Note that for this scorer a higher &#8220;score&#8221; is better! So take care when
+combining this to other scores, where it is commonly the other way around.</p>
+<dl class="staticmethod">
+<dt id="promod3.scoring.SSAgreementScorer.Load">
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.SSAgreementScorer.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.SSAgreementScorer.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.SSAgreementScorer.LoadPortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.scoring.SSAgreementScorer.Save" title="promod3.scoring.SSAgreementScorer.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
+reading) / portable file generated with <a class="reference internal" href="#promod3.scoring.SSAgreementScorer.SavePortable" title="promod3.scoring.SSAgreementScorer.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The loaded scorer</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.SSAgreementScorer" title="promod3.scoring.SSAgreementScorer"><code class="xref py py-class docutils literal"><span class="pre">SSAgreementScorer</span></code></a></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.SSAgreementScorer.Save">
+<code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.SSAgreementScorer.Save" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.SSAgreementScorer.SavePortable">
+<code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.SSAgreementScorer.SavePortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file where it will be saved.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.SSAgreementScorer.SetScore">
+<code class="descname">SetScore</code><span class="sig-paren">(</span><em>psipred_state</em>, <em>psipred_confidence</em>, <em>dssp_state</em>, <em>score</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.SSAgreementScorer.SetScore" title="Permalink to this definition">¶</a></dt>
+<dd><p>Setup a single score for a combination of states. Unless a predefined scorer
+is loaded, this must be called for every combination of states.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>psipred_state</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; must be one of [&#8216;H&#8217;, &#8216;E&#8217;, &#8216;C&#8217;]</li>
+<li><strong>psipred_confidence</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; must be in range [0, 9]</li>
+<li><strong>dssp_state</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; must be one of [&#8216;H&#8217;, &#8216;E&#8217;, &#8216;C&#8217;, &#8216;G&#8217;, &#8216;B&#8217;, &#8216;S&#8217;, &#8216;T&#8217;, &#8216;I&#8217;]</li>
+<li><strong>score</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; score to be set</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if inputs are invalid</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.scoring.LoadSSAgreementScorer">
+<code class="descclassname">promod3.scoring.</code><code class="descname">LoadSSAgreementScorer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.LoadSSAgreementScorer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The default predefined structure agreement scorer (loaded from disk)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.SSAgreementScorer" title="promod3.scoring.SSAgreementScorer"><code class="xref py py-class docutils literal"><span class="pre">SSAgreementScorer</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="torsionscorer-class">
+<h2>TorsionScorer class<a class="headerlink" href="#torsionscorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.TorsionScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">TorsionScorer</code><span class="sig-paren">(</span><em>group_definitions</em>, <em>torsion_bins</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.TorsionScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.BackboneScorer" title="promod3.scoring.BackboneScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneScorer</span></code></a>. Evaluates pseudo
+energies based on the identity of three consecutive residues and the phi/psi
+dihedral angles of the central residue. Every residue gets evaluated according
+to the set parametrization and the final score gets normalized by the total
+number of summed pseudo energies. The first phi and last psi angle get
+determined with the help of the environment if set.</p>
+<p>The scorer needs to be initialized either by loading a predefined scorer (e.g.
+<a class="reference internal" href="#promod3.scoring.LoadTorsionScorer" title="promod3.scoring.LoadTorsionScorer"><code class="xref py py-func docutils literal"><span class="pre">LoadTorsionScorer()</span></code></a>) or by setting all energies (see <a class="reference internal" href="#promod3.scoring.TorsionScorer.SetEnergy" title="promod3.scoring.TorsionScorer.SetEnergy"><code class="xref py py-meth docutils literal"><span class="pre">SetEnergy()</span></code></a>)
+for each group definition.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>group_definitions</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; List of group definitions defining amino acid
+triplets (same style as used in the
+<a class="reference internal" href="../loop/torsion_sampler.html#promod3.loop.TorsionSampler" title="promod3.loop.TorsionSampler"><code class="xref py py-class docutils literal"><span class="pre">TorsionSampler</span></code></a> class).</li>
+<li><strong>torsion_bins</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of equally sized bins to discretize the torsion
+angles (range of [0, 2*pi]).</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>torsion_bins</em> &lt; 1 or if there is
+a possible combination of the 20 standard amino acids not matching
+any entry of <em>group_definitions</em></p>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="staticmethod">
+<dt id="promod3.scoring.TorsionScorer.Load">
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.TorsionScorer.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.TorsionScorer.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.TorsionScorer.LoadPortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.scoring.TorsionScorer.Save" title="promod3.scoring.TorsionScorer.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
+reading) / portable file generated with <a class="reference internal" href="#promod3.scoring.TorsionScorer.SavePortable" title="promod3.scoring.TorsionScorer.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The loaded scorer</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.TorsionScorer" title="promod3.scoring.TorsionScorer"><code class="xref py py-class docutils literal"><span class="pre">TorsionScorer</span></code></a></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.TorsionScorer.Save">
+<code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.TorsionScorer.Save" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.scoring.TorsionScorer.SavePortable">
+<code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.TorsionScorer.SavePortable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file where it will be saved.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.scoring.TorsionScorer.SetEnergy">
+<code class="descname">SetEnergy</code><span class="sig-paren">(</span><em>group_idx</em>, <em>phi_bin</em>, <em>psi_bin</em>, <em>energy</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.TorsionScorer.SetEnergy" title="Permalink to this definition">¶</a></dt>
+<dd><p>Setup one energy value. Unless a predefined scorer is loaded, this must be
+called for every <em>group_idx</em> &lt; len(<em>group_definitions</em>), every <em>phi_bin</em> &lt;
+<em>torsion_bins</em> and every <em>psi_bin</em> &lt; <em>torsion_bins</em>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>group_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of group definition as set in constructor with
+numbering starting at 0.</li>
+<li><strong>phi_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the phi angle.</li>
+<li><strong>psi_bin</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Discrete bin describing the psi angle.</li>
+<li><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Energy to set for those parameters.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if inputs are invalid</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="promod3.scoring.LoadTorsionScorer">
+<code class="descclassname">promod3.scoring.</code><code class="descname">LoadTorsionScorer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.scoring.LoadTorsionScorer" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The default predefined TorsionScorer (loaded from disk)</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.scoring.TorsionScorer" title="promod3.scoring.TorsionScorer"><code class="xref py py-class docutils literal"><span class="pre">TorsionScorer</span></code></a></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="pairwisescorer-class">
+<h2>PairwiseScorer class<a class="headerlink" href="#pairwisescorer-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.scoring.PairwiseScorer">
+<em class="property">class </em><code class="descclassname">promod3.scoring.</code><code class="descname">PairwiseScorer</code><a class="headerlink" href="#promod3.scoring.PairwiseScorer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Inherits all functionality of <a class="reference internal" href="#promod3.scoring.BackboneScorer" title="promod3.scoring.BackboneScorer"><code class="xref py py-class docutils literal"><span class="pre">BackboneScorer</span></code></a>. Evaluates a list of
+generic pairwise functions (see <a class="reference internal" href="backbone_score_env.html#promod3.scoring.PairwiseFunction" title="promod3.scoring.PairwiseFunction"><code class="xref py py-class docutils literal"><span class="pre">PairwiseFunction</span></code></a>). When evaluating a
+loop, the scores of all pairwise functions which involve a residue in the loop
+are summed up (the other residue can be either in the loop or in the env.) and
+normalized by the number of residues in the loop.</p>
+<p>This scorer assumes that the attached environment has pairwise functions
+defined (see <a class="reference internal" href="backbone_score_env.html#promod3.scoring.BackboneScoreEnv.ApplyPairwiseFunction" title="promod3.scoring.BackboneScoreEnv.ApplyPairwiseFunction"><code class="xref py py-meth docutils literal"><span class="pre">BackboneScoreEnv.ApplyPairwiseFunction()</span></code></a>) as soon as a
+score is to be calculated.</p>
+<p>Note that for this scorer a higher &#8220;score&#8221; is better! So take care when
+combining this to other scores, where it is commonly the other way around.</p>
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Backbone Scorers</a><ul>
+<li><a class="reference internal" href="#backboneoverallscorer-class">BackboneOverallScorer class</a></li>
+<li><a class="reference internal" href="#backbonescorer-base-class">BackboneScorer base class</a></li>
+<li><a class="reference internal" href="#cbpackingscorer-class">CBPackingScorer class</a></li>
+<li><a class="reference internal" href="#cbetascorer-class">CBetaScorer class</a></li>
+<li><a class="reference internal" href="#reducedscorer-class">ReducedScorer class</a></li>
+<li><a class="reference internal" href="#clashscorer-class">ClashScorer class</a></li>
+<li><a class="reference internal" href="#densityscorer-class">DensityScorer class</a></li>
+<li><a class="reference internal" href="#hbondscorer-class">HBondScorer class</a></li>
+<li><a class="reference internal" href="#ssagreementscorer-class">SSAgreementScorer class</a></li>
+<li><a class="reference internal" href="#torsionscorer-class">TorsionScorer class</a></li>
+<li><a class="reference internal" href="#pairwisescorer-class">PairwiseScorer class</a></li>
+</ul>
+</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="docutils literal"><span class="pre">scoring</span></code> - Loop Scoring</a><ul>
+      <li>Previous: <a href="backbone_score_env.html" title="previous chapter">Backbone Score Environment</a></li>
+      <li>Next: <a href="all_atom_scorers.html" title="next chapter">All Atom Scorers</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/scoring/backbone_scorers.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/scoring/backbone_scorers.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/scoring/index.html b/doc/html/scoring/index.html
new file mode 100644
index 00000000..3cc44d68
--- /dev/null
+++ b/doc/html/scoring/index.html
@@ -0,0 +1,168 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>scoring - Loop Scoring &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="Documentation For Users" href="../users.html" />
+    <link rel="next" title="Backbone Score Environment" href="backbone_score_env.html" />
+    <link rel="prev" title="Subrotamer Optimization" href="../sidechain/subrotamer_optimizer.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="module-promod3.scoring">
+<span id="scoring-loop-scoring"></span><h1><a class="reference internal" href="#module-promod3.scoring" title="promod3.scoring: Loop Scoring"><code class="xref py py-mod docutils literal"><span class="pre">scoring</span></code></a> - Loop Scoring<a class="headerlink" href="#module-promod3.scoring" title="Permalink to this headline">¶</a></h1>
+<p>Tools and algorithms to score loops. The scoring system is split between an
+environment which contains model-specific data and scorers which evaluate loops.</p>
+<p>In this example, we load a structure, setup a score environment and a few
+scorers and finally score some loops:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">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="kn">import</span> <span class="n">loop</span><span class="p">,</span> <span class="n">scoring</span>
+
+<span class="c"># load data</span>
+<span class="n">ent</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="s">&quot;data/1CRN.pdb&quot;</span><span class="p">)</span>
+<span class="n">ent_seq</span> <span class="o">=</span> <span class="n">seq</span><span class="o">.</span><span class="n">SequenceFromChain</span><span class="p">(</span><span class="s">&#39;A&#39;</span><span class="p">,</span> <span class="n">ent</span><span class="o">.</span><span class="n">FindChain</span><span class="p">(</span><span class="s">&#39;A&#39;</span><span class="p">))</span>
+
+<span class="c"># setup score environment linked to entity</span>
+<span class="n">score_env</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">BackboneScoreEnv</span><span class="p">(</span><span class="n">ent_seq</span><span class="p">)</span>
+<span class="n">score_env</span><span class="o">.</span><span class="n">SetInitialEnvironment</span><span class="p">(</span><span class="n">ent</span><span class="p">)</span>
+
+<span class="c"># setup scorers attached to that env.</span>
+<span class="n">clash_scorer</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">ClashScorer</span><span class="p">()</span>
+<span class="n">clash_scorer</span><span class="o">.</span><span class="n">AttachEnvironment</span><span class="p">(</span><span class="n">score_env</span><span class="p">)</span>
+<span class="n">cbeta_scorer</span> <span class="o">=</span> <span class="n">scoring</span><span class="o">.</span><span class="n">LoadCBetaScorer</span><span class="p">()</span>
+<span class="n">cbeta_scorer</span><span class="o">.</span><span class="n">AttachEnvironment</span><span class="p">(</span><span class="n">score_env</span><span class="p">)</span>
+
+<span class="c"># get backbone list to be scored</span>
+<span class="c"># (here extracted from the structure, but it could be anything)</span>
+<span class="n">ev</span> <span class="o">=</span> <span class="n">ent</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;rnum &gt;= 23 and rnum &lt;= 30&quot;</span><span class="p">)</span>
+<span class="n">bb_seq</span> <span class="o">=</span> <span class="s">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">r</span><span class="o">.</span><span class="n">one_letter_code</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">ev</span><span class="o">.</span><span class="n">residues</span><span class="p">])</span>
+<span class="n">bb_res</span> <span class="o">=</span> <span class="p">[</span><span class="n">r</span><span class="o">.</span><span class="n">handle</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">ev</span><span class="o">.</span><span class="n">residues</span><span class="p">]</span>
+<span class="n">bb_list</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">BackboneList</span><span class="p">(</span><span class="n">bb_seq</span><span class="p">,</span> <span class="n">bb_res</span><span class="p">)</span>
+
+<span class="c"># score it (note that 23 is the starting res. num.)</span>
+<span class="k">print</span> <span class="s">&quot;Clash-Score&quot;</span><span class="p">,</span> <span class="n">clash_scorer</span><span class="o">.</span><span class="n">CalculateScore</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="mi">23</span><span class="p">)</span>
+<span class="k">print</span> <span class="s">&quot;CBeta-Score&quot;</span><span class="p">,</span> <span class="n">cbeta_scorer</span><span class="o">.</span><span class="n">CalculateScore</span><span class="p">(</span><span class="n">bb_list</span><span class="p">,</span> <span class="mi">23</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>Contents:</p>
+<div class="toctree-wrapper compound">
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="backbone_score_env.html">Backbone Score Environment</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="backbone_score_env.html#backbonescoreenv-class">BackboneScoreEnv class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="backbone_score_env.html#pairwise-function-classes">Pairwise function classes</a></li>
+<li class="toctree-l2"><a class="reference internal" href="backbone_score_env.html#convenient-construction-of-pairwise-functions">Convenient construction of pairwise functions</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="backbone_scorers.html">Backbone Scorers</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="backbone_scorers.html#backboneoverallscorer-class">BackboneOverallScorer class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="backbone_scorers.html#backbonescorer-base-class">BackboneScorer base class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="backbone_scorers.html#cbpackingscorer-class">CBPackingScorer class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="backbone_scorers.html#cbetascorer-class">CBetaScorer class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="backbone_scorers.html#reducedscorer-class">ReducedScorer class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="backbone_scorers.html#clashscorer-class">ClashScorer class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="backbone_scorers.html#densityscorer-class">DensityScorer class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="backbone_scorers.html#hbondscorer-class">HBondScorer class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="backbone_scorers.html#ssagreementscorer-class">SSAgreementScorer class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="backbone_scorers.html#torsionscorer-class">TorsionScorer class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="backbone_scorers.html#pairwisescorer-class">PairwiseScorer class</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="all_atom_scorers.html">All Atom Scorers</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="all_atom_scorers.html#allatomoverallscorer-class">AllAtomOverallScorer class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="all_atom_scorers.html#allatomscorer-base-class">AllAtomScorer base class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="all_atom_scorers.html#allatominteractionscorer-class">AllAtomInteractionScorer class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="all_atom_scorers.html#allatompackingscorer-class">AllAtomPackingScorer class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="all_atom_scorers.html#allatomclashscorer-class">AllAtomClashScorer class</a></li>
+</ul>
+</li>
+</ul>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper"><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>Previous: <a href="../sidechain/subrotamer_optimizer.html" title="previous chapter">Subrotamer Optimization</a></li>
+      <li>Next: <a href="backbone_score_env.html" title="next chapter">Backbone Score Environment</a></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/scoring/index.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/scoring/index.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/search.html b/doc/html/search.html
index d10b8fb2..66def409 100644
--- a/doc/html/search.html
+++ b/doc/html/search.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Search &mdash; ProMod3 0 documentation</title>
+    <title>Search &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    './',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -24,7 +24,7 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/searchtools.js"></script>
-    <link rel="top" title="ProMod3 0 documentation" href="index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="index.html" />
   <script type="text/javascript">
     jQuery(function() { Search.loadIndex("searchindex.js"); });
   </script>
@@ -84,7 +84,7 @@
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/searchindex.js b/doc/html/searchindex.js
index 13b04107..459d34c6 100644
--- a/doc/html/searchindex.js
+++ b/doc/html/searchindex.js
@@ -1 +1 @@
-Search.setIndex({envversion:46,filenames:["actions/index_dev","buildsystem","changelog","cmake/index","contributing","core/helper","core/index","core/pm3argparse","core/setcompoundschemlib","developers","gettingstarted","index","loop/backbone","loop/backbone_loop_score","loop/helper_classes","loop/index","loop/load_loop_objects","loop/loop_closing","loop/monte_carlo","loop/structure_db","loop/torsion_sampler","modelling/index","portableIO","sidechain/disulfid","sidechain/frame","sidechain/graph","sidechain/index","sidechain/loading","sidechain/rotamer","sidechain/rotamer_id","sidechain/rotamer_lib","sidechain/sidechain_settings","users"],objects:{"":{"command:add_doc_dependency":[3,0,1,""],"command:add_doc_source":[3,0,1,""],"command:convert_module_data":[3,0,1,""],"command:module":[3,0,1,""],"command:pm_action":[3,0,1,""],"command:promod3_unittest":[3,0,1,""],"command:pymod":[3,0,1,""],test_actions:[0,1,0,"-"]},"promod3.core":{helper:[5,1,0,"-"],pm3argparse:[7,1,0,"-"]},"promod3.core.helper":{FileExists:[5,5,1,""],FileExtension:[5,5,1,""],FileGzip:[5,5,1,""],MsgErrorAndExit:[5,5,1,""]},"promod3.core.pm3argparse":{PM3ArgumentParser:[7,3,1,""]},"promod3.core.pm3argparse.PM3ArgumentParser":{"__init__":[7,2,1,""],AddAlignment:[7,2,1,""],AssembleParser:[7,2,1,""],Parse:[7,2,1,""],action:[7,4,1,""]},"promod3.loop":{Backbone:[12,3,1,""],BackboneList:[12,3,1,""],BackboneLoopScorer:[13,3,1,""],BackboneRelaxer:[17,3,1,""],CCD:[17,3,1,""],CCDCloser:[18,3,1,""],CTerminalCloser:[18,3,1,""],CoordInfo:[19,3,1,""],DirtyCCDCloser:[18,3,1,""],ExponentialCooler:[18,3,1,""],FragDB:[19,3,1,""],Fragger:[19,3,1,""],FraggerHandle:[19,3,1,""],FraggerMap:[19,3,1,""],FragmentInfo:[19,3,1,""],FragmentSampler:[18,3,1,""],KIC:[17,3,1,""],KICCloser:[18,3,1,""],LinearScorer:[18,3,1,""],LoadBackboneLoopScorer:[16,2,1,""],LoadFragDB:[16,2,1,""],LoadStructureDB:[16,2,1,""],LoadTorsionSampler:[16,2,1,""],LoadTorsionSamplerCoil:[16,2,1,""],LoadTorsionSamplerExtended:[16,2,1,""],LoadTorsionSamplerHelical:[16,2,1,""],LoopCandidate:[14,3,1,""],LoopCandidates:[14,3,1,""],NTerminalCloser:[18,3,1,""],PhiPsiSampler:[18,3,1,""],PsipredPrediction:[14,3,1,""],SampleMonteCarlo:[18,2,1,""],SoftSampler:[18,3,1,""],StructureDB:[19,3,1,""],TorsionSampler:[20,3,1,""]},"promod3.loop.Backbone":{ApplyTransform:[12,2,1,""],Backbone:[12,2,1,""],GetTransform:[12,2,1,""],aa:[12,4,1,""],c_coord:[12,4,1,""],ca_coord:[12,4,1,""],cb_coord:[12,4,1,""],n_coord:[12,4,1,""],o_coord:[12,4,1,""],one_letter_code:[12,4,1,""]},"promod3.loop.BackboneList":{"__getitem__":[12,2,1,""],"__iter__":[12,2,1,""],"__len__":[12,2,1,""],"__setitem__":[12,2,1,""],ApplyTransform:[12,2,1,""],BackboneList:[12,2,1,""],CARMSD:[12,2,1,""],Extract:[12,2,1,""],GetOmegaTorsion:[12,2,1,""],GetPhiTorsion:[12,2,1,""],GetPsiTorsion:[12,2,1,""],GetSequence:[12,2,1,""],GetTransform:[12,2,1,""],InsertInto:[12,2,1,""],MinCADistance:[12,2,1,""],RMSD:[12,2,1,""],ReconstructCBetaPositions:[12,2,1,""],ReconstructOxygenPositions:[12,2,1,""],ReplaceFragment:[12,2,1,""],RotateAroundOmegaTorsion:[12,2,1,""],RotateAroundPhiPsiTorsion:[12,2,1,""],RotateAroundPhiTorsion:[12,2,1,""],RotateAroundPsiTorsion:[12,2,1,""],SetOmegaTorsion:[12,2,1,""],SetPhiPsiTorsion:[12,2,1,""],SetPhiTorsion:[12,2,1,""],SetPsiTorsion:[12,2,1,""],SetSequence:[12,2,1,""],SuperposeOnto:[12,2,1,""],ToEntity:[12,2,1,""],append:[12,2,1,""]},"promod3.loop.BackboneLoopScorer":{AddConstraint:[13,2,1,""],AddConstraintFunction:[13,2,1,""],AddContact:[13,2,1,""],AddContactFunction:[13,2,1,""],CalculateCBPackingScore:[13,2,1,""],CalculateCBetaScore:[13,2,1,""],CalculateClashScore:[13,2,1,""],CalculateConstraintScore:[13,2,1,""],CalculateContactScore:[13,2,1,""],CalculateHBondScore:[13,2,1,""],CalculateReducedScore:[13,2,1,""],CalculateSSAgreementScore:[13,2,1,""],CalculateTorsionScore:[13,2,1,""],ClearEnvironment:[13,2,1,""],Initialize:[13,2,1,""],Load:[13,2,1,""],LoadPortable:[13,2,1,""],Save:[13,2,1,""],SavePortable:[13,2,1,""],SetCBPackingEnergy:[13,2,1,""],SetCBPackingPotentialParameters:[13,2,1,""],SetCBetaEnergy:[13,2,1,""],SetCBetaPotentialParameters:[13,2,1,""],SetEnvironment:[13,2,1,""],SetHBondEnergy:[13,2,1,""],SetHBondPotentialParameters:[13,2,1,""],SetPsipredPrediction:[13,2,1,""],SetReducedEnergy:[13,2,1,""],SetReducedPotentialParameters:[13,2,1,""],SetSSAgreementParameters:[13,2,1,""],SetTorsionEnergy:[13,2,1,""],SetTorsionPotentialParameters:[13,2,1,""],TransOmegaTorsions:[13,2,1,""]},"promod3.loop.BackboneRelaxer":{Run:[17,2,1,""]},"promod3.loop.CCD":{CCD:[17,2,1,""],Close:[17,2,1,""]},"promod3.loop.CCDCloser":{Close:[18,2,1,""]},"promod3.loop.CoordInfo":{offset:[19,4,1,""],pdb_id:[19,4,1,""],size:[19,4,1,""]},"promod3.loop.DirtyCCDCloser":{Close:[18,2,1,""]},"promod3.loop.ExponentialCooler":{GetTemperature:[18,2,1,""],Reset:[18,2,1,""]},"promod3.loop.FragDB":{AddFragments:[19,2,1,""],GetAngularBinSize:[19,2,1,""],GetDistBinSize:[19,2,1,""],GetNumFragments:[19,2,1,""],GetNumStemPairs:[19,2,1,""],HasFragLength:[19,2,1,""],Load:[19,2,1,""],LoadPortable:[19,2,1,""],MaxFragLength:[19,2,1,""],PrintStatistics:[19,2,1,""],Save:[19,2,1,""],SavePortable:[19,2,1,""],SearchDB:[19,2,1,""]},"promod3.loop.Fragger":{"__getitem__":[19,2,1,""],"__len__":[19,2,1,""],AddSSAgreeParameters:[19,2,1,""],AddSeqIDParameters:[19,2,1,""],AddSeqSimParameters:[19,2,1,""],AddSequenceProfileParameters:[19,2,1,""],AddStructureProfileParameters:[19,2,1,""],AddTorsionProbabilityParameters:[19,2,1,""],Fill:[19,2,1,""],GetFragmentInfo:[19,2,1,""],GetScore:[19,2,1,""]},"promod3.loop.FraggerHandle":{Get:[19,2,1,""],GetList:[19,2,1,""],LoadCached:[19,2,1,""],SaveCached:[19,2,1,""]},"promod3.loop.FraggerMap":{"__getitem__":[19,2,1,""],"__setitem__":[19,2,1,""],Contains:[19,2,1,""],Load:[19,2,1,""],LoadBB:[19,2,1,""],Save:[19,2,1,""],SaveBB:[19,2,1,""]},"promod3.loop.FragmentInfo":{chain_index:[19,4,1,""],length:[19,4,1,""],offset:[19,4,1,""]},"promod3.loop.FragmentSampler":{Initialize:[18,2,1,""],ProposeStep:[18,2,1,""]},"promod3.loop.KIC":{Close:[17,2,1,""],KIC:[17,2,1,""]},"promod3.loop.KICCloser":{Close:[18,2,1,""]},"promod3.loop.LinearScorer":{GetScore:[18,2,1,""]},"promod3.loop.LoopCandidate":{CARMSD:[14,2,1,""],RMSD:[14,2,1,""],bb_list:[14,4,1,""],cbeta_score:[14,4,1,""],clash_score:[14,4,1,""],combined_score:[14,4,1,""],hbond_score:[14,4,1,""],packing_score:[14,4,1,""],reduced_score:[14,4,1,""],ss_agreement_score:[14,4,1,""],torsion_score:[14,4,1,""]},"promod3.loop.LoopCandidates":{Add:[14,2,1,""],ApplyCCD:[14,2,1,""],ApplyKIC:[14,2,1,""],AttachScorer:[14,2,1,""],CalculateBetaScores:[14,2,1,""],CalculateClashScores:[14,2,1,""],CalculateCombinedScores:[14,2,1,""],CalculateHBondcores:[14,2,1,""],CalculatePackingScores:[14,2,1,""],CalculateReducedScores:[14,2,1,""],CalculateSSAgreementScores:[14,2,1,""],CalculateTorsionScores:[14,2,1,""],ClusterCandidates:[14,2,1,""],FillFromDatabase:[14,6,1,""],FillFromMonteCarloSampler:[14,6,1,""],GetAVGCBetaScore:[14,2,1,""],GetAVGClashScore:[14,2,1,""],GetAVGCombinedScore:[14,2,1,""],GetAVGHBondscore:[14,2,1,""],GetAVGPackingScore:[14,2,1,""],GetAVGReducedScore:[14,2,1,""],GetAVGSSAgreementscore:[14,2,1,""],GetAVGTorsionScore:[14,2,1,""],Remove:[14,2,1,""]},"promod3.loop.PhiPsiSampler":{Initialize:[18,2,1,""],ProposeStep:[18,2,1,""]},"promod3.loop.PsipredPrediction":{"__len__":[14,2,1,""],Add:[14,2,1,""],Extract:[14,2,1,""],FromHHM:[14,2,1,""],FromHoriz:[14,2,1,""],GetConfidence:[14,2,1,""],GetConfidences:[14,2,1,""],GetPrediction:[14,2,1,""],GetPredictions:[14,2,1,""],PsipredPrediction:[14,2,1,""]},"promod3.loop.SoftSampler":{Initialize:[18,2,1,""],ProposeStep:[18,2,1,""]},"promod3.loop.StructureDB":{AddCoordinates:[19,2,1,""],GenerateStructureProfile:[19,2,1,""],GetBackboneList:[19,2,1,""],GetCoordIndex:[19,2,1,""],GetCoordInfo:[19,2,1,""],GetDSSPStates:[19,2,1,""],GetDihedralAngles:[19,2,1,""],GetNumCoords:[19,2,1,""],GetResidueDepths:[19,2,1,""],GetSequence:[19,2,1,""],GetSequenceProfile:[19,2,1,""],GetSolventAccessibilitites:[19,2,1,""],GetStructureProfile:[19,2,1,""],Load:[19,2,1,""],LoadPortable:[19,2,1,""],PrintStatistics:[19,2,1,""],Save:[19,2,1,""],SavePortable:[19,2,1,""],SetStructureProfile:[19,2,1,""]},"promod3.loop.TorsionSampler":{Draw:[20,2,1,""],DrawPhiGivenPsi:[20,2,1,""],DrawPsiGivenPhi:[20,2,1,""],ExtractStatistics:[20,2,1,""],GetBinSize:[20,2,1,""],GetBinsPerDimension:[20,2,1,""],GetHistogramIndex:[20,2,1,""],GetHistogramIndices:[20,2,1,""],GetPhiProbabilityGivenPsi:[20,2,1,""],GetProbability:[20,2,1,""],GetPsiProbabilityGivenPhi:[20,2,1,""],Load:[20,2,1,""],LoadPortable:[20,2,1,""],Save:[20,2,1,""],SavePortable:[20,2,1,""],UpdateDistributions:[20,2,1,""]},"promod3.modelling":{BuildFromRawModel:[21,5,1,""],BuildRawModel:[21,5,1,""],BuildSidechains:[21,5,1,""],CheckFinalModel:[21,5,1,""],ClearGaps:[21,5,1,""],CloseLargeDeletions:[21,5,1,""],CloseSmallDeletions:[21,5,1,""],CountEnclosedGaps:[21,5,1,""],CountEnclosedInsertions:[21,5,1,""],FillLoopsByDatabase:[21,5,1,""],FillLoopsByMonteCarlo:[21,5,1,""],FilterCandidates:[21,5,1,""],FilterCandidatesWithSC:[21,5,1,""],FullGapExtender:[21,3,1,""],GapExtender:[21,3,1,""],GetRingPunches:[21,5,1,""],GetRings:[21,5,1,""],HasRingPunches:[21,5,1,""],MergeGaps:[21,5,1,""],MergeGapsByDistance:[21,5,1,""],MinimizeModelEnergy:[21,5,1,""],ModelTermini:[21,5,1,""],ModellingHandle:[21,3,1,""],RemoveTerminalGaps:[21,5,1,""],ScoringGapExtender:[21,3,1,""],SetupBackboneScorer:[21,5,1,""],ShiftExtension:[21,3,1,""],StructuralGap:[21,3,1,""],StructuralGapList:[21,3,1,""]},"promod3.modelling.FullGapExtender":{Extend:[21,2,1,""]},"promod3.modelling.GapExtender":{Extend:[21,2,1,""]},"promod3.modelling.ModellingHandle":{gaps:[21,4,1,""],model:[21,4,1,""],seqres:[21,4,1,""]},"promod3.modelling.ScoringGapExtender":{Extend:[21,2,1,""]},"promod3.modelling.ShiftExtension":{Extend:[21,2,1,""]},"promod3.modelling.StructuralGap":{Copy:[21,2,1,""],ExtendAtCTerm:[21,2,1,""],ExtendAtNTerm:[21,2,1,""],GetChain:[21,2,1,""],GetChainIndex:[21,2,1,""],GetChainName:[21,2,1,""],GetLength:[21,2,1,""],IsCTerminal:[21,2,1,""],IsNTerminal:[21,2,1,""],IsTerminal:[21,2,1,""],ShiftCTerminal:[21,2,1,""],after:[21,4,1,""],before:[21,4,1,""],full_seq:[21,4,1,""],length:[21,4,1,""],seq:[21,4,1,""]},"promod3.sidechain":{AAToRotID:[29,2,1,""],BBDepRotamerLib:[30,3,1,""],ConstructBackboneFrameResidue:[24,2,1,""],ConstructFRMRotamer:[28,2,1,""],ConstructFRMRotamerGroup:[28,2,1,""],ConstructFrameResidue:[24,2,1,""],ConstructRRMRotamer:[28,2,1,""],ConstructRRMRotamerGroup:[28,2,1,""],ConstructSidechainFrameResidue:[24,2,1,""],DisulfidScore:[23,2,1,""],FRMRotamer:[28,3,1,""],FRMRotamerGroup:[28,3,1,""],Frame:[24,3,1,""],FrameResidue:[24,3,1,""],Graph:[25,3,1,""],LoadDunbrackLib:[27,2,1,""],LoadPenultimateLib:[27,2,1,""],Particle:[28,3,1,""],RRMRotamer:[28,3,1,""],RRMRotamerGroup:[28,3,1,""],ReadDunbrackFile:[27,2,1,""],Reconstruct:[26,2,1,""],RotamerID:[29,3,1,""],RotamerLib:[30,3,1,""],RotamerLibEntry:[30,3,1,""],RotamerSettings:[31,3,1,""],SidechainParticle:[28,3,1,""],TLCToRotID:[29,2,1,""]},"promod3.sidechain.BBDepRotamerLib":{AddRotamer:[30,2,1,""],Load:[30,2,1,""],LoadPortable:[30,2,1,""],MakeStatic:[30,2,1,""],QueryLib:[30,2,1,""],Save:[30,2,1,""],SavePortable:[30,2,1,""],SetInterpolate:[30,2,1,""]},"promod3.sidechain.FRMRotamer":{"__getitem__":[28,2,1,""],"__len__":[28,2,1,""],ApplyOnResidue:[28,2,1,""],CalculateInternalEnergy:[28,2,1,""],GetFrameEnergy:[28,2,1,""],GetInternalEnergy:[28,2,1,""],GetInternalEnergyPrefactor:[28,2,1,""],GetNumSubrotamers:[28,2,1,""],GetProbability:[28,2,1,""],GetSelfEnergy:[28,2,1,""],GetSubrotamerAssociations:[28,2,1,""],GetSubrotamerDefinition:[28,2,1,""],GetTemperature:[28,2,1,""],GetTransformedCopy:[28,2,1,""],SetFrameEnergy:[28,2,1,""],SetInternalEnergy:[28,2,1,""],SetInternalEnergyPrefactor:[28,2,1,""],SetProbability:[28,2,1,""],SetTemperature:[28,2,1,""]},"promod3.sidechain.FRMRotamerGroup":{"__getitem__":[28,2,1,""],"__len__":[28,2,1,""],ApplyOneResidue:[28,2,1,""],ApplySelfEnergyThres:[28,2,1,""],CalculateInternalEnergies:[28,2,1,""],Merge:[28,2,1,""]},"promod3.sidechain.Frame":{AddFrameEnergy:[24,2,1,""],SetFrameEnergy:[24,2,1,""]},"promod3.sidechain.FrameResidue":{"__getitem__":[24,2,1,""],"__len__":[24,2,1,""]},"promod3.sidechain.Graph":{CreateFromFRMList:[25,6,1,""],CreateFromRRMList:[25,6,1,""],GetNumActiveEdges:[25,2,1,""],GetNumActiveNodes:[25,2,1,""],GetNumEdges:[25,2,1,""],GetNumNodes:[25,2,1,""],Prune:[25,2,1,""],Solve:[25,2,1,""]},"promod3.sidechain.Particle":{AddLonePair:[28,2,1,""],GetCharge:[28,2,1,""],GetName:[28,2,1,""],GetParticleType:[28,2,1,""],GetPos:[28,2,1,""],IsHBondAcceptor:[28,2,1,""],IsHBondDonor:[28,2,1,""],PairwiseEnergy:[28,2,1,""],SetPolarDirection:[28,2,1,""]},"promod3.sidechain.RRMRotamer":{"__getitem__":[28,2,1,""],"__len__":[28,2,1,""],ApplyOnResidue:[28,2,1,""],CalculateInternalEnergy:[28,2,1,""],GetFrameEnergy:[28,2,1,""],GetInternalEnergy:[28,2,1,""],GetInternalEnergyPrefactor:[28,2,1,""],GetProbability:[28,2,1,""],GetSelfEnergy:[28,2,1,""],GetTransformedCopy:[28,2,1,""],SetFrameEnergy:[28,2,1,""],SetInternalEnergy:[28,2,1,""],SetInternalEnergyPrefactor:[28,2,1,""],SetProbability:[28,2,1,""]},"promod3.sidechain.RRMRotamerGroup":{"__getitem__":[28,2,1,""],"__len__":[28,2,1,""],ApplyOneResidue:[28,2,1,""],ApplySelfEnergyThres:[28,2,1,""],CalculateInternalEnergies:[28,2,1,""],Merge:[28,2,1,""]},"promod3.sidechain.RotamerLib":{AddRotamer:[30,2,1,""],Load:[30,2,1,""],LoadPortable:[30,2,1,""],MakeStatic:[30,2,1,""],QueryLib:[30,2,1,""],Save:[30,2,1,""],SavePortable:[30,2,1,""]},"promod3.sidechain.RotamerLibEntry":{FromResidue:[30,6,1,""],IsSimilar:[30,2,1,""],SimilarDihedral:[30,2,1,""],chi1:[30,4,1,""],chi2:[30,4,1,""],chi3:[30,4,1,""],chi4:[30,4,1,""],probability:[30,4,1,""],sig1:[30,4,1,""],sig2:[30,4,1,""],sig3:[30,4,1,""],sig4:[30,4,1,""]},"test_actions.ActionTestCase":{RunAction:[0,2,1,""],RunExitStatusTest:[0,2,1,""],pm_action:[0,4,1,""],pm_bin:[0,4,1,""],testPMExists:[0,2,1,""]},promod3:{SetCompoundsChemlib:[8,5,1,""],core:[6,1,0,"-"],loop:[15,1,0,"-"],modelling:[21,1,0,"-"],sidechain:[26,1,0,"-"]},test_actions:{ActionTestCase:[0,3,1,""]}},objnames:{"0":["cmake","command","CMake command"],"1":["py","module","Python module"],"2":["py","method","Python method"],"3":["py","class","Python class"],"4":["py","attribute","Python attribute"],"5":["py","function","Python function"],"6":["py","staticmethod","Python static method"]},objtypes:{"0":"cmake:command","1":"py:module","2":"py:method","3":"py:class","4":"py:attribute","5":"py:function","6":"py:staticmethod"},terms:{"1akia":19,"1crn":[15,18,19,21],"1crn_cut":21,"1crna":19,"1ey":[4,26],"1eye_rec":4,"2010dunbracklib":22,"2b1":1,"4x4":12,"__doc__":[5,7],"__getitem__":[12,19,24,28],"__init__":[0,4,7],"__iter__":12,"__len__":[12,14,19,24,28],"__main__":[0,4],"__name__":[0,4],"__setitem__":[12,19],"_data":22,"_name":3,"_run":[0,3],"_xml":3,"boolean":[5,13],"break":[3,4],"byte":22,"case":[0,4,12,13,17,18,19,20,21,22,23,26,28,30],"char":[12,22],"class":[],"const":22,"default":[0,1,3,4,7,8,12,13,17,18,19,20,21,26,28,31],"enum":29,"export":[4,25,28],"final":[4,10,13,14,15,19,21,25,26],"float":[12,13,14,15,17,18,19,20,21,22,24,25,28,30],"function":[],"import":[0,4,5,7,10,12,15,18,19,20,21,26],"int":[0,5,12,13,14,16,17,18,19,20,21,22,24,25,28,30],"long":21,"new":[0,4,7,9,14,16,17,18,19,21,22,26,28],"null":19,"public":[4,22,27],"return":[0,4,5,7,8,12,13,14,16,17,18,19,20,21,22,23,24,25,27,28,29,30],"s\u00f6ding":19,"short":[4,22],"static":[4,14,22,25,27,30],"super":26,"switch":4,"throw":[0,22,26,27],"true":[0,5,7,12,13,14,15,16,17,18,19,21,22,26,28,31],"try":[0,4,21,22,30],"void":22,"while":[0,3,4,13,22],aa_aft:19,aa_befor:19,aa_with_rotam:26,aaaaaaaa:12,aaaaggggggggggggggggggggaaaaaa:21,aatorotid:29,abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz:21,abil:4,abl:4,abort:[4,17,21],about:[0,3,4,14,19,21],abov:[0,4,7,21,22,23,26,29,30],absolut:3,academ:4,accept:[14,17,18,21,22],acceptor:13,access:[3,12,15,19,20,28,29],accessibili:19,accord:[4,12,13,14,18,19,20,21,24,26,28,30],accuraci:17,achiev:4,acid:[],acknowledg:4,across:[0,30],act:17,action_unit_test:0,actiontest:0,activ:[4,7],actual:[4,7,12,13,15,18,19,21,28,30],actual_posit:18,actual_step:18,adapt:[4,15,17,18,27,32],add:[0,3,4,7,10,13,14,16,19,20,24,26,28],add_argu:5,add_custom_target:4,add_doc_depend:3,add_doc_sourc:[3,4],add_polar_hydrogen:26,add_subdirectori:4,addalign:7,addconstraint:13,addconstraintfunct:13,addcontact:13,addcontactfunct:13,addcoordin:19,addfrag:19,addframeenergi:24,addit:[3,4,5,7,12,18,19,22],addition:[0,3],addlonepair:28,address:22,addrotam:30,addseqidparamet:19,addseqsimparamet:19,addsequenceprofileparamet:19,addssagreeparamet:19,addstructureprofileparamet:19,addtorsionprobabilityparamet:19,admir:4,advic:4,advis:4,affect:[4,12,29],after:[0,1,3,4,7,12,13,14,17,18,19,20,21,22,25,27,30],afterward:4,again:[1,4],agg:20,ago:0,agreement:19,ala:[12,17,20,26,29],alanin:29,alg:19,algorithm:[14,15,17,18,21,23,26,27,29,31],alia:21,align:[7,10,19,21],alignmenthandl:21,alignmentlist:[7,21],all:[0,1,3,4,7,10,12,13,14,17,18,19,20,21,22,23,24,25,26,27,28,30],alloc:[13,19],allow:[4,5,12,13,14,15,18,19,20,21,22,24],allow_prepro_ci:13,almost:3,aln:21,aln_sourc:7,alon:5,along:[0,4,19],alot:4,alpha:[12,13,14,24,26,28],alpha_bin:13,alreadi:[0,3,4,12,13,16,19,21,24,25,30],also:[0,1,3,4,5,14,17,18,19,20,21,24,25,27,30,31],alter:18,altern:[3,4,18,27],alwai:[0,4,18,21,22],ambig:30,ambigu:30,amino:[],aminoacid:[12,13,29,30],among:14,amount:30,analysi:[17,19],analyt:[14,30],anchor:28,ancient:8,angl:[12,13,14,15,17,18,19,20,21,24,26,27,28,30,32],angle_bin:13,angle_bin_s:19,angstrom:[17,19],ani:[0,3,4,8,10,12,13,14,18,19,20,21,22,24,26],anneal:[14,18],announc:[0,4],anoth:[3,12,17,21],anymor:25,anyth:[1,4,7,8],anywai:4,apart:[0,14,21],append:[12,14,20,21,26],appli:[4,5,8,12,14,17,18,21,25,26,28],applic:[0,17],applyccd:[14,15],applyk:14,applyoneresidu:28,applyonresidu:[26,28],applyselfenergythr:28,applyselfenergythresh:26,applytransform:12,approach:[1,4,19,21,22],appropri:[20,21,22],approxim:[25,28],arbitrari:[7,13,14,19],arbitrarili:18,arg:[0,3,7,29],arginin:29,argpars:7,argument:[],argumentpars:7,argv:7,around:[0,3,4,21],arrai:22,ascend:21,ask:4,asn:29,asp:[28,29,30],asparagin:29,aspart:[29,30],ass:18,assemblepars:7,assertequ:4,assess:13,assign:[14,18,19,27,31],assigndssp:19,associ:[14,21,24,28],assum:[0,3,4,13,19,20,21,22,25,30],assumpt:[13,19,20,30],atom:[12,13,14,17,19,21,23,24,26,28,30,31],atomhandl:28,atomseq:19,attach:[3,14,15,21],attachscor:[14,15],attachview:21,attent:[0,4],attribut:[4,7,14,30],autom:3,automat:[0,4,5,19,22,30],automatis:4,avail:[0,1,4,8,13,14,18,19,20,30],availabl:4,averag:[14,19],avg:19,avoid:[5,8,13,17,18],awai:4,awar:4,awesom:[0,4],axi:19,back:[0,4,18,25],backbon:[],backbone_list:14,backbone_loop_scor:22,backbonelist:[10,12,13,14,17,18,19],backbonerelax:17,background:1,backward:22,base:[],base_target:3,bashrc:4,basi:[3,4,17,18,19,28],basic:[],bb_list:[10,12,13,14,15,17,18,19],bbdeprotamerlib:[22,26,27,28,30],bbdeprotamerlibrari:28,becaus:[4,13,21],becom:30,been:[4,13,16,17,19,25,27,30],befor:[0,3,4,7,12,13,14,17,18,19,20,21,22,30],begin:[0,4,12,18],behav:0,behaviour:[7,30],behind:4,bell:4,belong:[3,4,13,14,18,19,21,24,28],belov:19,below:[4,13,17,19,22,23,25],below_thre:19,besid:[1,3,7],best:[3,21],beta:[12,13,14,24,28],beta_bin:13,better:18,between:[0,12,13,14,17,18,19,21,22,23,24,25,28,30,31],beyond:7,big:22,biggest:[],bilinearli:30,bin:[0,4,10,13,19,20,30],bin_siz:[20,30],binari:[],bind:[19,21],bioinformat:19,biol:19,biopolym:19,bit:[0,1,4,14,21],bla:1,blank:4,blas_blas_librari:1,blosum62:19,bond:[],bool:[0,5,7,12,13,14,16,17,18,19,21,22,24,26,28,30],boost:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],boost_librari:3,boost_root:1,both:[21,26,28,30],bottom:26,bound:[19,28],branch:[],branchnam:4,brew:3,bridg:[16,21],briefli:4,bring:4,broken:0,broyden:21,bug:4,build:[],build_disulfid:26,builder:1,buildfromrawmodel:21,buildrawmodel:21,buildsidechain:21,buildup:[26,31],built:[3,19,24,26,28],bunch:[0,4,7],bytecod:0,c_coord:12,c_num:21,c_po:[13,24],c_stem:[12,14,15,17,18,19,21],c_stem_psi:18,c_str:22,c_ter:[17,24],c_terminu:19,ca_coord:12,ca_po:[13,24,28],ca_pos_on:23,ca_pos_two:23,ca_rmsd:19,cach:[1,19],calcul:[12,13,14,15,17,18,19,20,23,24,25,26,28],calculatebetascor:14,calculatecbetascor:[13,15],calculatecbpackingscor:13,calculateclashscor:[13,14,15],calculateclasscor:[],calculatecombinedscor:14,calculateconstraintscor:13,calculatecontactscor:13,calculatehbondcor:14,calculatehbondscor:13,calculateinternalenergi:[26,28],calculatepackingscor:14,calculatereducedscor:[13,14],calculatessagreementscor:[13,14],calculatesurfac:19,calculatetorsionscor:[13,14],call:[0,1,3,4,5,7,8,13,14,16,18,19,20,21,22,28,30],calul:20,came:4,can:[],cand:21,candid:[14,15,18,21],cannot:[4,13,19,20,21,22,27,29,30],canutescu2003:17,canutescu2003b:23,canutescu:[17,23],capabl:[16,18],captur:0,carbon:[12,24,28],carbonyl:28,care:[21,22],carlo:[],carmsd:[12,14,19],carri:[4,5],cast:22,categori:3,caus:[4,21],cb_coord:12,cb_pack:[14,18],cb_packing_cutoff:13,cb_packing_max_count:13,cb_po:[24,28],cb_pos_on:23,cb_pos_two:23,cbeta:[12,13,14,15,18],cbeta_bin:13,cbeta_cutoff:13,cbeta_scor:[14,15],cbeta_seq_sep:13,cbetascor:13,cbpackingscor:13,ccd:[],ccdcloser:18,center:21,central:[13,20],certain:[0,1,3,4,13,19,20,21,22],certainli:0,ch1particl:28,ch2particl:28,ch3particl:28,chain:[],chain_id:19,chain_idx:[13,19],chain_idx_on:13,chain_idx_two:13,chain_index:[13,14,18,19],chain_nam:[19,21],chainhandl:[12,21],chainview:19,chakravarti:19,chakravarty1999:19,chanact:21,chanc:[4,21,25],chang:[0,3,4,12,17,18,20,21,25],change_frequ:18,chapter:[4,14],charact:[7,19],charg:[4,28],charmm27:17,check:[0,1,4,5,7,13,18,19,21,22,30],check_io:22,check_xml:4,checkbasetyp:22,checkfinalmodel:21,checkmagicnumb:22,checkout:4,checktypes:22,chemic:8,chi1:[28,30],chi2:[28,30],chi3:[28,30],chi4:[28,30],chi:[28,30],child:7,childclass:0,chmod:4,choos:18,chosen:[18,19],ciiipgatcpgdyan:21,clash:[13,14,15,17,18,21,23,26],clash_scor:[14,15],clash_thresh:21,clashscor:13,classic:27,clean:[1,4],cleanli:22,clear:13,clearenviron:13,cleargap:21,clip:7,clone:4,close:[],closed_posit:18,closelargedelet:21,closer:[],closesmalldelet:21,closest:19,closur:[17,21],cluster:[14,22],clustercandid:14,clutter:[0,4],cmake_support:[3,4],cmakecach:1,cmakelist:[0,1,3,4],cname:19,coars:4,code:[],codetest:[3,4],coil:[16,19],collect:5,collid:31,collis:31,combin:[13,14,18,19,20,21,23,30],combined_scor:14,come:[],command:[],commandlin:7,comment:4,commerci:4,commit:4,common:[4,7],commonli:[10,21],compar:[4,15,19,30],comparison:[19,30],compat:[4,22],compil:[0,1,3,4,10,22,32],complain:0,complaint:4,complet:[4,18,19,21,26,30],complex:[4,28],compon:[8,13,19],compound:8,compress:5,comput:19,concept:4,condit:[4,20],conf:[1,4],confid:[13,14],config:[3,4],config_head:3,configur:[1,4,14,30],conflict:4,conform:[13,17,18,19,25,27,30],connect:[3,4,15,19,25],conop:[12,13,29],conquer:4,consecut:[13,20],consequ:26,conserv:[10,21],consid:[3,4,12,13,15,17,18,19,20,21,24,27,30],consider_all_nod:25,consider_hbond:[26,31],consider_hydrogen:28,consist:[4,13,14,17,18,19,22,28,30],constraint:[7,13,17,18,19],constraintscor:13,construct:[],constructbackboneframeresidu:[24,26],constructframeresidu:24,constructfrmrotam:28,constructfrmrotamergroup:[26,28],constructor:[18,21,22,25,28],constructrrmrotam:28,constructrrmrotamergroup:28,constructsidechainframeresidu:24,contact:[13,18],contactscor:13,contain:[0,1,3,4,5,7,12,13,14,16,18,19,20,21,23,26,27,28,30],content:[4,9,11,14,15,19,26,32],contigu:22,continu:[0,17,21,26],contrast:24,contribut:[],control:[4,14,18,24,26,28,30,31],conveni:[],convent:[0,29],converg:[14,17,18],convers:22,convert:[3,12,13,19,20,21,22,30],convert_module_data:3,convertbasetyp:22,cooler:[],cooling_factor:18,coord:15,coord_info:19,coordin:[12,14,15,16,17,19,21,26],coordinfo:19,cope:4,copi:[3,4,10,21],core:[],correctli:21,correspond:[4,12,13,14,19,20,22,30],corrupt:13,could:[0,3,4,7,19,21],count:[13,18,21],countenclosedgap:21,countenclosedinsert:21,counterpart:13,coupl:[0,4,21],cours:4,coutsia:17,cover:[0,4,6,13,18,19],coverag:21,cparticl:28,cpp:3,cpr:[29,30],cpu:21,crambin:[15,18,19],crash:26,createalign:21,createentityfromview:26,createfromfrmlist:[25,26],createfromrrmlist:25,createfullview:21,createsequ:21,creation:17,criterion:18,criterium:14,croak:4,crucial:4,ctermin:12,cterminalclos:18,cterminu:12,current:[1,3,4,18,19,22,28],custom:[4,18,19,21,22,29],cutoff:[13,14,16,28],cycl:21,cyclic:[14,15,17],cyd:[29,30],cyh:[29,30],cystein:[23,26,29],d_bin:13,dai:5,damag:21,dare:3,dat:[19,22],data1:3,data2:3,data:[],data_:22,data_gener:22,databas:[],databs:19,date:4,dbg:4,deactiv:31,dead:25,deal:21,debug:4,decent:8,decid:[4,13,17],decis:20,declar:[3,4],decod:7,decompos:25,decomposit:25,decreas:18,dedic:[3,4,21],def:[0,4],defin:[],definem:4,degre:[12,19,20,27],delet:[4,21,28],deliv:[0,18,19,21],delta:31,delta_scor:18,demand:21,demonstr:19,denovo:[15,32],densiti:27,dep1:3,dep2:3,dep:3,dependency1:3,dependency2:3,depends_on:3,depth:19,deriv:[0,19,27],descend:21,descent:[14,15,17],describ:[3,5,7,9,13,14,17,19,21,22,26,30,32],describint:19,descript:[4,7,19,23,30],design:[0,27],desir:[10,18,21],despit:13,destroi:13,detail:[4,19,21],detect:[],determin:[5,13,14,18],deuterium:21,develop:[],deviat:[13,18,27,28,30],devot:6,dict:[3,14,18],dictionari:[3,7,8,19],did:[4,14,21],differ:[0,1,3,4,7,8,13,14,15,19,20,21,26,29,30,31],dihedr:[10,12,13,15,17,18,19,20,21,27,28,30,32],dihedral_angl:12,dihedral_bin:13,dihedral_idx:30,dihedral_pair:20,dimens:20,dir:[3,4],direct:[4,12,13,16,28],directli:[4,15,17,19,21,26,27,28,29,30],directori:[],dirti:0,dirtyccdclos:18,disabl:[0,4],disable_doctest:1,disable_document:1,disable_linkcheck:1,discret:13,discuss:19,disk:[13,30],displai:[5,7],dist:13,dist_bin:13,dist_bin_s:19,dist_cutoff:13,distanc:[12,13,14,15,19,21,31],distinguish:[22,24],distribut:[0,4,13,18,19,20,22,27,30],disulfidscor:23,dive:[4,21],diverg:4,divers:19,dng:10,doc:[1,3,4],docstr:7,doctest:[1,4],document:[],doe:[0,3,4,5,7,8,12,13,19,21,22,25,27],doesn:[17,18,21,30],don:[1,15,21],done:[0,4,5,7,15,17,20,21,22],donor:13,dont_write_bytecod:0,dost_root:1,doubl:25,doubt:7,down:[7,12,15,18,19],draw:[12,18,20],drawback:4,drawn:[18,20],drawphigivenpsi:20,drawpsigivenphi:20,driven:4,drop:4,dssp:[13,19,21],dssp_state:13,due:[14,17,19,21,23,24,27],dump:[13,15,30,32],dunbrack:[17,23,27],dure:[0,17,22,24,30],dynam:30,e_thresh:21,each:[4,14,15,19,21,22],earlier:1,easi:[4,21],easier:[0,4,21],easili:[3,4,21],ebb_list:19,echo:4,edg:25,editor:0,educ:4,effect:[3,4],effici:[18,19],egg:19,eigen3_include_dir:1,eigen:1,either:[4,7,12,13,14,17,18,20,21,22,23,24,26,28,29,30],elabor:4,element:[0,12,13,14,22],elimin:25,els:[4,22],emerg:0,emploi:4,empti:[4,5,7,12,13,14,19,28],enabl:[0,5,8,28],enable_mm:1,enclos:21,encorc:13,encount:[18,21],end:[0,1,3,4,5,12,14,19,21,25],end_transl:3,endian:22,energi:[10,13,17,18,21,23,24,25,26,28,31],enforc:[14,15,18,19,21,25],enough:[4,19,21,22],ensur:[4,10,22],ent:21,enter:24,entiti:[4,12,14,21,26],entityhandl:[12,21,26],entityview:[13,20,21],entri:[],enumer:[4,15,19,25,26,28,29],env:[4,10,13,21],environ:[0,4,13,14,15,18,22,32],epsilon:25,equal:[13,18],equidist:[13,30],equival:21,error:[5,22],esenti:[],estim:[13,18,21,27],etc:[0,4],evalu:[],even:[1,4,21,25],eventu:7,ever:[4,18],everi:[0,4,12,13,14,16,17,18,19,20,21,25,30],everybodi:4,everyth:[],evolut:19,exact:[13,22],exactli:[1,15,19,21,23,29],exampl:[],example_reconstruct:26,exce:[13,19],exceed:21,except:[4,21],exclud:4,exclus:[0,4],exisit:[],exist:[0,1,3,4,5,7,17,19,21,22,24,27,28,29,30],exit:[0,5,7],exit_cod:0,exit_statu:5,exot:4,exp:18,expect:[0,13,19,21,28],expens:19,experiment:21,explain:[0,4],explan:4,exponenti:18,exponentialcool:18,ext:5,extend:[],extendatcterm:21,extendatnterm:21,extended_search:[14,19,21],extens:[5,7,21],extension_penalti:21,extent:19,extern:[3,4,19],extra:[4,22],extract:[12,13,14,17,18,19,20,21,24,26,27,28],extract_burial_statu:19,extractstatist:20,f_i:19,f_idx:13,factor:[18,27,28,31],fail:[0,4,5,14,21],failur:[4,5,30],fall:[17,25],fallback:30,fals:[0,4,5,7,12,14,16,18,19,21,24,25,26,28],far:[14,21],fast:[13,19,20,22,30],fasta:[7,21],faster:[16,17,19,21],fastest:21,favourit:0,fed:[3,4],fedora:4,feed:[3,14],feel:4,fellow:4,fetch:4,few:[1,4,21,22],field:[22,30],figur:4,file:[],filecheck:4,fileexist:5,fileextens:5,filegzip:5,filenam:[4,5,7,13,14,19,20,22,27,30],fill:[3,4,7,14,19,21],fillfromdatabas:[14,15,21],fillfrommontecarlosampl:[14,21],fillloopsbydatabas:21,fillloopsbymontecarlo:21,filter:[],filtercandid:21,filtercandidateswithsc:21,final_model:21,find:[],fine:4,fire:0,first:[0,4,7,10,13,14,17,18,19,20,21,23,26,28,30],fit:[12,17,18,19],fix:[4,5,22,26],fix_cterm:17,fix_nterm:17,flag1:3,flag2:3,flag:[3,4,5,7,12,13,24,25,26,28],fletcher:21,flexibl:[23,26,27,28,31],flip:30,flush:[0,4],fold:19,folder:[1,3,4,10,22],follow:[0,3,4,5,7,10,13,15,19,21,22,25,26,28,29,30],fontsiz:20,forbidden:4,forc:17,forcefield:17,forg:4,forget:[0,4],form:[14,16,19,21,25,28,30],formal:[14,17,30],format:[4,7,19,27],formatt:4,forward:4,found:[0,3,4,5,7,14,15,17,18,19,21,25,26,30],foundat:0,four:18,fourth:28,fraction:[17,18,19],frag_db:[14,15,19,22],frag_length:19,frag_map:19,frag_po:19,frag_residu:19,frag_seq:19,frag_siz:19,fragdb:[14,15,16,19,21,22],fragger:[18,19,21],fragger_handl:21,fragger_map:19,fraggerhandl:[19,21],fraggermap:19,fragment:[],fragment_db:21,fragment_info:19,fragment_length:19,fragmentinfo:19,fragments_per_posit:19,fragmentsampl:18,frame:[],frame_residu:[24,26],frameresidu:24,framework:4,free:[4,29,30],frequenc:[18,19],frm:26,frm_delta1_arg:31,frm_delta1_asn:31,frm_delta1_asp:31,frm_delta1_ci:31,frm_delta1_gln:31,frm_delta1_glu:31,frm_delta1_hi:31,frm_delta1_il:31,frm_delta1_leu:31,frm_delta1_li:31,frm_delta1_met:31,frm_delta1_ph:31,frm_delta1_pro:31,frm_delta1_s:31,frm_delta1_thr:31,frm_delta1_trp:31,frm_delta1_tyr:31,frm_delta1_v:31,frm_delta2_arg:31,frm_delta2_asn:31,frm_delta2_asp:31,frm_delta2_gln:31,frm_delta2_glu:31,frm_delta2_hi:31,frm_delta2_il:31,frm_delta2_leu:31,frm_delta2_li:31,frm_delta2_met:31,frm_delta2_ph:31,frm_delta2_pro:31,frm_delta2_s:31,frm_delta2_thr:31,frm_delta2_trp:31,frm_delta2_tyr:31,frm_delta3_arg:31,frm_delta3_gln:31,frm_delta3_glu:31,frm_delta3_li:31,frm_delta3_met:31,frm_delta3_tyr:31,frm_delta4_arg:31,frm_delta4_li:31,frm_t_arg:31,frm_t_asn:31,frm_t_asp:31,frm_t_cy:31,frm_t_gln:31,frm_t_glu:31,frm_t_hi:31,frm_t_ile:31,frm_t_leu:31,frm_t_ly:31,frm_t_met:31,frm_t_phe:31,frm_t_pro:31,frm_t_ser:31,frm_t_thr:31,frm_t_trp:31,frm_t_tyr:31,frm_t_val:31,frmrotam:[23,28],frmrotamergroup:[24,25,28],from:[0,1,3,4,5,7,10,12,13,14,15,18,19,20,21,22,24,25,26,27,28,29,30],fromhhm:14,fromhoriz:14,fromresidu:30,front:[0,4,5],fstream:22,fulfil:[19,30],full:[],full_seq:21,fullgapextend:21,fulli:[4,12,19,21],functions_specific_to_your_act:4,fundament:[13,19,20,22,30],funni:[1,4],further:[21,22,31],furthermor:22,futur:19,gamma:[13,23],gamma_bin:13,gap:[],gapextend:21,gapfre:19,gather:[3,4,6,12,19,26,28,30],gciiipgatcpgdyan:21,gener:[0,1,4,10,13,14,15,16,17,18,19,20,21,22,27,29,30,32],generatestructureprofil:19,geom:[12,23,24,28],geometr:[],geometri:[14,19],get:[],getangl:26,getangularbins:19,getatomcount:4,getavgcbetascor:14,getavgclashscor:14,getavgcombinedscor:14,getavghbondscor:14,getavgpackingscor:14,getavgreducedscor:14,getavgssagreementscor:14,getavgtorsionscor:14,getbackbonelist:19,getbins:20,getbinsperdimens:20,getchain:21,getchainindex:21,getchainnam:21,getcharg:28,getconfid:14,getcoordindex:19,getcoordinfo:19,getdihedralangl:19,getdistbins:19,getdsspstat:19,getfragmentinfo:19,getframeenergi:28,gethistogramindex:[12,20],gethistogramindic:20,getinternalenergi:28,getinternalenergyprefactor:28,getlength:21,getlist:19,getnam:[26,28],getnumactiveedg:25,getnumactivenod:25,getnumb:15,getnumcoord:19,getnumedg:25,getnumfrag:19,getnumnod:25,getnumstempair:19,getnumsubrotam:28,getomegators:12,getparticletyp:28,getphiprobabilitygivenpsi:20,getphitors:[12,26],getpo:28,getpredict:14,getprob:[20,28],getpsiprobabilitygivenphi:20,getpsitors:[12,26],getr:21,getresiduedepth:19,getringpunch:21,getscor:[18,19],getselfenergi:28,getsequ:[12,19],getsequenceprofil:19,getsolventaccessibilitit:19,getstructureprofil:19,getsubrotamerassoci:28,getsubrotamerdefinit:28,gettemperatur:[18,28],gettransform:12,gettransformedcopi:28,getversionnumb:22,ggg:21,gggaggg:21,gggggggggggggggggggg:21,git:[],gitignor:4,give:[3,4,15,18,28],given:[0,3,5,7,12,13,14,15,17,18,19,20,21,22,23,25,26,28,30],gln:29,global:[8,22],glu:[28,29,30],glutam:29,glutamin:29,gly:[21,26,29],glycin:29,goal:0,gobbl:7,goe:[1,4,30],goldfarb:21,good:[3,4,19,21],got:1,grain:4,graph:[],greedi:14,grep:1,group:[],group_definit:[13,20],group_id_idx:13,guarante:[19,22],gui:[4,20],guid:17,guidelin:[4,22],gzip:[5,7],hand:[1,3,7],handler:19,happen:[0,4,18,21,28],hasfraglength:19,hash:19,hasringpunch:21,hb_alpha_bin:13,hb_beta_bin:13,hb_d_bin:13,hb_gamma_bin:13,hb_max_alpha:13,hb_max_beta:13,hb_max_d:13,hb_max_gamma:13,hb_min_alpha:13,hb_min_beta:13,hb_min_d:13,hb_min_gamma:13,hbond:[13,14,18,24,26,28,29,31],hbond_scor:14,hbondscor:13,headach:4,header1:3,header2:3,header3:3,header4:3,header:[],header_output_dir:3,headlin:4,heavili:[19,26,28],helic:[12,13,16,19,21,27,28],helix:[10,12,18,26],hello:22,hello_world:4,hellyeah:10,help:[0,1,3,4,7,10,13,21],helpactiontest:0,helper:[],hen:19,henc:[4,13,19,20,21,22,30],here:[0,1,3,4,5,7,10,18,19,20,21,22,31],hhm:[14,19],hhsearch:[14,19],hhsuit:19,hide:4,hierarch:14,hierarchi:8,high:[4,21],higher:1,highest:8,highli:[1,4,19],hint:7,histidin:29,histogram:[18,20],histori:4,hit:[0,4,17,20],hmm:19,home:3,homolog:[6,10,19,21],honor:21,honour:21,horiz:14,host:[3,4],hotfix:4,hous:4,how:[],hparticl:28,hpp:22,hsd:[28,29,30],hse:[28,29,30],html:[1,4],http:4,hydrogen:[13,19,21,24,26,28,31],hyphen:0,id_:22,idea:[0,4,15,19,21],ideal:[12,13,17],ident:[13,19,20,30],identifi:[7,13,19,30],idx:[12,13,14,19],iff:[19,21],ifstream:22,ignor:21,illustr:19,imagin:4,imaginari:0,immedi:[0,4,8],implement:[4,17,21,22,23,25,26,29],implicit:1,improv:[16,23,27],in_dir:3,in_fil:4,in_path:3,in_stream:22,in_stream_:22,incl:[19,21],includ:[1,4,5,10,14,16,19,21,22,26,28,31],include_ligand:21,incomplet:[21,27],inconsist:[12,13,14,17,21],inconveni:4,increas:[14,17,21],independ:27,index:[4,11,12,13,14,17,18,19,20,21,24,28,30],indic:[],inf:[15,25],influenc:[7,31],info:19,inform:[4,7,12,13,14,15,16,19,21],inherit:0,init:4,init_bb_list:18,init_frag:18,initi:[2,12,13,14,15,17,18,19,21,25,28,30],initial_bb:14,initial_epsilon:25,initialis:0,inlin:[4,22],input:[0,7,10,14,17,18,19,20,21,23,26,27,28],insert:[12,15,18,21],insertinto:[12,15],insid:[0,3,7],insight:4,inspir:17,instal:[1,4,22],instanc:[2,4,7,16,21,22,28],instead:[0,1,3,4,5,18,19,21,28],int16_t:22,int32_t:22,int_32_t:22,intend:[0,4,14,18,28],interact:[],intercept:[14,18],interest:[0,18,19,22,28,30],interfac:[3,4],intermedi:4,intern:[0,3,4,13,14,16,17,18,19,20,21,22,25,26,28,31],internal_e_prefactor_arg:31,internal_e_prefactor_asn:31,internal_e_prefactor_asp:31,internal_e_prefactor_ci:31,internal_e_prefactor_gln:31,internal_e_prefactor_glu:31,internal_e_prefactor_hi:31,internal_e_prefactor_il:31,internal_e_prefactor_leu:31,internal_e_prefactor_li:31,internal_e_prefactor_met:31,internal_e_prefactor_ph:31,internal_e_prefactor_pro:31,internal_e_prefactor_s:31,internal_e_prefactor_thr:31,internal_e_prefactor_trp:31,internal_e_prefactor_tyr:31,internal_e_prefactor_v:31,internet:4,interpol:30,interpret:[4,5],intervent:4,introduc:[0,3,4,17,21],invalid:[13,14,17,18,19,21,24,28,29,30],invok:[1,3,4,8],involv:4,iostream:22,isctermin:21,ishbondacceptor:28,ishbonddonor:28,isntermin:21,isoleucin:29,issimilar:30,issourc:22,istermin:21,isvalid:26,item:[0,4,12,13,19,21],iter:[12,14,17,18,19,20,21,25],itself:[3,4,13,14,18,22,26],job:[4,19,21],join:[4,15,18,19],jone:[19,28,31],jones1999:19,json:7,just:[0,1,4,7,8,13,14,19,21],kabsch1983:19,kabsch:19,keep:[0,3,4,7,14,21,26],keep_non_converg:14,keep_sidechain:[4,26],kei:[7,14,18,19],kept:[17,24,26],kernel:27,keyword:20,kic:[],kicclos:18,kick:7,kind:[0,4],kinemat:17,know:[1,30],known:[3,5],kortemm:17,krivov2009:[26,27],krivov:27,kwarg:0,l_e:28,lab:27,label:4,lack:21,languag:3,lapack:1,lapack_lapack_librari:1,lapack_librari:3,larg:[19,20,21],larger:[15,19],last:[0,3,12,13,17,18,19,21,27,31],last_psi:12,later:[0,4,13],latest:1,latter:[4,21],launcher:[3,4],layout:[13,19,20,22,28,30],lbfg:21,lead:[4,5,12,13,14,17,27],least:[1,3,4,12,21,25],leav:0,left:5,legaci:21,legal:4,len:[12,19,21,26],length:[7,13,14,16,17,19,20,21,22],lennard:[28,31],less:[4,13,14,16,19,20,21,30,31],let:[0,4,12,15,19,26],letter:[12,13,18,19,20,29],leu:29,leucin:29,level:[1,4,8,21],lib64:4,lib:31,libari:27,libexec:[3,4],libpromod3_nam:3,librari:[],library1:3,library2:3,licenc:27,life:4,ligand:[21,24],like:[0,3,4,7,21,22,27,28],limit:[7,17,19,21],line:[],linear:[14,18,19],linear_weight:14,linearscor:18,link:[1,3,4,19],link_cmd:3,linkcheck:[1,4],linker:[3,21],linker_length:21,list:[0,1,3,4,5,7,10,12,13,14,17,18,19,20,21,22,24,25,26,28,30],literalinclud:4,littl:[3,4,22],live:[3,4],load:[],load_frequ:[16,19],loadalign:21,loadbackboneloopscor:[15,16,18],loadbb:19,loadcach:19,loaddunbracklib:[26,27],loadfragdb:[15,16,21],loadpdb:[4,15,18,19,21,26],loadpenultimatelib:27,loadport:[13,19,20,22,30],loadsequenceprofil:19,loadstructuredb:[15,16,19,21],loadtorsionsampl:[12,16,18,20],loadtorsionsamplercoil:[16,21],loadtorsionsamplerextend:16,loadtorsionsamplerhel:16,locat:[1,3,12,13,15,21,22],log:[4,5,28],lone:28,lone_pair:28,longest:19,look:[4,5,12,15,32],loop:[],loop_candid:[14,15],loop_length:19,loop_main:4,loop_seq:15,loopcandid:[14,15,21],loss:4,lost:[0,4,13],lot:[0,4,7],lovel:27,lovell2000:27,low:[0,4],lower:[18,21],lowest:[18,28],lowest_energy_conform:18,lysin:29,machin:[13,19,20,22,30],macro:[3,4],made:[3,30],magic:[4,22],mai:[0,1,3,4,5,7,21],main:[21,22,30],mainli:[18,27,28],maintain:4,major:4,makefil:[1,4],makestat:30,malici:4,man:[1,4],manag:[3,4],mandatori:14,mandel:17,mandell2009:17,mani:[5,7,13,17,19,20,21,30],manipul:[12,15],manner:[4,13,18,25],manual:[0,1,4,13,14,18,19,22],map:19,mar:16,mark:[3,7,24],markup:4,master:4,mat4:12,match:[3,14,15,17,18,19,20,21],materi:[0,4],mathemat:[14,17],matplotlib:20,matric:19,matrix:[12,19],matter:[3,28],max:[13,21,25,30,31],max_complec:25,max_complex:25,max_count:13,max_db_loop_len:[],max_dev:18,max_dist:[13,14],max_extens:21,max_iter:[14,21],max_iter_lbfg:21,max_iter_sd:21,max_length:21,max_loops_to_search:21,max_res_extens:21,max_step:17,maxfraglength:19,maxim:[13,14,16,17,18,19,21],maximum:[13,14,17,18],mc_closer:18,mc_cooler:18,mc_num_loop:21,mc_sampler:18,mc_scorer:18,mc_step:21,mean:[3,4,7,21],meaning:19,meant:[10,19,21,25],mechan:[10,17,21],medl:21,member:[4,7,14],memori:[13,16,19,20,21,22,30],mention:[0,1],merg:[4,14,21,28],merge_dist:21,mergegap:21,mergegapsbydist:21,mess:4,messi:4,met:29,methionin:[21,29],method:[0,7,13,17,19,20,21,22,23,25],metropoli:[14,18],mhandl:21,middl:4,might:[17,19,28],min:13,min_candid:15,min_dist:13,min_loops_requir:21,min_scor:15,mincadist:12,mind:[0,4],minim:[10,12,13,14,15,17,19,21,23,25],minimizemodelenergi:21,minimum:12,mirror:22,mismatch:13,miss:[5,21],mix:3,mkdir:[1,4],mmcif:5,mod:4,mode:[0,30],model:[],modellinghandl:21,modeltermini:21,modif:21,modifi:[4,12,14,21],modified_crambin:15,modul:[],module_data:3,mol:[4,10,12,13,14,17,18,19,20,21,24,26,28,30],molecular:[10,17,19,21],moment:4,monitor:0,monolith:4,mont:[],montecarloloopsampl:[],mood:4,more:[0,1,3,4,7,21,25,28,31],most:[3,4,12,13,17,20,21,24,27,31],mostli:[3,4],move:[4,14,17,18,21,22],msg:5,msgerrorandexit:5,msm:19,much:[4,19,21],multipl:[1,3,7,21],multipli:18,my_db:19,myclass:22,myclassptr:22,n_coord:12,n_num:21,n_po:[13,24,28],n_stem:[14,15,17,18,19,21],n_stem_phi:18,n_ter:[17,24],n_terminal_length:18,name:[0,3,4,5,7,13,14,18,19,20,21,27,28,29,30],name_pymod:3,namespac:[7,22],nan:[28,30],nat:17,nativ:22,necessari:[12,13,18,19],need:[0,1,3,4,5,7,8,13,17,19,20,21,22],need_config_head:3,neg:[0,13],neglect:[24,28],neglect_size_on:14,neighbor:21,neighbour:[21,30],never:[4,7,13,22],nevertheless:4,new_res_nam:28,newli:18,next:[0,4,12,17,20,21,22],next_aa:18,nice:4,nitrogen:[12,24,28],nobodi:0,node:25,non:[],none:[7,19,21,26],nonredund:19,nonrotamer:27,nonzero:[25,30],norm:13,normal:[13,28],normalization_factor:28,notabl:19,note:[4,7,14,17,18,19,21,22,24,26,29],noth:[3,4,18,28],notic:[0,3,4],nov:1,novel:19,novo:18,now:[4,10,12,19],nparticl:28,nterminalclos:18,num:19,num_frag:[19,21],num_gap_extens:21,num_loop:14,num_residu:13,number:[0,12,13,14,16,17,18,19,20,21,22,24,25,28,30],numpi:[18,20],o_coord:12,o_po:24,object:[],observ:[17,19,25],obtain:[10,21],obviou:4,occupi:24,occur:[13,28],ocparticl:28,off:[0,4,21],offend:21,offer:[16,24,28],offset:[19,21],ofstream:22,often:[4,5,7,17],olc:12,old:21,olson:19,omega:[12,13],onc:[],one_letter_cod:[12,15,18,19],onli:[0,3,4,5,7,8,13,14,18,19,21,22,24,25,26,27],onto:[0,12,19],oparticl:28,open:[13,19,20,22,30],openmm:1,openstructur:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],oper:[4,10,19,25],opt:[4,5,7],optim:[1,13,19,20,30],optimis:4,option:[1,7,17,21,30],order:[7,13,19,21,22],org:4,organ:[19,30],orient:[13,17],origin:[4,7,18,21],ost:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],ost_double_precis:1,ost_librari:3,ost_root:[1,4],other:[0,1,3,4,7,12,13,14,21,28,30,31],otherwis:[0,3,4,12,13,18,21,28],our:[3,4,15,19],out:[0,1,3,4,19,20,21,26,30],out_path:3,out_stream:22,out_stream_:22,output_dir:3,outsid:[4,13],over:[1,3,4,7,13,19],overal:[15,18,25],overlap:18,overli:4,overload:22,overridden:3,overview:[4,26],own:[],oxygen:[12,24,28],pack:[13,14],packag:[3,4],packing_scor:14,pad:22,page:[1,4,11,26],pai:0,pair:[13,14,17,18,19,20,21,22,28,30],pairwis:[12,13,14,23,25,28],pairwiseenergi:28,paper:[23,26],paragraph:[0,4],parallel:19,param:[],paramet:[0,3,5,7,8,12,13,14,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31],parameter_index:19,parametr:[13,24,28],parent:21,pars:[],parse_arg:7,parser:[],part:[0,4,10,18,21,24,25,26],partial:21,particip:26,particl:[],particular:[4,14,17,18,19,28,30],partner:[13,28],pass:[4,7,15,17,18,21],past:[4,21],path:[0,1,3,4,5,10,19,20],path_to_chemlib:8,pattern:19,pdb:[4,5,10,12,15,16,18,19,21,26],pdb_id:19,penal:21,penalti:21,penultim:27,penultimatelib:22,peopl:4,pep:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],peptid:[15,19,26],per:[3,4,6,18,19,20,21,28,31],perfect:4,perfectli:4,perform:[4,10,12,14,17,18,19,21,22,23,25],permiss:4,permut:25,phe:[29,30],phenylalanin:29,phi:[12,13,17,18,19,20,24,26,28,30],phi_bin:[13,30],phi_handl:26,phipsisampl:18,phosphoserin:21,phrase:4,pick:18,pictur:4,piec:4,pivot:[14,17,18],pivot_on:[14,17],pivot_thre:[14,17],pivot_two:[14,17],place:[0,3,4,5,7],placehold:14,plane:21,plausibl:13,pleas:[4,17,19],plenti:21,plot:20,plt:20,plu:[4,7,8,28],pm3_csc:4,pm3_openmm_cpu_thread:21,pm3argpars:[],pm3argumentpars:[5,7],pm3optionsnamespac:7,pm_action:[0,3,4],pm_action_init:4,pm_bin:0,png:20,point:[1,4,7,8,13,15,18,19,21,30],pointer:[1,22],polar:[28,31],polar_direct:28,pop:4,popul:[1,4],port_str_db:19,portabl:[],portable_binary_seri:22,portable_fil:3,portablebinarydatasink:22,portablebinarydatasourc:22,pos_end:19,pos_start:19,posit:[12,13,14,15,16,17,18,19,20,21,23,24,25,28],possibl:[4,7,10,13,14,16,17,18,19,20,21,22,23,24,25,26,28,29,31],post:7,potenti:[13,15,16,19,21,22],practic:[3,4,19],pre:[4,13],pre_commit:4,precis:[14,21],precomput:[15,16,32],pred:13,predefin:[3,10],predict:[13,14,19,23,27],prefactor:[28,31],prefer:[1,3,13,19,20,30],prefix:[0,3,4,5,7],prepar:[4,21],present:[12,17,24,28,30],preserv:21,prev_aa:18,prevent:[0,4],previous:[13,15,19,28],principl:18,print:[0,1,12,19,21],printstatist:19,privat:[0,22],pro:[20,29,30],probabilist:19,probability_cutoff:31,probabl:[3,4,14,17,18,19,20,27,28,30,31],problem:[4,7,17,18,19,21,25,27],process:[0,4,7,13,17,18,22,24,30],produc:[0,1,3,4,14,19,21],product:[0,2,4],prof:19,prof_dir:19,prof_path:19,profil:[14,16,19,21],profiledb:19,profilehandl:19,prog:7,program:[3,4,6],project:[3,4],prolin:[13,21,29],promod3:[],promod3_mod:3,promod3_nam:3,promod3_name_head:3,promod3_root:4,promod3_shared_data_path:[4,22],promod3_unittest:[0,3,4],promot:4,propag:[4,12],proper:4,properli:[0,13,21,25],properti:30,propos:[14,17,18,21,23],proposed_posit:18,proposestep:18,prot:[4,18,19,26],prot_rec:4,protein:[],proton:[28,29,30],provid:[0,1,3,4,7,12,13,14,15,17,18,19,20,21,22,24,26,27,28,30],prune:25,pseudo:[13,18,21,31],psi:[12,13,17,18,19,20,26,28,30],psi_bin:[13,30],psi_handl:26,psipr:[],psipred_confid:13,psipred_pr:19,psipred_predict:19,psipred_st:13,psipredpredict:[13,14,19],pull:4,punch:[],purpos:[4,30],push:4,pushverbositylevel:7,put:[0,3,4,5,7,13,19,20,21,30],py_run:[0,3,4],pyc:0,pylint:4,pylintrc:4,pymod:[3,4],pyplot:20,pytest:4,python2:4,python:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],python_root:1,pythonpath:4,qmean:1,qualiti:21,queri:[19,28,30],querylib:30,question:20,quickli:[4,17],quit:[4,7],rachovski:16,rackovski:16,radian:20,radii:[21,31],radiu:[13,21,31],rais:[7,12,13,14,17,18,19,20,21,23,24,28,30],random:[12,14,16,17,18,20],random_se:14,randomized_frag:12,randomli:[17,18,20],rang:[12,13,14,17,18,19,20,21,30],rapid:23,rare:4,rather:[4,5,7,13,30],raw:[10,13,19,20,21,22,30],rawmodel:4,reach:[17,21,28],read:[4,5,12,13,19,20,21,22,27,30],readabl:[4,30],readdunbrackfil:27,reader:[4,10],readi:[1,30],real:[4,7,22],realli:[0,1,4,5,13],reappear:4,reason:[4,18,19,24],rebas:4,rebuild:[1,4],recalcul:[12,20],recent:4,recoginz:29,recognis:[0,4],recognit:19,recommend:[1,4,21],reconstruct:[],reconstructcbetaposit:12,reconstructoxygenposit:12,reconstructtest:4,record:0,reduc:[13,14,18,19],reduced_scor:14,reducedscor:13,redund:16,ref_backbon:19,ref_fil:4,refer:[0,3,4],referenc:4,refresh:14,regard:[17,23],region:[17,18,21,24],regist:[3,4],regress:27,reiniti:13,reinterpret_cast:22,reject:[14,17,18],rel:[3,13,14,17],relat:[3,4,7,13,14,19,22,31],relax:[],relev:[1,3],remain:[13,18],rememb:[0,4,18],remodel:15,remodel_cterminal_o:12,remot:[15,18,19,26],remov:[1,14,21,25,26],removeterminalgap:21,renumb:21,replac:[12,18],replacefrag:12,report:[0,4,21],repositori:[0,3,4],repres:[13,14,15,17,19,20,21,23,24,25,26,28,32],represent:[12,13,15,19,20,22,28,30],reproduc:21,request:[27,30],requir:[1,4,12,13,15,16,17,19,20,21,22,24,26,28,29,30],reread:19,resembl:4,reserv:5,reset:[13,18],residehandl:28,residue_depth:19,residue_index:[24,28],residuehandl:[12,14,17,18,19,21,24,28,30],resiz:22,resnum:[12,13,15,21],resnum_on:13,resnum_two:13,resolv:[4,17],resort:21,respons:4,rest:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],restrict:[4,21],restructuredtext:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],result:[1,4,13,14,18,20,21,23,25,30,31],reus:21,review:4,reviv:4,rewrit:0,richardson:27,right:[0,1,4,7],rigid:[17,18,23,24,25,26,28,30],ring_punch_detect:21,rmsd:[12,14,17,19],rmsd_cutoff:[14,17,19],rmsd_thresh:19,rmsd_threshold:19,robot:17,role:7,root:[1,3,4],rosetta:13,rot_group:26,rot_lib:28,rotam:[],rotamer_group:[24,25,26],rotamer_id:[26,28],rotamer_librari:26,rotamer_model:26,rotamer_on:23,rotamer_two:23,rotamergroup:28,rotamerid:[],rotamerlib:[22,26,27,28,30],rotamerlibentri:30,rotamerset:[24,26,28,31],rotat:12,rotatearoundomegators:12,rotatearoundphipsitors:12,rotatearoundphitors:12,rotatearoundpsitors:12,roughli:16,routin:0,rrm:26,rrmrotam:[23,28],rrmrotamergroup:[24,25,28],rst1:3,rst2:3,rst:[3,4],rule:4,runact:0,runexitstatustest:0,runnabl:4,runner:0,runtest:[0,4],runtimeerror:[12,13,14,17,18,19,20,21,23,24,27,28,30],runtimeexcept:20,said:3,same:[0,1,3,7,13,17,18,19,21,22,24,28,30],samiti:21,sampl:[],sample_polar_hydrogen:[28,31],sampled_frag:18,samplemontecarlo:18,sampler:[],sampling_start_index:18,sander:19,sanner1996:19,sanner:19,satisfi:[13,29],save:[4,12,13,15,18,19,20,22,30],savebb:19,savecach:19,savefig:20,savepdb:[10,12,15,18,19,21,26],saveport:[13,19,20,22,30],scatter:20,scheme:[0,4,7,18,21],sci:[17,23],scondari:21,score_vari:21,scorer:[],scoringgapextend:21,scratch:28,scriptnam:5,scriptpath:4,scwrl4:[26,27,28],seamlessli:4,search:[1,4,11,13,14,15,19,21,26,28],searchdb:19,second:[13,14,17,21,23,28],secondari:[13,14,19],secondli:4,section:[0,3,9,32],see:[0,4,5,7,10,13,14,18,19,21,22,31],seed:[14,16,17,18,20],seem:4,segment:12,select:[17,18,19,26],selenium:21,self:[0,4,25,28],self_energi:28,send:5,sens:[],sensibl:21,separ:[0,4,13,20,21,23],seq:[13,14,19,21],seq_sep:13,seq_tpl:21,seq_trg:21,seqid:19,seqr:[13,15,18,19,21],seqsim:19,sequenc:[],sequence_profile_weight:19,sequencehandl:[13,21],sequencelist:[13,21],sequenceprofil:19,sequenti:[12,21],ser:[28,29,31],serial:[19,22],serializ:22,serin:29,serv:[0,7,18,19],servic:4,set:[],setcbetaenergi:13,setcbetapotentialparamet:13,setcbpackingenergi:13,setcbpackingpotentialparamet:13,setenviron:[13,15,18],setframeenergi:[24,26,28],sethbondenergi:13,sethbondpotentialparamet:13,setinternalenergi:28,setinternalenergyprefactor:28,setinterpol:30,setomegators:12,setphipsitors:12,setphitors:12,setpolardirect:28,setprob:28,setpsipredpredict:13,setpsitors:12,setreducedenergi:13,setreducedpotentialparamet:13,setsequ:12,setsequenceoffset:21,setssagreementparamet:13,setssagreementscor:13,setstructureprofil:19,settemperatur:28,settorsionenergi:13,settorsionpotentialparamet:13,setup:[4,17,18,21,22],setupbackbonescor:21,sever:[],shake:18,shanno:21,shapovalov2011:27,shapovalov:27,shared_ptr:22,shebang:4,sheet:[21,27],shelenkov:23,shell:[0,1,4,5],shift:21,shiftctermin:21,shiftextens:21,shorter:21,shortest:14,shortli:4,should:[0,3,4,5,7,10,12,13,14,15,17,18,19,20,21,22,24,25,26,28],show:[0,4,26],showcas:[0,20],shown:[4,21],side:[4,21,23,27],sidechain:[],sidechain_pymod:4,sidechain_rst:4,sidechain_test_data:4,sidechain_test_orig:26,sidechain_test_rec:26,sidechain_unit_test:4,sidechainparticl:28,sig1:[28,30],sig2:[28,30],sig3:[28,30],sig4:[28,30],silent:0,similar:[0,1,4,13,19,30],similardihedr:30,similarli:1,simpl:[12,13,18,19,23,24,30],simplest:[4,21,26],simpli:[12,13,15,18,21,29,30],simplif:7,simplifi:19,simul:[14,18],sinc:[0,1,3,4,5,13,19,20,27,29],singl:[3,4,13,14,17,18,19,21,24,25,27,28],sink:22,sit:4,site:4,size:[12,13,14,17,18,19,20,22],sizeof:22,skip:[0,4,19,21],slow:[13,19,20,22,30],small:[4,17,19,21],smaller:[13,17,19,20,30,31],smallest:[],smallish:[1,4],smart:4,smng:2,smooth:27,soding2005:19,softsampl:18,softwar:4,sol:26,sole:[0,4],soli:16,solut:[],solv:[4,25,26],solvent:19,some:[0,1,3,4,7,18,19,21,22,24,26,28,30],somedata:22,somehow:14,someth:[0,4,5,19],sometim:4,somewher:[3,19],soon:[17,26,30],sort:[0,3,30],sound:4,sourc:[0,1,3,4,5,7,8,15,19,21,22,26,30],source1:[3,4],source2:[3,4],source3:3,source4:3,span:21,sparticl:28,spawn:[0,4],spdbv:21,spdbv_style:21,special:[0,1,3,4,29,30],specif:[0,4,13,18,19,20,27,30],specifi:[1,3,12,14,20,28,30],specimen:5,speed:21,spehner:19,spend:4,sphinx:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],spit:21,sport:4,squar:19,src:4,src_db:19,ss_agreement:[14,18],ss_agreement_scor:14,ss_agreement_weight:19,ssagre:19,ssagreement:[13,14],ssagreementscor:13,sstream:22,stabil:19,stabl:4,stack:4,stage:[],stai:[0,4,13],standard:[1,4,6,7,13,20,22,24,27,28,30],start:[],start_resnum:[12,13,14,18],start_temperatur:18,starter:0,stash:4,state:[0,1,4,13,19,23,28,29,30],statist:[15,16,19],statu:[0,4],std:22,stderr:0,stdout:0,steadili:18,steepest:[17,21],stem:[12,14,15,17,18,19,21],step:[4,10,14,17,18,19,21,27],stereochem:21,steric:30,still:[4,21,22],stop:[0,4,17,21],stop_criterion:17,storabl:19,store:[0,4,10,12,13,14,18,19,20,21,22,30],stori:4,str:[0,5,7,8,12,13,14,17,18,19,20,21,22,26,28,29,30],str_len:22,straight:4,strategi:30,stream:22,strict:4,string:[5,7,13,19,20,21,22],stringstream:22,strip:[21,28],struct:22,structral:13,structural_db:14,structuralgap:21,structuralgaplist:21,structure_db:[15,19,21,22],structure_dir:19,structure_path:19,structure_profile_weight:19,structuredb:[14,15,16,19,21,22],structureprofil:19,style:21,sub:[4,14,17],sub_frag:12,subdir:4,subfold:4,subject:4,submodul:4,submodule1:4,subrotam:[23,28,31],subsequ:[13,21],subst:19,subst_matrix:19,substitut:19,substweightmatrix:19,subtre:[3,4],succeed:21,success:[5,18,25],suffix:5,suggest:4,suit:[0,4,14],sulfur:[23,28],sum:[13,15,21,28,31],superpos:[12,17,18,19],superpose_stem:12,superposed_rmsd:12,superposeonto:12,superposit:[14,18],supervis:0,supos:19,support:[0,4,5,13,17,19,20,30],suppos:4,sure:[1,4,7,19],surf:19,surfac:19,surfacehandl:19,surround:[13,19],swiss:21,symmetr:30,system:[0,1,3,4],t_sampler:20,tail:12,tailor:21,take:[4,18,19,20,21,22,25,26],taken:[21,24,28],talk:0,target:[0,1,3,4,7,10,12,13,17,18,19,20,21,30],target_sequ:19,task:[4,17,21,22],technic:[19,24,31],tell:[0,4,5,7,19],temperatur:[14,18,28,31],templat:[0,7,10,21,22],temporari:19,temporarili:4,term:[4,13,19,28,29,30,31],termin:[0,5,10,12,14,17,18,21,24],terminal_sequ:18,termini:[18,21],terminu:[18,19,21],test_:4,test_action_:0,test_action_do_awesom:0,test_action_help:0,test_awesome_featur:4,test_check_io:22,test_cod:4,test_doctest:4,test_foo:3,test_portable_binari:22,test_reconstruct:4,test_sidechain:4,test_submodule1:4,test_suite_:3,test_suite_your_module_run:4,test_your_modul:4,testcas:[0,4],testcasenam:4,testexit0:0,testpmexist:0,testreconstruct:4,testutil:[0,4],text:[0,7],than:[3,4,7,13,17,19,20,21,30,31],thei:[1,4,12,13,14,18,19,20,21,28,29,30],them:[3,4,13,14,15,19,20,21,24,28,30,31,32],theoret:18,theori:23,therefor:[4,12,16,17,18,19,30],thi:[0,1,3,4,5,6,7,8,9,10,12,13,14,15,17,18,19,20,21,22,23,24,25,26,28,29,30,32],thing:[0,1,4,7,17,19,21,26,30,31],think:4,thoroughli:4,those:[0,1,3,4,7,14,21,22,25,26],though:[21,22],thr:[28,29,31],thread:[16,21],three:[0,3,4,12,13,14,18,20,21,28,29,31],threonin:29,thresh:[13,28,30],threshold:[17,19,21,25,30],through:[0,4,19,21],throughout:[4,7,16],thu:5,tidi:4,tightli:4,time:[0,4,12,13,21],tini:[4,21],titl:20,tlc:29,tlctorotid:[26,29],tmp_buf:22,toentiti:[10,12,18,19],togeth:[4,19,21],too:[4,14,19,21,22],tool:[3,15,19,22,26],toolbox:4,top:[1,4,8],topic:[0,4],topolog:17,torsion:[],torsion_angl:26,torsion_bin:13,torsion_plot:20,torsion_sampl:[12,14,17,18,19,21,22],torsion_sampler_coil:[19,22],torsion_sampler_extend:[19,22],torsion_sampler_hel:22,torsion_sampler_helix:19,torsion_sampler_list:19,torsion_scor:14,torsion_weight:19,torsionprob:19,torsionsampl:[12,13,14,16,17,18,19,20,21,22],torsionscor:13,total:[13,19],touch:[0,4],toward:[4,13,17,21],tpl:21,tpr:[29,30],track:[5,26],tradit:7,tradition:5,train:16,trajectori:18,tran:[13,29,30],transform:[12,28,30],transformation_matrix:12,translat:[3,29,30],transofrm:12,transomegators:13,treat:[4,21,22,30],tree:[0,3,4,25],trg:[7,21],tri:[21,30],trick:[0,4],trigger:[0,3,4,27],tripeptid:20,tripl:5,triplet:[],trp:29,trustworthi:4,tryptophan:29,ttccpsivarsnfnvcrlpgtpea:21,ttccpsivarsnfnvcrlpgtpeaicatgytciiipgatcpgdyan:21,ttccpsivarsnfnvcrlpgtpeaicatytgciiipgatcpgdyan:21,tupl:[5,12,21],turn:[0,4,5,21],tutori:4,tweak:21,two:[0,4,12,13,14,17,19,21,22,23,26,28,29,30,31],txt:[0,1,3,4],type:[],typedef:22,typenam:22,typic:[12,18,26,28],tyr:[28,29,30,31],tyrosin:29,uint32_t:22,uint:22,ultra:19,uncertain:4,under:[3,4],undergo:[17,18],underli:[14,21],underscor:0,understand:4,unexpect:1,unfavor:13,unfavour:[17,18,23],unfortun:4,uniqu:[13,14,18,30],unittest:[0,4],unix:4,unlik:[26,31],unrecognis:[5,7],unsupport:22,until:[4,13,17,21,25,28],untrack:0,unus:4,updat:[4,17,21],updatedistribut:20,upon:[17,18],usabl:4,usag:[16,19,24,26],use_full_extend:21,use_scoring_extend:21,user:[],userlevel:0,usr:4,usual:[0,1,3,4,7,15,21],utilis:4,v_size:22,val:[20,29],valid:[4,13,18,21,27],valin:29,valu:[1,5,7,12,13,14,18,19,21,22,24,25,26,27,28,29,30],valueerror:19,varadarajan:19,vari:[3,22],variabl:[0,1,4,10,21,22,31],variant:[7,21],variou:[0,1,3,4],vec3:[12,21,23,24,28],vector:[20,22],verbos:0,veri:[0,4,5,21,22,31],verif:7,verifi:[0,4,5],version:[1,4,13,19,20,22,27,29,30],vertex:19,via:[0,4,7,8],view:[4,20],virtual:4,visual:10,wai:[0,1,3,4,7,12,15,19,24,26,27,29],wait:4,walk:[0,4],want:[0,1,4,8,13,15,17,19,21,28,30],warn:[4,21],watch:4,web:[1,4],weight:[14,18,19],weird:[17,26],well:[1,3,4,13,19,20,21,22,26,28,30],went:4,were:[4,19,21],wether:25,what:[0,4,5,7,15],when:[0,3,4,7,12,13,18,19,20,21,22,23,24,26,27,28,30,31],whenev:13,where:[0,3,4,5,12,13,19,20,22,27,30],wherea:19,whether:[5,12,13,14,17,18,19,24,26,28,30],which:[0,3,4,5,6,7,10,12,13,14,18,19,20,21,22,24,28],whistl:4,who:[25,26],whole:[0,4,19,21],why:[0,4],width:22,wild:3,wise:3,wish:[9,13,20,21],within:[1,3,4,13,21,30],without:[0,3,4,5,16,17,19,21,27],won:[24,26,27],word:[3,27],work:[0,1,3,4,7,21,22,27],worst:4,would:[0,1,4,5,20,23,28],wrapper:[0,3,4,8,21],writebasetyp:22,writemagicnumb:22,writetypes:22,writeversionnumb:22,written:[4,22],wrong:[1,7],xlabel:20,xlim:20,xml:4,xxx:29,year:0,yet:[13,19],ylabel:20,ylim:20,you:[0,1,3,4,5,7,8,10,13,14,15,17,18,19,20,21,22,24,26,27,28,30],your:[],your_modul:4,yourself:[1,4],zero:[19,21,30],zhou2005:19,zhou:19,zip:26},titles:["<code class=\"docutils literal\"><span class=\"pre\">test_actions</span></code> - Testing Actions","Building ProMod3","Changelog","ProMod3&#8216;s Share Of CMake","Contributing","<code class=\"docutils literal\"><span class=\"pre\">helper</span></code> - Shared Functionality For the Everything","<code class=\"docutils literal\"><span class=\"pre\">core</span></code> - ProMod3 Core Functionality","<code class=\"docutils literal\"><span class=\"pre\">pm3argparse</span></code> - Parsing Command Lines","<code class=\"docutils literal\"><span class=\"pre\">SetCompoundsChemlib()</span></code>","Documentation For Developers","Getting Started","Welcome To ProMod3&#8217;s Documentation!","Backbone","Loop Scoring","Helper Classes","<code class=\"docutils literal\"><span class=\"pre\">loop</span></code> - Loop Modelling","Load Loop Objects","Loop Closing","Monte Carlo Sampling","Structural Database","Torsion Sampler","<code class=\"docutils literal\"><span class=\"pre\">modelling</span></code> - Protein Modelling","Using binary files in ProMod3","Disulfid Bond Evaluation","Frame","Coming to a solution","<code class=\"docutils literal\"><span class=\"pre\">sidechain</span></code> - Sidechain Modelling","Load Rotamer Libraries","Rotamers","RotamerID","Rotamer Library","Rotamer Settings","Documentation For Users"],titleterms:{"class":[14,20,21],"function":[3,5,6,24,26,28],acid:20,action:[0,3,4],actiontestcas:0,amino:20,api:0,argument:7,backbon:[12,17,30],backboneloopscor:13,base:19,basic:12,binari:22,block:[12,28],bond:23,branch:4,build:[1,12,28],can:29,carlo:18,ccd:17,chain:19,changelog:2,close:[17,21],closer:18,cmake:[0,1,3,4],code:22,come:25,command:7,construct:[24,28],contribut:4,conveni:[24,28],cooler:18,core:6,creat:0,data:22,databas:19,defin:[19,20],definit:3,depend:[1,30],detect:21,develop:9,directori:4,disulfid:23,document:[3,4,9,11,32],edit:12,entri:30,evalu:23,everyth:5,exampl:22,execut:0,exisit:22,extend:21,featur:[4,19],file:[5,22],find:19,fragment:19,frame:24,full:12,gap:21,geometr:19,get:[10,29],git:4,graph:25,group:28,handl:[14,21],have:0,header:22,helper:[5,14],hook:4,how:[4,29],indic:11,integr:0,interact:25,introduct:[3,5,7],issu:4,kic:17,librari:[27,30],licens:4,line:7,load:[16,27],loop:[13,14,15,16,17],mainten:3,make:[0,1],messag:5,model:[10,15,21,26],modul:[3,4,26],mont:18,must:0,non:30,object:[16,18,24],onc:14,output:0,own:4,pars:7,parser:7,parti:4,particl:28,pipelin:[10,21],pm3argpars:7,portabl:22,promod3:[1,3,4,6,10,11,22],protein:21,psipr:14,punch:21,quick:4,reconstruct:26,relax:17,releas:2,residu:[12,24],ring:21,rotam:[27,28,30,31],rotamerid:29,run:[0,1,10],sampl:18,sampler:[18,20],score:13,scorer:18,script:0,sequenc:19,set:31,setcompoundschemlib:8,sever:14,share:[3,5],sidechain:26,smallest:28,solut:25,stage:4,start:[4,10],stretch:12,structur:[4,19],subclass:0,tabl:11,test:[0,3,4,5],test_act:0,third:4,torsion:20,triplet:20,type:30,unit:[0,3,4],user:32,welcom:11,write:4,your:4}})
\ No newline at end of file
+Search.setIndex({envversion:46,filenames:["actions/index","actions/index_dev","buildsystem","changelog","cmake/index","contributing","core/geometry","core/helper","core/index","core/pm3argparse","core/runtime_profiling","core/setcompoundschemlib","dev_setup","developers","gettingstarted","index","loop/all_atom","loop/backbone","loop/index","loop/load_loop_objects","loop/mm_system_creation","loop/structure_db","loop/torsion_sampler","modelling/algorithms","modelling/gap_handling","modelling/index","modelling/loop_candidates","modelling/loop_closing","modelling/model_checking","modelling/monte_carlo","modelling/pipeline","modelling/sidechain_reconstruction","portableIO","scoring/all_atom_scorers","scoring/backbone_score_env","scoring/backbone_scorers","scoring/index","sidechain/disulfid","sidechain/frame","sidechain/graph","sidechain/index","sidechain/loading","sidechain/rotamer","sidechain/rotamer_constructor","sidechain/rotamer_id","sidechain/rotamer_lib","sidechain/subrotamer_optimizer","users"],objects:{"":{"command:add_doc_dependency":[4,0,1,""],"command:add_doc_source":[4,0,1,""],"command:convert_module_data":[4,0,1,""],"command:module":[4,0,1,""],"command:pm_action":[4,0,1,""],"command:promod3_unittest":[4,0,1,""],"command:pymod":[4,0,1,""],test_actions:[1,1,0,"-"]},"promod3.core":{ConstructAtomPos:[6,6,1,""],ConstructCBetaPos:[6,6,1,""],ConstructCTerminalOxygens:[6,6,1,""],EvaluateGromacsPosRule:[6,6,1,""],RotationAroundLine:[6,6,1,""],StaticRuntimeProfiler:[10,2,1,""],StemCoords:[6,2,1,""],StemPairOrientation:[6,2,1,""],helper:[7,1,0,"-"],pm3argparse:[9,1,0,"-"]},"promod3.core.StaticRuntimeProfiler":{Clear:[10,4,1,""],IsEnabled:[10,4,1,""],PrintSummary:[10,4,1,""],Start:[10,4,1,""],StartScoped:[10,4,1,""],Stop:[10,4,1,""]},"promod3.core.StemCoords":{c_coord:[6,5,1,""],ca_coord:[6,5,1,""],n_coord:[6,5,1,""]},"promod3.core.StemPairOrientation":{angle_four:[6,5,1,""],angle_one:[6,5,1,""],angle_three:[6,5,1,""],angle_two:[6,5,1,""],distance:[6,5,1,""]},"promod3.core.helper":{FileExists:[7,6,1,""],FileExtension:[7,6,1,""],FileGzip:[7,6,1,""],MsgErrorAndExit:[7,6,1,""]},"promod3.core.pm3argparse":{PM3ArgumentParser:[9,2,1,""]},"promod3.core.pm3argparse.PM3ArgumentParser":{"__init__":[9,3,1,""],AddAlignment:[9,3,1,""],AddStructure:[9,3,1,""],AssembleParser:[9,3,1,""],Parse:[9,3,1,""],action:[9,5,1,""]},"promod3.loop":{AllAtomEnv:[16,2,1,""],AllAtomEnvPositions:[16,2,1,""],AllAtomPositions:[16,2,1,""],AminoAcidAtom:[16,2,1,""],AminoAcidHydrogen:[16,2,1,""],AminoAcidLookup:[16,2,1,""],BackboneList:[17,2,1,""],CoordInfo:[21,2,1,""],ForcefieldAminoAcid:[20,2,1,""],ForcefieldBondInfo:[20,2,1,""],ForcefieldConnectivity:[20,2,1,""],ForcefieldHarmonicAngleInfo:[20,2,1,""],ForcefieldHarmonicImproperInfo:[20,2,1,""],ForcefieldLJPairInfo:[20,2,1,""],ForcefieldLookup:[20,2,1,""],ForcefieldPeriodicDihedralInfo:[20,2,1,""],ForcefieldUreyBradleyAngleInfo:[20,2,1,""],FragDB:[21,2,1,""],Fragger:[21,2,1,""],FraggerMap:[21,2,1,""],FragmentInfo:[21,2,1,""],LoadFragDB:[19,3,1,""],LoadStructureDB:[19,3,1,""],LoadTorsionSampler:[19,3,1,""],LoadTorsionSamplerCoil:[19,3,1,""],LoadTorsionSamplerExtended:[19,3,1,""],LoadTorsionSamplerHelical:[19,3,1,""],MmSystemCreator:[20,2,1,""],PsipredPrediction:[21,2,1,""],StructureDB:[21,2,1,""],TorsionSampler:[22,2,1,""]},"promod3.loop.AllAtomEnv":{ClearEnvironment:[16,3,1,""],GetAllAtomPositions:[16,3,1,""],GetEnvironment:[16,3,1,""],GetSeqres:[16,3,1,""],SetEnvironment:[16,3,1,""],SetInitialEnvironment:[16,3,1,""]},"promod3.loop.AllAtomEnvPositions":{all_pos:[16,5,1,""],res_indices:[16,5,1,""]},"promod3.loop.AllAtomPositions":{AllAtomPositions:[16,3,1,""],ClearPos:[16,3,1,""],ClearResidue:[16,3,1,""],Copy:[16,3,1,""],Extract:[16,3,1,""],ExtractBackbone:[16,3,1,""],GetAA:[16,3,1,""],GetFirstIndex:[16,3,1,""],GetIndex:[16,3,1,""],GetLastIndex:[16,3,1,""],GetNumAtoms:[16,3,1,""],GetNumResidues:[16,3,1,""],GetOmegaTorsion:[16,3,1,""],GetPhiTorsion:[16,3,1,""],GetPos:[16,3,1,""],GetPsiTorsion:[16,3,1,""],GetSequence:[16,3,1,""],InsertInto:[16,3,1,""],IsAllSet:[16,3,1,""],IsAnySet:[16,3,1,""],IsSet:[16,3,1,""],SetPos:[16,3,1,""],SetResidue:[16,3,1,""],ToEntity:[16,3,1,""]},"promod3.loop.AminoAcidLookup":{GetAA:[16,4,1,""],GetAAA:[16,4,1,""],GetAAH:[16,4,1,""],GetAnchorAtomIndex:[16,4,1,""],GetAtomName:[16,4,1,""],GetAtomNameAmber:[16,4,1,""],GetAtomNameCharmm:[16,4,1,""],GetElement:[16,4,1,""],GetH1Index:[16,4,1,""],GetH2Index:[16,4,1,""],GetH3Index:[16,4,1,""],GetHNIndex:[16,4,1,""],GetHydrogenIndex:[16,4,1,""],GetIndex:[16,4,1,""],GetMaxNumAtoms:[16,4,1,""],GetMaxNumHydrogens:[16,4,1,""],GetNumAtoms:[16,4,1,""],GetNumHydrogens:[16,4,1,""],GetOLC:[16,4,1,""]},"promod3.loop.BackboneList":{"__len__":[17,3,1,""],ApplyTransform:[17,3,1,""],BackboneList:[17,3,1,""],CARMSD:[17,3,1,""],Copy:[17,3,1,""],Extract:[17,3,1,""],GetAA:[17,3,1,""],GetBounds:[17,3,1,""],GetC:[17,3,1,""],GetCA:[17,3,1,""],GetCB:[17,3,1,""],GetN:[17,3,1,""],GetO:[17,3,1,""],GetOLC:[17,3,1,""],GetOmegaTorsion:[17,3,1,""],GetPhiTorsion:[17,3,1,""],GetPsiTorsion:[17,3,1,""],GetSequence:[17,3,1,""],GetTransform:[17,3,1,""],InsertInto:[17,3,1,""],MinCADistance:[17,3,1,""],RMSD:[17,3,1,""],ReconstructCBetaPositions:[17,3,1,""],ReconstructCStemOxygen:[17,3,1,""],ReconstructOxygenPositions:[17,3,1,""],ReplaceFragment:[17,3,1,""],RotateAroundOmegaTorsion:[17,3,1,""],RotateAroundPhiPsiTorsion:[17,3,1,""],RotateAroundPhiTorsion:[17,3,1,""],RotateAroundPsiTorsion:[17,3,1,""],Set:[17,3,1,""],SetAA:[17,3,1,""],SetAroundOmegaTorsion:[17,3,1,""],SetAroundPhiPsiTorsion:[17,3,1,""],SetAroundPhiTorsion:[17,3,1,""],SetAroundPsiTorsion:[17,3,1,""],SetBackrub:[17,3,1,""],SetC:[17,3,1,""],SetCA:[17,3,1,""],SetCB:[17,3,1,""],SetN:[17,3,1,""],SetO:[17,3,1,""],SetOLC:[17,3,1,""],SetSequence:[17,3,1,""],SuperposeOnto:[17,3,1,""],ToDensity:[17,3,1,""],ToEntity:[17,3,1,""],TransOmegaTorsions:[17,3,1,""],append:[17,3,1,""],clear:[17,3,1,""],empty:[17,3,1,""],resize:[17,3,1,""]},"promod3.loop.CoordInfo":{offset:[21,5,1,""],pdb_id:[21,5,1,""],size:[21,5,1,""]},"promod3.loop.ForcefieldBondInfo":{bond_length:[20,5,1,""],force_constant:[20,5,1,""],index_one:[20,5,1,""],index_two:[20,5,1,""]},"promod3.loop.ForcefieldConnectivity":{harmonic_angles:[20,5,1,""],harmonic_bonds:[20,5,1,""],harmonic_impropers:[20,5,1,""],lj_pairs:[20,5,1,""],periodic_dihedrals:[20,5,1,""],periodic_impropers:[20,5,1,""],urey_bradley_angles:[20,5,1,""]},"promod3.loop.ForcefieldHarmonicAngleInfo":{angle:[20,5,1,""],force_constant:[20,5,1,""],index_one:[20,5,1,""],index_three:[20,5,1,""],index_two:[20,5,1,""]},"promod3.loop.ForcefieldHarmonicImproperInfo":{angle:[20,5,1,""],force_constant:[20,5,1,""],index_four:[20,5,1,""],index_one:[20,5,1,""],index_three:[20,5,1,""],index_two:[20,5,1,""]},"promod3.loop.ForcefieldLJPairInfo":{epsilon:[20,5,1,""],index_one:[20,5,1,""],index_two:[20,5,1,""],sigma:[20,5,1,""]},"promod3.loop.ForcefieldLookup":{GetAA:[20,3,1,""],GetCharges:[20,3,1,""],GetDefault:[20,4,1,""],GetDisulfidConnectivity:[20,3,1,""],GetEpsilons:[20,3,1,""],GetFudgeLJ:[20,3,1,""],GetFudgeQQ:[20,3,1,""],GetHeavyIndex:[20,3,1,""],GetHydrogenIndex:[20,3,1,""],GetInternalConnectivity:[20,3,1,""],GetMasses:[20,3,1,""],GetNumAtoms:[20,3,1,""],GetOXTIndex:[20,3,1,""],GetPeptideBoundConnectivity:[20,3,1,""],GetSigmas:[20,3,1,""],Load:[20,4,1,""],LoadCHARMM:[20,4,1,""],LoadPortable:[20,4,1,""],Save:[20,3,1,""],SavePortable:[20,3,1,""],SetCharges:[20,3,1,""],SetDefault:[20,4,1,""],SetDisulfidConnectivity:[20,3,1,""],SetEpsilons:[20,3,1,""],SetFudgeLJ:[20,3,1,""],SetFudgeQQ:[20,3,1,""],SetInternalConnectivity:[20,3,1,""],SetMasses:[20,3,1,""],SetPeptideBoundConnectivity:[20,3,1,""],SetSigmas:[20,3,1,""]},"promod3.loop.ForcefieldPeriodicDihedralInfo":{force_constant:[20,5,1,""],index_four:[20,5,1,""],index_one:[20,5,1,""],index_three:[20,5,1,""],index_two:[20,5,1,""],multiplicity:[20,5,1,""],phase:[20,5,1,""]},"promod3.loop.ForcefieldUreyBradleyAngleInfo":{angle:[20,5,1,""],angle_force_constant:[20,5,1,""],bond_force_constant:[20,5,1,""],bond_length:[20,5,1,""],index_one:[20,5,1,""],index_three:[20,5,1,""],index_two:[20,5,1,""]},"promod3.loop.FragDB":{AddFragments:[21,3,1,""],GetAngularBinSize:[21,3,1,""],GetDistBinSize:[21,3,1,""],GetNumFragments:[21,3,1,""],GetNumStemPairs:[21,3,1,""],HasFragLength:[21,3,1,""],Load:[21,4,1,""],LoadPortable:[21,4,1,""],MaxFragLength:[21,3,1,""],PrintStatistics:[21,3,1,""],Save:[21,3,1,""],SavePortable:[21,3,1,""],SearchDB:[21,3,1,""]},"promod3.loop.Fragger":{"__getitem__":[21,3,1,""],"__len__":[21,3,1,""],AddSSAgreeParameters:[21,3,1,""],AddSeqIDParameters:[21,3,1,""],AddSeqSimParameters:[21,3,1,""],AddSequenceProfileParameters:[21,3,1,""],AddStructureProfileParameters:[21,3,1,""],AddTorsionProbabilityParameters:[21,3,1,""],Fill:[21,3,1,""],GetFragmentInfo:[21,3,1,""],GetScore:[21,3,1,""]},"promod3.loop.FraggerMap":{"__getitem__":[21,3,1,""],"__setitem__":[21,3,1,""],Contains:[21,3,1,""],Load:[21,3,1,""],LoadBB:[21,3,1,""],Save:[21,3,1,""],SaveBB:[21,3,1,""]},"promod3.loop.FragmentInfo":{chain_index:[21,5,1,""],length:[21,5,1,""],offset:[21,5,1,""]},"promod3.loop.MmSystemCreator":{ExtractLoopPositions:[20,3,1,""],GetCpuPlatformSupport:[20,3,1,""],GetDisulfidBridges:[20,3,1,""],GetForcefieldAminoAcids:[20,3,1,""],GetIndexing:[20,3,1,""],GetLoopLengths:[20,3,1,""],GetLoopStartIndices:[20,3,1,""],GetNumLoopResidues:[20,3,1,""],GetNumResidues:[20,3,1,""],GetSimulation:[20,3,1,""],SetCpuPlatformSupport:[20,3,1,""],SetupSystem:[20,3,1,""],UpdatePositions:[20,3,1,""]},"promod3.loop.PsipredPrediction":{"__len__":[21,3,1,""],Add:[21,3,1,""],Extract:[21,3,1,""],FromHHM:[21,3,1,""],FromHoriz:[21,3,1,""],GetConfidence:[21,3,1,""],GetConfidences:[21,3,1,""],GetPrediction:[21,3,1,""],GetPredictions:[21,3,1,""],PsipredPrediction:[21,3,1,""]},"promod3.loop.StructureDB":{AddCoordinates:[21,3,1,""],GenerateStructureProfile:[21,3,1,""],GetBackboneList:[21,3,1,""],GetCoordIndex:[21,3,1,""],GetCoordInfo:[21,3,1,""],GetDSSPStates:[21,3,1,""],GetDihedralAngles:[21,3,1,""],GetNumCoords:[21,3,1,""],GetResidueDepths:[21,3,1,""],GetSequence:[21,3,1,""],GetSequenceProfile:[21,3,1,""],GetSolventAccessibilitites:[21,3,1,""],GetStructureProfile:[21,3,1,""],GetSubDB:[21,3,1,""],Load:[21,4,1,""],LoadPortable:[21,4,1,""],PrintStatistics:[21,3,1,""],Save:[21,3,1,""],SavePortable:[21,3,1,""],SetStructureProfile:[21,3,1,""]},"promod3.loop.TorsionSampler":{Draw:[22,3,1,""],DrawPhiGivenPsi:[22,3,1,""],DrawPsiGivenPhi:[22,3,1,""],ExtractStatistics:[22,3,1,""],GetBinSize:[22,3,1,""],GetBinsPerDimension:[22,3,1,""],GetHistogramIndex:[22,3,1,""],GetHistogramIndices:[22,3,1,""],GetPhiProbabilityGivenPsi:[22,3,1,""],GetProbability:[22,3,1,""],GetPsiProbabilityGivenPhi:[22,3,1,""],Load:[22,4,1,""],LoadPortable:[22,4,1,""],Save:[22,3,1,""],SavePortable:[22,3,1,""],UpdateDistributions:[22,3,1,""]},"promod3.modelling":{AllAtomRelaxer:[27,2,1,""],BackboneRelaxer:[27,2,1,""],BuildFromRawModel:[30,6,1,""],BuildRawModel:[30,6,1,""],BuildSidechains:[30,6,1,""],CCD:[27,2,1,""],CCDCloser:[29,2,1,""],CTerminalCloser:[29,2,1,""],CheckFinalModel:[30,6,1,""],ClearGaps:[24,6,1,""],CloseGaps:[30,6,1,""],CloseLargeDeletions:[30,6,1,""],CloseSmallDeletions:[30,6,1,""],CountEnclosedGaps:[24,6,1,""],CountEnclosedInsertions:[24,6,1,""],DirtyCCDCloser:[29,2,1,""],ExponentialCooler:[29,2,1,""],FillLoopsByDatabase:[30,6,1,""],FillLoopsByMonteCarlo:[30,6,1,""],FilterCandidates:[28,6,1,""],FilterCandidatesWithSC:[28,6,1,""],FraggerHandle:[23,2,1,""],FragmentSampler:[29,2,1,""],FullGapExtender:[24,2,1,""],GapExtender:[24,2,1,""],GenerateDeNovoTrajectories:[23,6,1,""],GetRingPunches:[28,6,1,""],GetRings:[28,6,1,""],HasRingPunches:[28,6,1,""],InsertLoop:[30,6,1,""],InsertLoopClearGaps:[24,6,1,""],IsAllAtomScoringSetUp:[30,6,1,""],IsBackboneScoringSetUp:[30,6,1,""],KIC:[27,2,1,""],KICCloser:[29,2,1,""],LinearScorer:[29,2,1,""],LoopCandidates:[26,2,1,""],MergeGaps:[24,6,1,""],MergeGapsByDistance:[30,6,1,""],MergeMHandle:[30,6,1,""],MinimizeModelEnergy:[30,6,1,""],ModelTermini:[30,6,1,""],ModellingHandle:[30,2,1,""],NTerminalCloser:[29,2,1,""],PhiPsiSampler:[29,2,1,""],ReconstructSidechains:[31,6,1,""],RemoveTerminalGaps:[30,6,1,""],ReorderGaps:[30,6,1,""],ReportMolProbityScores:[28,6,1,""],RigidBlocks:[23,3,1,""],RunMolProbity:[28,6,1,""],RunMolProbityEntity:[28,6,1,""],SampleMonteCarlo:[29,3,1,""],ScoreContainer:[26,2,1,""],ScoringGapExtender:[24,2,1,""],ScoringWeights:[26,2,1,""],SetPsipredPredictions:[30,6,1,""],SetSequenceProfiles:[30,6,1,""],SetupDefaultAllAtomScoring:[30,6,1,""],SetupDefaultBackboneScoring:[30,6,1,""],ShiftExtension:[24,2,1,""],SidechainReconstructionData:[31,2,1,""],SidechainReconstructor:[31,2,1,""],SoftSampler:[29,2,1,""],StructuralGap:[24,2,1,""],StructuralGapList:[24,2,1,""]},"promod3.modelling.AllAtomRelaxer":{GetSystemCreator:[27,3,1,""],Run:[27,3,1,""],UpdatePositions:[27,3,1,""]},"promod3.modelling.BackboneRelaxer":{AddCARestraint:[27,3,1,""],AddCBRestraint:[27,3,1,""],AddCRestraint:[27,3,1,""],AddNRestraint:[27,3,1,""],AddORestraint:[27,3,1,""],GetNonBondedCutoff:[27,3,1,""],Run:[27,3,1,""],SetNonBondedCutoff:[27,3,1,""]},"promod3.modelling.CCD":{CCD:[27,3,1,""],Close:[27,3,1,""]},"promod3.modelling.CCDCloser":{Close:[29,3,1,""]},"promod3.modelling.DirtyCCDCloser":{Close:[29,3,1,""]},"promod3.modelling.ExponentialCooler":{GetTemperature:[29,3,1,""],Reset:[29,3,1,""]},"promod3.modelling.FraggerHandle":{Get:[23,3,1,""],GetList:[23,3,1,""],LoadCached:[23,3,1,""],SaveCached:[23,3,1,""]},"promod3.modelling.FragmentSampler":{Initialize:[29,3,1,""],ProposeStep:[29,3,1,""]},"promod3.modelling.FullGapExtender":{Extend:[24,3,1,""]},"promod3.modelling.GapExtender":{Extend:[24,3,1,""]},"promod3.modelling.KIC":{Close:[27,3,1,""],KIC:[27,3,1,""]},"promod3.modelling.KICCloser":{Close:[29,3,1,""]},"promod3.modelling.LinearScorer":{GetScore:[29,3,1,""]},"promod3.modelling.LoopCandidates":{Add:[26,3,1,""],AddFragmentInfo:[26,3,1,""],ApplyCCD:[26,3,1,""],ApplyKIC:[26,3,1,""],CalculateAllAtomScores:[26,3,1,""],CalculateBackboneScores:[26,3,1,""],CalculateSequenceProfileScores:[26,3,1,""],CalculateStemRMSDs:[26,3,1,""],CalculateStructureProfileScores:[26,3,1,""],Extract:[26,3,1,""],FillFromDatabase:[26,4,1,""],FillFromMonteCarloSampler:[26,4,1,""],GetClusteredCandidates:[26,3,1,""],GetClusters:[26,3,1,""],GetFragmentInfo:[26,3,1,""],GetLargestCluster:[26,3,1,""],GetSequence:[26,3,1,""],HasFragmentInfos:[26,3,1,""],Remove:[26,3,1,""]},"promod3.modelling.ModellingHandle":{Copy:[30,3,1,""],all_atom_scorer:[30,5,1,""],all_atom_scorer_env:[30,5,1,""],all_atom_sidechain_env:[30,5,1,""],backbone_scorer:[30,5,1,""],backbone_scorer_env:[30,5,1,""],gaps:[30,5,1,""],model:[30,5,1,""],profiles:[30,5,1,""],psipred_predictions:[30,5,1,""],seqres:[30,5,1,""],sidechain_reconstructor:[30,5,1,""]},"promod3.modelling.PhiPsiSampler":{Initialize:[29,3,1,""],ProposeStep:[29,3,1,""]},"promod3.modelling.ScoreContainer":{Contains:[26,3,1,""],Copy:[26,3,1,""],Extend:[26,3,1,""],Extract:[26,3,1,""],Get:[26,3,1,""],GetNumCandidates:[26,3,1,""],IsEmpty:[26,3,1,""],LinearCombine:[26,3,1,""],Set:[26,3,1,""]},"promod3.modelling.ScoringGapExtender":{Extend:[24,3,1,""]},"promod3.modelling.ScoringWeights":{GetAllAtomScoringKeys:[26,4,1,""],GetAllAtomWeights:[26,4,1,""],GetBackboneScoringKeys:[26,4,1,""],GetBackboneWeights:[26,4,1,""],GetSequenceProfileScoresKey:[26,4,1,""],GetStemRMSDsKey:[26,4,1,""],GetStructureProfileScoresKey:[26,4,1,""],GetWeights:[26,4,1,""],SetAllAtomScoringKeys:[26,4,1,""],SetBackboneScoringKeys:[26,4,1,""],SetSequenceProfileScoresKey:[26,4,1,""],SetStemRMSDsKey:[26,4,1,""],SetStructureProfileScoresKey:[26,4,1,""],SetWeights:[26,4,1,""]},"promod3.modelling.ShiftExtension":{Extend:[24,3,1,""]},"promod3.modelling.SidechainReconstructionData":{disulfid_bridges:[31,5,1,""],env_pos:[31,5,1,""],is_c_ter:[31,5,1,""],is_n_ter:[31,5,1,""],loop_lengths:[31,5,1,""],loop_start_indices:[31,5,1,""],rotamer_res_indices:[31,5,1,""]},"promod3.modelling.SidechainReconstructor":{AttachEnvironment:[31,3,1,""],Reconstruct:[31,3,1,""]},"promod3.modelling.SoftSampler":{Initialize:[29,3,1,""],ProposeStep:[29,3,1,""]},"promod3.modelling.StructuralGap":{Copy:[24,3,1,""],ExtendAtCTerm:[24,3,1,""],ExtendAtNTerm:[24,3,1,""],GetChain:[24,3,1,""],GetChainIndex:[24,3,1,""],GetChainName:[24,3,1,""],GetLength:[24,3,1,""],IsCTerminal:[24,3,1,""],IsNTerminal:[24,3,1,""],IsTerminal:[24,3,1,""],ShiftCTerminal:[24,3,1,""],after:[24,5,1,""],before:[24,5,1,""],full_seq:[24,5,1,""],length:[24,5,1,""],seq:[24,5,1,""]},"promod3.scoring":{AllAtomClashScorer:[33,2,1,""],AllAtomInteractionScorer:[33,2,1,""],AllAtomOverallScorer:[33,2,1,""],AllAtomPackingScorer:[33,2,1,""],AllAtomScorer:[33,2,1,""],BackboneOverallScorer:[35,2,1,""],BackboneScoreEnv:[34,2,1,""],BackboneScorer:[35,2,1,""],CBPackingScorer:[35,2,1,""],CBetaScorer:[35,2,1,""],ClashScorer:[35,2,1,""],ConstraintFunction:[34,2,1,""],ContactFunction:[34,2,1,""],DensityScorer:[35,2,1,""],DiscoContainer:[34,2,1,""],HBondScorer:[35,2,1,""],LoadAllAtomInteractionScorer:[33,6,1,""],LoadAllAtomPackingScorer:[33,6,1,""],LoadCBPackingScorer:[35,6,1,""],LoadCBetaScorer:[35,6,1,""],LoadDefaultAllAtomOverallScorer:[33,6,1,""],LoadDefaultBackboneOverallScorer:[35,6,1,""],LoadHBondScorer:[35,6,1,""],LoadReducedScorer:[35,6,1,""],LoadSSAgreementScorer:[35,6,1,""],LoadTorsionScorer:[35,6,1,""],PairwiseFunction:[34,2,1,""],PairwiseFunctionType:[34,2,1,""],PairwiseScorer:[35,2,1,""],ReducedScorer:[35,2,1,""],SSAgreementScorer:[35,2,1,""],TorsionScorer:[35,2,1,""]},"promod3.scoring.AllAtomInteractionScorer":{Load:[33,4,1,""],LoadPortable:[33,4,1,""],Save:[33,3,1,""],SavePortable:[33,3,1,""],SetEnergy:[33,3,1,""]},"promod3.scoring.AllAtomOverallScorer":{"__getitem__":[33,3,1,""],"__setitem__":[33,3,1,""],AttachEnvironment:[33,3,1,""],CalculateLinearCombination:[33,3,1,""],Contains:[33,3,1,""],Get:[33,3,1,""]},"promod3.scoring.AllAtomPackingScorer":{Load:[33,4,1,""],LoadPortable:[33,4,1,""],Save:[33,3,1,""],SavePortable:[33,3,1,""],SetEnergy:[33,3,1,""]},"promod3.scoring.AllAtomScorer":{AttachEnvironment:[33,3,1,""],CalculateScore:[33,3,1,""],CalculateScoreProfile:[33,3,1,""]},"promod3.scoring.BackboneOverallScorer":{"__getitem__":[35,3,1,""],"__setitem__":[35,3,1,""],AttachEnvironment:[35,3,1,""],Calculate:[35,3,1,""],CalculateLinearCombination:[35,3,1,""],Contains:[35,3,1,""],Get:[35,3,1,""]},"promod3.scoring.BackboneScoreEnv":{AddPairwiseFunction:[34,3,1,""],ApplyPairwiseFunction:[34,3,1,""],ClearEnvironment:[34,3,1,""],Copy:[34,3,1,""],GetSeqres:[34,3,1,""],SetEnvironment:[34,3,1,""],SetInitialEnvironment:[34,3,1,""],SetMap:[34,3,1,""],SetPsipredPrediction:[34,3,1,""]},"promod3.scoring.BackboneScorer":{AttachEnvironment:[35,3,1,""],CalculateScore:[35,3,1,""],CalculateScoreProfile:[35,3,1,""]},"promod3.scoring.CBPackingScorer":{Load:[35,4,1,""],LoadPortable:[35,4,1,""],Save:[35,3,1,""],SavePortable:[35,3,1,""],SetEnergy:[35,3,1,""],UseClassicMode:[35,3,1,""],UseIncludeEnvMode:[35,3,1,""]},"promod3.scoring.CBetaScorer":{Load:[35,4,1,""],LoadPortable:[35,4,1,""],Save:[35,3,1,""],SavePortable:[35,3,1,""],SetEnergy:[35,3,1,""]},"promod3.scoring.DiscoContainer":{AddStructuralInfo:[34,6,1,""],AttachConstraints:[34,6,1,""]},"promod3.scoring.HBondScorer":{Load:[35,4,1,""],LoadPortable:[35,4,1,""],Save:[35,3,1,""],SavePortable:[35,3,1,""],SetEnergy:[35,3,1,""]},"promod3.scoring.PairwiseFunction":{Score:[34,3,1,""]},"promod3.scoring.ReducedScorer":{Load:[35,4,1,""],LoadPortable:[35,4,1,""],Save:[35,3,1,""],SavePortable:[35,3,1,""],SetEnergy:[35,3,1,""]},"promod3.scoring.SSAgreementScorer":{Load:[35,4,1,""],LoadPortable:[35,4,1,""],Save:[35,3,1,""],SavePortable:[35,3,1,""],SetScore:[35,3,1,""]},"promod3.scoring.TorsionScorer":{Load:[35,4,1,""],LoadPortable:[35,4,1,""],Save:[35,3,1,""],SavePortable:[35,3,1,""],SetEnergy:[35,3,1,""]},"promod3.sidechain":{AAToRotID:[44,3,1,""],BBDepRotamerLib:[45,2,1,""],DisulfidRawScore:[37,3,1,""],DisulfidScore:[37,3,1,""],FRMRotamer:[42,2,1,""],FRMRotamerGroup:[42,2,1,""],Frame:[38,2,1,""],FrameResidue:[38,2,1,""],LoadDunbrackLib:[41,3,1,""],LoadPenultimateLib:[41,3,1,""],Particle:[42,2,1,""],RRMRotamer:[42,2,1,""],RRMRotamerGroup:[42,2,1,""],ReadDunbrackFile:[41,3,1,""],ResolveCysteins:[37,3,1,""],RotamerGraph:[39,2,1,""],RotamerID:[44,2,1,""],RotamerLib:[45,2,1,""],RotamerLibEntry:[45,2,1,""],SCWRLRotamerConstructor:[43,2,1,""],SidechainParticle:[42,2,1,""],SubrotamerOptimizer:[46,3,1,""],TLCToRotID:[44,3,1,""]},"promod3.sidechain.BBDepRotamerLib":{AddRotamer:[45,3,1,""],Load:[45,4,1,""],LoadPortable:[45,4,1,""],MakeStatic:[45,3,1,""],QueryLib:[45,3,1,""],Save:[45,3,1,""],SavePortable:[45,3,1,""],SetInterpolate:[45,3,1,""]},"promod3.sidechain.FRMRotamer":{"__getitem__":[42,3,1,""],"__len__":[42,3,1,""],AddFrameEnergy:[42,3,1,""],AddSubrotamerDefinition:[42,3,1,""],ApplyOnResidue:[42,3,1,""],GetActiveSubrotamer:[42,3,1,""],GetFrameEnergy:[42,3,1,""],GetInternalEnergy:[42,3,1,""],GetInternalEnergyPrefactor:[42,3,1,""],GetNumSubrotamers:[42,3,1,""],GetProbability:[42,3,1,""],GetSelfEnergy:[42,3,1,""],GetSubrotamerDefinition:[42,3,1,""],GetTemperature:[42,3,1,""],SetActiveSubrotamer:[42,3,1,""],SetFrameEnergy:[42,3,1,""],SetInternalEnergy:[42,3,1,""],SetInternalEnergyPrefactor:[42,3,1,""],SetProbability:[42,3,1,""],SetTemperature:[42,3,1,""],ToFrameResidue:[42,3,1,""],ToRRMRotamer:[42,3,1,""]},"promod3.sidechain.FRMRotamerGroup":{"__getitem__":[42,3,1,""],"__len__":[42,3,1,""],AddFrameEnergy:[42,3,1,""],ApplyOnResidue:[42,3,1,""],ApplySelfEnergyThresh:[42,3,1,""],Merge:[42,3,1,""],SetFrameEnergy:[42,3,1,""]},"promod3.sidechain.FrameResidue":{"__getitem__":[38,3,1,""],"__len__":[38,3,1,""]},"promod3.sidechain.Particle":{AddLonePair:[42,3,1,""],GetCharge:[42,3,1,""],GetName:[42,3,1,""],GetParticleType:[42,3,1,""],GetPos:[42,3,1,""],IsHBondAcceptor:[42,3,1,""],IsHBondDonor:[42,3,1,""],PairwiseEnergy:[42,3,1,""],SetPolarDirection:[42,3,1,""]},"promod3.sidechain.RRMRotamer":{"__getitem__":[42,3,1,""],"__len__":[42,3,1,""],AddFrameEnergy:[42,3,1,""],ApplyOnResidue:[42,3,1,""],GetFrameEnergy:[42,3,1,""],GetInternalEnergy:[42,3,1,""],GetInternalEnergyPrefactor:[42,3,1,""],GetProbability:[42,3,1,""],GetSelfEnergy:[42,3,1,""],SetFrameEnergy:[42,3,1,""],SetInternalEnergy:[42,3,1,""],SetInternalEnergyPrefactor:[42,3,1,""],SetProbability:[42,3,1,""],ToFrameResidue:[42,3,1,""]},"promod3.sidechain.RRMRotamerGroup":{"__getitem__":[42,3,1,""],"__len__":[42,3,1,""],AddFrameEnergy:[42,3,1,""],ApplyOnResidue:[42,3,1,""],ApplySelfEnergyThresh:[42,3,1,""],Merge:[42,3,1,""],SetFrameEnergy:[42,3,1,""]},"promod3.sidechain.RotamerGraph":{AStarSolve:[39,3,1,""],ApplyDEE:[39,3,1,""],ApplyEdgeDecomposition:[39,3,1,""],CreateFromFRMList:[39,4,1,""],CreateFromRRMList:[39,4,1,""],GetActiveEdges:[39,3,1,""],GetActiveRotamers:[39,3,1,""],GetEdges:[39,3,1,""],GetNumActiveEdges:[39,3,1,""],GetNumActiveNodes:[39,3,1,""],GetNumActiveRotamers:[39,3,1,""],GetNumEdges:[39,3,1,""],GetNumNodes:[39,3,1,""],GetNumRotamers:[39,3,1,""],GetPairwiseEnergies:[39,3,1,""],GetSelfEnergies:[39,3,1,""],MCSolve:[39,3,1,""],Prune:[39,3,1,""],Reset:[39,3,1,""],TreeSolve:[39,3,1,""]},"promod3.sidechain.RotamerLib":{AddRotamer:[45,3,1,""],Load:[45,4,1,""],LoadPortable:[45,4,1,""],MakeStatic:[45,3,1,""],QueryLib:[45,3,1,""],Save:[45,3,1,""],SavePortable:[45,3,1,""]},"promod3.sidechain.RotamerLibEntry":{FromResidue:[45,4,1,""],IsSimilar:[45,3,1,""],SimilarDihedral:[45,3,1,""],chi1:[45,5,1,""],chi2:[45,5,1,""],chi3:[45,5,1,""],chi4:[45,5,1,""],probability:[45,5,1,""],sig1:[45,5,1,""],sig2:[45,5,1,""],sig3:[45,5,1,""],sig4:[45,5,1,""]},"promod3.sidechain.SCWRLRotamerConstructor":{AssignInternalEnergies:[43,3,1,""],ConstructBackboneFrameResidue:[43,3,1,""],ConstructFrameResidue:[43,3,1,""],ConstructFrameResidueHeuristic:[43,3,1,""],ConstructRRMRotamerGroup:[43,3,1,""],ConstructSidechainFrameResidue:[43,3,1,""]},"test_actions.ActionTestCase":{RunAction:[1,3,1,""],RunExitStatusTest:[1,3,1,""],pm_action:[1,5,1,""],pm_bin:[1,5,1,""],testPMExists:[1,3,1,""]},promod3:{SetCompoundsChemlib:[11,6,1,""],core:[8,1,0,"-"],loop:[18,1,0,"-"],modelling:[25,1,0,"-"],scoring:[36,1,0,"-"],sidechain:[40,1,0,"-"]},test_actions:{ActionTestCase:[1,2,1,""]}},objnames:{"0":["cmake","command","CMake command"],"1":["py","module","Python module"],"2":["py","class","Python class"],"3":["py","method","Python method"],"4":["py","staticmethod","Python static method"],"5":["py","attribute","Python attribute"],"6":["py","function","Python function"]},objtypes:{"0":"cmake:command","1":"py:module","2":"py:class","3":"py:method","4":"py:staticmethod","5":"py:attribute","6":"py:function"},terms:{"10a":31,"1akia":21,"1crn":[16,18,20,21,25,26,27,29,30,31,36,40],"1crn_cut":[25,26,30],"1crna":[21,26],"1ey":5,"1eye_rec":5,"2010dunbracklib":32,"20a":31,"2b1":2,"2jlp":0,"30a":31,"3x3":6,"__doc__":[7,9],"__getitem__":[21,33,35,38,42],"__init__":[1,5,9,12],"__len__":[17,21,38,42],"__main__":[1,5],"__name__":[1,5],"__setitem__":[21,33,35],"_data":32,"_name":4,"_run":[1,4],"_xml":4,"boolean":7,"break":[4,5,12],"byte":[32,39],"case":[0,1,5,12,17,21,22,24,27,29,30,31,32,35,37,40,42,43,45],"char":[17,32],"class":[],"const":32,"default":[],"enum":44,"export":[5,16,39],"final":[5,14,21,23,25,26,30,34,35,36,37,39,40,42],"float":[6,16,17,20,21,22,23,24,26,27,28,29,30,31,32,33,34,35,37,39,42,43,45,46],"function":[],"import":[0,1,5,7,9,12,14,16,17,18,20,21,22,25,26,27,29,30,31,36,40,42,43],"int":[1,6,7,10,16,17,19,20,21,22,23,24,26,27,28,29,30,31,32,33,34,35,38,39,42,43,45,46],"long":30,"new":[1,5,9,12,13,16,17,20,21,24,26,27,29,30,31,32,34,35,40,42],"null":21,"public":[5,32,41],"return":[1,5,6,7,9,10,11,16,17,19,20,21,22,23,24,26,27,28,29,30,31,32,33,34,35,37,38,39,41,42,43,44,45],"s\u00f6ding":21,"short":[5,12,32],"static":[5,10,16,20,21,22,26,31,32,33,35,39,41,45],"super":40,"switch":[5,12,34],"throw":[1,32,35,40,41],"true":[1,7,9,10,16,17,18,19,20,21,24,26,27,28,29,30,31,32,33,35,37,40,43],"try":[1,5,14,24,30,32,45],"void":32,"while":[1,4,5,10,16,20,30,32],aa1:35,aa2:35,aa_aft:21,aa_befor:21,aa_clash:[30,33],aa_interact:[30,33],aa_pack:[30,33],aa_packing_scor:32,aa_relax_test:27,aa_res_idx:43,aa_scor:32,aa_with_rotam:40,aaa1:33,aaa2:33,aaa:[16,33],aaaaaaaa:17,aaaaggggggggggggggggggggaaaaaa:30,aah:16,aatorotid:44,abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz:30,abil:12,abl:[2,5],abort:[5,27,30,39],about:[1,4,5,21,30,39],abov:[0,1,5,9,12,17,23,24,26,30,32,44,45],absolut:4,academ:5,accept:[9,26,27,29,30,31,32,39],acceptor:[35,43],access:[4,5,16,17,21,22,26,30,33,34,35,42,44],accessibili:21,accessibl:21,accord:[12,16,17,20,21,22,23,24,26,29,30,31,35,37,39,40,42,43,45],accur:[23,34],accuraci:[23,27],achiev:[12,39],acknowledg:5,across:[1,45],act:27,action_nam:12,action_unit_test:1,actiontest:1,activ:[9,10,12,35,37,39,42,46],active_internal_energi:46,actual:[5,9,12,17,21,29,30,31,34,35,42,45],actual_posit:29,actual_step:29,adapt:[5,20,27,29,30,41],add:[1,2,4,5,9,14,16,21,22,26,27,30,31,33,34,35,37,40,42,43],add_argu:7,add_custom_target:5,add_doc_depend:4,add_doc_sourc:[4,5],add_subdirectori:5,addalign:9,addcarestraint:27,addcbrestraint:27,addcoordin:21,addcrestraint:27,addfrag:21,addfragmentinfo:26,addframeenergi:42,addharmonicangl:20,addharmonicbond:20,addharmonicimprop:20,addit:[4,7,9,10,12,17,18,20,21,28,30,32,43],addition:[1,4,12,16,20,43],addljpair:20,addlonepair:42,addnrestraint:27,addorestraint:27,addpairwisefunct:34,addperiodicdihedr:20,addperiodicimprop:20,address:32,addrotam:45,addseqidparamet:21,addseqsimparamet:[18,21],addsequenceprofileparamet:21,addssagreeparamet:21,addstructur:9,addstructuralinfo:34,addstructureprofileparamet:21,addsubrotamerdefinit:42,addtorsionprobabilityparamet:21,addureybradleyangl:20,admir:5,advanc:23,advantag:20,advic:[5,12],advis:21,affect:[5,17,44],after:[1,2,4,5,9,12,16,17,20,21,22,24,26,27,29,30,32,34,39,41,43,45],after_c_stem:17,afterward:[5,30],again:[2,5,23],against:[33,35],agg:22,agglom:26,ago:1,agreement:[21,23,35],agress:[2,39],ala:[17,22,27,40,44],ala_cb:16,ala_h1:16,ala_h:16,alanin:44,alg:[18,21],algorithm:[],alia:24,align:[0,9,14,21,23,25,30,34],alignedcuboid:17,alignmenthandl:[23,30,34],alignmentlist:[0,9,30],all:[],all_atom:[16,17,20,34,35,42,43],all_atom_env:16,all_atom_po:[16,43],all_atom_scor:30,all_atom_scorer_env:30,all_atom_sidechain_env:30,all_po:[16,20,27],all_scor:26,allatom:[27,30,31],allatomclashscor:[],allatominteractionscor:[],allatomoverallscor:[],allatompackingscor:[],allatomrelax:[20,27],alloc:21,allow:[0,2,5,7,12,17,21,22,23,26,29,30,32,33,35],allow_multitempl:9,allow_prepro_ci:17,almost:4,aln:[0,23,25,26,30,34],aln_sourc:9,alon:7,along:[1,5,21],alot:5,alpha:[6,17,35,40],alpha_bin:35,alreadi:[1,4,5,12,17,20,21,23,26,30,31,33,34,35,39,42,43,45,46],also:[1,2,4,5,7,12,21,22,23,26,27,28,29,30,31,35,37,38,39,41,43,45],alter:29,altern:[4,5,29,30,35,41,43],alwai:[0,1,5,12,24,29,30,32],amber:[16,30],ambig:45,ambigu:45,aminoacid:[16,17,20,22,35,44,45],aminoacidatom:[16,33],aminoacidhydrogen:16,aminoacidlookup:[16,20],among:26,amount:[14,23,45],analysi:[21,27,28],analyt:[26,45],anchor:[6,16,43],ancient:11,ang:34,angl:[],angle_bin:35,angle_bin_s:21,angle_force_const:20,angle_four:6,angle_on:6,angle_thre:6,angle_two:6,angstrom:[21,27],ani:[0,1,4,5,9,10,11,14,16,17,20,21,22,24,26,28,29,30,31,32,33,34,35,38,39,40,42,43],anneal:[26,29,39],announc:[1,5],anoth:[4,10,17,24,27,30,31,37],anymor:39,anyon:[5,12],anyth:[0,2,5,9,10,11,26,27,31,33,35,36],anywai:5,anywher:12,apart:[1,26,30,31,33,35],append:[0,9,17,21,22,30,40],appli:[7,11,12,17,24,26,27,29,30,31,37,39,40,42],applic:[1,27],applyccd:26,applyde:39,applyedgedecomposit:39,applyk:26,applyonresidu:[40,42],applypairwisefunct:[34,35],applysd:20,applyselfenergythresh:[40,42],applytransform:17,approach:[2,21,23,30,32,37,39,40,43],appropri:[21,22,30,32,35,43],approx:30,approxim:[20,39,42],arbitrari:[16,21,37],arbitrarili:29,arg:[1,4,9,44],arg_ca:16,arg_hd3:16,arg_sorted_scor:26,arginin:44,argpars:9,argument:[],argumentpars:9,argv:9,around:[1,4,5,6,12,17,26,27,30,33,35],arrai:[0,5,32],artifici:35,ascend:24,ask:5,asn:44,asn_c:16,asn_hb2:16,asp:[16,42,44,45],asp_ha:16,asp_o:16,asparagin:44,aspart:[44,45],ass:29,assembl:9,assemblepars:9,assertequ:5,assess:[33,34],assign:[17,21,26,29,33,35,41,43,46],assigndssp:21,assigninternalenergi:43,assignsecstruct:21,associ:[24,38],assum:[1,4,5,20,21,27,30,32,34,35,37,39],assur:37,astar:39,astarsolv:39,atom:[],atom_idx:[16,20],atom_nam:[16,20],atomhandl:42,atomseq:21,attach:[0,4,5,9,16,20,23,24,30,31,33,34,35,36],attach_view:9,attachconstraint:34,attachenviron:[26,27,29,31,33,35,36],attachview:[25,26,30],attent:[1,12],attribut:[5,9,30,31,45],autom:[2,4],automat:[1,5,7,10,12,21,25,26,32,39,45],automatis:5,avaibl:43,avail:[1,2,5,11,12,14,20,29,40],availabl:5,averag:[21,26,34,37],avg:21,avg_sampling_per_posit:23,avoid:[7,11,27,29],awai:[12,31,42],awar:5,awesom:[1,5],axi:[6,17,21],back:[1,12,20,29,39],backbon:[],backbone_scor:[26,30],backbone_scorer_env:30,backbonelist:[],backboneoverallscor:[],backbonerelax:[27,30],backbonescor:[],backbonescoreenv:[],backbonescoreenvlisten:5,background:[2,31],backrub:17,backward:32,bad:20,base:[],base_target:4,bashrc:5,basi:[4,5,12,21,27,29,42],basic:[1,2,5,7,12,22,29,30,40,42,45],bb_list:[14,16,17,18,21,24,26,27,29,30,34,35,36],bb_list_on:23,bb_list_two:23,bb_re:36,bb_score:26,bb_seq:36,bbdeprotamerlib:[31,32,41,43,45],becaus:[5,12,16,30,34,39],becom:45,been:[2,12,19,21,26,27,33,35,37,39,41,45],befor:[1,4,5,9,12,17,20,21,22,24,26,27,29,30,31,32,33,34],begin:[1,5,16,17,29,34],behav:1,behavior:33,behaviour:[9,34,45],behind:5,bell:5,belong:[4,12,16,17,21,24,26,29,30,31,33,34,35,38,42,43],belov:21,below:[0,5,16,20,21,23,26,27,31,32,33,35,37],below_thre:21,besid:[2,4,9,39],best:[4,26,30,37],best_candid:26,beta:[6,17,28,35],beta_bin:35,better:[20,26,29,30,33,35],between:[1,9,17,20,21,23,24,26,27,29,30,31,32,33,34,35,36,37,38,39,42,43,45],beyond:9,big:[20,32],bilinearli:45,bin:[1,5,12,14,21,22,33,35,45],bin_siz:45,binari:[],bind:[21,30],bins_per_dimens:22,bioinformat:21,biol:21,biopolym:21,bit:[1,2,5,12,26,30],blank:5,blosum62:[18,21,23,34],bond:[],bond_force_const:20,bond_length:[6,20],bool:[1,5,7,9,10,16,17,19,20,21,24,26,27,28,29,30,31,32,33,34,35,37,39,42,43,45],boost:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],boost_librari:4,boost_root:2,both:[16,24,30,37,40,45],bound:[16,20,23,26,42],bradlei:20,branch:[],branchnam:12,brew:4,bridg:[19,20,27,30,31],briefli:12,bring:5,broken:1,broyden:30,bug:[5,12],build_disulfid:31,builder:2,buildfromrawmodel:[25,30],buildrawmodel:[0,25,26,30],buildsidechain:30,buildup:[40,42],built:[4,20,21,34,38,43],bunch:[1,9,12],bytecod:1,c_coord:6,c_num:24,c_po:[6,17,35,43],c_stem:[6,18,21,24,26,27,29],c_stem_idx:[],c_stem_psi:29,c_str:32,c_ter:[27,43],ca_coord:6,ca_pairwise_funct:34,ca_po:[6,17,35,43],ca_pos_on:37,ca_pos_two:37,ca_posit:37,ca_rmsd:[18,21],cach:[2,21,23],calcul:[5,17,21,22,23,26,27,29,33,34,35,37,38,39,42,43],calculateallatomscor:26,calculatebackbonescor:26,calculateenergi:35,calculatelinearcombin:[26,29,33,35],calculatescor:[33,35,36],calculatescoreprofil:[33,35],calculatesequenceprofilescor:26,calculatestemrmsd:26,calculatestructureprofilescor:26,calculatesurfac:21,call:[1,2,4,5,7,9,10,11,12,16,20,21,22,24,26,29,30,31,32,33,35,39,42,43,45],callabl:[9,12],calpha:30,calul:22,came:5,can:[],cand:30,candid:[],cannot:[0,5,9,20,21,22,24,30,32,33,35,41,44,45],canutescu2003:27,canutescu2003b:[33,37],canutescu:[27,37],cap:39,capabl:[19,25,29],captur:1,carbon:[6,17,42,43],carbonyl:[42,43],care:[0,5,21,26,27,30,32,35,39],carlo:[23,26,29,30,39],carmsd:[17,18,21],carri:[5,7],cast:32,categori:4,caus:[12,28],caution:16,cb_pack:[23,30,35],cb_packing_scor:32,cb_pairwise_funct:34,cb_po:[17,43],cb_pos_on:37,cb_pos_two:37,cb_posit:37,cbeta:[23,26,29,30,35,36],cbeta_scor:[32,36],cbetaenvlisten:5,cbetascor:[],cbpackingscor:[],ccd:[],ccdcloser:29,center:28,central:[17,22,35],centroid:26,certain:[1,2,4,5,12,21,22,23,24,30,32,33,35,39],certainli:1,ch1particl:42,ch2particl:42,ch3particl:42,chain:[],chain_id:21,chain_idx:[5,16,21,26,29,30,31,33,34,35],chain_idx_list:31,chain_idx_on:34,chain_idx_two:34,chain_index:[21,29,33,35],chain_indic:34,chain_nam:[21,30],chainhandl:[16,17,24],chainid:0,chainview:21,chakravarti:21,chakravarty1999:21,chanact:30,chanc:[5,30,39],chang:[1,4,5,12,16,22,24,27,29,30,31,35,39],change_frequ:[29,39],chapter:[24,28],charact:[9,21],charg:[5,16,20,27,42,43],charmm:[16,20,30],check:[],check_io:32,check_xml:5,checkbasetyp:32,checkfinalmodel:30,checkmagicnumb:32,checkout:[5,12],checktypes:32,chemic:[11,16,33],chi1:45,chi2:45,chi3:45,chi4:45,chi:45,child:9,childclass:1,chmod:5,choos:[26,29,35],chosen:[0,9,29,30],cif:[0,9],ciiipgatcpgdyan:30,circumv:43,citat:27,clash:[23,26,27,29,30,33,35,36,37,40],clash_scor:36,clash_thresh:30,clashscor:[],classic:[35,41],clean:[2,5,12],cleanli:32,clear:[10,16,17,26,30,34],clearenviron:[16,34],cleargap:24,clearli:[],clearpo:16,clearresidu:16,clever:[],clip:9,clone:5,close:[12,14,17,21,26,27,29,30,31,35,37],closed_posit:29,closegap:30,closelargedelet:30,closer:[],closesmalldelet:[27,30],closest:21,closur:[27,30],clustal:[0,9],cluster:[23,26,32,34],cluster_thresh:[23,34],clutter:[1,5],cmake:[],cmake_support:[4,5,12],cmakecach:2,cmakelist:[1,2,4,5,12],cname:21,coars:5,code:[],codetest:[4,5],coil:[19,23],collect:[7,10,16,23,34],column:[21,23],combin:[20,21,22,23,26,29,30,33,35,37,45],come:[1,4,5,7,9,30,31,39],command:[],commandlin:9,comment:12,commerci:5,commit:[5,12],common:[5,9,23],commonli:[5,14,25,26,35],comp_lib:43,compar:[5,17,18,21,26,27,45],comparison:[21,30,33,45],compat:[12,20,32],compensatori:17,compil:[1,2,4,5,10,12,14,32,47],complain:1,complaint:12,complement:21,complet:[10,12,17,20,21,27,29,30,31,45],complex:[5,12,31,37,42,46],compon:[11,21,28,35,39],compound:[11,43],compoundlib:43,compress:7,comput:[5,21,26,28,33,35],concaten:16,concept:5,concern:5,condit:[5,22],conf:[2,5],confid:[21,35],config:[4,5],config_head:4,configur:[2,5,12,26,39,45],conflict:12,conform:[21,27,29,39,40,45],connect:[4,12,16,20,21,26,39],conop:[16,17,20,22,35,43,44],conquer:5,consecut:[22,35],conserv:[14,24],consid:[4,5,10,12,16,17,21,22,23,26,27,29,30,31,33,34,35,37,39,41,43,45],consider_all_nod:39,consider_hydrogen:42,consider_ligand:31,consist:[5,16,20,21,23,24,26,27,29,30,31,32,34,37,42,45],constant:[20,27,33,35,46],constraint:[9,21,27,34],constraintfunct:34,construct:[],constructatompo:6,constructbackboneframeresidu:[40,43],constructcbetapo:6,constructcterminaloxygen:6,constructetd:39,constructframeresidu:43,constructframeresidueheurist:43,constructfrmrotamergroup:[40,43],constructor:[],constructrrmrotamergroup:43,constructsidechainframeresidu:43,contact:34,contactfunct:34,contain:[0,1,2,4,5,6,7,9,12,16,17,19,20,21,22,23,26,29,30,31,33,34,35,36,37,38,40,41,42,43,45],content:[5,8,13,15,18,21,36,40,47],contigu:[20,31,32],continu:[1,16,24,27,40],contrast:38,contribut:[],control:[0,5,26,29,31,34,39,42,45,46],conveni:[],convent:[1,44],converg:[23,26,27,29],convers:32,convert:[4,17,20,21,22,30,32,33,35,45,46],convert_module_data:4,convertbasetyp:32,cooler:[],cooling_factor:[29,39],coord:26,coord_info:21,coordin:[6,21,26,27,30,40],coordinfo:21,cope:12,copi:[2,4,5,12,14,16,17,24,26,30,34],core:[],correct:20,correctli:30,correl:35,correspond:[12,16,17,20,21,22,26,32,33,45],corrupt:[16,34],could:[1,4,5,9,12,20,21,30,36],count:[10,24,29,30,33,35],countenclosedgap:24,countenclosedinsert:24,counterpart:[35,43],coupl:[1,5,12,30],cours:5,coutsia:27,cover:[1,5,8,10,16,20,21,23,25,29],coverag:30,cparticl:42,cpp:4,cpr:[44,45],cpu:[14,20,30],cpu_platform_support:20,crambin:[21,26,29],crash:40,createalign:[26,30],createentityfromview:[31,40],createfromfrmlist:[39,40],createfromrrmlist:39,createfullview:[25,26,30],createsequ:[26,30],creation:[20,27],creator:[20,27],criteria:31,criterion:[29,39],criterium:26,croak:12,cross:35,crucial:5,cterminalclos:29,cumul:43,current:[2,4,5,10,12,16,17,20,21,26,29,30,32,34,35,39,42,43,46],custom:[5,21,29,30,31,32,44],cutoff:[19,20,26,27,31,33,35],cycl:24,cyclic:[26,27],cyd:[44,45],cyh:[44,45],cys_hb3:16,cys_sg:16,cystein:[20,31,37,40,44],d_bin:35,dai:7,dampen:20,dare:4,dat:[21,32],data1:4,data2:4,data:[],data_:32,data_gener:32,databas:[],databs:21,date:12,dbg:5,dcmake_install_prefix:2,deactiv:39,dead:39,deal:[30,31],debug:[5,16],decent:11,decid:[5,27],decis:22,declar:[4,5,12],decod:9,decompos:39,decomposit:[23,39],decreas:29,dedic:[4,5,12],dee:39,deep:[17,30],def:[1,5,16,30],def_angl:16,defin:[],definem:5,degre:[17,21,22,41],delet:[0,2,5,17,30,42],deliv:[1,21,29,30],delta_scor:29,demand:30,demonstr:21,densiti:[17,27,30,34,35,41],densityscor:[],dep1:4,dep2:4,dep:4,dependency1:4,dependency2:4,depends_on:4,depth:21,deriv:[1,21,41],descend:30,descent:[26,27],describ:[4,7,13,16,17,21,24,25,27,28,32,33,35,37,39,40,42,45,47],descript:[0,9,12,29,37,45],design:[1,41],desir:[6,14,20,26,27,29,30,33,35],despit:[],detail:[0,6,9,12,20,21,22,26,28,29,30,33,35,45],detect:[],determin:[5,7,20,26,29,34,35],determinist:23,deuterium:30,develop:[],deviat:[17,28,29,41,45],devot:8,dict:[4,23,26,28,29,33,35],dictionari:[4,9,11,21,28],did:[5,26,30],differ:[1,2,4,5,11,12,16,21,23,24,26,30,33,35,39,40,44,45],dihedr:[],dihedral_angl:17,dihedral_bin:35,dihedral_idx:45,dihedral_pair:22,dimens:22,dir:[4,5],direct:[5,17,19,35,42,43],directli:[5,21,26,30,31,34,37,41,42,43,44,45],directori:[],dirti:1,dirtyccdclos:29,disabl:[1,12],disable_doctest:2,disable_document:2,disable_linkcheck:2,discocontain:34,discret:[33,35],discuss:21,disk:[5,20,23,33,35,45],displai:[7,9,10],dissimilar:23,dist:35,dist_bin:35,dist_bin_s:21,distanc:[6,17,21,23,26,30,31,33,34,35],distance_thresh:23,distant:34,distinct:[16,31],distribut:[1,5,20,21,22,29,32,33,35,41,45],disulfid:[],disulfid_bridg:[20,31],disulfid_score_thresh:31,disulfidrawscor:37,disulfidscor:[31,37],dive:[12,30],diverg:5,divers:[21,23],divid:23,dng:14,doc:[2,4,5,12],docstr:9,doctest:[2,5,12],document:[],doe:[1,4,5,6,7,9,11,12,17,21,25,26,30,32,34,39,41,43],doesn:[5,12,24,27,29,45],domain:23,domin:39,don:[2,26,30,43],done:[1,5,7,9,12,18,20,22,26,30,32,33],donor:35,dont_write_bytecod:1,dost_root:2,doubt:9,down:[9,17,21,29],dpm3_runtime_profiling_level:10,draw:[17,22,29],drawback:5,drawn:[22,29],drawphigivenpsi:22,drawpsigivenphi:22,drop:5,dssp:[21,30,35],dssp_state:35,due:[21,26,27,30,37,41],dump:45,dunbrack:[27,31,37,40,41],dure:[1,16,27,30,32,38,45],dynam:45,e_cut:39,e_thresh:[30,39],e_tresh:39,each:[0,5,9,10,16,17,20,21,22,23,24,26,28,29,30,31,32,33,35,39],earlier:2,easi:5,easier:[1,5],easili:[4,12,30],echo:5,edg:39,edge_idx:39,ediff:39,editor:1,educ:5,effect:[4,5,20,31,35,37,39],effici:[16,21,23,29],egg:21,eigen3_include_dir:2,eigen:2,either:[0,5,9,12,16,17,22,24,26,27,29,30,31,32,33,34,35,38,42,44,45],elabor:5,electrostat:[20,27],element:[1,16,17,21,23,26,28,32,34,37,39],elenumerador:[],elimin:39,els:[5,12,31,32],emerg:1,emploi:12,empti:[5,7,9,17,21,23,26,30,42],enabl:[1,2,7,9,11,20],enable_mm:2,enable_ss:2,enclos:[24,30],encod:0,encount:[24,29],end:[0,1,2,4,5,7,9,12,16,17,21,23,24,26,30,39],end_resnum:30,end_transl:4,endian:32,energi:[5,14,20,27,29,30,33,35,37,38,39,42,43,46],enforc:[16,21,26,29,30,31,34],enough:[5,12,20,21,30,32,34],ensur:[2,5,14,26,30,32],ent:[0,9,16,20,28,31,36],ent_seq:36,enter:38,entiti:[5,9,10,16,17,28,30,36,40],entityhandl:[9,16,17,28,30,31,34],entityview:[21,22,23,28,30],entri:[],enumer:[5,16,20,21,26,34,39,40,42,43,44],env:[5,14,16,20,27,28,30,31,33,34,35,36],env_po:[27,31],env_structur:[16,34],environ:[],epsilon:[20,31,39,46],equal:[29,33,35,37,43],equidist:45,equival:30,error:[0,7,9,10,30,32,35],especi:23,estim:[21,28,29,35,37,39,41],etc:[1,5,12,17,26,34],evalu:[],evaluategromacsposrul:6,even:[2,5,17,20,24,30,39],event:23,eventu:9,ever:[12,29],everi:[0,1,5,16,17,21,22,23,26,27,29,30,31,33,34,35,37,39,42,43,45,46],everyth:[],evolut:21,exact:32,exactli:[2,21,23,26,30,34,37,43,44],exampl:[],example_reconstruct:40,exce:[21,33,35],exceed:24,except:[0,9,24,30,43],exclud:5,exclus:[1,5,20],execut:[],exisit:[],exist:[1,2,4,5,7,9,10,12,16,17,21,26,27,28,29,30,32,33,34,35,41,42,44,45],exit:[0,1,7,9],exit_cod:1,exit_statu:7,exot:5,exp:[29,39],expect:[1,16,20,21,30,31,33,34,37,46],expens:21,experiment:30,explain:[1,5],explan:5,explicit:2,exponenti:29,exponentialcool:29,express:37,ext:7,extend:[],extendatcterm:24,extendatnterm:24,extended_search:[26,30],extens:[0,7,9,24,30],extension_penalti:24,extent:21,extern:[4,5,21],extra:[2,5,12,17,32],extra_bin:21,extra_force_field:30,extract:[5,6,16,17,18,20,21,22,23,25,26,27,29,30,31,33,34,35,36,37,39,41,43],extract_burial_statu:21,extractbackbon:16,extractloopposit:20,extractstatist:22,extrem:17,f_i:21,f_idx:34,facilit:23,factor:[20,29,39,41,42],fail:[0,1,5,7,10,17,26,30],failur:[0,5,7,9,45],fall:27,fallback:45,fals:[1,5,7,9,17,20,21,24,26,29,30,31,34,35,37,39,42,43],far:[26,30],fast:[6,14,16,20,21,22,32,33,34,35,45],fasta:[0,9,25,30],faster:[20,21,27,28,34,39],fastest:[27,30],favor:28,favourit:1,feasibl:[],fed:[4,12,39],fedora:5,feed:[4,16,26,43],feel:[5,12],fellow:5,fetch:12,few:[2,5,12,20,32,36],ff_aa:20,ff_aa_on:20,ff_aa_two:20,ff_ala:20,ff_arg:20,ff_asn:20,ff_asp:20,ff_cy:20,ff_cys2:20,ff_gln:20,ff_glu:20,ff_gly:20,ff_hisd:20,ff_hise:20,ff_ile:20,ff_leu:20,ff_lookup:[20,27,30],ff_lookup_charmm:32,ff_ly:20,ff_met:20,ff_phe:20,ff_pro:20,ff_ser:20,ff_thr:20,ff_trp:20,ff_tyr:20,ff_val:20,ff_xxx:20,field:[30,32,45],figur:12,file:[],filecheck:12,fileexist:7,fileextens:7,filegzip:7,filenam:[0,5,7,9,20,21,22,23,32,33,35,41,45],filenotfound:28,fill:[4,5,9,12,18,21,24,25,26,28,30],fillfromdatabas:[26,30],fillfrommontecarlosampl:[26,30],fillloopsbydatabas:30,fillloopsbymontecarlo:30,filtercandid:28,filtercandidateswithsc:28,final_model:[25,30],find:[],findchain:36,findwithin:5,fine:5,finish:46,fire:1,first:[0,1,5,9,12,14,16,17,20,21,22,23,24,26,27,29,30,31,33,34,35,37,39,40,42,45],fit:[],fix:[5,7,12,20,27,31,32,33,35],fix_cterm:27,fix_nterm:27,fix_surrounding_hydrogen:20,flag1:4,flag2:4,flag:[0,2,4,5,7,17,31,35,39,42],flanking_rot_angle_on:17,flanking_rot_angle_two:17,fletch:[21,40],fletcher:30,flexibl:[31,37,40,41,42,43,46],flip:45,flush:[1,12],fold:21,folder:[2,4,5,12,14,32],follow:[0,1,2,4,5,7,12,14,17,18,20,21,23,24,25,30,31,32,33,35,39,40,42,43,44,45],fontsiz:22,forbidden:5,forc:[20,27,30],force_const:[20,27],forcefield:[],forcefieldaminoacid:20,forcefieldbondinfo:20,forcefieldconnect:20,forcefieldharmonicangleinfo:20,forcefieldharmonicimproperinfo:20,forcefieldljpairinfo:20,forcefieldlookup:[20,27,30,32],forcefieldperiodicdihedralinfo:20,forcefieldureybradleyangleinfo:20,forg:12,forget:[1,5],form:[10,19,20,21,25,30,34,45],formal:[26,27,42,45],format:[0,5,9,21,41],formatt:5,formula:28,forward:12,found:[1,4,5,7,9,12,16,18,21,23,26,27,28,29,30,31,39,45],foundat:1,four:[6,29],fraction:[21,27,29],frag_db:[18,21,26,32],frag_info:21,frag_length:[18,21,23],frag_map:21,frag_po:[18,21,23],frag_residu:[18,21],frag_seq:[18,21],frag_siz:21,fragdb:[18,19,21,26,30,32],fragger:[18,21,23,29,30],fragger_handl:30,fragger_map:21,fraggerhandl:[21,23,30],fraggermap:[21,23],fragment:[],fragment_db:30,fragment_handl:23,fragment_info:21,fragment_length:[21,23],fragmentinfo:[21,26],fragments_per_posit:23,fragmentsampl:29,frame:[],frame_energi:42,frame_residu:[38,40],frameresidu:[38,42,43],framework:5,free:[5,44,45],frequenc:[21,29],frm:31,frmrotam:[37,42,46],frmrotamergroup:[37,39,42,43],from:[0,1,2,4,5,6,7,9,12,14,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,39,40,41,42,43,44,45],fromhhm:21,fromhoriz:21,fromresidu:45,front:[1,7,12],fstream:32,fudg:20,fulfil:[21,45],full:[0,1,5,16,19,20,21,24,25,26,29,31,40,42],full_seq:[24,26],fullgapextend:[24,30],fulli:[5,12,16,17,21,24,25,31],function_typ:34,functions_specific_to_your_act:5,fundament:32,funni:[2,5],further:[23,24,30,31,32],furthermor:32,futur:[20,21],gamma:[34,35,37],gamma_bin:35,gap:[],gapextend:[24,30],gapfre:21,gather:[4,8,12,21,23,40,42,45],gciiipgatcpgdyan:[26,30],gener:[],generatedenovotrajectori:23,generatestructureprofil:21,geom:[16,17,20,23,27,30,37,42,43],geometr:[],get:[],getaa:[16,17,20],getaaa:16,getaah:16,getactiveedg:39,getactiverotam:39,getactivesubrotam:42,getallatomposit:[16,27,31],getallatomscoringkei:26,getallatomweight:26,getanchoratomindex:16,getangl:40,getangularbins:21,getatomcount:5,getatomnam:16,getatomnameamb:16,getatomnamecharmm:16,getaveragescor:26,getbackbonelist:[18,21],getbackbonescoringkei:26,getbackboneweight:26,getbins:22,getbinsperdimens:22,getbound:17,getc:17,getca:17,getcb:17,getchain:24,getchainindex:24,getchainnam:24,getchains:5,getcharg:[20,42],getclust:26,getclusteredcandid:26,getconfid:21,getcoordindex:21,getcoordinfo:21,getcpuplatformsupport:20,getdefault:[20,27,30],getdihedralangl:21,getdistbins:21,getdisulfidbridg:20,getdisulfidconnect:20,getdsspstat:21,getedg:39,getel:16,getenviron:16,getenvsetdata:5,getepsilon:20,getfirstindex:16,getforcefieldaminoacid:20,getfragmentinfo:[21,26],getframeenergi:42,getfudgelj:20,getfudgeqq:20,geth1index:16,geth2index:16,geth3index:16,getheavyindex:20,gethistogramindex:[17,22],gethistogramindic:22,gethnindex:16,gethydrogenindex:[16,20],getindex:[16,20],getinternalconnect:20,getinternalenergi:42,getinternalenergyprefactor:42,getlargestclust:26,getlastindex:16,getlength:24,getlist:23,getlooplength:20,getloopstartindic:20,getmass:20,getmaxnumatom:16,getmaxnumhydrogen:16,getn:17,getnam:[40,42],getnonbondedcutoff:27,getnum:26,getnumactiveedg:39,getnumactivenod:39,getnumactiverotam:39,getnumatom:[16,20],getnumb:26,getnumcandid:26,getnumchain:5,getnumcoord:21,getnumedg:39,getnumfrag:21,getnumhydrogen:16,getnumloopresidu:20,getnumnod:39,getnumresidu:[5,16,20],getnumrotam:39,getnumstempair:21,getnumsubrotam:42,geto:17,getolc:[16,17],getomegators:[16,17],getoxtindex:20,getpairwiseenergi:39,getparticletyp:42,getpeptideboundconnect:20,getphiprobabilitygivenpsi:22,getphitors:[16,17,40],getpo:[16,42],getpotentialenergi:20,getpredict:21,getprob:[22,42],getpsiprobabilitygivenphi:22,getpsitors:[16,17,40],getr:28,getresiduedepth:21,getringpunch:28,getscor:[21,29],getselfenergi:[39,42],getseqr:[16,34],getsequ:[16,17,21,26],getsequenceprofil:21,getsequenceprofilescoreskei:26,getsigma:20,getsimul:20,getsolventaccessibilitit:21,getstemrmsdskei:26,getstructureprofil:21,getstructureprofilescoreskei:26,getsubdb:21,getsubrotamerdefinit:42,getsystemcr:27,gettemperatur:[29,42],gettransform:17,getversionnumb:32,getweight:[23,26],ggg:30,gggaggg:30,gggggggggggggggggggg:30,git:[],gitignor:5,give:[4,5,12,18,26,29,30,42],given:[0,1,4,5,6,7,9,10,16,17,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,37,39,40,42,43,45],gln:44,gln_ne2:16,global:[11,26,32],glu:[16,42,44,45],glu_oe1:16,glutam:44,glutamin:44,gly:[30,31,40,44],gly_n:16,glycin:[17,27,31,44],goal:[1,25],goe:[2,5,10,12,30,45],goldfarb:30,goldstein:39,good:[4,5,14,20,21,30],got:2,grain:5,graph:[],graph_initial_epsilon:31,graph_intial_epsilon:31,graph_max_complex:31,grep:2,gromac:6,group:[],group_definit:[22,35],group_idx:35,guarante:[21,23,26,31,32],gui:[5,22],guid:27,guidelin:[5,32],gzip:[0,7,9],hand:[2,4,9,42],handl:[],handler:23,happen:[1,5,20,21,23,24,29,30,42],hardwar:14,harmon:[20,27],harmonic_angl:20,harmonic_bond:20,harmonic_improp:20,hasfraglength:21,hasfragmentinfo:26,hash:21,hasringpunch:28,have:[],hbond:[23,30,35,42,43,44],hbond_scor:32,hbondscor:[],headach:5,header1:4,header2:4,header3:4,header4:4,header:[],header_output_dir:4,headlin:5,heavi:[16,20,31,33,43],heavili:[21,40],helic:[17,19,20,23,30,35,41],helix:[14,17,29,40],hello:32,hello_world:5,hellyeah:14,help:[0,1,2,4,5,9,12,14,20,35],helpactiontest:1,helper:[],hen:21,henc:[5,10,16,21,32],here:[0,1,2,4,5,7,9,10,12,14,16,17,20,21,22,23,25,26,27,29,30,32,33,35,36,37,45],het:30,heurist:[30,43],heuristicprocessor:16,hgfhvhefgdntngcmssgphfnpygkehgapvdenrhlg:0,hhm:[21,26],hhsearch:21,hhsuit:21,hidden:42,hide:[5,12],hierarch:[26,34],hierarchi:11,high:[5,12,25,30],high_resolut:17,higher:[2,26,34,35],highest:11,highli:[2,5,21],hint:9,histidin:[20,44],histogram:[22,29],histori:12,hit:[1,12,22,27,39],hmm:21,holi:[],home:4,homolog:[0,8,14,21,30],homologu:21,honor:30,honour:[30,35],hook:[],horiz:21,host:[4,12],hotfix:12,hous:[],how:[],hparticl:42,hpp:32,hsd:[44,45],hse:[44,45],html:[2,5,12],http:5,hydrogen:[16,17,20,21,30,35,42,43],hyphen:1,i_loop:[20,31],id_:32,idea:[1,5,16,18,20,21,30,34,42,46],ideal:[17,27,46],idenfifi:43,ident:[21,22,35,45],identifi:[0,9,10,21,26,30,31,33,35,43,45],idx:[16,17,20,21,23,27,34,39,42],idx_ca_res_37:16,idxhandl:5,iff:[21,24,28],ifstream:32,ignor:[0,20,27,30,35],illustr:21,imagehandl:[17,34],imagin:5,imaginari:1,img:[17,34],immedi:[1,5,11,12],impact:20,implement:[12,21,23,24,27,30,32,37,39,40,44],implicit:2,improp:20,improv:[19,20,30,37,40],in_dir:4,in_fil:5,in_path:4,in_stream:32,in_stream_:32,inaccur:20,inaccurate_pot_energi:20,inact:46,inactive_internal_energi:46,incl:[20,21,30],includ:[2,5,7,12,14,16,19,20,21,24,26,28,30,32,40],include_ligand:30,includeenv:35,inclus:30,incompat:[26,27],incomplet:[30,41],inconsist:[9,16,17,20,21,24,26,27,31,34],inconveni:12,increas:[23,26,27,30,39],independ:[20,31,41],index:[5,15,16,17,20,21,22,23,24,26,27,28,29,30,33,34,35,38,42,43,45],index_four:20,index_on:20,index_thre:20,index_two:20,indic:[],individu:[33,35],inf:39,influenc:[9,23,34],info:[21,26,30,34],inform:[5,9,12,17,18,19,21,23,24,26,30,34],inherit:[1,33,34,35],init:12,init_bb_list:29,init_frag:29,initi:[3,16,17,21,23,26,27,29,30,31,33,34,35,39,42,45],initial_bb:26,initial_epsilon:[39,46],initialis:1,inlin:[5,32],inner:10,input:[0,1,9,12,14,20,21,22,23,27,29,30,31,33,35,37,39,41,43,46],insert:[16,17,24,26,29,30,46],insertinto:[16,17,26],insertloop:[24,30],insertloopcleargap:[24,26,30],insid:[1,4],insight:12,inspir:27,instanc:[3,5,9,19,20,32],instead:[1,2,4,5,7,21,23,24,26,29,30,35,43],instruct:2,int16_t:32,int32_t:32,int_32_t:32,integ:[5,9,16],intend:[1,5,29],interact:[5,20,27,33,34,35,37,38,39,42],intercept:[33,35],interest:[1,20,21,29,32,39,42,45],interfac:[0,4,5],intermedi:5,intern:[0,1,4,5,12,16,19,20,21,22,23,26,27,29,30,31,32,34,35,39,42,43,46],internal_e_prefac:43,internal_e_prefactor:42,internal_energi:42,internet:5,interpol:[34,45],interpret:[5,7],intervent:5,intrins:2,introduc:[1,4,5,12,27,30,39],invalid:[5,16,20,21,24,27,30,31,33,34,35,38,42,44,45],invok:[2,4,5,11,12],involv:[12,25,35,37],iostream:32,is_c_ter:[20,31],is_cter:20,is_n_ter:[20,31],is_nter:20,isallatomscoringsetup:[26,30],isallset:16,isanyset:16,isbackbonescoringsetup:30,isctermin:24,isempti:26,isen:10,ishbondacceptor:42,ishbonddonor:42,isntermin:24,isoleucin:44,isset:16,issimilar:45,issourc:32,istermin:24,isvalid:40,item:[1,5,12,16,17,20,21,30,34],iter:[21,22,23,26,27,29,30,39,42],itself:[4,5,12,21,29,31,32,33,35,42],job:[5,21,30],join:[5,16,18,21,26,27,29,31,36],jone:[21,42],jones1999:21,json:[0,9],just:[1,2,5,9,11,12,18,20,21,24,26,30],kabsch1983:21,kabsch:21,keep:[],keep_non_converg:26,keep_sidechain:[5,31],kei:[0,9,21,23,26,29,30,33,34,35],kept:[5,12,20,26,27,31,38],kernel:41,keyword:22,kic:[],kicclos:29,kick:9,kill_electrostat:20,kind:[1,5],kinemat:27,know:[2,45],known:[4,7,16,34,43],kortemm:27,krivov2009:[40,41],krivov:40,kwarg:1,l_e:42,lab:41,label:[12,20],lack:30,languag:4,larg:[21,22,27,30],larger:[10,17,21,30,39,43],largest:[23,26,37],last:[1,4,16,17,20,21,24,26,27,29,30,34,35,41],last_psi:17,later:[1,5,16,39],latest:[2,5],latter:[0,12,30],launcher:[4,5],layer:37,layout:[21,32],lazi:42,lbfg:30,lead:[0,5,6,7,17,20,26,27,31,33,35,41],least:[0,2,4,5,12,17,20,30,33,35,37,39],leav:1,left:[7,27],legal:5,len:[17,18,20,21,23,26,30,31,35,40],length:[6,16,19,20,21,22,23,24,26,27,30,31,32,33,34,37],lennard:42,less:[0,12,17,20,21,22,26,30,33,35,39,45],let:[1,5,17,21,26,40],letter:[16,17,21,22,29,44],leu:44,leu_h:16,leucin:44,level:[2,5,10,11,12,21,25,30,42],lexicograph:30,lib64:5,libari:41,libexec:[4,5],libpromod3_nam:4,librari:[],library1:4,library2:4,licenc:41,life:12,ligand:[30,31,43],like:[1,4,5,12,30,32,41,42],limit:[21,27,30],line:[],linear:[21,23,26,29,33,35],linear_weight:[26,29,33,35],linearcombin:26,linearscor:29,liner:34,link:[2,4,5,12,16,20,21,23,31,33,34,35,36],link_cmd:4,linkcheck:[2,5,12],linker:[4,30],linker_length:30,list:[0,1,2,4,5,6,7,9,16,17,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,43,45,46],listen:5,literalinclud:5,littl:[4,5,12,32],live:[4,5],lj_pair:20,load:[],load_frequ:[19,21],loadalign:[25,30],loadallatominteractionscor:33,loadallatompackingscor:33,loadamberforcefield:30,loadbb:21,loadcach:23,loadcbetascor:[26,29,35,36],loadcbpackingscor:35,loadcharmm:20,loadcharmmforcefield:30,loaddefaultallatomoverallscor:33,loaddefaultbackboneoverallscor:35,loaddunbracklib:[40,41],loadent:[0,9],loadfragdb:[18,19,26,30],loadhbondscor:35,loadpdb:[5,16,18,20,21,25,26,27,29,30,31,36,40],loadpenultimatelib:41,loadport:[20,21,22,32,33,35,45],loadreducedscor:35,loadsequenceprofil:[21,26],loadssagreementscor:35,loadstructuredb:[18,19,21,26,30],loadtorsionsampl:[17,19,22,29],loadtorsionsamplercoil:[19,26,30],loadtorsionsamplerextend:19,loadtorsionsamplerhel:19,loadtorsionscor:35,local:[2,20,21,22,33,35,45],locat:[2,4,17,24,32,33,35,39,42],log:[7,12,28,42,43],logic:0,loginfo:28,lone:42,lone_pair:42,longer:[],longest:21,look:[5,7,12,17,31,34],lookup:[],looooooong:39,loop:[],loop_candid:26,loop_length:[20,21,31],loop_main:5,loop_po:20,loop_seq:26,loop_start:[],loop_start_indic:[20,31],loopcandid:[],loss:12,lost:[1,12],lot:[1,5,9,12],lovel:41,lovell2000:41,low:[1,5,35,39,43],lower:[26,29,30,33,35],lowest:[26,29,42],lowest_energy_conform:29,lysin:44,machin:[20,21,22,32,33,35,45],macro:[4,5],made:[4,45],magic:[5,32],mai:[0,1,2,4,5,7,9,12,16,20,24,27,30],main:[30,32,45],mainli:[16,29,41,42],maintain:[5,12],major:12,makefil:[2,5],makestat:45,malici:12,man:[2,5],manag:[4,5],mandel:27,mandell2009:27,mani:[7,9,27,28,30,35,43],manipul:17,manner:[5,29,39],manual:[1,2,5,6,12,21,26,29,30,32,42],map:[16,17,21,23,28,31,34,35],mar:19,mark:[4,43],markup:5,mass:20,massiv:23,master:[5,12],mat3:6,mat4:[6,17,23,30],match:[0,4,20,21,22,23,26,27,29,30,34,35],materi:[1,5],math:28,mathemat:[26,27],matplotlib:22,matric:21,matrix:[6,21],matter:4,max:[6,16,24,28,30,31,35,39,45,46],max_alpha:35,max_beta:35,max_complex:[39,46],max_count:[33,35],max_d:35,max_dev:29,max_dist:[26,34],max_extens:30,max_gamma:35,max_iter:[23,26,30],max_iter_lbfg:30,max_iter_sd:30,max_length:24,max_loops_to_search:30,max_n:39,max_num_all_atom:30,max_p:43,max_prob:42,max_res_extens:30,max_step:27,max_to_show:10,max_visited_nod:39,maxfraglength:21,maxim:[19,21,23,26,27,29,30,34,35,39],maximum:[23,26,27,29,39,42,43],mc_closer:29,mc_cooler:29,mc_num_loop:30,mc_sampler:29,mc_scorer:29,mc_step:[30,39],mcsolv:39,mean:[4,5,9,12,16,20,27,30,31],meaning:[21,26,41],meant:[14,16,21,28,30,39,43],measur:23,mechan:[14,27,30],meddl:30,member:[5,9,26,30],memori:[21,30,32,39],mention:[1,2],merg:[12,20,23,24,26,30,31,34,42],merge_dist:30,mergegap:24,mergegapsbydist:30,mergemhandl:30,mess:[5,12],messi:12,met:44,methionin:[30,44],method:[0,1,9,16,20,21,22,27,30,31,32,39,43],metric:34,metropoli:[26,29,39],mhandl:[24,25,26,30],middl:12,might:[20,21,27,39,42,43,46],min:[26,35],min_alpha:35,min_beta:35,min_candid:26,min_d:35,min_dist:34,min_gamma:35,min_loops_requir:30,min_scor:26,mincadist:17,mind:[1,5],minim:[14,17,20,21,26,27,30,33,34,35,39,40],minimizemodelenergi:30,minimum:[17,23,37],minor:20,minu:39,mirror:32,miser:10,mismatch:[16,34],miss:[0,7,9,20,30],mix:[0,4],mkdir:[2,5],mm_sy:[20,27],mm_sys_output:20,mm_system_cr:27,mmcif:7,mmsystemcr:[20,27],mod:5,mode:[1,35,45],modellinghandl:[24,26,30],modeltermini:30,modif:30,modifi:[5,12,17,26,30,35],modified_crambin:26,modul:[],module_data:4,mol:[],molecular:[14,21,27,30],moli:[],molprob:[],molprobity_bin:28,molprobity_execut:28,moment:5,monitor:1,monolith:5,mont:[23,26,29,30,39],mood:5,more:[1,2,4,5,9,10,12,23,30,37,39,42],most:[0,4,5,17,20,22,23,26,27,30,33,35,41],mostli:[4,12,42],motion:17,movabl:20,move:[2,5,12,20,26,27,29,30,32],movement:23,mpscore:28,msg:7,msgerrorandexit:7,msm:21,msse4:2,much:[5,21,30,35,39],multi:14,multipl:[0,2,4,5,9,10,14,20,23,26,30,31,33,35],multipli:[29,39],multitempl:9,must:[],mutlipl:9,my_db:21,myclass:32,myclassptr:32,mytrg:0,n_coord:6,n_num:24,n_po:[6,17,35,43],n_stem:[6,18,21,24,26,27,29],n_stem_idx:[],n_stem_phi:29,n_ter:[27,43],naiv:[],name:[0,1,4,5,7,9,10,16,20,21,22,24,26,28,30,37,41,42,44,45],name_pymod:4,namespac:[9,32],nan:45,nat:27,nativ:32,necessari:[5,17,21,29,34],necessarili:46,need:[1,2,4,5,7,9,11,12,17,20,21,22,23,26,27,30,31,32,33,34,35,40],need_config_head:4,neg:[1,20,27,34,39],neglect:[23,27,38,42],neglect_size_on:26,neighbor:[5,16,30],neighbour:[30,45],network:[17,37],never:[9,12,26,31,32,33,35],nevertheless:[5,42],new_default:20,new_env_po:16,new_po:16,new_res_nam:42,new_siz:17,newli:[16,29],next:[1,5,12,17,22,23,24,32],next_aa:29,nice:5,nitrogen:[6,17,27,42,43],nobodi:1,node:39,node_idx:39,non:[],nonbonded_cutoff:[20,27],none:[9,23,28,30,31],nonredund:21,nonrotamer:41,nonzero:[39,45],norm:35,normal:[33,35],normalis:34,notabl:21,note:[0,2,5,9,10,16,17,20,21,23,26,27,29,30,31,32,33,34,35,36,39,40,43,44],noth:[4,5,10,29,42],notic:[1,4,12],novel:21,now:[5,10,12,14,17,21],nparticl:42,nterminalclos:29,null_model:26,num:[18,23,26,27,31,36],num_frag:[21,30],num_gap_extens:24,num_loop:26,num_residu:[16,20,31,33,34],num_residues_list:31,num_trajectori:23,number:[0,1,5,6,9,10,14,16,17,19,20,21,22,23,24,26,27,29,30,31,32,33,34,35,37,38,39,42,45],numer:30,numpi:[22,29],o_po:[17,43],object:[],observ:[21,27,39,46],obtain:[14,18,30],obviou:12,occupi:[38,43],occur:[16,23,34,35],ocparticl:42,odd:21,off:[1,5,10,30],offend:28,offer:[19,25,42],offset:[0,9,21,26,30],ofstream:32,often:[5,7,9,27],olc:17,old:[28,30],oligom:25,olson:21,omega:[16,17],onc:[1,5,12,20,23,26,27,39,45,46],one_letter_cod:[16,18,21,26,27,29,31,36],onli:[0,1,2,4,5,7,9,10,11,12,16,17,20,21,23,24,26,28,29,30,31,32,33,35,37,39,40,41,43],onto:[1,17,21,23],oparticl:42,open:[9,20,21,22,32,33,35,45],openmm:[2,14,20],openstructur:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],oper:[12,14,16,21,39],opt:[7,9,12],optim:[],optimis:5,optimize_subrotam:[31,37],optimum:[],option:[0,2,9,27,30,45],order:[0,9,16,20,21,24,26,30,32,34,35],org:5,organ:[5,21,45],orient:[6,27,35],orig_indic:[26,28],origin:[6,9,12,17,26,29,30,35,39,46],ost:[],ost_double_precis:2,ost_ent:28,ost_librari:4,ost_root:[2,5],other:[0,1,2,4,5,10,12,16,17,26,30,31,33,35,39,42,45,46],other_db:21,other_index:17,other_res_index:16,otherwis:[1,4,5,10,12,16,17,20,21,23,24,26,27,29,33,34,35,39,42],our:[4,5,12,21,26],out:[1,2,4,5,10,12,16,20,21,22,23,24,26,40,45],out_path:4,out_po:20,out_stream:32,out_stream_:32,outer:10,outlier:28,output:[],output_dir:4,outsid:[5,34],over:[2,4,9,12,21,27,30,35,42],overal:[29,34,39],overhead:20,overlap:[20,29,30,31,35],overli:12,overload:32,overrid:[2,20],overridden:4,overview:[5,12],overwrit:26,overwritten:20,own:[],oxt:[6,16,20],oxygen:[17,30,42,43],pack:16,packag:[4,5,12],pad:[17,32],page:[2,5,15],pai:1,pair:[6,20,21,22,23,27,29,31,32,33,34,35,37,42,45],pairwis:[],pairwise_energi:39,pairwiseenergi:42,pairwisefunct:[34,35],pairwisefunctiontyp:34,pairwisescor:[],paper:[37,40,42],paragraph:[1,5],parallel:21,paramet:[1,4,5,6,7,9,10,11,16,17,19,20,21,22,23,24,26,27,28,29,30,31,33,34,35,37,38,39,41,42,43,44,45,46],parameter_index:21,parametr:[27,30,31,35,43],parent:[30,35],pars:[],parser:[],part:[1,5,12,14,16,29,30,34,35,37,39,40,42],partial:24,particip:[31,37],particl:[],particular:[5,21,26,27,29,39,42,45],partner:[33,34,35,42],pass:[9,12,16,20,21,23,24,27,29,38,42,43],past:[5,12,17,24],path:[1,2,4,5,7,12,14,20,21,22,28,33,35,45],path_to_chemlib:11,pattern:21,paus:10,pdb:[0,5,7,9,14,16,17,18,19,20,21,25,26,27,28,29,30,31,36,40],pdb_id:21,penal:[24,30],penalti:[24,30],penultim:[31,41],penultimatelib:32,peopl:12,pep:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],peptid:[16,18,20,21,30,31,40],per:[4,5,8,12,16,21,22,26,29,30,33,34,35,37,39],percentag:28,perfect:5,perfectli:5,perform:[0,12,14,20,23,26,27,28,29,30,32,33,37,39],period:20,periodic_dihedr:20,periodic_improp:20,permiss:5,permut:39,phase:20,phe:[44,45],phenix:28,phenylalanin:44,phi:[16,17,21,22,27,29,35,40,43,45],phi_bin:[35,45],phi_handl:40,phipsisampl:29,phosphoserin:30,phrase:5,pick:[26,29],pictur:5,piec:[5,23],pipelin:[],pivot:[26,27,29],pivot_on:[26,27],pivot_thre:[26,27],pivot_two:[26,27],place:[1,2,4,5,7,9,12,35],plain:[0,9],plan:12,plane:28,platform:[14,20],pleas:[2,5,12,21,23,26,27,30],plot:22,plt:22,plu:[5,9,11,37,42],pm3_csc:12,pm3_openmm_cpu_thread:[14,20,30],pm3_runtime_profiling_level:10,pm3argpars:[],pm3argumentpars:[0,7,9],pm_action:[1,4,5],pm_action_init:5,pm_bin:1,png:22,point:[2,5,9,11,16,21,23,29,30,34,45],pointer:[2,5,32],polar:[42,43],polar_direct:42,polici:5,pop:12,popul:[2,12],port_str_db:21,portabl:[],portable_binary_seri:32,portable_fil:4,portablebinarydatasink:32,portablebinarydatasourc:32,pos_end:23,pos_on:23,pos_start:23,pos_two:23,posit:[],possibl:[0,5,9,12,17,20,21,22,24,26,27,29,30,31,32,33,34,35,37,39,42,44],post:9,postprocess:31,pot:20,pot_:27,potenti:[18,19,20,21,26,27,30,31,32,35,39],pqhpg:0,practic:[4,5,20,21],pre:[5,12],pre_commit:[5,12],preceed:31,precis:[2,26,30],precomput:[],pred:34,predefin:[4,14,20,30,33,35],predict:[21,23,30,34,35,37,40],prefactor:42,prefer:[2,4,45,46],prefilt:30,prefix:[1,4,5,7],prepar:[5,30],present:[17,27,31,42,43,45],prev_aa:29,prevent:[1,5],previous:[20,21,26,31,34],primary_rot_angl:17,principl:[29,34],print:[1,2,17,18,20,21,26,27,28,30,36],printstatist:21,printsummari:10,prior:30,privat:[1,32],pro:[16,22,44,45],probabilist:[21,43],probability_cutoff:43,probabl:[4,5,12,21,22,23,26,27,29,39,41,42,43,45],problem:[9,12,21,26,27,29,30,37,39,41,46],problemat:23,procedur:[23,31],process:[1,9,12,16,20,23,27,29,30,32,34,38,45],produc:[0,1,2,4,5,21,23,24,28,30,39,41,43],product:[1,3,12],prof:[21,26],prof_dir:21,prof_path:21,profil:[],profiledb:21,profilehandl:[21,23,26,30],profilehandlelist:[],prog:9,program:[4,5,8],project:[4,5,12],prolin:[17,28,43,44],promin:0,promod3_mod:4,promod3_nam:4,promod3_name_head:4,promod3_path:5,promod3_root:5,promod3_shared_data_path:[5,32],promod3_unittest:[1,4,5],promot:5,propag:[5,17],proper:[12,43],properli:[1,30,33,35,39,43],properti:[16,17,21,30,45],propos:[24,26,27,29,37],proposed_posit:29,proposestep:29,prot:[5,18,21,27,29,31,40],prot_rec:5,protein:[],proton:[16,20,44,45],provid:[0,1,2,4,5,9,12,16,17,18,20,21,23,24,26,27,28,29,30,31,32,34,41,42,43,45],prune:[39,46],pseudo:[29,30,33,35],psi:[16,17,21,22,27,29,35,40,43,45],psi_bin:[35,45],psi_handl:40,psipr:[21,23,34,35],psipred_confid:35,psipred_pr:23,psipred_predict:[21,23,30],psipred_st:35,psipredpredict:[],psipredpredictionlist:[],pull:[5,12],punch:[],pure:0,purpos:[5,30,45],push:12,pushverbositylevel:9,put:[1,4,5,7,9,30],py_run:[1,4,5],pyc:1,pylint:12,pylintrc:12,pymod:[4,5,12],pyplot:22,pytest:5,python2:5,python:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],python_root:2,pythonpath:5,qmean:2,qmeandisco:34,qualiti:30,queri:[21,45],querylib:45,question:22,quickli:[5,27],quit:[5,9],rachovski:19,rackovski:19,radian:[6,17,20,22],radii:28,radiu:[5,28,33,35],raihvhqfgdlsqgcestgphynplavph:0,rais:[0,6,9,16,17,20,21,22,23,24,26,27,28,29,30,31,33,34,35,37,38,42,43,45],rama_iffi:28,ramachandran:28,random:[17,19,22,26,27,29,39],random_se:26,randomized_frag:17,randomli:[22,29],rang:[5,6,16,17,18,20,21,22,23,24,27,29,30,33,34,35,45],rank:26,rapid:37,rare:5,rather:[5,7,12,45],raw:[],rawmodel:5,reach:[0,24,27],read:[0,5,7,9,12,20,21,22,24,31,32,33,35,41,45],readabl:[0,5,9,45],readdunbrackfil:41,reader:[12,14],readi:[2,45],readm:2,real:[5,9,32,43],realli:[1,2,5,7,12],reappear:12,reason:[5,12,21,27,29,33,46],rebas:12,rebuild:[2,5],recalcul:22,recent:12,recoginz:44,recogn:[0,9],recognis:[1,5,12],recognit:21,recommend:[2,5,20,30,35],reconstruct:[],reconstructcbetaposit:17,reconstructcstemoxygen:17,reconstructor:[27,30,31],reconstructoxygenposit:17,reconstructsidechain:[5,30,31],reconstructtest:5,record:[1,30],recreat:12,reduc:[20,21,23,30,35],reduced_scor:32,reducedscor:[],redund:19,ref_backbon:[18,21],ref_fil:5,refer:[1,4,5,14,16,17,18,20],referenc:5,refresh:26,regard:[27,37],region:[20,23,24,27,29,30,38,43],regist:[4,5],regress:41,reinterpret_cast:32,reject:[26,27,29],rel:[4,6,23,27,35,39],relat:[4,5,9,21,32,39,42],relax:[],relev:[2,4,20,31],remain:[25,29,30],rememb:[1,5,29],remodel:[26,31],remodel_cutoff:31,remov:[2,17,20,24,26,28,30,31,39,40],removeterminalgap:30,renumb:30,reorder:30,reordergap:30,replac:[16,17,29,30],replacefrag:17,report:[1,5,30],reportmolprobityscor:28,repositori:[1,4,5,12],repres:[],represent:[17,18,20,21,22,32,33,35,42,45],reproduc:30,requeset:35,request:[23,41,45],requir:[0,2,5,9,12,16,17,21,22,23,26,27,30,31,32,33,35,42,43,44,45],reread:21,res_idx:42,res_index:16,res_indic:[16,20,31],res_list:[16,20,27,31],res_num:16,resembl:12,reserv:7,reset:[16,20,27,29,34,39,42],residu:[],residue_depth:21,residue_index:[38,42,43],residuehandl:[6,16,17,21,24,26,27,28,29,42,43,45],residuehandlelist:16,resiz:[17,32],resnum:[16,17,24,26,30,31,33,34],resnum_on:34,resnum_rang:30,resnum_two:34,resolut:[17,27,34,35],resolv:[12,16,27,34],resolvecystein:37,resort:30,respect:[6,20,30],respons:[5,12],rest:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],restor:17,restraint:27,restrict:[5,12,24],restructuredtext:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],result:[0,2,5,20,22,23,26,27,28,29,30,31,37,39,41,45],resum:10,reus:[30,31],review:12,reviv:12,rewrit:1,richardson:41,ridig:31,right:[1,2,5,9],rigid_frame_cutoff:31,rigidblock:23,ring:[],ring_punch_detect:30,rmsd:[17,18,21,23,26,27],rmsd_cutoff:[21,26,27],rmsd_thresh:[21,23],rmsd_threshold:21,rnum:36,robot:27,role:9,root:[2,4,5,12],rosetta:35,rot:31,rot_constructor:40,rot_group:[40,43],rot_lib:43,rot_lib_entri:43,rota_out:28,rotam:[],rotamer_group:[37,39,40],rotamer_id:40,rotamer_librari:31,rotamer_model:31,rotamer_on:37,rotamer_res_indic:31,rotamer_two:37,rotamergraph:[31,39,40,42,46],rotamergroup:[39,42],rotamerid:[],rotamerlib:[31,32,41,43,45],rotamerlibentri:[43,45],rotat:[6,17],rotatearoundomegators:17,rotatearoundphipsitors:17,rotatearoundphitors:17,rotatearoundpsitors:17,rotationaroundlin:6,roughli:19,round:45,routin:[1,14,26],rrm:31,rrmrotam:[37,42],rrmrotamergroup:[37,39,42,43],rst1:4,rst2:4,rst:[4,5,12],rsync:5,rule:[5,6,12],run:[],runact:1,runexitstatustest:1,runmolprob:28,runmolprobityent:28,runnabl:5,runner:1,runtest:[1,5],runtim:[],runtimeerror:[6,16,17,20,21,22,24,26,27,29,30,31,33,34,35,37,38,41,42,43,45],runtimeexcept:22,safe:2,said:4,same:[0,1,2,4,5,9,10,16,20,21,23,26,27,29,30,31,32,33,34,35,38,39,42,43,45],samiti:30,sampl:[],sampled_frag:29,samplemontecarlo:29,sampler:[],sampling_start_index:29,sander:21,saniti:2,sanity_check:2,sanner1996:21,sanner:21,satisfi:44,save:[5,12,17,20,21,22,23,26,29,32,33,35,45],savebb:21,savecach:23,savefig:22,savepdb:[14,16,17,20,21,25,26,27,29,30,31,40],saveport:[20,21,22,32,33,35,45],sc_data:27,sc_rec:[27,31],sc_rec_test:31,sc_result:27,scale:17,scatter:22,scheme:[1,5,9,16,24,29],sci:[27,37],scondari:30,scope:10,score:[],score_contain:26,score_env:[26,29,36],score_threshold:37,score_vari:30,scorecontain:26,scoring_weight:23,scoringgapextend:[24,30],scoringweight:[23,26],scratch:21,scriptnam:7,scriptpath:5,scwrl4:[37,40,42,43],scwrlrotamerconstructor:[40,42,43],seamlessli:12,search:[2,5,15,16,21,23,26,28,30,31,35,37,42,43],searchdb:[18,21],second:[5,17,20,23,26,27,30,33,34,35,37,39],secondari:[21,23,35],secondli:5,section:[1,4,13,47],see:[0,1,5,6,7,9,12,14,16,19,20,21,22,24,26,28,29,30,32,33,35,39,45],seed:[19,22,26,27,29,39],seem:12,segment:17,select:[21,23,29,30,31,36,39,40],selenium:30,self:[1,5,37,39,42],self_energi:42,send:7,sens:[34,35],sensibl:30,separ:[1,5,20,22,30,33,35,37,39],seq:[9,16,18,21,23,24,26,30,34,36],seq_idx_on:23,seq_idx_two:23,seq_one_idx:23,seq_sep:[33,35],seq_tpl:[26,30],seq_trg:[26,30],seq_two_idx:23,seqid:21,seqr:[0,16,18,21,23,24,26,29,30,31,33,34,35],seqres_str:[16,27,31],seqsim:21,sequenc:[],sequencefromchain:36,sequencehandl:[16,23,24,30,34],sequencelist:[16,30,34],sequenceprofil:21,sequenti:[17,30],ser:44,serial:[21,32],serializ:32,serin:44,serv:[1,9,21,23,26,29],servic:12,set:[1,2,4,5,7,9,11,12,14,16,17,20,21,23,26,27,28,29,30,31,32,33,34,35,37,39,40,42,43,45,46],setaa:17,setactivesubrotam:42,setallatomscoringkei:26,setaroundomegators:17,setaroundphipsitors:17,setaroundphitors:17,setaroundpsitors:17,setbackbonescoringkei:26,setbackrub:17,setc:17,setca:17,setcb:17,setcharg:20,setcpuplatformsupport:20,setdefault:20,setdisulfidconnect:20,setenergi:[33,35],setenviron:[16,27,31,34],setepsilon:20,setframeenergi:[40,42],setfudgelj:20,setfudgeqq:20,setinitialenviron:[16,26,27,29,31,34,36],setinternalconnect:20,setinternalenergi:42,setinternalenergyprefactor:42,setinterpol:45,setmap:[34,35],setmass:20,setn:17,setnonbondedcutoff:27,seto:17,setolc:17,setpeptideboundconnect:20,setphitors:17,setpo:16,setpolardirect:42,setprob:42,setpsipredpredict:[30,34,35],setpsitors:17,setresidu:16,setscor:35,setsequ:17,setsequenceoffset:30,setsequenceprofil:30,setsequenceprofilescoreskei:26,setsigma:20,setstemrmsdskei:26,setstructureprofil:21,setstructureprofilescoreskei:26,settemperatur:42,setup:[],setupdefaultallatomscor:[26,30],setupdefaultbackbonescor:[26,30],setupsystem:20,setweight:26,sever:[2,5,9,19,21,22,23,26,27,31,37,42,45,46],sg_pos_on:37,sg_pos_two:37,shake:29,shanno:30,shapovalov2011:41,shapovalov:[40,41],shared_ptr:32,shebang:5,sheet:[30,41],shelenkov:37,shell:[1,2,5,7],shift:[17,24],shiftctermin:24,shiftextens:24,shorten:30,shorter:30,shortest:26,shortli:5,should:[1,2,4,5,7,9,12,14,17,18,21,22,23,26,27,29,30,31,32,34,38,39,40,42],show:[1,5,9,10,26,29,40],showcas:[1,16,20,22],shown:[5,10,30],shrink:17,side:[5,30,37,40],sidechain:[],sidechain_pymod:5,sidechain_reconstructor:30,sidechain_rst:5,sidechain_test_data:5,sidechain_test_orig:31,sidechain_test_rec:31,sidechain_unit_test:5,sidechainparticl:[42,43],sidechainreconstructiondata:[],sidechainreconstructor:[],sidenot:31,sig1:45,sig2:45,sig3:45,sig4:45,sigma:20,silent:1,sim:20,similar:[1,2,12,18,21,23,34,35,45],similardihedr:45,similarli:[2,20,30],simpl:[0,6,17,21,29,33,34,35,37,45],simpler:[20,30],simplest:[5,25],simpli:[16,17,26,27,29,30,43,44,45],simplic:18,simplif:9,simplifi:[17,20,21],simul:[20,26,27,29,39],sinc:[1,2,4,5,7,12,14,17,20,21,22,23,39,41,44],singl:[2,4,5,16,17,20,21,23,26,27,29,30,31,34,35,38,39,41,42,43,46],single_chain_structur:21,singleton:20,singular:23,sink:32,sit:5,site:5,size:[5,16,17,21,22,27,29,32,33,34,35],sizeof:32,skip:[0,1,5,12,21,30,43],slide:23,slight:30,slightli:[30,39],slow:32,slower:[14,20,21,22,30,33,35,45],small:[5,21,27,30,31],smaller:[17,21,23,27,35],smallest:[],smallish:[2,5],smart:12,smng:3,smooth:41,smtl:30,soding2005:21,softsampl:29,softwar:5,sol:40,sole:[1,12],soli:19,solut:[5,23,26,27,29,30,31,39,40],solv:[12,39,46],solvent:21,solvent_access:21,solvent_accessibility_str:21,some:[1,2,4,5,9,12,16,18,21,25,28,29,30,31,32,34,36,40,43,45],somedata:32,someth:[1,5,7,12,21],sometim:12,somewher:[4,21],soon:[27,35,39,40,45],sort:[1,4,10,26,39,45],sound:12,sourc:[1,2,4,5,7,9,11,12,21,23,26,27,28,30,31,32,45],source1:[4,12],source2:[4,12],source3:4,source4:4,source_chain_idx:30,source_mhandl:30,span:30,sparticl:42,spatial:5,spawn:[1,5],spdbv:30,spdbv_style:30,special:[1,2,4,5,20,43,44,45],specif:[1,5,20,21,22,23,26,29,34,35,36,41,43,45],specifi:[2,4,6,17,21,22,27,30,31,34,35,39,42,45],specimen:7,speed:[20,30],spehner:21,spend:5,spent:[10,14],sphinx:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],spit:24,split:36,sport:5,squar:21,src:[5,12],src_db:21,ss_agreement:[30,35],ss_agreement_scor:32,ssagre:21,ssagreementscor:[],sse:2,sstream:32,stabil:21,stabl:12,stack:12,stage:[],stai:[1,5,12,39],standard:[2,5,8,9,12,16,22,32,35,41,45],start:[],start_idx:26,start_resnum:[16,17,26,29,30,31,33,34,35],start_resnum_list:31,start_temperatur:[29,39],starter:1,startscop:10,stash:12,state:[1,2,5,16,21,35,37,44,45],staticruntimeprofil:10,statist:[10,19,21],statu:[1,5],std:32,stderr:1,stdout:1,steadili:[29,39],steepest:[27,30],stem:[6,17,20,21,24,26,27,29,30,31],stemcoord:6,stempairorient:6,step:[],stereochem:30,steric:45,still:[5,10,20,30,32],stop:[1,5,10,24,27],stop_criterion:27,storabl:21,storag:[5,16,20,33,35],store:[0,1,5,6,12,14,16,17,20,21,22,23,24,26,27,29,30,31,32],stori:5,str:[1,7,9,10,11,16,17,20,21,22,23,24,26,27,28,29,30,31,32,33,34,35,42,44,45],str_len:32,straight:12,strategi:45,stream:32,stretch:[16,21,30,34],strict:12,string:[0,7,9,21,22,24,32],stringstream:32,strip:30,struct:32,struct_db:18,structral:[16,34],structur:[],structural_db:26,structuralgap:[24,28],structuralgaplist:[24,30],structure_db:[21,23,26,30,32],structure_dir:21,structure_path:21,structure_sourc:9,structuredb:[19,21,23,26,30,32],structureprofil:21,stuff:21,style:[30,35],sub:[5,21,27],sub_frag:17,sub_res_list:21,subdir:5,subfold:5,subject:5,submodul:5,submodule1:12,subpart:23,subproblem:[],subrotam:[],subrotameroptim:[31,46],subsequ:[17,30,39],subset:[20,23,26,27,31],subst:21,subst_matrix:21,substitut:21,substweightmatrix:21,subtre:[4,5],succeed:24,success:[7,29,39],suffix:7,suggest:5,suit:[1,5,21],sulfur:[37,42,43],sum:[10,23,24,30,31,35,37],summari:10,superpos:[17,21,23,26,27,29],superpose_stem:17,superposed_rmsd:[17,26],superposeonto:17,superposit:[23,26,29],superpost:23,supervis:1,supos:21,support:[1,5,7,9,14,20,27,30],suppos:12,sure:[2,5,9,12,21],surf:21,surfac:21,surfacehandl:21,surotam:42,surround:[20,21,27,31,33,35],symmetr:[21,34,45],sync:5,system:[],t_sampler:22,tackl:[],tail:17,tailor:[16,30],take:[5,16,21,22,23,26,27,29,30,32,35,37,39,43,46],taken:[0,16,20,27,30,43],talk:1,target:[0,1,2,4,5,9,14,21,23,25,26,27,29,30,34],target_chain_idx:30,target_mhandl:30,target_pdb:28,target_sequ:21,task:[5,12,27,30,32],technic:21,tell:[1,5,7,9,12,21],temperatur:[26,29,39,42],templat:[0,1,9,14,25,30,32,34],temporari:[21,30],temporarili:12,term:[5,21,42,44,45,46],termin:[1,6,7,14,16,17,20,24,26,27,29,30,31],terminal_len:29,terminal_seqr:29,termini:[24,29,30],terminu:[21,29,30,43],test_:5,test_action_:1,test_action_do_awesom:1,test_action_help:1,test_awesome_featur:5,test_check_io:32,test_cod:5,test_doctest:5,test_foo:4,test_portable_binari:32,test_reconstruct_sidechain:5,test_sidechain_reconstruct:5,test_submodule1:12,test_suite_:4,test_suite_your_module_run:5,test_your_modul:12,testcas:[1,5],testcasenam:5,testexit0:1,testpmexist:1,testreconstruct:5,testutil:[1,5],text:[1,9],than:[4,5,9,10,12,16,17,21,23,26,27,28,30,31,35,37,39],thei:[2,5,12,16,17,20,21,22,26,27,28,29,30,37,39,42,43,44,45],them:[4,5,12,17,20,21,22,23,24,26,30,31,34,38],themselv:20,theoret:29,theori:37,therefor:[5,17,19,21,23,27,29,30,45],thereof:20,thi:[0,1,2,4,5,7,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,39,40,42,43,44,45,46,47],thing:[1,2,5,12,21,23,30,45],think:5,thoroughli:12,those:[0,1,2,4,5,9,12,20,26,30,31,32,33,35,39,40],though:[20,30,32],thr:44,thread:[14,19,20,30],three:[1,4,12,16,17,22,26,28,29,35,44],threonin:44,thresh:[17,23,42,45],threshold:[21,23,27,30,31,34,39,45],through:[1,5,6,17,21,24,30,33,35],throughout:[9,12,19,20],thu:7,tidi:12,tightli:12,time:[1,5,9,10,12,14,23,30,34],timer:10,tini:[12,30],titl:22,tlc:[16,44],tlc_an:16,tlctorotid:[40,44],tmp_buf:32,todens:17,toentiti:[14,16,17,20,21,27,29,31],toframeresidu:42,togeth:[5,12,21,37],toggl:35,too:[9,12,21,26,27,30,32,42],tool:[4,18,21,32,36,40],toolbox:12,top:[2,5,10,11,12],topic:[1,5,12],topolog:[20,27],torrmrotam:42,torsion:[],torsion_angl:40,torsion_bin:35,torsion_plot:22,torsion_sampl:[17,21,26,27,29,30,32],torsion_sampler_coil:[23,32],torsion_sampler_extend:[23,32],torsion_sampler_hel:32,torsion_sampler_helix:23,torsion_sampler_list:21,torsion_scor:32,torsionprob:21,torsionsampl:[17,19,21,22,23,26,27,29,30,32,35],torsionscor:[],total:[10,21,23,35,39],touch:[1,5,20],toward:[5,24,27,30,42,43,46],tpl:[0,25,26,30],tpr:[44,45],trace:30,track:[],tradition:7,trail:0,train:19,trajectori:[23,29],tran:[17,44,45],transform:[6,17,23,30,45],translat:[4,5,35,44,45],transomegators:17,treat:[5,20,30,31,32,45],treatment:43,tree:[1,4,5,12,39,40],treesolv:[31,39,40],trg:[0,9,26,30],tri:[23,24,30,37,39,45],trick:[1,12],trigger:[1,4,5,41],tripeptid:22,tripl:7,triplet:[],trp:44,trustworthi:12,tryptophan:44,ttccpsivarsnfnvcrlpgtpea:[26,30],ttccpsivarsnfnvcrlpgtpeaicatgytciiipgatcpgdyan:30,ttccpsivarsnfnvcrlpgtpeaicatytgciiipgatcpgdyan:[26,30],tupl:[6,7,17,20,21,23,24,28,30,31,37,39],turn:[0,1,7,10,12,30],tutori:5,tweak:30,twice:[10,34],two:[1,5,12,16,17,20,21,23,24,26,27,30,31,32,33,34,35,37,40,42,44,45],txt:[1,2,4,5,12],type:[],typedef:32,typenam:32,typic:[17,23,29,40,43],tyr:[44,45],tyrosin:44,uint32_t:32,uint:32,ultra:21,uncertain:5,uncharg:43,undefin:20,under:[4,5],undergo:[23,27,29,31],underli:[24,26],underscor:1,understand:12,undo:39,unexpect:2,unfavor:[17,27],unfavour:[27,29,37],unfortun:12,unhandl:[0,9],uniform:27,uniqu:[23,26,29,45],unittest:[1,5,12],unix:12,unknown:20,unless:[9,16,17,20,26,33,35],unlik:40,unrecognis:7,unset:[16,20,31],unsupport:[9,32],until:[5,27,30,34,39,43],untouch:17,untrack:1,unus:12,updat:[5,12,16,20,24,26,27,30,31,34],updatedistribut:22,updateposit:[20,27],upon:[27,29],upper:[],urei:20,urey_bradley_angl:20,usabl:12,usag:[0,9,19,21,26,27,31,39],use_amber_ff:30,use_bbdep_lib:31,use_frm:31,use_full_extend:30,use_scoring_extend:30,useclassicmod:35,useincludeenvmod:35,user:[],userlevel:1,usr:[2,5],usual:[1,2,4,5,9,10,12,17,26,30,33],utilis:[5,12],v_size:32,val:[22,44],valid:[0,12,17,24,29,30,31,39,41],valin:44,valu:[2,7,9,16,17,20,23,26,29,30,32,33,34,35,37,39,40,41,42,44,45,46],valueerror:[23,30],vanish:34,varadarajan:21,vari:[4,32],variabl:[1,2,5,10,14,20,28,30,32],variant:[20,26],variou:[1,2,4,12,25],vec3:[6,16,17,27,28,37,42,43],vec3list:23,vector:[20,22,26,32],verbos:1,veri:[1,5,7,12,20,23,30,32],verif:9,verifi:[1,7,12],version:[2,5,12,21,30,32,35,41,44],vertex:21,via:[1,5,9,11,20],view:[9,12,22,30,34],virtual:5,visibl:31,visual:14,wai:[1,2,4,5,12,17,18,20,21,26,35,40,41,44],wait:5,walk:[1,5],want:[1,2,5,11,12,17,21,23,26,27,30,34,35,42,43,45,46],warn:[5,12,30],watch:5,web:[2,5],weight:[21,23,26,29,33,35],weird:[23,27,40],well:[0,2,4,12,16,21,22,23,24,26,30,32,35,40,45],went:[0,5],were:[12,21,26,30,35],wether:39,what:[1,5,7,9,12,18,34,35],when:[1,4,5,9,10,16,17,20,21,22,23,24,26,29,30,31,32,34,35,37,39,41,42,43,45],whenev:[5,16,26,34],where:[0,1,4,5,7,9,10,12,16,17,20,21,22,26,30,32,33,34,35,39,41,42,43,45],wherea:21,whether:[5,7,17,20,21,26,27,29,31,34,39,42,43,45],which:[0,1,4,5,6,7,8,9,12,14,16,17,20,21,22,23,24,26,27,28,29,30,31,32,33,34,35,36,39,42,43,45],whistl:5,whitespac:0,who:[39,40],whole:[1,2,5,12,17,21,30,42],why:[1,12,43],width:[32,39,40],wild:4,window:23,window_length:23,wise:4,wish:[2,13,22,30],with_aa:26,with_db:26,within:[2,4,5,10,12,16,20,23,24,28,30,31,33,35,45],without:[1,4,5,7,9,20,21,24,27,30,34,41],won:[30,31,41,43],word:[4,41],work:[1,2,4,5,10,12,14,20,24,30,32,41],worst:12,would:[1,2,5,7,17,22,35,37,42],wrap:21,wrapper:[1,4,5,11,30],write:[],writebasetyp:32,writemagicnumb:32,writetypes:32,writeversionnumb:32,written:[5,32],wrong:[2,9],xlabel:22,xlim:22,xml:5,xxx:[17,44],xxx_num_atom:16,xxx_num_hydrogen:16,year:1,yet:[21,26],ylabel:22,ylim:22,you:[0,1,2,4,5,7,9,10,11,12,14,16,17,18,20,21,22,23,25,26,27,29,30,31,32,33,34,35,39,40,41,42,43,45,46],your:[],your_modul:[5,12],yourself:[2,5,12,30,39,43],zero:[0,21,30,45],zhou2005:21,zhou:21,zip:40},titles:["ProMod3 Actions","<code class=\"docutils literal\"><span class=\"pre\">test_actions</span></code> - Testing Actions","Building ProMod3","Changelog","ProMod3&#8216;s Share Of CMake","Contributing","Geometry functions","<code class=\"docutils literal\"><span class=\"pre\">helper</span></code> - Shared Functionality For the Everything","<code class=\"docutils literal\"><span class=\"pre\">core</span></code> - ProMod3 Core Functionality","<code class=\"docutils literal\"><span class=\"pre\">pm3argparse</span></code> - Parsing Command Lines","Runtime profiling","<code class=\"docutils literal\"><span class=\"pre\">SetCompoundsChemlib()</span></code>","ProMod3 Setup","Documentation For Developers","Getting Started","Welcome To ProMod3&#8217;s Documentation!","Handling All Atom Positions","Representing Loops","<code class=\"docutils literal\"><span class=\"pre\">loop</span></code> - Loop Handling","Loading Precomputed Objects","Generate <code class=\"docutils literal\"><span class=\"pre\">ost.mol.mm</span></code> systems","Structural Data","Sampling Dihedral Angles","Modelling Algorithms","Handling Gaps","<code class=\"docutils literal\"><span class=\"pre\">modelling</span></code> - Protein Modelling","Handling Loop Candidates","Fitting Loops Into Gaps","Model Checking","Generating Loops De Novo","Modelling Pipeline","Sidechain Reconstruction","Using Binary Files In ProMod3","All Atom Scorers","Backbone Score Environment","Backbone Scorers","<code class=\"docutils literal\"><span class=\"pre\">scoring</span></code> - Loop Scoring","Disulfid Bond Evaluation","Frame","Rotamer Graph","<code class=\"docutils literal\"><span class=\"pre\">sidechain</span></code> - Sidechain Modelling","Loading Rotamer Libraries","Rotamers","Rotamer Constructor","RotamerID","Rotamer Library","Subrotamer Optimization","Documentation For Users"],titleterms:{"class":[16,17,21,22,24,26,31,33,34,35],"default":30,"function":[4,6,7,8,24,31,34],acid:[16,20,22],action:[0,1,4,5],actiontestcas:1,algorithm:23,all:[16,27,33],allatomclashscor:33,allatomenv:16,allatomenvposit:16,allatominteractionscor:33,allatomoverallscor:33,allatompackingscor:33,allatomposit:16,allatomscor:33,amino:[16,20,22],angl:22,api:1,argument:9,atom:[16,27,33],backbon:[27,34,35,45],backbonelist:17,backboneoverallscor:35,backbonescor:35,backbonescoreenv:34,base:[21,33,35],binari:32,block:[23,42],bond:37,branch:12,build:[0,2,30,42],can:44,candid:26,cbetascor:35,cbpackingscor:35,ccd:27,chain:21,changelog:3,check:28,clashscor:35,closer:29,cmake:[1,2,4,12],code:32,command:9,construct:[34,43],constructor:43,contribut:5,conveni:34,cooler:29,core:8,creat:[1,20],data:[21,32],databas:21,defin:[21,22],definit:4,densityscor:35,depend:[2,45],detect:28,develop:13,dihedr:22,directori:12,distinguish:16,disulfid:37,document:[4,5,13,15,47],entri:45,enumerador:[],environ:34,evalu:37,everyth:7,exampl:[26,32],execut:1,exisit:32,extend:24,featur:[5,21],file:[7,32],find:21,fit:27,forcefield:20,fragment:21,frame:[38,43],gap:[24,27],gener:[20,29],geometr:21,geometri:6,get:[14,44],git:12,graph:39,group:42,handl:[16,18,24,26,30],have:1,hbondscor:35,header:32,helper:7,hook:12,how:[5,44],indic:15,instal:2,integr:1,introduct:[4,7,9],issu:5,keep:26,kic:27,librari:[41,45],licens:5,line:9,load:[19,41],lookup:20,loop:[17,18,20,26,27,29,36],loopcandid:26,mainten:4,make:[1,2],messag:7,model:[0,14,23,25,26,28,30,40],modul:[4,5],mol:20,molprob:28,must:1,non:45,novo:[23,29],object:[19,29,38],optim:46,ost:20,output:1,own:5,pairwis:34,pairwisescor:35,pars:9,parser:9,parti:5,particl:42,pipelin:[14,30],pm3argpars:9,portabl:32,posit:16,precomput:19,profil:10,promod3:[0,2,4,5,8,12,14,15,32],protein:25,psipredpredict:21,punch:28,quick:5,raw:30,reconstruct:31,reducedscor:35,relax:27,releas:3,repres:17,residu:43,rigid:23,ring:28,rotam:[39,41,42,43,45],rotamerid:44,run:[1,2,14],runtim:10,sampl:22,sampler:[22,29],score:[26,34,36],scorer:[5,29,33,35],script:1,sequenc:21,setcompoundschemlib:11,setup:12,share:[4,7],sidechain:[31,40],sidechainreconstructiondata:31,sidechainreconstructor:31,smallest:42,ssagreementscor:35,stage:12,start:[5,14],step:30,structur:[12,21],subclass:1,subrotam:46,system:20,tabl:15,test:[1,4,5,7],test_act:1,third:5,torsion:22,torsionscor:35,track:26,triplet:22,type:45,unit:[1,4,5],user:47,welcom:15,write:5,your:5}})
\ No newline at end of file
diff --git a/doc/html/sidechain/disulfid.html b/doc/html/sidechain/disulfid.html
index 2ba78a14..942dca59 100644
--- a/doc/html/sidechain/disulfid.html
+++ b/doc/html/sidechain/disulfid.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Disulfid Bond Evaluation &mdash; ProMod3 0 documentation</title>
+    <title>Disulfid Bond Evaluation &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,10 +23,10 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="sidechain - Sidechain Modelling" href="index.html" />
-    <link rel="next" title="Load Rotamer Libraries" href="loading.html" />
-    <link rel="prev" title="Rotamer Settings" href="sidechain_settings.html" />
+    <link rel="next" title="Loading Rotamer Libraries" href="loading.html" />
+    <link rel="prev" title="Rotamer Graph" href="graph.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -46,35 +46,111 @@ a disulfid bond, one would get an unfavourable energy due to &#8220;clashes&#822
 the sulfur atoms. It is possible to improve performance in sidechain
 reconstruction regarding cysteins when finding and separately handle
 disulfid bonds. PROMOD3 implements a simple geometrical description
-<a class="reference internal" href="#canutescu2003b" id="id1">[canutescu2003b]</a> .</p>
-<p>Two methods are implemented to evaluate this disulfid score on either rigid of
-flexible rotamers. The above paper proposes two rotamers to be in a disulfid
-bonded state, if the resulting score is below 45.</p>
+<a class="reference internal" href="#canutescu2003b" id="id1">[canutescu2003b]</a> . The paper proposes two rotamers to be in a disulfid
+bonded state, if the resulting disulfid score plus the self energies of the
+involved rotamers is below 45. If there are several cysteines close together,
+this problem gets another layer of complexity. One has to assure, that
+every cysteine only participates in one disulfid bond but the network
+of disulfid bonds is geometrically optimal. SCWRL4 proposes an approach,
+that has also been implemented here.</p>
+<dl class="method">
+<dt id="promod3.sidechain.DisulfidRawScore">
+<code class="descclassname">promod3.sidechain.</code><code class="descname">DisulfidRawScore</code><span class="sig-paren">(</span><em>ca_pos_one</em>, <em>cb_pos_one</em>, <em>sg_pos_one</em>, <em>ca_pos_two</em>, <em>cb_pos_two</em>, <em>sg_pos_two</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.DisulfidRawScore" title="Permalink to this definition">¶</a></dt>
+<dd><p>Evaluates the geometric expression based on the input positions</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>ca_pos_one</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; The CA position of first rotamer</li>
+<li><strong>cb_pos_one</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; The CB position of first rotamer</li>
+<li><strong>sg_pos_one</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; The gamma sulfur position of first rotamer</li>
+<li><strong>ca_pos_two</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; The CA position of second rotamer</li>
+<li><strong>cb_pos_two</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; The CB position of second rotamer</li>
+<li><strong>sg_pos_two</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; The gamma sulfur position of second rotamer</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">The result of the raw score</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
 <dl class="method">
 <dt id="promod3.sidechain.DisulfidScore">
 <code class="descclassname">promod3.sidechain.</code><code class="descname">DisulfidScore</code><span class="sig-paren">(</span><em>rotamer_one</em>, <em>rotamer_two</em>, <em>ca_pos_one</em>, <em>cb_pos_one</em>, <em>ca_pos_two</em>, <em>cb_pos_two</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.DisulfidScore" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
+<dd><p>Directly extracts the positions of the gamma sulfurs from the rotamers by
+searching for particles with the name &#8220;SG&#8221;. In case of <a class="reference internal" href="rotamer.html#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a>
+It expects exactly one gamma sulfur per rotamer. In case of
+<a class="reference internal" href="rotamer.html#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> there can be an arbitrary number of gamma sulfurs per
+rotamer (at least one), it then evaluates the score for all possible
+combinations of gamma sulfurs and takes the minimum score.
+To get a final DisulfidScore, it finally adds the self energies of the
+rotamers to the result of the geometric expression.</p>
+<table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
 <li><strong>rotamer_one</strong> (<a class="reference internal" href="rotamer.html#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> , <a class="reference internal" href="rotamer.html#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a>) &#8211; First rotamer</li>
 <li><strong>rotamer_two</strong> (<a class="reference internal" href="rotamer.html#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> , <a class="reference internal" href="rotamer.html#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a>) &#8211; Second rotamer</li>
-<li><strong>ca_pos_one</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; CA position of first rotamer</li>
-<li><strong>cb_pos_one</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; CB position of first rotamer</li>
-<li><strong>ca_pos_two</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; CA position of second rotamer</li>
-<li><strong>cb_pos_two</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; CB position of second rotamer</li>
+<li><strong>ca_pos_one</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; CA position of first rotamer</li>
+<li><strong>cb_pos_one</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; CB position of first rotamer</li>
+<li><strong>ca_pos_two</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; CA position of second rotamer</li>
+<li><strong>cb_pos_two</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; CB position of second rotamer</li>
 </ul>
 </td>
 </tr>
 <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if given rotamers do not contain
-exactly one particle representing the gamma sulfur.</p>
+exactly (in case of <a class="reference internal" href="rotamer.html#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a>) or at least (in case of
+<a class="reference internal" href="rotamer.html#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a>) one particle representing the gamma sulfur.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">The result of the raw score plus the average
+self energies of the input rotamers</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.ResolveCysteins">
+<code class="descclassname">promod3.sidechain.</code><code class="descname">ResolveCysteins</code><span class="sig-paren">(</span><em>rotamer_groups</em>, <em>ca_positions</em>, <em>cb_positions</em><span class="optional">[</span>, <em>score_threshold=45.0</em>, <em>optimize_subrotamers=False</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.ResolveCysteins" title="Permalink to this definition">¶</a></dt>
+<dd><p>Tries to optimize disulfid bond network. In a first step, all disulfid bonds
+get detected using <a class="reference internal" href="#promod3.sidechain.DisulfidScore" title="promod3.sidechain.DisulfidScore"><code class="xref py py-func docutils literal"><span class="pre">DisulfidScore()</span></code></a>. If the value between two rotamers is
+below <strong>score_threshold</strong>, they&#8217;re assumed to be bonded. The function then
+tries to detect the largest possible set of disulfide bonds, with no
+cysteine being part of more than one bond. If several largest sets are
+possible, the one with the optimal sum of scores gets estimated.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>rotamer_groups</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of
+<a class="reference internal" href="rotamer.html#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a>/<a class="reference internal" href="rotamer.html#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a>) &#8211; Every group represents a cysteine</li>
+<li><strong>ca_positions</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; The CA positions of the according rotamers</li>
+<li><strong>cb_positions</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; The CB positions of the according rotamers</li>
+<li><strong>score_threshold</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The score two rotamers must have to be considered
+as a disulfid bond</li>
+<li><strong>optimize_subrotamers</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; If set to true and the input consists of flexible
+rotamer groups, the active subrotamers get
+optimized. For every pair of rotamers
+participating in a disulfid bond, the subrotamers
+with best <a class="reference internal" href="#promod3.sidechain.DisulfidScore" title="promod3.sidechain.DisulfidScore"><code class="xref py py-func docutils literal"><span class="pre">DisulfidScore()</span></code></a> get activated in
+the input <strong>rotamer_groups</strong>. This has an effect
+when the rotamers get applied on residues.</li>
+</ul>
 </td>
 </tr>
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">The disulfid score based on geometric features. In case
-of <a class="reference internal" href="rotamer.html#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> as input, the minimal score
-between all possible subrotamer combinations gets
-returned.</p>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A <code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> containing two <code class="xref py py-class docutils literal"><span class="pre">list</span></code> objects with equal
+length. Both lists contain <code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> objects with two elements.
+The tuples in the first list describe the indices of cysteins
+participating in disulfid bonds. The tuples in the second list
+describe the optimal rotamers in the according rotamer groups.</p>
 </td>
 </tr>
 </tbody>
@@ -100,8 +176,8 @@ returned.</p>
   <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="docutils literal"><span class="pre">sidechain</span></code> - Sidechain Modelling</a><ul>
-      <li>Previous: <a href="sidechain_settings.html" title="previous chapter">Rotamer Settings</a></li>
-      <li>Next: <a href="loading.html" title="next chapter">Load Rotamer Libraries</a></li>
+      <li>Previous: <a href="graph.html" title="previous chapter">Rotamer Graph</a></li>
+      <li>Next: <a href="loading.html" title="next chapter">Loading Rotamer Libraries</a></li>
   </ul></li>
   </ul></li>
   </ul></li>
@@ -132,7 +208,7 @@ returned.</p>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/sidechain/frame.html b/doc/html/sidechain/frame.html
index 6a64329c..a0f8fddb 100644
--- a/doc/html/sidechain/frame.html
+++ b/doc/html/sidechain/frame.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Frame &mdash; ProMod3 0 documentation</title>
+    <title>Frame &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="sidechain - Sidechain Modelling" href="index.html" />
     <link rel="next" title="Rotamer Library" href="rotamer_lib.html" />
     <link rel="prev" title="Rotamers" href="rotamer.html" />
@@ -54,14 +54,12 @@ belonging to the frame residue with the same residue index are neglected.</p>
 <dl class="class">
 <dt id="promod3.sidechain.FrameResidue">
 <em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">FrameResidue</code><span class="sig-paren">(</span><em>particles</em>, <em>residue_index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FrameResidue" title="Permalink to this definition">¶</a></dt>
-<dd><p>The most simple way of constructing a frame residue is the usage
-of the convenient functions provided by PROMOD3.</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>particles</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference internal" href="rotamer.html#promod3.sidechain.Particle" title="promod3.sidechain.Particle"><code class="xref py py-class docutils literal"><span class="pre">Particle</span></code></a>) &#8211; particles building frame residue</li>
+<li><strong>particles</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="rotamer.html#promod3.sidechain.Particle" title="promod3.sidechain.Particle"><code class="xref py py-class docutils literal"><span class="pre">Particle</span></code></a>) &#8211; particles building frame residue</li>
 <li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Interaction energies between the constructed frame
 residue and any rotamer associated to the same
 residue index are neglected</li>
@@ -105,176 +103,13 @@ residue index are neglected</li>
 <dl class="class">
 <dt id="promod3.sidechain.Frame">
 <em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">Frame</code><span class="sig-paren">(</span><em>frame_residues</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.Frame" title="Permalink to this definition">¶</a></dt>
-<dd><p>The <a class="reference internal" href="#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a> object allows to calculate frame energies for rotamers.
-Due to technical reasons, this is only possible if the rotamers are
-part of rotamer groups.</p>
+<dd><p>The <a class="reference internal" href="#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a> object is used as a container for rigid particles, that
+can be passed to rotamer groups for calculating frame energies.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>frame_residues</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a>) &#8211; residues building the frame.</td>
-</tr>
-</tbody>
-</table>
-<dl class="method">
-<dt id="promod3.sidechain.Frame.SetFrameEnergy">
-<code class="descname">SetFrameEnergy</code><span class="sig-paren">(</span><em>rotamer_group</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.Frame.SetFrameEnergy" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates and sets frame energies for all rotamers in the rotamer group.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>rotamer_group</strong> (<a class="reference internal" href="rotamer.html#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a> / <a class="reference internal" href="rotamer.html#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a>) &#8211; group of rotamers for energy calculation</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.sidechain.Frame.AddFrameEnergy">
-<code class="descname">AddFrameEnergy</code><span class="sig-paren">(</span><em>rotamer_group</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.Frame.AddFrameEnergy" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates and adds frame energies to the already existing frame
-energy values for all rotamers in the rotamer group.
-This is useful if you have several <a class="reference internal" href="#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a> objects.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>rotamer_group</strong> (<a class="reference internal" href="rotamer.html#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a> / <a class="reference internal" href="rotamer.html#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a>) &#8211; group of rotamers for energy calculation</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-</div>
-<div class="section" id="convenient-functions-for-constructing-frame-residues">
-<h2>Convenient functions for constructing frame residues<a class="headerlink" href="#convenient-functions-for-constructing-frame-residues" title="Permalink to this headline">¶</a></h2>
-<p>PROMOD3 offers some functionality to construct frame residues for standard
-residues. The functions distinguish between backbone frame residue
-and sidechain frame residues.</p>
-<dl class="method">
-<dt id="promod3.sidechain.ConstructBackboneFrameResidue">
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructBackboneFrameResidue</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>c_pos</em>, <em>o_pos</em>, <em>cb_pos</em>, <em>id</em>, <em>residue_index</em>, <em>settings</em>, <em>phi</em><span class="optional">[</span>, <em>n_ter=False</em>, <em>c_ter=False</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.ConstructBackboneFrameResidue" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>n_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of backbone nitrogen atom</li>
-<li><strong>ca_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of backbone c-alpha carbon atom</li>
-<li><strong>c_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of backbone carbon atom</li>
-<li><strong>o_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of backbone oxygen atom</li>
-<li><strong>cb_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of backbone c-beta carbon atom</li>
-<li><strong>id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of <a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a></li>
-<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index this <a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> belongs to.
-Interactions to rotamers associated to the same
-index are neglected.</li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-<li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Phi backbone torsion angle required to construct the
-backbone hydrogen if hbonds get considered.</li>
-<li><strong>n_ter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether residue is n-terminal. If yes, the
-according backbone hydrogens get constructed if
-hbonds get considered.</li>
-<li><strong>c_ter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether residue is c-terminal. If yes, the
-according backbone oxygen gets constructed if
-hbonds get considered.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a></p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt>
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructBackboneFrameResidue</code><span class="sig-paren">(</span><em>residue</em>, <em>id</em>, <em>residue_index</em>, <em>settings</em>, <em>phi</em><span class="optional">[</span>, <em>n_ter=False</em>, <em>c_ter=False</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>residue</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue from which the backbone atoms are extracted.</li>
-<li><strong>id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of <a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a></li>
-<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index this <a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> belongs to.
-Interactions to rotamers associated to the same
-index are neglected.</li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-<li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Phi backbone torsion angle required to construct the
-backbone hydrogen if hbonds get considered.</li>
-<li><strong>n_ter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether residue is n-terminal. If yes, the
-according backbone hydrogens get constructed if
-hbonds get considered.</li>
-<li><strong>c_ter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether residue is c-terminal. If yes, the
-according backbone oxygen gets constructed if
-hbonds get considered.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> when not all required backbone
-atoms are present in <strong>residue</strong></p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a></p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.sidechain.ConstructSidechainFrameResidue">
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructSidechainFrameResidue</code><span class="sig-paren">(</span><em>residue</em>, <em>id</em>, <em>residue_index</em>, <em>settings</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.ConstructSidechainFrameResidue" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>residue</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue from which the sidechain atoms are extracted.</li>
-<li><strong>id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of <a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a></li>
-<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index this <a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> belongs to.</li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> when not all required sidechain
-atoms are present in <strong>residue</strong></p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a></p>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.sidechain.ConstructFrameResidue">
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructFrameResidue</code><span class="sig-paren">(</span><em>residue</em>, <em>residue_index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.ConstructFrameResidue" title="Permalink to this definition">¶</a></dt>
-<dd><p>Constructs a <a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> from a <a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>.
-This can be useful to mark a region occupied by a ligand. Note, that
-there won&#8217;t be any parametrization of hbonds in this function. All
-Atoms of the residue will be represented as carbons.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>residue</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue from which all atoms will be taken to
-construct a <a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a>.</li>
-<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index this <a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> belongs to.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a></p>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>frame_residues</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a>) &#8211; residues building the frame.</td>
 </tr>
 </tbody>
 </table>
@@ -293,7 +128,6 @@ construct a <a class="reference internal" href="#promod3.sidechain.FrameResidue"
   <ul>
 <li><a class="reference internal" href="#">Frame</a><ul>
 <li><a class="reference internal" href="#the-frame-objects">The Frame Objects</a></li>
-<li><a class="reference internal" href="#convenient-functions-for-constructing-frame-residues">Convenient functions for constructing frame residues</a></li>
 </ul>
 </li>
 </ul>
@@ -335,7 +169,7 @@ construct a <a class="reference internal" href="#promod3.sidechain.FrameResidue"
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/sidechain/graph.html b/doc/html/sidechain/graph.html
index 5f19e22d..3f088498 100644
--- a/doc/html/sidechain/graph.html
+++ b/doc/html/sidechain/graph.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Coming to a solution &mdash; ProMod3 0 documentation</title>
+    <title>Rotamer Graph &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,10 +23,10 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="sidechain - Sidechain Modelling" href="index.html" />
-    <link rel="next" title="Rotamer Settings" href="sidechain_settings.html" />
-    <link rel="prev" title="Rotamer Library" href="rotamer_lib.html" />
+    <link rel="next" title="Disulfid Bond Evaluation" href="disulfid.html" />
+    <link rel="prev" title="Rotamer Constructor" href="rotamer_constructor.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -39,60 +39,140 @@
         <div class="bodywrapper">
           <div class="body" role="main">
             
-  <div class="section" id="coming-to-a-solution">
-<h1>Coming to a solution<a class="headerlink" href="#coming-to-a-solution" title="Permalink to this headline">¶</a></h1>
+  <div class="section" id="rotamer-graph">
+<h1>Rotamer Graph<a class="headerlink" href="#rotamer-graph" title="Permalink to this headline">¶</a></h1>
 <p>Once having a frame representing the rigid parts, the internal energies in
 rotamer groups can be calculated. To come to a final solution of the sidechain
 modelling problem, the pairwise energies also have to be evaluated and an
 overall solution has to be found. PROMOD3 implements an interaction graph that
 takes a list of rotamer groups, calculates the pairwise energies, does edge
-decomposition and dead end elimination, decomposes the graph in a tree form
-and finally comes back with a solution.</p>
-<div class="section" id="the-interaction-graph">
-<h2>The Interaction Graph<a class="headerlink" href="#the-interaction-graph" title="Permalink to this headline">¶</a></h2>
+decomposition and dead end elimination. Solutions can finally be found
+using Tree decomposition, AStar or Monte Carlo approaches.</p>
 <dl class="class">
-<dt id="promod3.sidechain.Graph">
-<em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">Graph</code><a class="headerlink" href="#promod3.sidechain.Graph" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.RotamerGraph">
+<em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">RotamerGraph</code><a class="headerlink" href="#promod3.sidechain.RotamerGraph" title="Permalink to this definition">¶</a></dt>
 <dd><p>The Graph object has no constructor exported to python. It is meant to be
 constructed using the static create functions.</p>
 <dl class="staticmethod">
-<dt id="promod3.sidechain.Graph.CreateFromRRMList">
-<em class="property">static </em><code class="descname">CreateFromRRMList</code><span class="sig-paren">(</span><em>rotamer_groups</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.Graph.CreateFromRRMList" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.RotamerGraph.CreateFromRRMList">
+<em class="property">static </em><code class="descname">CreateFromRRMList</code><span class="sig-paren">(</span><em>rotamer_groups</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.CreateFromRRMList" title="Permalink to this definition">¶</a></dt>
+<dd></dd></dl>
+
+<dl class="staticmethod">
+<dt id="promod3.sidechain.RotamerGraph.CreateFromFRMList">
+<em class="property">static </em><code class="descname">CreateFromFRMList</code><span class="sig-paren">(</span><em>rotamer_groups</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.CreateFromFRMList" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>rotamer_groups</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; <a class="reference internal" href="rotamer.html#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a> objects representing the
-possible sidechain conformations for every amino
-acid position.</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>rotamer_groups</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; <a class="reference internal" href="rotamer.html#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a> or <a class="reference internal" href="rotamer.html#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a>
+objects representing the possible sidechain
+conformations for every amino acid position.</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
-<dl class="staticmethod">
-<dt id="promod3.sidechain.Graph.CreateFromFRMList">
-<em class="property">static </em><code class="descname">CreateFromFRMList</code><span class="sig-paren">(</span><em>rotamer_groups</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.Graph.CreateFromFRMList" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
+<dl class="method">
+<dt id="promod3.sidechain.RotamerGraph.Prune">
+<code class="descname">Prune</code><span class="sig-paren">(</span><em>epsilon</em><span class="optional">[</span>, <em>e_cut=0.0</em>, <em>consider_all_nodes=False</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.Prune" title="Permalink to this definition">¶</a></dt>
+<dd><p>Performs edge decomposition followed by dead end elimination in an
+iterative manner until no changes can be observed anymore given
+<strong>epsilon</strong>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>epsilon</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The energy threshold to perform edge decomposition.</li>
+<li><strong>e_cut</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Parameter to control dead end elimination. If set to
+0.0, the default goldstein criterion is applied =&gt;
+the rotamer gets removed if it&#8217;s dominated by all other
+rotamers in the same node. If you increase this value,
+a rotamer must be dominated by at least this <strong>e_cut</strong>.</li>
+<li><strong>consider_all_nodes</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, wether the dead end elimination should be
+applied to all nodes, or only those who are
+connected with an edge removed by edge
+decomposition. This is useful if already a Prune
+operation has been performed =&gt; only those nodes
+connected to a removed edge have the chance for
+successful dead end elimination.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.RotamerGraph.ApplyDEE">
+<code class="descname">ApplyDEE</code><span class="sig-paren">(</span><em>node_idx</em><span class="optional">[</span>, <em>e_cut=0.0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.ApplyDEE" title="Permalink to this definition">¶</a></dt>
+<dd><p>Applies dead end elimination on one particular node and potentially
+deactivates certain rotamers.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>node_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Node to apply dead end elimination</li>
+<li><strong>e_cut</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; If set to
+0.0, the default goldstein criterion is applied =&gt;
+the rotamer gets removed if it&#8217;s dominated by all other
+rotamers in the same node. If you increase this value,
+a rotamer must be dominated by at least this <strong>e_cut</strong>.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a> whether any rotamer has been deactivated.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.RotamerGraph.ApplyEdgeDecomposition">
+<code class="descname">ApplyEdgeDecomposition</code><span class="sig-paren">(</span><em>edge_idx</em>, <em>epsilon</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.ApplyEdgeDecomposition" title="Permalink to this definition">¶</a></dt>
+<dd><p>Applies edge decomposition on one particular edge and potentially
+deactivates it.</p>
+<table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>rotamer_groups</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; <a class="reference internal" href="rotamer.html#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a> objects representing the
-possible sidechain conformations for every amino
-acid position.</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>edge_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Edge to decompose.
+the idx relates to the list you get back
+when calling the <a class="reference internal" href="#promod3.sidechain.RotamerGraph.GetEdges" title="promod3.sidechain.RotamerGraph.GetEdges"><code class="xref py py-meth docutils literal"><span class="pre">GetEdges()</span></code></a> function.</li>
+<li><strong>epsilon</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The energy threshold to perform edge decomposition.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a> whether the edge has been decomposed and
+deactivated</p>
+</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.Graph.Solve">
-<code class="descname">Solve</code><span class="sig-paren">(</span><span class="optional">[</span><em>max_complexity=inf</em>, <em>initial_epsilon=0.02</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.Graph.Solve" title="Permalink to this definition">¶</a></dt>
-<dd><p>The method solves a graph by iteratively performing dead end elimination
-and edge decomposition until the number of possible permutations, that
-have to be enumerated in the resulting tree, fall below
-<strong>max_complecity</strong>. In every iteration the epsilon value gets doubled to
-enforce more edges to be approximated by edge decomposition. This function
+<dt id="promod3.sidechain.RotamerGraph.Reset">
+<code class="descname">Reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.Reset" title="Permalink to this definition">¶</a></dt>
+<dd><p>Resets the graph by undoing any pruning operation (DEE and edge decomposition)</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.RotamerGraph.TreeSolve">
+<code class="descname">TreeSolve</code><span class="sig-paren">(</span><span class="optional">[</span><em>max_complexity=inf</em>, <em>initial_epsilon=0.02</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.TreeSolve" title="Permalink to this definition">¶</a></dt>
+<dd><p>The method solves a rotamer graph using a minimal width tree decomposition
+approach in an iterative manner. In every iteration, the algorithm performs
+a pruning step (DEE / Edge Decomposition) and subsequently tries to solve
+each connected component in the graph separately.
+If the number of possible enumerations in the tree constructetd from a
+particular connected component is is larger <strong>max_complexity</strong>,
+this component is solved in a later iteration. The algorithm iterates until
+all connected components are solved and steadily increases the epsilon value
+resulting in a more and more agressive edge decomposition. This function
 assumes all self energies of the rotamers to be calculated and properly set!</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
@@ -107,8 +187,10 @@ decomposition.</li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Indices representing the single rotamers minimizing
-the overall energy functions from every rotamer group.</p>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A tuple with the first element being a list of indices
+representing the single rotamers minimizing
+the overall energy functions from every rotamer group.
+The second element is the according energy value.</p>
 </td>
 </tr>
 </tbody>
@@ -116,48 +198,108 @@ the overall energy functions from every rotamer group.</p>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.Graph.Prune">
-<code class="descname">Prune</code><span class="sig-paren">(</span><em>epsilon</em><span class="optional">[</span>, <em>consider_all_nodes=False</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.Graph.Prune" title="Permalink to this definition">¶</a></dt>
-<dd><p>Performs edge decomposition followed by dead end elimination in an
-iterative manner until no changes can be observed anymore given
-<strong>epsilon</strong>.</p>
+<dt id="promod3.sidechain.RotamerGraph.AStarSolve">
+<code class="descname">AStarSolve</code><span class="sig-paren">(</span><em>e_thresh</em><span class="optional">[</span>, <em>max_n=100</em>, <em>max_visited_nodes=100000000</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.AStarSolve" title="Permalink to this definition">¶</a></dt>
+<dd><p>The method solves a rotamer graph using the A* algorithm. Besides creating
+minimal energy solution, the function produces a maximum of <strong>max_n</strong>
+solutions sorted by energy. It aborts as soon as it sees the first solution
+with an energy difference of <strong>e_thresh</strong> to the optimal solution or hits
+<strong>max_n</strong>. If you&#8217;re only interested in the optimal solution you should use
+the TreeSolve function since it&#8217;s much faster and uses less memory.
+There is no automatic pruning of the graph using DEE or edge decomposition,
+so you have to do it by yourself, otherwise you&#8217;ll have a looooooong
+runtime or even hit the <strong>max_visited_nodes</strong> parameter that caps the memory
+usage.
+To have a valid solution you have to take care that you set the <strong>e_cut</strong>
+parameter in the pruning function to <strong>e_tresh</strong>.
+This function assumes all self energies of the rotamers to be calculated
+and properly set!</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>epsilon</strong> &#8211; The energy threshold to perform edge decomposition.</li>
-<li><strong>consider_all_nodes</strong> &#8211; Flag, wether the dead end elimination should be
-applied to all nodes, or only those who are
-connected with an edge removed by edge
-decomposition. This is useful if already a Prune
-operation has been performed =&gt; only those nodes
-connected to a removed edge have the chance for
-successful dead end elimination.</li>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>e_thresh</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Maximal energy difference of a solution to the
+optimal solution to be considered.</li>
+<li><strong>max_n</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; The maximum number of solutions that will be generated.</li>
+<li><strong>max_visited_nodes</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Caps the memory usage of the algorithm. Besides
+The memory used for pairwise energies and self
+energies, the algorithm uses about
+<strong>max_visited_nodes</strong> * 20 bytes.</li>
 </ul>
 </td>
 </tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A tuple with the first element being a list of
+solutions with indices representing the single rotamers
+selected for that solution. The second element is a list
+of energies for the according solutions.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.RotamerGraph.MCSolve">
+<code class="descname">MCSolve</code><span class="sig-paren">(</span><span class="optional">[</span><em>n=100</em>, <em>mc_steps=100000</em>, <em>start_temperature=1000.0</em>, <em>change_frequency=1000</em>, <em>cooling_factor=0.9</em>, <em>seed=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.MCSolve" title="Permalink to this definition">¶</a></dt>
+<dd><p>Does a total of <strong>n</strong> Monte Carlo runs to find low energy solutions
+of the RotamerGraph. Each run starts with a random rotamer
+configuration. At each of the <strong>mc_steps</strong> steps, a random location and
+a random rotamer at that location is selected and an energy difference
+of that random selection relative to the current configuration is
+estimated. If the difference in energy is negative, the step is
+accepted. If not, the step is accepted with a probability given by
+the temperature dependent Metropolis criterion (exp(-ediff/T)).
+The temperature for every run starts with <strong>start_temperature</strong>
+and is multiplied every <strong>change_frequency</strong> steps with <strong>cooling_factor</strong>
+to achieve a simulated annealing effect.
+There is no automatic pruning of the graph using DEE or edge decomposition,
+you have to do that by yourself.
+This function assumes all self energies of the rotamers to be calculated
+and properly set!</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>n</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of Monte Carlo runs</li>
+<li><strong>mc_steps</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of Monte Carlo steps per run</li>
+<li><strong>start_temperature</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Start temperature for the temperature dependent
+Metropolis criterion</li>
+<li><strong>change_frequency</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Number of steps the temperature stays the same</li>
+<li><strong>cooling_factor</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Factor to multiply temperature each
+<strong>change_frequency</strong> steps</li>
+<li><strong>seed</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Seed for random number generator</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A tuple with the first element being a list of
+solutions with indices representing the single rotamers
+selected for that solution. The second element is a list
+of energies for the according solutions.</p>
+</td>
+</tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.Graph.GetNumNodes">
-<code class="descname">GetNumNodes</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.Graph.GetNumNodes" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.RotamerGraph.GetNumNodes">
+<code class="descname">GetNumNodes</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.GetNumNodes" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The number of nodes in the graph
-=&gt; every rotamer group is a node</td>
+=&gt; every RotamerGroup is a node</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.Graph.GetNumEdges">
-<code class="descname">GetNumEdges</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.Graph.GetNumEdges" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.RotamerGraph.GetNumEdges">
+<code class="descname">GetNumEdges</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.GetNumEdges" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
@@ -171,22 +313,22 @@ nonzero interaction</td>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.Graph.GetNumActiveNodes">
-<code class="descname">GetNumActiveNodes</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.Graph.GetNumActiveNodes" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.RotamerGraph.GetNumActiveNodes">
+<code class="descname">GetNumActiveNodes</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.GetNumActiveNodes" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The number of nodes having at least one edge, even
-after performing pruning operations</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The number of nodes having more than one active rotamer,
+even after performing pruning operations</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.Graph.GetNumActiveEdges">
-<code class="descname">GetNumActiveEdges</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.Graph.GetNumActiveEdges" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.RotamerGraph.GetNumActiveEdges">
+<code class="descname">GetNumActiveEdges</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.GetNumActiveEdges" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
@@ -198,9 +340,124 @@ even after performing pruning operations</td>
 </table>
 </dd></dl>
 
+<dl class="method">
+<dt id="promod3.sidechain.RotamerGraph.GetNumRotamers">
+<code class="descname">GetNumRotamers</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.GetNumRotamers" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The total number of rotamers in the graph</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.RotamerGraph.GetNumActiveRotamers">
+<code class="descname">GetNumActiveRotamers</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.GetNumActiveRotamers" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The total number of active rotamers (Total number of
+rotamers minus those that have been deactivated by DEE)</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.RotamerGraph.GetEdges">
+<code class="descname">GetEdges</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.GetEdges" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A list of tuples describing the edges
+connecting nodes with nonzero pairwise interactions</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.RotamerGraph.GetActiveEdges">
+<code class="descname">GetActiveEdges</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.GetActiveEdges" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A <code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <code class="xref py py-class docutils literal"><span class="pre">tuples</span></code> describing the edges
+connecting nodes with nonzero pairwise interactions
+(All edges minus those that have been deactived by edge
+decomposition)</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.RotamerGraph.GetActiveRotamers">
+<code class="descname">GetActiveRotamers</code><span class="sig-paren">(</span><em>node_idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.GetActiveRotamers" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>node_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Specifies node from which the active rotamers should be
+extracted</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list of the rotamers that are active
+in specified node (all rotamers minus those that have
+been deactivated using DEE)</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.RotamerGraph.GetSelfEnergies">
+<code class="descname">GetSelfEnergies</code><span class="sig-paren">(</span><em>node_idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.GetSelfEnergies" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>node_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Specifies node from which the self energies should be
+extracted</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list of self energies for all rotamers in
+specified node as they are fed into the solving
+algorithms. Note, that they might slightly differ
+from the original self energies in the input rotamers
+because of approximations introduced in edge
+decomposition.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.RotamerGraph.GetPairwiseEnergies">
+<code class="descname">GetPairwiseEnergies</code><span class="sig-paren">(</span><em>edge_idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerGraph.GetPairwiseEnergies" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>edge_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Specifies edge from which the pairwise energies should
+be extracted, the idx relates to the list you get back
+when calling the <a class="reference internal" href="#promod3.sidechain.RotamerGraph.GetEdges" title="promod3.sidechain.RotamerGraph.GetEdges"><code class="xref py py-meth docutils literal"><span class="pre">GetEdges()</span></code></a> function.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list of list where you can extract
+the energy of rotamer i in the first node in the
+edge with rotamer j in the second node in the edge
+with: e = pairwise_energies[i][j]</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
 </dd></dl>
 
-</div>
 </div>
 
 
@@ -208,22 +465,14 @@ even after performing pruning operations</td>
         </div>
       </div>
       <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
-        <div class="sphinxsidebarwrapper">
-  <h3><a href="../index.html">Table Of Contents</a></h3>
-  <ul>
-<li><a class="reference internal" href="#">Coming to a solution</a><ul>
-<li><a class="reference internal" href="#the-interaction-graph">The Interaction Graph</a></li>
-</ul>
-</li>
-</ul>
-<div class="relations">
+        <div class="sphinxsidebarwrapper"><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="docutils literal"><span class="pre">sidechain</span></code> - Sidechain Modelling</a><ul>
-      <li>Previous: <a href="rotamer_lib.html" title="previous chapter">Rotamer Library</a></li>
-      <li>Next: <a href="sidechain_settings.html" title="next chapter">Rotamer Settings</a></li>
+      <li>Previous: <a href="rotamer_constructor.html" title="previous chapter">Rotamer Constructor</a></li>
+      <li>Next: <a href="disulfid.html" title="next chapter">Disulfid Bond Evaluation</a></li>
   </ul></li>
   </ul></li>
   </ul></li>
@@ -254,7 +503,7 @@ even after performing pruning operations</td>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/sidechain/index.html b/doc/html/sidechain/index.html
index 7459be07..319cf658 100644
--- a/doc/html/sidechain/index.html
+++ b/doc/html/sidechain/index.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>sidechain - Sidechain Modelling &mdash; ProMod3 0 documentation</title>
+    <title>sidechain - Sidechain Modelling &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,10 +23,10 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="Documentation For Users" href="../users.html" />
     <link rel="next" title="RotamerID" href="rotamer_id.html" />
-    <link rel="prev" title="Helper Classes" href="../loop/helper_classes.html" />
+    <link rel="prev" title="Modelling Algorithms" href="../modelling/algorithms.html" />
    
   
   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
@@ -41,79 +41,26 @@
             
   <div class="section" id="module-promod3.sidechain">
 <span id="sidechain-sidechain-modelling"></span><h1><a class="reference internal" href="#module-promod3.sidechain" title="promod3.sidechain: Sidechain Modelling"><code class="xref py py-mod docutils literal"><span class="pre">sidechain</span></code></a> - Sidechain Modelling<a class="headerlink" href="#module-promod3.sidechain" title="Permalink to this headline">¶</a></h1>
-<p>Tools and algorithms to model sidechains given backbone coordinates.
-The full module is heavily based on SCWRL4 <a class="reference internal" href="loading.html#krivov2009" id="id1">[krivov2009]</a> .
-The according paper describes the modelling of sidechains using two different
-rotamer models. A rigid model, as well as a flexible model. Both models are
-implemented in PROMOD3 and can be applied in flexible ways.</p>
-<div class="section" id="reconstruct-function">
-<h2>Reconstruct Function<a class="headerlink" href="#reconstruct-function" title="Permalink to this headline">¶</a></h2>
-<p>The simplest usage of the module is provided by the <a class="reference internal" href="#promod3.sidechain.Reconstruct" title="promod3.sidechain.Reconstruct"><code class="xref py py-func docutils literal"><span class="pre">Reconstruct()</span></code></a>
-function:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span><span class="p">,</span> <span class="n">mol</span>
-<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">sidechain</span>
-
-<span class="c"># load a protein </span>
-<span class="n">prot</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="s">&#39;1eye&#39;</span><span class="p">,</span><span class="n">remote</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
-<span class="c"># get only amino acids</span>
-<span class="n">prot</span> <span class="o">=</span> <span class="n">mol</span><span class="o">.</span><span class="n">CreateEntityFromView</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;peptide=true&quot;</span><span class="p">),</span> <span class="bp">True</span><span class="p">)</span>
-<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">prot</span><span class="p">,</span> <span class="s">&#39;sidechain_test_orig.pdb&#39;</span><span class="p">)</span>
-<span class="c"># reconstruct sidechains</span>
-<span class="n">sidechain</span><span class="o">.</span><span class="n">Reconstruct</span><span class="p">(</span><span class="n">prot</span><span class="p">)</span>
-<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">prot</span><span class="p">,</span> <span class="s">&#39;sidechain_test_rec.pdb&#39;</span><span class="p">)</span>
-</pre></div>
-</div>
-<dl class="method">
-<dt id="promod3.sidechain.Reconstruct">
-<code class="descclassname">promod3.sidechain.</code><code class="descname">Reconstruct</code><span class="sig-paren">(</span><em>prot</em>, <em>keep_sidechains=False</em>, <em>build_disulfids</em>, <em>rotamer_model=&quot;frm&quot;</em>, <em>consider_hbonds=True</em>, <em>rotamer_library=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/promod3/sidechain/_reconstruct_sidechains.html#Reconstruct"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.sidechain.Reconstruct" title="Permalink to this definition">¶</a></dt>
-<dd><p>The function takes a structure and reconstructs its sidechains given the input
-parameters.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>prot</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.EntityHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.EntityHandle</span></code></a>) &#8211; Structure for sidechain reconstruction. Note, that the
-sidechain reconstruction gets directly applied on the
-structure itself.</li>
-<li><strong>keep_sidechains</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether complete sidechains in <em>prot</em> (i.e.
-containing all required atoms) should be kept rigid
-and directly be added to the frame.</li>
-<li><strong>build_disulfids</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether possible disulfid bonds should be
-searched. If a disulfid bond is found, the two
-participating cysteins are fixed and added to
-the frame.</li>
-<li><strong>rotamer_model</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Rotamer model to be used, can either be &#8220;frm&#8221; or &#8220;rrm&#8221;</li>
-<li><strong>consider_hbonds</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether hbonds should be evaluated in the energy
-function. If set to False, no hydrogens will be built
-when building rotamers and frame and the <strong>add_polar_hydrogens</strong>
-flag won&#8217;t have any consequences.</li>
-<li><strong>rotamer_library</strong> (<a class="reference internal" href="rotamer_lib.html#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a> / <a class="reference internal" href="rotamer_lib.html#promod3.sidechain.RotamerLib" title="promod3.sidechain.RotamerLib"><code class="xref py py-class docutils literal"><span class="pre">RotamerLib</span></code></a>) &#8211; A rotamer library to extract the
-rotamers from.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</div>
-<div class="section" id="sidechain-module-functionality">
-<h2>Sidechain Module Functionality<a class="headerlink" href="#sidechain-module-functionality" title="Permalink to this headline">¶</a></h2>
+<p>Tools and algorithms to model sidechains given backbone coordinates. The full
+module is heavily based on SCWRL4 <a class="reference internal" href="#krivov2009" id="id1">[krivov2009]</a> . The according paper describes
+the modelling of sidechains using two different rotamer models. A rigid model,
+as well as a flexible model. Both models are implemented in PROMOD3 and can be
+applied in flexible ways.</p>
 <p>The following code fragment shows an example of a basic sidechain reconstruction
-algorithm using the functionality in the module. Note, that this code will
-crash as soon as you have structures containing all the weirdness the PDB throws
-at us. In this case, you should use the <a class="reference internal" href="#promod3.sidechain.Reconstruct" title="promod3.sidechain.Reconstruct"><code class="xref py py-func docutils literal"><span class="pre">Reconstruct()</span></code></a>
-function above. An overview of the full provided functionality can be found at
-the bottom of this page.</p>
+algorithm using the functionality in the module. Note, that this code will crash
+as soon as you have structures containing all the weirdness the PDB throws at
+us. In this case, you should use the full fletched sidechain reconstruction
+pipelines available in the modelling module.</p>
 <div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span><span class="p">,</span><span class="n">mol</span>
 <span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">sidechain</span>
 
 <span class="c"># load a protein</span>
-<span class="n">prot</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="s">&#39;1eye&#39;</span><span class="p">,</span> <span class="n">remote</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
-<span class="c"># load rotamer library and settings with default values</span>
-<span class="n">settings</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">RotamerSettings</span><span class="p">()</span>
+<span class="n">prot</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="s">&#39;data/1CRN.pdb&#39;</span><span class="p">)</span>
+<span class="c"># load rotamer library</span>
 <span class="n">library</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">LoadDunbrackLib</span><span class="p">()</span>
+<span class="c"># we need a rotamer constructor to create any rotamers or </span>
+<span class="c"># frame residues</span>
+<span class="n">rot_constructor</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">SCWRLRotamerConstructor</span><span class="p">()</span>
 
 <span class="c"># create new entity from protein only containing the amino acids</span>
 <span class="n">prot</span> <span class="o">=</span> <span class="n">mol</span><span class="o">.</span><span class="n">CreateEntityFromView</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">Select</span><span class="p">(</span><span class="s">&quot;peptide=true&quot;</span><span class="p">),</span> <span class="bp">True</span><span class="p">)</span>
@@ -141,9 +88,9 @@ the bottom of this page.</p>
 <span class="c"># cystein sidechains</span>
 <span class="n">frame_residues</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
 <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">prot</span><span class="o">.</span><span class="n">residues</span><span class="p">):</span>
-    <span class="n">frame_residue</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructBackboneFrameResidue</span><span class="p">(</span>
-                        <span class="n">r</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">i</span><span class="p">,</span> <span class="n">settings</span><span class="p">,</span>
-                        <span class="n">torsion_angles</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="mi">0</span><span class="p">],</span> <span class="n">i</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span>
+    <span class="n">frame_residue</span> <span class="o">=</span> <span class="n">rot_constructor</span><span class="o">.</span><span class="n">ConstructBackboneFrameResidue</span><span class="p">(</span>
+                        <span class="n">r</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">i</span><span class="p">,</span>
+                        <span class="n">torsion_angles</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="mi">0</span><span class="p">],</span> <span class="n">i</span> <span class="o">==</span> <span class="mi">0</span><span class="p">,</span>
                         <span class="n">i</span> <span class="o">==</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">rotamer_ids</span><span class="p">)</span><span class="o">-</span><span class="mi">1</span><span class="p">))</span>
     <span class="n">frame_residues</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">frame_residue</span><span class="p">)</span>
 
@@ -158,13 +105,11 @@ the bottom of this page.</p>
     <span class="k">if</span> <span class="n">r</span><span class="o">.</span><span class="n">GetName</span><span class="p">()</span> <span class="o">==</span> <span class="s">&quot;ALA&quot;</span> <span class="ow">or</span> <span class="n">r</span><span class="o">.</span><span class="n">GetName</span><span class="p">()</span> <span class="o">==</span> <span class="s">&quot;GLY&quot;</span><span class="p">:</span>
       <span class="k">continue</span>
 
-    <span class="n">rot_group</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">ConstructFRMRotamerGroup</span><span class="p">(</span>
-                    <span class="n">r</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">i</span><span class="p">,</span> <span class="n">library</span><span class="p">,</span> <span class="n">settings</span><span class="p">,</span>
+    <span class="n">rot_group</span> <span class="o">=</span> <span class="n">rot_constructor</span><span class="o">.</span><span class="n">ConstructFRMRotamerGroup</span><span class="p">(</span>
+                    <span class="n">r</span><span class="p">,</span> <span class="n">rotamer_ids</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">i</span><span class="p">,</span> <span class="n">library</span><span class="p">,</span>
                     <span class="n">torsion_angles</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="mi">0</span><span class="p">],</span> <span class="n">torsion_angles</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="mi">1</span><span class="p">])</span>
 
-    <span class="c"># internal and frame energy have to be calculated directly</span>
-    <span class="n">rot_group</span><span class="o">.</span><span class="n">CalculateInternalEnergies</span><span class="p">()</span>
-    <span class="n">frame</span><span class="o">.</span><span class="n">SetFrameEnergy</span><span class="p">(</span><span class="n">rot_group</span><span class="p">)</span>
+    <span class="n">rot_group</span><span class="o">.</span><span class="n">SetFrameEnergy</span><span class="p">(</span><span class="n">frame</span><span class="p">)</span>
     <span class="c"># remove super unlikely rotamer in rotamer group </span>
     <span class="c"># e.g. those who clash with the frame</span>
     <span class="n">rot_group</span><span class="o">.</span><span class="n">ApplySelfEnergyThresh</span><span class="p">()</span>
@@ -174,10 +119,10 @@ the bottom of this page.</p>
 
 
 <span class="c"># buildup a graph given the rotamer groups</span>
-<span class="n">graph</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">Graph</span><span class="o">.</span><span class="n">CreateFromFRMList</span><span class="p">(</span><span class="n">rotamer_groups</span><span class="p">)</span>
+<span class="n">graph</span> <span class="o">=</span> <span class="n">sidechain</span><span class="o">.</span><span class="n">RotamerGraph</span><span class="o">.</span><span class="n">CreateFromFRMList</span><span class="p">(</span><span class="n">rotamer_groups</span><span class="p">)</span>
 
-<span class="c"># and get a solution out of it</span>
-<span class="n">solution</span> <span class="o">=</span> <span class="n">graph</span><span class="o">.</span><span class="n">Solve</span><span class="p">()</span>
+<span class="c"># and get a solution out of it using a minimal width tree approach</span>
+<span class="n">solution</span> <span class="o">=</span> <span class="n">graph</span><span class="o">.</span><span class="n">TreeSolve</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
 
 <span class="c"># let&#39;s finally apply the solution to the residues</span>
 <span class="k">for</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">rot_group</span><span class="p">,</span> <span class="n">sol</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">aa_with_rotamers</span><span class="p">,</span>
@@ -200,13 +145,10 @@ the bottom of this page.</p>
 <li class="toctree-l2"><a class="reference internal" href="rotamer.html#the-smallest-building-block-the-particle">The Smallest Building Block - The Particle</a></li>
 <li class="toctree-l2"><a class="reference internal" href="rotamer.html#id1">Rotamers</a></li>
 <li class="toctree-l2"><a class="reference internal" href="rotamer.html#rotamer-groups">Rotamer Groups</a></li>
-<li class="toctree-l2"><a class="reference internal" href="rotamer.html#convenient-functions-for-constructing-rotamers">Convenient functions for constructing rotamers</a></li>
-<li class="toctree-l2"><a class="reference internal" href="rotamer.html#convenient-functions-for-constructing-rotamer-groups">Convenient functions for constructing rotamer groups</a></li>
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" href="frame.html">Frame</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="frame.html#the-frame-objects">The Frame Objects</a></li>
-<li class="toctree-l2"><a class="reference internal" href="frame.html#convenient-functions-for-constructing-frame-residues">Convenient functions for constructing frame residues</a></li>
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" href="rotamer_lib.html">Rotamer Library</a><ul>
@@ -215,16 +157,22 @@ the bottom of this page.</p>
 <li class="toctree-l2"><a class="reference internal" href="rotamer_lib.html#the-library-entry-type">The Library Entry Type</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="graph.html">Graph</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="graph.html#the-interaction-graph">The Interaction Graph</a></li>
+<li class="toctree-l1"><a class="reference internal" href="rotamer_constructor.html">Rotamer Constructor</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="rotamer_constructor.html#constructing-rotamers-and-frame-residues">Constructing Rotamers and Frame Residues</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="sidechain_settings.html">The Settings - Control Things...</a></li>
+<li class="toctree-l1"><a class="reference internal" href="graph.html">Rotamer Graph</a></li>
 <li class="toctree-l1"><a class="reference internal" href="disulfid.html">Disulfid Bond Evaluation</a></li>
-<li class="toctree-l1"><a class="reference internal" href="loading.html">Loading Libraries</a></li>
+<li class="toctree-l1"><a class="reference internal" href="loading.html">Loading Rotamer Libraries</a></li>
+<li class="toctree-l1"><a class="reference internal" href="subrotamer_optimizer.html">Subrotamer Optimization</a></li>
 </ul>
 </div>
-</div>
+<table class="docutils citation" frame="void" id="krivov2009" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a class="fn-backref" href="#id1">[krivov2009]</a></td><td>Krivov GG, Shapovalov MV and Dunbrack RL Jr. (2009). Improved prediction of protein side-chain conformations with SCWRL4. Proteins.</td></tr>
+</tbody>
+</table>
 </div>
 
 
@@ -232,21 +180,12 @@ the bottom of this page.</p>
         </div>
       </div>
       <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
-        <div class="sphinxsidebarwrapper">
-  <h3><a href="../index.html">Table Of Contents</a></h3>
-  <ul>
-<li><a class="reference internal" href="#"><code class="docutils literal"><span class="pre">sidechain</span></code> - Sidechain Modelling</a><ul>
-<li><a class="reference internal" href="#reconstruct-function">Reconstruct Function</a></li>
-<li><a class="reference internal" href="#sidechain-module-functionality">Sidechain Module Functionality</a></li>
-</ul>
-</li>
-</ul>
-<div class="relations">
+        <div class="sphinxsidebarwrapper"><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>Previous: <a href="../loop/helper_classes.html" title="previous chapter">Helper Classes</a></li>
+      <li>Previous: <a href="../modelling/algorithms.html" title="previous chapter">Modelling Algorithms</a></li>
       <li>Next: <a href="rotamer_id.html" title="next chapter">RotamerID</a></li>
   </ul></li>
   </ul></li>
@@ -277,7 +216,7 @@ the bottom of this page.</p>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/sidechain/loading.html b/doc/html/sidechain/loading.html
index 90e07768..698ff730 100644
--- a/doc/html/sidechain/loading.html
+++ b/doc/html/sidechain/loading.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Load Rotamer Libraries &mdash; ProMod3 0 documentation</title>
+    <title>Loading Rotamer Libraries &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,9 +23,9 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="sidechain - Sidechain Modelling" href="index.html" />
-    <link rel="next" title="core - ProMod3 Core Functionality" href="../core/index.html" />
+    <link rel="next" title="Subrotamer Optimization" href="subrotamer_optimizer.html" />
     <link rel="prev" title="Disulfid Bond Evaluation" href="disulfid.html" />
    
   
@@ -39,10 +39,10 @@
         <div class="bodywrapper">
           <div class="body" role="main">
             
-  <div class="section" id="load-rotamer-libraries">
-<h1>Load Rotamer Libraries<a class="headerlink" href="#load-rotamer-libraries" title="Permalink to this headline">¶</a></h1>
+  <div class="section" id="loading-rotamer-libraries">
+<h1>Loading Rotamer Libraries<a class="headerlink" href="#loading-rotamer-libraries" title="Permalink to this headline">¶</a></h1>
 <p>Since the PROMOD3 sidechain modelling algorithms are mainly designed after the
-work of the Dunbrack lab <a class="reference internal" href="#krivov2009" id="id1">[krivov2009]</a> , their backbone dependent rotamer
+work of the Dunbrack lab <a class="reference internal" href="index.html#krivov2009" id="id1">[krivov2009]</a> , their backbone dependent rotamer
 library is probably the way to go. There exists a binary version of their
 2010 libary <a class="reference internal" href="#shapovalov2011" id="id2">[shapovalov2011]</a> , that can
 directly be loaded. As an alternative, there is also a binary file containing
@@ -71,8 +71,8 @@ sampled in 20 degree steps.</p>
 <code class="descclassname">promod3.sidechain.</code><code class="descname">LoadPenultimateLib</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.LoadPenultimateLib" title="Permalink to this definition">¶</a></dt>
 <dd><p>Loads the backbone independent Penultimate library. The values for the dihedral
 angles are directly extracted from the publication without considering the
-probabilities specifically for helices/sheets. Due to no assigned standard
-deviations, the flexible rotamer model won&#8217;t work.</p>
+probabilities specific for helices/sheets. Due to no assigned standard
+deviations, the flexible rotamer model won&#8217;t produce meaningful results.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
@@ -90,7 +90,7 @@ deviations, the flexible rotamer model won&#8217;t work.</p>
 <code class="descclassname">promod3.sidechain.</code><code class="descname">ReadDunbrackFile</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.ReadDunbrackFile" title="Permalink to this definition">¶</a></dt>
 <dd><p>Reads a file as it is provided when you get a licence for the 2010 library of
 the Dunbrack lab. It can only read the classic version, where all rotamers
-are in a single file. Specific distributions of nonrotameric sidechains also
+are in a single file. Specific distributions of nonrotameric sidechains
 cannot be read.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
@@ -111,12 +111,6 @@ incomplete if the last problem gets triggered.</td>
 </table>
 </dd></dl>
 
-<table class="docutils citation" frame="void" id="krivov2009" rules="none">
-<colgroup><col class="label" /><col /></colgroup>
-<tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id1">[krivov2009]</a></td><td>Krivov GG, Shapovalov MV and Dunbrack RL Jr. (2009). Improved prediction of protein side-chain conformations with SCWRL4. Proteins.</td></tr>
-</tbody>
-</table>
 <table class="docutils citation" frame="void" id="shapovalov2011" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
@@ -143,7 +137,7 @@ incomplete if the last problem gets triggered.</td>
   <li><a href="../users.html">Documentation For Users</a><ul>
   <li><a href="index.html"><code class="docutils literal"><span class="pre">sidechain</span></code> - Sidechain Modelling</a><ul>
       <li>Previous: <a href="disulfid.html" title="previous chapter">Disulfid Bond Evaluation</a></li>
-      <li>Next: <a href="../core/index.html" title="next chapter"><code class="docutils literal"><span class="pre">core</span></code> - ProMod3 Core Functionality</a></li>
+      <li>Next: <a href="subrotamer_optimizer.html" title="next chapter">Subrotamer Optimization</a></li>
   </ul></li>
   </ul></li>
   </ul></li>
@@ -174,7 +168,7 @@ incomplete if the last problem gets triggered.</td>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/sidechain/rotamer.html b/doc/html/sidechain/rotamer.html
index d2c08491..2d564f8c 100644
--- a/doc/html/sidechain/rotamer.html
+++ b/doc/html/sidechain/rotamer.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Rotamers &mdash; ProMod3 0 documentation</title>
+    <title>Rotamers &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="sidechain - Sidechain Modelling" href="index.html" />
     <link rel="next" title="Frame" href="frame.html" />
     <link rel="prev" title="RotamerID" href="rotamer_id.html" />
@@ -41,15 +41,16 @@
             
   <div class="section" id="rotamers">
 <h1>Rotamers<a class="headerlink" href="#rotamers" title="Permalink to this headline">¶</a></h1>
-<p>The rotamers in PROMOD3 are heavily based on the definitions from SCWRL4.
-A rotamer is basically a set of <a class="reference internal" href="#promod3.sidechain.Particle" title="promod3.sidechain.Particle"><code class="xref py py-class docutils literal"><span class="pre">Particle</span></code></a> and exists in two types.
-The <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> and <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a>. Pairwise energies between
-rotamer instances get calculated according to the definitions from SCWRL4.
+<p>A rotamer represents an amino acid sidechain and is basically a set of
+<a class="reference internal" href="#promod3.sidechain.Particle" title="promod3.sidechain.Particle"><code class="xref py py-class docutils literal"><span class="pre">Particle</span></code></a> objects. There exist two types. The <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> and
+<a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a>.
 To gather all possible rotamers for one particular sidechain position,
-PROMOD3 has the <a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a> and <a class="reference internal" href="#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a>.
-Rotamers are not intended to be built from scratch.
-PROMOD3 offers a built-in construction function, directly accessing a
-<a class="reference internal" href="rotamer_lib.html#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a>.</p>
+PROMOD3 offers the <a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a> and <a class="reference internal" href="#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a>.
+Pairwise interactions between particles give raise to pairwise energies between
+rotamers. Nevertheless, the energy calculation itself happens on the level
+of RotamerGroups and is mostly hidden away in the construction of the
+the <a class="reference internal" href="graph.html#promod3.sidechain.RotamerGraph" title="promod3.sidechain.RotamerGraph"><code class="xref py py-class docutils literal"><span class="pre">RotamerGraph</span></code></a>. If you&#8217;re too lazy to build up your rotamers
+by hand, you might be interested in the <a class="reference internal" href="rotamer_constructor.html#promod3.sidechain.SCWRLRotamerConstructor" title="promod3.sidechain.SCWRLRotamerConstructor"><code class="xref py py-class docutils literal"><span class="pre">SCWRLRotamerConstructor</span></code></a>.</p>
 <div class="section" id="the-smallest-building-block-the-particle">
 <h2>The Smallest Building Block - The Particle<a class="headerlink" href="#the-smallest-building-block-the-particle" title="Permalink to this headline">¶</a></h2>
 <p>Particles give raise to more complex objects such as rotamers and frame residues.
@@ -83,11 +84,11 @@ has to be defined at initialization.</p>
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
 <li><strong>type</strong> (<a class="reference internal" href="#promod3.sidechain.SidechainParticle" title="promod3.sidechain.SidechainParticle"><code class="xref py py-class docutils literal"><span class="pre">SidechainParticle</span></code></a>) &#8211; Type of particle</li>
-<li><strong>pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Positions of particle</li>
+<li><strong>pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Positions of particle</li>
 <li><strong>charge</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Charge of particle, will be used in case H-Bonds</li>
 <li><strong>name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of particle. This name will be given to an actual
-<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.AtomHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.AtomHandle</span></code></a> if a rotamer gets applied
-to a <a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a></li>
+<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.AtomHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.AtomHandle</span></code></a> if a rotamer gets applied
+to a <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a></li>
 </ul>
 </td>
 </tr>
@@ -195,7 +196,7 @@ to a <a class="reference external" href="http://www.openstructure.org/docs/1.3/m
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>lone_pair</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Lone pair direction</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>lone_pair</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Lone pair direction</td>
 </tr>
 </tbody>
 </table>
@@ -210,7 +211,7 @@ hydrogen, this would be the direction of backbone-N to backbone-H.</p>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>polar_direction</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Polar direction of particle</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>polar_direction</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Polar direction of particle</td>
 </tr>
 </tbody>
 </table>
@@ -223,10 +224,27 @@ hydrogen, this would be the direction of backbone-N to backbone-H.</p>
 <h2>Rotamers<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
 <dl class="class">
 <dt id="promod3.sidechain.RRMRotamer">
-<em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">RRMRotamer</code><a class="headerlink" href="#promod3.sidechain.RRMRotamer" title="Permalink to this definition">¶</a></dt>
-<dd><p>The RRMRotamer represents a rotamer of the so called rigid rotamer model.
-The class has no constructor exported to python, the rotamer is expected to
-be constructed with the convenient functions provided by PROMOD3.</p>
+<em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">RRMRotamer</code><span class="sig-paren">(</span><em>particles</em>, <em>probability</em>, <em>internal_e_prefactor</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer" title="Permalink to this definition">¶</a></dt>
+<dd><p>The RRMRotamer represents a rotamer of the so called rigid rotamer model.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>particles</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; List of <a class="reference internal" href="#promod3.sidechain.Particle" title="promod3.sidechain.Particle"><code class="xref py py-class docutils literal"><span class="pre">Particle</span></code></a> objects</li>
+<li><strong>probability</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Probability of rotamers. In case of the SCWRL4
+energy calculation, this directly controls the
+internal energy of that rotamer.</li>
+<li><strong>internal_e_prefactor</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Factor applied to the internal energy calculated
+as -log(<strong>probability</strong>/max_probability),
+where max_probability is the maximum
+rotamer probability of any rotamer in a
+particular <a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a>.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
 <dl class="method">
 <dt id="promod3.sidechain.RRMRotamer.__getitem__">
 <code class="descname">__getitem__</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.__getitem__" title="Permalink to this definition">¶</a></dt>
@@ -260,24 +278,25 @@ be constructed with the convenient functions provided by PROMOD3.</p>
 
 <dl class="method">
 <dt id="promod3.sidechain.RRMRotamer.ApplyOnResidue">
-<code class="descname">ApplyOnResidue</code><span class="sig-paren">(</span><em>res</em><span class="optional">[</span>, <em>consider_hydrogens=False</em>, <em>new_res_name=&quot;&quot;</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.ApplyOnResidue" title="Permalink to this definition">¶</a></dt>
-<dd><p>Strips all sidechain atom positions of given residue and reconstructs the
-full sidechain given the positions of the particles in the rotamer.</p>
+<code class="descname">ApplyOnResidue</code><span class="sig-paren">(</span><em>res</em>, <em>consider_hydrogens=False</em>, <em>new_res_name=&quot;&quot;</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.ApplyOnResidue" title="Permalink to this definition">¶</a></dt>
+<dd><p>Iterates over every particle and searches for the according atom in
+<strong>res</strong>. If it&#8217;s present, the position gets reset to the particle position.
+If not, a new atom gets added to <strong>res</strong>.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue to be reconstructed</li>
+<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue to be reconstructed</li>
 <li><strong>consider_hydrogens</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether polar hydrogens should be added to
-the sidechain</li>
-<li><strong>new_res_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; New name of residue. Nothing happens in case of the
+<strong>res</strong></li>
+<li><strong>new_res_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; New name of <strong>res</strong>. Nothing happens in case of the
 default value (&#8220;&#8221;)</li>
 </ul>
 </td>
 </tr>
 <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if not all required backbone atoms
-are present in <strong>res</strong></p>
+are present in <em>res</em></p>
 </td>
 </tr>
 </tbody>
@@ -285,58 +304,65 @@ are present in <strong>res</strong></p>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.RRMRotamer.GetTransformedCopy">
-<code class="descname">GetTransformedCopy</code><span class="sig-paren">(</span><em>transform</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.GetTransformedCopy" title="Permalink to this definition">¶</a></dt>
-<dd><p>Transforms all particle positions including their lone pair and polar
-directions.</p>
+<dt>
+<code class="descname">ApplyOnResidue</code><span class="sig-paren">(</span><em>all_atom</em>, <em>res_idx</em><span class="sig-paren">)</span></dt>
+<dd><p>Set all sidechain atom positions for given residue to the positions of the
+particles in the rotamer.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>transform</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.geom.Transform</span></code>) &#8211; Transformation to be applied</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>all_atom</strong> (<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a>) &#8211; Container to which to apply rotamer</li>
+<li><strong>res_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index into <em>all_atom</em></li>
+</ul>
+</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> with all particles transformed</td>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_idx</em> is invalid</p>
+</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.RRMRotamer.CalculateInternalEnergy">
-<code class="descname">CalculateInternalEnergy</code><span class="sig-paren">(</span><em>normalization_factor</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.CalculateInternalEnergy" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates and sets the rotamer internal energy of the form:
--prefactor*log(probability/normalization_factor)</p>
+<dt id="promod3.sidechain.RRMRotamer.ToFrameResidue">
+<code class="descname">ToFrameResidue</code><span class="sig-paren">(</span><em>res_idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.ToFrameResidue" title="Permalink to this definition">¶</a></dt>
+<dd><p>Generates and returns a <a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> based on the internal
+particles.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>normalization_factor</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Normalization factor for internal probability</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>res_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Idx passed over to <a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> constructor</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The constructed <a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a></td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.RRMRotamer.GetInternalEnergy">
-<code class="descname">GetInternalEnergy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.GetInternalEnergy" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.RRMRotamer.GetInternalEnergyPrefactor">
+<code class="descname">GetInternalEnergyPrefactor</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.GetInternalEnergyPrefactor" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Internal Energy if calculated, 0.0 otherwise</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Prefactor used in internal energy calculation</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.RRMRotamer.GetInternalEnergyPrefactor">
-<code class="descname">GetInternalEnergyPrefactor</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.GetInternalEnergyPrefactor" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.RRMRotamer.GetInternalEnergy">
+<code class="descname">GetInternalEnergy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.GetInternalEnergy" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Prefactor used in internal energy calculation</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Internal Energy if calculated, 0.0 otherwise</td>
 </tr>
 </tbody>
 </table>
@@ -345,8 +371,9 @@ directions.</p>
 <dl class="method">
 <dt id="promod3.sidechain.RRMRotamer.GetFrameEnergy">
 <code class="descname">GetFrameEnergy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.GetFrameEnergy" title="Permalink to this definition">¶</a></dt>
-<dd><p>Returns previously calculated frame energy, this energy has to be calculated
-using a <a class="reference internal" href="frame.html#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a>.</p>
+<dd><p>Returns frame energy. This energy can either be manually set or calculated
+using a <a class="reference internal" href="frame.html#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a> and the <a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a> this rotamer
+belongs to.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
@@ -384,26 +411,26 @@ using a <a class="reference internal" href="frame.html#promod3.sidechain.Frame"
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.RRMRotamer.SetInternalEnergy">
-<code class="descname">SetInternalEnergy</code><span class="sig-paren">(</span><em>energy</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.SetInternalEnergy" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.RRMRotamer.SetInternalEnergyPrefactor">
+<code class="descname">SetInternalEnergyPrefactor</code><span class="sig-paren">(</span><em>prefactor</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.SetInternalEnergyPrefactor" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Internal energy to be set</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Internal energy prefactor to be set</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.RRMRotamer.SetInternalEnergyPrefactor">
-<code class="descname">SetInternalEnergyPrefactor</code><span class="sig-paren">(</span><em>prefactor</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.SetInternalEnergyPrefactor" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.RRMRotamer.SetInternalEnergy">
+<code class="descname">SetInternalEnergy</code><span class="sig-paren">(</span><em>energy</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.SetInternalEnergy" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Internal energy prefactor to be set</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Internal energy to be set</td>
 </tr>
 </tbody>
 </table>
@@ -422,6 +449,19 @@ using a <a class="reference internal" href="frame.html#promod3.sidechain.Frame"
 </table>
 </dd></dl>
 
+<dl class="method">
+<dt id="promod3.sidechain.RRMRotamer.AddFrameEnergy">
+<code class="descname">AddFrameEnergy</code><span class="sig-paren">(</span><em>energy</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.AddFrameEnergy" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Frame energy to be added</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
 <dl class="method">
 <dt id="promod3.sidechain.RRMRotamer.SetProbability">
 <code class="descname">SetProbability</code><span class="sig-paren">(</span><em>probability</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamer.SetProbability" title="Permalink to this definition">¶</a></dt>
@@ -439,13 +479,34 @@ using a <a class="reference internal" href="frame.html#promod3.sidechain.Frame"
 
 <dl class="class">
 <dt id="promod3.sidechain.FRMRotamer">
-<em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">FRMRotamer</code><a class="headerlink" href="#promod3.sidechain.FRMRotamer" title="Permalink to this definition">¶</a></dt>
-<dd><p>The FRMRotamer represents a rotamer of the so called flexible rotamer model.
-The class has no constructor exported to python, the rotamer is expected to
-be constructed with the convenient functions provided by PROMOD3.
-The flexible rotamer contains several so called subrotamers. The internal data
-layout is a list of particles and a list of subrotamer definitions in form
-of particle indices.</p>
+<em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">FRMRotamer</code><span class="sig-paren">(</span><em>particles</em>, <em>T</em>, <em>probability</em>, <em>internal_e_prefactor</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer" title="Permalink to this definition">¶</a></dt>
+<dd><p>The FRMRotamer represents a rotamer of the so called flexible rotamer model,
+where one rotamer gets represented by several subrotamers.
+The idea is, that all particles of all subrotamers are given at
+initialization. Subrotamers are then defined by providing lists of indices.
+One particle can be part of several subrotamers.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>particles</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; List of <a class="reference internal" href="#promod3.sidechain.Particle" title="promod3.sidechain.Particle"><code class="xref py py-class docutils literal"><span class="pre">Particle</span></code></a> objects</li>
+<li><strong>probability</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Probability of rotamers. In case of the SCWRL4
+energy calculation, this directly controls the
+internal energy of that rotamer.</li>
+<li><strong>T</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Temperature factor, that is used to generate a final
+energy given the subrotamers according to the formalism
+described in the SCWRL4 paper.</li>
+<li><strong>internal_e_prefactor</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Factor applied to the internal energy calculated
+as -log(<strong>probability</strong>/max_probability),
+where max_probability is the maximum
+rotamer probability of any rotamer in a
+particular <a class="reference internal" href="#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a>.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
 <dl class="method">
 <dt id="promod3.sidechain.FRMRotamer.__getitem__">
 <code class="descname">__getitem__</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.__getitem__" title="Permalink to this definition">¶</a></dt>
@@ -490,53 +551,18 @@ of particle indices.</p>
 </table>
 </dd></dl>
 
-<dl class="method">
-<dt id="promod3.sidechain.FRMRotamer.GetSubrotamerDefinition">
-<code class="descname">GetSubrotamerDefinition</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.GetSubrotamerDefinition" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of subrotamer</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of particle indices belonging to this
-particular subrotamer</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if index is invalid</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.sidechain.FRMRotamer.GetSubrotamerAssociations">
-<code class="descname">GetSubrotamerAssociations</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.GetSubrotamerAssociations" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of particle</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of subrotamer indices this particle is
-associated with</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if index is invalid</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
 <dl class="method">
 <dt id="promod3.sidechain.FRMRotamer.ApplyOnResidue">
-<code class="descname">ApplyOnResidue</code><span class="sig-paren">(</span><em>res</em><span class="optional">[</span>, <em>consider_hydrogens=False</em>, <em>new_res_name=&quot;&quot;</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.ApplyOnResidue" title="Permalink to this definition">¶</a></dt>
-<dd><p>Strips all sidechain atom positions of given residue and reconstructs the
-full sidechain given the positions of the particles in the rotamer.</p>
+<code class="descname">ApplyOnResidue</code><span class="sig-paren">(</span><em>res</em>, <em>consider_hydrogens=False</em>, <em>new_res_name=&quot;&quot;</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.ApplyOnResidue" title="Permalink to this definition">¶</a></dt>
+<dd><p>Iterates over every particle of the active subrotamer and searches for the
+according atom in <strong>res</strong>. If it&#8217;s present, the position gets reset to the
+particle position. If not, a new atom gets added to <strong>res</strong>.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue to be reconstructed</li>
+<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue to be reconstructed</li>
 <li><strong>consider_hydrogens</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether polar hydrogens should be added to
 the sidechain</li>
 <li><strong>new_res_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; New name of residue. Nothing happens in case of the
@@ -545,7 +571,7 @@ default value (&#8220;&#8221;)</li>
 </td>
 </tr>
 <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if not all required backbone atoms
-are present in <strong>res</strong></p>
+are present in <em>res</em></p>
 </td>
 </tr>
 </tbody>
@@ -553,45 +579,68 @@ are present in <strong>res</strong></p>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.FRMRotamer.GetTransformedCopy">
-<code class="descname">GetTransformedCopy</code><span class="sig-paren">(</span><em>transform</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.GetTransformedCopy" title="Permalink to this definition">¶</a></dt>
-<dd><p>Transforms all particle positions including their lone pair and polar
-directions.</p>
+<dt>
+<code class="descname">ApplyOnResidue</code><span class="sig-paren">(</span><em>all_atom</em>, <em>res_idx</em><span class="sig-paren">)</span></dt>
+<dd><p>Set all sidechain atom positions for given residue to the positions of the
+particles in the active surotamer.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>transform</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.geom.Transform</span></code>) &#8211; Transformation to be applied</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>all_atom</strong> (<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a>) &#8211; Container to which to apply rotamer</li>
+<li><strong>res_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index into <em>all_atom</em></li>
+</ul>
+</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> with all particles transformed</td>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>res_idx</em> is invalid</p>
+</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.FRMRotamer.CalculateInternalEnergy">
-<code class="descname">CalculateInternalEnergy</code><span class="sig-paren">(</span><em>normalization_factor</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.CalculateInternalEnergy" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates and sets the rotamer internal energy of the form:
--prefactor*log(probability/normalization_factor)</p>
+<dt id="promod3.sidechain.FRMRotamer.ToFrameResidue">
+<code class="descname">ToFrameResidue</code><span class="sig-paren">(</span><em>res_idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.ToFrameResidue" title="Permalink to this definition">¶</a></dt>
+<dd><p>Generates and returns a <a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> based on the internal
+particles of the active subrotamer.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>normalization_factor</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Normalization factor for internal probability</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>res_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Idx passed over to <a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> constructor</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The constructed <a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a></td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.FRMRotamer.GetInternalEnergy">
-<code class="descname">GetInternalEnergy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.GetInternalEnergy" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.FRMRotamer.ToRRMRotamer">
+<code class="descname">ToRRMRotamer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.ToRRMRotamer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Generates and returns a <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> based on the internal
+particles of the active subrotamer. Following parameters of the
+returned rotamer get set: probability (probability of the whole FRMRotamer),
+internal_e_prefactor (prefactor of the whole FRMRotamer),
+frame_energy (The frame energy of that particular subrotamer if already
+calculated), internal_energy (the internal energy of the whole FRMRotamer)</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.FRMRotamer.GetSubrotamerDefinition">
+<code class="descname">GetSubrotamerDefinition</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.GetSubrotamerDefinition" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Internal Energy if calculated, 0.0 otherwise</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of subrotamer</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of particle indices belonging to this
+particular subrotamer</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if index is invalid</td>
 </tr>
 </tbody>
 </table>
@@ -610,11 +659,25 @@ directions.</p>
 </table>
 </dd></dl>
 
+<dl class="method">
+<dt id="promod3.sidechain.FRMRotamer.GetInternalEnergy">
+<code class="descname">GetInternalEnergy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.GetInternalEnergy" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Internal Energy if calculated, 0.0 otherwise</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
 <dl class="method">
 <dt id="promod3.sidechain.FRMRotamer.GetFrameEnergy">
 <code class="descname">GetFrameEnergy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.GetFrameEnergy" title="Permalink to this definition">¶</a></dt>
-<dd><p>Returns previously calculated frame energy of the full FRMRotamer, this
-energy has to be calculated using a <a class="reference internal" href="frame.html#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a>.</p>
+<dd><p>Returns frame energy. This energy can either be manually set or calculated
+using a <a class="reference internal" href="frame.html#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a> and the <a class="reference internal" href="#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a> this rotamer
+belongs to.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
@@ -628,8 +691,7 @@ energy has to be calculated using a <a class="reference internal" href="frame.ht
 <dl class="method">
 <dt>
 <code class="descname">GetFrameEnergy</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span></dt>
-<dd><p>Returns previously calculated frame energy of the subrotamer specified by
-<strong>index</strong>, this energy has to be calculated using a <a class="reference internal" href="frame.html#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a>.</p>
+<dd><p>Returns frame energy of specified <strong>index</strong>.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
@@ -684,26 +746,26 @@ energy has to be calculated using a <a class="reference internal" href="frame.ht
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.FRMRotamer.SetInternalEnergy">
-<code class="descname">SetInternalEnergy</code><span class="sig-paren">(</span><em>energy</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.SetInternalEnergy" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.FRMRotamer.SetInternalEnergyPrefactor">
+<code class="descname">SetInternalEnergyPrefactor</code><span class="sig-paren">(</span><em>prefactor</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.SetInternalEnergyPrefactor" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Internal energy to be set</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Internal energy prefactor to be set</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.FRMRotamer.SetInternalEnergyPrefactor">
-<code class="descname">SetInternalEnergyPrefactor</code><span class="sig-paren">(</span><em>prefactor</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.SetInternalEnergyPrefactor" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.FRMRotamer.SetInternalEnergy">
+<code class="descname">SetInternalEnergy</code><span class="sig-paren">(</span><em>energy</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.SetInternalEnergy" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Internal energy prefactor to be set</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Internal energy to be set</td>
 </tr>
 </tbody>
 </table>
@@ -716,7 +778,7 @@ energy has to be calculated using a <a class="reference internal" href="frame.ht
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Frame energy for full rotamer to be set to be set</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Frame energy for full rotamer to be set</td>
 </tr>
 </tbody>
 </table>
@@ -730,7 +792,7 @@ energy has to be calculated using a <a class="reference internal" href="frame.ht
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Frame energy for single  subrotamer to be set to be set</li>
+<li><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Frame energy for single  subrotamer to be set</li>
 <li><strong>index</strong> &#8211; Index of subrotamer</li>
 </ul>
 </td>
@@ -740,154 +802,129 @@ energy has to be calculated using a <a class="reference internal" href="frame.ht
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.FRMRotamer.SetTemperature">
-<code class="descname">SetTemperature</code><span class="sig-paren">(</span><em>temperature</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.SetTemperature" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.FRMRotamer.AddFrameEnergy">
+<code class="descname">AddFrameEnergy</code><span class="sig-paren">(</span><em>energy</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.AddFrameEnergy" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>temperature</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Temperature factor for this rotamer</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Frame energy for full rotamer to be added</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.FRMRotamer.SetProbability">
-<code class="descname">SetProbability</code><span class="sig-paren">(</span><em>probability</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.SetProbability" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">AddFrameEnergy</code><span class="sig-paren">(</span><em>energy</em>, <em>index</em><span class="sig-paren">)</span></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Internal probability to be set</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Frame energy for single  subrotamer to be added</li>
+<li><strong>index</strong> &#8211; Index of subrotamer</li>
+</ul>
+</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
-</dd></dl>
-
-</div>
-<div class="section" id="rotamer-groups">
-<h2>Rotamer Groups<a class="headerlink" href="#rotamer-groups" title="Permalink to this headline">¶</a></h2>
-<dl class="class">
-<dt id="promod3.sidechain.RRMRotamerGroup">
-<em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">RRMRotamerGroup</code><span class="sig-paren">(</span><em>rotamers</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup" title="Permalink to this definition">¶</a></dt>
-<dd><p>The RRMRotamerGroup groups several <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> objects for the same
-residue position. It can either be constructed by providing a list of
-<a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> objects or by convenience functions provided by PROMOD3.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>rotamers</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; A list of <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> objects</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if provided <strong>rotamers</strong> is empty</td>
-</tr>
-</tbody>
-</table>
 <dl class="method">
-<dt id="promod3.sidechain.RRMRotamerGroup.__len__">
-<code class="descname">__len__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup.__len__" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.FRMRotamer.AddSubrotamerDefinition">
+<code class="descname">AddSubrotamerDefinition</code><span class="sig-paren">(</span><em>indices</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.AddSubrotamerDefinition" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of rotamers in group</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>indices</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; List of indices defining a subrotamer</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.RRMRotamerGroup.__getitem__">
-<code class="descname">__getitem__</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup.__getitem__" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.sidechain.FRMRotamer.SetActiveSubrotamer">
+<code class="descname">SetActiveSubrotamer</code><span class="sig-paren">(</span><em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.SetActiveSubrotamer" title="Permalink to this definition">¶</a></dt>
+<dd><p>The provided <strong>idx</strong> relates to the subrotamer definitions added at the
+rotamer buildup. This idx controls which subrotamer is used when
+<a class="reference internal" href="#promod3.sidechain.FRMRotamer.ApplyOnResidue" title="promod3.sidechain.FRMRotamer.ApplyOnResidue"><code class="xref py py-func docutils literal"><span class="pre">ApplyOnResidue()</span></code></a>, <a class="reference internal" href="#promod3.sidechain.FRMRotamer.ToFrameResidue" title="promod3.sidechain.FRMRotamer.ToFrameResidue"><code class="xref py py-func docutils literal"><span class="pre">ToFrameResidue()</span></code></a> or <a class="reference internal" href="#promod3.sidechain.FRMRotamer.ToRRMRotamer" title="promod3.sidechain.FRMRotamer.ToRRMRotamer"><code class="xref py py-func docutils literal"><span class="pre">ToRRMRotamer()</span></code></a>
+gets called. By default, the value is 0 =&gt; first added subrotamer
+definition gets used.</p>
+<table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> at given <strong>index</strong></td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>index</strong> is invalid</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of subrotamer definition applied on residues</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.RRMRotamerGroup.ApplyOneResidue">
-<code class="descname">ApplyOneResidue</code><span class="sig-paren">(</span><em>index</em>, <em>res</em><span class="optional">[</span>, <em>consider_hydrogens=False</em>, <em>new_res_name=&quot;&quot;</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup.ApplyOneResidue" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calls ApplyOnResidue function on rotamer at position <strong>index</strong></p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.sidechain.FRMRotamer.GetActiveSubrotamer">
+<code class="descname">GetActiveSubrotamer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.GetActiveSubrotamer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Get the index of the active subrotamer</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.FRMRotamer.SetTemperature">
+<code class="descname">SetTemperature</code><span class="sig-paren">(</span><em>temperature</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.SetTemperature" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Rotamer index</li>
-<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue to be reconstructed</li>
-<li><strong>consider_hydrogens</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether polar hydrogens should be added to
-the sidechain</li>
-<li><strong>new_res_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; New name of residue. Nothing happens in case of the
-default value (&#8220;&#8221;)</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if not all required backbone atoms
-are present in <strong>res</strong> or when <strong>index</strong> is invalid</p>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>temperature</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Temperature factor for this rotamer</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.RRMRotamerGroup.Merge">
-<code class="descname">Merge</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup.Merge" title="Permalink to this definition">¶</a></dt>
-<dd><p>Adds all rotamers in <strong>other</strong> to current <a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a></p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.sidechain.FRMRotamer.SetProbability">
+<code class="descname">SetProbability</code><span class="sig-paren">(</span><em>probability</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamer.SetProbability" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a>) &#8211; RotamerGroup to be merged in</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Internal probability to be set</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
-<dl class="method">
-<dt id="promod3.sidechain.RRMRotamerGroup.CalculateInternalEnergies">
-<code class="descname">CalculateInternalEnergies</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup.CalculateInternalEnergies" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates internal energies of all rotamers in group</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.sidechain.RRMRotamerGroup.ApplySelfEnergyThres">
-<code class="descname">ApplySelfEnergyThres</code><span class="sig-paren">(</span><span class="optional">[</span><em>thresh=30</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup.ApplySelfEnergyThres" title="Permalink to this definition">¶</a></dt>
-<dd><p>Searches rotamer with lowest self energy <strong>l_e</strong> and deletes all
-rotamers with <strong>self_energy</strong> &gt; <strong>l_e</strong> + <strong>thresh</strong></p>
-</dd></dl>
-
 </dd></dl>
 
+</div>
+<div class="section" id="rotamer-groups">
+<h2>Rotamer Groups<a class="headerlink" href="#rotamer-groups" title="Permalink to this headline">¶</a></h2>
 <dl class="class">
-<dt id="promod3.sidechain.FRMRotamerGroup">
-<em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">FRMRotamerGroup</code><span class="sig-paren">(</span><em>rotamers</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup" title="Permalink to this definition">¶</a></dt>
-<dd><p>The FRMRotamerGroup groups several <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> objects for the same
-residue position. It can either be constructed by providing a list of
-<a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> objects or by convenience functions provided by PROMOD3.</p>
+<dt id="promod3.sidechain.RRMRotamerGroup">
+<em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">RRMRotamerGroup</code><span class="sig-paren">(</span><em>rotamers</em>, <em>residue_index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup" title="Permalink to this definition">¶</a></dt>
+<dd><p>The RRMRotamerGroup groups several <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> objects for the same
+residue position.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>rotamers</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) &#8211; A list of <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> objects</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>rotamers</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; A list of <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> objects</li>
+<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Location of residue this <a class="reference internal" href="#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a>
+represents. This index is important when calculating
+frame energies to neglect the interactions to frame
+particles of the same residue.</li>
+</ul>
+</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if provided <strong>rotamers</strong> is empty</td>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if provided <em>rotamers</em> is empty</p>
+</td>
 </tr>
 </tbody>
 </table>
 <dl class="method">
-<dt id="promod3.sidechain.FRMRotamerGroup.__len__">
-<code class="descname">__len__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup.__len__" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.RRMRotamerGroup.__len__">
+<code class="descname">__len__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup.__len__" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
@@ -899,40 +936,44 @@ residue position. It can either be constructed by providing a list of
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.FRMRotamerGroup.__getitem__">
-<code class="descname">__getitem__</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup.__getitem__" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.RRMRotamerGroup.__getitem__">
+<code class="descname">__getitem__</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup.__getitem__" title="Permalink to this definition">¶</a></dt>
 <dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> at given <strong>index</strong></td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> at given <em>index</em></td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <strong>index</strong> is invalid</td>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>index</em> is invalid</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.FRMRotamerGroup.ApplyOneResidue">
-<code class="descname">ApplyOneResidue</code><span class="sig-paren">(</span><em>index</em>, <em>res</em><span class="optional">[</span>, <em>consider_hydrogens=False</em>, <em>new_res_name=&quot;&quot;</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup.ApplyOneResidue" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calls ApplyOnResidue function on rotamer at position <strong>index</strong></p>
+<dt id="promod3.sidechain.RRMRotamerGroup.ApplyOnResidue">
+<code class="descname">ApplyOnResidue</code><span class="sig-paren">(</span><em>index</em>, <em>res</em>, <em>consider_hydrogens=False</em>, <em>new_res_name=&quot;&quot;</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup.ApplyOnResidue" title="Permalink to this definition">¶</a></dt>
+<dt>
+<code class="descname">ApplyOnResidue</code><span class="sig-paren">(</span><em>index</em>, <em>all_atom</em>, <em>res_idx</em><span class="sig-paren">)</span></dt>
+<dd><p>Calls ApplyOnResidue function on rotamer at position <em>index</em></p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
 <li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Rotamer index</li>
-<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue to be reconstructed</li>
+<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue to be reconstructed</li>
 <li><strong>consider_hydrogens</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether polar hydrogens should be added to
 the sidechain</li>
 <li><strong>new_res_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; New name of residue. Nothing happens in case of the
 default value (&#8220;&#8221;)</li>
+<li><strong>all_atom</strong> (<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a>) &#8211; Container to which to apply rotamer</li>
+<li><strong>res_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index into <em>all_atom</em></li>
 </ul>
 </td>
 </tr>
 <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if not all required backbone atoms
-are present in <strong>res</strong> or when <strong>index</strong> is invalid</p>
+are present in <em>res</em> or when <em>index</em> or <em>res_idx</em> are invalid</p>
 </td>
 </tr>
 </tbody>
@@ -940,325 +981,133 @@ are present in <strong>res</strong> or when <strong>index</strong> is invalid</p
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.FRMRotamerGroup.Merge">
-<code class="descname">Merge</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup.Merge" title="Permalink to this definition">¶</a></dt>
-<dd><p>Adds all rotamers in <strong>other</strong> to current <a class="reference internal" href="#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a></p>
+<dt id="promod3.sidechain.RRMRotamerGroup.Merge">
+<code class="descname">Merge</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup.Merge" title="Permalink to this definition">¶</a></dt>
+<dd><p>Adds all rotamers in <em>other</em> to current <a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a></p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a>) &#8211; RotamerGroup to be merged in</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a>) &#8211; RotamerGroup to be merged in</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.FRMRotamerGroup.CalculateInternalEnergies">
-<code class="descname">CalculateInternalEnergies</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup.CalculateInternalEnergies" title="Permalink to this definition">¶</a></dt>
-<dd><p>Calculates internal energies of all rotamers in group</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.sidechain.FRMRotamerGroup.ApplySelfEnergyThres">
-<code class="descname">ApplySelfEnergyThres</code><span class="sig-paren">(</span><span class="optional">[</span><em>thresh=30</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup.ApplySelfEnergyThres" title="Permalink to this definition">¶</a></dt>
-<dd><p>Searches rotamer with lowest self energy <strong>l_e</strong> and deletes all
-rotamers with <strong>self_energy</strong> &gt; <strong>l_e</strong> + <strong>thresh</strong></p>
-</dd></dl>
-
-</dd></dl>
-
-</div>
-<div class="section" id="convenient-functions-for-constructing-rotamers">
-<h2>Convenient functions for constructing rotamers<a class="headerlink" href="#convenient-functions-for-constructing-rotamers" title="Permalink to this headline">¶</a></h2>
-<p>PROMOD3 offers some functionality to directly access a
-<code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLibrary</span></code> and build single rotamers as well as
-rotamer groups.</p>
-<dl class="method">
-<dt id="promod3.sidechain.ConstructRRMRotamer">
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructRRMRotamer</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>cb_pos</em>, <em>rotamer_id</em>, <em>settings</em>, <em>probability</em><span class="optional">[</span>, <em>chi1=NaN</em>, <em>chi2=NaN</em>, <em>chi3=NaN</em>, <em>chi4=NaN</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.ConstructRRMRotamer" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.sidechain.RRMRotamerGroup.SetFrameEnergy">
+<code class="descname">SetFrameEnergy</code><span class="sig-paren">(</span><em>frame</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup.SetFrameEnergy" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calculates sets the energy of all rotamers in the group towards the
+given <strong>frame</strong>.</p>
+<table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>n_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of nitrogen used as anchor for the rotamer</li>
-<li><strong>ca_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of alpha carbon used as anchor for the rotamer</li>
-<li><strong>cb_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of beta carbon used as anchor for the rotamer</li>
-<li><strong>rotamer_id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a></li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-<li><strong>probability</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Probability of occurence of this particular rotamer.</li>
-<li><strong>chi1</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; First sidechain dihedral angle</li>
-<li><strong>chi2</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Second sidechain dihedral angle</li>
-<li><strong>chi3</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Third sidechain dihedral angle</li>
-<li><strong>chi4</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Fourth sidechain dihedral angle</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if not all required chi angles
-for this particular <strong>id</strong> are given.</p>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>frame</strong> (<a class="reference internal" href="frame.html#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a>) &#8211; Frame containing rigid particles</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt>
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructRRMRotamer</code><span class="sig-paren">(</span><em>residue</em>, <em>rotamer_id</em>, <em>settings</em>, <em>probability</em><span class="optional">[</span>, <em>chi1=NaN</em>, <em>chi2=NaN</em>, <em>chi3=NaN</em>, <em>chi4=NaN</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.sidechain.RRMRotamerGroup.AddFrameEnergy">
+<code class="descname">AddFrameEnergy</code><span class="sig-paren">(</span><em>frame</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup.AddFrameEnergy" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calculates adds the energy of all rotamers in the group towards the
+given <strong>frame</strong>.</p>
+<table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>residue</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResideHandle</span></code>) &#8211; Residue from which the anchor positions will be
-extracted</li>
-<li><strong>rotamer_id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a></li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-<li><strong>probability</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Probability of occurence of this particular rotamer.</li>
-<li><strong>chi1</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; First sidechain dihedral angle</li>
-<li><strong>chi2</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Second sidechain dihedral angle</li>
-<li><strong>chi3</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Third sidechain dihedral angle</li>
-<li><strong>chi4</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Fourth sidechain dihedral angle</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if not all required chi angles
-for this particular <strong>id</strong> are given or when not all required
-anchor atoms are present in <strong>residue</strong>.</p>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>frame</strong> (<a class="reference internal" href="frame.html#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a>) &#8211; Frame containing rigid particles</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.ConstructFRMRotamer">
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructFRMRotamer</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>cb_pos</em>, <em>rotamer_id</em>, <em>settings</em>, <em>probability</em><span class="optional">[</span>, <em>chi1=NaN</em>, <em>sig1=NaN</em>, <em>chi2=NaN</em>, <em>sig2=NaN</em>, <em>chi3=NaN</em>, <em>sig3=NaN</em>, <em>chi4=NaN</em>, <em>sig4=NaN</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.ConstructFRMRotamer" title="Permalink to this definition">¶</a></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>n_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of nitrogen used as anchor for the rotamer</li>
-<li><strong>ca_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of alpha carbon used as anchor for the rotamer</li>
-<li><strong>cb_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of beta carbon used as anchor for the rotamer</li>
-<li><strong>rotamer_id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a></li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-<li><strong>probability</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Probability of occurence of this particular rotamer.</li>
-<li><strong>chi1</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; First sidechain dihedral angle</li>
-<li><strong>sig1</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Standard deviation of first dihedral angle</li>
-<li><strong>chi2</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Second sidechain dihedral angle</li>
-<li><strong>sig2</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Standard deviation of second dihedral angle</li>
-<li><strong>chi3</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Third sidechain dihedral angle</li>
-<li><strong>sig3</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Standard deviation of third dihedral angle</li>
-<li><strong>chi4</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Fourth sidechain dihedral angle</li>
-<li><strong>sig4</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Standard deviation of fourth dihedral angle</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if not all required chi angles
-for this particular <strong>id</strong> are given.</p>
-</td>
-</tr>
-</tbody>
-</table>
+<dt id="promod3.sidechain.RRMRotamerGroup.ApplySelfEnergyThresh">
+<code class="descname">ApplySelfEnergyThresh</code><span class="sig-paren">(</span><em>thresh=30</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RRMRotamerGroup.ApplySelfEnergyThresh" title="Permalink to this definition">¶</a></dt>
+<dd><p>Searches rotamer with lowest self energy <em>l_e</em> and deletes all
+rotamers with <em>self_energy</em> &gt; <em>l_e</em> + <em>thresh</em></p>
 </dd></dl>
 
-<dl class="method">
-<dt>
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructFRMRotamer</code><span class="sig-paren">(</span><em>residue</em>, <em>rotamer_id</em>, <em>settings</em>, <em>probability</em><span class="optional">[</span>, <em>chi1=NaN</em>, <em>sig1=NaN</em>, <em>chi2=NaN</em>, <em>sig2=NaN</em>, <em>chi3=NaN</em>, <em>sig3=NaN</em>, <em>chi4=NaN</em>, <em>sig4=NaN</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
-<dd><table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>residue</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResideHandle</span></code>) &#8211; Residue from which the anchor positions will be
-extracted</li>
-<li><strong>rotamer_id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a></li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-<li><strong>probability</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Probability of occurence of this particular rotamer.</li>
-<li><strong>chi1</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; First sidechain dihedral angle</li>
-<li><strong>sig1</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Standard deviation of first dihedral angle</li>
-<li><strong>chi2</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Second sidechain dihedral angle</li>
-<li><strong>sig2</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Standard deviation of second dihedral angle</li>
-<li><strong>chi3</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Third sidechain dihedral angle</li>
-<li><strong>sig3</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Standard deviation of third dihedral angle</li>
-<li><strong>chi4</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Fourth sidechain dihedral angle</li>
-<li><strong>sig4</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Standard deviation of fourth dihedral angle</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if not all required chi angles
-or standard deviations for this particular <strong>id</strong> are given or when
-not all required anchor atoms are present in <strong>residue</strong>.</p>
-</td>
-</tr>
-</tbody>
-</table>
 </dd></dl>
 
-</div>
-<div class="section" id="convenient-functions-for-constructing-rotamer-groups">
-<h2>Convenient functions for constructing rotamer groups<a class="headerlink" href="#convenient-functions-for-constructing-rotamer-groups" title="Permalink to this headline">¶</a></h2>
-<p>Instead of building single rotamers, following convenient functions query a
-rotamer library and build all possible rotamers for a particular residue
-position. If hbond scoring is enabled and sample_polar_hydrogens is true (<strong>settings</strong>),
-several rotamers might be constructed and added to the group per library instance:</p>
-<ol class="arabic simple">
-<li>SER construct three rotamers with hydrogen chi angles 180,-60 and 60</li>
-<li>THR construct three rotamers with hydrogen chi angles 180,-60 and 60</li>
-<li>TYR construct two rotamers with hydrogen chi angles 180 and 0</li>
-<li>HIS construct both possible protonation states (HSE,HSD)</li>
-</ol>
-<span class="target" id="rotamer-group-construction-label"></span><dl class="method">
-<dt id="promod3.sidechain.ConstructRRMRotamerGroup">
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructRRMRotamerGroup</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>cb_pos</em>, <em>rotamer_id</em>, <em>residue_index</em>, <em>rot_lib</em>, <em>settings</em><span class="optional">[</span>, <em>phi=-1.0472</em>, <em>psi=-0.7854</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.ConstructRRMRotamerGroup" title="Permalink to this definition">¶</a></dt>
-<dd><p>Constructs a full group of <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> objects. It extracts rotamers
-from <em>rot_lib</em> and adds them to the group until the summed probability
-reaches the probability cutoff defined in <strong>settings</strong>.</p>
+<dl class="class">
+<dt id="promod3.sidechain.FRMRotamerGroup">
+<em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">FRMRotamerGroup</code><span class="sig-paren">(</span><em>rotamers</em>, <em>residue_index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup" title="Permalink to this definition">¶</a></dt>
+<dd><p>The FRMRotamerGroup groups several <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> objects for the same
+residue position.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of nitrogen used as anchor for the rotamers</li>
-<li><strong>ca_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of alpha carbon used as anchor for the rotamers</li>
-<li><strong>cb_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of beta carbon used as anchor for the rotamers</li>
-<li><strong>rotamer_id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of of the constructed <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a></li>
-<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> objects in constructed
-<a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a>. This matters for calculating
-the frame energy. Interactions to frame residues with
-same index get neglected.</li>
-<li><strong>rot_lib</strong> (<a class="reference internal" href="rotamer_lib.html#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a>) &#8211; Library from which the data is taken to construct the
-rotamers.</li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-<li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Phi backbone dihedral angle used as input for backbone
-dependent rotamer library. Default value is a typical
-alpha helical value.</li>
-<li><strong>psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Psi backbone dihedral angle used as input for backbone
-dependent rotamer library. Default value is a typical
-alpha helical value.</li>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>rotamers</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; A list of <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> objects</li>
+<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Location of residue this <a class="reference internal" href="#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a>
+represents. This index is important when calculating
+frame energies to neglect the interactions to frame
+particles of the same residue.</li>
 </ul>
 </td>
 </tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if provided <em>rotamers</em> is empty</p>
+</td>
+</tr>
 </tbody>
 </table>
-</dd></dl>
-
 <dl class="method">
-<dt>
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructRRMRotamerGroup</code><span class="sig-paren">(</span><em>residue</em>, <em>rotamer_id</em>, <em>residue_index</em>, <em>rot_lib</em>, <em>settings</em><span class="optional">[</span>, <em>phi=-1.0472</em>, <em>psi=-0.7854</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
-<dd><p>Constructs a full group of <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> objects. It extracts rotamers
-from <em>rot_lib</em> and adds them to the group until the summed probability
-reaches the probability cutoff defined in <strong>settings</strong>.</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.sidechain.FRMRotamerGroup.__len__">
+<code class="descname">__len__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup.__len__" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>residue</strong> &#8211; Residue from which the anchor positions will be
-extracted</li>
-<li><strong>rotamer_id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of of the constructed <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a></li>
-<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> objects in constructed
-<a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a>. This matters for calculating
-the frame energy. Interactions to frame residues with
-same index get neglected.</li>
-<li><strong>rot_lib</strong> (<a class="reference internal" href="rotamer_lib.html#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a>) &#8211; Library from which the data is taken to construct the
-rotamers.</li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-<li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Phi backbone dihedral angle used as input for backbone
-dependent rotamer library. Default value is a typical
-alpha helical value.</li>
-<li><strong>psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Psi backbone dihedral angle used as input for backbone
-dependent rotamer library. Default value is a typical
-alpha helical value.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if not all required anchor atoms
-are present in <strong>residue</strong>.</p>
-</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Number of rotamers in group</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt id="promod3.sidechain.ConstructFRMRotamerGroup">
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructFRMRotamerGroup</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>cb_pos</em>, <em>rotamer_id</em>, <em>residue_index</em>, <em>rot_lib</em>, <em>settings</em><span class="optional">[</span>, <em>phi=-1.0472</em>, <em>psi=-0.7854</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.ConstructFRMRotamerGroup" title="Permalink to this definition">¶</a></dt>
-<dd><p>Constructs a full group of <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> objects. It extracts rotamers
-from <em>rot_lib</em> and adds them to the group until the summed probability
-reaches the probability cutoff defined in <strong>settings</strong>.</p>
-<table class="docutils field-list" frame="void" rules="none">
+<dt id="promod3.sidechain.FRMRotamerGroup.__getitem__">
+<code class="descname">__getitem__</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup.__getitem__" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of nitrogen used as anchor for the rotamers</li>
-<li><strong>ca_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of alpha carbon used as anchor for the rotamers</li>
-<li><strong>cb_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of beta carbon used as anchor for the rotamers</li>
-<li><strong>rotamer_id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of of the constructed <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a></li>
-<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> objects in constructed
-<a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a>. This matters for calculating
-the frame energy. Interactions to frame residues with
-same index get neglected.</li>
-<li><strong>rot_lib</strong> (<a class="reference internal" href="rotamer_lib.html#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a>) &#8211; Library from which the data is taken to construct the
-rotamers.</li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-<li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Phi backbone dihedral angle used as input for backbone
-dependent rotamer library. Default value is a typical
-alpha helical value.</li>
-<li><strong>psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Psi backbone dihedral angle used as input for backbone
-dependent rotamer library. Default value is a typical
-alpha helical value.</li>
-</ul>
-</td>
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> at given <em>index</em></td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if <em>index</em> is invalid</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
+<dt id="promod3.sidechain.FRMRotamerGroup.ApplyOnResidue">
+<code class="descname">ApplyOnResidue</code><span class="sig-paren">(</span><em>index</em>, <em>res</em>, <em>consider_hydrogens=False</em>, <em>new_res_name=&quot;&quot;</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup.ApplyOnResidue" title="Permalink to this definition">¶</a></dt>
 <dt>
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructFRMRotamerGroup</code><span class="sig-paren">(</span><em>residue</em>, <em>rotamer_id</em>, <em>residue_index</em>, <em>rot_lib</em>, <em>settings</em><span class="optional">[</span>, <em>phi=-1.0472</em>, <em>psi=-0.7854</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
-<dd><p>Constructs a full group of <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> objects. It extracts rotamers
-from <em>rot_lib</em> and adds them to the group until the summed probability
-reaches the probability cutoff defined in <strong>settings</strong>.</p>
+<code class="descname">ApplyOnResidue</code><span class="sig-paren">(</span><em>index</em>, <em>all_atom</em>, <em>res_idx</em><span class="sig-paren">)</span></dt>
+<dd><p>Calls ApplyOnResidue function on rotamer at position <em>index</em></p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>residue</strong> &#8211; Residue from which the anchor positions will be
-extracted</li>
-<li><strong>rotamer_id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of of the constructed <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a></li>
-<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> objects in constructed
-<a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a>. This matters for calculating
-the frame energy. Interactions to frame residues with
-same index get neglected.</li>
-<li><strong>rot_lib</strong> (<a class="reference internal" href="rotamer_lib.html#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a>) &#8211; Library from which the data is taken to construct the
-rotamers.</li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-<li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Phi backbone dihedral angle used as input for backbone
-dependent rotamer library. Default value is a typical
-alpha helical value.</li>
-<li><strong>psi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Psi backbone dihedral angle used as input for backbone
-dependent rotamer library. Default value is a typical
-alpha helical value.</li>
+<li><strong>index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Rotamer index</li>
+<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue to be reconstructed</li>
+<li><strong>consider_hydrogens</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Flag, whether polar hydrogens should be added to
+the sidechain</li>
+<li><strong>new_res_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; New name of residue. Nothing happens in case of the
+default value (&#8220;&#8221;)</li>
+<li><strong>all_atom</strong> (<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">AllAtomPositions</span></code></a>) &#8211; Container to which to apply rotamer</li>
+<li><strong>res_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Residue index into <em>all_atom</em></li>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if not all required anchor atoms
-are present in <strong>residue</strong>.</p>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if not all required backbone atoms
+are present in <em>res</em> or when <em>index</em> or <em>res_idx</em> are invalid</p>
 </td>
 </tr>
 </tbody>
@@ -1266,129 +1115,56 @@ are present in <strong>residue</strong>.</p>
 </dd></dl>
 
 <dl class="method">
-<dt>
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructRRMRotamerGroup</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>cb_pos</em>, <em>rotamer_id</em>, <em>residue_index</em>, <em>rot_lib</em>, <em>settings</em><span class="sig-paren">)</span></dt>
-<dd><p>Constructs a full group of <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> objects. It extracts rotamers
-from <em>rot_lib</em> and adds them to the group until the summed probability
-reaches the probability cutoff defined in <strong>settings</strong>.</p>
+<dt id="promod3.sidechain.FRMRotamerGroup.Merge">
+<code class="descname">Merge</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup.Merge" title="Permalink to this definition">¶</a></dt>
+<dd><p>Adds all rotamers in <em>other</em> to current <a class="reference internal" href="#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a></p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of nitrogen used as anchor for the rotamers</li>
-<li><strong>ca_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of alpha carbon used as anchor for the rotamers</li>
-<li><strong>cb_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of beta carbon used as anchor for the rotamers</li>
-<li><strong>rotamer_id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of of the constructed <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a></li>
-<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> objects in constructed
-<a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a>. This matters for calculating
-the frame energy. Interactions to frame residues with
-same index get neglected.</li>
-<li><strong>rot_lib</strong> (<a class="reference internal" href="rotamer_lib.html#promod3.sidechain.RotamerLib" title="promod3.sidechain.RotamerLib"><code class="xref py py-class docutils literal"><span class="pre">RotamerLib</span></code></a>) &#8211; Library from which the data is taken to construct the
-rotamers.</li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-</ul>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a>) &#8211; RotamerGroup to be merged in</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt>
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructRRMRotamerGroup</code><span class="sig-paren">(</span><em>residue</em>, <em>rotamer_id</em>, <em>residue_index</em>, <em>rot_lib</em>, <em>settings</em><span class="sig-paren">)</span></dt>
-<dd><p>Constructs a full group of <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> objects. It extracts rotamers
-from <em>rot_lib</em> and adds them to the group until the summed probability
-reaches the probability cutoff defined in <strong>settings</strong>.</p>
+<dt id="promod3.sidechain.FRMRotamerGroup.SetFrameEnergy">
+<code class="descname">SetFrameEnergy</code><span class="sig-paren">(</span><em>frame</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup.SetFrameEnergy" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calculates sets the energy of all rotamers in the group towards the
+given <strong>frame</strong>.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>residue</strong> &#8211; Residue from which the anchor positions will be
-extracted</li>
-<li><strong>rotamer_id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of of the constructed <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a></li>
-<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of <a class="reference internal" href="#promod3.sidechain.RRMRotamer" title="promod3.sidechain.RRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamer</span></code></a> objects in constructed
-<a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a>. This matters for calculating
-the frame energy. Interactions to frame residues with
-same index get neglected.</li>
-<li><strong>rot_lib</strong> (<a class="reference internal" href="rotamer_lib.html#promod3.sidechain.RotamerLib" title="promod3.sidechain.RotamerLib"><code class="xref py py-class docutils literal"><span class="pre">RotamerLib</span></code></a>) &#8211; Library from which the data is taken to construct the
-rotamers.</li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if not all required anchor atoms
-are present in <strong>residue</strong>.</p>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>frame</strong> (<a class="reference internal" href="frame.html#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a>) &#8211; Frame containing rigid particles</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt>
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructFRMRotamerGroup</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>cb_pos</em>, <em>rotamer_id</em>, <em>residue_index</em>, <em>rot_lib</em>, <em>settings</em><span class="sig-paren">)</span></dt>
-<dd><p>Constructs a full group of <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> objects. It extracts rotamers
-from <em>rot_lib</em> and adds them to the group until the summed probability
-reaches the probability cutoff defined in <strong>settings</strong>.</p>
+<dt id="promod3.sidechain.FRMRotamerGroup.AddFrameEnergy">
+<code class="descname">AddFrameEnergy</code><span class="sig-paren">(</span><em>frame</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup.AddFrameEnergy" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calculates adds the energy of all rotamers in the group towards the
+given <strong>frame</strong>.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>n_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of nitrogen used as anchor for the rotamers</li>
-<li><strong>ca_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of alpha carbon used as anchor for the rotamers</li>
-<li><strong>cb_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; Position of beta carbon used as anchor for the rotamers</li>
-<li><strong>rotamer_id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of of the constructed <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a></li>
-<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> objects in constructed
-<a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a>. This matters for calculating
-the frame energy. Interactions to frame residues with
-same index get neglected.</li>
-<li><strong>rot_lib</strong> (<a class="reference internal" href="rotamer_lib.html#promod3.sidechain.RotamerLib" title="promod3.sidechain.RotamerLib"><code class="xref py py-class docutils literal"><span class="pre">RotamerLib</span></code></a>) &#8211; Library from which the data is taken to construct the
-rotamers.</li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-</ul>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>frame</strong> (<a class="reference internal" href="frame.html#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a>) &#8211; Frame containing rigid particles</td>
 </tr>
 </tbody>
 </table>
 </dd></dl>
 
 <dl class="method">
-<dt>
-<code class="descclassname">promod3.sidechain.</code><code class="descname">ConstructFRMRotamerGroup</code><span class="sig-paren">(</span><em>residue</em>, <em>rotamer_id</em>, <em>residue_index</em>, <em>rot_lib</em>, <em>settings</em><span class="sig-paren">)</span></dt>
-<dd><p>Constructs a full group of <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> objects. It extracts rotamers
-from <em>rot_lib</em> and adds them to the group until the summed probability
-reaches the probability cutoff defined in <strong>settings</strong>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>residue</strong> &#8211; Residue from which the anchor positions will be
-extracted</li>
-<li><strong>rotamer_id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Type of of the constructed <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a></li>
-<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of <a class="reference internal" href="#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a> objects in constructed
-<a class="reference internal" href="#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a>. This matters for calculating
-the frame energy. Interactions to frame residues with
-same index get neglected.</li>
-<li><strong>rot_lib</strong> (<a class="reference internal" href="rotamer_lib.html#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a>) &#8211; Library from which the data is taken to construct the
-rotamers.</li>
-<li><strong>settings</strong> (<a class="reference internal" href="sidechain_settings.html#promod3.sidechain.RotamerSettings" title="promod3.sidechain.RotamerSettings"><code class="xref py py-class docutils literal"><span class="pre">RotamerSettings</span></code></a>) &#8211; Settings to control parametrization of the single
-particles.</li>
-</ul>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if not all required anchor atoms
-are present in <strong>residue</strong>.</p>
-</td>
-</tr>
-</tbody>
-</table>
+<dt id="promod3.sidechain.FRMRotamerGroup.ApplySelfEnergyThresh">
+<code class="descname">ApplySelfEnergyThresh</code><span class="sig-paren">(</span><em>thresh=30</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.FRMRotamerGroup.ApplySelfEnergyThresh" title="Permalink to this definition">¶</a></dt>
+<dd><p>Searches rotamer with lowest self energy <em>l_e</em> and deletes all
+rotamers with <em>self_energy</em> &gt; <em>l_e</em> + <em>thresh</em></p>
+</dd></dl>
+
 </dd></dl>
 
 </div>
@@ -1406,8 +1182,6 @@ are present in <strong>residue</strong>.</p>
 <li><a class="reference internal" href="#the-smallest-building-block-the-particle">The Smallest Building Block - The Particle</a></li>
 <li><a class="reference internal" href="#id1">Rotamers</a></li>
 <li><a class="reference internal" href="#rotamer-groups">Rotamer Groups</a></li>
-<li><a class="reference internal" href="#convenient-functions-for-constructing-rotamers">Convenient functions for constructing rotamers</a></li>
-<li><a class="reference internal" href="#convenient-functions-for-constructing-rotamer-groups">Convenient functions for constructing rotamer groups</a></li>
 </ul>
 </li>
 </ul>
@@ -1449,7 +1223,7 @@ are present in <strong>residue</strong>.</p>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/sidechain/rotamer_constructor.html b/doc/html/sidechain/rotamer_constructor.html
new file mode 100644
index 00000000..55e8bd53
--- /dev/null
+++ b/doc/html/sidechain/rotamer_constructor.html
@@ -0,0 +1,400 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Rotamer Constructor &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="sidechain - Sidechain Modelling" href="index.html" />
+    <link rel="next" title="Rotamer Graph" href="graph.html" />
+    <link rel="prev" title="Rotamer Library" href="rotamer_lib.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="rotamer-constructor">
+<h1>Rotamer Constructor<a class="headerlink" href="#rotamer-constructor" title="Permalink to this headline">¶</a></h1>
+<p>Instead of creating rotamers by yourself, you can simply use the convenient
+functionality provided by PROMOD3</p>
+<div class="section" id="constructing-rotamers-and-frame-residues">
+<h2>Constructing Rotamers and Frame Residues<a class="headerlink" href="#constructing-rotamers-and-frame-residues" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="promod3.sidechain.SCWRLRotamerConstructor">
+<em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">SCWRLRotamerConstructor</code><a class="headerlink" href="#promod3.sidechain.SCWRLRotamerConstructor" title="Permalink to this definition">¶</a></dt>
+<dd><p>Constructing rotamers and frame residues that are parametrized according to
+the SCWRL4 method. They contain all heavy atoms, but also the
+polar hydrogens. The rotamers start after the CB atom (typically CG).
+In case of the <a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> construction, the
+constructor distinguishes between backbone and sidechain frame residues.</p>
+<dl class="method">
+<dt id="promod3.sidechain.SCWRLRotamerConstructor.ConstructRRMRotamerGroup">
+<code class="descname">ConstructRRMRotamerGroup</code><span class="sig-paren">(</span><em>res</em>, <em>id</em>, <em>residue_index</em>, <em>rot_lib</em><span class="optional">[</span>, <em>probability_cutoff = 0.98</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.SCWRLRotamerConstructor.ConstructRRMRotamerGroup" title="Permalink to this definition">¶</a></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">ConstructRRMRotamerGroup</code><span class="sig-paren">(</span><em>all_atom_pos</em>, <em>aa_res_idx</em>, <em>id</em>, <em>residue_index</em>, <em>rot_lib</em><span class="optional">[</span>, <em>probability_cutoff = 0.98</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">ConstructRRMRotamerGroup</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>cb_pos</em>, <em>id</em>, <em>residue_index</em>, <em>rot_lib</em><span class="optional">[</span>, <em>probability_cutoff = 0.98</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">ConstructRRMRotamerGroup</code><span class="sig-paren">(</span><em>res</em>, <em>id</em>, <em>residue_index</em>, <em>rot_lib</em><span class="optional">[</span>, <em>phi = -1.0472</em>, <em>psi = -0.7854</em>, <em>probability_cutoff = 0.98</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">ConstructRRMRotamerGroup</code><span class="sig-paren">(</span><em>all_atom_pos</em>, <em>aa_res_idx</em>, <em>id</em>, <em>residue_index</em>, <em>rot_lib</em><span class="optional">[</span>, <em>phi = -1.0472</em>, <em>psi = -0.7854</em>, <em>probability_cutoff = 0.98</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">ConstructRRMRotamerGroup</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>cb_pos</em>, <em>id</em>, <em>residue_index</em>, <em>rot_lib</em><span class="optional">[</span>, <em>phi = -1.0472</em>, <em>psi = -0.7854</em>, <em>probability_cutoff = 0.98</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">ConstructRRMRotamerGroup</code><span class="sig-paren">(</span><em>res</em>, <em>id</em>, <em>residue_index</em>, <em>rot_lib_entries</em><span class="optional">[</span>, <em>probability_cutoff = 0.98</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">ConstructRRMRotamerGroup</code><span class="sig-paren">(</span><em>all_atom_pos</em>, <em>aa_res_idx</em>, <em>id</em>, <em>residue_index</em>, <em>rot_lib_entries</em><span class="optional">[</span>, <em>probability_cutoff = 0.98</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">ConstructRRMRotamerGroup</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>cb_pos</em>, <em>id</em>, <em>residue_index</em>, <em>rot_lib_entries</em><span class="optional">[</span>, <em>probability_cutoff = 0.98</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
+<dd><p>All functions are also avaible for their flexible rotamer model counterpart.
+=&gt;ConstructFRMRotamerGroup(...) with exactly the same parameters.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; To extract the N, CA, CB backbone anchor</li>
+<li><strong>all_atom_pos</strong> (<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">promod3.loop.AllAtomPositions</span></code></a>) &#8211; To extract the N, CA, CB backbone anchor</li>
+<li><strong>aa_res_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of residue in <strong>all_atom_pos</strong> from which to
+extract the backbone anchor</li>
+<li><strong>n_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; To directly feed in the backbone anchor positions</li>
+<li><strong>ca_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; To directly feed in the backbone anchor positions</li>
+<li><strong>cb_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; To directly feed in the backbone anchor positions</li>
+<li><strong>id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Identifies the sidechain.</li>
+<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Important for the energy calculations towards the
+<a class="reference internal" href="frame.html#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a> you don&#8217;t want to calculate a pairwise
+energy of the sidechain particles towards particles
+representing the own backbone...</li>
+<li><strong>rot_lib</strong> (<a class="reference internal" href="rotamer_lib.html#promod3.sidechain.RotamerLib" title="promod3.sidechain.RotamerLib"><code class="xref py py-class docutils literal"><span class="pre">RotamerLib</span></code></a> / <a class="reference internal" href="rotamer_lib.html#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a>) &#8211; To search for rotamers</li>
+<li><strong>rot_lib_entries</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code>) &#8211; <a class="reference internal" href="rotamer_lib.html#promod3.sidechain.RotamerLibEntry" title="promod3.sidechain.RotamerLibEntry"><code class="xref py py-class docutils literal"><span class="pre">RotamerLibEntry</span></code></a> objects to circumvent the
+direct use of a rotamer library</li>
+<li><strong>phi</strong> &#8211; Phi dihedral angle used to search for rotamers if a
+<a class="reference internal" href="rotamer_lib.html#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a> is given as input</li>
+<li><strong>psi</strong> &#8211; Psi dihedral angle used to search for rotamers if a
+<a class="reference internal" href="rotamer_lib.html#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a> is given as input</li>
+<li><strong>probability_cutoff</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; For some rotamers, there might be many low
+probability entries in the library.
+The function adds single rotamers to the group until
+the cumulative probability of the added rotamers is
+larger or equal <strong>probability_cutoff</strong>.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The rotamer group containing all constructed rotamers
+with internal energies assigned based on the
+probabilities extracted from the rotamer library.</p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="rotamer.html#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a></p>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> when not all required backbone
+atoms are present in <strong>residue</strong>, not all required atom
+positions are set in <strong>all_atom_pos</strong> or when the rotamer library
+does not contain any entries for <strong>id</strong></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.SCWRLRotamerConstructor.ConstructBackboneFrameResidue">
+<code class="descname">ConstructBackboneFrameResidue</code><span class="sig-paren">(</span><em>res</em>, <em>id</em>, <em>residue_index</em>, <em>Real phi</em><span class="optional">[</span>, <em>n_ter = False</em>, <em>c_ter = False</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.SCWRLRotamerConstructor.ConstructBackboneFrameResidue" title="Permalink to this definition">¶</a></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">ConstructBackboneFrameResidue</code><span class="sig-paren">(</span><em>all_atom_pos</em>, <em>aa_res_idx</em>, <em>id</em>, <em>residue_index</em>, <em>Real phi</em><span class="optional">[</span>, <em>n_ter = False</em>, <em>c_ter = False</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">ConstructBackboneFrameResidue</code><span class="sig-paren">(</span><em>n_pos</em>, <em>ca_pos</em>, <em>c_pos</em>, <em>o_pos</em>, <em>cb_pos</em>, <em>id</em>, <em>residue_index</em>, <em>Real phi</em><span class="optional">[</span>, <em>n_ter = False</em>, <em>c_ter = False</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
+<dd><p>Constructs backbone frame residues for amino acid residues. It extracts
+the n, ca, c, o and cb positions and constructs a frame residue based on
+the parametrizations of SCWRL4. In case of <strong>n_ter</strong>, there are additional
+hydrogens added at the nitrogen to represent a proper n-terminus. The same
+is true for <strong>c_ter</strong>, an additional oxygen is built instead. In any case,
+a single hydrogen is added to the nitrogen (except proline), this is
+why the phi angle of the residue is required as an input.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue from which to extract the backbone positions</li>
+<li><strong>all_atom_pos</strong> (<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">promod3.loop.AllAtomPositions</span></code></a>) &#8211; To extract the backbone positions</li>
+<li><strong>aa_res_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of residue in <strong>all_atom_pos</strong> from which to
+extract the backbone positions</li>
+<li><strong>n_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; To directly feed in the backbone positions</li>
+<li><strong>ca_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; To directly feed in the backbone positions</li>
+<li><strong>c_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; To directly feed in the backbone positions</li>
+<li><strong>o_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; To directly feed in the backbone positions</li>
+<li><strong>cb_pos</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/geom/vec/#ost.geom.Vec3" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.geom.Vec3</span></code></a>) &#8211; To directly feed in the backbone positions</li>
+<li><strong>id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Identifies the sidechain</li>
+<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Important for the energy calculations towards the
+<a class="reference internal" href="frame.html#promod3.sidechain.Frame" title="promod3.sidechain.Frame"><code class="xref py py-class docutils literal"><span class="pre">Frame</span></code></a> you don&#8217;t want to calculate a pairwise
+energy of the sidechain particles towards particles
+representing the own backbone...</li>
+<li><strong>phi</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; The dihedral angle of the current residue, required to
+construct the polar nitrogen hydrogen</li>
+<li><strong>n_ter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether to add additional hydrogens at the nitrogen
+to represent a proper n-terminus</li>
+<li><strong>c_ter</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) &#8211; Whether to add an additional oxygen at the carbon to
+represent a proper c-terminus</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> when not all required backbone
+atoms are present in <strong>residue</strong>, not all required atom
+positions are set in <strong>all_atom_pos</strong>.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.SCWRLRotamerConstructor.ConstructSidechainFrameResidue">
+<code class="descname">ConstructSidechainFrameResidue</code><span class="sig-paren">(</span><em>res</em>, <em>id</em>, <em>residue_index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.SCWRLRotamerConstructor.ConstructSidechainFrameResidue" title="Permalink to this definition">¶</a></dt>
+<dd></dd></dl>
+
+<dl class="method">
+<dt>
+<code class="descname">ConstructSidechainFrameResidue</code><span class="sig-paren">(</span><em>all_atom</em>, <em>aa_res_idx</em>, <em>id</em>, <em>residue_index</em><span class="sig-paren">)</span></dt>
+<dd><p>Extracts all required positions from the input and generates a sidechain
+frame residue. Additionally to the heavy atoms, the function also produces
+particles for all polar hydrogens.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue from which to extract the sidechain positions</li>
+<li><strong>all_atom_pos</strong> (<a class="reference internal" href="../loop/all_atom.html#promod3.loop.AllAtomPositions" title="promod3.loop.AllAtomPositions"><code class="xref py py-class docutils literal"><span class="pre">promod3.loop.AllAtomPositions</span></code></a>) &#8211; To extract the sidechain positions</li>
+<li><strong>aa_res_idx</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index of residue in <strong>all_atom_pos</strong> from which to
+extract the sidechain positions</li>
+<li><strong>id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Identifies the sidechain</li>
+<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; idenfifies residue in frame</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a></p>
+</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> when not all required sidechain
+atoms are present in <strong>residue</strong> or not all required sidechain
+atom positions are set in <strong>all_atom_pos</strong>.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.SCWRLRotamerConstructor.ConstructFrameResidue">
+<code class="descname">ConstructFrameResidue</code><span class="sig-paren">(</span><em>residue</em>, <em>residue_index</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.SCWRLRotamerConstructor.ConstructFrameResidue" title="Permalink to this definition">¶</a></dt>
+<dd><p>Constructs a <a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> from a <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>.
+This can be useful to mark a region occupied by a ligand. Note, that
+there won&#8217;t be any parametrization of hbonds in this function. All atoms
+of the residue will be represented as carbons and hydrogens are skipped.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>residue</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue from which all atoms will be taken to
+construct a <a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a>.</li>
+<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index this <a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> belongs to.</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.SCWRLRotamerConstructor.ConstructFrameResidueHeuristic">
+<code class="descname">ConstructFrameResidueHeuristic</code><span class="sig-paren">(</span><em>residue</em>, <em>residue_index</em>, <em>comp_lib</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.SCWRLRotamerConstructor.ConstructFrameResidueHeuristic" title="Permalink to this definition">¶</a></dt>
+<dd><p>Constructs a <a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> from a <a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a> using
+a heuristic treatment of the atoms based on the passed compounds library.
+This is meant to be used as an alternative to <a class="reference internal" href="#promod3.sidechain.SCWRLRotamerConstructor.ConstructFrameResidue" title="promod3.sidechain.SCWRLRotamerConstructor.ConstructFrameResidue"><code class="xref py py-func docutils literal"><span class="pre">ConstructFrameResidue()</span></code></a>,
+which will be called by this function if the residue is not known by the given
+compounds library.
+Only non-hydrogen atoms are considered and by default added as uncharged
+carbons. Special treatment is used for atoms known by the compounds library
+in the following cases:</p>
+<ul class="simple">
+<li>carbons, nitrogens, oxygens and sulfur particles use an appropriate type
+as in the <a class="reference internal" href="rotamer.html#promod3.sidechain.SidechainParticle" title="promod3.sidechain.SidechainParticle"><code class="xref py py-class docutils literal"><span class="pre">SidechainParticle</span></code></a> enumeration</li>
+<li>carbonyls are added as charged oxygen particles as hbond acceptors</li>
+</ul>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>residue</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Residue from which all atoms will be taken to
+construct a <a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a>.</li>
+<li><strong>residue_index</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Index this <a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a> belongs to.</li>
+<li><strong>comp_lib</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/compoundlib/#ost.conop.CompoundLib" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.CompoundLib</span></code></a>) &#8211; OST compound library to use</li>
+</ul>
+</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><a class="reference internal" href="frame.html#promod3.sidechain.FrameResidue" title="promod3.sidechain.FrameResidue"><code class="xref py py-class docutils literal"><span class="pre">FrameResidue</span></code></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="promod3.sidechain.SCWRLRotamerConstructor.AssignInternalEnergies">
+<code class="descname">AssignInternalEnergies</code><span class="sig-paren">(</span><em>rot_group</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.SCWRLRotamerConstructor.AssignInternalEnergies" title="Permalink to this definition">¶</a></dt>
+<dd><p>Takes the rotamer group and assigns every single rotamer its internal
+energy based on the probabilistic approach used by SCWRL4.
+=&gt; -internal_e_prefac*log(p/max_p), where internal_e_prefac and p are
+rotamer specific and max_p is the maximum probablity of any of the rotamers
+in <strong>rot_group</strong>. If you construct a rotamer group by the
+ConstructRRMRotamerGroup/ConstructFRMRotamerGroup functions, this function
+is already called at construction and the energies are properly assigned.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>rot_group</strong> (<a class="reference internal" href="rotamer.html#promod3.sidechain.RRMRotamerGroup" title="promod3.sidechain.RRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">RRMRotamerGroup</span></code></a> / <a class="reference internal" href="rotamer.html#promod3.sidechain.FRMRotamerGroup" title="promod3.sidechain.FRMRotamerGroup"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamerGroup</span></code></a>) &#8211; containing all rotamers for which internal energies have
+to be assigned</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Rotamer Constructor</a><ul>
+<li><a class="reference internal" href="#constructing-rotamers-and-frame-residues">Constructing Rotamers and Frame Residues</a></li>
+</ul>
+</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="docutils literal"><span class="pre">sidechain</span></code> - Sidechain Modelling</a><ul>
+      <li>Previous: <a href="rotamer_lib.html" title="previous chapter">Rotamer Library</a></li>
+      <li>Next: <a href="graph.html" title="next chapter">Rotamer Graph</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/sidechain/rotamer_constructor.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/sidechain/rotamer_constructor.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/sidechain/rotamer_id.html b/doc/html/sidechain/rotamer_id.html
index 31d85c80..70cb5931 100644
--- a/doc/html/sidechain/rotamer_id.html
+++ b/doc/html/sidechain/rotamer_id.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>RotamerID &mdash; ProMod3 0 documentation</title>
+    <title>RotamerID &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="sidechain - Sidechain Modelling" href="index.html" />
     <link rel="next" title="Rotamers" href="rotamer.html" />
     <link rel="prev" title="sidechain - Sidechain Modelling" href="index.html" />
@@ -51,7 +51,7 @@ that affect the hbond term or different versions of proline/cysteine.</p>
 <dt id="promod3.sidechain.RotamerID">
 <em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">RotamerID</code><a class="headerlink" href="#promod3.sidechain.RotamerID" title="Permalink to this definition">¶</a></dt>
 <dd><p>Enumerates the amino acids. Possible values:</p>
-<ul class="simple">
+<table class="hlist"><tr><td><ul class="simple">
 <li>ARG - Arginine</li>
 <li>ASN - Asparagine</li>
 <li>ASP - Aspartate</li>
@@ -66,6 +66,8 @@ that affect the hbond term or different versions of proline/cysteine.</p>
 <li>TRP - Tryptophane</li>
 <li>TYR - Tyrosine</li>
 <li>THR - Threonine</li>
+</ul>
+</td><td><ul class="simple">
 <li>VAL - Valine</li>
 <li>ILE - Isoleucine</li>
 <li>LEU - Leucine</li>
@@ -80,6 +82,7 @@ that affect the hbond term or different versions of proline/cysteine.</p>
 <li>ALA - Alanine</li>
 <li>XXX - Invalid</li>
 </ul>
+</td></tr></table>
 <p>The RotamerID enum can be accessed either directly as <code class="docutils literal"><span class="pre">promod3.sidechain.ARG</span></code>
 or as <code class="docutils literal"><span class="pre">promod3.sidechain.RotamerID.ARG</span></code>.</p>
 </dd></dl>
@@ -88,7 +91,7 @@ or as <code class="docutils literal"><span class="pre">promod3.sidechain.Rotamer
 <div class="section" id="how-can-i-get-an-id">
 <h2>How can I get an ID?<a class="headerlink" href="#how-can-i-get-an-id" title="Permalink to this headline">¶</a></h2>
 <p>The RotamerID enum can directly be accessed from Python. Two convenient
-functions exist to get RotamerIDs from the <code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code> enum
+functions exist to get RotamerIDs from the <a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a> enum
 or from amino acid three letter codes.</p>
 <dl class="method">
 <dt id="promod3.sidechain.TLCToRotID">
@@ -113,12 +116,12 @@ exactly the naming convention defined above.</p>
 <dd><p>Directly translates <strong>aa</strong> into a RotamerID. Note, that it is not possible
 to generate special IDs this way
 (e.g. HSD, HSE or the special prolines/cysteins) since they&#8217;re simply not
-defined in <code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></p>
+defined in <a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a></p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>aa</strong> (<code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code>) &#8211; AA enum of amino acid</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>aa</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/conop/aminoacid/#ost.conop.AminoAcid" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.conop.AminoAcid</span></code></a>) &#8211; AA enum of amino acid</td>
 </tr>
 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference internal" href="#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>, XXX if <strong>aa</strong> is invalid.</td>
 </tr>
@@ -181,7 +184,7 @@ defined in <code class="xref py py-class docutils literal"><span class="pre">ost
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/sidechain/rotamer_lib.html b/doc/html/sidechain/rotamer_lib.html
index cff5394d..651e93d4 100644
--- a/doc/html/sidechain/rotamer_lib.html
+++ b/doc/html/sidechain/rotamer_lib.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Rotamer Library &mdash; ProMod3 0 documentation</title>
+    <title>Rotamer Library &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,9 +23,9 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
     <link rel="up" title="sidechain - Sidechain Modelling" href="index.html" />
-    <link rel="next" title="Coming to a solution" href="graph.html" />
+    <link rel="next" title="Rotamer Constructor" href="rotamer_constructor.html" />
     <link rel="prev" title="Frame" href="frame.html" />
    
   
@@ -61,32 +61,26 @@ mode you can get the rotamers out of it or dump it to disk.</p>
 <dt id="promod3.sidechain.RotamerLib">
 <em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">RotamerLib</code><a class="headerlink" href="#promod3.sidechain.RotamerLib" title="Permalink to this definition">¶</a></dt>
 <dd><p>Non backbone dependent rotamer library</p>
-<dl class="method">
+<dl class="staticmethod">
 <dt id="promod3.sidechain.RotamerLib.Load">
-<code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerLib.Load" title="Permalink to this definition">¶</a></dt>
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerLib.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.RotamerLib.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerLib.LoadPortable" title="Permalink to this definition">¶</a></dt>
 <dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.sidechain.RotamerLib.Save" title="promod3.sidechain.RotamerLib.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
-reading).</p>
+reading) / portable file generated with <a class="reference internal" href="#promod3.sidechain.RotamerLib.SavePortable" title="promod3.sidechain.RotamerLib.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file, the library will be loaded from</p>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load.</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A rotamer library</p>
-</td>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A rotamer library</td>
 </tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.sidechain.RotamerLib" title="promod3.sidechain.RotamerLib"><code class="xref py py-class docutils literal"><span class="pre">RotamerLib</span></code></a></p>
-</td>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.sidechain.RotamerLib" title="promod3.sidechain.RotamerLib"><code class="xref py py-class docutils literal"><span class="pre">RotamerLib</span></code></a></td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>version number stored in file is not supported.</li>
-<li>file assumes different memory-layout than is available on this
-machine. Use <a class="reference internal" href="#promod3.sidechain.RotamerLib.LoadPortable" title="promod3.sidechain.RotamerLib.LoadPortable"><code class="xref py py-meth docutils literal"><span class="pre">LoadPortable()</span></code></a> to convert your file.</li>
-</ul>
-</td>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</td>
 </tr>
 </tbody>
 </table>
@@ -95,64 +89,16 @@ machine. Use <a class="reference internal" href="#promod3.sidechain.RotamerLib.L
 <dl class="method">
 <dt id="promod3.sidechain.RotamerLib.Save">
 <code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerLib.Save" title="Permalink to this definition">¶</a></dt>
-<dd><p>Saves raw binary representation (optimized for fast reading).This puts many
-assumptions on the memory-layout of the target-machine and hence it is not
-portable. A portable version is provided by <a class="reference internal" href="#promod3.sidechain.RotamerLib.SavePortable" title="promod3.sidechain.RotamerLib.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a>.
-Preferably portable files are distributed and converted to a raw binary
-before using them.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file, the library will be dumped into</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.sidechain.RotamerLib.LoadPortable">
-<code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerLib.LoadPortable" title="Permalink to this definition">¶</a></dt>
-<dd><p>Loads portable file generated with <a class="reference internal" href="#promod3.sidechain.RotamerLib.SavePortable" title="promod3.sidechain.RotamerLib.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slow but less
-machine-dependent).</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file, the library will be loaded from</p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A rotamer library</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.sidechain.RotamerLib" title="promod3.sidechain.RotamerLib"><code class="xref py py-class docutils literal"><span class="pre">RotamerLib</span></code></a></p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>version number stored in file is not supported.</li>
-<li>machine-dependent fundamental types are smaller than required.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
 <dt id="promod3.sidechain.RotamerLib.SavePortable">
 <code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.RotamerLib.SavePortable" title="Permalink to this definition">¶</a></dt>
-<dd><p>Saves portable binary representation (slow but less machine-dependent).</p>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file, the library will be dumped into</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file where it will be saved.</td>
 </tr>
 </tbody>
 </table>
@@ -197,7 +143,7 @@ special <em>id</em> requests.</p>
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; Identity of rotamer of interest</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference internal" href="#promod3.sidechain.RotamerLibEntry" title="promod3.sidechain.RotamerLibEntry"><code class="xref py py-class docutils literal"><span class="pre">RotamerLibEntry</span></code></a> of nonzero
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.sidechain.RotamerLibEntry" title="promod3.sidechain.RotamerLibEntry"><code class="xref py py-class docutils literal"><span class="pre">RotamerLibEntry</span></code></a> of nonzero
 probability sorted by their probability</td>
 </tr>
 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if no entries for <em>id</em> can be
@@ -235,32 +181,26 @@ and ready for io.</p>
 </tr>
 </tbody>
 </table>
-<dl class="method">
+<dl class="staticmethod">
 <dt id="promod3.sidechain.BBDepRotamerLib.Load">
-<code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.BBDepRotamerLib.Load" title="Permalink to this definition">¶</a></dt>
+<em class="property">static </em><code class="descname">Load</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.BBDepRotamerLib.Load" title="Permalink to this definition">¶</a></dt>
+<dt id="promod3.sidechain.BBDepRotamerLib.LoadPortable">
+<em class="property">static </em><code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.BBDepRotamerLib.LoadPortable" title="Permalink to this definition">¶</a></dt>
 <dd><p>Loads raw binary file generated with <a class="reference internal" href="#promod3.sidechain.BBDepRotamerLib.Save" title="promod3.sidechain.BBDepRotamerLib.Save"><code class="xref py py-meth docutils literal"><span class="pre">Save()</span></code></a> (optimized for fast
-reading).</p>
+reading) / portable file generated with <a class="reference internal" href="#promod3.sidechain.BBDepRotamerLib.SavePortable" title="promod3.sidechain.BBDepRotamerLib.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slower but
+less machine-dependent).</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file, the library will be loaded from</p>
-</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file from which to load.</td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A rotamer library</p>
-</td>
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A rotamer library</td>
 </tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a></p>
-</td>
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a></td>
 </tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>version number stored in file is not supported.</li>
-<li>file assumes different memory-layout than is available on this
-machine. Use <a class="reference internal" href="#promod3.sidechain.BBDepRotamerLib.LoadPortable" title="promod3.sidechain.BBDepRotamerLib.LoadPortable"><code class="xref py py-meth docutils literal"><span class="pre">LoadPortable()</span></code></a> to convert your file.</li>
-</ul>
-</td>
+<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened or if
+file cannot be parsed (see <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a> for details).</td>
 </tr>
 </tbody>
 </table>
@@ -269,62 +209,16 @@ machine. Use <a class="reference internal" href="#promod3.sidechain.BBDepRotamer
 <dl class="method">
 <dt id="promod3.sidechain.BBDepRotamerLib.Save">
 <code class="descname">Save</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.BBDepRotamerLib.Save" title="Permalink to this definition">¶</a></dt>
-<dd><p>Saves raw binary representation (optimized for fast reading).This puts many
-assumptions on the memory-layout of the target-machine and hence it is not
-portable. A portable version is provided by <a class="reference internal" href="#promod3.sidechain.BBDepRotamerLib.SavePortable" title="promod3.sidechain.BBDepRotamerLib.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a>.
-Preferably portable files are distributed and converted to a raw binary
-before using them.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file, the library will be dumped into</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="promod3.sidechain.BBDepRotamerLib.LoadPortable">
-<code class="descname">LoadPortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.BBDepRotamerLib.LoadPortable" title="Permalink to this definition">¶</a></dt>
-<dd><p>Loads portable file generated with <a class="reference internal" href="#promod3.sidechain.BBDepRotamerLib.SavePortable" title="promod3.sidechain.BBDepRotamerLib.SavePortable"><code class="xref py py-meth docutils literal"><span class="pre">SavePortable()</span></code></a> (slow but less
-machine-dependent).</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file, the library will be loaded from</p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A rotamer library</p>
-</td>
-</tr>
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#promod3.sidechain.BBDepRotamerLib" title="promod3.sidechain.BBDepRotamerLib"><code class="xref py py-class docutils literal"><span class="pre">BBDepRotamerLib</span></code></a></p>
-</td>
-</tr>
-<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if:</p>
-<ul class="last simple">
-<li>file cannot be opened.</li>
-<li>version number stored in file is not supported.</li>
-<li>machine-dependent fundamental types are smaller than required.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
 <dt id="promod3.sidechain.BBDepRotamerLib.SavePortable">
 <code class="descname">SavePortable</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.BBDepRotamerLib.SavePortable" title="Permalink to this definition">¶</a></dt>
-<dd><p>Saves portable binary representation (slow but less machine-dependent).</p>
+<dd><p>Saves a raw / portable binary representation. Use portable files for
+distribution and convert locally to raw files. See <a class="reference internal" href="../portableIO.html#portableio"><span>here</span></a>
+for details.</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Name of file, the library will be dumped into</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">str</span></code></a>) &#8211; Path to the file where it will be saved.</td>
 </tr>
 <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.RuntimeError" title="(in Python v2.7)"><code class="xref py py-exc docutils literal"><span class="pre">RuntimeError</span></code></a> if file cannot be opened.</td>
 </tr>
@@ -365,7 +259,7 @@ is given or when the library is already static.</p>
 <dd><p>The returned rotamers are either directly returned in the form as they are
 added to the library or can be interpolated.
 In the first option, <em>phi</em> and <em>psi</em> simply get transformed to the
-according bin using following formalism: bin = int((angle + pi)/bin_size).
+according bin using following formalism: bin = round((angle + pi)/bin_size).
 In case of interpolation, the chi angles and the according standard
 deviations of the rotamers get bilinearly interpolated using the
 corresponding rotamers with same configuration from the neighbouring bins.
@@ -391,7 +285,7 @@ special <em>id</em> requests.</p>
 </ul>
 </td>
 </tr>
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference internal" href="#promod3.sidechain.RotamerLibEntry" title="promod3.sidechain.RotamerLibEntry"><code class="xref py py-class docutils literal"><span class="pre">RotamerLibEntry</span></code></a> of nonzero
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="#promod3.sidechain.RotamerLibEntry" title="promod3.sidechain.RotamerLibEntry"><code class="xref py py-class docutils literal"><span class="pre">RotamerLibEntry</span></code></a> of nonzero
 probability for given phi/psi pair sorted by their probability</p>
 </td>
 </tr>
@@ -544,7 +438,7 @@ standard deviations are NaN.</p>
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Source of dihedral angles</td>
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Source of dihedral angles</td>
 </tr>
 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference internal" href="#promod3.sidechain.RotamerLibEntry" title="promod3.sidechain.RotamerLibEntry"><code class="xref py py-class docutils literal"><span class="pre">RotamerLibEntry</span></code></a></td>
 </tr>
@@ -568,7 +462,7 @@ are NaN.</p>
 <col class="field-body" />
 <tbody valign="top">
 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
-<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/1.3/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.3.3)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Source of dihedral angles</li>
+<li><strong>res</strong> (<a class="reference external" href="http://www.openstructure.org/docs/dev/mol/base/entity/#ost.mol.ResidueHandle" title="(in OpenStructure v1.6.0)"><code class="xref py py-class docutils literal"><span class="pre">ost.mol.ResidueHandle</span></code></a>) &#8211; Source of dihedral angles</li>
 <li><strong>id</strong> (<a class="reference internal" href="rotamer_id.html#promod3.sidechain.RotamerID" title="promod3.sidechain.RotamerID"><code class="xref py py-class docutils literal"><span class="pre">RotamerID</span></code></a>) &#8211; The identity of the returned <a class="reference internal" href="#promod3.sidechain.RotamerLibEntry" title="promod3.sidechain.RotamerLibEntry"><code class="xref py py-class docutils literal"><span class="pre">RotamerLibEntry</span></code></a></li>
 </ul>
 </td>
@@ -725,7 +619,7 @@ considered similar</li>
   <li><a href="../users.html">Documentation For Users</a><ul>
   <li><a href="index.html"><code class="docutils literal"><span class="pre">sidechain</span></code> - Sidechain Modelling</a><ul>
       <li>Previous: <a href="frame.html" title="previous chapter">Frame</a></li>
-      <li>Next: <a href="graph.html" title="next chapter">Coming to a solution</a></li>
+      <li>Next: <a href="rotamer_constructor.html" title="next chapter">Rotamer Constructor</a></li>
   </ul></li>
   </ul></li>
   </ul></li>
@@ -756,7 +650,7 @@ considered similar</li>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
diff --git a/doc/html/sidechain/sidechain_settings.html b/doc/html/sidechain/sidechain_settings.html
deleted file mode 100644
index 04d49563..00000000
--- a/doc/html/sidechain/sidechain_settings.html
+++ /dev/null
@@ -1,533 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    
-    <title>Rotamer Settings &mdash; ProMod3 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">
-      var DOCUMENTATION_OPTIONS = {
-        URL_ROOT:    '../',
-        VERSION:     '0',
-        COLLAPSE_INDEX: false,
-        FILE_SUFFIX: '.html',
-        HAS_SOURCE:  true
-      };
-    </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>
-    <link rel="top" title="ProMod3 0 documentation" href="../index.html" />
-    <link rel="up" title="sidechain - Sidechain Modelling" href="index.html" />
-    <link rel="next" title="Disulfid Bond Evaluation" href="disulfid.html" />
-    <link rel="prev" title="Coming to a solution" href="graph.html" />
-   
-  
-  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
-
-  </head>
-  <body role="document">  
-
-    <div class="document">
-      <div class="documentwrapper">
-        <div class="bodywrapper">
-          <div class="body" role="main">
-            
-  <div class="section" id="rotamer-settings">
-<h1>Rotamer Settings<a class="headerlink" href="#rotamer-settings" title="Permalink to this headline">¶</a></h1>
-<p>The rotamer settings control the sidechain modelling algorithms at different
-stages. Most of the parameters that can be set are related to the flexible
-rotamer model (temperature factor and delta factors to control the
-variability of the subrotamers in the flexible rotamer model)
-or the internal energy prefactor used for the different amino
-acids. Other parameters include the radius influencing the pseudo Lennard
-Jones term for the different atom types and the max interaction radius.
-The max interaction radius is more a technical thing and is used by a
-collision detection algorithm to define the collision distance, i.e.
-two particles with max radii a,b collide/interact if the distance between
-them is smaller than a+b. The last three parameters control the buildup of the
-rotamers. It is possible to deactivate the hbond term, resulting in
-no hydrogens being constructed. The sampling of polar hydrogens can also
-be controlled resulting in several rotamers per rotamer lib entry for
-Ser,Thr and Tyr when using the convenient functions for constructing full
-rotamer groups of them (see <a class="reference internal" href="rotamer.html#rotamer-group-construction-label"><span>here</span></a>).
-Constructing the rotamer groups can further be controlled by assigning a max
-summed probability resulting in less very unlikely rotamers added to the
-rotamer group (see <a class="reference internal" href="rotamer.html#rotamer-group-construction-label"><span>here</span></a>).</p>
-<dl class="class">
-<dt id="promod3.sidechain.RotamerSettings">
-<em class="property">class </em><code class="descclassname">promod3.sidechain.</code><code class="descname">RotamerSettings</code><a class="headerlink" href="#promod3.sidechain.RotamerSettings" title="Permalink to this definition">¶</a></dt>
-<dd><dl class="attribute">
-<dt>
-<code class="descname">FRM_T_ARG default: 1.23</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_ASN default: 1.41</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_ASP default: 1.48</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_GLN default: 1.32</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_GLU default: 0.94</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_LYS default: 1.27</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_SER default: 3.53</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_CYS default: 1.69</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_MET default: 1.77</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_TRP default: 0.99</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_TYR default: 1.96</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_THR default: 1.11</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_VAL default: 2.20</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_ILE default: 2.03</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_LEU default: 2.55</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_PRO default: 2.62</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_HIS default: 1.35</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_T_PHE default: 1.07</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_ARG default: 0.87</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_ARG default: 1.62</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta3_ARG default: 1.67</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta4_ARG default: 0.78</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_ASN default: 0.62</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_ASN default: 1.93</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_ASP default: 1.59</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_ASP default: 0.63</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_GLN default: 1.55</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_GLN default: 0.68</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta3_GLN default: 1.88</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_GLU default: 0.82</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_GLU default: 1.57</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta3_GLU default: 0.78</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_LYS default: 1.62</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_LYS default: 0.99</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta3_LYS default: 0.96</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta4_LYS default: 1.48</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_SER default: 0.65</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_SER default: 2.98</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_CYS default: 1.69</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_MET default: 0.97</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_MET default: 1.54</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta3_MET default: 1.21</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_TRP default: 1.28</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_TRP default: 1.48</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_TYR default: 1.48</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_TYR default: 0.73</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta3_TYR default: 0.96</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_THR default: 0.88</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_THR default: 0.88</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_VAL default: 2.08</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_ILE default: 1.23</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_ILE default: 0.98</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_LEU default: 1.15</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_LEU default: 1.48</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_PRO default: 0.78</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_PRO default: 1.27</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_HIS default: 1.84</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_HIS default: 0.85</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta1_PHE default: 1.45</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">FRM_delta2_PHE default: 1.35</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_ARG default: 2.27</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_ASN default: 1.80</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_ASP default: 2.44</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_GLN default: 1.61</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_GLU default: 1.85</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_LYS default: 2.13</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_SER default: 2.78</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_CYS default: 4.07</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_MET default: 1.95</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_TRP default: 3.24</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_TYR default: 2.00</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_THR default: 2.96</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_VAL default: 1.62</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_ILE default: 2.18</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_LEU default: 2.25</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_PRO default: 0.76</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_HIS default: 2.01</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">internal_e_prefactor_PHE default: 1.71</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">probability_cutoff default: 0.98</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">consider_hbonds default: True</code></dt>
-<dd></dd></dl>
-
-<dl class="attribute">
-<dt>
-<code class="descname">sample_polar_hydrogens default: True</code></dt>
-<dd></dd></dl>
-
-</dd></dl>
-
-</div>
-
-
-          </div>
-        </div>
-      </div>
-      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
-        <div class="sphinxsidebarwrapper"><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="docutils literal"><span class="pre">sidechain</span></code> - Sidechain Modelling</a><ul>
-      <li>Previous: <a href="graph.html" title="previous chapter">Coming to a solution</a></li>
-      <li>Next: <a href="disulfid.html" title="next chapter">Disulfid Bond Evaluation</a></li>
-  </ul></li>
-  </ul></li>
-  </ul></li>
-</ul>
-</div>
-  <div role="note" aria-label="source link">
-    <h3>This Page</h3>
-    <ul class="this-page-menu">
-      <li><a href="../_sources/sidechain/sidechain_settings.txt"
-            rel="nofollow">Show Source</a></li>
-    </ul>
-   </div>
-<div id="searchbox" style="display: none" role="search">
-  <h3>Quick search</h3>
-    <form class="search" action="../search.html" method="get">
-      <input type="text" name="q" />
-      <input type="submit" value="Go" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    <p class="searchtip" style="font-size: 90%">
-    Enter search terms or a module, class or function name.
-    </p>
-</div>
-<script type="text/javascript">$('#searchbox').show(0);</script>
-        </div>
-      </div>
-      <div class="clearer"></div>
-    </div>
-    <div class="footer">
-      &copy;2016, Bienchen.
-      
-      |
-      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
-      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
-      
-      |
-      <a href="../_sources/sidechain/sidechain_settings.txt"
-          rel="nofollow">Page source</a>
-    </div>
-
-    
-
-    
-  </body>
-</html>
\ No newline at end of file
diff --git a/doc/html/sidechain/subrotamer_optimizer.html b/doc/html/sidechain/subrotamer_optimizer.html
new file mode 100644
index 00000000..152300e2
--- /dev/null
+++ b/doc/html/sidechain/subrotamer_optimizer.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Subrotamer Optimization &mdash; ProMod3 1.0.2 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">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '1.0.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </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>
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="../index.html" />
+    <link rel="up" title="sidechain - Sidechain Modelling" href="index.html" />
+    <link rel="next" title="scoring - Loop Scoring" href="../scoring/index.html" />
+    <link rel="prev" title="Loading Rotamer Libraries" href="loading.html" />
+   
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
+
+  </head>
+  <body role="document">  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="subrotamer-optimization">
+<h1>Subrotamer Optimization<a class="headerlink" href="#subrotamer-optimization" title="Permalink to this headline">¶</a></h1>
+<p>The idea of the flexible rotamer model is to have several subrotamers
+representing one single rotamer.
+One subrotamer is the representative (the active subrotamer).
+Thats the one that gets inserted in the structure once the reconstruction has
+finished. This is not necessarily the optimal one. The SubrotamerOptimizer
+takes a list of flexible rotamers, converts every single flexible rotamer
+in a rotamer group of rigid rotamers, solves the sidechain reconstruction
+problem and assigns the optimal subrotamers as active in the original
+flexible rotamers. In terms of energies, the SubrotamerOptimizer expects
+the energy of the flexible rotamers towards the rigid frame already to be set.
+The internal energies can be controlled as parameters and a constant value is
+set for rotamers that are currently active or not. The reason for that is
+that you might want to prefer the currently active subrotamers if no
+pairwise energies to other rotamers are observed.</p>
+<dl class="method">
+<dt id="promod3.sidechain.SubrotamerOptimizer">
+<code class="descclassname">promod3.sidechain.</code><code class="descname">SubrotamerOptimizer</code><span class="sig-paren">(</span><em>rotamers, [active_internal_energy=-2.0,                               inactive_internal_energy=0.0,                               max_complexity=100000000, initial_epsilon=0.02</em><span class="sig-paren">)</span><a class="headerlink" href="#promod3.sidechain.SubrotamerOptimizer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Takes the <strong>rotamers</strong> of type <a class="reference internal" href="rotamer.html#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a>, converts all their
+subrotamers into rigid rotamers, solves the sidechain reconstruction problem
+and assigns the ideal subrotamers as active in the input <strong>rotamers</strong>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>rotamers</strong> (<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="rotamer.html#promod3.sidechain.FRMRotamer" title="promod3.sidechain.FRMRotamer"><code class="xref py py-class docutils literal"><span class="pre">FRMRotamer</span></code></a>) &#8211; The rotamers to be optimized</li>
+<li><strong>active_internal_energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Internal energy that gets assigned to all
+currently active subrotamers</li>
+<li><strong>inactive_internal_energy</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Internal energy that gets assigned to all
+currently inactive subrotamers</li>
+<li><strong>max_complexity</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) &#8211; Max complexity of the internal <a class="reference internal" href="graph.html#promod3.sidechain.RotamerGraph" title="promod3.sidechain.RotamerGraph"><code class="xref py py-class docutils literal"><span class="pre">RotamerGraph</span></code></a></li>
+<li><strong>initial_epsilon</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) &#8211; Epsilon value controlling the pruning of
+internal <a class="reference internal" href="graph.html#promod3.sidechain.RotamerGraph" title="promod3.sidechain.RotamerGraph"><code class="xref py py-class docutils literal"><span class="pre">RotamerGraph</span></code></a></li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper"><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="docutils literal"><span class="pre">sidechain</span></code> - Sidechain Modelling</a><ul>
+      <li>Previous: <a href="loading.html" title="previous chapter">Loading Rotamer Libraries</a></li>
+      <li>Next: <a href="../scoring/index.html" title="next chapter"><code class="docutils literal"><span class="pre">scoring</span></code> - Loop Scoring</a></li>
+  </ul></li>
+  </ul></li>
+  </ul></li>
+</ul>
+</div>
+  <div role="note" aria-label="source link">
+    <h3>This Page</h3>
+    <ul class="this-page-menu">
+      <li><a href="../_sources/sidechain/subrotamer_optimizer.txt"
+            rel="nofollow">Show Source</a></li>
+    </ul>
+   </div>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2016, ProMod3 authors.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a>
+      
+      |
+      <a href="../_sources/sidechain/subrotamer_optimizer.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/doc/html/users.html b/doc/html/users.html
index f9372cfe..5671acb9 100644
--- a/doc/html/users.html
+++ b/doc/html/users.html
@@ -6,7 +6,7 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Documentation For Users &mdash; ProMod3 0 documentation</title>
+    <title>Documentation For Users &mdash; ProMod3 1.0.2 documentation</title>
     
     <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    './',
-        VERSION:     '0',
+        VERSION:     '1.0.2',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -23,7 +23,7 @@
     <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>
-    <link rel="top" title="ProMod3 0 documentation" href="index.html" />
+    <link rel="top" title="ProMod3 1.0.2 documentation" href="index.html" />
     <link rel="next" title="Getting Started" href="gettingstarted.html" />
     <link rel="prev" title="Welcome To ProMod3’s Documentation!" href="index.html" />
    
@@ -50,39 +50,60 @@ scripts using the functionality of this library.</p>
 <li class="toctree-l2"><a class="reference internal" href="gettingstarted.html#modelling-pipeline">Modelling pipeline</a></li>
 </ul>
 </li>
+<li class="toctree-l1"><a class="reference internal" href="actions/index.html">ProMod3 Actions</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="actions/index.html#building-models">Building models</a></li>
+</ul>
+</li>
 <li class="toctree-l1"><a class="reference internal" href="buildsystem.html">Building ProMod3</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="buildsystem.html#dependencies">Dependencies</a></li>
 <li class="toctree-l2"><a class="reference internal" href="buildsystem.html#using-cmake">Using CMake</a></li>
+<li class="toctree-l2"><a class="reference internal" href="buildsystem.html#running-make">Running Make</a></li>
+<li class="toctree-l2"><a class="reference internal" href="buildsystem.html#installing-project">Installing ProMod3</a></li>
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" href="modelling/index.html"><code class="docutils literal"><span class="pre">modelling</span></code> - Protein Modelling</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="modelling/index.html#modelling-pipeline">Modelling Pipeline</a></li>
-<li class="toctree-l2"><a class="reference internal" href="modelling/index.html#closing-gaps">Closing Gaps</a></li>
-<li class="toctree-l2"><a class="reference internal" href="modelling/index.html#modelling-handle-class">Modelling Handle class</a></li>
-<li class="toctree-l2"><a class="reference internal" href="modelling/index.html#gap-classes">Gap classes</a></li>
-<li class="toctree-l2"><a class="reference internal" href="modelling/index.html#gap-extender-classes">Gap Extender classes</a></li>
-<li class="toctree-l2"><a class="reference internal" href="modelling/index.html#detecting-ring-punches">Detecting ring punches</a></li>
+<li class="toctree-l2"><a class="reference internal" href="modelling/pipeline.html">Modelling Pipeline</a></li>
+<li class="toctree-l2"><a class="reference internal" href="modelling/model_checking.html">Model Checking</a></li>
+<li class="toctree-l2"><a class="reference internal" href="modelling/gap_handling.html">Handling Gaps</a></li>
+<li class="toctree-l2"><a class="reference internal" href="modelling/loop_candidates.html">Handling Loop Candidates</a></li>
+<li class="toctree-l2"><a class="reference internal" href="modelling/loop_closing.html">Fitting Loops Into Gaps</a></li>
+<li class="toctree-l2"><a class="reference internal" href="modelling/monte_carlo.html">Generating Loops De Novo</a></li>
+<li class="toctree-l2"><a class="reference internal" href="modelling/sidechain_reconstruction.html">Sidechain Reconstruction</a></li>
+<li class="toctree-l2"><a class="reference internal" href="modelling/algorithms.html">Modelling Algorithms</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="loop/index.html"><code class="docutils literal"><span class="pre">loop</span></code> - Loop Modelling</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="loop/backbone.html">Representing Loops</a></li>
-<li class="toctree-l2"><a class="reference internal" href="loop/torsion_sampler.html">Have a closer look at backbone dihedral angles</a></li>
-<li class="toctree-l2"><a class="reference internal" href="loop/structure_db.html">A dump for structural data</a></li>
-<li class="toctree-l2"><a class="reference internal" href="loop/loop_closing.html">Closing Loops - adapt them to the environment</a></li>
-<li class="toctree-l2"><a class="reference internal" href="loop/backbone_loop_score.html">Loop Scoring</a></li>
-<li class="toctree-l2"><a class="reference internal" href="loop/monte_carlo.html">Generating Loops DeNovo</a></li>
-<li class="toctree-l2"><a class="reference internal" href="loop/load_loop_objects.html">Loading Precomputed Loop Objects</a></li>
-<li class="toctree-l2"><a class="reference internal" href="loop/helper_classes.html">Helper Classes</a></li>
+<li class="toctree-l1"><a class="reference internal" href="sidechain/index.html"><code class="docutils literal"><span class="pre">sidechain</span></code> - Sidechain Modelling</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="sidechain/rotamer_id.html">RotamerID</a></li>
+<li class="toctree-l2"><a class="reference internal" href="sidechain/rotamer.html">Rotamers</a></li>
+<li class="toctree-l2"><a class="reference internal" href="sidechain/frame.html">Frame</a></li>
+<li class="toctree-l2"><a class="reference internal" href="sidechain/rotamer_lib.html">Rotamer Library</a></li>
+<li class="toctree-l2"><a class="reference internal" href="sidechain/rotamer_constructor.html">Rotamer Constructor</a></li>
+<li class="toctree-l2"><a class="reference internal" href="sidechain/graph.html">Rotamer Graph</a></li>
+<li class="toctree-l2"><a class="reference internal" href="sidechain/disulfid.html">Disulfid Bond Evaluation</a></li>
+<li class="toctree-l2"><a class="reference internal" href="sidechain/loading.html">Loading Rotamer Libraries</a></li>
+<li class="toctree-l2"><a class="reference internal" href="sidechain/subrotamer_optimizer.html">Subrotamer Optimization</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="sidechain/index.html"><code class="docutils literal"><span class="pre">sidechain</span></code> - Sidechain Modelling</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="sidechain/index.html#reconstruct-function">Reconstruct Function</a></li>
-<li class="toctree-l2"><a class="reference internal" href="sidechain/index.html#sidechain-module-functionality">Sidechain Module Functionality</a></li>
+<li class="toctree-l1"><a class="reference internal" href="scoring/index.html"><code class="docutils literal"><span class="pre">scoring</span></code> - Loop Scoring</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="scoring/backbone_score_env.html">Backbone Score Environment</a></li>
+<li class="toctree-l2"><a class="reference internal" href="scoring/backbone_scorers.html">Backbone Scorers</a></li>
+<li class="toctree-l2"><a class="reference internal" href="scoring/all_atom_scorers.html">All Atom Scorers</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="loop/index.html"><code class="docutils literal"><span class="pre">loop</span></code> - Loop Handling</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="loop/backbone.html">Representing Loops</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loop/torsion_sampler.html">Sampling Dihedral Angles</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loop/structure_db.html">Structural Data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loop/all_atom.html">Handling All Atom Positions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loop/mm_system_creation.html">Generate <code class="docutils literal"><span class="pre">ost.mol.mm</span></code> systems</a></li>
+<li class="toctree-l2"><a class="reference internal" href="loop/load_loop_objects.html">Loading Precomputed Objects</a></li>
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" href="core/index.html"><code class="docutils literal"><span class="pre">core</span></code> - ProMod3 Core Functionality</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="core/pm3argparse.html"><code class="docutils literal"><span class="pre">pm3argparse</span></code> - Parsing Command Lines</a></li>
 <li class="toctree-l2"><a class="reference internal" href="core/helper.html"><code class="docutils literal"><span class="pre">helper</span></code> - Shared Functionality For the Everything</a></li>
+<li class="toctree-l2"><a class="reference internal" href="core/geometry.html">Geometry functions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="core/runtime_profiling.html">Runtime profiling</a></li>
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" href="core/setcompoundschemlib.html"><code class="docutils literal"><span class="pre">SetCompoundsChemlib()</span></code></a></li>
@@ -129,7 +150,7 @@ scripts using the functionality of this library.</p>
       <div class="clearer"></div>
     </div>
     <div class="footer">
-      &copy;2016, Bienchen.
+      &copy;2016, ProMod3 authors.
       
       |
       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a>
-- 
GitLab