Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adw62 committed Sep 2, 2022
1 parent 13c669d commit 62e3e84
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 20 deletions.
2 changes: 1 addition & 1 deletion TIES_MD/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def main(argv=None):
if args['--config_file']:
config_file = args['--config_file']
input_folder = config_file.split('/')[:-1]
input_folder = '/'.join(input_folder)
input_folder = os.path.abspath('/'.join(input_folder))
else:
input_folder = os.getcwd()
config_file = input_folder+'/TIES.cfg'
Expand Down
16 changes: 13 additions & 3 deletions TIES_MD/doc/source/API.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@ API
---

Here we detail all the options in the API and what should be passed. The options that were previously on the command line
can be passed into the TIES class like so::
can be passed into the TIES class. A minimal evocation would looks like::

from TIES_MD import TIES
import os
md = TIES(cwd=os.path.abspath('./my_ties_sims'), windows_mask=[0,1], rep_id=0, exp_name='sys_solv')
md = TIES(cwd=os.path.abspath('./my_ties_sims'))

``cwd`` points to where the ``TIES.cfg`` file is located and where the simulations are performed, note this must be
an absolute path. All other arguments will be set to their default values. If we want to change all the arguments then
the code might look like::

from TIES_MD import TIES
import os
md = TIES(cwd=os.path.abspath('./my_ties_sims'), exp_name='sys_solv', windows_mask=[0], devices=[0], rep_id=0)

These arguments have the same definitions as in the :ref:`Command Line` subsection of the tutorial.

Once the TIES class is constructed the options that were previously in TIES.cfg can now be set as attributes of the TIES
class like so::
Expand Down Expand Up @@ -41,7 +51,7 @@ class like so::
#How many total replicas of each window are run (we recommend at least 5).
md.total_reps = 3

#Boolean for if we will split all replicas into separate runs. (True for maximum parallelism)
#Boolean for if we will split all replicas into separate runs. (Set to True for maximum parallelism)
md.split_run = False

#List for where in lambda schedule (0->1) should the electrostatic potentials begin, stop appearing.
Expand Down
2 changes: 1 addition & 1 deletion TIES_MD/doc/source/binding_free_energies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Setup
To set up these calculation we recommend the use of ``TIES20``. This is a program designed to both build and parameterize
hybrid ligands but also setup binding free energy calculations for the TIES protocol that can be run with ``TIES_MD``.
``TIES20`` can be used in `browser <https://ccs-ties.org/ties/>`_. Alternatively one can use the ``TIES20`` API to set up
simulations. In order to use the API ``TIES20`` must be installed locally please see the :ref:`TIES20` section
simulations. In order to use the API ``TIES20`` must be installed locally please see the `TIES20 git. <https://github.com/UCL-CCS/TIES20>`_
for how to do this. With ``TIES20`` installed you can use the API as follows to build inputs::

#ties20 imports
Expand Down
1 change: 0 additions & 1 deletion TIES_MD/doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Contents
parallelization
HPC_submissions
theory
TIES20
🚀Github <https://github.com/UCL-CCS/TIES_MD>

Code Documentation
Expand Down
2 changes: 1 addition & 1 deletion TIES_MD/doc/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ settings and the settings found in ``TIES.cfg``. The setting which can be taken
values are as follows::

[--config_file=./TIES.cfg]
A string for the absolute path pointing to where the TIES.cfg file is located. #THIS PATH MUST BE ABSOLUTE.
A string for the path pointing to where the TIES.cfg file is located.

[--exp_name=complex]
This is the name of the experiment and the prefix that TIES OpenMM will expect on the input pdb and prmtop file.
Expand Down
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion TIES_MD/tests/test_TIES.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def test_namd_conf(self):
args_dict = copy.deepcopy(test_args)

#make a output dir
out_dir = os.path.join('data', 'test_replica-confs', 'tmp') #this is a relative path to make tests work anywhere
out_dir = os.path.join('data', 'test_replica-confs', 'tmp') #this is a relative such that CI dir structure is not
#in generated conf scripts therfore we can match them.
Path(out_dir).mkdir(parents=False, exist_ok=True)

