0% found this document useful (0 votes)
69 views67 pages

Chapter 4 - Density-Functional Theory

Uploaded by

Rahul R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views67 pages

Chapter 4 - Density-Functional Theory

Uploaded by

Rahul R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

Chapter 4

Density‐Functional Theory

In this chapter, we provide a density‐functional theory (DFT) that


becomes the basis of Quantum ESPRESSO. In order to understand
how the DFT code works, we explain and apply the DFT on a simple
example of the ground‐state calculation of a helium atom. A simple
Python code is also given for the helium atom calculation. This
chapter will help the readers to understand Quantum ESPRESSO’s
techniques in Chapter 3, such as the self‐consistent field (SCF)
calculation, the ground‐state total energy, the pseudopotential, etc.

4.1 “Black box” Quantum ESPRESSO

By giving input files to Quantum ESPRESSO, we can obtain output


files containing the materials’ information and properties. Therefore,
Quantum ESPRESSO works like a black box, as shown in Fig. 4.1
(a). The readers may run a computer program successfully without
understanding the black box. However, a successful run does not
mean that you have run it properly. To understand what you are
running, the readers need to know what is inside the black box.

Quantum ESPRESSO Course for Solid‐State Physics


Nguyen Tuan Hung, Ahmad R. T. Nugraha, and Riichiro Saito
Copyright © 2023 Jenny Stanford Publishing Pte. Ltd.
ISBN 978‐981‐4968‐37‐9 (Hardcover), 978‐981‐4968‐63‐8 (Paperback), 978‐1‐003‐29096‐4 (eBook)
www.jennystanford.com
168 | Density‐Functional Theory

(a)
Quantum
Input Output
ESPRESSO

(b) Electrons + Nuclei Electron density

Structures Properties
of materials of materials

The Schrödinger Density-functional


equation theory

Figure 4.1 (a) Quantum ESPRESSO as a black box. (b) Density‐functional


theory is used in Quantum ESPRESSO to solve the Schrödinger equation of
materials.

The purpose of Quantum ESPRESSO is to calculate the properties


of materials at the atomic scale. Since “materials = electrons +
nuclei”, the properties of the materials are given by the complicated
interactions of the electrons and nuclei. The electrons and nuclei
hold together in the materials with a detailed balance between the
repulsive and attractive Coulomb interactions between them. These
interactions are described by an equation in quantum mechanics, the
so‐called Schrödinger equation (Eq. (4.1)) [Schrödinger (1926)].
An analytical solution of the Schrödinger equation only exists
for systems of one electron (e.g., a hydrogen atom), while most
atoms, molecules, and materials consist of many electrons and
nuclei. For any system of more than two electrons, the Schrödinger
equation can be solved only after using some approximations due
to the complexity of the Coulomb interactions. Therefore, a good
approximation is necessary to solve the Schrödinger equation. In
Quantum ESPRESSO, the density‑functional theory (DFT) is used
as an approximation to solve the Schrödinger equation, as shown in
Fig. 4.1 (b).
Quantum ESPRESSO Course for Solid‐State Physics | 169
4.2 The Schrödinger equation

A system of electrons and nuclei is described by the Schrödinger


equation as

HΨ = Etot Ψ, (4.1)

where H is the Hamiltonian of the system, Etot is the total energy of the
electrons and nuclei, and Ψ(r1 , …, rNe , R1 , …, RNn ) is the wavefunction
of many particles (electrons and nuclei). By using the atomic units
listed in Table 4.1, a general Hamiltonian in Eq. (4.1) is given by
kinetic energies T and potential energies V of the electrons and
nuclei as

H = Tn + Vn + Te + Ve + Ven

ZI ZJ
Nn Nn
 ∇2RI 1
2MI 2 |RI − RJ |
=− +
I=1 I̸=J
(4.2)
  
nuclei
Ne Ne Ne Nn
∇2r 1 1 −ZI
.
 
i

2 2 |ri − rj | |ri − RI |
− + +
i=1 i̸=j i=1 I=1
    
electrons mixed

Tn : kinetic energy of nuclei Te : kinetic energy of electrons


Vn : Coulomb repulsion Ve : Coulomb repulsion
between a pair of nuclei between a pair of electrons
Ven : Coulomb attraction ∇: nabla operators
between electrons and nuclei
R: nuclear position r: electronic position
Nn : number of nuclei Ne : number of electrons
I, J: label for a nucleus i, j: label for an electron
M: nuclear mass Z: nuclear charge (atomic number)

Notice that a factor of 1/2 appears in the sums of Vn and Ve to take


into account the double counting on the summation i and j (i ̸= j).
Here, we adopt the atomic units e = h̄ = c = me = 1 (see Table 4.1)
and cgs unit for the Coulomb interaction. If SI unit is adopted, Te + Ve
170 | Density‐Functional Theory

Table 4.1 Atomic unit (a.u.).

Symbol Quantity a.u. Value in SI


t Time 1 2.419 × 10−17 s
....................................................................................................................................................................

c (1/α) Speed of light 1 2.998 × 108 m/s


....................................................................................................................................................................

h̄ h/2π (angular momentum) 1 1.055 × 10−34 Js


....................................................................................................................................................................

h Planck’s constant 2π 6.626 × 10−31 Js


....................................................................................................................................................................

Ha (Eh ) Hartree (atomic energy) 1 4.360 × 10−18 J


....................................................................................................................................................................

me Electron mass 1 9.110 × 10−31 kg


....................................................................................................................................................................

e Electron charge 1 1.602 × 10−19 C


....................................................................................................................................................................

a0 Bohr radius (atomic distance) 1 5.292 × 10−11 m


....................................................................................................................................................................

e/a30 Charge density 1 1.081 × 1012 C/m3


....................................................................................................................................................................

eEh /h̄ Current 1 6.623 × 10−3 A


....................................................................................................................................................................

Eh /(ea20 ) Electric field 1 9.717 × 1021 V/m2


....................................................................................................................................................................

μB Bohr magneton 1/2 9.274 × 10−24 J/T


....................................................................................................................................................................

4πϵ0 Vacuum permittivity ×4π 1 1.113 × 10−10 C2 /Jm


....................................................................................................................................................................

Eh /a0 Force 1 8.238 × 10−8 N


....................................................................................................................................................................

Eh /a30 Pressure 1 2.942 × 1013 Pa


Helpful conversions: 1 Ha = 27.2114 eV = 2 Ry.

is expressed by

h̄2 ∇2ri e2
Ne Ne
1
. (4.3)

2me 2 4πϵ0 |ri − rj |
− +
i=1 i̸=j

The Hamiltonian in Eq. (4.2) is considered as a coupled nuclear


and electronic problem. However, the nuclei are much heavier than
the electrons (e.g., MH /me = 1, 836 in hydrogen or MC /me = 21, 868
in carbon). Moreover, the average speed of the nuclei is much
smaller than that of the electrons. Therefore, we can assume that
the electrons will follow the nuclear motions without any delay,
and we can decouple the electronic and nuclear motions to the
first approximation, which is known as the Born‑Oppenheimer
Quantum ESPRESSO Course for Solid‐State Physics | 171
z

e–
r1 |r1 – r2|
e–
r2

2e+
x y

Figure 4.2 Two electrons in a helium atom, where ri (i = 1, 2) are the


positions of the i‐th electron, and |r1 − r2 | is the distance between two
electrons.

approximation (BOA) [Born and Oppenheimer (1927)]. The nuclei


in the material are almost immobile except for hydrogen atoms, and
their positions can be determined precisely by X‐ray crystallography
(see Sec. 5.2). Thus, we can fix the positions of the nuclei in the
real space with zero kinetic energy (i.e., Tn = 0) for calculating the
electronic energy band. Then Vn becomes an external potential (or
simply a constant). In this case, the problem that we have to solve
becomes a purely electronic one as

He ψ = (Te + Ve + Ven )ψ = Eψ, (4.4)

where E = Etot − Vn is the total energy of the electrons and ψ is a


wavefunction of the N electrons, in which ψ is a many‐body function
of the positions of N electrons ri (i = 1, 2, …, N): ψ(r1 , r2 , …, rN ). Since
an electron interacts with the rest of the electrons due to the Coulomb
repulsion Ve , the many‐body state has to account for all the degrees
of freedom of N electrons in the system (or the 3N‐dimensional
configuration space).

 The Schrödinger equation for a helium atom: Let us consider


the case of a helium (He) atom, which consists of one nucleus
with Z = 2 and two electrons at r1 and r2 , as shown in Fig. 4.2.
172 | Density‐Functional Theory

Equation (4.4) for a helium atom is given by

1 1 1 2 2
 
− ∇2r1 − ∇2r2 + ψ(r1 , r2 )
2 2 |r1 − r2 | |r1 | |r2 | (4.5)
− −

= Eψ(r1 , r2 ).

Although Eq. (4.5) looks simple, an analytical solution cannot be


found because Eq. (4.5) is a six‐dimensional partial differential
equation (PDE). High‐dimensional PDEs are hard to solve in physics,
in which they occur not only in quantum mechanics but also in
classical mechanics (e.g., the Hamilton‐Jacobi equation1 with a large
number of degrees of freedom).
Since the Schrödinger equation is a PDE where all terms are
known, one can try to solve it numerically on a grid.2 This approach
can solve Eq. (4.5) for an electron, but it fails for a system with more
than two electrons. For example, if we take 3D silicon as an example,
it has a unit cell volume of a3 /4, where a = 5.431 Å is the lattice
constant. If we consider a grid of the unit cell with points spaced
by Δd ∼ 0.2 Å, this grid consists of (a3 /4)/(Δd3 ) ∼ 5000 points.
Since two silicon atoms in the unit cell contain 28 electrons, the grid
has 28 × 3 = 84 coordinates. Therefore, a complete specification of
a wavefunction ψSi (r1 , r2 , …, r28 ) requires 500084 complex numbers.
We need a stack of DVDs from the earth to the sun to store this
wavefunction. To overcome this problem, many researchers have
been developing methods of approximation since the late 1920s.
The most successful method in physics is the density‐functional
theory (DFT). The DFT is defined by the theory of approximation in
which the Coulomb interaction between electrons is expressed by a
functional3 of the electron density. With the DFT, the Schrödinger
equation can be reformulated in terms of the electron density.
Therefore, the 3N‐dimensional PDE is reduced to N PDE’s of 3‐
dimension, so that we can solve Eq. (4.2) for silicon and store their
wavefunction by using a PC.

1 The Hamilton‐Jacobi equation is an alternative formulation of classical mechanics,

equivalent to other formulations such as the Newton second law.


2 In a grid approach, functions are represented by their values at certain grid points

and derivatives are approximated through differences in these values.


3 A functional is a function whose variable is another function such as V(n(r)).
Quantum ESPRESSO Course for Solid‐State Physics | 173
4.3 Systems of non‐interacting electrons

Before explaining the DFT, we would like to show some approxi‐


mations for solving Eq. (4.5), which are regarded as the conceptual
origin of the DFT. As discussed in Sec. 4.2, the problem to solve the
Schrödinger equation comes from the Coulomb repulsion between
electrons Ve . If we assume that the Ne electrons in the system are
non‐interacting to one another, we can set Ve = 0, and Eq. (4.4) can
be rewritten as a function of ri (i = 1, …, Ne )

Ne Ne 
Nn
 
∇2r
ψ = Eψ.
−ZI
(4.6)
 
i

|ri − RI |
(Te + Ven )ψ =
2
− +
i=1 i=1 I=1

Here we define a single‑particle Hamiltonian of one electron as

N
∇2r n

h(r) = −
−ZI
, (4.7)
2 |r − RI |
+
I=1

so that Eq. (4.6) can be rewritten as

h(ri )ψ(ri ) = Eψ(ri ), with (i = 1, …, Ne ). (4.8)

From Eq.(4.8) we can say that, for the case of the non‐interacting
electrons, the Hamiltonian of the system can be written as Ne
independent single‐particle Hamiltonian, and the wavefunction
is written by ψ(ri ). Eq. (4.8) is used to obtain the energy of
electrons for the following two cases: (1) distinguishable4 and (2)
indistinguishable5 electrons. For simplicity, we consider the two
electrons in a helium atom as follows:
(1) Two distinguishable electrons: Let us consider electron 1
in one state ϕa (r1 ) and electron 2 in another state ϕb (r2 ). Since two
electrons are independent of each other, the probability of finding
(electron 1 at r1 ) and (electron 2 at r2 ) can be given by the product
as |ψ(r1 , r2 )|2 = |ϕa (r1 )|2 |ϕb (r2 )|2 . In this case, the wavefunction can

4 If the electrons are distinguishable, the physical properties of the system are

changed by switching the positions of two electrons.


5 If the electrons are indistinguishable, switching the positions of two electrons

makes no physical change.


174 | Density‐Functional Theory

be expressed by the product of one‐body wavefunction, ψ(r1 , r2 ) =


ϕa (r1 )ϕb (r2 ), which is known as one‑body approximation. In this
case, Eq. (4.8) can be written as

[h(r1 ) + h(r2 )] ϕa (r1 )ϕb (r2 ) = Eϕa (r1 )ϕb (r2 ). (4.9)

Since h(ri ) (i = 1, 2) acts only on ϕα (ri ) (α = a, b) as

h(ri )ϕα (ri ) = ϵα ϕα (ri ), (4.10)

where ϵα is the energy of one electron, the left‐hand side of Eq. (4.9)
is rewritten as

[h(r1 ) + h(r2 )] ϕa (r1 )ϕb (r2 )


= [h(r1 )ϕa (r1 )]ϕb (r2 ) + ϕa (r1 )[h(r2 )ϕb (r2 )]
(4.11)
= ϵa ϕa (r1 )ϕb (r2 ) + ϕa (r1 )ϵb ϕb (r2 )
= (ϵa + ϵb )ϕa (r1 )ϕb (r2 ).

By substituting Eq. (4.11) into Eq. (4.9), we obtain

E = ϵa + ϵb . (4.12)

Thus, for the case of the non‐interacting system with the distinguish‐
able electrons, the total energy of the electrons is the sum of the
energy of each electron.
(2) Two indistinguishable electrons: In quantum mechanics,
two electrons are indistinguishable (i.e., ϕa (r1 )ϕb (r2 ) is equivalent to
ϕa (r2 )ϕb (r1 )). Thus, one possible shape of the wavefunction ψ(r1 , r2 )
is a linear combination of two states as [Kittel (1976)]

