ChapterPDF Available

Abstract and Figures

The success of density functional theory (DFT) is clearly demonstrated by the overwhelming amount of research articles describing results obtained within DFT that were published in the last decades. There is also a fair number of books reviewing the basics of the theory and its extensions (e.g., the present volume, [1] and [2]). These works fall mainly into three classes: those dealing with the theory (proposing extensions, new functionals, etc.), those concerned with the technical aspects of the numerical implementations, and others - the vast majority - presenting results. In our opinion, any scientist working in the field should have a sound knowledge of the three classes. For example, a theorist developing a new functional should be aware of the difficulties in implementing it. Or the applied scientist, performing calculations on specific systems, should know the limitations of the theory and of the numerical implementation she/he is using. The goal of this chapter is to supply the beginner with a brief pedagogical overview of DFT, combining the abovementioned aspects. However, we will not review its foundations - we redirect the reader to the chapter of J. Perdew and S. Kurth that opens this book. Obviously, we will not be able to provide many details, but we hope that the beginner obtains a general impression of the capabilities and limitations of DFT.
Content may be subject to copyright.
6 A Tutorial on Density Functional Theory
Fernando Nogueira
Fernando Nogueira
, Alberto Castro
,
and Miguel A.L. Marques
Departamento de F´ısica,
Universidade de Coimbra,
Rua Larga, 3004 516, Coimbra, Portugal
fnog@teor.fis.uc.pt
Departamento de F´ısica Torica,
Universidad de Valladolid,
E–47011 Valladolid, Spain
alberto.castro@tddft.org
Donostia International Physics Center (DIPC),
P. Manuel Lardiz´abal 4,
20080 San Sebasti´an, Spain
marques@tddft.org
6.1 Introduction
The success of density functional theory (DFT) is clearly demonstrated by the
overwhelming amount of research articles describing results obtained within
DFT that were published in the last decades. There is also a fair number of
books reviewing the basics of the theory and its extensions (e.g., the present
volume, [1] and [2]). These works fall mainly into three classes: those dealing
with the theory (proposing extensions, new functionals, etc.), those concerned
with the technical aspects of the numerical implementations, and others the
vast majority presenting results. In our opinion, any scientist working in
the field should have a sound knowledge of the three classes. For example,
a theorist developing a new functional should be aware of the difficulties in
implementing it. Or the applied scientist, performing calculations on specific
systems, should know the limitations of the theory and of the numerical
implementation she/he is using. The goal of this chapter is to supply the
beginner with a brief pedagogical overview of DFT, combining the above-
mentioned aspects. However, we will not review its foundations we redirect
the reader to the chapter of J. Perdew and S. Kurth that opens this book.
Obviously, we will not be able to provide many details, but we hope that the
beginner obtains a general impression of the capabilities and limitations of
DFT.
This chapter is written in the form of a tutorial, combining basic theoret-
ical and numerical aspects with specific examples, running from the simplest
hydrogen atom to more complex molecules and solids. For the examples we
used only freely available codes [3], so that the reader may easily reproduce
C. Fiolhais, F. Nogueira, M. Marques (Eds.): LNP 620, pp. 218–256, 2003.
c
Springer-Verlag Berlin Heidelberg 2003
6 A Tutorial on Density Functional Theory 219
the calculations. All input and output files can be found in the web site
http://www.tddft.org/DFT2001/. The chapter follows closely the outline
of the practical sessions held at Caramulo, during the DFT2001 summer
school. Some theoretical or numerical aspects that were required in the prac-
tical sessions were, however, not covered by any of the lectures in Caramulo
(e.g., pseudo-potentials). To fill this gap we provide in this chapter a brief
account of some of them. We do not intend to discuss every possible numeric
implementation of DFT. In particular, we do not include any explicit exam-
ple of a localized basis set DFT calculation. Neither do we intend to present
an extensive survey of the numerical aspects of each technique. We expect,
however, that the technical details given are sufficient to enable the reader
to perform himself the simulations presented herein.
The outline of the chapter is the following: We start, in Sect. 6.2, by
giving a technical overview on how to solve the Kohn-Sham equations. The
next section is devoted to pseudo-potentials, an essential ingredient of many
DFT calculations. In Sect. 6.4 we present our first test case, namely atoms,
before we proceed to some plane-wave calculations in Sect. 6.5. The final
example, methane calculated using a real-space implementation, is presented
in Sect. 6.6. We will use atomic units throughout this chapter, except when
explicitly stated otherwise.
6.2 Solving the Kohn–Sham Equations
6.2.1 Generalities
It is usually stated that the Kohn-Sham equations are “simple” to solve. By
“simple” it is meant that for a given system, e.g., an atom, a molecule, or a
solid, the computational effort to solve the Kohn-Sham equations is smaller
than the one required by the traditional quantum chemistry methods, like
Hartree-Fock (HF) or configuration interaction (CI)
1
. But it does not mean
that it is easy or quick to write, or even to use, a DFT based computer
program. Typically, such codes have several thousand lines (for example, the
ABINIT [4] package a plane-wave DFT code recently reached 200,000
lines) and hundreds of input options. Even writing a suitable input file is
often a matter of patience and experience.
In spite of their differences, all codes try to solve the Kohn-Sham equations
2
2
+ v
KS
[n](r)
ϕ
i
(r)=ε
i
ϕ
i
(r) . (6.1)
1
This statement has to be taken with care, for it certainly depends on the ap-
proximation for the exchange-correlation potential. For example, it holds when
using the local-density approximation or any of the generalized gradient approx-
imations. However, if we use the exact exchange functional, the calculations are
at least as computationally demanding as in Hartree-Fock.
220 Fernando Nogueira, Alberto Castro, and Miguel A.L. Marques
n
0
(r)
v
KS
(r)
ˆ
H
KS
ϕ
i
(r)=ε
i
ϕ
i
(r)
n(r)=
i
|ϕ
i
(r)|
2
converged?
yes
no
end
Fig. 6.1. Flow-chart depicting a generic Kohn-Sham calculation
The notation v
KS
[n] means that the Kohn-Sham potential, v
KS
, has a func-
tional dependence on n, the electronic density, which is defined in terms of
the Kohn-Sham wave-functions by
n(r)=
occ
i
|ϕ
i
(r)|
2
. (6.2)
The potential v
xc
is defined as the sum of the external potential (normally
the potential generated by the nuclei), the Hartree term and the exchange
and correlation (xc) potential
v
KS
[n](r)=v
ext
(r)+v
Hartree
[n](r)+v
xc
[n](r) . (6.3)
Due to the functional dependence on the density, these equations form a set of
nonlinear coupled equations. The standard procedure to solve it is iterating
until self-consistency is achieved. A schematic flow chart of the scheme is
depicted in Fig. 6.1. Usually one supplies some model density, n
0
(r), to start
the iterative procedure. In principle, any positive function normalized to the
total number of electrons would work, but using an educated guess for n
0
(r)
can speed-up convergence dramatically. For example, in a molecular or a
6 A Tutorial on Density Functional Theory 221
solid-state system one could construct n
0
(r) from a sum of atomic densities
n
0
(r)=
α
n
α
(r R
α
) , (6.4)
where R
α
and n
α
represent the position and atomic density of the nucleus
α. For an atom, a convenient choice is the Thomas-Fermi density.
We then evaluate the Kohn-Sham potential (see 6.3) with this density.
Each of the components of v
KS
is calculated separately and each of them
poses a different numerical problem. The external potential is typically a
sum of nuclear potentials centered at the atomic positions,
v
ext
(r)=
α
v
α
(r R
α
) . (6.5)
In some applications, v
α
is simply the Coulomb attraction between the bare
nucleus and the electrons, v
α
(r)=Z
α
/r, where Z
α
is the nuclear charge.
In other cases the use of the Coulomb potential renders the calculation un-
feasible, and one has to resort to pseudo-potentials (see Sect. 6.3.1).
The next term in v
KS
is the Hartree potential,
v
Hartree
(r)=
d
3
r
n(r
)
|r r
|
. (6.6)
There are several different techniques to evaluate this integral, either by direct
integration (as it is done when solving the atomic Kohn-Sham equations), or
by solving the equivalent differential (Poisson’s) equation,
2
v
Hartree
(r)=4πn(r) . (6.7)
As the choice of the best technique depends on the specific problem, we defer
further discussion on the Hartree term to Sects. 6.2.2–6.2.4.
Finally, we have the xc potential, which is formally defined through the
functional derivative of the xc energy,
v
xc
(r)=
δE
xc
δn(r)
. (6.8)
Perhaps more than a hundred approximate xc functionals have appeared in
the literature over the past 30 years. The first to be proposed and, in fact,
the simplest of all, is the local-density approximation (LDA). It is written as
E
LDA
xc
=
d
3
HEG
(n)
n=n(r )
; v
LDA
xc
(r)=
d
dn
ε
HEG
(n)
n=n(r )
, (6.9)
where ε
HEG
(n) stands for the xc energy per unit volume of the homogeneous
electron gas (HEG) of (constant) density n. Note that ε
HEG
(n) is a simple
function of n, which was tabulated for several densities using Monte Carlo
222 Fernando Nogueira, Alberto Castro, and Miguel A.L. Marques
methods by Ceperley and Alder [5]. A number of different parameterizations
exist for this function, like the PZ81 [6] and PW92 [7]. It is clear from these
considerations that evaluating the LDA xc potential is as simple (and fast) as
evaluating any rational or transcendental function. In the case of the gener-
alized gradient approximations (GGA) the functional has a similar form, but
now ε does not depend solely on the density n, but also on its gradient n.
The evaluation of the GGA xc potential is also fairly straightforward. Finally,
we mention the third generation of density functionals, the orbital-dependent
functionals (see the chapter by E. Engel in this book) like the exact exchange
(EXX). In order to obtain the xc potential in this case, one is required to solve
an integral equation
2
. This equation is quite complex, and its solution can
easily become the most time-consuming part of the Kohn-Sham calculation.
We should also notice that functionals like the EXX involve the evaluation of
the so-called Coulomb integrals. These two-center integrals, that also appear
in Hartree-Fock theory, pose another difficult problem to the computational
physicist or chemist.
Now that we have the Kohn-Sham potential, we can solve the Kohn-Sham
equation (6.1). The goal is to obtain the p lowest eigenstates of the Hamilto-
nian H
KS
, where p is half the number of electrons (for a spin-unpolarized cal-
culation). For an atom, or for any other case where the Kohn-Sham equations
can be reduced to a one-dimensional differential equation, a very efficient in-
tegration method is commonly employed (see below). In other cases, when
using basis sets, plane-waves, or real-space methods, one has to diagonalize
the Hamiltonian matrix,
ˆ
H
KS
. We have to keep in mind that fully diago-
nalizing a matrix is a q
3
problem, where q is the dimension of the matrix
(which is roughly proportional to the number of atoms in the calculation).
Moreover, the dimension of the Hamiltonian is sometimes of the order of
10
6
× 10
6
=10
12
elements
3
. It is clearly impossible to store such a matrix
in any modern computer. To circumvent these problems, one usually resorts
to iterative methods. In these methods it is never necessary to write the full
Hamiltonian the knowledge of how
ˆ
H
KS
applies to a test wave-function is
sufficient. These methods also scale much better with the dimension of the
matrix. Nonetheless, diagonalizing the Kohn-Sham Hamiltonian is usually
the most time-consuming part of an ordinary Kohn-Sham calculation.
We have now all the ingredients to obtain the electronic density from (6.2).
The self-consistency cycle is stopped when some convergence criterion is
reached. The two most common criteria are based on the difference of to-
tal energies or densities from iteration i and i 1, i.e., the cycle is stopped
when
E
(i)
E
(i1)
E
or
d
3
r
n
(i)
n
(i1)
n
, where E
(i)
and n
(i)
are the total energy and density at iteration i, and η
E
and η
n
are user defined
tolerances. If, on the contrary, the criteria have not been fulfilled, one restarts
2
Or choose to apply the Krieger, Lee and Iafrate approximation [8].
3
However,
ˆ
H
KS
is usually a very sparse matrix. For example, in a typical real-space
calculation only less than.1 % of the elements of
ˆ
H are different from 0.
6 A Tutorial on Density Functional Theory 223
the self-consistency cycle with a new density. It could simply be the output
density of the previous cycle unfortunately this would almost certainly lead
to instabilities. To avoid them, one usually mixes this output density with
densities from previous iterations. In the simplest scheme, linear mixing, the
density supplied to start the new iteration, n
(i+1)
is a linear combination of
the density obtained from (6.2), n
, and the density of the previous iteration,
n
(i)
,
n
(i+1)
= βn
+(1 β)n
(i)
, (6.10)
where the parameter β is typically chosen to be around 0.3. More sophisti-
cated mixing schemes have been proposed (e.g., Anderson or Broyden mix-
ing [9,10,11,12,13]), in which n
(i+1)
is an educated extrapolation of the den-
sities of several previous iterations.
At the end of the calculation, we can evaluate several observables, the
most important of which is undoubtedly the total energy. From this quantity,
one can obtain, e.g., equilibrium geometries, phonon dispersion curves, or
ionization potentials. In Kohn-Sham theory, the total energy is written as
E =
occ
i
d
3
i
(r)
2
2
ϕ
i
(r)+
d
3
rv
ext
(r)n(r)+
+
1
2
d
3
r
d
3
r
n(r)n(r
)
|r r
|
+ E
xc
, (6.11)
where the terms are respectively the non-interacting (Kohn-Sham) kinetic
energy, the external potential, the Hartree and the xc energies. This formula
can be further simplified by using the Kohn-Sham equation, (see 6.1), to yield
E =
occ
i
ε
i
d
3
r
1
2
v
Hartree
(r)+v
xc
(r)
n(r)+E
xc
. (6.12)
This is the formula implemented in most DFT codes. Note that, when per-
forming geometry optimization or nuclear dynamics, one needs to add to
the total energy a repulsive Coulomb term that accounts for the interactions
between the ions
E
nn
=
α,β
Z
α
Z
β
|R
α
R
β
|
. (6.13)
Calculating the sum over all atoms is fairly straightforward for finite systems,
but non-trivial for extended systems: As the Coulomb interaction is very
long ranged, the (infinite) sum in (6.13) is very slowly convergent. There is,
however, a technique due to Ewald that allows us to circumvent this problem
and evaluate (6.13) (see Sect. 6.2.3).
224 Fernando Nogueira, Alberto Castro, and Miguel A.L. Marques
6.2.2 Atoms
In order to solve the Kohn-Sham equations (6.1) for atoms, one normally
performs a spherical averaging of the density
4
. This averaging leads to a
spherically symmetric Kohn-Sham potential. The Hartree potential is then
trivially evaluated as
v
Hartree
(r)=
4π
r
r
0
dr
r
2
n(r
)+4π
r
dr
r
n(r
) . (6.14)
and the Kohn-Sham wave-functions can be written as the product of a radial
wave-function, R
nl
(r), and a spherical harmonic, Y
lm
(θ, φ):
ϕ
i
(r)=R
nl
(r)Y
lm
(θ, φ) . (6.15)
The wave-functions are labeled using the traditional atomic quantum num-
bers: n for the principal quantum number and l, m for the angular momen-
tum. The Kohn-Sham equation then becomes a “simple” one-dimensional
second-order differential equation
1
2
d
2
dr
2
1
r
d
dr
+
l(l +1)
2r
2
+ v
KS
(r)
R
nl
(r)=ε
nl
R
nl
(r) , (6.16)
that can be transformed into two coupled first-order differential equations
df
nl
(r)
dr
= g
nl
(r)
dg
nl
(r)
dr
+
2
r
g
nl
(r)
l(l +1)
r
2
f
nl
(r)+2{ε
nl
v
KS
(r)}f
nl
(r)=0,
(6.17)
where f
nl
(r) R
nl
(r).
When r →∞, the coupled equations become
df
nl
(r)
dr
= g
nl
(r)
dg
nl
(r)
dr
+2ε
nl
f
nl
(r) 0 ,
(6.18)
provided that the Kohn-Sham potential goes to zero at large distances from
the atom (which it does, see Fig. 6.6). This indicates that the solutions of
(6.17) should behave asymptotically as
f
nl
(r)
r→∞
−→ e
2ε
nl
r
(6.19)
g
nl
(r)
r→∞
−→
2ε
nl
f
nl
(r) .
4
Although the assumption of a spherically symmetric potential (density) is only
strictly valid in a closed shell system, the true many-body potential is indeed
spherically symmetric. For open shell systems this assumption implies an identical
filling of all degenerate atomic orbitals.
6 A Tutorial on Density Functional Theory 225
At the origin (r 0) the solutions are of the form
f
nl
(r)
r0
−→ Ar
α
(6.20)
g
nl
(r)
r0
−→ Br
β
.
Substituting (6.20) into (6.17) gives B = lA, α = l, and β = l 1.
For a fixed ε
nl
and A it is a simple task to integrate (6.17) from r =0to
using (6.20) to provide the initial values. However, if ε
nl
is not an eigenvalue
of (6.16), the solution will diverge (i.e., it will not obey boundary conditions
at infinity (6.19)). Fortunately, there is a simple procedure to obtain the
ε
nl
that yield solutions with the correct asymptotic behavior. The technique
involves integrating (6.20) from r = 0 to a conveniently chosen point r
m
(e.g.,
the classical turning point), and at the same time integrating (6.20) starting
from a point very far away (“practical infinity”, r
)tor
m
. From the two
values of f
nl
(r
m
) and g
nl
(r
m
) obtained in this way, it is then possible to
improve our estimate of ε
nl
.
The technique for simultaneously finding the eigenvalues ε
nl
and the wave-
functions proceeds as follows:
i) Choose an arbitrary value for ε
nl
and f
nl
(r
);
ii) Calculate g
nl
(r
) using the boundary conditions (6.19);
iii) Integrate (6.17) from r
to r
m
(to get f
in
nl
(r) and g
in
nl
(r));
iv) Choose an arbitrary value for A, calculate B = lA, and use the boundary
conditions (6.20) to get f
nl
(0) and g
nl
(0);
v) Integrate (6.17) from 0 to r
m
(to get f
out
nl
(r) and g
out
nl
(r));
vi) Calculate γ = g
in
nl
(r
m
)/g
out
nl
(r
m
) and scale f
out
nl
(r) and g
out
nl
(r) by this factor
–nowg
nl
(r) is continuous at the matching point (˜g
out
nl
(r
m
) γg
out
nl
(r
m
)=
g
in
nl
(r
m
)) but f
nl
(r) is not;
vii) Compute δ(ε
nl
)=f
out
nl
(r
m
) f
in
nl
(r
m
): The zeros of this function are the
eigenvalues, so one can find them using, e.g., the bisection method (one
has to provide an educated guess for the minimum and maximum value of
the eigenvalues).
6.2.3 Plane-Waves
To calculate the total energy of solids, a plane-wave expansion of the Kohn-
Sham wave-functions is very useful, as it takes advantage of the periodicity of
the crystal [14,15,16]. For finite systems, such as atoms, molecules and clus-
ters, plane-waves can also be used in a super-cell approach
5
. In this method,
5
The super-cell technique is restricted in its usual form to neutral systems due
to the long-range interaction between a charged cluster and its periodic images:
the Coulomb energy for charged periodic systems diverges and must be removed.
Some common methods used to circumvent this difficulty are: i) To introduce a
compensating jellium background that neutralizes the super-cell [17]; ii) To use
a cutoff in the Coulomb interaction [18]; iii) To shield each charged cluster with
a spherical shell having a symmetric charge which neutralizes the super-cell and
cancels the electric dipole of the charged cluster [19].
226 Fernando Nogueira, Alberto Castro, and Miguel A.L. Marques
the finite system is placed in a unit cell of a fictitious crystal, and this cell
is made large enough to avoid interactions between neighboring cells. The
Kohn-Sham equations can then be solved, for any system, in momentum
space. However, for finite systems a very large number of plane-waves is
needed as the electronic density is concentrated on a small fraction of the
total volume of the super-cell.
The valence wave-functions of the large Z atoms oscillate strongly in the
vicinity of the atomic core due to the orthogonalization to the inner electronic
wave-functions. To describe these oscillations a large number of plane-waves
is required, difficulting the calculation of the total energy. However, the inner
electrons are almost inert and are not significantly involved in bonding. This
suggests the description of an atom based solely on its valence electrons,
which feel an effective potential including both the nuclear attraction and
the repulsion of the inner electrons. This approximation, the pseudo-potential
approximation, will be presented in more detail in Sect. 6.3.1.
When using the pseudo-potential approximation, the external potential,
v
ext
, is simply the sum of the pseudo-potentials of all the atoms in the system.
If atom α is located in the unit cell at τ
α
and its pseudo-potential is w
α
(r, r
),
the external potential is
w(r, r
)=
j,α
w
α
(r R
j
τ
α
, r
R
j
τ
α
) , (6.21)
where R
j
are the lattice vectors. The pseudo-potential is considered in its
more general non-local form, which implies that the second term of the right-
hand side of (6.11) is rewritten as
d
3
rv
ext
(r)n(r) −→
N
i=1
d
3
r
d
3
r
ϕ
i
(r)w(r, r
)ϕ
i
(r
) . (6.22)
According to Bloch’s theorem, the Kohn-Sham wave-functions, ϕ
k,n
(r),
can be written as
ϕ
k,n
(r)=e
ik·r
G
c
k,n
(G)e
iG·r
, (6.23)
where k is the wave vector, n the band index, and G are the reciprocal lattice
vectors. The Kohn-Sham energies are ε
k,n
, and the electronic density is
n(r)=
k,n
G,G
f(ε
k,n
)c
k,n
(G
)c
k,n
(G)e
i(GG
)·r
, (6.24)
where the f(ε
k,n
) denote the occupation numbers. The Fourier transform of
the density is
n(G)=
k,n
G
f(ε
k,n
)c
k,n
(G
G)c
k,n
(G
) . (6.25)
6 A Tutorial on Density Functional Theory 227
The sums over k are performed over all Brillouin zone vectors, but can be
reduced to sums on the irreducible Brillouin zone by taking advantage of the
space group of the lattice
6
.
There are thus two convergence parameters that need to be fine-tuned for
every calculation: the Brillouin zone sampling and a cutoff radius in reciprocal
space to truncate the sums over reciprocal lattice vectors (we cannot perform
infinite summations!)
The kinetic energy is rewritten as
T =
1
2
k,n
G
f(ε
k,n
) |c
k,n
(G)|
2
|k + G|
2
, (6.26)
and the Hartree energy is given by
E
Hartree
=
2
G
v
Hartree
(G)n(G) , (6.27)
where is the unit cell volume and the Hartree potential, v
Hartree
(G), is
obtained using Poisson’s equation
v
Hartree
(G)=4π
n(G)
G
2
. (6.28)
The electron-ion interaction energy, (6.22), is given by
E
ei
=
k,n
G,G
f(ε
k,n
)c
k,n
(G)c
k,n
(G
)w(k + G, k + G
) , (6.29)
and the Fourier transform of the total pseudo-potential is
w(k + G, k + G
)=
α
w
α
(k + G, k + G
)e
i(GG
)·τ
α
. (6.30)
The Fourier transform of the individual pseudo-potentials, v
α
(k, k
), can be
written in a simple form if the separable Kleinmnan and Bylander form is
used (see Sect. 6.3.8).
Both E
ei
(due to the local part of the pseudo-potential) and the Hartree
potential diverge at G = 0. The ion-ion interaction energy, E
nn
, also diverges.
However, the sum of these three divergent terms is a constant, if the system
is electrically neutral. This constant is [14,15,16]
lim
G,G
0
k,n
f(ε
k,n
)c
k,n
(G)c
k,n
(G
)w(k + G, k + G
)+
+
2
v
Hartree
(G)n(G)
+ E
nn
= E
rep
+ E
Ewald
, (6.31)
6
To further simplify these sums, it is possible to do a smart sampling of the
irreducible Brillouin zone, including in the sums only some special k vec-
tors [20,21,22,23].
228 Fernando Nogueira, Alberto Castro, and Miguel A.L. Marques
where
E
rep
= Z
total
1
α
Λ
α
(6.32)
and
Λ
α
=
1
d
3
r
v
α,local
(r)+
Z
α
r
. (6.33)
In these expressions Z
α
is the electric charge of ion α, and v
α,local
(r)isthe
local part of the pseudo-potential of atom α (equations (6.74) and (6.75)).
The non-divergent part of the ion-ion interaction energy, E
Ewald
, is calculated
using a trick due to Ewald [24]. One separates it in two parts, one short-ranged
that is summed in real space, and a long-range part that is treated in Fourier
space. By performing this splitting, one transforms a slowly convergent sum
into two rapidly convergent sums
E
Ewald
=
1
2
α,α
Z
α
Γ
α,α
Z
α
, (6.34)
with the definition
Γ
α,α
=
4π
G=0
cos [G · (τ
α
τ
α
)]
G
2
e
G
2
4η
2
+
+
j
erfc (η |R
j
+ τ
α
τ
α
|)
|R
j
+ τ
α
τ
α
|
π
η
2
2η
π
δ
αα
. (6.35)
(erfc(x) is the complimentary error function.) Note that this term has only
to be evaluated once at the beginning of the self-consistency cycle, for it does
not depend on the density. The parameter η is arbitrary, and is chosen such
that the two sums converge quickly.
In momentum space, the total energy is then
E
tot
= T + E
Hartree
+ E
ei
+ E
xc
+ E
Ewald
+ E
rep
, (6.36)
with the terms G, G
= 0 excluded from the Hartree and pseudo-potential
contributions. Finally, the Kohn-Sham equations become
G
ˆ
H
G,G
(k)c
k,n
(G
)=ε
k,n
c
k,n
(G) , (6.37)
where
ˆ
H
G,G
(k)=
1
2
|k + G|
2
δ
G,G
+
+ w(k + G, k + G
)+v
Hartree
(G G
)+v
xc
(G G
) , (6.38)
and are solved by diagonalizing the Hamiltonian.
6 A Tutorial on Density Functional Theory 229
6.2.4 Real-Space
In this scheme, functions are not expanded in a basis set, but sampled in
a real-space mesh [25]. This mesh is commonly chosen to be uniform (the
points are equally spaced in a cubic lattice), although other options are pos-
sible. Convergence of the results has obviously to be checked against the grid
spacing. One big advantage of this approach is that the potential operator
is diagonal. The Laplacian operator entering the kinetic energy is discretized
at the grid points r
i
using a finite order rule,
2
ϕ(r
i
)=
j
c
j
ϕ(r
j
) . (6.39)
For example, the lowest order rule in one dimension, the three point rule
reads
d
2
dr
2
ϕ(r)
r
i
=
1
4
[ϕ(r
i1
) 2ϕ(r
i
)+ϕ(r
i+1
)] . (6.40)
Normally, one usesa7or9-pointrule.
Another important detail is the evaluation of the Hartree potential. It
cannot be efficiently obtained by direct integration of (6.6). There are however
several other options: (i) solving Poisson’s equation, (6.7), in Fourier space
as in the plane-wave method; (ii) recasting (6.7) into a minimization problem
and applying, e.g., a conjugate gradients technique; (iii) using multi-grid
methods [25,26,27]. The last of the three is considered to be the most efficient
technique.
In our opinion, the main advantage of real-space methods is the simplic-
ity and intuitiveness of the whole procedure. First of all, quantities like the
density or the wave-functions are very simple to visualize in real space. Fur-
thermore, the method is fairly simple to implement numerically for 1-, 2-,
or 3-dimensional systems, and for a variety of different boundary conditions.
For example, one can study a finite system, a molecule, or a cluster without
the need of a super-cell, simply by imposing that the wave-functions are zero
at a surface far enough from the system. In the same way, an infinite system,
a polymer, a surface, or bulk material can be studied by imposing the appro-
priate cyclic boundary conditions. Note also that in the real-space method
there is only one convergence parameter, namely the grid-spacing.
Unfortunately, real-space methods suffer from a few drawbacks. For ex-
ample, most of the real-space implementations are not variational, i.e., we
may find a total energy lower than the true energy, and if we reduce the grid-
spacing the energy can actually increase. Moreover, the grid breaks transla-
tional symmetry, and can also break other symmetries that the system may
possess. This can lead to the artificial lifting of some degeneracies, to the
appearance of spurious peaks in spectra, etc. Of course all these problems
can be minimized by reducing the grid-spacing.
230 Fernando Nogueira, Alberto Castro, and Miguel A.L. Marques
6.3 Pseudo-potentials
6.3.1 The Pseudo-potential Concept
The many-electron Schr¨odinger equation can be very much simplified if elec-
trons are divided in two groups: valence electrons and inner core electrons.
The electrons in the inner shells are strongly bound and do not play a sig-
nificant role in the chemical binding of atoms, thus forming with the nucleus
an (almost) inert core. Binding properties are almost completely due to the
valence electrons, especially in metals and semiconductors.
This separation suggests that inner electrons can be ignored in a large
number of cases, thereby reducing the atom to a ionic core that interacts
with the valence electrons. The use of an effective interaction, a pseudo-
potential, that approximates the potential felt by the valence electrons, was
first proposed by Fermi in 1934 [28]. Hellmann in 1935 [29] suggested that
the form
w(r)=
1
r
+
2.74
r
e
1.16r
(6.41)
could represent the potential felt by the valence electron of potassium. In
spite of the simplification pseudo-potentials introduce in calculations, they
remained forgotten until the late 50’s. It was only in 1959, with Phillips and
Kleinman [30,31,32], that pseudo-potentials began to be extensively used.
Let the exact solutions of the Schr¨odinger equation for the inner electrons
be denoted by |ψ
c
, and |ψ
v
those for the valence electrons. Then
ˆ
H|ψ
n
= E
n
|ψ
n
, (6.42)
with n = c, v. The valence orbitals can be written as the sum of a smooth
function (called the pseudo wave-function), |ϕ
v
, with an oscillating function
that results from the orthogonalization of the valence to the inner core orbitals
|ψ
v
= |ϕ
v
+
c
α
cv
|ψ
c
, (6.43)
where
α
cv
= −ψ
c
|ϕ
v
. (6.44)
The Schr¨odinger equation for the smooth orbital |ϕ
v
leads to
ˆ
H|ϕ
v
= E
v
|ϕ
v
+
c
(E
c
E
v
)|ψ
c
ψ
c
|ϕ
v
. (6.45)
This equation indicates that states |ϕ
v
satisfy a Schr¨odinger-like equation
with an energy-dependent pseudo-Hamiltonian
ˆ
H
PK
(E)=
ˆ
H
c
(E
c
E)|ψ
c
ψ
c
| . (6.46)
6 A Tutorial on Density Functional Theory 231
It is then possible to identify
ˆw
PK
(E)=ˆv
c
(E
c
E)|ψ
c
ψ
c
| , (6.47)
where ˆv is the true potential, as the effective potential in which valence
electrons move. However, this pseudo-potential is non-local and depends on
the eigen-energy of the electronic state one wishes to find.
At a certain distance from the ionic core ˆw
PK
becomes ˆv due to the decay
of the core orbitals. In the region near the core, the orthogonalization of the
valence orbitals to the strongly oscillating core orbitals forces valence elec-
trons to have a high kinetic energy (The kinetic energy density is essentially a
measure of the curvature of the wave-function.) The valence electrons feel an
effective potential which is the result of the screening of the nuclear potential
by the core electrons, the Pauli repulsion and xc effects between the valence
and core electrons. The second term of (6.47) represents then a repulsive po-
tential, making the pseudo-potential much weaker than the true potential in
the vicinity of the core. All this implies that the pseudo wave-functions will
be smooth and will not oscillate in the core region, as desired.
A consequence of the cancellation between the two terms of (6.47) is
the surprisingly good description of the electronic structure of solids given
by the nearly-free electron approximation. The fact that many metal and
semiconductor band structures are a small distortion of the free electron gas
band structure suggests that the valence electrons do indeed feel a weak
potential. The Phillips and Kleinman potential explains the reason for this
cancellation.
The original pseudo-potential from Hellmann (6.41) can be seen as an
approximation to the Phillips and Kleinman form, as in the limit r →∞the
last term can be approximated as Ae
r/R
, where R is a parameter measuring
the core orbitals decay length.
The Phillips and Kleinman potential was later generalized [33,34] to
ˆw v +
c
|ψ
c
ξ
c
| , (6.48)
where ξ
c
is some set of functions.
The pseudo-potential can be cast into the form
w(r, r
)=
l
l
m=l
Y
lm
r)w
l
(r, r
)Y
lm
r
) , (6.49)
where Y
lm
are the spherical harmonics. This expression emphasizes the fact
that w as a function of r and r
depends on the angular momentum. The most
usual forms for w
l
(r, r
) are the separable Kleinman and Bylander form [35]
w
l
(r, r
)=v
l
(r)v
l
(r
) , (6.50)
232 Fernando Nogueira, Alberto Castro, and Miguel A.L. Marques
and the semi-local form
w
l
(r, r
)=w
l
(r)δ(r r
) . (6.51)
6.3.2 Empirical Pseudo-potentials
Until the late 70’s the method employed to construct a pseudo-potential
was based on the Phillips and Kleinman cancellation idea. A model analytic
potential was constructed and its parameters were fitted to experimental
data. However, these models did not obey condition (6.43).
One of the most popular model potentials was introduced by Heine and
Abarenkov in 1964 [36,37,38]. The Heine-Abarenkov potential is
w
HA
(r)=
z/r ,ifr>R
A
l
ˆ
P
l
,ifr R,
(6.52)
with
ˆ
P
l
an angular momentum projection operator. The parameters A
l
were
adjusted to the excitation energies of valence electrons and the parameter
R is chosen, for example, to make A
0
and A
1
similar (leading to a local
pseudo-potential for the simple metals).
A simplification of the Heine-Abarenkov potential was proposed in 1966
by Ashcroft [39,40]
w
A
(r)=
z/r ,ifr>R
0,ifr R.
(6.53)
In this model potential it is assumed that the cancellation inside the core is
perfect, i.e., that the kinetic term cancels exactly the Coulomb potential for
r<R. To adjust R, Ashcroft used data on the Fermi surface and on liquid
phase transport properties.
The above mentioned and many other model potentials are discontinuous
at the core radius. This discontinuity leads to long-range oscillations of their
Fourier transforms, hindering their use in plane-wave calculations. A recently
proposed model pseudo-potential overcomes this difficulty: the evanescent
core potential of Fiolhais et al. [41]
w
EC
(r)=
z
R
1
x
1 (1 + βx) exp
αx
A exp
x
, (6.54)
with x = r/R, where R is a decay length and α>0. Smoothness of the
potential and the rapid decay of its Fourier transform are guaranteed by
imposing that the first and third derivatives are zero at r = 0, leaving only two
parameters to be fitted (α and R). These are chosen by imposing one of several
conditions [41,42,43,44,45,46]: total energy of the solid is minimized at the
observed electron density; the average interstitial electron density matches
the all-electron result; the bulk moduli match the experimental results; etc.
6 A Tutorial on Density Functional Theory 233
Although not always bringing great advances, several other model poten-
tials were proposed [47,48,49]. Also, many different methods for adjusting
the parameters were suggested [50]. The main application of these model
potentials was to the theory of metallic cohesion [51,52,53,54,55].
6.3.3 Ab-initio Pseudo-potentials
A crucial step toward more realistic pseudo-potentials was given by Topp
and Hopfield [49,56], who suggested that the pseudo-potential should be ad-
justed such that they describe the valence charge density accurately. Based
on that idea, modern pseudo-potentials are obtained inverting the free atom
Schr¨odinger equation for a given reference electronic configuration [57], and
forcing the pseudo wave-functions to coincide with the true valence wave-
functions beyond a certain distance r
l
. The pseudo wave-functions are also
forced to have the same norm as the true valence wave-functions.
These conditions can be written as
R
PP
l
(r)=R
AE
nl
(r),ifr>r
l
r
l
0
dr
R
PP
l
(r)
2
r
2
=
r
l
0
dr
R
AE
nl
(r)
2
r
2
,ifr<r
l
,
(6.55)
where R
l
(r) is the radial part of the wave-function with angular momentum l,
and PP and AE denote, respectively, the pseudo wave-function and the true
(all-electron) wave-function. The index n in the true wave-functions denotes
the valence level. The distance beyond which the true and the pseudo wave-
functions are equal, r
l
, is also l-dependent.
Besides (6.55), there are still two other conditions imposed on the pseudo-
potential: the pseudo wave-functions should not have nodal surfaces and the
pseudo energy-eigenvalues should match the true valence eigenvalues, i.e.,
ε
PP
l
= ε
AE
nl
. (6.56)
The potentials thus constructed are called norm-conserving pseudo-poten-
tials, and are semi-local potentials that depend on the energies of the reference
electronic levels, ε
AE
l
.
In summary, to obtain the pseudo-potential the procedure is: i) The free
atom Kohn-Sham radial equations are solved taking into account all the
electrons, in some given reference configuration
1
2
d
2
dr
2
+
l(l +1)
2r
2
+ v
AE
KS
n
AE
(r)
rR
AE
nl
(r)=ε
AE
nl
rR
AE
nl
(r) , (6.57)
where a spherical approximation to Hartree and exchange and correlation
potentials is assumed and relativistic effects are not considered. The Kohn-
Sham potential, v
AE
KS
, is given by
v
AE
KS
n
AE
(r)=
Z
r
+ v
Hartree
n
AE
(r)+v
xc
n
AE
(r) . (6.58)
234 Fernando Nogueira, Alberto Castro, and Miguel A.L. Marques
ii) Using norm-conservation (6.55), the pseudo wave-functions are deter-
mined. Their shape in the region r<r
l
needs to be previously defined, and
it is here that many modern potentials differ from one another. iii) Knowing
the pseudo wave-function, the pseudo-potential results from the inversion of
the radial Kohn-Sham equation for the pseudo wave-function and the valence
electronic density
w
l,scr
(r)=ε
PP
l
l(l +1)
2r
2
+
1
2rR
PP
l
(r)
d
2
dr
2
rR
PP
l
(r)
. (6.59)
The resulting pseudo-potential, w
l,scr
, still includes screening effects due to
the valence electrons that have to be subtracted to yield
w
l
(r)=w
l,scr
(r) v
Hartree
n
PP
(r) v
xc
n
PP
(r) . (6.60)
The cutoff radii, r
l
, are not adjustable pseudo-potential parameters. The
choice of a given set of cutoff radii establishes only the region where the
pseudo and true wave-functions coincide. Therefore, the cutoff radii can be
considered as a measure of the quality of the pseudo-potential. Their smallest
possible value is determined by the location of the outermost nodal surface of
the true wave-functions. For cutoff radii close to this minimum, the pseudo-
potential is very realistic, but also very strong. If very large cutoff radii are
chosen, the pseudo-potentials will be smooth and almost angular momentum
independent, but also very unrealistic. A smooth potential leads to a fast
convergence of plane-wave basis calculations [58]. The choice of the ideal
cutoff radii is then the result of a balance between basis-set size and pseudo-
potential accuracy.
6.3.4 Hamann Potential
One of the most used parameterizations for the pseudo wave-functions is
the one proposed in 1979 by Hamann, Schl¨uter, and Chiang [59] and later
improved by Bachelet, Hamann and Schl¨uter [60] and Hamann [61].
The method proposed consists of using an intermediate pseudo-potential,
¯w
l
(r), given by
¯w
l
(r)+v
Hartree
n
PP
(r)+v
xc
n
PP
(r)=
= v
AE
KS
n
AE
(r)
1 f
r
r
l

