Skip to content

Commit

Permalink
Documentation build
Browse files Browse the repository at this point in the history
  • Loading branch information
YHordijk authored and github-actions[bot] committed Mar 18, 2024
1 parent 81e2ba3 commit 0f126c6
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 5 deletions.
Binary file modified docs/_build/doctrees/api/tcutility.job.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
21 changes: 20 additions & 1 deletion docs/_build/html/_modules/tcutility/job/ams.html
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ <h1>Source code for tcutility.job.ams</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">tcutility</span> <span class="kn">import</span> <span class="n">log</span>
<span class="kn">from</span> <span class="nn">tcutility.job.generic</span> <span class="kn">import</span> <span class="n">Job</span>
<span class="kn">import</span> <span class="nn">os</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span>

<span class="n">j</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>

Expand Down Expand Up @@ -446,6 +447,24 @@ <h1>Source code for tcutility.job.ams</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">settings</span><span class="o">.</span><span class="n">input</span><span class="o">.</span><span class="n">ams</span><span class="o">.</span><span class="n">System</span><span class="o">.</span><span class="n">Charge</span> <span class="o">=</span> <span class="n">val</span></div>


<div class="viewcode-block" id="AMSJob.electric_field">
<a class="viewcode-back" href="../../../api/tcutility.job.html#tcutility.job.ams.AMSJob.electric_field">[docs]</a>
<span class="k">def</span> <span class="nf">electric_field</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">direction</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="nb">float</span><span class="p">],</span> <span class="n">magnitude</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Set an electric field for this system.</span>

<span class="sd"> Args:</span>
<span class="sd"> direction: the vector with the direction and strength of the electric field.</span>
<span class="sd"> magnitude: if given, the direction will be normalized and magnitude will be used as the field strength.</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="c1"># if magnitude is given we normalize the direction vector and give it the correct length</span>
<span class="k">if</span> <span class="n">magnitude</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">direction</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">direction</span><span class="p">)</span><span class="o">/</span><span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">norm</span><span class="p">(</span><span class="n">direction</span><span class="p">)</span> <span class="o">*</span> <span class="n">magnitude</span>

<span class="n">ex</span><span class="p">,</span> <span class="n">ey</span><span class="p">,</span> <span class="n">ez</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">(</span><span class="n">direction</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">settings</span><span class="o">.</span><span class="n">input</span><span class="o">.</span><span class="n">ams</span><span class="o">.</span><span class="n">System</span><span class="o">.</span><span class="n">ElectrostaticEmbedding</span><span class="o">.</span><span class="n">ElectricField</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;</span><span class="si">{</span><span class="n">ex</span><span class="si">}</span><span class="s1"> </span><span class="si">{</span><span class="n">ey</span><span class="si">}</span><span class="s1"> </span><span class="si">{</span><span class="n">ez</span><span class="si">}</span><span class="s1">&#39;</span></div>