1
ψ(r1 , r2 ) = √ [ϕa (r1 )ϕb (r2 ) − ϕb (r1 )ϕa (r2 )], (4.13)
2

where the prefactor √12 is for normalizing the wave function,


|ψ(r1 , r2 )|2 dr1 r2 = 1. Eq. (4.13) shows that the wavefunction is


anti‐symmetric for exchanging r1 and r2 as ψ(r1 , r2 ) = −ψ(r2 , r1 ).


When we put r1 = r2 for ψ(r1 , r2 ), we get ψ = 0. It means that two
electrons cannot occupy the same position, in accordance with the
Quantum ESPRESSO Course for Solid‐State Physics | 175
Pauli exclusion principle [Pauli (1925)]. Eq. (4.13) can also be
written by using a matrix determinant as

1 ϕa (r1 ) ϕb (r1 )


 
ψ(r1 , r2 ) = , (4.14)
2 ϕa (r2 ) ϕb (r2 )

which is known as the Slater determinant [Slater (1929)].


By substituting Eq. (4.13) into Eq. (4.8), we get the same energy
as the case of two distinguishable electrons (i.e., E = ϵa + ϵb ). The
probability of finding an electron at position r, i.e., the electron
density, is given by

n(r) = P1 (r) + P2 (r), (4.15)

where P1 (r) = |ψ(r, r2 )|2 dr2 and P2 (r) = |ψ(r1 , r)|2 dr1 are prob‐
 

abilities of finding first and second electrons at r, respectively, while


other electrons can exist anywhere except for r. Since two electrons
are indistinguishable (i.e., P1 (r) = P2 (r)), Eq. (4.15) can be rewritten
as

n(r) = 2 |ψ(r, r2 )|2 dr2 .



(4.16)

By substituting Eq. (4.13) into Eq. (4.16) and using the normalization
and orthogonality conditions, respectively, as
 
ϕ∗a (r)ϕa (r)dr = ϕ∗b (r)ϕb (r)dr = 1 (4.17)

and
 
ϕ∗b (r)ϕa (r)dr = ϕ∗a (r)ϕb (r)dr = 0, (4.18)

the electron density is expressed by

n(r) = |ϕa (r)|2 + |ϕb (r)|2 . (4.19)

Therefore, the electron density of the non‐interacting electrons is


simply equal to the sum of the squares of the occupied states.

 Electron density and energy of a helium atom without


176 | Density‐Functional Theory

Figure 4.3 Electron density in atomic unit of a helium atom as a function of


r in the approximation of non‐interacting electrons.

Coulomb repulsion: Let us recall that the wavefunction of s‐orbital


and the energy of a hydrogen‐like atom with a nucleus +Ze are given
by

Z3/2 Z2
ϕ(r) = √ exp(−Z|r|) and ϵ = − , (4.20)
π 2

respectively. We note that the hydrogen atom is a special case that


contains only one electron and Eq. (4.20) gives an analytical solution
for Z = 1. By substituting Eq. (4.20) into Eqs. (4.19) and (4.12), the
electron density and energy of the helium atom are given by

2Z3
n(r) = exp(−2Z|r|) and E = −Z2 , (4.21)
π

respectively, when we neglect the interaction between two electrons.


Since the atomic number of a helium atom is Z = 2, the electron
density and total energy are

16
n(r) = exp(−4|r|) (4.22)
π

and E = −4 Ha, respectively. In Fig. 4.3, we plot n(r) of Eq. (4.22) as


a function of the distance r = |r| from the nucleus, respectively.
Quantum ESPRESSO Course for Solid‐State Physics | 177
To compare the calculated energy E with the experimental
values, we remove two electrons from the helium atom as

He+ + e− −
I I
He −
→1
→2
He++ + 2e− , (4.23)

where I1 and I2 are the first and second ionization energies,


respectively. I1 is the minimum energy required to remove the first
electron from the helium atom and is experimentally given as 0.9
Ha (24.59 eV) [Sucher (1958)]. I2 can be calculated exactly since
He+ is a hydrogen‐like ion, thus I2 = −ϵ(He+ ) = 2 Ha. Therefore, the
energy of the helium atom is given by −(I1 + I2 ) = −2.9 Ha, which is
larger than the calculated energy (−4 Ha). In other words, the non‐
interacting electrons approximation gives a large deviation of the
total energy. The reason for the deviation is that we do not consider
the energy of the Coulomb repulsion between the two electrons.

4.4 Hartree potential

In Sec. 4.3, we show that the non‐interacting electrons without


the Coulomb repulsion give a large deviation of the energy. Here
we would like to keep the expression of n(r) as the for the non‐
interacting electrons (Eq. (4.19)), and we will take the Coulomb
repulsion into account in the energy E. When we consider the
Coulomb interaction, Eq. (4.4) can be rewritten as

1
 
h(r1 ) + h(r2 ) + ϕ (r1 )ϕb (r2 ) = Eϕa (r1 )ϕb (r2 ). (4.24)
|r1 − r2 | a

If we multiply ϕ∗b (r2 ) to Eq. (4.24) and integrate both sides of


Eq. (4.24) on r2 with using the normalization condition in Eq. (4.17),
we can obtain the single‑particle Schrödinger equation for the
first electron as

|ϕb (r2 )|2


 
h(r1 ) +

dr2 ϕa (r1 ) = ϵHa ϕa (r1 ), (4.25)
|r1 − r2 |
178 | Density‐Functional Theory

where ϵHa is expressed by

ϵHa = E − ϕ∗b (r2 )h(r2 )ϕb (r2 )dr2 = E − ϵb ,



(4.26)

where ϵb is the energy of the second electron in the non‐interacting


Hamiltonian h(r2 ) as defined by Eq. (4.10). The single‐particle
Schrödingerequation for the second electron also can be written by
multiplying ϕ∗a (r1 )dr1 as

|ϕa (r1 )|2


 
h(r2 ) +

dr1 ϕb (r2 ) = ϵHb ϕb (r2 ), (4.27)
|r1 − r2 |

with

ϵHb = E − ϵa , (4.28)

where ϵa is the energy of the first electron.


The integration in Eq. (4.25) can be rewritten in term of electron
density, n(r2 ) = |ϕa (r2 )|2 + |ϕb (r2 )|2 , as

|ϕb (r2 )|2 n(r2 ) |ϕa (r2 )|2


  
dr2 . (4.29)
|r1 − r2 | |r1 − r2 | |r1 − r2 |
dr2 = dr2 −
     
VH (r1 ) VHsic (r1 )

The first term VH is called the Hartree potential [Hartree (1928)],


which describes the Coulomb repulsion potential as a function of
r1 . The second term VHsic (r1 ) is called the self‑interaction correction
of the Hartree potential, which takes into account that the electron
at the state ϕa shall not interact with itself, but with the remaining
electrons. When the system has many electrons (∼ 1023 ), VHsic can
be neglected since VHsic might contribute negligibly small to the total
energy [Parr and Yang (1989)].
From Eq. (4.25), we can write the energy as a functional of the
wavefunctions as

|ϕb (r2 )|2


 
ϵa = ϕa (r1 ) h(r1 ) +
 
H
|r1 − r2 |

dr2 ϕa (r1 )dr1
(4.30)
|ϕa (r1 )|2 |ϕb (r2 )|2

dr1 dr2 .
|r1 − r2 |
= ϵa +
Quantum ESPRESSO Course for Solid‐State Physics | 179
By substituting Eq. (4.26) into Eq. (4.30), the total energy E is given
by

|ϕa (r1 )|2 |ϕb (r2 )|2


E = ϵa + ϵb +

dr1 dr2 . (4.31)
|r1 − r2 |

Now the total energy E is not equal neither to ϵa + ϵb nor to ϵHa +


ϵHb . This is because the positive Coulomb interaction between the
two electrons is included twice in ϵHa + ϵHb (Eqs. (4.25) and (4.27)).
Therefore, only one term from the inter‐electron interaction is added
to ϵa + ϵb in the expression for E as shown in Eq. (4.31).

4.5 Self‐consistent field

A difficulty in solving the single‐particle Schrödinger equation is that


the Hartree potential VH in Eq. (4.29) requires the value of the state ϕ,
which is not known before we solve the single‐particle Schrödinger
equation in Eq. (4.25). This is called a self‑consistent problem.
The Hartree potential can be expressed in a differential form of
the Maxwell equation as ∇ · E = 4πn(r), where n(r) is the electron
density at r and E = −∇VH (r), where VH (r) is generally called the
electrostatic potential. Combining the two equations, we get the
Possion equation [Jackson (1999)]:

∇2 VH (r) = −4πn(r). (4.32)

The solution of the Poisson equation is given as follows:

n(r′ )

dr′ . (4.33)
|r − r′ |
VH (r) =

Now let us introduce a self‑consistent field (SCF) method that


can be applied to solve the single‐particle Schrödinger equation by
using the Poisson equation. As shown in Fig. 4.4, first, guessing
an initial electron density n(r) for the solution, we put n(r) into
Eq. (4.33) to get the Hartree potential VH (r). Then we put the VH
into the single‐particle Schrödinger equation to get eigenstate ϕ(r)
to obtain the new n(r) = |ϕ(r)|2 , where the sum runs over the


occupied states. We repeat the procedure until n(r) does not change
180 | Density‐Functional Theory

“Guess” initial density

Mixing with α The Poisson equation

The single-particle Schrödinger equation

“New” electron density

Yes Comparison, if and differ

No End

Figure 4.4 Flow‐chart of the self‐consistent field method for the solution of
the single‐particle Schrödinger equation with the Hartree potential VH .

appreciably, that is, the convergence of the solution. This procedure


is called the SCF method. Here, we construct the next guess of n(r)
by mixing nnew (r) with the previous n(r). If the mixing parameter α
(0 < α < 1) is large, we might find oscillating behavior of n(r). We
note that the self‐interaction term VHsic in Eq. (4.29) is neglected in
this>procedure.
Let us consider the example of silicon in Sec. 4.2. By using the SCF
>

method, the 3N‐dimensional configuration space of the Schrödinger


equation is reduced to an N‐single‐particle Schrödinger equations of
three dimensions. In this case, the characteristic size of the arrays
needed for describing the wavefunctions becomes 28 × 50003 for
silicon with 28 electrons in a unit cell, instead of 500084 in Sec. 4.2.
These arrays correspond approximately to a few GB of computer
storage.

 Hartree potential for helium: In order to solve the Poisson


equation for a helium atom, it is more convenient to use spherical
Quantum ESPRESSO Course for Solid‐State Physics | 181
coordinates (r, θ, φ) rather than Cartesian coordinates r = (x, y, z).
These are related to each other by r = |r|, x = r cos θ sin φ, y =
r sin θ cos φ, and z = r cos θ. Referring back to Eq. (4.33), the
Laplacian ∇2 is expressed in spherical coordinates as follows:

1 ∂ ∂
 
2
r 2
r ∂r ∂r
∇ = 2
(4.34)
1 ∂ ∂ 1 ∂2
 
.
r2 sin θ ∂θ ∂θ r2 sin θ ∂φ2
+ sin θ + 2

When we assume that the Hartree potential VH has a spherical


symmetry, the derivatives of VH with respect to θ and φ become zero.
Then the Poisson equation is given by a differential equation on r as
follows:

1 ∂ 2 ∂VH
 
r (4.35)
r2 ∂r ∂r
= −4πn(r).

Integrating Eq. (4.35) on r we obtain

r
1 r′
C
r′′ n(r′′ )dr′ dr′′ −
 
. (4.36)
2
r′2 r
VH (r) = −4π
0 0

It is noted that C/r in Eq. (4.36) is a solution of Eq. (4.35) for any value
of C. Then by substituting the electron density of the helium atom in
Eq. (4.21) into Eq. (4.36) and using

x
1 x′
2
x′′ exp(x′′ )dx′ dx′′ = (1 −
 
(4.37)
2
x′2 x
) exp(x),
0 0

Eq. (4.36) becomes

1 C
 
VH (r) = −2 Z + . (4.38)
r r
exp(−2Zr) −

At the limit of r → ∞, from Eq. (4.33), we have VH (r) −−−→


r→∞

1
r n(r′ )dr′ = Zr . Applying this boundary condition for Eq. (4.38), we
obtain C = −Z, and Eq. (4.38) can be rewritten for the helium atom
182 | Density‐Functional Theory

Figure 4.5 The Hartree potential VH (r) (solid line), the Coulomb attraction
between electrons and nuclei Ven (dotted line), and the total potential Ven +
VH (r) (dashed line) of helium atom are plotted in atomic unit as functions of
r.

as

1 Z
 
VH (r) = −2 Z + exp(−2Zr) + . (4.39)
r r

In Fig. 4.5, we show VH (r) with Z = 2 (solid line), the Coulomb


attractive interaction between electrons and nuclei Ven (r) = −2/r
(dotted line), and the total potential Ven (r) + VH (r) (dashed line)
of the helium atom as functions of r. When r increases, the total
potential decays exponentially. This trend is incorrect since the
total potential of the helium atom decays as −1/r at a large
distance [Umrigar and Gonze (1994)]. This is because we neglect
some interactions, which will be introduced in the next section.

4.6 Exchange potential

In Sec. 4.5, we show that the Schrödinger equation can be solved by


using the Hartree approximation and the SCF method. In the Hartree
approximation, the Coulomb repulsion between two electrons in
the system is approximated by the Hartree potential, in which
each individual electron moves independently of each other, only
Quantum ESPRESSO Course for Solid‐State Physics | 183
feeling the averaged electrostatic potential by the other electrons.
However, in 1930, Slater pointed out that the Hartree method
did not take into account the Pauli exclusion principle for many
electrons [Slater (1930b)]. That is, if two electrons have parallel
spins to each other, they are not allowed to occupy the same states
at the same time. Since the two electrons can not be close to each
other by the Pauli principle, the Coulomb repulsion can not be very
large. In order to take account of the Pauli exclusion principle, we
introduce an exchange potential, which is an attractive Coulomb
interaction between two electrons with parallel spins. We note < that
the Hartree potential is a repulsive Coulomb interaction between
an electron and electron density of the other electrons (VH > 0, see
Fig. 4.5). Exchange potential is a correction term to VH , which is over‐
estimated compared with the real case.
By using the Slater determinant in Eq. (4.14), Eq. (4.8) can be
rewritten as

1
 
h(r1 ) + h(r2 ) +
|r1 − r2 |
[ϕa (r1 )ϕb (r2 ) − ϕb (r1 )ϕa (r2 )]
(4.40)
= E[ϕa (r1 )ϕb (r2 ) − ϕb (r1 )ϕa (r2 )].

