Quantum Espresso with ipython interface

This project was created to provide for students at the University of Saskatchewan an interactive interface and the illustrative scripts to use Quantum Espresso code. In the initial form the development is done in Linux environment. The presented here QE_nipy scripts have limited application and we are in the process of creating additional resources for more complex calculations (project QE_nipy_advanced).

The QE_nipy (QE_nipy_advanced (described in TMS 2015 proceedings)) project on a development of the interactive interface for Quantum Espresso code (http://www.fisica.uniud.it/~giannozz/QE-Tutorial/ more) uses Atomic Simulation Environment library (ASE) implemented into ipython notebook (http://ipython.org/ - tutorials). The used basic libraries are: matplotlib, scipy, numpy that are described also in other documentation.


The most recent version of Quantum Espresso code is installed on the listed below alliancecan.ca, Calcul Quebec supercomputers and Plato computer at the University of Saskatchewan. The examples of batch jobs to run Quantum Espresso are respectively shown for each computer (no spaces in #PBS: e.g.: procs=16):


       Cedar (longer jobs), up to 28 days

       Narval (the fastest), up to 7 days

       Graham, Beluga, up to 7 days

       Plato (smaller jobs)

Quantum Espresso has modular structure and one can run each module by typing theirs execution name (e.g. for self-consistent calculations without geometry optimization and with geometry optimization). It is recommended to check tutorials and other recommendations (e.g. for this task see comments about Pulay stress) before submitting job for the first time. Quantum Espresso has recovery option command to restart the job if it crushed. The ready to use pseudopotentials are listed on QE web and additional are on THEOS web or can be generated using for example: opium.


The information about installation of ipython, in Linux environment, with the necessary libraries, used in this project, is provided in: installation instruction.

The information about installing complete application in Virtual Box on windows is described here. Ipython itself can be installed also on windows http://ipython.org/install.html.


One can gain experience with ipython by playing with this simple example:

       View first example ( download source)

o   activate the iPython notebook environment (path where your software is installed e.g. ~/nipy/bin/) by typing:
source ~/nipy/bin/activate

o   To start the notebook and upload basic libraries go to the directory where you downloaded the example and type in the command line:
ipython notebook --pylab=inline

o   The web browser will open a page with the example notebook listed. Click it.

o   Click at the top Help button and select Keyboard Shortcuts and view theirs functions

o   Try for example to execute cells in notebooks by pressing keys: Shift+Enter and so on.

Exemplary tasks performed using ipython notebooks for Quantum Espresso code installed on remote computer:

       Setup of calculations of crystal structure and electronic structure calculations on remote computer

o   View notebook (download source)

o   Exemplary configurations for Bugaboo, Jasper, Grex and Plato

       Electronic structure calculations (Band structure and density of states of electrons)

o   View notebook (download source)

       Geometry optimization for non-cubic structure

o   View notebook (download source)

       Phonons (dispersion & density of states)

o   View notebook (download source)

       Elastic constants

o   View notebook (download source)

o   In this paper (Section Elastic Properties) you can find formulas how to calculate the related mechanical properties (compliancies, bulk, share and young moduli)

       Thermal expansion

o   View notebook (download source)

       Molecular Dynamics

o   Note:

       IR, Raman

o   Note:

Comment: The restriction (in this version of ipythons) on the names of pseudo-potentials (ipythons create the same types pseudo-potentials names in the input for QE for different atoms) can be fixed by first accordingly rename pseudopotentials files and next after completion of the calculation change back the names of the files and theirs names in all files by using in the working directory the command: grep -lr -e "Atomiold" . | xargs sed -i "s/Atomiold/Atominew/g". Note the functionals name (e.g. pz) must be set the same in all names and also in the content of the pseudopotentials files.

Exemplary interactive Quantum Espresso (code installed on local computer) tasks performed using ipython notebook

       Setup of crystal structure and electronic structure calculations

o   View notebook (download source)



Additional resources:

        QE_nipy resources available on Bugaboo.westgrid.ca supercomputer on shared directory for group wg-jerzy.

        Development site for the related tutorials, software for Unix environment (not recommended to use for installation since it is not updated for the new version of QE): [QE-util] and [Elastic], created and maintained by Dr. Pawel T. Jochym.

        Related, earlier developments of QECalc by Nikolay Markovskiy and Alexander Dementsov and ase_qe_intrfce by Luca Tornatore.

        Elastic constant calculations using ipython for VASP and SIESTA: http://wolf.ifj.edu.pl/elastic

Contribution and history:

See this document for history and contributions.



Useful links and batch job examples for the latest versions of commonly used software on various computers.