Quantum Espresso is a software suite for ab initio quantum chemistry methods of electronic-structure calculation and materials modeling. It is based on Density Functional Theory, plane wave basis sets, and pseudo-potentials. Documentation for Quantum Espresso can be found on its official website.

Currently, Quantum Espresso version 6.2.0 is available on the cluster.

Basics

To run Quantum Espresso on the cluster, you must first load the Open MPI module and the Quantum Espresso module using the commands:

module load openmpi
module load qe

To load a specific version of the modules, add the version number to the load command.

module load openmpi/gcc
module load qe/gcc/6.2.0

When running Quantum Espresso jobs, it is advised that users create a new directory located in /data to store the data in, and a new directory in /local to run the job in.

Most Quantum Espresso input files require the assistance of pseudo-potential files, which contain approximation for the simplified description of complex systems such as periodic elements. It is recommended that these files are stored in a directory named /pseudo. The file path of these pseudo-potential files are generally referenced at the beginning of a QE input file in the &control section, as seen below:

&control
prefix='silicon',
pseudo_dir = 'pseudo/',
outdir='output/'
module load qe/gcc/6.2.0

You can also specify a directory for the output to be saved to in this &control section. If the directory does not exist, it will be created when the program is run, and output files will be saved there.

Running Quantum Espresso through a job script

1. Create a QE input file, with the extension *.in. This repository provides a simple script, si.scf.in, and it’s helper script Si.pz-vbc.UPF, which performs self-consistent calculations for Silicon in the diamond structure.

2.Ensure the helper script is located in a directory named /pseudo

3. Prepare the submission script, which is the script that is submitted to the Slurm scheduler as a job in order to run the QE script. This repository provides the script job.sh as an example.

job.sh


#!/bin/bash

#SBATCH --job-name=qe_test
#SBATCH -o qe_out%j.out
#SBATCH -e qe_err%j.err
#SBATCH -N 2
#SBATCH --ntasks-per-node=4

echo -e '\n submitted Quantum Espresso job'
echo 'hostname'
hostname

# loads Open MPI and Quantum Espresso modules
module load openmpi/gcc
module load qe

# run Quantum Espresso using Open MPI's mpirun
# results will be printed to output.file
mpirun pw.x < si.scf.in > output.file
			
4. Submit the job using sbatch job.sh

5. Examine the results.