By multiplying ϕ∗b (r2 ) in Eq. (4.40) and integrating over r2 with the
normalization and orthogonality conditions (Eqs. (4.17) and (4.18)),
we obtain:

h(r1 )ϕa (r1 ) + ϕa (r1 )



ϕ∗b (r2 )ϕb (r2 )
|r1 − r2 |
dr2
 (4.41)
ϕ∗b (r2 )ϕb (r1 )
ϕa (r2 )dr2 = ϵHF
|r1 − r2 | a ϕa (r1 ),

where ϵHF
a is defined by

=E− ϕ∗b (r2 )h(r2 )ϕb (r2 )dr2 = E − ϵb .



ϵHF
a (4.42)
184 | Density‐Functional Theory

By substituting Eq. (4.29) into Eq. (4.41), we obtain the single‐


particle Schrödinger equation for ϕa (r1 ) as

γ(r2 , r1 )

a ϕa (r1 ), (4.43)
ϕ (r2 )dr2 = ϵHF
|r1 − r2 | a
[h(r1 ) + VH (r1 )] ϕa (r1 ) −

where γ(r2 , r1 ) is defined as

γ(r2 , r1 ) = ϕ∗a (r2 )ϕa (r1 ) + ϕ∗b (r2 )ϕb (r1 ). (4.44)

The single‐particle Schrödinger equation also can be written for


ϕa (r2 ) as

γ(r1 , r2 )

b ϕb (r2 ), (4.45)
ϕ (r1 )dr1 = ϵHF
|r1 − r2 | b
[h(r2 ) + VH (r2 )] ϕb (r2 ) −

in which ϵHF
b is symmetrically given by

b = E − ϵa .
ϵHF (4.46)

Eq. (4.43) or (4.45) is known as the Hartree‑Fock equa‑


tion [Fock (1930)], in which the exchange potential Vx in Eq. (4.43)
is defined by

γ(r2 , r1 )
Vx (r1 , r2 ) = − . (4.47)
|r1 − r2 |

Vx exists only for two electrons at r1 and r2 , which have the same
quantum state ϕa or ϕb including spin, i.e., the exchange potential
is the effective Coulomb interaction between the electrons with
parallel spins in the system. The origin of Vx is that two‐electrons
with the same spin can not exist at the same position (r1 = r2 ), in
which VH should be small by the restriction of the Pauli principle. By
considering both VH and Vx in Eq. (4.39), two electrons are interacted
not only by their electronic charge but also by their spins. Therefore,
the quantum behavior of electrons is included by Vx term in the
Hartree‐Fock equation. It is important to note that Vx is a non‑local
potential on r1 since it depends on an integration over the additional
variable r2 . Therefore, the practical solution of the Hartree‐Fock
equation becomes more complicated and time‐consuming.
Quantum ESPRESSO Course for Solid‐State Physics | 185
Let us discuss the energy that is obtained by the Hartree‐Fock
equation. From Eq. (4.43), we can write the energy by integrating the
wavefunctions as


ϵHF
a = ϕ∗a (r1 )[h(r1 ) + VH (r1 )]ϕa (r1 )dr1

γ(r2 , r1 ) (4.48)
ϕ (r2 )dr1 r2


|r1 − r2 | a
+ ϕ∗a (r1 )

=ϵa + J − K,

where J and K are called the Coulomb and exchange integrals,


respectively, which are given by

|ϕa (r1 )|2 |ϕb (r2 )|2


J=

(4.49)
|r1 − r2 |
dr1 dr2

and

K=

dr1 dr2 . (4.50)
ϕ∗a (r1 )ϕb (r1 )ϕ∗b (r2 )ϕa (r2 )
|r1 − r2 |

J represents the Coulomb repulsion between the electron at the state


ϕa (r1 ) and the other electron at the state ϕb (r2 ). K has a physical
interpretation of the overestimate of the Coulomb interaction for two
electrons in the case of the parallel spins. It means that with the
parallel spins, the two electrons can not be close to each other by the
Pauli exclusion principle. It is noted that both values of J and K are
the positive values and J ≥ K, as shown below [Roothaan (1951)]:
By substituting Eq. (4.46) into Eq. (4.48), the total electron
energy E in the Hartree‐Fock approximation is expressed by

E = ϵa + ϵb + J − K. (4.51)
186 | Density‐Functional Theory

On the other hand, from Eq. (4.40), the total electron energy can be
obtained, too, as

E= ψ∗ (r1 , r2 )[h(r1 ) + h(r2 )]ψ(r1 , r2 )dr1 dr2




1
ψ∗ (r1 , r2 ) ψ(r1 , r2 )dr1 r2

(4.52)
|r1 − r2 |
+

|ψ(r2 , r1 )|2
dr1 r2 .


|r1 − r2 |
= ϵa + ϵb +

By subtracting Eq. (4.52) from Eq. (4.51), we obtain:

|ψ(r1 , r2 )|2
J−K=

dr1 dr2 ≥ 0. (4.53)
|r1 − r2 |

Therefore, J ≥ K and the total electron energy E is always larger than


the sum of the one‐electron energies (ϵa + ϵb ) because of the net
repulsion Coulomb interaction between two electrons.

 Total energy of helium atom: In the case of the helium atom, two
electrons at the 1s state ϕ must have different spin directions, up ↑
and down ↓ because of the Pauli principle. Let us consider the spin
states of two electrons, respectively, as

1 0
   
and ϕ↓ (r) = ϕ(r) , (4.54)
0 1
ϕ↑ (r) = ϕ(r)

where 10 and 01 correspond to up‐ and down‐spin wavefunctions,


 

respectively. From Eq. (4.54), we define the product of two spin‐


functions as follows:

  1
 
ϕ∗↑ (r)ϕ↑ (r) = ϕ2 (r) 1 0 = ϕ2 (r), (4.55)
0

and

  0
 
ϕ∗↑ (r)ϕ↓ (r) = ϕ2 (r) 1 0 = 0. (4.56)
1
Quantum ESPRESSO Course for Solid‐State Physics | 187
By substituting Eqs. (4.55) and (4.56) into Eqs. (4.49) and (4.50),
respectively, we obtain:

2 2
J=
 
drdr′ ,
ϕ∗↑ (r)ϕ↑ (r)ϕ∗↓ (r′ )ϕ↓ (r′ ) |ϕ(r)| |ϕ(r′ )|
|r − r′ |2 |r − r′ |2
drdr′ =

(4.57)

and

K=

drdr′ = 0. (4.58)
ϕ∗↑ (r)ϕ↓ (r)ϕ∗↓ (r′ )ϕ↑ (r′ )
|r − r′ |2

K = 0 is consistent with fact that the exchange potential is zero since


there are no parallel spins. Since the electronic density is expressed
as n(r′ ) = |ϕ↑ (r′ )|2 + |ϕ↓ (r′ )|2 = 2|ϕ(r′ )|2 , the Coulomb integral in
Eq. (4.57) can be rewritten as

1 |ϕ(r)|2 n(r′ ) 1
J=
 
|ϕ(r)|2 VH (r)dr. (4.59)
2 |r − r′ |2 2
drdr′ =

By substituting J in Eq. (4.59) and K = 0 in Eq. (4.58) into Eq. (4.51),


the total electron energy E is expressed as

1
E = 2ϵ +

|ϕ(r)|2 VH (r)dr. (4.60)
2

In order to apply Eq. (4.60) for the helium atom, we define an effective
atomic number Z, i.e., ϕ(r, Z), which gives minimized E when subject
to the Hartree potential VH (r). Eq. (4.60) can be obtained by the
following steps:
• Step 1: Using a beginning value Z = 2, from Eq. (4.39), the
Hartree potential VH (r) is given by

1 2
 
VH (r) = −2 2 + exp(−4r) + . (4.61)
r r
188 | Density‐Functional Theory

E = 2ϵ + J − K

Eexp = − 2.9 Ha

E = 2ϵ

Figure 4.6 Total electron energy of helium atom as a function of effective


atomic number Z. E = 2ϵ and E = 2ϵ + J − K are corresponding to the cases
of non‐interacting electrons and Hartree‐Fock approximation, respectively.
Experimental value Eexp of the helium atom is −2.9 Ha [Sucher (1958)].

• Step 2: By substituting Eq. (4.61) and ϕ(r, Z) = Z√


exp(−Z|r|) in
3/2

Eq. (4.20) into Eq. (4.60), we obtain:


π

E = Z2 − 4Z +2π r2 |ϕ(r, Z)|2 VH (r)dr



  

(4.62)
Z3 (Z + 4)
= Z − 3Z +
2
.
(Z + 2)3

• Step 3: According to the variational principle,6 we minimize E


with respect to the variational parameter Z, i.e., dE/dZ = 0 for E in
Eq. (4.62). We can obtain the effective atomic number Zeff = 1.826
and the value of E at Z = Zeff is about −2.777 Ha.
In Fig. 4.6, we show the energies for the two cases of the non‐
interacting electrons, E = 2ϵ, and the Hartree‐Fock approximation,
E = 2ϵ + J − K, as functions of the effective atomic number Z. For E =
2ϵ, the electrons feel a potential corresponding to the nucleus with a
charge Z = 2, but it makes the error for E as discussed in Sec. 4.3. For
E = 2ϵ + J − K, the electrons feel a potential with a reduced charge
Z = 1.826. Eq. (4.60) can also be solved by the SCF method. This

6 The variational principle states that the energy of any approximate wavefunction is

higher than or equal to the energy of ground‐state wavefunction. The lower the
energy is the better the approximation to the ground state.
Quantum ESPRESSO Course for Solid‐State Physics | 189
could be done by recalculating the Hartree potential with new state
ϕ(r, Zeff = 1.826) in Step 1, then we recalculate Steps 2 and 3 until
the value of Zeff does not change significantly. Finally, we can obtain
the Eeff = −2.85 Ha, which is not too far from the exact value from the
experiment about −2.9 Ha. Slater derived a formula to determine Zeff
as Zeff = Z − S, where S is the shielding constant, which is known as
Slater’s rule [Slater (1930a)]. For the 1s state in the helium atom,
S = 0.3 and Zeff = 1.7, which is close to the result of the SCF method
(Zeff = 1.826).

4.7 Correlation potential

In Sec. 4.6, we show that due to the Pauli exclusion principle, the
electrons with parallel spins have an exchange term of the Coulomb
interaction Vx . The two electrons with the parallel spin move to avoid
each other because the electrons can not overlap. Avoiding picture
should exist for the two electrons with anti‐parallel spins because
these electrons also move with keeping apart to lower the Coulomb
repulsion. This behavior of the electrons with anti‐parallel spins is
missing in the Hartree approximation as well as in the Hartree‐Fock
approximation. A complete picture of the motion of an electron in a
system is shown in Fig. 4.7. In general, the correlation interaction,
Vc , is defined by the remaining term that is missing in the Hartree‐
Fock method.7 Thus, an effective potential in the single‐particle
Schrödinger equation is defined by

Veff = Ven + VH + Vxc , (4.63)

where Vxc ≡ Vx + Vc is called the exchange‑correlation potential.


Since VH is obtained by the total electron density n(r), it suggests
that if Vxc can be expressed by a functional of n(r), the single‐particle
Schrödinger equation can be written as

∇2r
 
(4.64)
2
− + Veff [n(r)] ϕ(r) = ϵϕ(r).

7 The correlation interaction is defined in the field of the density‐functional theory.


190 | Density‐Functional Theory

Vx
VH Vc

Vc

Figure 4.7 The motion of an electron with up‐spin in a system is affected by


three interactions, including the Hartree VH , exchange Vx , and correlation Vc
potentials. VH is the Coulomb interaction between one electron and the total
charge density, which is generated by all electrons in the system. Vx arises
due to the Pauli exclusion principle, in which the electrons with parallel spins
can not exist at the same position at the same time. Vc arises due to the
fact that the electrons with anti‐parallel spins also keep apart to lower their
mutual Coulomb repulsion.

When we know the value of Vxc [n(r)], Eq. (4.64) can be solved by
using the SCF method as discussed in Sec. 4.5. However, we do not
know the exact shape of Vxc [n(r)]. Many people proposed the many
functionals for Vxc [n(r)] over the past few decades. The efforts to
develop the accurate approximations for Vxc [n(r)] led to a theory,
the so‐called density‐functional theory (DFT). We will discuss these
approximations in the next section.

4.8 Early DFT for free‐electron gas

Let us consider how to obtain Vxc [n(r)] for a free‐electron gas, where
the contribution of ions is treated as a uniform‐positive‐charge
background, which is called the Jellium model [Brack (1993)], as
shown in Fig. 4.8. Since the potential is uniform, the electronic states
are expressed by plane waves as (see Sec. 5.3)

1
ϕk,σ (r) = √ exp(ikr)χ σ , (4.65)
V
Quantum ESPRESSO Course for Solid‐State Physics | 191
Positive ion charges Uniform background
+ + + + + + +
+
+ + + + + + + +

+ + + + + + + +
+ + + + + + +
+

Figure 4.8 A free‐electron gas, where the contribution of nuclear ions is


treated as a uniform‐positive‐charge background.

where V is the volume of the system, k is the wavevector, and χ σ is


the spin function, in which 10 for spin‐up and 01 for spin‐down.
 

Since the unit cell can not be defined by the uniform background,
the value of k is taken not from the Brillouin zone but all the k
space. Since ϕk,σ (r) is a one‐electron wavefunction, ϕk,σ (r) can be
a solution of the Hartree‐Fock equation in Eq. (4.43). Moreover, in
the free‐electron gas, the electron density of the ground state is
also a uniform‐negative‐charge background. Therefore, the electron
density cancels the positive charge background, i.e., Ven + VH = 0
and only the exchange term Vx survives in Eq. (4.43). Thus, the single‐
particle Schrödinger equation of a free‐electron gas can be written as

Vx (r′ , r)ϕk,σ (r′ )dr′ = ϵk ϕk,σ (r),



∇r
(4.66)
2 k,σ
− ϕ (r) +
  
Ix

where the integral Ix is given by

Ix = −
   ϕ∗k′ ,σ′ (r′ )ϕk′ ,σ′ (r)
|r − r′ |
ϕk,σ (r′ )dr′
k
(4.67)
σ ′ ′

 ∗
ϕk′ ,σ′ (r′ )ϕk,σ (r′ ) ′
dr .