<span class="k">def</span> <span class="nf">_setup_job</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Set up the calculation. This will create the working directory and write the runscript and input file for ADF to use.</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/_modules/tcutility/molecule.html
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ <h1>Source code for tcutility.molecule</h1><div class="highlight"><pre>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Save a molecule in a custom xyz file format.</span>
<span class="sd"> Molecule and atom flags can be provided as the &quot;flags&quot; parameter of the object (mol.flags and atom.flags).</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">comment</span> <span class="o">=</span> <span class="n">comment</span> <span class="ow">or</span> <span class="n">mol</span><span class="o">.</span><span class="n">comment</span>
<span class="n">comment</span> <span class="o">=</span> <span class="n">comment</span> <span class="ow">or</span> <span class="n">mol</span><span class="o">.</span><span class="n">comment</span> <span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">mol</span><span class="p">,</span> <span class="s1">&#39;comment&#39;</span><span class="p">)</span> <span class="k">else</span> <span class="s1">&#39;&#39;</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="s2">&quot;w+&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
<span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">mol</span><span class="o">.</span><span class="n">atoms</span><span class="p">)</span><span class="si">}</span><span class="se">\n</span><span class="si">{</span><span class="n">comment</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">atom</span> <span class="ow">in</span> <span class="n">mol</span><span class="o">.</span><span class="n">atoms</span><span class="p">:</span>
Expand Down
1 change: 1 addition & 0 deletions docs/_build/html/api/tcutility.html
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ <h2>Subpackages<a class="headerlink" href="#subpackages" title="Link to this hea
<li class="toctree-l4"><a class="reference internal" href="tcutility.job.html#tcutility.job.ams.AMSJob.vibrations"><code class="docutils literal notranslate"><span class="pre">AMSJob.vibrations()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="tcutility.job.html#tcutility.job.ams.AMSJob.geometry_convergence"><code class="docutils literal notranslate"><span class="pre">AMSJob.geometry_convergence()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="tcutility.job.html#tcutility.job.ams.AMSJob.charge"><code class="docutils literal notranslate"><span class="pre">AMSJob.charge()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="tcutility.job.html#tcutility.job.ams.AMSJob.electric_field"><code class="docutils literal notranslate"><span class="pre">AMSJob.electric_field()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="tcutility.job.html#tcutility.job.ams.AMSJob.output_mol_path"><code class="docutils literal notranslate"><span class="pre">AMSJob.output_mol_path</span></code></a></li>
</ul>
</li>
Expand Down
15 changes: 15 additions & 0 deletions docs/_build/html/api/tcutility.job.html
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,20 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<dd><p>Set the charge of the system.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="tcutility.job.ams.AMSJob.electric_field">
<span class="sig-name descname"><span class="pre">electric_field</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">direction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">magnitude</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/tcutility/job/ams.html#AMSJob.electric_field"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tcutility.job.ams.AMSJob.electric_field" title="Link to this definition">#</a></dt>
<dd><p>Set an electric field for this system.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>direction</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]</span>) – the vector with the direction and strength of the electric field.</p></li>
<li><p><strong>magnitude</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></span>) – if given, the direction will be normalized and magnitude will be used as the field strength.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="tcutility.job.ams.AMSJob.output_mol_path">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">output_mol_path</span></span><a class="headerlink" href="#tcutility.job.ams.AMSJob.output_mol_path" title="Link to this definition">#</a></dt>
Expand Down Expand Up @@ -1230,6 +1244,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#tcutility.job.ams.AMSJob.vibrations"><code class="docutils literal notranslate"><span class="pre">AMSJob.vibrations()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#tcutility.job.ams.AMSJob.geometry_convergence"><code class="docutils literal notranslate"><span class="pre">AMSJob.geometry_convergence()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#tcutility.job.ams.AMSJob.charge"><code class="docutils literal notranslate"><span class="pre">AMSJob.charge()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#tcutility.job.ams.AMSJob.electric_field"><code class="docutils literal notranslate"><span class="pre">AMSJob.electric_field()</span></code></a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#tcutility.job.ams.AMSJob.output_mol_path"><code class="docutils literal notranslate"><span class="pre">AMSJob.output_mol_path</span></code></a></li>
</ul>
</li>
Expand Down
6 changes: 4 additions & 2 deletions docs/_build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -390,16 +390,18 @@ <h2 id="D">D</h2>
<h2 id="E">E</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="api/tcutility.job.html#tcutility.job.ams.AMSJob.electric_field">electric_field() (AMSJob method)</a>
</li>
<li><a href="api/tcutility.data.html#tcutility.data.atom.element">element() (in module tcutility.data.atom)</a>
</li>
<li><a href="api/tcutility.html#tcutility.log.Emojis">Emojis (class in tcutility.log)</a>
</li>
<li><a href="api/tcutility.html#tcutility.log.Emojis.empty">empty (Emojis attribute)</a>
</li>
<li><a href="api/tcutility.job.html#tcutility.job.crest.QCGJob.ensemble_directory">ensemble_directory (QCGJob property)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="api/tcutility.job.html#tcutility.job.crest.QCGJob.ensemble_directory">ensemble_directory (QCGJob property)</a>
</li>
<li><a href="api/tcutility.job.html#tcutility.job.crest.QCGJob.ensemble_mode">ensemble_mode() (QCGJob method)</a>
</li>
<li><a href="api/tcutility.html#tcutility.ensure_2d">ensure_2d() (in module tcutility)</a>
Expand Down
Binary file modified docs/_build/html/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 0f126c6

Please sign in to comment.