Skip to content

Commit

Permalink
deploy: 26b200b
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Nov 19, 2023
1 parent f4cedf1 commit ce8b717
Show file tree
Hide file tree
Showing 7 changed files with 172 additions and 54 deletions.
165 changes: 118 additions & 47 deletions _modules/arc/job/trsh.html

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion _modules/arc/scheduler.html
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,8 @@ <h1>Source code for arc.scheduler</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">successful_server_termination</span> \
<span class="ow">and</span> <span class="p">(</span><span class="n">job</span><span class="o">.</span><span class="n">directed_scan_type</span> <span class="ow">is</span> <span class="kc">None</span> <span class="ow">or</span> <span class="n">job</span><span class="o">.</span><span class="n">directed_scan_type</span> <span class="o">==</span> <span class="s1">&#39;ess&#39;</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">check_scan_job</span><span class="p">(</span><span class="n">label</span><span class="o">=</span><span class="n">label</span><span class="p">,</span> <span class="n">job</span><span class="o">=</span><span class="n">job</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">successful_server_termination</span> <span class="ow">and</span> <span class="n">job</span><span class="o">.</span><span class="n">job_status</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="s1">&#39;status&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;errored&#39;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">troubleshoot_ess</span><span class="p">(</span><span class="n">label</span><span class="o">=</span><span class="n">label</span><span class="p">,</span> <span class="n">job</span><span class="o">=</span><span class="n">job</span><span class="p">,</span> <span class="n">level_of_theory</span><span class="o">=</span><span class="n">job</span><span class="o">.</span><span class="n">level</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">timer</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">break</span>
<span class="k">elif</span> <span class="s1">&#39;irc&#39;</span> <span class="ow">in</span> <span class="n">job_name</span><span class="p">:</span>
Expand Down Expand Up @@ -2048,6 +2050,10 @@ <h1>Source code for arc.scheduler</h1><div class="highlight"><pre>
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Energy for conformer </span><span class="si">{</span><span class="n">i</span><span class="si">}</span><span class="s1"> of </span><span class="si">{</span><span class="n">label</span><span class="si">}</span><span class="s1"> is None&#39;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Conformer </span><span class="si">{</span><span class="n">i</span><span class="si">}</span><span class="s1"> for </span><span class="si">{</span><span class="n">label</span><span class="si">}</span><span class="s1"> did not converge.&#39;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">job</span><span class="o">.</span><span class="n">job_status</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="s1">&#39;status&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;errored&#39;</span> <span class="ow">and</span> <span class="n">job</span><span class="o">.</span><span class="n">times_rerun</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">job</span><span class="o">.</span><span class="n">times_rerun</span> <span class="o">+=</span> <span class="mi">1</span>
<span class="bp">self</span><span class="o">.</span><span class="n">troubleshoot_ess</span><span class="p">(</span><span class="n">label</span><span class="o">=</span><span class="n">label</span><span class="p">,</span> <span class="n">job</span><span class="o">=</span><span class="n">job</span><span class="p">,</span> <span class="n">level_of_theory</span><span class="o">=</span><span class="n">job</span><span class="o">.</span><span class="n">level</span><span class="p">,</span> <span class="n">conformer</span><span class="o">=</span> <span class="n">job</span><span class="o">.</span><span class="n">conformer</span> <span class="k">if</span> <span class="n">job</span><span class="o">.</span><span class="n">conformer</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="k">else</span> <span class="kc">None</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">if</span> <span class="n">job</span><span class="o">.</span><span class="n">times_rerun</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">trsh_ess_jobs</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_run_a_job</span><span class="p">(</span><span class="n">job</span><span class="o">=</span><span class="n">job</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="n">label</span><span class="p">,</span> <span class="n">rerun</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">True</span>
Expand Down Expand Up @@ -3401,7 +3407,9 @@ <h1>Source code for arc.scheduler</h1><div class="highlight"><pre>
<span class="n">warning_message</span> <span class="o">+=</span> <span class="sa">f</span><span class="s1">&#39;The error &quot;</span><span class="si">{</span><span class="n">job</span><span class="o">.</span><span class="n">job_status</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="s2">&quot;error&quot;</span><span class="p">]</span><span class="si">}</span><span class="s1">&quot; was derived from the following line in the &#39;</span> \
<span class="sa">f</span><span class="s1">&#39;log file:</span><span class="se">\n</span><span class="s1">&quot;</span><span class="si">{</span><span class="n">job</span><span class="o">.</span><span class="n">job_status</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="s2">&quot;line&quot;</span><span class="p">]</span><span class="si">}</span><span class="s1">&quot;.&#39;</span>
<span class="n">logger</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="n">warning_message</span><span class="p">)</span>
<span class="k">if</span> <span class="n">conformer</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">species_dict</span><span class="p">[</span><span class="n">label</span><span class="p">]</span><span class="o">.</span><span class="n">is_ts</span> <span class="ow">and</span> <span class="n">conformer</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">xyz</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">species_dict</span><span class="p">[</span><span class="n">label</span><span class="p">]</span><span class="o">.</span><span class="n">ts_guesses</span><span class="p">[</span><span class="n">conformer</span><span class="p">]</span><span class="o">.</span><span class="n">get_xyz</span><span class="p">()</span>
<span class="k">elif</span> <span class="n">conformer</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">xyz</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">species_dict</span><span class="p">[</span><span class="n">label</span><span class="p">]</span><span class="o">.</span><span class="n">conformers</span><span class="p">[</span><span class="n">conformer</span><span class="p">]</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">xyz</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">species_dict</span><span class="p">[</span><span class="n">label</span><span class="p">]</span><span class="o">.</span><span class="n">final_xyz</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">species_dict</span><span class="p">[</span><span class="n">label</span><span class="p">]</span><span class="o">.</span><span class="n">initial_xyz</span>
Expand Down
5 changes: 2 additions & 3 deletions _modules/arc/species/species.html
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,8 @@ <h1>Source code for arc.species.species</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">_number_of_heavy_atoms</span> <span class="o">=</span> <span class="nb">len</span><span class="p">([</span><span class="n">symbol</span> <span class="k">for</span> <span class="n">symbol</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_xyz</span><span class="p">()[</span><span class="s1">&#39;symbols&#39;</span><span class="p">]</span> <span class="k">if</span> <span class="n">symbol</span> <span class="o">!=</span> <span class="s1">&#39;H&#39;</span><span class="p">])</span>
<span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_ts</span><span class="p">:</span>
<span class="k">for</span> <span class="n">ts_guess</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">ts_guesses</span><span class="p">:</span>
<span class="k">if</span> <span class="n">ts_guess</span><span class="o">.</span><span class="n">xyz</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_number_of_heavy_atoms</span> <span class="o">=</span> \
<span class="nb">len</span><span class="p">([</span><span class="n">line</span> <span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="n">ts_guess</span><span class="o">.</span><span class="n">xyz</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()</span> <span class="k">if</span> <span class="n">line</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="o">!=</span> <span class="s1">&#39;H&#39;</span><span class="p">])</span>
<span class="k">if</span> <span class="n">ts_guess</span><span class="o">.</span><span class="n">get_xyz</span><span class="p">()</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_number_of_heavy_atoms</span> <span class="o">=</span> <span class="nb">len</span><span class="p">([</span><span class="n">symbol</span> <span class="k">for</span> <span class="n">symbol</span> <span class="ow">in</span> <span class="n">ts_guess</span><span class="o">.</span><span class="n">get_xyz</span><span class="p">()[</span><span class="s1">&#39;symbols&#39;</span><span class="p">]</span> <span class="k">if</span> <span class="n">symbol</span> <span class="o">!=</span> <span class="s1">&#39;H&#39;</span><span class="p">])</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_number_of_heavy_atoms</span>

<span class="nd">@number_of_heavy_atoms</span><span class="o">.</span><span class="n">setter</span>
Expand Down
Loading

0 comments on commit ce8b717

Please sign in to comment.