|r − r′ |
=− ϕk′ ,σ′ (r)
′ σ′ k
192 | Density‐Functional Theory

By substituting the electronic states in Eq. (4.65) into Eq. (4.67),


we obtain:

 1 exp − i(k′ − k)r′


 
Ix = − exp(ik r)χ σ


V3/2 |r − r′ |

dr′
k ′

 1  exp − i(k′ − k)(r′ − r)


   
dr′ ϕk,σ (r) (4.68)
V r
= −
k′
|r − ′|

 
f(k − k) ϕk,σ (r),
 ′
= −
k′

where the function f is defined as

1 1 4π
f(q) =

, (4.69)
exp(−iqx)
V V q2
dx =
|x|

with q = k′ − k and x = r′ − r. By substituting Eq. (4.69) into


Eq. (4.68), we obtain:

1 4π
 
Ix = −
V ′ |k′ − k|2
ϕk,σ (r)
k

1 4π
  kF 
(4.70)
(2π)3 0 |k′ − k|2
= − dk ϕk,σ (r)

kF k
 
=− F
kF
ϕk,σ (r),
π

where k = |k|, kF is the Fermi wavevector, and F is called the


Lindhard function:

1 − x2  1 + x  k
 
F(x) = 1 + , with x = . (4.71)
2x 1 − x kF
ln 

The function F(x) is shown in Fig. 4.9. F(x) monotonically decreases


from 2 at x = 0 (or k = 0) to 1 at x = 1 (or k = kF ).
Quantum ESPRESSO Course for Solid‐State Physics | 193

k = kF

Figure 4.9 The Lindhard function F(x) is plotted as a function of the


dimensionless x = k/kF .

By substituting Eq. (4.70) into Eq. (4.66), Eq. (4.66) can be


rewritten as

kF k
  
− F
∇r
(4.72)
kF
ϕk,σ (r) = ϵk ϕk,σ (r).
2

π

Then we can obtain the energy as a function of wavevector k as

k2 kF k
 
− F . (4.73)
kF
ϵk,σ
2
=
π

By taking the sum of all occupied states, we obtain the total energy
as
  k2 1   kF
 
k
E= F
2 2 σ kF

σ |k| < kF
π
|k|<kF

2V k kF V k
 kF 2  kF  
F
(2π)3 >0 2 π (2π)3 0 kF
= dk − dk

V k kF V k
 kF 4  kF  
4π dk − 4 4π k F
2
(4.74)
4π3 2 8π k
= dk
0 0 F

V 5 V 4 1 2
k − k x F(x)dx


10π2 F 2π3 F 0
=
  

V 5 V
=1/2

kF − 3 k4F ,
10π 2 4π
=
194 | Density‐Functional Theory

with the factor of 1/2 in the second term of the right‐hand side in the
first line of Eq. (4.74) is needed to compensate for double counting
of the exchange interaction.
For the free‐electron gas, the number of electrons Ne is equal to
the number of occupied states in the systems:

kF
V kF
k3F
Ne = k2 dk = V
 
= 2V . (4.75)
 dk
(2π)3 3π2
= 2
σ k 0 π 0

Therefore, the electron density n is expressed by

Ne k3
n= = F2 . (4.76)
V 3π

By substituting Eqs. (4.75) and (4.76) into Eq. (4.74), the total energy
per electron is expressed by

E
= C1 n2/3 + C2 n1/3 , (4.77)
Ne

where C1 and C2 are constants given by

3 3 3
 1/3
C1 = (3π2 )2/3 = 2.871 and C2 = − = −0.738. (4.78)
10 4 π

The first term (C1 n2/3 ) in Eq. (4.77) represents the kinetic energy, and
the second term (C2 n1/3 ) represents the effective electron‐electron
interaction due to exchange potential. We can see that the exchange
potential reduces the total energy of the system from the kinetic
energy.
For a system with the free electron gas, n is a constant. However,
for a system with the non‐uniform‐electron charge, n becomes
a function of r. Slater [Slater (1951)] introduced the exchange
potential as a function of n(r) as

3 3
 1/3
Vx [n(r)] = 2C2 n1/3 (r) = − n1/3 (r), (4.79)
2 π

where an extra factor of 2 is introduced to account in Eq. (4.79)


because the Vx term in the single‐particle equation (Eq. (4.64)) is
Quantum ESPRESSO Course for Solid‐State Physics | 195
twice as large as the corresponding term in the total energy per
particle (Eq. (4.77)).
For an approximation to include the correlation effects, Slater
and Johnson [Slater and Johnson (1972)] introduced a “fudge factor”
α in Eq. (4.79) as

Vxc [n(r)] = 2αC2 n1/3 (r), (4.80)

where α usually taken in the range 2/3 < α < 1. For example, α =
0.772 and 0.978 [Schwarz (1972)] for He and H atoms, respectively.
Eq. (4.80) is called the Xα potential. > >

4.9 Thomas‐Fermi‐Dirac theory

In Sec. 4.8, we consider a free‐electron gas with a uniform‐positive


background. However, the ions are not represented by a uniform‐
positive background in the real materials. The Thomas‐Fermi‐
Dirac theory gives a first approximation to calculate the total
energy of non‐uniform systems. It is important to note that both
papers [Thomas (1927), Fermi (1928)] published by Thomas and
Fermi in 1927 and 1928, respectively, before the development of the
Hartree‐Fock theory in 1930. Although Thomas and Fermi neglected
exchange and correction potentials, the approximation was extended
by Dirac [Dirac (1930)] in 1930 based on the Hartree‐Fock theory.
Let us consider an atom with Ne electrons, and thus the
atomic number is Z = Ne . We assume that the presence of the non‐
uniform‐positive charge does not change the Hartree‐Fock results
significantly (in Sec. 4.8) for kinetic and exchange energies of the
uniform background. In this case, the total energy per atom in
Eq. (4.77) is modified by adding two terms as follows:

E Z 1 n(r′ )
= C1 n2/3 + C2 n1/3 −

dr′ , (4.81)
Ne |r| 2 |r − r′ |
+

where Z/|r| is the external potential that each electron feels the
presence of the ions and the last term is the Coulomb repulsion
between an electron at position r and all other electrons at r′ , which
is expressed by the density n(r′ ). The factor of 1/2 of the last term
196 | Density‐Functional Theory

is given by avoiding the double‐counting of the Coulomb interaction.


For the non‐uniform systems, Ne is defined by

Ne = n(r)dr.

(4.82)

By substituting Eq. (4.82) into Eq. (4.81), the total energy of the
system is expressed as

E[n(r)] = C1 n (r)dr + C2 n4/3 (r)dr


 
5/3

(4.83)
n(r) 1 n(r)n(r′ ) ′
−Z
 

2 |r − r′ |
dr + dr dr,
|r|

where the first and second terms of the right‐hand side are the
kinetic and exchange energies of the free‐electron gas, respectively,
the third term is the Coulomb attraction between the ions and the
electron density, and the last term describes Coulomb repulsion
between the electrons. n(r) for the ground‐state and the total
energy of the system can be obtained by minimizing the energy
functional E[n(r)]. Although the Thomas‐Fermi‐Dirac approximation
is not accurate good‐enough compared with the present electronic
structure calculation, the approach shows a prototype expression of
the DFT, in which n(r) is a crucial physical quantity to calculate the
ground‐state properties of a many‐electron system.

4.10 DFT: Hohenberg‐Kohn‐Sham

The DFT is established by two papers by Hohenberg and


Kohn in 1964 [Hohenberg and Kohn (1964)] and Kohn and
Sham [Kohn and Sham (1965)] in 1965. The original formulation
discussed in the first paper of Hohenberg and Kohn, which is known
as the Hohenberg‑Kohn theorem. The second paper of Kohn and
Sham developed a method to apply the Hohenberg‐Kohn theorem,
which is referred to as the Kohn‑Sham equation.
Quantum ESPRESSO Course for Solid‐State Physics | 197
4.10.1 Hohenberg‐Kohn theorem

Theorem: There is a one‐to‐one correspondence between


an external potential Ven (r) and an electron density
n(r) [Hohenberg and Kohn (1964)].

Proof: To prove the theorem, we suppose that two different external


potentials, Ven (r) and Ven

(r), give the same electron density n(r). We
will show that this situation is not possible. Let us consider the two
Hamiltonians H and H′ , which contain Ven and Ven ′
, respectively, as
follows:

H = F + Ven and H′ = F + Ven



, (4.84)

where F includes all the terms in the Hamiltonian except for the
external potential. That means that F contains the kinetic energy and
electron‐electron interaction terms. Therefore, F has the same shape
for all Ne ‐electrons systems with any external potentials.
The total energies of the ground states of the Hamiltonians is
given by

E = ⟨ψ|H|ψ⟩ and E′ = ⟨ψ′ |H′ |ψ′ ⟩, (4.85)

where ψ and ψ′ are the wavefunctions of the ground states of H and


H′ , respectively. Here we can say that E ̸= E′ and ψ ̸= ψ′ because the
potentials are not the same. According to the variational principle,
we have:

E < ⟨ψ′ |H|ψ′ ⟩ = ⟨ψ′ |H′ − Ven + Ven |ψ′ ⟩


(4.86)

= E′ + ⟨ψ′ |Ven − Ven



|ψ′ ⟩,
>
and

E′ < ⟨ψ|H′ |ψ⟩ = ⟨ψ|H − Ven + Ven


(4.87)

|ψ⟩
= E − ⟨ψ|Ven − Ven

|ψ⟩.
198 | Density‐Functional Theory

By adding Eqs. (4.86) and (4.87), we obtain:

(E + E′ ) < (E + E′ ) + ⟨ψ′ |Ven − Ven



|ψ′ ⟩ − ⟨ψ|Ven − Ven

|ψ⟩. (4.88)

If the both Ven and Ven



gave the same electron density n(r), the two
terms on the right‐hand side of Eq. (4.88) would be expressed by

(r)] n(r)dr

⟨ψ |Ven −

Ven

|ψ′ ⟩ = [Ven (r) − Ven

(4.89)

and

(r)] n(r)dr.

⟨ψ|Ven − Ven

