Introduction
There is a jungle of DFT tutorials all over the web, and only some of them are good. Only few of them are oriented at DMFT calculations, and even less use w2dynamics. This tutorial is written in the hope of filling this gap, combining a little bit of theory with practical how-tos and input files.
In this tutorial we will compute the DMFT spectral function of NiO, which is a charge transfer insulator. There is a similar tutorial on the triqs documentation which uses VASP + TRIQS. Instead, we will use Quantum ESPRESSO + w2dynamics. Compared to other DFT codes Quantum ESPRESSO has the advantage of being free and open source. Other than that, all DFT codes are essentially equivalent.
The amount of theoretical and practical knowledge needed for this tutorial is large, hence the decision to split it into modules which can be skipped by the uninterested user.
Structure of the tutorial
- Installation (not in detail)
- Density Functional Theory
- Setting up a basic DFT calculation
- Create and visualize the crystal structure using VESTA
- Choose a pseudopotential
- Set up of the input file to compute the ground-state charge density
- Convergence criteria to watch out for: plane wave expansion and Brillouin zone integration
- Structural relaxation using DFT
- DFT band structure (with atom projection)
- DFT density of states (with atom projection)
- Wannierization
- Set up of the calculation
- Tips and tricks
- Setting up a basic DFT calculation
- Interfacing
- Fourier transform of the Wannier hamiltonian
- Dynamical Mean Field Theory
- Set up of the input file for w2dynamics
- Analytic continuation of the green's function and self-energy
- Plotting tools
Installation
Quantum ESPRESSO
can be installed in two ways, assuming you have superuser privileges. If you don't, it likely means you're using a supercluster, then you'd better bow to the cluster service and ask that they install it for you.Easy way:
sudo apt-get install quantum-espressoGeneral installation:
- Install the minimum needed libraries:
sudo apt-get install libopenmpi-dev -y
sudo apt-get install libopenblas-dev -y
sudo apt-get install libfftw3-dev -y
sudo apt-get install liblapack-dev -y
sudo apt-get install libscalapack-openmpi-dev -y
sudo apt-get install g++ -y - Download from the download page (7.1 version)
- Unpack with
tar -xvf qe\-ReleasePack.tar
- cd to
qe-7.1
- Run the
./configure
script - Run
sudo make all
- Run
sudo make install
- If problems arise you have to go through the complaints of make to figure out what's wrong. Fortunately Quantum ESPRESSO has many users so you often find someone else who had the same problem.
VESTA
Can be downloaded from the jp minerals website. Installation is straightforward for all standard operative systems.
Density Functional Theory
Setting up a basic DFT calculation
Create and visualize the crystal structure using VESTA
The first thing you need is information on your crystal structure. It's a CsCl-type cubic crystal with a = 4.1674 Å. We can use this information to visualize the primitive cell.
- Open VESTA, then click: File → New Structure, a prompt will open
- Click Unit cell and select Cubic, Space Group No. 225 (Fm3m), and enter the lattice parameter
- Now go to Structure parameters → New and add a Ni atom in (0, 0, 0) and O in (1/2, 1/2, 1/2). You should see something like this. Notice that VESTA does the work of recognizing the Wyckoff positions for us.
- VESTA is a very powerful software. It can plot isosurfaces, lattice planes, polyhedral bonds.. it would need a separate tutorial.
Choose a pseudopotential
What is a pseudopotential and why you need it
The Kohn and Sham equation is a second-order Schrödinger's equation for a single electron in an external field. Any numerical solution first goes through an expansion into a basis set, which transforms the problem of solving the differential equation into the one of finding the coefficients of the expansion. The latter is a problem of linear algebra and can be done numerically, provided that the expansion is truncated at some finite value. Many DFT codes, including Quantum ESPRESSO, use plane waves as the basis for expansion.
Plane waves have mainly two advantages:
- They are orthogonal to each other, and they are a complete set
- Truncation into a finite set does not break Hellman-Feynman's theorem
They also have a major inconvenience: in order to accurately describe an oscillation in real space of the order of a unit length, one needs plane waves which have at least that wavelength, or smaller. All the atomic wavefunctions present fast oscillations in real space, even those of the valence shell which are not per se localized. If the DFT calculation took into account all electrons plane waves would be simply too expensive.
Pseudopotentials overcome this problem by removing the core electrons, and replacing the core region of the potential with a weakly repulsive part that mimicks the effect of the core electrons, in such a way that the electronic properties of the valence electrons are unchanged.
Where do I get good pseudopotentials and how do I choose
Choosing a pseudopotential for a DFT calculation while being fully aware what one is doing requires quite a lot of experience. I recommend to anyone without experience to simply use a well-tested norm-conserving PBE pseudopotential. Anything else risks doing more harm than good.
A well-maintained and reliable datased is found at the pseudo-dojo website.
Quantum ESPRESSO uses the UPF format.
Set up of the input file to compute the ground-state charge density
Convergence criteria to watch out for: plane wave expansion and Brillouin zone integration
Structural relaxation using DFT
DFT band structure (with atom projection)
DFT density of states (with atom projection)
Wannierization
Set up of the calculation
Tips and tricks
Interfacing
Fourier transform of the Wannier hamiltonian
Dynamical Mean Field Theory
Set up of the input file for w2dynamics
Analytic continuation of the green's function and self-energy
Plotting tools
Table of contents