Lecture on materials properties calculated from first-principles / density functional theory (DFT)
TOHOKU
UNIVERSITY
2019.05.22:
10:30 – 11:30 = fundamentals of DFT
11:30 – 12:00 = guide of software installation 2019.05.29 and 06.05:
electronic structure of silicon and graphene phonon dispersion, etc…
Evaluation of this class: 1 quiz (today) and 1 report (2019.07.26) Class webpage: http://ccmp.home.blog
Emails: [email protected] or [email protected]
What is DFT?
• An approach to calculate the (ground state) properties of many-electron systems from first-principles
• Features:
- Ab initio / first-principles / no empirical information - Quantum mechanical and numerical
- Predictive capability
- Very accurate for most materials (errors typically < few %)
Quantum ESPRESSO will be used in this class
ESPRESSO = opEn-Source Package for Research in
Electronic Structure, Simulation, and Optimization
G. Hautier, C.C. Fischer, A. Jain, T. Mueller, and G. Ceder, “ Finding Nature ’ s Missing Ternary Oxide Compounds Using Machine Learning and Density Functional Theory, ”
Chem. Mater. 22, 3762-3767 (2010)
DFT for discovery of new materials
DFT for establishing materials database
A. Jain, S.P. Ong, G. Hautier, W. Chen, W.D. Richards, S.
Dacek, S. Cholia, D. Gunter, D. Skinner, G. Ceder, K.A.
Persson, Applied Physics Letters Materials 1, 011002 (2013)
https://www.materialsproject.org/
DFT for your publications ☺
Example research subject: Optical properties
DFT for your publications ☺
Example research subject: Thermoelectrics
Outline
Formalism
– Hydrogen Atom
– Density Functional Theory
• Exchange-Correlation Potentials
• Pseudopotentials and Related Approaches
Practical Issues
– Implementation
• Periodic boundary conditions
• k-Points
• Plane-wave basis sets
– Parameters controlling numerical precision
Introduction
The Hydrogen Atom
Proton with mass M 1 , coordinate R 1 Electron with mass m 1 , coordinate r 1
r r 1 r 2 , R M 1 R 1 m 2 r 2
M 1 m 2 , m M 1 m 2
M 1 m 2 , M M 1 m 2
Y( R , r) cm (R) r ( r)
Hydrogen Atom
Switch to Spherical Coordinates
q
q q
q
q
E
r e r
r r r
r r
m
ö
æ
ö
æ
ö
æ
2 2
2 2
2 2
2 2
2
sin sin 1
sin 1 1
2
( r, q , ) R nl (r ) Y l m ( q , )
2 2m
1 r 2
d
dr r 2 d dr æ
ö
l( l 1)
r 2 e 2 r æ
ö
R nl ( r) E n R nl (r)
E n me 4 2 2
1
n 2 13.6
n 2 eV
Commonly used units in calculation:
1 Ry ~ 13.6 eV, 1 Ha = 2 Ry,
1 a.u. = Bohr’s radius ~ 0.53 angstrom
ℏ
ℏ
ℏ
Many-Electron Problem
• collection of
– N ions
– n electrons
• total energy
computed as a function of ion positions
– Use approximation in quantum mechanics!
electrons
ions
Born-Oppenheimer Approximation
• Mass of nuclei exceeds that of the electrons by a factor of 1000 or more
– we can neglect the kinetic energy of the nuclei – treat the ion-ion interaction classically
– significantly simplifies the Hamiltonian for the electrons
• Consider Hamiltonian for n electrons in potential of N nuclei with atomic numbers Z i
External electron-ion potential
V ext r j
Density Functional Theory
Hohenberg and Kohn (1964), Kohn and Sham (1965)
• For each external potential there is a unique ground- state electron density
• Energy can be obtained by minimizing a density functional with respect to density of electrons n(r)
E groundstate =min{E tot [n(r)]}
int ext ...
tot n r T n r E n r d r V r n r
E
Kinetic Energy Electron-Electron Interactions
Other terms Electron-Ion
Interactions
Kohn-Sham Approach
n
i
i r e
r n
1
) 2
( )
(
)]
( [ ' '
) ' ( ) ( 2
1
) ( ) 2 (
}]
[{
3 3
3 1
3 2
* 2
r n E
r rd r d
r
r n r n
r d r n r V
r m d
E
xc ext n
i
i i i e
i
Many-body electron-electron and other interactions are all put into E xc [n(r)]
“ Exchange-Correlation Energy ”
ℏ
Kohn-Sham Equations
) ( )
( )
( ' '
) ' ) (
2 (
3 2
2
r r
r V
r r d
r r r n
m e i V ext xc i e i i
) (
)]
( ) [
( n r
r n r E
V xc xc
d
d
ℏ
Most of the research on improvement of DFT were dedicated
to establish good exchange-correlation “functionals”
Local Density Approximation
(e.g., J. P. Perdew and A. Zunger, Phys. Rev. B 23, 5048 (1981))
r d r
n r
n r
n
E xc [ ( )] e xc hom ( ( )) ( ) 3
(r) Density
of Gas Electron
s Homogeneou of
Energy n
Correlatio Exchange
)) (
hom (
n r
xc n
e
Generalized Gradient Approximation
J. P. Perdew, K. Burke and M. Ernzerhof, Phys. Rev. Lett. 77 (1996)
r d s r
F r
n r
n r
n
E xc GGA [ ( )] e x hom ( ( )) ( ) xc ( s , , ) 3
A Note on Accuracy and Ongoing Research
• LDA leads to “ overbinding ”
− Lattice constants commonly 1-3% too small, elastic constants 10-15%
too stiff, cohesive energies 5-20% too large
but, errors are largely systematic
− Energy differences tend to be more accurate
• GGA corrects for overbinding
− Sometimes “overcorrects”
• “Beyond DFT” Approaches
− For “highly correlated” systems LDA & GGA perform much worse and corrections required (DFT+U, Hybrid Hartree-Fock/DFT, …)
− Non-bonded interactions, e.g., van der Waals interactions in graphite,
require additional terms or functionals (e.g., vdW-DF)
External electron-ion interaction
• Potential due to ions is singular at ion core
• Eigenfunctions oscillate rapidly near singularity
• Eigenfunction in bonding region is smooth
) ( )
( )
( ' '
) ' ) (
2 (
3 2
2
r r
r V
r r d
r r r n
m e i V ext xc i e i i
ℏ
valence electrons
ion core
Difficult to solve KS equation!
Pseudopotentials
• For plane-wave basis sets, rapid oscillations require large number of basis functions
– expensive – unnecessary
• these oscillations don't alter bonding properties
• Replace potential with nonsingular potential – preserve bonding tails of eigenfunction
– preserve distribution of charge between core and tail regions
– reduces number of plane waves required for accurate expansion of wavefunction
“Pseudopotential”
pseudo
Summary of Kohn-Sham DFT
n
i
i r e
r n
1
) 2
( )
(
Electron Density
Electron Wavefunctions i (r )
Exchange-Correlation Energy E xc [n(r )]
Form depends on whether we use LDA or GGA
Potential Electrons Feel from Nuclei V ext (r )
)]
( [ ' '
) ' ( ) ( 2 1
) ( ) 2 (
}]
[{
3 3
3 1
3 2
* 2
r n E r rd r d
r r n r n
r d r n r V r
m d E
xc ext N
i
i i i e
i
e
ℏ
) ( )
( )
( ' '
) ' ) (
2 (
3 2
2
r r
r V r r d r
r r n
m e i V ext xc i e i i
ℏ
KS equation Total energy
V xc (r ) d E xc [ n(r)]
d n( r)
Note: i depends on n(r) which depends on i
Solution of Kohn-Sham equations must be done iteratively
Self-Consistent Solution to DFT Equations
Input Positions of Atoms for a Given Unit Cell and Lattice Constant
guess charge density
compute effective potential
solve KS equation, recalculate density
compare output and input charge densities
Energy for Given Lattice Constant
different
same
1. Set up atom positions
2. Make initial guess of “input” charge density (often overlapping atomic charge densities) 3. Solve Kohn-Sham equations with this input
charge density
4. Compute “output” charge density from resulting wavefunctions
5. If energy from input and output densities differ by amount greater than a chosen
threshold, mix output and input density and go to step 2
6. Quit when energy from input and output densities agree to within prescribed
tolerance (e.g., 10 -5 eV)
Some of Widely Used DFT Codes
Free
• Quantum Espresso / PWSCF (http://www.quantum-espresso.org/)
• ABINIT (http://www.abinit.org/)
• CASTEP (http://ccpforge.cse.rl.ac.uk/gf/project/castep/)
Commercial:
• VASP (http://cms.mpi.univie.ac.at/vasp/)
• WIEN2K (http://www.wien2k.at/)
Outline
Formalism
– Hydrogen Atom
– Density Functional Theory
• Exchange-Correlation Potentials
• Pseudopotentials and Related Approaches
Practical Issues
– Implementation
• Periodic boundary conditions
• k-Points
• Plane-wave basis sets
– Parameters controlling numerical precision
Implementation of DFT for a Single Crystal
a
a a
Unit Cell Vectors a 1 = a (-1/2, 1/2 , 0) a 2 = a (-1/2, 0, 1/2) a 3 = a (0, 1/2, 1/2) Example: Diamond Cubic Structure of Si
Crystal Structure Defined by Unit Cell Vectors and Positions of Basis Atoms
Basis Atom Positions 0 0 0
¼ ¼ ¼
All atoms in the crystal can be obtained by adding integer
multiples of unit cell vectors to basis atom positions
Electron Density in Crystal Lattice
n r n r R uvw
a
a a
Unit-Cell Vectors
a 1 = a (-1/2, 1/2 , 0) a 2 = a (-1/2, 0, 1/2) a 3 = a (0, 1/2, 1/2)
Electron density is periodic with periodicity given by R uvw
R uvw ua 1 va 2 wa 3
Translation Vectors:
because wavefunctions in a crystal obey Bloch’s Theorem
r k r k r
k
b
b exp i u
For a given band b
where is periodic in real space: u k b r u k
b r R uvw
u k b r
R uvw ua 1 va 2 wa 3
Translation Vectors:
Electron Density is Periodic
Representation of Electron Density
r k r k r
k
b
b exp i u
b
b
b e e
BZ F
k
k f d
e n
BZ
2 3
) (
)
( r k r
In practice the integral over the Brillouin zone is replaced with a sum over a finite number of k-points (N kpt )
One parameter that needs to be checked for numerical convergence is
number of k-points
b
b
b e e
( )
) (
1
2
F N
j
j
jkpt
j
f
w e
n r k r k
Integral over k-points in first Brillouin zone
f( e – e
F) is Fermi-Dirac distribution function with Fermi energy e
F
N
ei
e i
n
1
) 2
r ( )
r
(
Representation of Wavefunctions
Fourier-Expansion as Series of Plane Waves
lmn
lmn
lmn i
u
u k b r k b G exp G r
r k r k r
k
b
b exp i u
For a given band:
Recall that is periodic in real space: u k b r u k b r u k b r R uvw
can be written as a Fourier Series:
r
k
u b
3 2
1 b b
b m n
lmn l
G
where the are primitive reciprocal lattice vectors b i ⋅ = 2
Representation of Wavefunctions
Plane-Wave Basis Set
r k r k r
k
b
b exp i u
Another parameter that needs to be checked for convergence is the
“plane-wave cut-off energy” E cut
In practice the Fourier series is truncated to include all G for which:
2 cut
2
2 E
m G k
For a given band
G k
k b r u b G exp i G k r
Use Fourier Expansion
ℏ
Examples of Convergence Checks
k points
To tal ene rg y ( Ry)
no offset
offset
offset
no offset
k points
Cal c ul ati on tim e (s )
To tal ene rg y (Ry)
E cut (Ry) E cut (Ry)
Cal c ul ati on tim e (s )
Example calculation inputs
&CONTROL
calculation='bands',
restart_mode='from_scratch', prefix='si',
pseudo_dir='../pseudo/', outdir='../work/',
/
&SYSTEM ibrav=2,
celldm(1)=10.2625, nat=2,
ntyp=1,
ecutwfc=60.0, nbnd=8,
/
&ELECTRONS conv_thr=1d-8, /
ATOMIC_SPECIES
Si 28.0855 Si.pbe-rrkj.UPF ATOMIC_POSITIONS (alat) Si 0.00 0.00 0.00 Si 0.25 0.25 0.25 K_POINTS {crystal_b}
5
0.0000000000 0.0000000000 -0.5000000000 20 0.0000000000 0.0000000000 0.0000000000 30 -0.5000000000 0.0000000000 -0.5000000000 10 -0.3750000000 0.0000000000 -0.6250000000 30 0.0000000000 0.0000000000 0.0000000000 20
&CONTROL
calculation='scf',
restart_mode='from_scratch', prefix='si',
pseudo_dir='../pseudo/', outdir='../work/',
/
&SYSTEM ibrav=2,
celldm(1)=10.2625, nat=2,
ntyp=1,
ecutwfc=60.0, /
&ELECTRONS
mixing_beta=0.7, conv_thr=1d-8, /
ATOMIC_SPECIES
Si 28.0855 Si.pbe-rrkj.UPF ATOMIC_POSITIONS (alat) Si 0.00 0.00 0.00 Si 0.25 0.25 0.25 K_POINTS automatic 4 4 4 1 1 1
By only 2 input files, we can “easily” calculate electronic band structure!
Example calculation inputs
&CONTROL
calculation='bands',
restart_mode='from_scratch', prefix='si',
pseudo_dir='../pseudo/', outdir='../work/',
/
&SYSTEM ibrav=2,
celldm(1)=10.2625, nat=2,
ntyp=1,
ecutwfc=60.0, nbnd=8,
/
&ELECTRONS conv_thr=1d-8, /
ATOMIC_SPECIES
Si 28.0855 Si.pbe-rrkj.UPF ATOMIC_POSITIONS (alat) Si 0.00 0.00 0.00 Si 0.25 0.25 0.25 K_POINTS {crystal_b}
5
0.0000000000 0.0000000000 -0.5000000000 20 0.0000000000 0.0000000000 0.0000000000 30 -0.5000000000 0.0000000000 -0.5000000000 10 -0.3750000000 0.0000000000 -0.6250000000 30 0.0000000000 0.0000000000 0.0000000000 20
&CONTROL
calculation='scf',
restart_mode='from_scratch', prefix='si',
pseudo_dir='../pseudo/', outdir='../work/',
/
&SYSTEM ibrav=2,
celldm(1)=10.2625, nat=2,
ntyp=1,
ecutwfc=60.0, /
&ELECTRONS
mixing_beta=0.7, conv_thr=1d-8, /
ATOMIC_SPECIES
Si 28.0855 Si.pbe-rrkj.UPF ATOMIC_POSITIONS (alat) Si 0.00 0.00 0.00 Si 0.25 0.25 0.25 K_POINTS automatic 4 4 4 1 1 1
By only 2 input files, we may be able to publish some papers!
Electronic Bandstructure
Example for Si
Brillouin Zone Energy dispersion