|ψ⟩ = [Ven (r) − Ven

(4.90)

Eqs. (4.88), (4.89), and (4.90) lead to the contradictory relation


E + E′ < E + E′ . Therefore, our assumption that n(r) is the same
with the different external potentials is not correct. This proves the
Hohenberg‐Kohn theorem.
Corollary 1: The electron density n(r) uniquely specifies the external
>

potential Ven (r) and hence the Hamiltonian H. Because the ground‐
state wavefunction ψ is obtained by solving the Schrödinger equation
for H, ψ must be a unique functional of n(r). Therefore, we obtain the
following equation:

⟨ψ|H − Ven |ψ⟩ = ⟨ψ|F|ψ⟩ = F[n(r)], (4.91)

which tells us that F must be a functional of n(r).


We can also conclude that the total energy E is a functional of
n(r), and E is given by

E[n(r)] = ⟨ψ|H|ψ⟩ = F[n(r)] +



Ven (r)n(r)dr. (4.92)

According to the variational principle, we can deduce that for a given


Ven (r), Eq. (4.92) gives the global minimum value for the correct
electron density n(r). This is because that for any other density n′ (r),
Quantum ESPRESSO Course for Solid‐State Physics | 199
we get a larger E[n′ (r)]:

E[n′ (r)] = F n′ (r) +



 <
Ven (r)n′ (r)dr
(4.93)
= ⟨ψ′ |H|ψ′ ⟩ > ⟨ψ|H|ψ⟩ = E[n(r)].

Corollary 2: If the functional F[n(r)] was known, then by minimizing


the total energy in Eq. (4.92), with respect to variations in the electron
density n(r), the ground state of the electron density and the total
energy are obtained. Therefore, it is important to develop adequate
approximations for the functional F[n(r)] that will be discussed
in Sec. 4.10.2. It is noted that the functional F[n(r)] determines
only non‐degenerated ground state, and thus the Hohenberg‐Kohn
theorem does not provide any guidance concerning excited states.

4.10.2 Kohn‐Sham equation

In Sec. 4.10.1, we discussed the Hohenberg‐Kohn theorem, which


guarantees to give the ground‐state energy. However, the theorem
does not provide any analytical solution of the ground state since
the functional F[n(r)] of Eq. (4.92) is not explicitly given. Kohn and
Sham [Kohn and Sham (1965)] provided an explicit form for F[n(r)]
and constructing the Schrödinger‐like equation based on F[n(r)]
with the SCF method (see Sec. 4.5), which allows the implementation
to computer codes.
Let us write the functional F[n(r)] for the single‐particle states
ϕi (r) as

1 n(r)n(r′ )

drdr′ + Exc [n(r)], (4.94)
|r − r′ |
F[n(r)] = Ke [n(r)] +
2

where electron density n(r) is given by Eq. (4.19) as

n(r) = |ϕi (r)|2 , (4.95)




i
200 | Density‐Functional Theory

Ke [n(r)] represents the kinetic energy of single‐particle states:

 ∇2 
  

Ke [n(r)] = ϕi − r  ϕi , (4.96)
i
2

the second term of the right‐hand side represents the electrostatic


Coulomb repulsion between electrons, with a factor of 1/2 due
to the double counting, and Exc [n(r)] is the exchange‑correlation
functional, which contains all other contributions to the many‐body
energy of electrons. It is noted that Ke [n(r)] is not the exact kinetic
energy of the many‐body system of electrons; thus Exc [n(r)] is needed
to reproduce the correct functional Ke [n(r)].
When we apply the Hohenberg‐Kohn theorem by substituting
Eq. (4.94) into Eq. (4.92), the total energy is given by

1 n(r)n(r′ )
E[n(r)] = Ke [n(r)] +


2 |r − r′ |
drdr′
 (4.97)
+ Exc [n(r)] + Ven (r)n(r)dr,

that we need to minimize with respect to n(r) in order to obtain


the ground‐state energy. We consider a variation in the electron
density with the constraint that the total number of electrons does
not change:

δn(r)dr = 0. (4.98)

By using the Lagrange multiplier, ϵi , with the constraint in Eq. (4.98),


we obtain the Kohn‑Sham equation as

∇2r
 
+ Veff [n(r)] ϕi (r) = ϵi ϕi (r), (4.99)
2

where the effective potential Veff [n(r)] is given by

n(r′ )

δExc [n(r)]
, (4.100)
|r − r′ |
Veff [n(r)] = Ven (r) + dr′ +
δn(r)

where the first term Ven (r) is the external potential due to the ions,
the second term is the Hartree potential VH (see Eq. (4.33)) and the
Quantum ESPRESSO Course for Solid‐State Physics | 201
last term is the variational functional derivative of the exchange‐
correlation interaction Exc [n(r)]. The last term in Eq. (4.100) is
defined as the exchange‑correlation potential:

δExc [n(r)]
Vxc [n(r)] = . (4.101)
δn(r)

By assuming that one knows Exc [n(r)] or at least an adequate


approximation, the Kohn‐Sham equation in Eq. (4.99) can be solved
by the SCF method (see Sec. 4.5) by the following steps:

1. Make an initial guess of nin (r).


2. Calculate Vxc [nin (r)] in Eq. (4.101) and therewith Veff [nin (r)]
in Eq. (4.100).
3. Solve Eq. (4.99) to get ϕi (r).
4. Calculate the new electron density nnew (r) via Eq. (4.95).
5. If nnew (r) is not equal to nin (r), we go back to step (1).
6. If nnew (r) is equal to nin (r), we calculate the total energy by
using Eq. (4.97).

The SCF calculation is an essential step in Quantum ESPRESSO.


The run‐time tutorial for the SCF calculation is shown in Sec. 3.1.1.

4.10.3 Relationship between Kohn‐Sham energy and total


energy

Multiplying the Kohn‐Sham equation in Eq. (4.99) by ϕ∗i (r) from the
left and summing over all occupied states, we obtain the Kohn‑Sham
energy as


(4.102)

ϵi = Ke [n(r)] + Veff (r)n(r)dr.
i
202 | Density‐Functional Theory

By substituting Veff (r) from Eq. (4.100) into Eq. (4.102), then
subtracting the total energy E[n(r)] in Eq. (4.97), we find:

1 n(r)n(r′ )
E[n(r)] =
 

|r − r′ |
ϵi −
2
drdr′ − ΔExc [n(r)]
i
(4.103)
1
 
ϵi − VH (r)n(r)dr − ΔExc [n(r)],
2
=
i

where ΔExc [n(r)] is the difference between exchange and correlation


potentials as

ΔExc [n(r)] = Vxc (r)n(r)dr − Exc [n(r)]. (4.104)

4.11 Exchange‐correlation functional

In Sec. 4.10, we show that how the ground‐state properties are


calculated by the Kohn‐Sham equation. Unfortunately, the exact form
of the exchange‐correlation functional Exc [n(r)] is not known, and we
should take an approximation from many proposed approximations.
The most common approximations are the local‑density approxi‑
mation (LDA) and the generalized gradient approximation (GGA),
which will be discussed in Sec. 4.11.1 and Sec. 4.11.2, respectively. We
also discuss the hybrid functionals in Sec. 4.11.3, which is beyond
the LDA and GGA.

4.11.1 Local‐density approximation

The LDA is an approximation of Exc [n(r)] based on the uniform‐


electron system as discussed in Sec. 4.8. As shown in Eq. (4.77),
the contribution of exchange interaction to the total energy for the
uniform‐electron charge is:

Ex (n) = Ne C2 n1/3 , (4.105)

with C2 = −0.738 (see Eq. (4.78)).


Quantum ESPRESSO Course for Solid‐State Physics | 203
Now, let us consider Eq. (4.105) for the case of the non‐uniform‐
electron charge, in which n is a function of r. If n(r) is a slowly varying
function, the exchange functional Ex [n(r)] is approximated as

ExLDA [n(r)] ≈ Ne C2 n1/3 (r). (4.106)

By substituting the number of electrons Ne in Eq. (4.82) into


Eq. (4.83), we obtain:

ExLDA [n(r)] = ϵx (r)n(r)dr, (4.107)

where ϵx (r) is the exchange energy, which is defined by

ϵx (r) = C2 n1/3 (r). (4.108)

Eq. (4.108) allows to calculate the exchange potential Vx [n(r)] as

δExLDA [n(r)] ∂[ϵx (r)n(r)] 4


= C2 n1/3 (r). (4.109)
∂n(r)
Vx [n(r)] =
3
=
δn(r)

Note that the ratio of the exchange potential in Eq. (4.109) to the
Slater exchange potential in Eq. (4.79) is 2/3.
Since Eq. (4.107) is based on the free‐electron gas (see Sec. 4.8),
the correlation interaction is needed to capture accurately the many‐
body system. Therefore, the energy of correlation interaction ϵc (r) is
added to Eq. (4.107) as

LDA
Exc [n(r)] = [ϵx (r) + ϵc (r)]n(r)dr. (4.110)

When we consider two limit cases of high‐density limit (n → ∞)


and low‐density limit (n → 0), ϵc (r) is proposed in analytic forms by
many groups as follows:
For the high‑density limit:

[ai ln rs + bi ]ris = a0 ln rs + b0 + … (rs ≪ 1), (4.111)




ϵc (rs ) =
i=0
204 | Density‐Functional Theory

where rs is the radius of a sphere containing a single electron in the


atomic unit, which is defined by

4πr3s 1 3
 1/3
, or rs = , (4.112)
3 n(r) 4πn(r)
=

and a0 = 0.0311 and b0 = −0.048 are given by Gell‐Mann and


Brueckner [Gell‐Mann and Brueckner (1957)] with neglecting con‐
tributions to the coefficients of higher order terms (i ≥ 1).
For the low‑density limit:

ci c0 c1 c2
+ 3/2 + 2 + … (rs ≫ 1), (4.113)


rs rs
ϵc (rs ) =
i=0 rs rs
i/2+1
=

where c0 = −1.792, c1 = 2.65, and c2 = −0.73 are given by Carr et


al. [Carr Jr et al. (1961)] for a body‐centered‐cubic lattice system, in
which the higher order terms i ≥ 2 are neglected.
The more accurate numerical calculation of ϵc (rs ) is given by
Ceperley and Alder [Ceperley and Alder (1980)]. They calculated the
total energy for the uniform‐electron system for different values of
rs by using the quantum Monte Carlo method.8 Then the correlation
energy was obtained by subtracting the corresponding kinetic and
exchange energies from the total energy. Based on fitting functions
to the numerical results of Ceperley and Alder, several forms of ϵc (rs )
are proposed by Vosko, Wilk, and Nusair (VWN) [Vosko et al. (1980)],
Perdew and Zunger (PZ) [Perdew and Zunger (1981)], and Perdew
and Wang (PW) [Perdew and Wang (1992)], which are listed in
Table 4.2. Although the expressions of ϵc (rs ) do not depend on
the spin, the parameters of ϵc (rs ) depend on the relative spin
polarization, which is defined by

n↑ (r) − n↓ (r)
, (4.114)
n(r)
ζ=

8 The quantum Monte Carlo method is a set of computational methods to provide a

reliable solution (or an accurate approximation) of the quantum many‐body problem,


in which the anti‐commutation relation of two electrons are taken into account.
Quantum ESPRESSO Course for Solid‐State Physics | 205
Table 4.2 Correlation energy ϵc (rs ) in various models (VWN = Vosko‐Wilk‐
Nusair, PZ = Perdew‐Zunger, and PW = Perdew‐Wang). rs is in atomic unit
(a0 = 1) and ϵc (rs ) is in units of Ry. ζ = [n↑ (r) − n↓ (r)]/n(r) is the relative
spin polarization. Parameters are set for ζ = 0 and ζ = 1 in units of a.u.

Model Correlation energy ϵc (rs ) for ζ = 0 for ζ = 1


{
A ln X(x) x Q
2
+ 2b Q
arctan 2x+b −
A = 0.031091 0.015545
[
bx0 2

b
0)
X(x0 ) X(x)
3.72744 7.06042
ln (x−x +
VWN
c = 12.9352
=
18.0578
]}
2(b+2x0 )
arctan 2x+b , where
Q
Q x0 = −0.10498 −0.32500
x = rs , Q = 4c − b2 , and
√ √

X(x) = x + bx + c 2
....................................................................................................................................................................

A = 0.0311 0.0311
B = −0.048
A ln(rs ) + B + Crs ln(rs ) + Drs ,
C = 0.0020
−0.048
0.0007
where rs < 1 and
PZ D = −0.0116
γ/(1 + β1 rs + β2 rs ) with
√ −0.0048
rs ≥ 1
γ = −0.1423 −0.0843
β1 = 1.0529 1.3981
0.3334 0.2611
>
β 2 =
....................................................................................................................................................................

A = 0.031091 0.015545
α1 = 0.21370 0.20548
[
−2A(1 + α1 rs ) ln 1 + β1 = 7.5957 14.1189
PW ] β2 = 3.5876 6.1977
1 β3 = 1.6382 3.3662
β4 = 0.49294 0.6251)
 p+1

2A β1 rs +β2 rs +β3 rs +β4 rs
1/2 3/2

p = 1.0 1.0

where n↑ (r) and n↓ (r) are the electron densities of up‐spin and
down‐spin states. ζ = 0 and 1 are the spin‐unpolarized and spin‐
polarized systems, respectively.
In Fig. 4.10, we show −ϵc by VWN, PZ, and PW parameters
as a function of rs for the uniform electron system with both
the spin‐unpolarized and spin‐polarized systems by using the
parameters in Table 4.2. All functions fit very well with the
numerical results (the circles and diamonds symbols for the spin‐
unpolarized and spin‐polarized cases, respectively) of Ceperley and
Alder [Ceperley and Alder (1980)]. For rs < 5, which is relevant for
condensed metals, the correlation energy becomes more important.
On the other hand, the correlation energy > becomes a small
206 | Density‐Functional Theory

WVN PZ PW
spin-unpolarized spin-unpolarized spin-unpolarized
spin-polarized spin-polarized spin-polarized

Figure 4.10 The Vosko‐Wilk‐Nusair (VWN), Perdew‐Zunger (PZ), and


Perdew‐Wang (PW) correlation energies −ϵc (rs ) are plotted as functions of
rs for both spin‐unpolarized (solid lines) and spin‐polarized (dashed lines)
systems. The expressions and parameters of ϵc (rs ) are given in Table 4.2. The
circle and diamond symbols are the accurate numerical results (by Ceperley
and Alder) of the uniform electron system with the spin‐unpolarized and
spin‐polarized systems, respectively.
<

contribution for rs > 10, which are relevant for semiconductors or


insulators. Although all functions give the same results in the case
of the uniform electron system, for a specific material, they can
give somewhat different results of the total energy. Among these
functions, the PZ function is often used in Quantum ESPRESSO.

4.11.2 Generalized gradient approximation

As discussed in Sec. 4.11.1, the LDA is an approximation in the


case that n(r) is a slowly varying function. However, n(r) often
changes rapidly in the real material. Moreover, n(r) is generally
spin‐dependent. There are many attempts to improve the accuracy
of the LDA for the real systems where n(r) varies rapidly. The
most successful one is the generalized gradient approximation
(GGA). In the GGA, for the exchange term, an enhancement factor
Fx is added in Eq. (4.107) by Perdew, Burke, and Ernzerhof
(PBE) [Perdew et al. (1996a)] as

ϵx (r)n(r)Fx (s)dr = C2 n4/3 (r)Fx (s)dr, (4.115)


 
ExGGA [n(r)] =
Quantum ESPRESSO Course for Solid‐State Physics | 207
where s is the dimensionless gradient of n(r), which is defined by

s= , with kF = 3π2 n(r)


1/3
, (4.116)

2kF n(r)
|∇n(r)|

and the enhancement factor Fx (s) is expressed by

Fx (s) = 1 + κ − , (4.117)
κ
1 + μs2 /κ

where κ = 0.804 and μ = 0.21951 are constants. Note that the range
of s for the real systems is 0 ≤ s ≤ 3. Eqs. (4.115) and (4.117) show
that

ExGGA [n(r)] ≥ ExLDA [n(r)] with s ≥ 0. (4.118)

Therefore, ExGGA [n(r)] satisfies the Lieb‐Oxford lower


bound [Lieb and Oxford (1981)] as shown in Eq. (4.118).
9

For the correlation term, EcGGA [n(r)] is expressed by ϵc (r) of the


