Skip to content

Commit

Permalink
First version of short QE tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
mbercx committed Mar 18, 2021
1 parent 7eb50bf commit c56aff0
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .rstcheck.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[rstcheck]
ignore_directives=panels,dropdown
ignore_directives=panels,dropdown,tabs
ignore_roles=doi,nb-download
ignore_messages=(.*is not referenced.)
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'IPython.sphinxext.ipython_console_highlighting',
'IPython.sphinxext.ipython_directive', 'sphinx.ext.extlinks',
'sphinx.ext.mathjax', 'sphinx_copybutton', 'sphinx_panels',
'jupyter_sphinx', 'myst_nb'
'jupyter_sphinx', 'myst_nb', 'sphinx_tabs.tabs'
]
ipython_mplbackend = ""

Expand Down
42 changes: 30 additions & 12 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
AiiDA ABC tutorial
==================
AiiDA Quantum ESPRESSO tutorial
===============================

.. _ABC_2021_Homepage:
.. todo::

Update Quantum Mobile version + links

.. _Homepage:

+-----------------+-----------------------------------------------------------------------------------------------------------+
| Related resources |
+=================+===========================================================================================================+
| Quantum Mobile | ADD QUANTUM MOBILE VERSION WHEN RELEASED |
+-----------------+-----------------------------------------------------------------------------------------------------------+
| AiiDAlab | `AiiDAlab docker stack 21.02.1`_, `AiiDAlab k8s deployment`_ |
+-----------------+-----------------------------------------------------------------------------------------------------------+
| python packages | `aiida-core 1.5.2`_, `aiida-quantumespresso 3.3.0`_ |
Expand All @@ -19,23 +25,31 @@ AiiDA ABC tutorial
.. _aiida-quantumespresso 3.3.0: https://pypi.org/project/aiida-quantumespresso/3.3.0/
.. _Quantum ESPRESSO 6.0.0: https://github.com/QEF/q-e/releases/tag/qe-6.0.0

This is the content of the virtual AiiDA tutorial organised for the University of ABC on the 10th of February 2021.
This tutorial is a short introduction to some of the features of AiiDA based on Quantum ESPRESSO.

Setup
-----

The tutorial will be run on the |AiiDAlab tutorials cluster|, just click the link and log in with a username and a password of your choosing.
The tutorial can either be run in the Quantum Mobile virtual machine, or on the AiiDAlab demo cluster.

.. tabs::

.. tab:: Quantum Mobile

.. important::
Quantum Mobile is a virtual machine that provides a ready-to-run environment for computational materials science.

Note down your password so that you can login again in case you get inadvertently logged out.
In case you forgot your password, the admin can make a new account, **but you will lose your progress!**
.. todo::

It will take a few minutes for your server to start up on first login, after that you are all set and ready to start with the tutorial!
Add more instructions once image is released.

.. |AiiDAlab tutorials cluster| raw:: html
.. tab:: AiiDAlab cluster

<a href="https://aiidalab-abc-tutorial-2021.materialscloud.org" target="_blank">AiiDAlab tutorials cluster</a>
The |AiiDAlab demo cluster| is a Jupyter-based web platform installed on a cluster that can run some basic calculations for demonstration and tutorial purposes.
Simply click the link and log in with the EGI check-in.

.. |AiiDAlab demo cluster| raw:: html

<a href="https://aiidalab-demo.materialscloud.org" target="_blank">AiiDAlab demo cluster</a>

