Skip to content

Commit

Permalink
Merge pull request #137 from TheoChem-VU/main
Browse files Browse the repository at this point in the history
Parity with main
  • Loading branch information
YHordijk authored Feb 13, 2024
2 parents 0336615 + eb18644 commit 55ee86a
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 44 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.
28 changes: 10 additions & 18 deletions docs/_build/html/_modules/tcutility/job/ams.html
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ <h1>Source code for tcutility.job.ams</h1><div class="highlight"><pre>
<span class="k">def</span> <span class="fm">__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="o">.</span><span class="fm">__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="bp">self</span><span class="o">.</span><span class="n">single_point</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">geometry_convergence</span><span class="p">(</span><span class="s1">&#39;Good&#39;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">geometry_convergence</span><span class="p">()</span>

<span class="k">def</span> <span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="sa">f</span><span class="s1">&#39;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_task</span><span class="si">}</span><span class="s1">(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_functional</span><span class="si">}</span><span class="s1">/</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_basis_set</span><span class="si">}</span><span class="s1">), running in </span><span class="si">{</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">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="bp">self</span><span class="o">.</span><span class="n">rundir</span><span class="p">),</span><span class="w"> </span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">)</span><span class="si">}</span><span class="s1">&#39;</span>
Expand Down Expand Up @@ -380,28 +380,20 @@ <h1>Source code for tcutility.job.ams</h1><div class="highlight"><pre>

<div class="viewcode-block" id="AMSJob.geometry_convergence">
<a class="viewcode-back" href="../../../api/tcutility.job.html#tcutility.job.ams.AMSJob.geometry_convergence">[docs]</a>
<span class="k">def</span> <span class="nf">geometry_convergence</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">quality</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">gradients</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">1e-5</span><span class="p">,</span> <span class="n">energy</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">1e-5</span><span class="p">,</span> <span class="n">step</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">1e-2</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">geometry_convergence</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">gradients</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">1e-5</span><span class="p">,</span> <span class="n">energy</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">1e-5</span><span class="p">,</span> <span class="n">step</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">1e-2</span><span class="p">,</span> <span class="n">stress</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">5e-4</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Set the convergence criteria for the geometry optimization.</span>

<span class="sd"> Args:</span>
<span class="sd"> quality: convergence criteria preset. Must be one of [``VeryBasic``, ``Basic``, ``Normal``, ``Good``, ``VeryGood``]. </span>
<span class="sd"> Default ``None`` will not use a threshold. If it is given, it will overwrite the other arguments. </span>
<span class="sd"> gradients: the convergence criteria for the gradients during geometry optimizations. Defaults to 1e-5.</span>
<span class="sd"> energy: the convergence criteria for the energy during geometry optimizations. Defaults to 1e-5.</span>
<span class="sd"> step: the convergence criteria for the step-size during geometry optimizations. Defaults to 1e-2.</span>
<span class="sd"> gradients: the convergence criteria for the gradients during geometry optimizations. Defaults to ``1e-5``.</span>
<span class="sd"> energy: the convergence criteria for the energy during geometry optimizations. Defaults to ``1e-5``.</span>
<span class="sd"> step: the convergence criteria for the step-size during geometry optimizations. Defaults to ``1e-2``.</span>
<span class="sd"> stress: the convergence criteria for the stress-energy per atom during geometry optimizations. Defaults to ``5e-4``</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">if</span> <span class="n">quality</span><span class="p">:</span>
<span class="n">allowed_qualities</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;verybasic&#39;</span><span class="p">,</span> <span class="s1">&#39;basic&#39;</span><span class="p">,</span> <span class="s1">&#39;normal&#39;</span><span class="p">,</span> <span class="s1">&#39;good&#39;</span><span class="p">,</span> <span class="s1">&#39;verygood&#39;</span><span class="p">]</span>
<span class="k">if</span> <span class="n">quality</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="n">q</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="k">for</span> <span class="n">q</span> <span class="ow">in</span> <span class="n">allowed_qualities</span><span class="p">]:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Argument &quot;quality&quot; must be one of </span><span class="si">{</span><span class="n">allowed_qualities</span><span class="si">}</span><span class="s1">, not </span><span class="si">{</span><span class="n">quality</span><span class="si">}</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="k">raise</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">GeometryOptimization</span><span class="o">.</span><span class="n">Convergence</span><span class="o">.</span><span class="n">Quality</span> <span class="o">=</span> <span class="n">quality</span>
<span class="k">else</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">GeometryOptimization</span><span class="o">.</span><span class="n">Convergence</span><span class="o">.</span><span class="n">Quality</span> <span class="o">=</span> <span class="s1">&#39;Custom&#39;</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">GeometryOptimization</span><span class="o">.</span><span class="n">Convergence</span><span class="o">.</span><span class="n">Gradients</span> <span class="o">=</span> <span class="n">gradients</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">GeometryOptimization</span><span class="o">.</span><span class="n">Convergence</span><span class="o">.</span><span class="n">Energy</span> <span class="o">=</span> <span class="n">energy</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">GeometryOptimization</span><span class="o">.</span><span class="n">Convergence</span><span class="o">.</span><span class="n">Step</span> <span class="o">=</span> <span class="n">step</span></div>
<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">GeometryOptimization</span><span class="o">.</span><span class="n">Convergence</span><span class="o">.</span><span class="n">Gradients</span> <span class="o">=</span> <span class="n">gradients</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">GeometryOptimization</span><span class="o">.</span><span class="n">Convergence</span><span class="o">.</span><span class="n">Energy</span> <span class="o">=</span> <span class="n">energy</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">GeometryOptimization</span><span class="o">.</span><span class="n">Convergence</span><span class="o">.</span><span class="n">Step</span> <span class="o">=</span> <span class="n">step</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">GeometryOptimization</span><span class="o">.</span><span class="n">Convergence</span><span class="o">.</span><span class="n">StressEnergyPerAtom</span> <span class="o">=</span> <span class="n">stress</span></div>