uniform electron system (see Table 4.2) plus an additional term
H[n(r), ζ , which depends on both the gradient ∇n(r) and the spin
polarization ζ. The EcGGA [n(r)] functional is given by PBE as

{ϵc (r) + H[n(r), ζ]} n(r)dr,



EcGGA [n(r)] = (4.119)

where H[n(r), ζ] is given by

1 + At2
  
H[n(r), ζ] = γϕ3 ln 1 + t2 . (4.120)
β
γ 1 + At2 + A2 t4

Here the function A in Eq. (4.120) is given by


   −1
A=
ϵc (r)
exp − 3 − 1 , (4.121)
β
γ γϕ

where β = 0.066725 and γ = 0.031091 are non‐empirical constants,


and ϕ(ζ) = (1 + ζ) + (1 − ζ)
2/3 2/3
/2 is the spin‐scaling factor.


9 The repulsive Coulomb energy (exchange plus correlation energy) has a lower

bound of the form C2 n4/3 (r)dr, where n(r) is the single‐particle electron density.

208 | Density‐Functional Theory

LDA-PW

Expt.

GGA-PW91 GGA-PBE

H2 N2 O2 F2 P2 Cl2 OH CO NO NH3 CH4 H2O

Figure 4.11 Errors of atomization energies of several molecules in units of


eV. The dashed line at zero error corresponds to the experimental values. The
square, cross, and circle symbols are the LDA‐PW functional, the GGA‐PW91
functional, and the GGA‐PBE functional, respectively. All numerical data are
taken from Ref. [Perdew et al. (1996a)].

The function t in Eq. (4.120) is given by t = |∇n(r)|/2ϕks ∇n(r),


which is another dimensionless gradient of n(r), where ks =
4kF /π is the Thomas‐Fermi screening wave number. The F(s) and

H[n(r), ζ] functions in Eqs. (4.115) and (4.119), respectively, are also


developed by Perdew and Wang (PW91) [Perdew et al. (1992)] with
the slightly different forms and parameters. Although both PBE and
PW91 are available in Quantum ESPRESSO, the PBE functional is
often used for many materials (see Sec. 3.1.6).
In Fig. 4.11, we show the error of atomization energies for small
molecules, in which the experimental values are set to zero error.
The atomization energies are calculated by the LDA‐PW, GGA‐PW91,
and GGA‐PBE. Both GGA‐PW91 and GGA‐PBE give almost the same
results, and they are closer to the experimental values than LDA‐
PW. Although LDA‐PW overestimates the atomization energies of
molecules and solids, LDA‐PW remains a popular approximation for
realistic solid‐state calculations since it has a simple form of the
functional compared with GGA.

4.11.3 Hybrid functionals

Hybrid functional is a functional that combines the GGA functional


with a fraction of the non‐local Hartree‐Fock exchange interaction.
The hybrid functionals are developed for solving the famous “band‐
gap problem” [Sham and Schlüter (1983)], in which the LDA and
Quantum ESPRESSO Course for Solid‐State Physics | 209
N electrons N+1 electrons
ϵk ϵk

μ (N+1)
Δxc
ϵg Eg

μ (N)

k k
Figure 4.12 Illustration of the contribution of Δxc , the discontinuity in
Vxc [n(r)]. The energies ϵ of the Kohn‐Sham equation are shown in the form
of a band structure for the (N)‐ and (N + 1)‐ electron systems. The two
differ in a uniform increase of the eigenvalues by Δxc . The quasiparticle
band‐gap Eg is the difference between the two eigenvalues as Eg = ϵN+1 −
(N+1)

ϵN , which leads to Eg = ϵg + Δxc , where the Kohn‐Sham gap is given by


(N)

ϵg = ϵN+1 − ϵN .
(N) (N)

GGA always underestimate the band gap. First, let us explain the
reason why both the LDA and GGA underestimate the band gaps
for semiconductors and insulators even though they are the basis of
good approximations for the ground‐state properties.
The origin of the band‐gap problem is the discontinuity
of chemical potential in the exchange‐correlation potential
Vxc [Sham and Schlüter (1985)]. This is because the density
is given by the summation up to the chemical potential μ as
n(r) = i Θ(μ − ϵi )|ϕi |2 , where Θ is the Heaviside step function.10


Therefore, a change δn(r) leads to a discontinuous jump of μ


from the top of valence band to the bottom of conduction band
when we change from (N) to (N + 1)‐electron systems. Since
Vxc [n(r)] = δExc [n(r)]/δn(r) in Eq. (4.101) is given by derivative
on δn(r), we also expect a discontinuity Δxc (positive value) in
Vxc [n(r)]. Thus, the quasiparticle band‐gap Eg can be divided into

<
10 The Heaviside step function Θ(x) is a discontinuous function, whose value is zero
for negative arguments x < 0 and one for positive arguments x > 0.

>
210 | Density‐Functional Theory

two components as follows [Perdew and Levy (1983)]

Eg = ϵg + Δxc , (4.122)

where ϵg is the gap obtained from the Kohn‐Sham equation for the
ground state. In Fig. 4.12, we show the contribution of Δxc to Eg =
ϵN+1 − ϵN , where ϵJ denotes J‐th energy for (N)‐electron system.
(N+1) (N) (N)

As shown in Secs. 4.11.1 and 4.11.2, both the LDA and GGA do not
consider the discontinuity in Vxc [n(r)] since they are the smooth and
local functions of n(r). Therefore, the LDA and GGA would give zero
Δxc , which is the reason why they always underestimate the value of
Eg even they give a good approximation to ϵg .
Several hybrid functionals have been proposed to obtain non‐
zero value of Δxc . The idea of the hybrid functional is based on a
non‑local functional to the exchange‐correlation functional Exc [n(r)].
As discussed in Sec. 3.6, the exchange potential of the Hartree‐
Fock equation is a non‑local potential (see Eq. (4.47)). The exchange
energy can be obtained from the Hartree‐Fock exchange potential as

1

ϕ∗i (r1 )ϕ∗j (r2 )ϕj (r1 )ϕi (r2 )
ExHF dr1 dr2 , (4.123)
2 i,j |r1 − r2 |
=−

where a factor of 1/2 accounts for double counting of the exchange


interactions. Here, the exchange potential as a function of r1 is given
by as a function of r2 , which is the origin of non‐local potential. By
using ExHF in Eq. (4.123), the expressions of the hybrid functionals
are given in Table 4.3, which are usually constructed as a linear
combination of a non‑local term ExHF and the local terms from the
LDA or GGA. The most popular hybrid functional is B3LYP (B =
Becke, 3 = three coefficients, LYP = Lee‐Yang‐Parr) [Becke (1993),
Stephens et al. (1994)]. For B3LYP, ExGGA and EcGGA are the exchange
functional of Becke (B88) [Becke (1988)] and the correlation func‐
tional of Lee, Yang, and Parr [Lee et al. (1988)], respectively, and the
coefficients ao , ax , and ac are empirically fitted to atomic and molec‐
ular data. The next hybrid functional is PBE0 [Perdew et al. (1996b)]
(PBE = Perdew‐Burke‐Ernzerhof, 0 = no empirical coefficient),
in which the coefficient a = 1/4 is determined by fourth‐order
perturbation theory [Adamo and Barone (1999)].
Quantum ESPRESSO Course for Solid‐State Physics | 211
Table 4.3 Hybrid functionals of B3LYP (Becke, 3‐parameter, Lee‐Yang‐Parr),
PBE0 (Perdew‐Burke‐Ernzerhof), and HSE (Heyd‐Scuseria‐Ernzerhof).

Exchange‑correlation functional Mixing


Model
Exc coefficients
a0 = 0.20,
VWN
+ a ExHF − ExVWN + ax ExGGA +
ax = 0.72,
( )
B3LYP
Exc
( GGA 0 VWN
ac Ec − Ec ac = 0.81
)
....................................................................................................................................................................

PBE0 aExHF + (1 − a)ExPBE + EcPBE a = 1/4


....................................................................................................................................................................

aExHF,SR (η) + (1 − a)EPBE,SR


HSE x
a = 1/4, η = 0.106
(η) +
ExPBE,LR (η) + EcPBE

Although B3LYP and PBE0 are very successful for quantitative


calculations in molecules, they might not be suitable for solids.
This is because the Hartree‐Fock approximation is problematic for
delocalized electrons such as metals. As discussed in Sec. 4.8, the
Hartree‐Fock equation leads to the Lindhard function F(k/kF ) in the
energy ϵk of a uniform‐electron system (see Eq. (4.73)). Therefore,
the velocity dϵk /dk diverges at the Fermi surface, which contradicts
the experiment. The singularity of the Lindhard function at the
Fermi surface, which was pointed out by Bardeen [Bardeen (1936)],
is a consequence of long‐range Coulomb interaction. However, the
divergence of dϵk /dk can be avoided by either if there is a finite gap
(i.e., in an insulator) or if the Coulomb interaction is screened to be
effectively short range, which is explained below.
The Coulomb interaction can be divided into short‐range
(SR) and long‐range (LR) parts by using the Ewald summa‐
tion [Ewald (1921)] as

1 1 − erf(ηr) erf(ηr)
, (4.124)
r r r 
= +
    
SR LR

where erf is the error function11 and η is an adjustable


parameter. Applying Eq. (4.124), the HSE (Heyd‐Scuseria‐

11 The error function


x is a function of a variable x, which is defined as
erf(x) = √2π exp(−t2 )dt.
0
 | 'HQVLW\)XQFWLRQDO 7KHRU\

'JHVSF  &RQWULEXWLRQV RI WKH +DUWUHH HQHUJ\ E*  WKH H[FKDQJH


FRUUHODWLRQ HQHUJ\ EZE  WKH RQHHOHFWURQ HQHUJ\ ERQHH  DQG WKH (ZDOG HQHUJ\
E(ZDOG WR WRWDO HQHUJ\ 'WRW RI JUDSKHQH

(UQ]HUKRI >+H\G GV CN  @ K\EULG IXQFWLRQDO WKH H[SUHVVLRQ LV


JLYHQ LQ 7DEOH  LV REWDLQHG IURP WKH 3%( IXQFWLRQDO 7KH IRUP RI
+6( KDV WKH DGYDQWDJH WKDW LW FDQ EH DSSOLHG WR PHWDOV DQG LW UHGXFHV
WR WKH 3%( IXQFWLRQDO IRU ȅ → ∞ DQG WKH 3%( K\EULG IXQFWLRQDO IRU
ȅ →  $OO %/<3 3%( DQG +6( RSWLRQV DUH DYDLODEOH LQ 4XDQWXP
(635(662 $OWKRXJK WKH K\EULG IXQFWLRQDOV JLYH D EHWWHU YDOXH WKH\
DUH VLJQLILFDQWO\ WLPHFRQVXPLQJ FRPSDUHG ZLWK WKH /'$ DQG **$

 5PUBM FOFSHZ DBMDVMBUJPO

,Q WKH GLVFXVVLRQ XS WR QRZ ZH RQO\ FRQVLGHU WKH WRWDO HQHUJ\ RI


WKH HOHFWURQV E\ VROYLQJ WKH .RKQ6KDP HTXDWLRQ VHH 6HF  
+RZHYHU LQ 4XDQWXP (635(662 WKH WRWDO HQHUJ\ RI D VROLG FRQWDLQV
ERWK WKH HOHFWURQ DQG LRQ FRQWULEXWLRQV DV

'WRW = E* + EZE + ERQHH + E(ZDOG  


     
HOHFWURQV LRQV

ZKHUH E* LV WKH +DUWUHH HQHUJ\ EZE LV WKH H[FKDQJHFRUUHODWLRQ


HQHUJ\ ERQHH LV WKH NLQHWLF HQHUJ\ RI WKH HOHFWURQV SOXV WKH SVHXGRSR
WHQWLDO HQHUJ\ DQG E(ZDOG LV WKH &RXORPE UHSXOVLRQ EHWZHHQ SDLUV
RI LRQV 7KHVH YDOXHV RI WKH HQHUJLHV FDQ EH IRXQG RQ WKH RXWSXW
ILOH RI WKH 4XDQWXP (635(662 FDOFXODWLRQ DV VKRZQ LQ )LJ  IRU
JUDSKHQH VHH RXWSXW ILOH LQ 6HF   ,Q WKLV VHFWLRQ ZH ZLOO H[SODLQ
HDFK HQHUJ\ E\ XVLQJ WKH RNCPG YCXG GZRCPUKQP 6HF   :LWK WKH
Quantum ESPRESSO Course for Solid‐State Physics | 213
plane waves, the convergence of physical properties is controlled by
the cut‑off energy, which can be tested (see Sec. 3.1.2).

4.12.1 Hartree contribution

First, let us discuss the Hartree energy EH , which is expressed as

1

EH [n(r)] = VH (r)n(r)dr, (4.126)
2

where a factor of 1/2 takes into account the double counting and
VH (r) is the Hartree potential, which is given in Eq. (4.33).
For a periodic solid, the total electron density and the potentials
can be expressed in the terms of the plane waves, eiGr , with G is the
reciprocal lattice vectors (see Sec. 5.3) as

n(r) = eiGr n(G), and VH (r) = eiGr VH (G), (4.127)


 

G G

where n(G) and VH (G) are, respectively, given by

n(G) = n(r)e
 
−iGr
dr, and VH (G) = VH (r)e−iGr dr. (4.128)

For the neutral case, the total negative charge of the electrons is
canceled by the total positive charge of the ions. Therefore, the
average potential is zero. Since G = 0 in Eq. (4.127) corresponds
to the average potential over all the space, we can omit G = 0 in
the summation due to charge neutrality.12 Then, by substituting

12 There might be a contribution from the G = 0 term if the systems have an intrinsic

electric dipole moment.


214 | Density‐Functional Theory

Eq. (4.127) into Eq. (4.126), we obtain

1
ei(G+G )r VH (G)n(G′ )dr

EH [n(r)] =
2 ′

GG

Ω
δG+G′ ,0 VH (G)n(G′ )
2
=

Ω (4.129)
VH (G)n(−G)
2
=
G̸=0

Ω
VH (G)n(G),
2
=
G̸=0

where Ω is the volume of the unit cell. Here we assume that n(+G) =
n(−G). On the other hand, by substituting Eq. (4.127) into the Poisson
equation (see Sec. 4.5), we have

n(G)
∇2 VH (r) = −4πn(r) ⇐⇒ VH (G) = 4π . (4.130)
|G|2

By substituting Eq. (4.130) into Eq. (4.129), we obtain

 n2 (G)
EH = 2πΩ . (4.131)
|G|2
G̸=0

4.12.2 Exchange‐correlation contribution

From Eq. (4.110), the exchange‐correlation energy is defined by



Exc [n(r)] = ϵxc (r)n(r)dr, (4.132)

where ϵxc (r) = ϵx (r) + ϵc (r) can be expressed in the terms of the
plane waves as

eiGr ϵxc (G). (4.133)



ϵxc (r) =
G̸=0
Quantum ESPRESSO Course for Solid‐State Physics | 215
By substituting Eqs. (4.133) and (4.127) into Eq. (4.132), we obtain

(4.134)

Exc [n(r)] = Ω ϵxc (G)n(G).
G̸=0

4.12.3 One‐electron contribution and pseudopotential

In Quantum ESPRESSO, Eone‐e defined in Eq. (4.125) is the sum of the


kinetic energy Ke and the external energy Eext of the electrons in the
potential of the atom cores:

Eone‐e [n(r)] = Ke [n(r)] + Eext [n(r)]. (4.135)

The expression of Ke [n(r)] is given by Eq. (4.96), which can be


rewritten in the terms of the plane waves as

|k + G|2 |Ci,k (G)|2 , (4.136)


Ω 
Ke [n(r)] =
2 i
k G

where Ci,k (G) are the coefficients of the wavefunctions ϕi .


The expression of Eext [n(r)] is given by

Eext [n(r)] = Ven (r)n(r)dr. (4.137)

Since the external potential term Ven (r) in Eq. (4.137) is costly
computation with the plane waves, Ven (r) is replaced by a pseudopo‑
tential Vps (r), which is related to replacing the effects of the core
electrons with an effective potential.
A local form of the pseudopotential of a single ion, vps (r),
is proposed by Ashcroft‐Heine‐Abarenkov [Ashcroft (1966),
Heine and Abarenkov (1964)] as
<
v0 r < rcut

vps (r) = , (4.138)
−r Z
r > rcut

where Z is the charge of the ionic core and rcut is the effective radius,
>

which is determined by the radius of core electrons, as shown in Fig.


4.14. The constants rcut and v0 are chosen such that the energy levels
216 | Density‐Functional Theory

v
Core electrons Shell electrons
rcut
r
v0
vps

Z

r

Figure 4.14 The Ashcroft‐Heine‐Abarenkov pseudopotential for a single ion.

of the shell electrons are reproduced for the single‐atom calculations.


For example, let us consider 1s‐ and 2s‐electrons of the C atom as
core electrons. Then, rcut and v0 are adjusted by solving the one‐
particle equation to reproduce the observed ionization energy of the
2p‐electron.
A global form of the pseudopotential can be obtained by taking
into account the contribution of the individual atoms of a unit cell as

vIps (|r − T − RI |), (4.139)



Vps (r) =
I T

where T are the lattice translation vectors, RI denotes the relative


positions of the I‐th atom in the unit cell, and vIps is the pseudopo‐
tential of the I‐th atom. Eq. (4.139) can be expressed by the Fourier
transform as

1
vIps (|r − T − RI |)e−iGr dr
 

V
Vps (G) =
I T

Ncell
e vIps (|r|)e−iGr dr
 

V
−iGRI
=
I
(4.140)
1
e vIps (|r|)e−iGr dr
 
−iGRI
=
I
Ω

SI (G)FI (G),

=
I
Quantum ESPRESSO Course for Solid‐State Physics | 217
in which SI (G) and FI (G) are defined by

1
SI (G) = e−iGRI , and FI (G) = vIps (|r|)e−iGr dr,

(4.141)
Ω

where Ncell is the number of unit cells in the crystal, V = Ncell Ω is


the crystal volume, and I SI (G) and FI (G) are called the structure


factor13 and the atomic form factor14 of the I‐th atom, respectively.
For a given pseudopotential such as Eq. (4.138), the external
energy can be expressed as

(4.142)

Eext [n(r)] = Vps (r)n(r)dr = Ω Vps (G)n(G).
G

Then by substituting Eq. (4.140) into Eq. (4.142), we obtain

SI (G)FI (G)n(G). (4.143)



Eext [n(r)] = Ω
G I

For Quantum ESPRESSO, the Vps is often used with norm‐


conserving or ultra‐soft (non‐local) pseudopotentials (see Sec. 5.4).
In the case of non‐local pseudopotential, however, the expression
of the external energy is rather complicated and needs special
treatment for an efficient implementation [Pickett (1989)].

4.12.4 The Ewald contribution

Finally, we will discuss the last term EEwald in Eq. (4.125). In Quantum
ESPRESSO, EEwald denotes the ion‐ion Coulomb energy, which is given
by

ZI ZJ
N
1n

. (4.144)
2 |RI − RJ |
EEwald =
I̸=J

13 The structure factor contains all the information about the lattice structure. The

structure factor gives the extinction rule for X‐ray diffraction (see Sec. 5.2).
14 The atomic form factor contains the information of each atom, which can be

calculated or obtained by fitting experimental data. The form factor is important for
obtaining the intensity of X‐ray scattering.
218 | Density‐Functional Theory

This sum converges slowly since the potentials of the Coulomb


interaction is a long‐range function of |RI − RJ |. Thus, in order to
converge Eq. (4.144) rapidly, we can apply the Ewald summa‑
tion [Ewald (1921)], which splits the potential into short‐range (SR)
and long‐range (LR) parts. As shown in Eq. (4.124), the Ewald
summation of the ionic potential can be expressed as

ZJ 1 − erf(η|R − RJ |)
Nn n N
ZI
 
|R − RJ | |R − RJ |
=
J J
  
SR
(4.145)
erf(η|R − RJ |)
Nn
ZJ ,

|R − RJ |
+
J
  
LR

in which, the LR part can be expressed in reciprocal space


as [Marder (2010)]

erf(η|R − RJ |) e−|G| /(4η) eiG(R−RJ )


Nn Nn 
4π 
2 2

ZJ ZJ . (4.146)

|R − RJ | V J |G|2
=
J G̸=0

Then the both SR and LR parts can converge quickly with increasing
|G| and |R| for a given value of η. Therefore, the ion‐ion Coulomb
energy can be obtained by a few terms in the summations over |G|
and J.
When we insert Eqs. (4.145) and (4.146) into Eq. (4.144), we
must subtract separately the term for R = RJ in Eq. (4.146), to avoid
the divergence. If we adopt the following equation:

erf(η|R − RJ |)
 
= 2√ , (4.147)
η
|R − RJ |
lim
R→RJ π
Quantum ESPRESSO Course for Solid‐State Physics | 219
Eq. (4.144) can be rewritten as

1 − erf(η|RI − RJ |)
N
1n

ZI ZJ
2 |RI − RJ |
EEwald =
I̸=J

e−|G| /(4η) eiG(RI −RJ )


Nn 
2π 
2 2

ZI ZJ (4.148)
V I,J |G|2
+
G̸=0

Nn
Z2J √ .
 η

J
π

Thus, we can avoid the divergence, too.

4.13 Ionic forces

The ionic forces are used to study the dynamics of ions such as
optimizing ionic positions (see Sec. 3.1.4). Using the total energy in
Sec. 4.12, we can calculate the forces that act to the ion I, which is
given by taking the derivative of the total energy with respect to
individual ionic position RI as

∂Etot ∂EEwald ∂Eext


FI = − . (4.149)
∂RI ∂RI ∂RI
=− −

There are two contributions to the ionic forces, one from the
ion‐ion interaction energy EEwald in Eq. (4.148), and one from the
ion‐electron interaction energy Eext in Eq. (4.142). For the ion‐ion
interaction energy, the force of ion I is given by Eq. (4.148) as follows:

∂EEwald ZI ZJ
n N
Fion (RI − RJ ), (4.150)

I
∂RI |RI − RJ |3
=− =
J̸=I

which can be solved by a method analogous to the Ewald summation


that is used in Sec. 4.12.4.
220 | Density‐Functional Theory

As for the ion‐electron interaction energy, the force is calculated


by adopting the Hellmann‑Feynman theorem15 [Feynman (1939),
Hellmann (1937)] as

∂Eext    ∂Vps  
 
Fion‐e ϕ . (4.151)
I
∂RI ∂RI  i
=− =− ϕi 
i

For the I‐th pseudopotential Vps I


(r) = T vIps (|r − T − RI |) (see


Eq. (4.139)), Eq. (4.151) is rewritten in term of n(r) as

∂Vps (r)
Fion‐e n(r)dr.

(4.152)
I
∂RI
=−

Eq. (4.152) tells us that Fion‐e


I does not depend on any derivative of
n(r). The Hellmann‐Feynman force is straightforwardly calculated
by the calculated n(r) once the self‐consistent electronic density is
obtained.

4.14 A simple DFT‐LDA program for an atom

This section shows a step‐by‐step calculation of the ground‐state


energy of a helium atom for understanding the DFT for an atom.
The DFT calculation of an atom is also important since Quantum
ESPRESSO does not support the package for an atom. We use Python
language (version 3) to write the simplest DFT code for the LDA (see
Sec. 4.11.1). The present tutorial contains three main calculations:
(1) to solve the radial Schrödinger equation by using the Numerov
algorithm, (2) to solve the radial Possion equation by using the Verlet
algorithm, and (3) incorporating to calculate the ground‐state energy
of the helium atom by using the LDA with PZ parameters. This tutorial
requires the basic Python programming and Jupyter notebook, which
are given in Chapter 6.

15 The Hellmann‐Feynman theorem states that the forces are given by the

expectation value of the derivative of the external potential.


Quantum ESPRESSO Course for Solid‐State Physics | 221
4.14.1 Radial Schrödinger equation

 Purpose: The purpose of the first step is to calculate the electron


density of the helium atom by solving a radial Schrödinger equa‑
tion, which is the Schrödinger equation in spherical coordinates.
 Background: In spherical coordinates, the wavefunction ϕ(r) =
ϕ(r, θ, φ) can be written as the product of a radial function R(r) and
an angular function Y(θ, φ):

ϕ(r, θ, φ) = R(r)Y(θ, φ). (4.153)

Then we obtain the radial Schrödinger equation for R(r) as


follows [Kittel (1976)]

1 d ℓ(ℓ + 1)
   
r2 R(r) = ϵR(r), (4.154)
d
2r2 dr 2r2
− + + V(r)
dr

where ℓ is azimuthal quantum number ℓ = 0, 1, 2, … . Let us define a


reduced radial wavefunction u(r) as

u(r) = rR(r). (4.155)

By substituting Eq. (4.155) into Eq. (4.154), we obtain the


reduced radial equation for 1s orbital by substituting ℓ = 0 as

1 d2
 
u(r) = ϵu(r). (4.156)
2 dr2
− + V(r)

Eq. (4.156) can be rewritten in the form of a second‐order differential


equation as

d2 u
(4.157)
dr2
= −k(r)u(r),

where k(r) is defined by

k(r) = 2 [ϵ − V(r)] . (4.158)


222 | Density‐Functional Theory

A method to solve Eq. (4.157) is the Numerov algorithm.16


In the Numerov algorithm, the reduced radial wavefunction u(r) is
expressed as

2c0 un (r) − c1 un−1 (r)


un+1 (r) = , (4.159)
c2

where c0 , c1 , and c2 are defined by

c0 = 1 − 12 h kn (r)

 5 2 2

c1 = 1 + 12 h kn−1 (r)
1 2 2 , (4.160)
c = 1 +
12 h kn+1 (r)
1 2 2


2

where h = rn+1 − rn . By given two initial values, u0 (r) and u1 (r),


Eq. (4.159) can be used to determine un (r) for n = 2, 3, 4, … with an
error in the order of h6 .
We normalize u(r) as

u2 (r)dr = 1.

(4.161)

Then, the electron density n(r) of a single electron for the 1s state
(Y(θ, φ) = 1/ 4π) is given by

R2 (r) u2 (r)
n(r) = . (4.162)
4π 4πr2
=

Note that, for the helium atom, the total electron density is 2n(r) since
we have two electrons.
 How to run: To run this tutorial, the readers will do the following
command lines:

$ cd ~/SSP -QE/dft -he


$ jupyter -lab check -schrodinger.ipynb

‐ Line 1: Go to the dft-he directory that includes the input files.


‐ Line 2: Run check-schrodinger.ipynb by JupyterLab.

16 The Numerov algorithm is a numerical method to solve ordinary differential

equations of second order in which the first‐order term does not appear.
Quantum ESPRESSO Course for Solid‐State Physics | 223
 Input file: The input files include a subroutine file
(schrodinger.py) and a main file (check-schrodinger.ipynb).
The subroutine contains the Numerov algorithm in Eq. (4.159) and
the radial Schrödinger equation in Eq. (4.157), and the main file
calculates the ground‐states energy and wavefunction for the helium
atom.

SSP‑QE/dft‑he/schrodinger.py

1 # Import the numpy modules


2 import numpy as np
3 # The Numerov algorithm for equation:
4 # u"(r) = -k(r)u(r) with k(r)=2(eps -V)
5 # Input: k(r), two initial values u0(r) and u1(r)
6 # Output: u(r)
7 def numerov(k, u0 , u1 , dr):
8 u = np.zeros_like(k)
9 u[0] = u0
10 u[1] = u1
11 for i in range (2, len(k)):
12 dr_sqr = dr**2
13 c0 = (1 + 1/12.* dr_sqr*k[i -2])
14 c1 = 2*(1 - 5/12.* dr_sqr*k[i -1])
15 c2 = (1 + 1/12.* dr_sqr*k[i])
16 u[i] = (c1*u[i-1] - c0*u[i -2])/c2
17 return u
18 # Solve the reduced radial Schrodinger equation:
19 # u"(r) = -2(eps -V)u(r)
20 # Inputs: r and V(r)
21 # Outputs: eigen energy eps and u(r)
22 def solve_schrodinger (r, V, eps_min =-4, eps_max =0,
maxiter =100, stoptol = 0.0001):
23 dr = r[1] - r[0]
24 for i in range(maxiter):
25 eps = (eps_min + eps_max)/2.
26 k = 2*( eps - V)
27 # starting from r*exp(-r)
28 u0 = r[-1]* np.exp(-r[-1])
29 u1 = r[-2]* np.exp(-r[-2])
30 # call the Numerov algorithm
31 u = numerov(k[::-1], u0 , u1 , dr)
32 u = u[:: -1]
33 num_nodes = np.sum(u[1:]* u[:-1] < 0)
34 if num_nodes == 0 and np.abs(u[0]) <=
stoptol:
35 return (eps , u)
36 if num_nodes == 0 and u[0] > 0:
37 eps_min = eps
224 | Density‐Functional Theory

38 else:
39 assert num_nodes > 0, 'expect #nodes >0
since u[0]<0 while u[infty]>0'
40 eps_max = eps
41 raise Exception('Not converged after %d
iterations.' %( maxiter))

SSP‑QE/dft‑he/check‑schrodinger.ipynb

1 # Import the necessary packages and modules


2 # sci.mplstyle is customized Matplotlib style
3 import matplotlib.pyplot as plt
4 plt.style.use('../ matplotlib/sci.mplstyle ')
5 import numpy as np
6 from schrodinger import solve_schrodinger
7
8 # Set r from 0 to 15 bohr with 50000 steps
9 r, dr = np.linspace (0, 15, 50001 , retstep=True)
10 r = r[1:] # Skip r = 0
11 # Set kinetic energy of helium
12 Z = 2
13 V_en = -Z/r
14
15 # Solve the reduced radial equation:
16 # u"(r) = -2(eps -V_en)u(r)
17 eps , u = solve_schrodinger (r, V_en)
18 # Normalize u(r)
19 u /= np.linalg.norm(u)* np.sqrt(dr)
20
21 # Total electron density of helium
22 n = 2*(u**2/4/ np.pi/r**2)
23 # Compare with exact density of helium
24 n_exact = (2*Z**3/ np.pi)*np.exp(-2*Z*r)
25
26 # Plot the comparison
27 plt.figure ()
28 plt.plot(r, n, label='numerov ')
29 plt.plot(r, n_exact , ':', lw=4, label='exact ')
30 plt.xlabel('$r$ ($a_0$)')
31 plt.ylabel('$n(r)$ (a.u.)')
32 plt.title('Electron density of helium ')
33 plt.legend(loc='best ')
34 plt.xlim(0, 5)
35 plt.show ()

 Output data: In main work area of the JupyterLab interface,


the readers can see the plot as shown in Fig. 4.15. We can see
Quantum ESPRESSO Course for Solid‐State Physics | 225

Figure 4.15 Electron density of helium. Solid and dashed lines denote the
electron densities, which are obtained by the Numerov algorithm and
analytical methods, respectively.

that the electron density from the numerical method (the Numerov
algorithm) reproduces the exact electron density of the helium atom
given by Eq. (4.21).

4.14.2 The Poisson equation

 Purpose: Next, let us calculate the Hartree potential from the


reduced radial wavefunction u(r).
 Background: Let us define a Hartree potential as a function of r,
UH (r) = rVH (r), then the Poisson equation in Eq. (4.32) reduces to the
following differential equation:

∇2 UH (r) = −4πrn(r). (4.163)

Eq. (4.163) is an ordinary second‐order differential equation


which can be solved by using the Verlet algorithm.17 By substituting
Eq. (4.162) into Eq. (4.163), we have

u2 (r)
∇2 UH (r) = − . (4.164)
r
17 The Verlet algorithm is a simple method for integrating second order differential

equations of the form x′′ (t) = f[x(t), t].


226 | Density‐Functional Theory

The Verlet algorithm for Eq. (4.164) is expressed as following:

UH (r + δr) = 2UH (r) − UH (r − δr) + δr2 ∇2 UH (r). (4.165)

The boundary conditions are also applied to solve Eq. (4.164).


For the hydrogen, the conditions are UH (0) = 0 and UH (rmax ) = 1.
Note that, for the helium case, the Hartree potential is 2UH (r)/r since
the electron density is 2n(r).
 How to run: To run this tutorial, the readers will do the following
command lines:

$ cd ~/SSP -QE/dft -he


$ jupyter -lab check -poisson.ipynb

‐ Line 1: Go to the dft-he directory that includes the input files.


‐ Line 2: Run check-poisson.ipynb by JupyterLab.
 Input file: The input files include two subroutine
files (schrodinger.py and poisson.py) and a main file
(check-poisson.ipynb). The subroutine poisson.py contains
the Verlet algorithm in Eq. (4.165) and the Poisson equation in
Eq. (4.164), and the main file calculates the Hartree potential for the
helium atom.

SSP‑QE/dft‑he/poisson.py

1 # Import the numpy modules


2 import numpy as np
3 # The Verlet algorithm
4 def verlet(f, U0 , U1 , dr):
5 dr_sqr = dr**2
6 U_H = np.zeros_like(f)
7 U_H [0] = U0
8 U_H [1] = U1
9 for i in range (2, len(f)):
10 U_H[i] = 2* U_H[i-1] - U_H[i-2] + f[i -1]*
dr_sqr
11 return U_H
12 # Solve the Poisson equation
13 # Inputs: r and u(r)
14 # Outputs: U_H(r)
15 def solve_poisson(r, u):
16 # start the Verlet algorithm
17 dr = r[1]-r[0]
Quantum ESPRESSO Course for Solid‐State Physics | 227
18 f = -u**2/r
19 U0 , U1 = r[0], r[1]
20 U_H = verlet(f, U0 , U1 , dr)
21 # fix the boundary condition
22 U_H = U_H - (U_H [-1]-1)/r[-1]* r
23 return U_H

SSP‑QE/dft‑he/check‑poisson.ipynb

1 # Import the necessary packages and modules


2 # sci.mplstyle is customized Matplotlib style
3 import matplotlib.pyplot as plt
4 plt.style.use('../ matplotlib/sci.mplstyle ')
5 import numpy as np
6 from schrodinger import solve_schrodinger
7 from poisson import solve_poisson
8
9 # Set r from 0 to 15 bohr with 50000 steps
10 r, dr = np.linspace (0, 15, 50001 , retstep=True)
11 r = r[1:] # Skip r = 0
12 # Set kinetic energy of helium
13 Z = 2
14 V_en = -Z/r
15
16 # Solve the radial Schrodinger equation
17 eps , u = solve_schrodinger (r, V_en)
18 # Normalize the radial wave function u(r)
19 u /= np.linalg.norm(u)* np.sqrt(dr)
20
21 # Solve the Poisson equation
22 U_H = solve_poisson(r, u)
23 # Convert U_H(r) to the Hartree potential V_H(r)
24 # The factor of 2 since helium has two electrons
25 V_H = 2* U_H/r
26 # Compare with the exact Hartree potential
27 V_exact = -2*(Z + 1/r)*np.exp(-2*Z*r) + Z/r
28
29 # Plot the comparison
30 plt.plot(r, V_H , label='verlet ')
31 plt.plot(r, V_exact , ':', lw=4, label='exact ')
32 plt.xlabel('r (bohr)')
33 plt.ylabel('$\mathcal{V}_H(r)$ (a.u.)')
34 plt.title('Hartree potential of helium ')
35 plt.legend(loc='best ')
36 plt.xlim(0, 5)
37 plt.show ()
228 | Density‐Functional Theory

Figure 4.16 The Hartree potential of helium. Solid and dashed lines denote
the Hartree potential, which are obtained by the Verlet algorithm and
analytical methods, respectively.

 Output data: In the main work area of the JupyterLab interface,


the readers can see the plot as shown in Fig. 4.16. We can see that the
Hartree potential from the numerical method (the Verlet algorithm)
reproduces the exact Hartree potential of the helium atom given by
Eq. (4.39), too.

4.14.3 DFT‐LDA for helium

 Purpose: Finally, we calculate the ground‐state energy of the


helium atom within LDA.
 Background: For the LDA, the exchange function ϵx (r) and the
exchange potential Vx [n(r)] are defined by (see Sec. 4.11.1):

4
ϵx (r) = C2 n1/3 (r) and Vx [n(r)] = C2 n1/3 (r), (4.166)
3

respectively, where C2 = −0.738.


We adopt the PZ correlation function ϵc (rs ), which is defined by
(see Table 4.2):

A ln(rs ) + B + Crs ln(rs ) + Drs if rs < 1



ϵc (rs ) = , (4.167)
γ/(1 + β1 rs + β2 rs ) if rs ≥ 1

>
Quantum ESPRESSO Course for Solid‐State Physics | 229
where the parameters A, B, C, D, γ, β1 , β2 are given in Table 4.2, too.
Then, the correlation potential is given by

∂[ϵc (r)n(r)]
. (4.168)
∂n(r)
Vc [n(r)] =

By substituting the electron density n(r) = 3/(4πr3s ) from Eq. (4.112)


into Eq. (4.168), we obtain:

rs d
 
Vc (rs ) = 1− ϵc (rs ). (4.169)
3 drs

By substituting Eq. (4.167) into Eq. (4.169), we


obtain [Thijssen (2007)]:

A ln(rs ) + B − A3 + 23 Crs ln(rs ) + 2D−C


3 rs , for rs < 1

Vc (rs ) = .
γ(1 + 6 β1 rs + β2 rs )/(1 + β1 rs + β2 rs )2 ,
7
for rs ≥ 1
√ √

(4.170)
>

With the presence of the exchange‐correlation potential,


Eq. (4.156) becomes:

1 d2
 
en H xc u(r) = ϵu(r), (4.171)
2 dr2
− + V (r) + V (r) + V [n(r)]

where Vxc [n(r)] = Vx [n(r)] + Vc (rs ). Then, the total energy of the
helium atom in Eq. (4.103) can be rewritten by

E = 2ϵ −

VH (r)u2 (r)dr − ΔExc [n(r)], (4.172)

where ΔExc [n(r)] is expressed by



ΔExc [n(r)] = Vxc [n(r)]n(r)dr − Exc [n(r)]

= {Vxc [n(r)] − ϵxc [n(r)]}n(r)dr (4.173)

=2 {Vxc [n(r)] − ϵxc [n(r)]}u2 (r)dr,
230 | Density‐Functional Theory

where ϵxc [n(r)] = ϵx [n(r)] + ϵc (rs ). Note that we have to use the
electron density n(r) and VH (r) for the helium atom.
 How to run: To run this tutorial, the readers will do the following
command lines:

$ cd ~/SSP -QE/dft -he


$ jupyter -lab dft -lda -he.ipynb

‐ Line 1: Go to the dft-he directory that includes the input files.


‐ Line 2: Run dft-lda-he.ipynb with JupyterLab.
 Input file: The input files include two subroutine
files (schrodinger.py and poisson.py) and a main file
(dft-lda-he.ipynb). The main file calculates the total energy
of the helium atom.

SSP‑QE/dft‑he/dft‑lda‑he.ipynb

1 # Import the necessary packages and modules


2 import numpy as np
3 from schrodinger import solve_schrodinger
4 from poisson import solve_poisson
5
6 # Set r from 0 to 15 bohr with 50000 steps
7 r, dr = np.linspace (0, 15, 50001 , retstep=True)
8 r = r[1:] # Skip r = 0
9 # Parameter for exchange potential Vx
10 C2 = -0.738;
11 # PZ parameters for correlation functional Vc
12 Aa = 0.0311; B= -0.048; C= 0.002; D= -0.0116; gamma=
-0.1423; beta1= 1.0529; beta2= 0.3334;
13
14 # Define the exchange potential
15 def exc(n):
16 V_x = (4/3)*C2*n**(1/3)
17 e_x = C2*n**(1/3)
18 return (V_x , e_x)
19
20 # Define the correlation potential
21 def cor(n):
22 rs = (3/4/ np.pi/n)**(1/3)
23 V_c = np.piecewise(rs ,[rs <1,rs >=1] ,[ lambda rs:
Aa* np.log(rs)+B-Aa /3+2/3* C* rs* np.log(rs)+(2*
D-C)*rs/3, lambda rs: gamma /(1+ beta1* rs
**(1/2)+beta2*rs)*(1+7/6* beta1*rs **(1/2)+
beta2* rs)/(1+ beta1* rs **(1/2)+beta2* rs)])
Quantum ESPRESSO Course for Solid‐State Physics | 231
24 e_c = np.piecewise(rs ,[rs <1,rs >=1] ,[ lambda rs:
Aa*np.log(rs)+B+C*rs*np.log(rs)+D*rs , lambda
rs: gamma /(1+ beta1* rs **(1/2)+beta2* rs)])
25 return (V_c , e_c)
26
27 # The main DFT for helium with the LDA
28 def dft(V_en , maxiter =100, stop =0.001 , correlation=
False , verbose=False):
29 V_H = np.zeros_like(V_en)
30 V_x = np.zeros_like(V_en)
31 V_c = np.zeros_like(V_en)
32 e_x = np.zeros_like(V_en)
33 e_c = np.zeros_like(V_en)
34 eps = None
35 for i in range(maxiter):
36 eps_old = eps
37 V = V_en + V_H + V_x + V_c
38 V_xc = V_x + V_c
39 e_xc = e_x + e_c
40 # eigen energy and u(r)
41 eps , u = solve_schrodinger (r, V)
42 # normalize u(r)
43 u /= np.linalg.norm(u)* np.sqrt(dr)
44 # convergence of eigen energy
45 if eps_old is not None:
46 if verbose:
47 print('Step %02d: eps = %f, |eps -
eps_old| = %f' %(i, eps , abs(eps
- eps_old)))
48 if abs(eps - eps_old) < stop:
49 return 2* eps - dr*np.dot(V_H , u**2)
- 2* dr*np.dot(V_xc - e_xc , u**2)
50 elif verbose:
51 print
52 # update Hartree potential
53 U_H = solve_poisson(r, u)
54 V_H = 2* U_H/r
55 # total electron density
56 n = 2*(u**2/4/ np.pi/r**2)
57 # update exchange potential
58 V_x , e_x = exc(n)
59 # update correlation potential
60 if correlation:
61 V_c , e_c = cor(n)
62 elif correlation:
63 V_c = 0
64 e_c = 0
232 | Density‐Functional Theory

65 raise Exception('Not converged after %d


iterations; |eps - eps_old| = %f' %(maxiter ,
abs(eps - eps_old)))
66
67 print('Total energy of He without correlation ')
68 print('JOB DONE: total energy E = %f Ha' %(dft(-2/r,
correlation=False ,verbose=True)))
69 print('--------------------------------------')
70 print('Total energy of He with correlation ')
71 print('JOB DONE: total energy E = %f Ha' %(dft(-2/r,
correlation=True , verbose=True)))

 Output data: In main work area of the JupyterLab interface, the


readers can see the total energy of the helium atom as follows:

Total energy of He without correlation


Step 01: eps = -0.320312 , |eps - eps_old| = 1.674937
Step 02: eps = -0.625862 , |eps - eps_old| = 0.305550
Step 03: eps = -0.470276 , |eps - eps_old| = 0.155586
Step 04: eps = -0.537201 , |eps - eps_old| = 0.066925
Step 05: eps = -0.505615 , |eps - eps_old| = 0.031586
Step 06: eps = -0.519958 , |eps - eps_old| = 0.014343
Step 07: eps = -0.513306 , |eps - eps_old| = 0.006653
Step 08: eps = -0.516357 , |eps - eps_old| = 0.003052
Step 09: eps = -0.514954 , |eps - eps_old| = 0.001404
Step 10: eps = -0.515625 , |eps - eps_old| = 0.000671
JOB DONE: total energy E = -2.716883 Ha
--------------------------------------
Total energy of He with correlation
Step 01: eps = -0.376953 , |eps - eps_old| = 1.618296
Step 02: eps = -0.661568 , |eps - eps_old| = 0.284615
Step 03: eps = -0.528656 , |eps - eps_old| = 0.132912
Step 04: eps = -0.582932 , |eps - eps_old| = 0.054276
Step 05: eps = -0.559113 , |eps - eps_old| = 0.023819
Step 06: eps = -0.569275 , |eps - eps_old| = 0.010162
Step 07: eps = -0.564880 , |eps - eps_old| = 0.004395
Step 08: eps = -0.566772 , |eps - eps_old| = 0.001892
Step 09: eps = -0.565948 , |eps - eps_old| = 0.000824
JOB DONE: total energy E = -2.826743 Ha

The total energy without the correlation energy is −2.716 Ha,


which is close to the reported value (−2.72 Ha [Thijssen (2007)]).
However, it is less accurate than the Hartree‐Fock method (−2.85 Ha,
see Sec. 4.6). This is because the exchange potential by the LDA is an
approximation for the uniform‐electron charge. Therefore, the total
energy can be improved by considering the correlation potential.
As a result, we obtain the total energy with the PZ correlation
functional is −2.827 Ha, which is close to the reported value (−2.83
Ha [Thijssen (2007)]). Although −2.827 Ha is still worse than the
Quantum ESPRESSO Course for Solid‐State Physics | 233
Hartree‐Fock result, it is an important improvement with respect to
−2.716 Ha. The experimental value of the total energy of the helium
atom is −2.9 Ha [Sucher (1958)].

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy