Skip to content

Commit

Permalink
deploy: 5518ed6
Browse files Browse the repository at this point in the history
  • Loading branch information
JintaoWu98 committed Dec 30, 2024
1 parent 771b96d commit c9bffb1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions _modules/arc/parser.html
Original file line number Diff line number Diff line change
Expand Up @@ -802,16 +802,17 @@ <h1>Source code for arc.parser</h1><div class="highlight"><pre>

<span class="k">elif</span> <span class="s1">&#39;Summary of Optimized Potential Surface Scan&#39;</span> <span class="ow">in</span> <span class="n">line</span><span class="p">:</span>
<span class="c1"># &#39; Summary of Optimized Potential Surface Scan (add -264.0 to energies):&#39;</span>
<span class="n">base_e</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">line</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;(add &#39;</span><span class="p">)[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">()[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">base_e</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">line</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;(add &#39;</span><span class="p">)[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">()[</span><span class="mi">0</span><span class="p">])</span> <span class="k">if</span> <span class="s1">&#39;(add&#39;</span> <span class="ow">in</span> <span class="n">line</span> <span class="ow">and</span> <span class="s1">&#39;to energies):&#39;</span> <span class="ow">in</span> <span class="n">line</span> <span class="k">else</span> <span class="mf">0.0</span>
<span class="n">energies</span><span class="p">,</span> <span class="n">dihedrals_dict</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(),</span> <span class="nb">dict</span><span class="p">()</span>
<span class="n">dihedral_num</span> <span class="o">=</span> <span class="mi">0</span>
<span class="k">while</span> <span class="s1">&#39;Grad&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">line</span><span class="p">:</span>
<span class="k">while</span> <span class="s1">&#39;Grad&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">line</span> <span class="ow">and</span> <span class="s1">&#39;Largest change from initial coordinates&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">line</span><span class="p">:</span>
<span class="n">line</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">readline</span><span class="p">()</span>
<span class="n">splits</span> <span class="o">=</span> <span class="n">line</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
<span class="n">numbers</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">findall</span><span class="p">(</span><span class="sa">r</span><span class="s1">&#39;-?\d+\.\d+&#39;</span><span class="p">,</span> <span class="n">line</span><span class="p">)</span>
<span class="k">if</span> <span class="s1">&#39;Eigenvalues --&#39;</span> <span class="ow">in</span> <span class="n">line</span><span class="p">:</span>
<span class="c1"># convert Hartree energy to kJ/mol</span>
<span class="n">energies</span> <span class="o">=</span> <span class="p">[(</span><span class="n">base_e</span> <span class="o">+</span> <span class="nb">float</span><span class="p">(</span><span class="n">e</span><span class="p">))</span> <span class="o">*</span> <span class="mf">4.3597447222071e-18</span> <span class="o">*</span> <span class="mf">6.02214179e23</span> <span class="o">*</span> <span class="mf">1e-3</span>
<span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="n">splits</span><span class="p">[</span><span class="mi">2</span><span class="p">:]]</span>
<span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="n">numbers</span><span class="p">]</span>
<span class="n">min_es</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="n">energies</span><span class="p">)</span>
<span class="n">min_e</span> <span class="o">=</span> <span class="n">min_es</span> <span class="k">if</span> <span class="n">min_e</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="nb">min</span><span class="p">(</span><span class="n">min_e</span><span class="p">,</span> <span class="n">min_es</span><span class="p">)</span>
<span class="n">dihedral_num</span> <span class="o">=</span> <span class="mi">0</span>
Expand Down

0 comments on commit c9bffb1

Please sign in to comment.