#iterate over the variables that effect how confs are written
Expand Down
15 changes: 12 additions & 3 deletions docs/API.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,21 @@ <h1>TIES MD API<a class="headerlink" href="#ties-md-api" title="Permalink to thi
<section id="api">
<h2>API<a class="headerlink" href="#api" title="Permalink to this heading"></a></h2>
<p>Here we detail all the options in the API and what should be passed. The options that were previously on the command line
can be passed into the TIES class like so:</p>
can be passed into the TIES class. A minimal evocation would looks like:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">TIES_MD</span> <span class="kn">import</span> <span class="n">TIES</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="n">md</span> <span class="o">=</span> <span class="n">TIES</span><span class="p">(</span><span class="n">cwd</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">abspath</span><span class="p">(</span><span class="s1">&#39;./my_ties_sims&#39;</span><span class="p">),</span> <span class="n">windows_mask</span><span class="o">=</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">rep_id</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">exp_name</span><span class="o">=</span><span class="s1">&#39;sys_solv&#39;</span><span class="p">)</span>
<span class="n">md</span> <span class="o">=</span> <span class="n">TIES</span><span class="p">(</span><span class="n">cwd</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">abspath</span><span class="p">(</span><span class="s1">&#39;./my_ties_sims&#39;</span><span class="p">))</span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">cwd</span></code> points to where the <code class="docutils literal notranslate"><span class="pre">TIES.cfg</span></code> file is located and where the simulations are performed, note this must be
an absolute path. All other arguments will be set to their default values. If we want to change all the arguments then
the code might look like:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">TIES_MD</span> <span class="kn">import</span> <span class="n">TIES</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="n">md</span> <span class="o">=</span> <span class="n">TIES</span><span class="p">(</span><span class="n">cwd</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">abspath</span><span class="p">(</span><span class="s1">&#39;./my_ties_sims&#39;</span><span class="p">),</span> <span class="n">exp_name</span><span class="o">=</span><span class="s1">&#39;sys_solv&#39;</span><span class="p">,</span> <span class="n">windows_mask</span><span class="o">=</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">devices</span><span class="o">=</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">rep_id</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
</pre></div>
</div>
<p>These arguments have the same definitions as in the <a class="reference internal" href="tutorial.html#command-line"><span class="std std-ref">Command Line</span></a> subsection of the tutorial.</p>
<p>Once the TIES class is constructed the options that were previously in TIES.cfg can now be set as attributes of the TIES
class like so:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># openmm.unit is needed to set values with units</span>
Expand All @@ -119,7 +128,7 @@ <h2>API<a class="headerlink" href="#api" title="Permalink to this heading"></
<span class="c1">#How many total replicas of each window are run (we recommend at least 5).</span>
<span class="n">md</span><span class="o">.</span><span class="n">total_reps</span> <span class="o">=</span> <span class="mi">3</span>

<span class="c1">#Boolean for if we will split all replicas into separate runs. (True for maximum parallelism)</span>
<span class="c1">#Boolean for if we will split all replicas into separate runs. (Set to True for maximum parallelism)</span>
<span class="n">md</span><span class="o">.</span><span class="n">split_run</span> <span class="o">=</span> <span class="kc">False</span>

<span class="c1">#List for where in lambda schedule (0-&gt;1) should the electrostatic potentials begin, stop appearing.</span>
Expand Down
16 changes: 13 additions & 3 deletions docs/_sources/API.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@ API
---

Here we detail all the options in the API and what should be passed. The options that were previously on the command line
can be passed into the TIES class like so::
can be passed into the TIES class. A minimal evocation would looks like::

from TIES_MD import TIES
import os
md = TIES(cwd=os.path.abspath('./my_ties_sims'), windows_mask=[0,1], rep_id=0, exp_name='sys_solv')
md = TIES(cwd=os.path.abspath('./my_ties_sims'))

``cwd`` points to where the ``TIES.cfg`` file is located and where the simulations are performed, note this must be
an absolute path. All other arguments will be set to their default values. If we want to change all the arguments then
the code might look like::

from TIES_MD import TIES
import os
md = TIES(cwd=os.path.abspath('./my_ties_sims'), exp_name='sys_solv', windows_mask=[0], devices=[0], rep_id=0)

These arguments have the same definitions as in the :ref:`Command Line` subsection of the tutorial.

Once the TIES class is constructed the options that were previously in TIES.cfg can now be set as attributes of the TIES
class like so::
Expand Down Expand Up @@ -41,7 +51,7 @@ class like so::
#How many total replicas of each window are run (we recommend at least 5).
md.total_reps = 3

#Boolean for if we will split all replicas into separate runs. (True for maximum parallelism)
#Boolean for if we will split all replicas into separate runs. (Set to True for maximum parallelism)
md.split_run = False

#List for where in lambda schedule (0->1) should the electrostatic potentials begin, stop appearing.
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/binding_free_energies.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Setup
To set up these calculation we recommend the use of ``TIES20``. This is a program designed to both build and parameterize
hybrid ligands but also setup binding free energy calculations for the TIES protocol that can be run with ``TIES_MD``.
``TIES20`` can be used in `browser <https://ccs-ties.org/ties/>`_. Alternatively one can use the ``TIES20`` API to set up
simulations. In order to use the API ``TIES20`` must be installed locally please see the :ref:`TIES20` section
simulations. In order to use the API ``TIES20`` must be installed locally please see the `TIES20 git. <https://github.com/UCL-CCS/TIES20>`_
for how to do this. With ``TIES20`` installed you can use the API as follows to build inputs::

#ties20 imports
Expand Down
1 change: 0 additions & 1 deletion docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Contents
parallelization
HPC_submissions
theory
TIES20
🚀Github <https://github.com/UCL-CCS/TIES_MD>

Code Documentation
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/tutorial.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ settings and the settings found in ``TIES.cfg``. The setting which can be taken
values are as follows::

[--config_file=./TIES.cfg]
A string for the absolute path pointing to where the TIES.cfg file is located. #THIS PATH MUST BE ABSOLUTE.
A string for the path pointing to where the TIES.cfg file is located.

[--exp_name=complex]
This is the name of the experiment and the prefix that TIES OpenMM will expect on the input pdb and prmtop file.
Expand Down
2 changes: 1 addition & 1 deletion docs/binding_free_energies.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h2>Setup<a class="headerlink" href="#setup" title="Permalink to this heading">
<p>To set up these calculation we recommend the use of <code class="docutils literal notranslate"><span class="pre">TIES20</span></code>. This is a program designed to both build and parameterize
hybrid ligands but also setup binding free energy calculations for the TIES protocol that can be run with <code class="docutils literal notranslate"><span class="pre">TIES_MD</span></code>.
<code class="docutils literal notranslate"><span class="pre">TIES20</span></code> can be used in <a class="reference external" href="https://ccs-ties.org/ties/">browser</a>. Alternatively one can use the <code class="docutils literal notranslate"><span class="pre">TIES20</span></code> API to set up
simulations. In order to use the API <code class="docutils literal notranslate"><span class="pre">TIES20</span></code> must be installed locally please see the <span class="xref std std-ref">TIES20</span> section
simulations. In order to use the API <code class="docutils literal notranslate"><span class="pre">TIES20</span></code> must be installed locally please see the <a class="reference external" href="https://github.com/UCL-CCS/TIES20">TIES20 git.</a>
for how to do this. With <code class="docutils literal notranslate"><span class="pre">TIES20</span></code> installed you can use the API as follows to build inputs:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">#ties20 imports</span>
<span class="kn">from</span> <span class="nn">ties</span> <span class="kn">import</span> <span class="n">Pair</span><span class="p">,</span> <span class="n">Config</span><span class="p">,</span> <span class="n">Ligand</span><span class="p">,</span> <span class="n">Protein</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ <h2>Command Line<a class="headerlink" href="#command-line" title="Permalink to t
settings and the settings found in <code class="docutils literal notranslate"><span class="pre">TIES.cfg</span></code>. The setting which can be taken on the command line and their default
values are as follows:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>[--config_file=./TIES.cfg]
A string for the absolute path pointing to where the TIES.cfg file is located. #THIS PATH MUST BE ABSOLUTE.
A string for the path pointing to where the TIES.cfg file is located.

[--exp_name=complex]
This is the name of the experiment and the prefix that TIES OpenMM will expect on the input pdb and prmtop file.
Expand Down

0 comments on commit 62e3e84

Please sign in to comment.