Tutorial on Density Functional Theory using quantum espresso

Benjamin Obi Tayo Ph.D.
Modern Physics
Published in
4 min readJul 30, 2018

This tutorial is for beginners who are interested in learning how to set up and run a first-principle calculation based on density functional theory (DFT). DFT is the most widely used method by quantum chemists, condensed matter physicists, and material scientists for calculating important materials properties such as equilibrium geometry, quantum energy levels, optoelectronic properties, vibrational properties, IR spectrum, etc.

DFT can be used for both molecular systems (finite size) or extended periodic systems like solids. Here we focus on DFT calculations for an extended system. As an example, we consider the MoWS2 alloy. To find out about setting up and running a DFT calculation for a molecule or polymer, see the following: Tutorial on Density Functional Theory using GAMESS. For DFT studies of 1D nanomaterials such as carbon nanotubes and graphene nanoribbons, see the following: Tutorial on DFT Studies of 1D Nanomaterials Using Quantum Espresso.

Structure of the MoWS2 alloy.

For practical purposes, we consider only a self-consistent field calculation at fixed equilibrium geometry. The geometry parameters like bond lengths and lattice constants are obtained experimentally.

A self-consistent calculation is first performed using atomic pseudopotentials to obtain the converged electron density, which is then used to calculate the quantum energy levels of the system. A band structure calculation is performed at the end of the self-consistent field calculation in order to predict important optoelectronic parameters such as energy band gap and electron/hole effective masses. All calculations are performed using the Quantum Espresso DFT Solver. For more information, see the following link: https://www.quantum-espresso.org/.

You can download off-the-shelf input files for performing DFT calculations for the alloy MoWS2 from this repository:

https://github.com/bot13956/predictive_model_MoWS2_alloy.

Necessary Components of the Calculation

  1. Atomic Pseudopotential files:

Mo.rel-pw91-spn-rrkjus_psl.0.3.0.UPF: atomic pseudopotential file for Molybdenum.

W.rel-pw91-spn-rrkjus_psl.0.2.3.UPF: atomic pseudopotential file for Tungsten.

S.rel-pw91-n-rrkjus_psl.0.1.UPF: atomic pseudopotential file for Sulfur.

There are several websites where you can find pseudopotential files, for e.g. http://www.quantum-espresso.org/pseudopotentials.

When downloading a pseudopotential file, remember that the naming convention for each file reveals the type of exchange-correlation potential (LDA = Local Density Approximation, GGA = Generalized Gradient Approximation, hybrid, etc) that was used in generating the file, as well as the pseudopotential type (NC = Norm-Conserving, PAW = Projector-Augmented Wave, and US = Ultrasoft). If your calculation is going to take relativistic effects (important for systems containing high-Z atoms) into consideration, make sure you understand the difference between scalar relativistic and full relativistic pseudopotentials. For example, the pseudopotential files listed above for the elements Mo, W, and S are full relativistic ultrasoft GGA pseudopotentials. In general and depending on the system, hybrid pseudopotentials perform better than GGA pseudopotentials, and GGA pseudopotentials perform better than LDA pseudopotentials.

2. Input file for performing self-consistent field calculations

scf.in: performs self-consistent field calculations using density functional theory.

3. Input file for calculating the energy eigenvalues and eigenfunctions

bands.in: performs band structure calculation after self-consistent field calculation is completed.

4. Input file for generating band structure as a one-dimensional plot

bands_plot.in: re-arranges band structure data in a format that projects two-dimensional band structure into a one-dimensional plot along high symmetry points in the first Brillouin zone.

5. Batch script file for scheduling (if running calculations on a cluster)

batch_script.pbs: batch script for batch scheduling and allocating of computer resources.

Analysing Results from a Band Structure Calculation

A band structure calculation provides useful information such as:

  1. Band structure plot (direct or indirect semiconductor).
  2. Density of states (from which we can infer if a material is an insulator, semiconductor, or metal).
  3. Energy band gap (for optoelectronic applications).
  4. Carrier effective mass (for applications in charge transport and thermoelectricity).

Here are some outputs from the calculation with full relativistic effect (spin-orbit coupling) taken into account:

Spinorial band structure of MoS2.
Spinorial band structure of WS2.
Spinorial band structure of MoWS2.
Band gap and spin-orbit (SO) splitting summary.

In summary, we have provided a tutorial that can help beginners to set up and run a DFT calculation for periodic systems. For more information on how to create various input files as well as tuning different hyperparameters such as convergence criteria, see the quantum espresso input file description documentation: https://www.quantum-espresso.org/Doc/INPUT_PW.html.

References

  1. P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009).
  2. P. Giannozzi et al., J. Phys.:Condens. Matter 29 465901 (2017).
  3. Quantum Espresso URL: http://www.quantum-espresso.org.
  4. NERSC for supercomputing resources: https://www.nersc.gov/.

--

--

Benjamin Obi Tayo Ph.D.
Modern Physics

Dr. Tayo is a data science educator, tutor, coach, mentor, and consultant. Contact me for more information about our services and pricing: benjaminobi@gmail.com