<div class="viewcode-block" id="AMSJob.charge">
Expand Down
11 changes: 5 additions & 6 deletions docs/_build/html/api/tcutility.job.html
Original file line number Diff line number Diff line change
Expand Up @@ -605,16 +605,15 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi

<dl class="py method">
<dt class="sig sig-object py" id="tcutility.job.ams.AMSJob.geometry_convergence">
<span class="sig-name descname"><span class="pre">geometry_convergence</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">quality</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">gradients</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1e-05</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">energy</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1e-05</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">step</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.01</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/tcutility/job/ams.html#AMSJob.geometry_convergence"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tcutility.job.ams.AMSJob.geometry_convergence" title="Link to this definition">#</a></dt>
<span class="sig-name descname"><span class="pre">geometry_convergence</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">gradients</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1e-05</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">energy</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1e-05</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">step</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.01</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stress</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.0005</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/tcutility/job/ams.html#AMSJob.geometry_convergence"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tcutility.job.ams.AMSJob.geometry_convergence" title="Link to this definition">#</a></dt>
<dd><p>Set the convergence criteria for the geometry optimization.</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>quality</strong> – convergence criteria preset. Must be one of [<code class="docutils literal notranslate"><span class="pre">VeryBasic</span></code>, <code class="docutils literal notranslate"><span class="pre">Basic</span></code>, <code class="docutils literal notranslate"><span class="pre">Normal</span></code>, <code class="docutils literal notranslate"><span class="pre">Good</span></code>, <code class="docutils literal notranslate"><span class="pre">VeryGood</span></code>].
Default <code class="docutils literal notranslate"><span class="pre">None</span></code> will not use a threshold. If it is given, it will overwrite the other arguments.</p></li>
<li><p><strong>gradients</strong> – the convergence criteria for the gradients during geometry optimizations. Defaults to 1e-5.</p></li>
<li><p><strong>energy</strong> – the convergence criteria for the energy during geometry optimizations. Defaults to 1e-5.</p></li>
<li><p><strong>step</strong> – the convergence criteria for the step-size during geometry optimizations. Defaults to 1e-2.</p></li>
<li><p><strong>gradients</strong> – the convergence criteria for the gradients during geometry optimizations. Defaults to <code class="docutils literal notranslate"><span class="pre">1e-5</span></code>.</p></li>
<li><p><strong>energy</strong> – the convergence criteria for the energy during geometry optimizations. Defaults to <code class="docutils literal notranslate"><span class="pre">1e-5</span></code>.</p></li>
<li><p><strong>step</strong> – the convergence criteria for the step-size during geometry optimizations. Defaults to <code class="docutils literal notranslate"><span class="pre">1e-2</span></code>.</p></li>
<li><p><strong>stress</strong> – the convergence criteria for the stress-energy per atom during geometry optimizations. Defaults to <code class="docutils literal notranslate"><span class="pre">5e-4</span></code></p></li>
</ul>
</dd>
</dl>
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/searchindex.js

Large diffs are not rendered by default.

Loading

0 comments on commit 55ee86a

Please sign in to comment.