Hands-on materials
------------------
Expand Down Expand Up @@ -68,7 +82,11 @@ If you want to learn more, you can check the `2020 AiiDA virtual tutorial <https
Acknowledgements
----------------

This event was made possible by support from the MaX European Centre of Excellence, the MARVEL National Centre of Competence in Research and the H2020 INTERSECT project.
.. todo::

Update Acknowledgements

This tutorial was made possible by support from the MaX European Centre of Excellence, the MARVEL National Centre of Competence in Research and the H2020 INTERSECT project.

.. image:: source/sponsors/max.png
:target: http://www.max-centre.eu/
Expand Down
66 changes: 53 additions & 13 deletions docs/source/sections/qe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ 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 easily using ``wget``:
You can download the file easily using ``wget``:

.. code-block:: console
Expand Down Expand Up @@ -81,24 +81,64 @@ Running a calculation
---------------------

We'll start with running a simple self-consistent field calculation (SCF) with `Quantum ESPRESSO`_ for the structure we just imported.
First, we'll have to set up the `Quantum ESPRESSO`_ code in our database.
This can be done with the following ``verdi`` CLI command:
First, we'll need to make sure we have set up the `Quantum ESPRESSO`_ code in our database.
This will depend on whether you are running the tutorial in the Quantum Mobile or the AiiDAlab cluster:

.. code-block:: console
.. tabs::

$ verdi code setup --label pw --computer localhost --remote-abs-path /usr/bin/pw.x --input-plugin quantumespresso.pw --non-interactive
Success: Code<2> pw@localhost created
.. tab:: Quantum Mobile

Let's now look at the codes in our database with the ``verdi shell``:
Let's have a look at the codes in our database with the ``verdi shell``:

.. code-block:: console
.. code-block:: console
$ verdi code list
# List of configured codes:
# (use 'verdi code show CODEID' to see the details)
* pk 1 - qe-3.4.0-pw@localhost
* pk 2 - qe-3.4.0-cp@localhost
* pk 3 - qe-3.4.0-pp@localhost
* pk 4 - qe-3.4.0-ph@localhost
* pk 5 - qe-3.4.0-neb@localhost
* pk 6 - qe-3.4.0-projwfc@localhost
* pk 7 - qe-3.4.0-pw2wannier90@localhost
* pk 8 - qe-3.4.0-q2r@localhost
* pk 9 - qe-3.4.0-dos@localhost
* pk 10 - qe-3.4.0-matdyn@localhost
As you can see, this Quantum Mobile virtual machine already comes with all of the Quantum ESPRESSO codes set up in the AiiDA database.
The code we will be running is the ``pw.x`` code, set up under the label ``qe-3.4.0-pw`` on the ``localhost`` computer.
Make a note of the PK or label of the code, since you'll need to replace it in code snippets later in this tutorial.

.. tab:: AiiDAlab cluster

Let's have a look at the codes in our database with the ``verdi shell``:

.. code-block:: console
$ verdi code list
# List of configured codes:
# (use 'verdi code show CODEID' to see the details)
# No codes found matching the specified criteria.
We can see that no code has been installed yet.
To install the Quantum ESPRESSO ``pw.x`` code, we can use the following ``verdi`` CLI command:

.. code-block:: console
$ verdi code setup --label pw --computer localhost --remote-abs-path /usr/bin/pw.x --input-plugin quantumespresso.pw --non-interactive
Success: Code<2> pw@localhost created
You now should see the code we have just set up when you execute ``verdi code list``:

.. code-block:: console
$ verdi code list
# List of configured codes:
# (use 'verdi code show CODEID' to see the details)
* pk 2 - pw@localhost
$ verdi code list
# List of configured codes:
# (use 'verdi code show CODEID' to see the details)
* pk 2 - pw@localhost
We can see the code you just set up, with label ``pw``, set up on the ``localhost`` computer.
Make a note of the PK or label of the code, since you'll need to replace it in code snippets later in this tutorial.

To run the SCF calculation, we'll also need to provide the family of pseudopotentials.
These can be installed easily using the ``aiida-pseudo`` package:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ sphinx~=2.4.3
sphinx-rtd-theme~=0.5
sphinx-copybutton~=0.2.12
sphinx-panels~=0.4.1
sphinx-tabs~=2.1.0
jupyter-sphinx~=0.3.2
myst-nb~=0.10.1
jupytext~=1.7.1
Expand Down

0 comments on commit c56aff0

Please sign in to comment.