Basharat WantPhysics · University of Kashmir
Menu

Computational Materials Physics & DFT

Getting Started with Quantum ESPRESSO

Step-by-step installation, pseudopotential setup, verification, and core electronic-structure workflows for macOS, Linux, and Windows WSL2.

Published computational datasetTaken directly from a cited peer-reviewed publication or verified materials record.

1. Installation by Operating System

macOS (Apple Silicon & Intel)

Install via Homebrew (recommended for quick academic setup) or build from source with OpenMPI and FFTW3:

brew install quantum-espresso open-mpi
which pw.x
pw.x --version

Linux (Ubuntu / Debian / Fedora)

Distribution packages provide serial and MPI-enabled binaries; for cluster workloads, compile from the official release tarball or use Spack:

# Ubuntu / Debian
sudo apt update && sudo apt install -y quantum-espresso openmpi-bin

# Fedora
sudo dnf install -y quantum-espresso quantum-espresso-openmpi

Windows 10 / 11 (WSL2)

Run Quantum ESPRESSO inside Windows Subsystem for Linux (Ubuntu 22.04/24.04 LTS):

# In PowerShell (Administrator)
wsl --install -d Ubuntu

# Inside the Ubuntu WSL2 terminal
sudo apt update && sudo apt install -y quantum-espresso openmpi-bin
which pw.x

2. Pseudopotentials & Directory Layout

Download the verified Standard Solid State Pseudopotentials (SSSP) v1.3.0 (Efficiency or Precision) archive from Materials Cloud and place the .UPF files in a dedicated ./pseudo/ directory. Always match ecutwfc and ecutrho to the SSSP JSON recommendations for the hardest element in your cell.

mkdir -p ~/dft-runs/batio3/pseudo ~/dft-runs/batio3/tmp
cd ~/dft-runs/batio3

3. Running Your First SCF Calculation

Generate a verified pw.in file using the Quantum ESPRESSO Input Generator, place it in your run directory, and execute:

# Serial run
pw.x < pw.in > pw.out

# MPI parallel run (4 ranks)
mpirun -np 4 pw.x -in pw.in > pw.out

# Verify clean completion
grep -E "(!|convergence|JOB DONE)" pw.out

You can then inspect pw.out locally using the DFT Output Parser & Results Inspector.

4. Follow-On Production Workflows

  1. Convergence testing: Sweep ecutwfc and K_POINTS and verify |Delta E / N_atom| < 1 meV/atom in the Convergence Analyser.
  2. Structural relaxation: Run calculation = 'vc-relax' followed by a fresh single-point 'scf' on the relaxed geometry.
  3. Band structure & DOS: Run pw.x (bands / nscf), then bands.x, dos.x, and projwfc.x, and inspect outputs in the Band Structure and DOS/PDOS workspaces.
  4. DFPT phonons: Tighten conv_thr = 1.0d-10, relax forces below 1e-5 Ry/Bohr, and run ph.x followed by q2r.x and matdyn.x.

5. Common Pitfalls & Troubleshooting

  • Legacy vs modern DFT+U syntax: Quantum ESPRESSO >= 7.1 replaces Hubbard_U(i) inside &SYSTEM with the dedicated HUBBARD (ortho-atomic) card.
  • Insufficient ecutrho: Norm-conserving pseudopotentials use ecutrho = 4 * ecutwfc, whereas ultrasoft (USPP) and PAW datasets require 8 * ecutwfc to 12 * ecutwfc.
  • Metallic smearing vs fixed occupations: Metals require occupations = 'smearing' (e.g. marzari-vanderbilt, degauss = 0.015); insulators can use fixed once a finite gap is confirmed.

References

  • P. Giannozzi et al., “Quantum ESPRESSO toward the exascale,” J. Chem. Phys. 152, 154105 (2020).
  • G. Prandini et al., “Precision and efficiency in solid-state pseudopotential calculations,” npj Comput. Mater. 4, 72 (2018).