Skip to content

Commit 211d4fe

Browse files
committed
Deploying to gh-pages from @ 71b2c30 🚀
1 parent 6349e96 commit 211d4fe

File tree

3 files changed

+579
-2
lines changed

3 files changed

+579
-2
lines changed

_sources/example_workflows/quantum_espresso/jobflow.ipynb

Lines changed: 565 additions & 1 deletion
Large diffs are not rendered by default.

example_workflows/quantum_espresso/jobflow.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ <h2> Contents </h2>
374374
<nav aria-label="Page">
375375
<ul class="visible nav section-nav flex-column">
376376
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#define-workflow-with-jobflow">Define workflow with jobflow</a></li>
377+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#quantum-espresso-workflow">Quantum Espresso Workflow</a></li>
377378
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#load-workflow-with-aiida">Load Workflow with aiida</a></li>
378379
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#load-workflow-with-pyiron-base">Load Workflow with pyiron_base</a></li>
379380
</ul>
@@ -389,8 +390,10 @@ <h2> Contents </h2>
389390

390391
<section class="tex2jax_ignore mathjax_ignore" id="jobflow">
391392
<h1>jobflow<a class="headerlink" href="#jobflow" title="Link to this heading">#</a></h1>
393+
<p><a class="reference external" href="https://materialsproject.github.io/jobflow/index.html"><code class="docutils literal notranslate"><span class="pre">jobflow</span></code></a> and <a class="reference external" href="https://materialsproject.github.io/atomate2/index.html"><code class="docutils literal notranslate"><span class="pre">atomate2</span></code></a> are key packages of the <a class="reference external" href="https://materialsproject.org/">Materials Project</a> . <code class="docutils literal notranslate"><span class="pre">jobflow</span></code> was especially designed to simplify the execution of dynamic workflows – when the actual number of jobs is dynamically determined upon runtime instead of being statically fixed before running the workflow(s). <code class="docutils literal notranslate"><span class="pre">jobflow</span></code>’s overall flexibility allows for building workflows that go beyond the usage in materials science. <code class="docutils literal notranslate"><span class="pre">jobflow</span></code> serves as the basis of <code class="docutils literal notranslate"><span class="pre">atomate2</span></code>, which implements data generation workflows in the context of materials science and will be used for data generation in the Materials Project in the future.</p>
392394
<section id="define-workflow-with-jobflow">
393395
<h2>Define workflow with jobflow<a class="headerlink" href="#define-workflow-with-jobflow" title="Link to this heading">#</a></h2>
396+
<p>We start by importing the job decorator and Flow class from <code class="docutils literal notranslate"><span class="pre">jobflow</span></code> and the respective PWD tools.</p>
394397
<div class="cell docutils container">
395398
<div class="cell_input docutils container">
396399
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">numpy</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">np</span>
@@ -420,6 +423,10 @@ <h2>Define workflow with jobflow<a class="headerlink" href="#define-workflow-wit
420423
</div>
421424
</div>
422425
</div>
426+
</section>
427+
<section id="quantum-espresso-workflow">
428+
<h2>Quantum Espresso Workflow<a class="headerlink" href="#quantum-espresso-workflow" title="Link to this heading">#</a></h2>
429+
<p>We will use the knowledge from the previous arithmetic workflow example to create the Quantum Espresso-related tasks for calculating an “Energy vs. Volume” curve. It’s important to note that this is only a basic implementation, and further extensions towards data validation or for a simplified user experience can be added. For example, one can typically configure run commands for quantum-chemical programs via configuration files in atomate2.</p>
423430
<div class="cell docutils container">
424431
<div class="cell_input docutils container">
425432
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">workflow</span><span class="w"> </span><span class="kn">import</span> <span class="p">(</span>
@@ -449,6 +456,7 @@ <h2>Define workflow with jobflow<a class="headerlink" href="#define-workflow-wit
449456
</div>
450457
</div>
451458
</div>
459+
<p>We need to specify the typical QE input like pseudopotential(s) and structure model.</p>
452460
<div class="cell docutils container">
453461
<div class="cell_input docutils container">
454462
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">pseudopotentials</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;Al&quot;</span><span class="p">:</span> <span class="s2">&quot;Al.pbe-n-kjpaw_psl.1.0.0.UPF&quot;</span><span class="p">}</span>
@@ -483,6 +491,7 @@ <h2>Define workflow with jobflow<a class="headerlink" href="#define-workflow-wit
483491
</div>
484492
</div>
485493
</div>
494+
<p>Next, for the “Energy vs. Volume” curve, we meed to specify the number of strained structures and save them into a list object. For each of the strained structures, we will carry out a QE calculation.</p>
486495
<div class="cell docutils container">
487496
<div class="cell_input docutils container">
488497
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">number_of_strains</span> <span class="o">=</span> <span class="mi">5</span>
@@ -513,6 +522,7 @@ <h2>Define workflow with jobflow<a class="headerlink" href="#define-workflow-wit
513522
</div>
514523
</div>
515524
</div>
525+
<p>Finally, we specify a plotter for the “Energy vs. Volume” curve and can export the workflow.</p>
516526
<div class="cell docutils container">
517527
<div class="cell_input docutils container">
518528
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">plot</span> <span class="o">=</span> <span class="n">plot_energy_volume_curve</span><span class="p">(</span>
@@ -552,6 +562,7 @@ <h2>Define workflow with jobflow<a class="headerlink" href="#define-workflow-wit
552562
</section>
553563
<section id="load-workflow-with-aiida">
554564
<h2>Load Workflow with aiida<a class="headerlink" href="#load-workflow-with-aiida" title="Link to this heading">#</a></h2>
565+
<p>Now, we can import the workflow, run it with <code class="docutils literal notranslate"><span class="pre">aiida</span></code> and plot the “Energy vs. Volume” curve.</p>
555566
<div class="cell docutils container">
556567
<div class="cell_input docutils container">
557568
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">aiida</span><span class="w"> </span><span class="kn">import</span> <span class="n">orm</span><span class="p">,</span> <span class="n">load_profile</span>
@@ -665,6 +676,7 @@ <h2>Load Workflow with aiida<a class="headerlink" href="#load-workflow-with-aiid
665676
</section>
666677
<section id="load-workflow-with-pyiron-base">
667678
<h2>Load Workflow with pyiron_base<a class="headerlink" href="#load-workflow-with-pyiron-base" title="Link to this heading">#</a></h2>
679+
<p>And we can repeat the same process using <code class="docutils literal notranslate"><span class="pre">pyiron</span></code>.</p>
668680
<div class="cell docutils container">
669681
<div class="cell_input docutils container">
670682
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">python_workflow_definition.pyiron_base</span><span class="w"> </span><span class="kn">import</span> <span class="n">load_workflow_json</span>
@@ -823,6 +835,7 @@ <h2>Load Workflow with pyiron_base<a class="headerlink" href="#load-workflow-wit
823835
<nav class="bd-toc-nav page-toc">
824836
<ul class="visible nav section-nav flex-column">
825837
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#define-workflow-with-jobflow">Define workflow with jobflow</a></li>
838+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#quantum-espresso-workflow">Quantum Espresso Workflow</a></li>
826839
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#load-workflow-with-aiida">Load Workflow with aiida</a></li>
827840
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#load-workflow-with-pyiron-base">Load Workflow with pyiron_base</a></li>
828841
</ul>

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)