+ c
l
f
r
r
l
, (6.61)
where f (x)=e
x
λ
, and λ =4.0 [59] or λ =3.5 [60,61]. The Kohn-Sham
equations are solved using this pseudo-potential, and the constants c
l
are
adjusted in order to obey (6.56). Notice that the form of the wave-functions
implies that (6.55) is verified for some ˜r
l
>r
l
. As the two effective potentials
are identical for r>˜r
l
, and given the fast decay of f(x), the intermediate
6 A Tutorial on Density Functional Theory 235
1.00 2.00 3.00 4.00
r (bohr)
-0.40
0.00
0.40
0.80
rR(r)
True wave function (l=0)
True wave function (l=1)
True wave function (l=2)
Pseudo wave function (l=0)
Pseudo wave function (l=1)
Pseudo wave function (l=2)
0.00 1.00 2.00 3.00
r (bohr)
-2.00
-1.50
-1.00
-0.50
0.00
0.50
V
l
(r) (hartree)
Pseudopotential (l=0)
Pseudopotential (l=1)
Pseudopotential (l=2)
-z/r
Fig. 6.2. Hamann pseudo-potential for Al, with r
0
=1.24, r
1
=1.54, and
r
2
=1.40 bohr: pseudo wave-functions vs. true wave-functions (left) and pseudo-
potentials (right)
pseudo wave-functions,
¯
R
l
(r), coincide, up to a constant, with the true wave-
functions in that region.
In the method proposed by Hamann [61], the parameters c
l
are adjusted
so that
d
dr
ln
rR
AE
nl
(r)
rr
l
=
d
dr
ln
r
¯
R
l
(r)
rr
l
. (6.62)
This way, the method is not restricted to bound states.
To impose norm-conservation, the final pseudo wave-functions, R
PP
l
(r),
are defined as a correction to the intermediate wave-functions
R
PP
l
(r)=γ
l
¯
R
l
(r)+δ
l
g
l
(r)
, (6.63)
where γ
l
is the ratio R
AE
nl
(r)/
¯
R
l
(r) in the region where r>˜r
l
and g
l
(r)=
r
l+1
f(r/r
l
). The constants δ
l
are adjusted to conserve the norm.
Figure 6.2 shows the Hamann pseudo-potential for Al, with r
0
=1.24,
r
1
=1.54 and r
2
=1.40 bohr. Note that the true and the pseudo wave-
functions do not coincide at r
l
this only happens at r>˜r
l
.
6.3.5 Troullier–Martins Potential
A different method to construct the pseudo wave-functions was proposed by
Troullier and Martins [58,62], based on earlier work by Kerker [63]. This
method is much simpler than Hamann’s and emphasizes the desired smooth-
ness of the pseudo-potential (although it introduces additional constraints to
obtain it). It achieves softer pseudo-potentials for the 2p valence states of the
first row elements and for the d valence states of the transition metals. For
other elements both methods produce equivalent potentials.
The pseudo wave-functions are defined as
R
PP
l
(r)=
R
AE
nl
(r),ifr>r
l
r
l
e
p(r)
,ifr<r
l
,
(6.64)
236 Fernando Nogueira, Alberto Castro, and Miguel A.L. Marques
1.00 2.00 3.00 4.00
r (bohr)
-0.40
-0.20
0.00
0.20
0.40
0.60
rR(r)
True wave function (l=0)
True wave function (l=1)
Pseudo wave function (l=0)
Pseudo wave function (l=1)
0.00 1.00 2.00 3.00
r (bohr)
-3.00
-2.00
-1.00
0.00
V
l
(r) (hartree)
Pseudopotential (l=0)
Pseudopotential (l=1)
Pseudopotential (l=2)
-z/r
Fig. 6.3. Troullier-Martins pseudo-potential for Al, with r
0
= r
1
= r
2
=2.60 bohr:
pseudo wave-functions vs. true wave-functions (left) and pseudo-potentials (right)
with
p(r)=c
0
+ c
2
r
2
+ c
4
r
4
+ c
6
r
6
+ c
8
r
8
+ c
10
r
10
+ c
12
r
12
. (6.65)
The coefficients of p(r) are adjusted by imposing norm-conservation, the con-
tinuity of the pseudo wave-functions and their first four derivatives at r = r
l
,
and that the screened pseudo-potential has zero curvature at the origin. This
last condition implies that
c
2
2
+ c
4
(2l +5)=0, (6.66)
and is the origin of the enhanced smoothness of the Troullier and Martins
pseudo-potentials.
Figure 6.3 shows the Troullier and Martins pseudo-potential for Al, with
r
0
= r
1
= r
2
=2.60 bohr. The 3d wave-functions are not shown since the
state is unbound for this potential.
There are many other not so widely used norm-conserving pseudo-po-
tentials [64,65,66,67,68]. Note that, in some cases, norm-conservation was
abandoned in favor of increased pseudo-potential smoothness [69].
6.3.6 Non-local Core Corrections
It is tempting to assume that the Kohn-Sham potential depends linearly on
the density, so that the unscreening of the pseudo-potential can be performed
as in (6.60). Unfortunately, even though the Hartree contribution is indeed
linearly dependent on the density, the xc term is not
v
xc
n
AE
(r) v
xc
n
core
+ n
PP
(r) (6.67)
= v
xc
[n
core
](r)+v
xc
n
PP
(r) .
In some cases, like the alkali metals, the use of a nonlinear core-valence xc
scheme may be necessary to obtain a transferable pseudo-potential. In these
6 A Tutorial on Density Functional Theory 237
cases, the unscreened potential is redefined as
w
l
(r)=w
l,scr
(r) v
Hartree
n
PP
(r) v
xc
˜n
core
+ n
PP
(r) , (6.68)
and the core density is supplied together with the pseudo-potential. In a code
that uses pseudo-potentials, one has simply to add the valence density to the
given atomic core density to obtain the xc potential. To avoid spoiling the
smoothness of the potential with a rugged core density, usually a partial core
density [70,71], ˜n
core
, is built and supplied instead of the true core density
˜n
core
(r)=
n
core
(r) for r r
nlc
P (r) for r<r
nlc
. (6.69)
The polynomial P (r) decays monotonically and has vanishing first and second
derivatives at the origin. At r
nlc
it joins smoothly the true core density (it is
continuous up to the third derivative). The core cutoff radius, r
nlc
, is typically
chosen to be the point where the true atomic core density becomes smaller
that the atomic valence density. It can be chosen to be larger than this value
but if it is too large the description of the non-linearities may suffer. Note
that, as the word partial suggests,
r
nlc
0
dr ˜n
core
(r) r
2
<
r
nlc
0
drn
core
(r) r
2
. (6.70)
These corrections are more important for the alkali metals and other
elements with few valence electrons and core orbitals extending into the tail
of the valence density (e.g., Zn and Cd).
In some cases, the use of the generalized gradient approximation (GGA)
for exchange and correlation leads to the appearance of very short-ranged
oscillations in the pseudo-potentials (see Fig. 6.4). These oscillations are ar-
tifacts of the GGA that usually disappear when non-local core corrections
are considered. Nevertheless, they do not pose a real threat for plane-wave
calculations, since they are mostly filtered out by the energy cutoff.
6.3.7 Pseudo-potential Transferability
A useful pseudo-potential needs to be transferable, i.e., it needs to describe
accurately the behavior of the valence electrons in several different chemical
environments. The logarithmic derivative of the pseudo wave-function deter-
mines the scattering properties of the pseudo-potential. Norm-conservation
forces these logarithmic derivatives to coincide with those of the true wave-
functions for r>r
l
. In order for the pseudo-potential to be transferable, this
equality should hold at all relevant energies, and not only at the energy, ε
l
,
for which the pseudo-potential was adjusted. Norm-conservation assures that
this is fulfilled for the nearby energies, as [49,72]
d
dε
l
d
dr
ln R
l
(r)
r=R
=
2
r
2
R
2
l
(r)
R
0
dr |R
l
(r)|
2
r
2
. (6.71)
238 Fernando Nogueira, Alberto Castro, and Miguel A.L. Marques
0.50
1.00
1.50
2.00
r (bohr)
-30
-20
-10
0
V
l
(r) (hartree)
LDA
GGA
l=0
l=1
l=2
Fig. 6.4. Troullier-Martins pseudo-potential for Cu, with r
0
= r
2
=2.2 and r
1
=
2.4 bohr. Notice that the LDA and GGA pseudo-potential are essentially identical,
the main difference being the GGA potential oscillations near the origin
It is however necessary to take into account that the environment sur-
rounding the electrons can be different from the one in the reference situation.
Thus, although the pseudo-potential remains the same, the effective potential
changes (the Hartree and xc potentials depend on the density). Therefore,
the logarithmic derivative is not an absolute test of the transferability of a
pseudo-potential [73]. The ideal method to assess the transferability of a po-
tential consists in testing it in diverse chemical environments. The most usual
way of doing this is to test its transferability to other atomic configurations
and even to the ionized configurations. The variation of the total energy of
the free atom with the occupancy of the valence orbitals is another test of
transferability [74]. As the potential is generated for a given reference elec-
tronic configuration, it can be useful to choose the configuration that best
resembles the system of interest [61]. However, the potential does not (should
not) depend too much on the reference configuration.
6.3.8 Kleinman and Bylander Form of the Pseudo-potential
The semi-local form of the pseudo-potentials described above leads to a com-
plicated evaluation of their action on a wave-function
r | ˆw|Ψ =
d
3
r
w(r, r
)Ψ(r
)=
=
l
l
m=l
Y
lm
r)w
l
(r)
d
3
r
δ(r r
)Y
lm
r
)Ψ(r
) . (6.72)
Unfortunately, the last integral must be calculated for each r. In a plane-wave
expansion, this involves the product of an N
PW
×N
PW
matrix with the vector
6 A Tutorial on Density Functional Theory 239
representing the wave-function. This operation is of order N
PW
×N
PW
, and
N
PW
, the number of plane-waves in the basis set, can be very large.
The semi-local potential can be rewritten in a form that separates long and
short range components. The long range component is local, and corresponds
to the Coulomb tail. Choosing an arbitrary angular momentum component
(usually the most repulsive one) and defining
∆w
l
(r)=w
l
(r) w
local
(r) . (6.73)
the pseudo-potential can be written as
w(r, r
)=w
local
(r)+
l
∆w
l
(r)
l
m=l
Y
lm
r
)Y
lm
r)δ(r r
) . (6.74)
Kleinman and Bylander [35] suggested that the non-local part of (6.74) are
written as a separable potential, thus transforming the semi-local potential
into a truly non-local pseudo-potential. If ϕ
lm
(r)=R
PP
l
(r)Y
lm
r) denotes
the pseudo wave-functions obtained with the semi-local pseudo-potential, the
Kleinman and Bylander (KB) form is given by
w
KB
(r, r
)=w
local
(r)+
l
∆w
KB
l
(r, r
)=
= w
local
(r)+
l
l
m=l
ϕ
lm
(r)∆w
l
(r)∆w
l
(r
)ϕ
lm
(r
)
d
3
r∆w
l
(r) |ϕ
lm
(r)|
2
, (6.75)
which is, in fact, easier to apply than the semi-local expression.
The KB separable form has, however, some disadvantages, leading some-
times to solutions with nodal surfaces that are lower in energy than solutions
with no nodes [75,76]. These (ghost) states are an artifact of the KB proce-
dure. To eliminate them one can use a different component of the pseudo-
potential as the local part of the KB form or choose a different set of core radii
for the pseudo-potential generation. As a rule of thumb, the local component
of the KB form should be the most repulsive pseudo-potential component.
For example, for the Cu potential of Fig. 6.4, the choice of l = 2 as the local
component leads to a ghost state, but choosing instead l = 0 remedies the
problem.
6.4 Atomic Calculations
As our first example we will present several atomic calculations. These sim-
ple systems will allow us to gain a fist impression of the capabilities and
limitations of DFT. To solve the Kohn-Sham equations we used the code of
J. L. Martins [77]. The results are then compared to Hartree-Fock calculations
performed with GAMESS [78]. As an approximation to the xc potential, we
240 Fernando Nogueira, Alberto Castro, and Miguel A.L. Marques
Table 6.1. Ionization potentials calculated either by taking the difference of to-
tal energies between the neutral and the singly ionized atom (diff.), or from the
eigenvalue of the highest occupied orbital (HOMO). We note that in the case of
Hartree-Fock, ε
HOMO
is only an approximation to the ionization potential
LDA GGA Hartree-Fock
atom diff. ε
HOMO
diff. ε
HOMO
diff. ε
HOMO
expt.
H 0.479 0.269 0.500 0.279 0.500 0.500 0.500
Ar 0.586 0.382 0.581 0.378 0.543 0.590 0.579
Hg 0.325 0.205 0.311 0.194 0.306 0.320 0.384
Hg (rel) 0.405 0.261 0.391 0.249 0.320 0.384
took the LDA, in the parameterization of Perdew and Zunger [6], and one
GGA, flavor Perdew, Becke and Ernzerhof [79]. Furthermore, all calculations
were done within the spin-polarized version of DFT.
The simplest atom one can study is hydrogen. As hydrogen has only one
electron, its ground-state can be obtained analytically. One could expect that
DFT yields precise results for such a trivial case. Surprisingly this is not true
for several of the functionals currently in use, such as the LDA or most of the
GGAs. In Table 6.1 we present calculations of the ionization potential (IP)
for hydrogen. We note that in Kohn-Sham theory there are at least two
ways to determine this quantity: (i) The eigenvalue of the highest occupied
Kohn-Sham state is equal to minus the ionization potential, IP = ε
HOMO
;
(ii) By using the definition of the IP as the difference of total energies, IP =
E(X
+
)E(X), where X is the atomic species. Even though the IPs calculated
from (ii) come out fairly well for both LDA and GGA (the GGA are, in fact,
slightly better), the ε
HOMO
are far too small, almost by a factor of two.
On the other hand, Hartree-Fock is exact for this one-electron problem. To
explain this discrepancy we have to take a closer look at the xc potential. As
hydrogen has only one electron, the Kohn-Sham potential has to reduce to
the external potential, 1/r. This implies that the xc for hydrogen is simply
v
xc
(r)=v
Hartree
(r). More precisely, it is the exchange potential that cancels
the Hartree potential, while the correlation is zero. In the LDA and the GGA,
neither of these conditions is satisfied. It is, however, possible to solve the
hydrogen problem exactly within DFT by using some more sophisticated
xc potentials, like the exact exchange [80], or the self-interaction corrected
LDA [6] functionals.
Our first many-electron example is argon. Argon is a noble gas with the
closed shell configuration 1s
2
2s
2
2p
6
3s
2
3p
6
, so its ground-state is spherical.
In Fig. 6.5 we plot the electron density for this atom as a function of the dis-
tance to the nucleus. The function n(r) decays monotonically, with very little
structure, and is therefore not a very elucidative quantity to behold. However,
if we choose to represent r
2
n(r), we can clearly identify the shell structure
of the atom: Three maxima, corresponding to the center of the three shells,
6 A Tutorial on Density Functional Theory 241
0.001 0.01 0.1 1
r (bohr)
0.2
0.4
0.6
0.8
1
4π r
2
n(r)/N
Ar (GGA)
Hg (GGA)
Hg (Rel. GGA)
Fig. 6.5. Radial electronic density of the argon and mercury atoms versus the
distance to the nucleus. Both the solid and dashed curves were obtained using the
GGA to approximate the xc potential. For comparison the density resulting from a
relativistic GGA calculation for mercury is also shown. The density is normalized
so that the area under each curve is 1
0.01 0.1 1 10 100
r (bohr)
-100
-50
0
Energy (hartree)
v
xc
(LDA)
v
xc
(GGA)
-v
Hartree
v
ext
v
KS
Fig. 6.6. LDA and GGA xc potentials for the argon atom. The dashed-dotted line
corresponds to minus the Hartree potential evaluated with the GGA density. The
LDA Hartree potential is however indistinguishable from this curve. Furthermore,
the dashed line represents the argon nuclear potential, 18/r, and the solid line
the total Kohn-Sham potential
and two minima separating these regions. The xc correlation potential used
in the calculation was the GGA, but the LDA density looks almost indis-
tinguishable from the GGA density. This is a fairly general statement the
LDA and most of the GGAs (as well as other more complicated functionals)
yield very similar densities in most cases. The potentials and the energies can
nevertheless be quite different.
242 Fernando Nogueira, Alberto Castro, and Miguel A.L. Marques
24
6
8 101214
r (bohr)
0.04
0.2
1
5
25
Energy (hartree)
-v
xc
(LDA)
-v
xc
(GGA)
1/r
Fig. 6.7. LDA and GGA xc potentials for the argon atom in a logarithmic scale.
For the sake of comparison we also plot the function 1/r
Having the density it is a simple task to compute the Hartree and xc
potentials. These, together with the nuclear potential v
ext
(r)=Z/r, are
depicted in Fig. 6.6. The Hartree potential is always positive and of the same
order as the external potential. On the other hand, the xc potential is always
negative and around 5 times smaller. Let us now suppose that an electron is
far away from the nucleus. This electron feels a potential which is the sum
of the nuclear potential and the potential generated by the remaining N 1
electrons. The further away from the nucleus, the smaller will be the dipole
and higher-moment contributions to the electric field. It is evident from these
considerations that the Kohn-Sham potential has to decay asymptotically as
(Z N +1)/r. As the external potential decays as Z/r, and the Hartree
potential as N/r, one readily concludes that the xc potential has to behave
asymptotically as 1/r. In fact it is the exchange part of the potential that
has to account for this behavior, whilst the correlation potential decays with
a higher power of 1/r. To better investigate this feature, we have plotted,
in logarithmic scale, v
xc
, in the LDA and GGA approximations, together
with the function 1/r (see Fig. 6.7). Clearly both the LDA and the GGA
curve have a wrong (exponential) asymptotic behavior. From the definition
of the LDA, (see 6.9), it is quite simple to derive this fact. The electronic
density for a finite system decays exponentially for large distances from the
nucleus. The quantity ε
HEG
entering the definition is, as mentioned before,
a simple function, not much more complicated than a polynomial. By simple
inspection, it is then clear that inserting an exponentially decaying density
in (6.9) yields an exponentially decaying xc potential.
The problem of the exponential decay can yet be seen from a different
perspective. For a many-electron atom the Hartree energy can be written, in
6 A Tutorial on Density Functional Theory 243
terms of the Kohn-Sham orbitals, as
E
Hartree
=
1
2
d
3
r
d
3
r
occ
ij
|ϕ
i
(r)|
2
|ϕ
j
(r
)|
2
|r r
|
. (6.76)
Note that in the sum the term with i = j is not excluded. This diagonal
represents the interaction of one electron with itself, and is therefore called
the self-interaction term. It is clearly a spurious term, and is exactly canceled
by the diagonal part of the exchange energy. It is easy to see that neither
the LDA nor the GGA exchange energy cancel exactly the self-interaction.
This is, however, not the case in more sophisticated functionals like the exact
exchange or the self-interaction-corrected LDA.
The self-interaction problem is responsible for some of the failures of the
LDA and the GGA, namely (i) the too small ionization potentials when calcu-
lated from ε
HOMO
; (ii) the non-existence of Rydberg series; (iii) the incapacity
to bind extra electrons, thus rendering almost impossible the calculation of
electron-affinities (EA).
In Table 6.1 we show the IPs calculated for the argon atom. It is again
evident that ε
HOMO
is too small [failure (i)], while the IPs obtained through
total energy differences are indeed quite close to the experimental values, and
in fact better than the Hartree-Fock results. Note that the LDA result is too
large, but is corrected by the gradient corrections. This is again a fairly
universal feature of the LDA and the GGA: The LDA tends to overestimate
energy barriers, which are then corrected by the GGA to values closer to the
experimental results.
Up to now we have disregarded relativistic corrections in our calculations.
These, however, become important as the atomic number increases. To illus-
trate this fact, we show in Fig. 6.5 the radial electronic density of mercury
(Z = 80) and in Table 6.1 its IP obtained from both a relativistic and a
non-relativistic calculation. From the plot it is clear that the density changes
considerably when introducing relativistic corrections, especially close to the
nucleus, where these corrections are stronger. Furthermore, the relativistic IP
is much closer to the experimental value. But, what do we mean by “relativis-
tic corrections”? Even though a relativistic version of DFT (and relativistic
functionals) have been proposed (see the chapter by R. Dreizler in this vol-
ume), very few calculations were performed within this formalism. In the
context of standard DFT, “relativistic” calculation normally means the so-
lution of a: (a) Dirac-like equation but adding a non-relativistic xc potential;
(b) Pauli equation, i.e., including the mass polarization, Darwin and spin-
orbit coupling terms; (c) Scalar-relativistic Pauli equation, i.e., including the
mass polarization, Darwin and either ignoring the spin-orbit term, or aver-
aging it; (d) ZORA equation (see [81,82]). Our calculations were performed
with the recipe (a).
To complete this section on atomic calculations, we would like to take a
step back and look at the difficulty in calculating electronic affinities (EA)
244 Fernando Nogueira, Alberto Castro, and Miguel A.L. Marques
0 0.2 0.4 0.6 0.8
Charge (a.u.)
0
0.04
0.08
0.12
0.16
E (hartree)
F
Cl
Br
I
0.2 0.4 0.6 0.8 1
0.01
0.0
2
0.03
Li
Na
K
Rb
Cs
Fig. 6.8. E(X) E(X
α
) versus α for the halogen and alkali atoms
within the LDA and the GGA. For that purpose we performed GGA cal-
culations for several atomic species, namely the halogen and alkali series,
that we charged with a fraction, α, of an extra electron. The results are
summarized in Fig. 6.8, where we depicted the difference of total energies be-
tween the charged and the neutral species, E(X)E(X
α
). Only Iodine was
able to accept a full extra electron, while all other atoms bounded between
0.5 and 0.7 electrons. Even though a “proper” calculation of the EA is not
possible in these cases, practical recipes do exist. We can, e.g., extrapolate
E(X) E(X
α
)toα = 1, and use this value as an estimation of the EA.
In Table 6.2 we show the EAs obtained through a very simple polynomial
extrapolation. The results compare fairly well for the halogens, while for the
alkali atoms they exhibit errors of around 30%. However, we would like to
stress that the situation is far from satisfactory from the theoretical point of
view, and can only be solved by using better xc functionals.
Table 6.2. Electronic affinities for the halogen and alkali atoms. All values were
obtained from extrapolation of E(X) E(X
α
)toα = 1, except in the case of
iodine (the only of this set of atoms able to bind an extra electron)
F Cl Br I Li Na K Rb Cs
DFT 0.131 0.139 0.131 0.123 0.0250 0.0262 0.0240 0.0234 0.0222
expt. 0.125 0.133 0.124 0.112 0.0227 0.0201 0.0184 0.0179 0.0173
6.5 Plane-Wave Calculations
In this section we will present some simple calculations using a plane-wave
expansion of the Kohn-Sham orbitals [4]. The plane-wave basis set is or-
6 A Tutorial on Density Functional Theory 245
10 20 30 40
E
cut
(hartree)
-7.942
-7.940
-7.938
-7.936
Total energy (hartree)
n
kpt
=10