• No results found

2.3 Computational Realizations

2.3.1 Gaussian and Plane Waves Method (GPW)

So far, only the general framework of DFT and some concepts such as pseu- dopotentials and basis sets have been introduced. In this section, an efficient and accurate method for performing DFT calculations is presented, namely the Gaussian and plane waves (GPW) method. Although there are other ways of conducting a DFT calculation, e.g. using only plane waves or Gaussians as basis, the somewhat advanced hybrid GPW method will be explained here, because a part of this work was the implementation of the stress tensor into the CP2K [21] code (see Chapter 7), which employs GPW. Additionally, GPW opens the way for all-electron calculations in a periodic description, which will be described in the next section.

Many quantum chemical programs, that use periodic boundary conditions, make use of plane waves (PW) for the expansion of the Kohn-Sham orbitals (see Sec. 2.1.4). A famous example is CPMD [20], which has also been used for this work. PW as a basis set for quantum chemical calculations are a rather unnatu- ral choice, although they have a couple of advantages compared to the standard Gaussian basis sets. PW are atomic position independent and therefore they do not give rise to Pulay forces. The calculation of the Hartree potential is easy and checking the convergence with respect to the basis set size is trivial (see Sec. 2.2.2). Last, but not least, the use of the fast Fourier transform technique considerably simplifies many algebraic manipulations and allows for almost linear scaling with the system size. But there are also some disadvantages. Most noticeably, a large number of PW is needed to reproduce wave functions close to the nuclei, even with the use of pseudopotentials. Even more disturbing is the fact, that all space is filled with the same number of basis functions, i.e. empty space, where no elec- tron density is presented, is described in the same way as atom-filled regions. PW also complicate the interpretation of the results, since they have to be projected on localized basis sets before the relevant chemistry can be extracted.

The use of Gaussians, in turn, leads to very unfavorable scaling with the system size due to the Hartree term. Additionally, they give rise to Pulay forces and basis set superposition errors (BSSE). A periodic description, as desired in solid state

28 2 Basic Theory

calculations, is not natural for such a basis set. Thus, the GPW method tries to combine the usage of both basis sets [23]. The aim, of course, is to remove the main defects of the individual methods, while preserving most of the advantages. For example, the bottleneck of calculations using Gaussians, the Hartree term, can be removed by solving the Poisson equation with plane waves, leading then to a linear scaling. This work follows closely the descriptions given in [24]. The central idea of GPW is the representation of the density in two different basis sets. These are, as mentioned above, Gaussian functions and plane waves. Thus, the density ρ is given by

ρ(r) =X

µ,ν

Pµνφµ(r)φν(r) , (2.72)

where Pµν is a density matrix element, or by plane waves

˜ ρ(r) = 1 Ω X G ˜ n(G) exp (iG · r) , (2.73)

where Ω is the volume of the unit cell and G are the reciprocal lattice vectors.

The expansion coefficients are such that ˜ρ(r) is equal to ρ(r). Using this dual

representation, the Kohn-Sham DFT energy expression is defined as E[ρ] = ET[ρ] + EV[ρ] + EH[ρ] + Exc[ρ] + EII =X µ,ν Pµνhφµ(r)| − 1 2∇ 2 ν(r)i +X µ,ν Pµνhφµ(r)|VlocP P(r)|φν(r)i +X µ,ν Pµνhφµ(r)|VnlP P(r, r 0 )|φν(r0)i + 2πΩX G ˜ ρ∗(G)˜ρ(G) G2 + Z exc(r)dr +1 2 X I6=J ZIZJ |RI− RJ| , (2.74)

where ET[ρ] is the electronic kinetic energy, EV[ρ] is the electronic interaction

2.3 Computational Realizations 29

correlation energy and EII is the interaction energy of the ionic cores with charges

ZA and positions RA. This formula can be compared directly to Eq. (2.42), only

here, the interaction energy of the ionic cores has been added. Furthermore, the external potential v(r) has been written as sum of the local and non-local contributions of the pseudopotential (see Sec. 2.2.1). The sum over the Kohn- Sham orbitals is now replaced by the summation over all primitive Gaussians, i.e. the basis functions. In Eq. (2.74) the major advantage of the GPW method can be seen. The Hartree energy is now given in the reciprocal space. The Hartree potential, which is non-trivial to obtain in real space, can be found as

vH(G) =

4π ˜ρtot(G)

G2 , (2.75)

where the total charge distribution ˜ρtot(G) = ˜ρ(G) + ˜ρc(G) with the nuclear charge

density ˜ρc(G) has been used. The real-space potential is then obtained by a simple

Fourier transformation.

The treatment of the Hartree term with plane waves naturally includes the pe- riodic boundary conditions. The remaining terms, which use the Gaussian basis

set, do not obey this requirement. Therefore, the Cartesian Gaussians φµ(r) have

to be turned into periodic functions. This is accomplished by extending φµ(r)

over all its periodic images:

φPµ(r) =X

i

φµ(r − li) , (2.76)

where the sum is over all triplets of positive and negative integers i = i, j, k, li = il1 + jl2 + kl3. l1, l2 and l3 are the three lattice vectors. Of course, this

summation has to be truncated at some point. This is usually done by a distance criterion, i.e. the image is only taken into account, if the product of the two

gaussians is non-negligible to within some threshold, typically 10−10 to 10−14.

In conclusion, GPW treats all terms but the Hartree energy in the Gaussian basis. These parts are all calculated analytically, since they only involve integrals over Gaussian functions and products of Gaussians. A product of two Gaussians is again a Gaussian, so these terms can be computed easily in real space. Only the Hartree term, which is difficult to evaluate in real space is obtained in the recipro-

30 2 Basic Theory

cal space, which saves computational time and leads to a better scaling behavior. Furthermore, this method can be extended to the Gaussian and Augmented Plane Waves (GAPW) method, which is introduced in the next section.