Skip to content

Commit

Permalink
🔨 BIGMAP: minor fixes (#301)
Browse files Browse the repository at this point in the history
* 🔨 fix #295 and #296
* 🔨 Fix #297
* 🔨 Fix wget links to RTD version
  • Loading branch information
mbercx committed Dec 1, 2020
1 parent f422efb commit 0e3c196
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 16 deletions.
15 changes: 8 additions & 7 deletions docs/pages/2020_BIGMAP/sections/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ However, we still have to set up the ``add`` code, which we'll be using for this

.. code-block:: console
$ verdi code setup -L add --computer=localhost -P arithmetic.add --remote-abs-path=/bin/bash -n
$ verdi code setup --label add --computer localhost --input-plugin arithmetic.add --remote-abs-path /bin/bash --non-interactive
Success: Code<150> add@localhost created
This command sets up a code with *label* ``add`` on the *computer* ``localhost``, using the *plugin* ``arithmetic.add``.
Expand Down Expand Up @@ -372,7 +373,7 @@ Let's use the ``Int`` node **that was created** by our previous ``calcfunction``
In [3]: builder.x = load_node(pk=<PK>)
...: builder.y = Int(5)
In case that your nodes' PKs are different and you don't remember the PK of the output node from the previous calculation, check the provenance graph you generated earlier and use the UUID of the output node instead:
In case you don’t remember the PK of the output node from the previous calculation, check the provenance graph you generated earlier and use the UUID of the output node instead:

.. code-block:: ipython
Expand Down Expand Up @@ -410,7 +411,7 @@ Now, exit the IPython shell and once more check for *all* processes:

.. code-block:: console
$ verdi process list -a
$ verdi process list --all
PK Created Process label Process State Process status
---- --------- ---------------------------- --------------- ----------------
<! OUTPUT REMOVED !>
Expand Down Expand Up @@ -547,11 +548,11 @@ Let's start it up (again):
Starting the daemon... RUNNING
Now you can use ``verdi process list`` to follow the progress of the calculation.
Let's wait for the ``CalcJob`` to complete and then use ``verdi process list -a`` to see all processes we have run so far:
Let's wait for the ``CalcJob`` to complete and then use ``verdi process list --all`` to see all processes we have run so far:

.. code-block:: bash
$ verdi process list -a
$ verdi process list --all
PK Created Process label Process State Process status
---- --------- ---------------------------- --------------- ----------------
<! OUTPUT REMOVED !>
Expand Down Expand Up @@ -606,13 +607,13 @@ Similar to a ``CalcJob``, the ``WorkChain`` input can be set up using a builder:
...: builder.y = Int(3)
...: builder.z = Int(5)
Once the ``WorkChain`` input has been set up, we submit it to the daemon using the ``submit`` function from the AiiDA engine. Since the workflow completes very quickly, we'll immediately execute ``verdi process list -a`` from within the IPython shell so we can catch it in progress:
Once the ``WorkChain`` input has been set up, we submit it to the daemon using the ``submit`` function from the AiiDA engine. Since the workflow completes very quickly, we'll immediately execute ``verdi process list --all`` from within the IPython shell so we can catch it in progress:

.. code-block:: ipython
In [3]: from aiida.engine import submit
...: submit(builder)
...: !verdi process list -a
...: !verdi process list --all
Depending on which step the workflow is running, you should get something like the following:

Expand Down
34 changes: 25 additions & 9 deletions docs/pages/2020_BIGMAP/sections/qe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Importing a structure and inspecting it
---------------------------------------

First, download the Si structure file: :download:`Si.cif <include/Si.cif>`.
You can download the file to the AiiDAlab cluster by right clicking on the link, selecting "Copy link address", and using ``wget``:
You can download the file to the AiiDAlab cluster using ``wget``:

.. code-block:: console
$ wget <LINK>
$ wget https://aiida-tutorials.readthedocs.io/en/tutorial-2020-bigmap-lab/_downloads/a40ce5fed92027564ab551dcc3e51774/Si.cif
Next, you can import it with the ``verdi`` CLI.

Expand Down Expand Up @@ -66,8 +66,11 @@ The following short Python script sets up a self-consistent field calculation fo

.. literalinclude:: include/snippets/demo_calcjob.py

Download the :download:`demo_calcjob.py <include/snippets/demo_calcjob.py>` script to your working directory.
Once again download the file to the AiiDAlab cluster by right clicking on the link, selecting "Copy link address", and using ``wget``.
Download the :download:`demo_calcjob.py <include/snippets/demo_calcjob.py>` script to your working directory:

.. code-block:: console
$ wget https://aiida-tutorials.readthedocs.io/en/tutorial-2020-bigmap-lab/_downloads/87ca377401915ffe2b2472d953029e9c/demo_calcjob.py
**Exercise:** The ``demo_calcjob.py`` script contains a few placeholders for you to fill in:

Expand All @@ -83,7 +86,7 @@ Once again download the file to the AiiDAlab cluster by right clicking on the li

.. code-block:: console
$ verdi code setup -L pw --computer localhost --remote-abs-path /usr/bin/pw.x --input-plugin quantumespresso.pw -n
$ verdi code setup --label pw --computer localhost --remote-abs-path /usr/bin/pw.x --input-plugin quantumespresso.pw --non-interactive
Similarly, the pseudopotentials can be installed via the following set of commands:

Expand Down Expand Up @@ -219,7 +222,13 @@ As the final step, we are going to launch the ``PwBandStructure`` workflow of th

.. literalinclude:: include/snippets/demo_bands.py

Download the :download:`demo_bands.py <include/snippets/demo_bands.py>` snippet (use ``wget``, as above) and replace the ``<CODE LABEL>`` and structure ``<PK>``.
Download the :download:`demo_bands.py <include/snippets/demo_bands.py>` snippet:

.. code-block:: console
$ wget https://aiida-tutorials.readthedocs.io/en/tutorial-2020-bigmap-lab/_downloads/ed78d4494b7eac53786c1b6fe653999d/demo_bands.py
and replace the ``<CODE LABEL>`` and structure ``<PK>``.
Then run it using:

.. code-block:: console
Expand Down Expand Up @@ -363,7 +372,8 @@ For this use cases, AiiDA has a more versatile tool: the ``QueryBuilder``.
Finishing the workchain
-----------------------

Once the workchain is finished, use ``verdi process show <PK>`` to inspect the ``PwBandsWorkChain`` and find the PK of its ``band_structure`` output.
Let's stop ``ngrok`` using ``Ctrl+C`` and close its terminal, as well as stop the REST API (also using ``Ctrl+C``).
The workchain we started earlier should be finished by now, let's use ``verdi process show <PK>`` to inspect the ``PwBandsWorkChain`` and find the PK of its ``band_structure`` output.
Use this to produce a PDF of the band structure:

.. code-block:: console
Expand Down Expand Up @@ -407,7 +417,7 @@ Let's have a look at the groups we've imported from the archive above, using the

.. code-block:: console
$ verdi group list -C
$ verdi group list --count
Info: to show groups of all types, use the `-a/--all` option.
PK Label Type string User Node count
---- --------------- ------------- --------------- ------------
Expand Down Expand Up @@ -520,7 +530,13 @@ You can find it in the dropdown panel below:

.. literalinclude:: include/snippets/demo_query.py

Download it and use ``verdi run`` to execute it:
Download it using ``wget``:

.. code-block:: console
$ wget https://aiida-tutorials.readthedocs.io/en/tutorial-2020-bigmap-lab/_downloads/6773ba4cad0c046e468d13e15186cdd8/demo_query.py
and use ``verdi run`` to execute it:

.. code-block:: console
Expand Down

0 comments on commit 0e3c196

Please sign in to comment.