QuantumESPRESSO

Quantum ESPRESSO 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).

Policy

QuantumESPRESSO is available to users at HPC2N, under GPL (GNU public license).

The developers would be grateful if any scientific work contains a reference to the QE manifesto.

Citations

The developers would be grateful if any scientific work contains a reference to the QE manifesto.

Overview

Quantum ESPRESSO runs on many different architectures, ranging from the most powerful parallel machines to workstations and PCs.

Quantum ESPRESSO can do

  • Ground-state calculations:
    • Self-consistent total energies, forces, stresses, Kohn-Sham orbitals;
    • Separable norm-conserving and ultrasoft (Vanderbilt) pseudo-potentials, PAW (Projector Augmented Waves);
    • Many 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);
    • VdW corrections: Grimme’s D2 and D3, Tkatchenko-Scheffler, XDM (exchange-hole dipole moment), nonlocal VdW functionals (vdw-DF);
    • Hubbard U (DFT+U, DFT+U+V);
    • Berry’s phase polarization;
    • Noncollinear magnetism, spin-orbit coupling;
  • Structural Optimization, molecular dynamics, potential energy surfaces:
    • GDIIS with quasi-Newton BFGS preconditioning;
    • Damped dynamics;
    • Car-Parrinello Molecular Dynamics (CP package);
    • Born-Oppenheimer Molecular Dynamics (PWscf package):
    • Nudged Elastic Band (NEB) method;
  • Electrochemistry and special boundary conditions:
    • Effective Screening Medium (ESM) method;
    • ESM-RISM method;
    • Environment effects with the Environ plug-in;
  • 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 and related properties with EPW;
    • Third-order anharmonic phonon lifetimes, using the D3Q package;
    • Infrared and (non-resonant) Raman cross-sections;
    • EPR and NMR chemical shifts, using the QE-GIPAW package;
    • Phonons for 2D heterostructures (reference);
    • Magnetic excitations (TurboMagnon package);
  • Spectroscopic properties:
    • K-edge, L1 and L2,3-edge X-ray Absorption Spectra (XSpectra package);
    • Time-Dependent Density Functional Perturbation Theory (TurboTDDFT package);
    • Electron energy-loss spectroscopy (TurboEELS package);
    • Electronic excitations with Many-Body Perturbation Theory (GWL package);
    • Electronic excitations with Many-Body Perturbation Theory, using the YAMBO package;
    • Koopman’s compliant functionals (KCW package);
  • Quantum Transport:
    • Ballistic Transport ( PWCOND package);
    • Coherent Transport from Maximally Localized Wannier Functions, using the WanT code;
    • Maximally-localized Wannier functions and transport properties, using the WANNIER90 code;
    • Kubo-Greenwood electrical conductivity using the KGEC code;
  • Constrained DFPT with Two Chemical Potentials to simulate photoexcited insulators

Usage at HPC2N

On HPC2N we have QuantumESPRESSO available as a module.

Loading

To use the QuantumESPRESSO module, add it to your environment. You can find versions with

module spider QuantumESPRESSO 

and you can then find how to load a specific version (including prerequisites), with

module spider QuantumESPRESSO/<version> 

Example, loading QuantumESPRESSO/7.3

ml GCC/12.3.0 OpenMPI/4.1.5
ml QuantumESPRESSO/7.3

This sets the path and the needed environment variables.

Running

You can find the executables in the directory pointed to by $EBROOTQUANTUMESPRESSO/bin/. The main executable is pw.x.

Performance improvements

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.

Note

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 7.3 module and its prerequisites 
ml purge > 2>&1 
ml GCC/12.3.0
ml OpenMPI/4.1.5
ml QuantumESPRESSO/7.3 

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

More information can be found