Skip to content

Commit

Permalink
extend analysis docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adw62 committed Sep 21, 2022
1 parent d6e5c58 commit 36237bb
Show file tree
Hide file tree
Showing 24 changed files with 325 additions and 15 deletions.
1 change: 0 additions & 1 deletion TIES_MD/alch.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,6 @@ def build_simulation(self, system, device_id):

return {'sim': sim, 'integrate': integrator}


def debug_force(self, system):
'''
Function which removes all but nonbonded forces while maintaining NPT ensemble
Expand Down
1 change: 1 addition & 0 deletions TIES_MD/doc/source/TIES_MD.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Subpackages

TIES_MD.eng_scripts
TIES_MD.openmmtools
TIES_MD.tests
TIES_MD.ties_analysis

Submodules
Expand Down
Binary file added TIES_MD/doc/source/_static/images/TI_grad.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added TIES_MD/doc/source/_static/images/analysis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions TIES_MD/doc/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,33 @@ would look something like::
{'OpenMM_FEP': {'ethane': {'zero_sum': [-0.023, 0.023]}},
'OpenMM_TI': {'ethane': {'zero_sum': [0.003, 0.076]}}}

To complement this main output ``TIES_analysis`` will also produce analysis figures which should help in determining the
validity and accuracy of calculations. ``TIES_analysis`` will place these figures in a new directory named
``analysis/engine/method/system/ligand/thermodynamic_leg/``

.. image:: _static/images/analysis.png
:align: center
:width: 600
:alt: Alternative text

Panel a) pertains to FEP results and measures the overlap in phase space between alchemical states (λ index).
If the off diagonal element of this matrix are less then 0.03 then this can serve as a warning to the user if their
states are too far apart. Please see the work of `Mey et al. <https://arxiv.org/pdf/2008.03067.pdf>`_ for more
details on this analysis.

Panel b) pertains to TI results and shows gradient of the potential with respect to the alchemical controlling
parameter (λ) rapid changes in this gradient warn the user that the results may be inaccurate. As an example see the
following figure:

.. image:: _static/images/TI_grad.jpeg
:align: center
:width: 600
:alt: Alternative text


Panel a) show the analysis for a calculation where the gradient of 'λ sterics disappear' is changing too quickly in
states 12 - 13. This will lead to inaccuracies in numerical integration used in the TI method. Panel b) shows the
results from a simulation of the same chemical system with modified alchemical settings which soften how the Van der Waals
forces are removed. This `softening <http://alchemistry.org/wiki/Constructing_a_Pathway_of_Intermediate_States#Soft_Core_Potentials>`_
is a common in alchemical methods and default in our implementation of ``TIES``, please see our ``TIES``
`paper <https://pubs.acs.org/doi/pdf/10.1021/acs.jctc.2c00114>`_ for more details.
1 change: 1 addition & 0 deletions docs/TIES_MD.eng_scripts.cfg_scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
1 change: 1 addition & 0 deletions docs/TIES_MD.eng_scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="current reference internal" href="#">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
1 change: 1 addition & 0 deletions docs/TIES_MD.eng_scripts.namd_sub.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
1 change: 1 addition & 0 deletions docs/TIES_MD.eng_scripts.namd_sub_split.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
1 change: 1 addition & 0 deletions docs/TIES_MD.eng_scripts.openmm_sub.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
1 change: 1 addition & 0 deletions docs/TIES_MD.eng_scripts.openmm_sub_split.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
18 changes: 16 additions & 2 deletions docs/TIES_MD.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li class="toctree-l3"><a class="reference internal" href="#subpackages">Subpackages</a><ul>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down Expand Up @@ -134,6 +135,19 @@ <h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to thi
<li class="toctree-l2"><a class="reference internal" href="TIES_MD.openmmtools.html#module-TIES_MD.openmmtools">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="TIES_MD.tests.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="TIES_MD.tests.html#module-TIES_MD.tests.test_TI">TIES_MD.tests.test_TI module</a></li>
<li class="toctree-l2"><a class="reference internal" href="TIES_MD.tests.html#module-TIES_MD.tests.test_TIES">TIES_MD.tests.test_TIES module</a></li>
<li class="toctree-l2"><a class="reference internal" href="TIES_MD.tests.html#module-TIES_MD.tests.test_alch">TIES_MD.tests.test_alch module</a></li>
<li class="toctree-l2"><a class="reference internal" href="TIES_MD.tests.html#module-TIES_MD.tests.test_cli">TIES_MD.tests.test_cli module</a></li>
<li class="toctree-l2"><a class="reference internal" href="TIES_MD.tests.html#module-TIES_MD.tests.test_fep">TIES_MD.tests.test_fep module</a></li>
<li class="toctree-l2"><a class="reference internal" href="TIES_MD.tests.html#module-TIES_MD.tests.test_lambdas">TIES_MD.tests.test_lambdas module</a></li>
<li class="toctree-l2"><a class="reference internal" href="TIES_MD.tests.html#module-TIES_MD.tests.test_namd">TIES_MD.tests.test_namd module</a></li>
<li class="toctree-l2"><a class="reference internal" href="TIES_MD.tests.html#module-TIES_MD.tests.test_openmm">TIES_MD.tests.test_openmm module</a></li>
<li class="toctree-l2"><a class="reference internal" href="TIES_MD.tests.html#module-TIES_MD.tests">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="TIES_MD.ties_analysis.html#subpackages">Subpackages</a><ul>
<li class="toctree-l3"><a class="reference internal" href="TIES_MD.ties_analysis.engines.html">TIES_MD.ties_analysis.engines package</a><ul>
Expand Down Expand Up @@ -168,7 +182,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<span id="ties-md-ties-module"></span><h2>TIES_MD.TIES module<a class="headerlink" href="#module-TIES_MD.TIES" title="Permalink to this heading"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="TIES_MD.TIES.TIES">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">TIES_MD.TIES.</span></span><span class="sig-name descname"><span class="pre">TIES</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cwd</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exp_name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'complex'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">run_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'class'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">devices</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rep_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">windows_mask</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">periodic</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lam</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">platform</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'CUDA'</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#TIES_MD.TIES.TIES" title="Permalink to this definition"></a></dt>
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">TIES_MD.TIES.</span></span><span class="sig-name descname"><span class="pre">TIES</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cwd</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exp_name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'complex'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">run_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'class'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">devices</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rep_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">windows_mask</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">periodic</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">platform</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'CUDA'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lam</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#TIES_MD.TIES.TIES" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Class to control TIES protocol, initializes variables and calls functions to start simulation or write input scripts</p>
<dl class="field-list simple">
Expand All @@ -182,7 +196,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<li><p><strong>windows_mask</strong> – list containing ints for start and end range of windows to be run</p></li>
<li><p><strong>periodic</strong> – boolean determines if the simulation will be periodic</p></li>
<li><p><strong>lam</strong> – Lambda class, allow passing of custom lambda schedule</p></li>
<li><p><strong>platform</strong> – sting determines what platform OpenMM will target allowed values are [‘CPU’, ‘CUDA’, ‘OpenCL’]</p></li>
<li><p><strong>platform</strong> – sting determines what platform OpenMM will target allowed values are [‘CPU’, ‘CUDA’, ‘OpenCL’, ‘HIP’]</p></li>
<li><p><strong>**kwargs</strong><p>dict, containing setting from config file</p>
</p></li>
</ul>
Expand Down
5 changes: 3 additions & 2 deletions docs/TIES_MD.openmmtools.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="TIES_MD.ties_analysis package" href="TIES_MD.ties_analysis.html" />
<link rel="next" title="TIES_MD.tests package" href="TIES_MD.tests.html" />
<link rel="prev" title="TIES_MD.eng_scripts.openmm_sub_split package" href="TIES_MD.eng_scripts.openmm_sub_split.html" />
</head>

Expand Down Expand Up @@ -55,6 +55,7 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4 current"><a class="current reference internal" href="#">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down Expand Up @@ -328,7 +329,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="TIES_MD.eng_scripts.openmm_sub_split.html" class="btn btn-neutral float-left" title="TIES_MD.eng_scripts.openmm_sub_split package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="TIES_MD.ties_analysis.html" class="btn btn-neutral float-right" title="TIES_MD.ties_analysis package" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="TIES_MD.tests.html" class="btn btn-neutral float-right" title="TIES_MD.tests package" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

<hr/>
Expand Down
1 change: 1 addition & 0 deletions docs/TIES_MD.ties_analysis.engines.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
5 changes: 3 additions & 2 deletions docs/TIES_MD.ties_analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="TIES_MD.ties_analysis.engines package" href="TIES_MD.ties_analysis.engines.html" />
<link rel="prev" title="TIES_MD.openmmtools package" href="TIES_MD.openmmtools.html" />
<link rel="prev" title="TIES_MD.tests package" href="TIES_MD.tests.html" />
</head>

<body class="wy-body-for-nav">
Expand Down Expand Up @@ -55,6 +55,7 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4 current"><a class="current reference internal" href="#">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down Expand Up @@ -227,7 +228,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="TIES_MD.openmmtools.html" class="btn btn-neutral float-left" title="TIES_MD.openmmtools package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="TIES_MD.tests.html" class="btn btn-neutral float-left" title="TIES_MD.tests package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="TIES_MD.ties_analysis.engines.html" class="btn btn-neutral float-right" title="TIES_MD.ties_analysis.engines package" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

Expand Down
1 change: 1 addition & 0 deletions docs/TIES_MD.ties_analysis.methods.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
1 change: 1 addition & 0 deletions docs/_sources/TIES_MD.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Subpackages

TIES_MD.eng_scripts
TIES_MD.openmmtools
TIES_MD.tests
TIES_MD.ties_analysis

Submodules
Expand Down
Loading

0 comments on commit 36237bb

Please sign in to comment.