The Nuts and Bolts of
First-Principles Simulation
3: Density Functional Theory
CASTEP Developers’ Group
with support from the ESF k Network
CASTEP Workshop, Durham University, 6 – 13
December 2001
Density functional theory
Mike Gillan, University College London
• Ground-state energetics of electrons in condensed matter
• Energy as functional of density: the two fundamental
theorems
• Equivalence of the interacting electron system to a non-
interacting system in an effective external potential
• Kohn-sham equation
• Local-density approximation for exchange-correlation
energy
CASTEP Workshop, Durham University, 6 – 13
December 2001
The problem
• Hamiltonian H for system of interacting electrons acted on by electrostatic
field of nuclei:
H T U V
with T kinetic energy, U mutual interaction energy of electrons, V interaction
energy with field of nuclei.
• To develop theory, V will be interaction with an arbitrary external field:
N
V v(ri )
i 1
with ri position of electron i.
• Ground-state energy is impossible to calculate exactly, because of electron
correlation. DFT includes correlation, but is still tractable because it has the
form of a non-interacting electron theory.
CASTEP Workshop, Durham University, 6 – 13
December 2001
Energy as functional of density: the first theorem
For given external potential v(r), let many-body wavefunction be . Then
ground-state energy Eg is:
Eg H 0 V
and the electron density n(r) by:
n(r ) n^ (r ) Theorem 1: It is impossible that
two different potentials give rise
where the density operator n^ (r ) is defined as: to the same ground-state density
N distribution n(r).
n(r ) (r ri )
^
Corollary: n(r) uniquely
i 1
specifies the external potential
v(r) and hence the many-body
wavefunction .
CASTEP Workshop, Durham University, 6 – 13
December 2001
Convexity of the energy (1)
Theorem 1 expresses convexity of the energy Eg as function of external potential.
Convexity means: For two external potentials v (0; r ) and v (1; r ) , go along linear
path v( ; r ) (1 v(0; r ) v(1; r ) between them; if E g ( ) is ground-state
energy for 0 1 , then:
Eg ( ) (1 ) Eg (0) E g (1) .
Proof of E g ( ) (1 ) E g (0) E g (1) follows from 2nd-order
perturbation theory:
dEg / d ( ) V 0 ( )
2
0 ( ) V n ( )
d E g / d 2
2
0,
n0 E0 ( ) En ( )
with ( ) and n ( ) wavefns of ground and excited states, E0 ( ) and En ( )
their energies, andV v (1) v (0) .
CASTEP Workshop, Durham University, 6 – 13
December 2001
Convexity of the energy (2)
Theorem 1 is equivalent to saying that a change of external potential v(r )
cannot give a vanishing change of density n(r )
This follows from convexity. Convexity implies that dE g / d at 0 is
less than dE g / d at 1 . But dE g / d V 0 , so that:
0 (1) V 0 (0) < 0 (0) V 0 (0)
so that:
dr v(r)n(1, r) < dr v(r)n(0, r) .
Hence:
dr v(r)n(r) < 0 ,
which demonstrates that n(r ) 0 , and this is Theorem 1.
CASTEP Workshop, Durham University, 6 – 13
December 2001
DFT variational principle
the second theorem
Since ground-state energy Eg is uniquely specified by n(r), write it as Eg[n(r)]. It’s
useful to separate out the interaction with the external field, and write:
Eg [n(r )] dr v(r )n(r ) F [n(r )] ,
Where F[n(r)] is ground-state expectation value of H0 when density is n(r).
Theorem 2 (variational principle):
Ground-state energy for a given v(r) is Proof: Let v(r) and v’(r) be two different
obtained by minimising Eg[n(r)] with external potentials, with ground-state
respect to n(r) for fixed v(r), and the energies Eg and Eg’ and ground-state
n(r) that yields the minimum is the wavefns and ' . By Rayleigh-
density in the ground state. Ritz variational principle:
Eg < ' H 0 V ' dr v(r)n '(r) F[n '(r)] ,
Where n’(r) is density associated with ' . This proves the theorem.
The usual assumptions of non-degenerate ground state is needed.
CASTEP Workshop, Durham University, 6 – 13
December 2001
The Euler equation
Write F[n(r)] as:
F [n] T [n] G[n] ,
where T[n] is kinetic energy of a system of non-interacting electrons whose density
distribution is n(r). Then:
E[n] dr v(r ) n(r ) T [n] G[ n] .
Variational principle:
T G
E 0 dr v(r ) n(r ) ,
subject to constraint: n(r ) n(r )
dr n(r) 0 .
Handle the constant-number constraint by Lagrange undetermined multiplier, and
get: T G
v(r ) ,
n(r ) n (r )
with undetermined multiplier the chemical potential.
CASTEP Workshop, Durham University, 6 – 13
December 2001
Kohn-Sham equation
Rewrite the Euler equation for interacting electrons:
T G
v(r )
n(r ) n(r )
by defining veff (r ) v(r ) G / n(r ) , so that:
T
veff (r )
n(r )
But this is Euler equation for non-interacting electrons in potential veff(r), and must be
exactly equivalent to Schroedinger
2 equation:
2 veff (r ) ,
with n(r) given by:
2m
n(r ) 2 (r ) .
2
Then put n(r) back into G[n(r)] to get total energy:
Etot [n(r )] dr v(r )n(r ) T [n] G[n] .
CASTEP Workshop, Durham University, 6 – 13
December 2001
Self consistency
How to do DFT in practice???
• We don’t know G[n(r)], and probably never will, but suppose we know an
adequate approximation to it.
• Make an initial guess at n(r), calculate G / n (r ) and hence
veff (r ) v(r ) G / n(r ) for this initial n(r).
• Solve the Kohn-Sham equation with this veff(r) to get the KS orbitals
and hence calculate the new n(r):
n '(r ) 2 i (r ) |2 .
• The output n’(r) is not the same as the input n(r). So iterate to reduce residual:
1/2
n dr n '(r ) n(r )
2
.
The whole procedure is called ‘searching for self consistency’.
CASTEP Workshop, Durham University, 6 – 13
December 2001
Exchange-correlation energy
• We have already split the total energy into pieces:
Etot [n] dr v(r )n(r ) F [n]
F [n] T [ n] G[ n]
• Now separate out the Hartree energy:
1 n(r )n(r ')
EH [n(r )] e 2 dr dr ' .
2 |r r'|
• Then exchange-correlation energy Exc[n] is defined by:
Etot [n] dr v(r )n(r ) T [n] EH [n] E xc[n] .
So far, everything is formal and exact. If we knew the exact Exc[n], then we could
calculate the exact ground-state energy of any system!
CASTEP Workshop, Durham University, 6 – 13
December 2001
Local density approximation
• There is one extended system for which Exc is known rather precisely: the uniform
electron gas (jellium). For this system, we know exchange-correlation energy per
electron xc ( n) as a function of density n.
• Local density approximation (LDA): assume the xc energy of an electron at point r is
equal to xc ( n(r )) for jellium, using the density n(r) at point r. Then total Exc for
the whole system is:
ExcLDA dr n r xc (n(r ))
• Some kind of justification can be given for LDA (see xxxxxxx). But the main
justification is that it works quite well in practice.
CASTEP Workshop, Durham University, 6 – 13
December 2001
Kohn-Sham potential in LDA
The effective Kohn-Sham effective potential in general is:
G EH Exc
veff (r ) v(r ) v(r )
n(r ) n(r ) n(r )
The Hartree potential is:
EH 1 2 n(r1 )n(r2 ) 2 n(r ')
e dr1dr2 e dr ' .
n(r ) n(r ) 2 r1 r2 r r'
Exchange-correlation potential in LDA:
vxc (r )
n(r ) dr1 n(r1 ) xc (n(r1 )) xc (n(r )) ,
Where:
d
xc (n) n xc (n)
dn
So in LDA, everything can be straightforwardly calculated!
CASTEP Workshop, Durham University, 6 – 13
December 2001
Useful references
Here is a selection of references that contain more detail about DFT:
• P. Hohenberg and W. Kohn, Phys. Rev. 136, B864 (1964)
• W. Kohn and L. J. Sham, Phys. Rev. 140, A1133 (1965)
• N. D. Mermin, Phys. Rev. 137, A1441 (1965)
• R. O. Jones and O. Gunnarsson, Rev. Mod. Phys., 61, 689 (1989)
• M. C. Payne, M. P. Teter, D. C. Allan, T. A. Arias and J. D. Joannopoulos, Re.
Mod. Phys., 64, 1045 (1992)
CASTEP Workshop, Durham University, 6 – 13
December 2001