Quantum ESPRESSO

Software name: 
Quantum ESPRESSO
Policy 

Quantum ESPRESSO is available to users at HPC2N. It is open source and free, licenced under GPL (GNU public license). However, the developers would be grateful if any scientific work contains a reference to the QE manifesto.

General 

Quantum ESPRESSO (Quantum opEn Source Package for Research in Electronic Structure, Simulation, and Optimization) is an integrated suite of computer codes for electronic-structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials (both norm-conserving and ultrasoft). 

Description 

QuantumESPRESSO can do

  • Ground-state calculations
    • Self-consistent total energies, forces, stresses;
    • Electronic minimization with iterative diagonalization techniques, damped-dynamics, conjugate-gradients;
    • Kohn-Sham orbitals;
    • Gamma-point and k-point sampling, and a variety of broadening schemes (Fermi-Dirac, Gaussian, Methfessel-Paxton, and Marzari-Vanderbilt);
    • Separable norm-conserving and ultrasoft (Vanderbilt) pseudo-potentials, PAW (Projector Augmented Waves);
    • Several exchange-correlation functionals: from LDA to generalized-gradient corrections (PW91, PBE, B88-P86, BLYP) to meta-GGA, exact exchange (HF) and hybrid functionals (PBE0, B3LYP, HSE);
    • Hubbard U (LDA+U);
    • Berry's phase polarization;
    • Spin-orbit coupling and noncollinear magnetism;
    • Maximally-localized Wannier functions using WANNIER90 code.
  • Structural Optimization
    • GDIIS with quasi-Newton BFGS preconditioning;
    • Damped dynamics;
    • Ionic conjugate-gradients minimization;
    • Projected velocity Verlet;
    • Transition states and minimum energy paths:
      • Born-Oppenheimer nudged elastic band;
      • Born-Oppenheimer string dynamics;
  • Ab-initio molecular dynamics
    • Car-Parrinello Molecular Dynamics;
      • Microcanonical (Verlet) dynamics;
      • Isothermal (canonical) dynamics - Nosé-Hoover thermostats and chains;
      • Isoenthalpic, variable cell dynamics (Parrinello-Rahman);
      • Constrained dynamics;
    • Born-Oppenheimer Molecular Dynamics;
      • Microcanonical (Verlet) dynamics;
      • Isothermal (canonical) dynamics - Anderson, Berendsen thermostats;
      • Isoenthalpic, variable cell dynamics (Parrinello-Rahman);
      • Constrained dynamics;
      • Ensemble-DFT dynamics (for metals/fractional occupations);
  • Response properties (density-functional perturbation theory)
    • Phonon frequencies and eigenvectors at any wavevector;
    • Full phonon dispersions; inter-atomic force constants in real space;
    • Translational and rotational acoustic sum rules;
    • Effective charges and dielectric tensors;
    • Electron-phonon interactions;
    • Third-order anharmonic phonon lifetimes;
    • Infrared and (non-resonant) Raman cross-sections;
    • EPR and NMR chemical shifts using the GIPAW method;
  • Spectroscopic properties
    • K- and L1-edge X-ray Absorption Spectra (XAS)
    • Electronic excitations with Many-Body Perturbation Theory using YAMBO code.
  • Quantum Transport
    • Ballistic Transport using PWCOND module.
    • Coherent Transport from Maximally Localized Wannier Functions using WanT code.

It runs on most platforms and fully exploits math libraries like MKL, ESSL, etc. Go here for more information.

Availability 

On HPC2N we have Quantum ESPRESSO available as a module on Kebnekaise.

Usage at HPC2N 

To use the Quantum ESPRESSO module, first add it to your environment. Use:

module spider quantumespresso

to see which versions are available and how to load the module and the needed prerequisites.

Example, loading QuantumESPRESSO version 6.1 (note that both "icc" and "ifort" are needed, due to dependencies - despite what "module spider" says)

ml icc/2017.1.132-GCC-6.3.0-2.27 ifort/2017.1.132-GCC-6.3.0-2.27
ml OpenMPI/2.0.2
ml QuantumESPRESSO/6.1 

You can read more about loading modules on our Accessing software with Lmod page and our Using modules (Lmod) page.

This sets the path and the needed environment variables.

Performance improvments

pw.x (PWscf) does a lot of I/O to files on disk. This causes problem on most parallel file systems, ours is no exception. To improve on this situation one can add the following to the
"control" section in the input file:

wfcdir='/scratch'
wf_collect=.true.
The effect of doing this is that pw.x writes the wavefunction and other per process files on the node local /scratch filesystem, and then collects the wavefunctions into the specified "outdir". See the Espresso-QM documentation for details.

Example submit file

This is a simple example of an submit file for running pw.x.
Recommended reading for parameters to pw.x and other parts of Espresso-QM are available in the Espresso-QM User Guide.
It is important to read the User Guide to find out how many tasks should be used for a specific problem. Using too many tasks will often result in low performance.

#!/bin/bash
#SBATCH -A <your-project-number>
#SBATCH -J <your-job-name>
#SBATCH -n <number-of-tasks>
#SBATCH -t <walltime-needed>

# Purging any loaded modules and loading the Quantum Espresso 6.1 module and its prerequisites 
ml icc/2017.1.132-GCC-6.3.0-2.27 
ml ifort/2017.1.132-GCC-6.3.0-2.27
ml OpenMPI/2.0.2 
ml QuantumESPRESSO/6.1 

export OMP_NUM_THREADS=1
if [ -n "$SLURM_CPUS_PER_TASK" ]; then
    OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
fi

srun --cpu_bind=cores pw.x -inp test.in

Note: the 4 lines that sets OMP_NUM_THREAD are highly recommended for optimum performance and should always be used.

Additional info 

Documentation is available on the ESPRESSO homepage. There are a User Guide and a page with tutorials and examples.

Updated: 2024-10-10, 12:39