+ All Categories
Home > Documents > Nonlocal correlation in density functional theory

Nonlocal correlation in density functional theory

Date post: 14-Apr-2018
Category:
Upload: jan-hermann
View: 220 times
Download: 0 times
Share this document with a friend
102
Master’s thesis Nonlocal correlation in densit y functional th eory Jan Hermann Stu dy pro gram: Chemistry Ad viser: RNDr. Ota Blud ský , CSc. Prague,
Transcript
Page 1: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 1/102

Master’s thesis

Nonlocal correlationin density functional theory

Jan Hermann

Study program: Chemistry Adviser: RNDr. Ota Bludský, CSc.

Prague,

Page 2: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 2/102

I hereby declare that this thesis is a result

of my own work and eort and that all my 

intellectual debts are acknowledged with

due reference to literature or otherwise.

Neither this thesis nor its signicant part

has been previously submitted for any 

degree.

Prohlašuji, že jsem záv ěrečnou práci

zpracoval samostatně a že jsem uvedl

 v šechny použité informační zdroje a

literaturu. Tato práce ani její podstatná

část nebyla předložena k získání jiného

nebo stejného akademického titulu.

In Prague, May ,

Jan Hermann

Page 3: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 3/102

 o enjamin

Page 4: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 4/102

Page 5: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 5/102

Abstract

e van der Waals (vdW) interactions, or dispersion forces, are crucial in many chemical,

physical and biological processes and received much attention from developers of density 

functional theory (DFT) methods. e most popular non-empirical DFT method fortreating vdW interactions is the vdW density functional by Dion et al. (vdW-DF). Despiteits success, vdW-DF is not accurate enough for many chemical applications. Here, weinvestigate two possible ways how to improve its accuracy. First, we reoptimize theonly weakly specied parameter of vdW-DF for several semi-local functionals. On theS benchmark database set, we nd that revPBE is the best performer, decreasing theerror from .% to .%. Second, a system-specic but very accurate (∼ . kcal/mol)DFT correction scheme is proposed for precise calculations of  adsorbent−adsorbate

interactions by combining vdW-DF and the empirical DFT/CC correction scheme. e

new approach is applied to small molecules (CH, CO, H, HO, N) interacting with a

quartz surface and a lamella of UTL zeolite. e very high accuracy of the new schemeand its relatively easy use and numerical stability compared to the earlier DFT/CC schemeoer a straightforward solution for obtaining reliable predictions of adsorption energies.

Van der Waalsovské (vdW) interakce, též disperzní síly, jsou klíčové v mnoha chemických,

fyzikálních a biologických procesech a přitahují pozornost mnoha vývojá

řůmetodzaložených na teorii funkcionálu hustoty (DFT). Nejčastě ji používaná neempirická DFT

metoda pro popis vdW interakcí je vdW funkcionál hustoty Diona a kol. (vdW-DF).Navzdory jeho úspěchu, vdW-DF neposkytuje dostatečnoupřesnost v mnoha chemickýchaplikacích. V této práci zkoumáme dva možné způsoby jak zlepšit přesnost vdW-DF.Za prvé, optimalizujeme jediný částečně volný parametr vdW-DF pro několik semi-lokálních funkcionálů. Na testovací S databázi je revPBE nejlepším kandidátem, s jehožpoužitím se chyba snižuje z .% na .%. Za druhé, představujeme systémov ě specické

ale velmi přesné (∼ . kcal/mol) DFT korek ční schéma, které lze použít k precizním výpočtům interakcí mezi adsorbentem a adsorbátem. Schéma kombinuje vdW-DF a

empirické korek ční schéma DFT/CC. Tento nový přístup testujemena malých molekulách(CH, CO, H, HO, N) interagující s povrchem k řemenu a s lamelou zeolitu UTL.Vysoká přesnost našeho schématu a relativní snadnost jeho použití ve srovnání se starším

DFT/CC schématem nabízejí přímočaré řešení pro získání spolehlivých předpov ědíadsorpčních energií.

Page 6: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 6/102

Page 7: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 7/102

Contents

Preface ix 

Introduction

. Electron correlation

. Density functional theory  . Overview of the thesis

Van der Waals density functional

. Exchange–correlation functional

. Hohenberg–Kohn theorems and approximations

. Nonlocal correlation functional

. Numerical evaluation

Nonlocal functionals since

. Changing the nonlocal functional . Appropriate exchange functional

. Implementation

Investigations of vdW-DF

. Nonlocal energy decomposition

. Excited states with vdW-DF

. Optimizing the Z ab parameter

.. S set

.. Noble gas dimers

. Concluding remarks

vdW-DF/CC correction scheme

. DFT/CC and vdW-DF/CC

. T and T silica models

 vii

Page 8: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 8/102

Contents

. Tests on quartz surface and UTL lamella

. Concluding remarks

Summary

References

A Evaluation of vdW-DF in Matlab

 viii

Page 9: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 9/102

Preface

is thesis is a result of my two-year encounter with the van der Waals density functional (vdW-DF) developed in . Instead of using available computercodes, I started by implementing vdW-DF in M in a hope that I will be ableto modify and improve it. By the time I completed the code and performed rsttests, I realized that the knowledge required for making any serious changes to

 vdW-DF is scattered over too many highly advanced research papers spanningmore than years. At the same time, it is a relatively new topic and there is a lack of not only textbooks but even review articles. So instead, I focused on applying

 vdW-DF in new areas and on tweaking its only parameter. While the latter proveduseful in understanding the behaviour of vdW-DF, it provided no clear way how to improve its accuracy. As this was the primary motivation, I have searchedfor alternative ways to achieve this goal. In the end, using vdW-DF indirectly in a combination with an older correction scheme for density functional theory proved to be the way and the resulting approach improves the accuracy severaltimes.

As for the structure and language of this thesis, I drew inspiration from Nordiccountries, where theses are perceived and considered as short books. e rstintroductory chapter of this thesis is therefore written in quite broad terms, in-tended for anyone having at least some background in chemistry and physics. esubsequent chapters are already more traditional. e second and third chapterreview the work done by others, while the fourth and h present my own work.e thesis was typeset in LATEX, using a layout inspired by the classicthesis

package by André Miede.

Finally, I would like to thank my supervisor Ota Bludský for guidance and

thoughts. His comments pointed my eorts to the right directions and they wereinvaluable in development of the vdW-DF/CC correction scheme. Also, his roleas an editor was mostly appreciated when my writing got out of hand.

 Jan Hermann

ix

Page 10: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 10/102

Page 11: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 11/102

Chapter

Introduction

Geckos are the ultimate climbers (Fig. .). ey can climb vertical surfaces,be they dry or wet, smooth or rough. Put them in a room and they will easily 

stick to the ceiling. e intricate structure of their footpads has been knownfor a long time, but it was not clear what kind of interaction could exert sucha universal sticking force. It was not before that Autumn et al. rejected allother hypotheses and gave evidence that geckos are in fact utilizing the van derWaals forces [].

What are these forces then, that do not discriminate between materials, butare attracting in every case? And surely there have to be other macroscopicexamples of their eect. e composition of gecko footpads evolved to maximizethe contact surface area. e billions of tiny hairs on them perfectly conform to

Figure . | Gecko’s climbing ability. Each square millimeter of a gecko footpad (a) isequipped with about , tiny hairs (setae), and each seta contains from to ,spatulae. Each spatula can exert the force of to nN by means of van der Waals forces. This

means that at % eciency, footpads of an average gecko could carry more than kg,easily supporting its weight of g while climbing vertical glass (b). (Pictures from Wikipedia:

GFDL licence, public domain.)

Page 12: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 12/102

Chapter Introduction

any surface under the gecko. e tips of the hairs contain β-keratin, a proteinrich in stacked β-sheets. e sheets are in very close contact with the surface andit is the closeness and amount of surface contact which is the key to van der Waals

forces.Interactions can be classied by many categories. From the mathematical

point of view, the important properties are whether they are attractive or repul-sive or both, whether they are directional or not, and what is their dependenceon distance. In this perspective, we will compare van der Waals interactions,electrostatic interactions of charged and neutral bodies and gravity.

Van der Waals forces and gravity are always attractive. e consequence isthat the strength of the interaction is determined by the sheer amount of theinteracting objects. Another consequence is that the total eect of these forces

is quite simple—they aggregate objects to form bigger objects, which then exerta force roughly equal to the sum of the forces of the aggregated objects. On theother hand, charged bodies can attract or repel each other, based on the sign of their charge. Quite in contrast, this leads either to separation of the bodies, or toaggregation with the consequence of neutralizing the force completely. Or, as inthe example of a crystal, to both ends, but on dierent scales.

All forces from the previous paragraph are non-directional, in contrast to theinteractions of neutral bodies. is has the consequence that van der Waals orgravitational forces are additive. In the case of charged bodies, the interactions arealso additive in a sense, but as positive and negative interactions of roughly thesame magnitude are oen added, they tend to cancel out. Compare this to dipoleor quadrupole interactions, where the force can oscillate between attractive orrepulsive, based on the mutual orientation of the interacting bodies. When suchbodies aggregate, these forces tend to average out. ere are certain cases whereall the aggregated interactions are aligned into one direction and enforced, butthis does not happen in a typical chemical system.

All the compared forces decay with power-law dependence on the distance, r −n,but they dier in the exponent of the power. Gravity and interaction of chargedbodies decrease as r −. A mathematical consequence of this power-law is that the

shapes of the interacting bodies do not matter much. Indeed, as far as gravity isconcerned, two bodies can be well approximated by their centres of mass, andonly their weight, a three-dimensional property, is relevant. e same thing holds

e magnitude of the prefactor is crucial as well, but we are not interested in absolute strengthshere, only in general properties.

Page 13: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 13/102

for attraction or repulsion of charged bodies. us, ions can be quite accurately treated as point charges in many situations. e decay of interaction betweenneutral objects depends on the exact charge distributions, being r − for dipoles

or r − for quadrupoles. e van der Waals potential vanishes very quickly, withthe sixth power of distance, r −. is requirement of close contact leads to theconclusion that only geometry or more specically the surface of the bodies, atwo-dimensional property, is important. is has far-reaching consequences,because while the mass of an object cannot be hidden, a great amount of surfacecan be concealed in small space by twisting and bending.

e r − dependence of van der Waals forces is the reason why there is only afew macroscopic evidences of them, geckos being a prominent one. It is just notcommon for macroscopic objects to be separated by such short distances, and

in case of longer separations, the van der Waals forces quickly fade away. Evensurfaces which appear to be extremely smooth are quite rough under an electronmicroscope, and the resulting mean separation between them is much more thanwhat is needed for van der Waals forces to be eective. However, this can changein near future with the advent of nanotechnology, as articial surfaces similar tothat of gecko footpads are created in laboratories. ese could be used to producenon-adhesive sticking materials with broad range of applications.

It is important to realize that the notion of surface (or length, or volume)depends on who is asking and how, the notorious example being the length of thecoastline of England []. us the internal surface of a zeolite might be huge for

a water molecule, much smaller for propane, and zero for benzene. An enzymemight seem to be just a globule with potato-like surface, but it can provide a lot of “local” surface for bonding to a substrate during the key–lock mechanism. isleads to the conclusion that when considering the potential importance of vander Waals forces, the scale is crucial, and as their range is limited, the particularscale in question is the nanoscale.

A freshly coined term, sparse matter, tries to capture all the materials where van der Waals forces are important []. Sparse matter is dened as having sig-nicant regions of very low electron density. Examples are proteins, graphite,

nanostructures, zeolites, metal-organic frameworks, molecular crystal or poly-mers. e regions without electrons provide space for any host molecules orother mesoscopic structures, and the boundary between the electron-rich andelectron-decient areas form the surface which serves as a platform for van derWaals bonding. ese bonding surfaces can be even visualized and bonding

Page 14: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 14/102

Chapter Introduction

surfaces can be discriminated from non-bonding ones [].

But what is the physics behind van der Waals forces? e notion of bondingsurfaces from the previous paragraph hints that it is the touching of electron-rich

areas, but in fact, it is almost the exact opposite. It is learned in introductory courses to chemical structure, that the electron density overlap is repulsive, andit is this overlap which actually keeps the high-density regions, usually closed-shell molecules or bigger mesoscopic structures, separated and distinct. eattractive part of the interaction, the van der Waals forces, has a completely dierent mechanism. In the next section, we discuss the nature of chemicalbonding, and how does the term nonlocal correlation from the title of this thesisenter into that discussion.

. Electron correlation

In the simplest view, the driving force for chemical bonding is delocalization of electrons. e Heisenberg principle states that the uncertainty in the velocity of aparticle is inversely proportional to the uncertainty in its position. is meansthat when an electron delocalizes, its movement becomes less vigorous, and itskinetic energy lowers. A hydrogen molecule can serve as an example, where bothelectrons delocalize over two nuclei, forming a covalent bond. But what keepsall electrons from delocalizing over all nuclei? Why some molecules exist while

other do not?e second crucial part of covalent bonding is the Pauli principle which states

that no fermions (electrons being fermions) can occupy the same quantum state.A result of this principle is that there is a limit to how densely electrons can bepacked. For example, if four electrons tried to delocalize over two helium nuclei,forming He, they would have to be too far from the nuclei, and the delocalizationenergy would be smaller than the energy loss from not utilizing the Coulombpotential of the nuclei. So when two closed-shell molecules meet each other, theirelectrons cannot delocalize, and the Pauli principle keeps them apart.

Even when the delocalization occurs, the Pauli principle andthe negative chargeof electrons still force them to at least locally avoid each other. Electrons do this by correlating their movements, hence local correlation. Now we nally get to the vander Waals forces. Each moving charge emits electromagnetic waves. In this way,electrons in separate molecules can communicate with each other over distance.Again, they can correlate their movements so this mutual radiation is in sync. In

Page 15: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 15/102

. Density functional theory 

the language of quantum electrodynamics, an electron in one molecule emits a virtual photon, which travels to the other molecule, and there it is absorbed by another electron. It is exactly this nonlocal process, which is behind the existence

of van der Waals forces, hence nonlocal correlation.Strictly speaking, the term van der Waals forces comprises three dierent kinds

of interaction and what has been up to now referred to as van der Waals forcesis only one of them and should be referred to as London dispersion forces. eother two types van der Waals interactions are electrostatic forces between chargedistributions, be it permanent or induced dipoles, quadrupoles, etc. However, thisconvention is not very rigidly adhered to, as can be seen for example in the nameof the van der Waals density functional, which in fact describes only dispersionforces. erefore, we will use these terms more or less interchangeably, in van

der Waals forces putting more stress on the actual physical interaction while indispersion forces referring strictly to its theoretical description. is seems to bea way of some authors.

Several contributions to the total electronic energy of a molecule were men-tioned: the kinetic energy, the Coulomb interaction of electrons with themselvesand with the nuclei, and their correlation, local or nonlocal. e density func-tional theory states that all these contributions can be exactly computed from theknowledge of the electron density itself. As the whole discussion above was doneusing the density, it seems only natural, but it was not before that Hohenbergand Kohn proved this rigorously.

. Density functional theory

In the last twenty years, density functional theory (DFT) became a major tool fortheoretical investigations of chemical systems []. For small systems (molecules,dimers, clusters of small molecules), more accurate wavefunction based methods,oen called ab-initio, are available. Either one studies these small systems for thesake of themselves, which is a domain of chemical physics, or one uses them assimplied models of larger systems of interest, which is a common technique.On the other range of the spectrum, large systems (proteins, DNA, polymers)are usually described using semi-empirical methods or forceelds. For the wholemidrange, which comprises myriads of interesting chemical systems, DFT is mostoen used.

e hierarchy stated above stems from the fact that the computational cost of 

Page 16: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 16/102

Chapter Introduction

a method grows with the size of the system, and that the cost of more accuratemethods usually grows more rapidly than the cost of less accurate ones. us itwould be unreasonable to use DFT on small systems when one can obtain more

accurate results, and it is impossible to use DFT on the big systems because thecalculations would take years or more.

DFT will be presented in more detail in the next chapter, but its deciencieswhich stand as a motivation for this thesis can be explained simply. While thetheory itself guarantees that it can be exact in principle, the exact expression for

electron correlation is not known and only approximations are available. ere isa plethoraof dierent approximations, called functionals, and for a long time all of them were dealing only with local correlation. e reason for this is that chemistry traditionally deals with covalent (local) bonding. erefore, the primary goal was

to describe local correlation. Only aer this stage was complete, and DFT wasable to describe covalent bonds correctly in most situations, the van der Waalsforces came into focus.

First, various empirical methods were devised which corrected DFT for weak  van der Waals forces, but these were not part of the DFT itself. In sparse matter,the equilibrium structure is usually determined by counterbalanced attractive

 van der Waals (nonlocal) forces and repulsive Pauli (local) forces. e biggestproblem with the empirical approaches is that already the local correlation isapproximated and adding empirical corrections to approximate numbers can leadto results with an unpredictable error.

In , a fully DFT-integrated approximation for nonlocal correlation wasinvented, dubbed vander Waals density functional (vdW-DF). At rst, itsaccuracy was inferior compared to the state-of-art empirical schemes, but it was slowly gaining attention in the physical community as is common with rst-principlesmethods. In recent years however, several extensions were made which improvedthe accuracy and brought more and more chemical applications.

. Overview of the thesis

e second chapter of this thesis reviews the basics of DFT and the derivation of  vdW-DF. e focus is on systematic presentation of the various approximationsmade. e third chapter reviews contributions that have been made to the eldof nonlocal correlation functionals since the original publication. is comprisesmodications of the original nonlocal functional, development of new nonlocal

Page 17: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 17/102

. Overview of the thesis

functionals, and modications of the local functionals which supplement thenonlocal one. e fourth chapter presents several short investigations of the prop-erties and behaviours of vdW-DF that we have made, including decomposition of 

the nonlocal energy to atom pairs, applying vdW-DF to excited states of excimers,and optimizing its only numerical parameter. e h chapter presents a novelempirical correction scheme for DFT, which incorporates mainly van der Waalsforces, and which uses vdW-DF as a starting point.

Page 18: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 18/102

Page 19: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 19/102

Chapter

Van der Waals density functional

e development of the vdW density functional (vdW-DF) can be traced back to when Langreth and Vosko calculated the exact response of an electron

gas at high density []. ey used their response kernel to calculate a long-rangeattractive interaction between two particles decreasing as r − with distance. einitial development resulted in a nonlocal density functional which correctly described asymptotic vdW forces between isolated fragments of matter []. eremaining problem was to combine the functional with the established localdensity functionals. is was rst achieved for cases with planar symmetry []and subsequently even for general geometries in the work of Dion et al. in [].

 vdW-DF comes from the framework of density functional theory (DFT).ere-fore, the next section reviews the basics of DFT. A dierent approach is followedthan is traditionally found in textbooks to present only the components of DFTnecessary for presentation of vdW-DF. Atomic units are considered if not statedotherwise.

. Exchange–correlation functional

e electrons in a molecule are fully described by an electronic wavefunctionΨ(rr⋯). is wavefunction can be in principle obtained by nding the eigen-

 vectors of the appropriate electronic Hamiltonian H and all properties concerningelectronic structure can be then computed from this knowledge. One of the mostoen calculated property is the electronic energy, a single number, while the

e spin of electrons is not explicitly considered as a free parameter of the wavefunction, but

rather implicitly assumed. is is for brevity and simplicity, and also in correspondence withhow practical calculations are usually performed.

Page 20: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 20/102

Chapter Van der Waals density functional 

wavefunction itself is too complicated object to be understood in some compre-hensible manner []. e calculation of the wavefunction thus oen seems tobe an unnecessary but extremely demanding step. Electron density ρ, which is a

much simpler quantity, can also be obtained from Ψ,

 ρ(r) = N     Ψ∗(rr⋯rN )Ψ(rr⋯rN )dr⋯rN  (.)

where N  is the number of electrons. Density functional theory deals with thequestion of whether it is possible to obtain the electronic energy directly fromthe electron density, without the superuous wavefunction.

e electronic Hamiltonian H consists of three parts,

H = T + V n + V ee (.)

where T is thekinetic energy operator, V n istheoperatorduetoCoulombpotentialfrom nuclei and V ee is the operator due to Coulomb forces between electrons.

A class of ctitious molecular systems can be dened where the Coulombforces between electrons are scaled by the coupling constant λ ∈ ⟨, ⟩ []. At thesame time, an additional potential is added to V n to form the eective potentialV e  such that the electron densities of the ctitious and of the real system areidentical. e Hamiltonian of such a system is

ˆH = ˆ

T +ˆ

V e ( λ) + λˆ

V ee (.)

For λ = , this is clearly the real molecule and V e () = V n.

For λ = , we get the so-called Kohn–Sham system of non-interacting electronswith V e () = V KS. is system is easily solvable, because there is no directinteraction between electrons, the all-electron eigenproblem is separable, and it

Born-Oppenheimer approximation is implicitly assumed, as we are interested in electronic

structure, not in description of the molecule as a whole.ere is a great amount of theoretical research into the question of whether such eective

potential exists for all densities. A particular density for which it exists is called non-interactingv -representable. However important for the rigorous formulation of density functional theory,this problem does not seem to be relevant in practical calculations and we will not considerit here, but simply assume that all densities of real chemical systems are non-interactingv -representable.

Page 21: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 21/102

. Exchange–correlation functional 

leads to one-electron eigenproblems with the solutions ϕi . e energy is thus

EKS =i ⟨ϕi

− ∇

i

ϕi

⟩+  v KS

(r 

) ρ

(r

)dr = T KS +V KS (.)

e dierence in energy of the real (denoted just E) and of the Kohn–Shamsystem can be expressed as an integral over the coupling constant [],

E − EKS =   

dE

d λd λ =   

⟨Ψ( λ)dH 

d λΨ( λ)⟩d λ (.)

where the Hellman–Feynman theorem was used in the last step. Inserting (.)

and (.) into (.) and evaluating the matrix elements, one gets

E = T KS +V n +  

⟨Ψ( λ)V eeΨ( λ)⟩d λ (.)

Compare this to the expression for energy which comes directly from (.),

E = T +V n + ⟨Ψ()V eeΨ()⟩ (.)

at is, the substitution of the real kinetic energy for the easily computable Kohn–Sham kinetic energy leads to the integration of V ee over the coupling constant.

e next simplication comes from the fact that V ee = r − r = r  actson two electrons only and that Ψ is antisymmetric. e so-called electron pairdensity can be formed [],

 ρ(r, r) = N (N − )    Ψ∗(rrr⋯rN )Ψ(rrr⋯rN )dr⋯rN  (.)

where N  is the number of electrons. e pair density gives the probability of nding any electron pair at r and r. Note that while the density ρ is independentof λ (by denition), the pair density ρ depends on λ.

A major part of V ee is the classical Coulomb repulsion, or the Hartree energy,

V H =   ρ(r) ρ(

r)r 

drdr (.)

If the electron density was generated by purely classical objects, not of electrons,

Page 22: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 22/102

Chapter Van der Waals density functional 

this would be the only part of V ee . Aer separating V H from V ee , we get

E = T KS +V n +V H + Exc (.)

where Exc is the so-called exchange–correlation (XC) energy and is equal to

Exc =

  ρ, λ(r, r) − ρ(r) ρ(r)

r drdr (.)

where ρ, λ is the λ-averaged electron pair density,

 ρ, λ =   

 ρ( λ)d λ (.)

To better understand the meaning of Exc, we can rewrite it as

Exc =   ρ(r)εxc(r)dr (.)

where the energy density εxc is

εxc(r) =

  ρ(r)

r  ρ, λ(r, r) ρ(r) ρ(r) − dr (.)

ese expressions have a clear interpretation. e total XC energy is given simply 

by its density εxc, integrated over the whole space.

e energy density itself isan integral over the whole space, which means that the electron at r feels all theelectrons at all distances from r. is property is usually referred to as nonlocality.As for the integrand, it consists of two parts, the rst one telling more about thequantity of εxc, the second one about its quality. e rst part, ρ(r)r , simply means that greater densities in r have greater eect on r and that the further ris from r, the weaker its eect.

e second part of the integrand, the expression in parentheses called the paircorrelation function h λ, is more complicated and tells us where the XC energy comes from. In a completely uncorrelated system, that is, in a system where

the probability of nding an electron in r is independent on the presence of anelectron in r, the pair density ρ is just (N −)N × ρ(r) ρ(r), the pair correlationfunction is constant, h(r, r) = −N and Exc = −V HN , compensating for the so-called self-interaction. In Hartree energy, an electron interacts with all electrons,including itself, which is nonsensical. It is one of the eects treated by the XC

Page 23: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 23/102

. Hohenberg–Kohn theorems and approximations

energy, and in case of the uncorrelated system, it is the only one. In a real moleculehowever, electrons tend to avoid each other, and h is close to − for small r . Duetothe

r  dependence, which gives greatestweight to smal r , Exc is much greater

that in the hypothetical uncorrelated system. It is yet another manifestation thatelectron correlation stabilizes electronic systems.

e XC functional is oen formally divided into the exchange and correlationparts []. e exchange part is formally dened by the Hartree–Fock method,comes from the Pauli principle, is present even in the case of uncharged fermionsand is the dominant part of the total XC energy. e correlation part is dened asthe rest of the XC energy, comes from the Coulomb repulsion of the electronsand is the sole topic of all the post-HF methods. Note however that the division

is only formal and though it can be interpreted physically, it cannot be dened

physically.

. Hohenberg–Kohn theorems and

approximations

Equation . is an exact expression for the XC energy density εxc. It is howevernot an expression from the realm of DFT, because it contains the λ-averagedpair density ρ, λ. e problem with this fact is that while DFT can be easily and eciently recast into computational form, there is no such way when pair

density is involved. e past decades of DFT development has thus been de factoconcerned with the problem of expressing ρ, λ as a functional of ρ only.

e motivation for this eortcomesfrom the Hohenberg–Kohn (HK) theorems,which make DFT a real theory and not only a model []. e rst HK theorem

is crucial and simply states that ρ, λ can be in principle fully restored from theknowledge of ρ only. In fact, it claims even more, namely that the whole electronicwavefunction Ψ can be restored. e proof is remarkably simple and is done by showing that there is a one-to-one correspondence between the ground-statedensities ρ and the potentials V n which in turn determine the corresponding

wavefunctions.usthereisaholygrailinDFTandthatistheexactXCfunctional.Sadly, the HK theorem does not provide any clues about his functional shouldbe constructed, or in other words, how ρ, λ should be obtained from ρ. us allcurrent DFT implementations use only approximations to εxc. e number of dierent approximations is immense. In following paragraphs, some approaches

Page 24: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 24/102

Chapter Van der Waals density functional 

are briey reviewed and discussed.

e crudest approximation actually predates the HK theorems and DFT itself []. Here, the extremely complicated nonlocal density functional in (.) is ap-

proximated by a simple local density function, hence local density approximation(LDA),

εxc[ ρ](r) ≈ εLDAxc  ρ(r) (.)

e question remains about the function εLDAxc . ere is no known way how to

obtain it directly from the formula for exact εxc. An indirect solution is to obtainit from some exactly solvable system. To my knowledge, the only one whichgot any serious attention in this regard is the homogeneous electron gas (HEG)and this version of LDA is an ingredient present in every DFT calculation today.HEG is dened as a gas of electrons on a homogeneous background of positive

charge. Its energy has been solved to arbitrary accuracy by quantum Monte Carlocalculations. It has a uniform electron density and it is this mapping between itsdensity and its energy which parametrizes LDA.

Given the crude approximation to εxc that εLDAxc is, it is remarkable how well

it works. It correctly predicts structural properties of molecules and solids andits accuracy in energies is comparable to that of the Hartree–Fock method orbetter. At the time when LDA was the state-of-the-art DFT approximation, moreaccurate wavefunction-based methods were available and LDA was only rarely used by chemists. However, it was a common tool in the solid-state physics. e

reason why LDA is so surprisingly good came to be understood only later whendierent approximations, seemingly better, performed actually worse.

One of the rst attempts to go beyond LDA was the gradient expansion ap-proximation (GEA). e idea is to Taylor-expand εxc around εLDA

xc by utilizingthe density gradient ∇ ρ. Unexpectedly, this expansion turned out to be worsethan LDA. e reason behind that is that εLDA

xc is of a real physical system (theuniform electron gas) while εGEA

xc is not. is is manifested by εLDAxc satisfying

several important bounds, limits and integral rules. An example of such a ruleis that ∫ ρ(r)h(r, r)dr = −. We could see that in the uncorrelated system,h = −

N and this rule is trivially satised. It is more dicult to show that εLDA

xc

satises it as well but it can be done. On the contrary, εGEAxc breaks this rule.

e second HK theorem is not relevant for the present discussion and stands behind the above-mentioned fact that DFT can be recast into a computational form. HK states that the realground-state density can be obtained from scratch by minimizing the total energy over allreasonable densities.

Page 25: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 25/102

. Hohenberg–Kohn theorems and approximations

A solution to this problem is the so-called generalized gradient approximation(GGA). Here, the dependence on ∇ ρ is retained but instead of doing the Taylorexpansion, the functional is constructed in such a way that all known bounds,

limits and integral rules are satised. e general form of GGA functionals is

εxc[ ρ](r) ≈ εGGAxc  ρ(r),∇ ρ(r) (.)

e interpretation of the GGA approach is that here the functional knows notonly about the point r where the energy density is evaluated but also about itsnear neighborhood. erefore, they are called semi-local sometimes, in contrastto LDA.

While LDA is only one, there are dozens of dierent GGA functionals, causedby the fact that apart from several exact properties which are satised by most of 

them, there is no way how to distinguish the best functional. e only measure isthus their performance and it diers for dierent types of chemical or solid-statesystems. GGA enabled to reach the chemical accuracy of kcal/mol and broughtDFT to the attention of chemists. is in turn lead to faster development andmore functionals and even new classes of DFT approximations, which we willmention only briey.

e next natural step beyond GGA is to include more quantities than just thedensity and its gradient. ese approaches are called meta-GGA functionalsand two quantities that are most oen used is the kinetic energy density and the

Laplacian∇ ρ. Again, the meta-GGA functionals have more information aboutthe neighborhood than in the pure GGA case.

e most used functional in chemistry today (due to its universal accuracy) isprobably the BLYP functional. It is a hybrid functional and that means that apartfrom the GGA part, part of the exchange energy is obtained by evaluating exactHartree–Fock (HF) exchange on the Kohn–Sham orbitals which are used for thekinetic energy. e word “hybrid” refers to the fact that the resulting method is ahybrid between pure DFT and the HF method. ere are even some theoreticalconsiderations which justify this approach by considering the λ-integration in

the exact XC functional.

e reason why the exact exchange is not used in itswhole but only partly mixed is that the HF exchange is nonlocal while the DFTcorrelation is local and therefore they are not fully compatible.

e next extension to hybrid functionals is to include the MP correlation,which leads to double hybrid functionals. However, these functionals are not

Page 26: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 26/102

Chapter Van der Waals density functional 

much used yet due to their unfavourable computational cost (equal to MP).

. Nonlocal correlation functionalAll the pure DFT XC functionals approximations mentioned above (LDA, GGAs,meta-GGAs) are local from a strict mathematical point of view. Indeed, the totalenergy of two perfectly separated electron systems is equal to the sum of theenergies of the individual systems in these approximations. us they cannot inany way account for the true dispersion forces, which are the topic of this thesis.In some cases, LDA or some GGAs can bind vdW systems, even overbind them,but this is due to spurious exchange binding, which provides wrong asymptoticinteraction between other things []. In contrast, it can be shown that vdW

forces should be included in the correlation part of the XC energy. Indeed, theHF method having only exchange also does not cover vdW forces. erefore,even hybrid functionals, which are nonlocal, do not cover vdW forces. Doublehybrid functionals cover vdW interaction but not through a density functionalbut through their MP ingredient. us to cover vdW forces within DFT, onehad to have a fully nonlocal correlation functional. Precisely such functional wasdevised by Dion et al. in and it is presented in this section. Only physicalconsiderations and approximations are shown here, the oen lengthy mathematicsis le out.

e departing point for the nonlocal functional is Equation .. e rst stepis to express ρ in terms of the density response function χ [, ], dened as

δρ(ω, r) =   χ (ω, r, r)φext(ω, r)dr (.)

e responsefunction relates the perturbingexternal potentialφext with frequency ω at point r with the change in electron density at point r. e reason why adynamic (frequency-dependent) quantity is introduced is that it captures a greatamount of information about the behaviour of a system. Also note that it iscustomary in physics to work with complex dynamic quantities because it eases

the underlying mathematics. In the end, only their real parts correspond tomeasured values. Using χ , the pair density can be expressed as []

 ρ, λ(r, r) =   dωπ i χ  λ(r, r, ω) + ρ(r) ρ(r) − δ (r ) ρ(r) (.)

Page 27: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 27/102

. Nonlocal correlation functional 

Inserting (.) into (.), one gets

Exc =   dω

π i

  χ  λ(ω, r, r

)r − drdr − Eself  (.)

where Eself = ∬ ρ(r)r − δ (r )drdr is a divergent quantity called self-energy (not to be confused with the self-interaction), which is cancelled by divergence of the rst expression.

e next ingredient is the screened response function ˜ χ (as compared to thebare response χ ). It is dened in a similar way as χ in (.) but instead of theexternal potential φext, the total (or screened) potential φ is considered. It can beshown that χ and ˜ χ are related by a Dyson-like equation,

 χ (r, r) = ˜ χ (r, r) +  ˜ χ (r, r)r − r

 χ (r′

, r)drdr′

(.)

In the implicit matrix notation, adopted from now on for brevity, Equation .becomes

 χ = ˜ χ + ˜ χ V  χ  (.)

where V  is the Coulomb potential V (r, r′) = r − r′.In the DFT context, χ depends on the coupling constant λ and (.) holds

only for χ ( λ), not for the averaged χ  λ. Taking the λ-integration out, utilizing(.) and using the matrix notation, (.) becomes

Exc =   dω

π i   

Tr ˜ χ ( λ)V 

− λ ˜ χ ( λ)V d λ − Eself  (.)

is is the last exact expression in this derivation.

e rst approximation in constructing the nonlocal XC functional is done by approximating ˜ χ ( λ) by  ˜ χ () = ˜ χ , the full potential approximation (FPA). is is

done so that the λ-integration can be carried out at this stage. It can be shownthat FPA is asymptotically exact for correlation and exact for exchange. usthe only region where it can negatively inuence accuracy is the vdW bonding

distance, which is, on the other hand, usually the most important one. A dierentIn this notation, the nonlocal (dependent on two positions) quantities are considered to be

innite matrices, the rst independent variable being the row index and the second beingthe column index. e integration ∫  f (x  , y ) g ( y , x )d y  then becomes a simple matrixmultiplication f g , and ∫  f (x , x )dx  is the trace of  f , Tr f . Likewise h = g  f  = f − g means f h = g .

Page 28: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 28/102

Page 29: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 29/102

. Nonlocal correlation functional 

e fourth approximation is connected to expressing S in terms of density.is is done in a manner similar to construction of GGA functionals. Severalknown exact limits and other behaviours are stated and then a simplest possible

analytical form is devised which satises these rules. For this step, S is Fourier-transformed into its momentum representation S(ω, k , k ) where k , k  are thewave vectors. Four required behaviours are used, which are not presented here astheir interpretation would require much deeper inquiry into solid-state physics.e form of S which obeys them is

S(ω, k , k ) = [S(ω, k , k ) + S(ω,−k ,−k )]S(ω, k , k ) =   e−i(k −k )⋅r

πρ(r)[ω + ωk(k, r)][−ω + ωk(k, r)] dr(.)

where ωk is the dispersion function relating frequency to energy.Still, ωk is unknown and has to be expressed in terms of density. In this case,

the physical motivation for a particular formula is quite simple. In electron gas,there are two types of excitations. e short-wavelength type are the Fermi levelexcitations where an electron from an occupied orbital is excited to an unoccupiedorbital, creating the electron–hole pair. ese excitations behave like ωk ∝ kfor large k. e long-wavelength type are the so-called plasmons, which are acollective coordinate motion of many electrons, and their energy is nearlyconstantfor small k.

e h approximation is to utilize these two limits and have a form for ωk

which switches between the constant and the quadratic behaviour,

ωk(k, r) = k

− exp−π 

k

k(r)−

(.)

with k specied such that if (.) was used to calculate the energy of HEG withthis k, it would give the correct energy. is condition leads to

k = kFεxc

εLDA

x

(.)

where kF = π  ρ is the Fermi wave vector and εxc is the XC energy density which

would reproduce the full calculation, Exc = ∫ ρ(r)εxc(r)dr.

e last approximation is thus contained in approximating εxc. e only naturalthing to do would be to take it from the same GGA functional which will be in

Page 30: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 30/102

Page 31: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 31/102

. Numerical evaluation

−0.5

0.0

0.5

1.0

1.5

0 2 4 6 8

D

   4     π   D   2       φ

   (  a .  u .   )

δ

0

0.5

1

Figure . | Nonlocal kernel Φ for several values of δ. The πDΦ quantity on the y -axis is

proportional to the contribution to the XC energy density from the electron density in“distance” D in the homogeneous electron gas.

the nonlocal correlation does not change the energy of HEG, as it should.

A nal word must be said about approximating the “local” energy Exc, which

was subtracted during derivation of vdW-DF from the total XC energy,

Exc = Exc + Enlc (.)

Exc is calculated as the energy of HEG under FPA, and therefore, it is equivalent

to LDA in some sense. However, in contrast to LDA, the mathematical form of Exc is not local and it can behave dierently. Using LDA in place of E

xc would notbe the most appropriate thing to do. Rather, Dion et al. argue that E

xc should be

calculated as GGA exchange and LDA correlation. Enlc covers mostly correlation,

because there is no long-range exchange and Exc contains the majority of exchange.

Hence, the use of GGA for exchange is in place. On the other hand, all nonlocalcorrelation is assumed to be in Enl

c

and using GGA correlation could lead todouble counting, hence the use of LDA is advocated.

e question remains which GGA exchange to use. ere is no rst-principlesguidance, and the best GGA avour can be chosen only based on numericalresults. In the original paper from , it was suggested to use the revised

Page 32: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 32/102

Chapter Van der Waals density functional 

PBE exchange functional. Original PBE is one of the most successful ab-initiofunctionals due to its versatility, but one of its aws is that it binds vdW systemsby exchange, an unwanted eect. e revised PBE corrects for this deciency by 

reparameterizing one of the parameters in PBE.

Page 33: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 33/102

Chapter

Nonlocal functionals since

e vdW-DF method established a new sub-eld in the DFT world. Until then,dispersion was treated only empirically, outside of the DFT regime and vdW-DF

changed this paradigm. From the beginning, it was clear that while vdW-DF is apromising approach, it has deciencies. Early tests on database benchmarks andindividual cases showed that while it captures the vdW interactions qualitatively well, it does not have sucient accuracy []. It tends to signicantly overestimatebinding energies and also overestimate interfragment equilibrium distances. ismotivated a whole new research which was built around the idea of vdW-DFand whose goal was more accurate description of vdW interactions within theDFT framework. Since than, parallel approaches have been also devised, usingdierent approximations, for example RPA in the work of Tkatchenko et al. [].However, the following review deals only with works directly descended fromthe vdW-DF approach.

ere are two main branches of eorts to improve the accuracy of vdW-DF.e position and depth of a vdW minimum is given predominantly by counter-balancing the attractive vdW forces (Enl

c ) and the repulsive electron exchange(contained in E

xc. Consequently, one can strive to improve description of the for-mer or of the latter. e next two sections follow this categorization and attemptto chronologically map the vdW DFT research between and . Inevitably,there is some overlap, but usually the stress is on one of the two categories.

. Changing the nonlocal functional

In , a second version of vdW-DF was introduced by collaborators of theauthors of the original vdW-DF, dubbed vdW-DF []. ere are only twominor changes, which however led to better accuracy. e rst change is in the

Page 34: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 34/102

Chapter Nonlocal functionals since

Z ab parameter. In vdW-DF, Z ab = −. is derived from a simple gradientexpansion. is is suitable for slowly varying electron density, but that is notthe case in molecules. In vdW-DF, Z ab = −. is derived from the large-N 

asymptote. is is a common technique in DFT development, where a seriesof hypothetical atoms with growing number of electrons N  is considered andespecially the behaviour when N →∞ is investigated. e large-N  asymptote is

believed to be closer to the reality of atoms and molecules than the slowly-varyinglimit (which is more suitable for solids). e Z ab parameter controls the screeningof vdW interaction and its bigger value in vdW-DF means that the nonlocalinteraction is weaker here. To compensate for this fact, the second change from

 vdW-DF is made by using a dierent local functional, namely the revised PWfor exchange. Tests on several systems including the S set show that vdW-DF

is indeed more accurate for description of vdW interactions between molecules.e only true alternative to the nonlocal functional by Dion et al. was presentedin a series of papers by Vydrov and Van Voorhis (VV). ey begun in by slightly modifying vdW-DF into what they called vdW-DF- []. Instead of Eq.., they used

S(ω, k , k ) =   e−i(k −k )⋅rπρ(r)

[ωk(k, r) + ωk(k, r)] − ωdr (.)

and instead of Eq. ., they used

ωk(k, r) = k+ kF (r)( + λs(r)) (.)

where λ is tted to experimental C  coecients. ese changes lead to simplerintegrals and a second-order gradient expansion of Enl

c can be computed. iscan be shown to behave undesirably, but a simple semi-local gradient correctionEGC = ∫ ρ(r)εGC(r)dr can be introduced which cancels this improper behaviour.

In vdW-DF-, a dierent local functional is also used—the LC-ωPBE func-tional. is functional is from a class of range-separated hybrid functionals, wherea short-range exchange part is taken from some semi-local XC functional (PBE

in this case), while the long-range exchange part comes from the HF method.LC-ωPBE gives usually more repulsive interaction curves than revPBE used for

 vdW-DF. In contrast to the original vdW-DF, a semi-local correlation is usedin combination with the nonlocal correlation functional, but this change is notdiscussed by the authors. vdW-DF- was tested on the argon dimer, carbon

Page 35: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 35/102

. Changing the nonlocal functional 

monoxide dimer and benzene–argon complex. It gives somewhat more accuratebinding energies compared to vdW-DF, but the equilibrium geometries are notimproved.

e next step of VV was to introduce their own nonlocal correlation functional,dubbed VV. e main message of VV was that the nonlocal functional canbe simpler than the original vdW-DF []. is was achieved by using

S(ω, k , k ) =   e−i(k −k )⋅rπρ

C ∇ ρ ρ + πρ

− ω

exp−π 

k + k

kFϕ dr (.)

where ϕ = [( + ζ ) + ( − ζ )] is the spin-scaling factor (ζ  = ( ρ↑ − ρ↓) ρ)and C  is again tted to reproduce C  coecients. e gradient expansion of 

Enl

c with this S is correctly a constant, in contrast to vdW-DF and vdW-DF-.Dierent exact constraints were used in construction of this S than in vdW-DF.e main advantage of the form (.) is that the r,ω-integration can be performedanalytically, leading to expression for Enl

c containing only a double integral overspace.

e VV functional initiated an exchange of letters between Langreth andLundqvist (LL) [], and Vydrov and Van Voorhis []. LL criticize VV on thebasis that it does not satisfy some exact theorems, such as conservation of electronsor the high-frequency limit. In their reply, VV explain that their formulas needto be understood only in the context of VV.

e last contribution of VV to the topic came with the VV functional [].ey provide no physically motivated derivation, but rather just dene VVand then show that it satises several limits and constraints. Compared to allprevious nonlocal functionals, VV is extremely simple. e double-integralform of  (.) is not a nal form here, but rather a starting one. e nonlocalkernel is dened as

Φ[ ρ](r, r) = −

 g (r) g (r)[ g (r) + g (r)] (.)

where

 g = r  C ∇ ρ

 ρ + πρ

+ b

π 

ρ

π 

(.)

and C , b are two empirical parameters of VV. C controls the long-range be-haviour (C  coecients), while b controls the short-range dumping. e pa-

Page 36: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 36/102

Chapter Nonlocal functionals since

rameter b can be used to combine VV with almost any local functional. Inthe original paper, VV is combined with retted PW exchange and PBEcorrelation and b is tted to S energies. On all test systems, VV performs

signicantly better than vdW-DF, reaching a several times better accuracy inbinding energies.

. Appropriate exchange functional

e other branch of research aiming at higher accuracy with nonlocal correlationfunctionals deals with the proper local functional for E

xc. It has been recognizedthat the crucial role is played by the exchange part []. is is related to thefact that exchange is responsible for the repulsive wall in vdW bonding and its

steepness and position determine the resulting vdW minimum.Pernal etal. constructed a semi-local functional which should supposedly 

contain no short-range dispersion, making it a perfect match for nonlocal cor-relation functional []. ey used the form of the M-X functional andtted its parameters to CCSD(T) interaction energies of small dimers fromwhich SAPT(DFT) dispersion terms were subtracted. Regrettably, they combinedtheir dispersion-less density functional (dlDF) with Grimme’s semi-empiricaldispersion correction scheme, not with a nonlocal correlation functional. eirapproach provided very accurate interaction energies for various database bench-

marks. It would be interesting to see how dfDL would work with the VVfunctional if its parameter b was optimized for dfDL.

Cooper devised a non-empirical exchange functional, Cx, specically for vdW-DF []. He uses two constrains: (i) in the small-s region (s is the reduced

density gradient), he matches his functional to the gradient expansion approxima-tion used in the early days of DFT. (ii) In the large-s region, Cx approaches therevPBE exchange. It is quite remarkable that this simple construction achieves agreat reduction in errors on the S set and other test systems. It actually reachesthe accuracy of top empirical DFT dispersion schemes.

Klimeš et al. systematically investigated the choice of the exchange functionalto be combined with vdW-DF []. Apart from comparing PBE, B, B withmodied gradient correction, PW and B, they also reoptimized the PBE andB functionals on the S set, with the vdW-DF nonlocal energy added. ey show the transferability of their optimizations on water hexamers and adsorptionof water on solid NaCl. ese reoptimized functionals have also been shown to

Page 37: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 37/102

. Appropriate exchange functional 

perform better than the original vdW-DF for solid-state properties, such as latticeconstants or atomization energies [].

Austin et al. came with another local functional which should be void of short-

range vdW forces []. ey suggest a simple linear combination of the BPW(%) and PBEPBE (%) functionals, which mimics the HF exchange well.Again, they devise their own correction scheme for dispersion and do not try itscombination with any of the nonlocal functionals.

All the approaches reviewed so far are usually constructed in vdW interactionsin mind and they are rarely tested on anything else. is is potentially dangerousbecause the semi-local GGA functionals have been proven in thousands studiesto work very well for covalent and ionic bonding and it is not clear whether thenew functionals retain this quality. is problem was tackled by Wellendorf et al.

who used machine-learning techniques to parametrize from scratch a new GGAexchange and a combination of LDA, PBE and vdW-DF correlation, using tendierent benchmark databases spanning molecular, solid-state and noncovalentsystems and including equilibrium and reaction properties []. e optimalcorrelation mix is found to be % LDA, % PBE and % vdW-DF. ey alsoshow that the optimal GGA exchange greatly depends on which database is usedfor parametrization. is evidences that there is a delicate balance of exchangerepulsion and vdW attraction in the vdW equilibrium and that no GGA-typeexchange functional can work for all possible systems. A more intricate exchangefunctional would be needed.

Indeed, it seems that the description of vdW forces within DFT came to thepoint that its quality supersedes that of the local functionals. e vdW interactionenergies are usually in the range of units to tens of kJ/mol. But the GGA func-tionals have been developed for description of energies which are by an orderof magnitude larger. While the percentage dierence between dierent GGAfunctionals might be several percent for covalent bonding, it may well be tens of percent for vdW interactions. is resulted in the development of new suitableexchange functionals described above, but none of these eorts are systematicbecause there is no way how to divide the mid-range correlation into the short-

and long-range parts in a sound way. What is missing here is a united local andnonlocal functional which would be constructed together.

Page 38: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 38/102

Chapter Nonlocal functionals since

. Implementation

is nal section deals with development concerning the implementation of non-

local functionals. e simplest implementation of vdW-DF requires evaluating adouble (six-dimensional) integral, which scales as N  with the size of a system.is is unfavourable because it prohibits its use for bigger system, which are pre-cisely the target systems, being untreatable by ab-initio QM methods and oenbeing determined by vdW interactions.

Román-Pérez and Soler developed a way to evaluate (.) which scales asN log N  with the size of a system []. If the kernel Φ(k(r), k(r), r ) wasindependent on r, r, the double integral would be a plain convolution andit could be evaluated by Fourier methods. e idea is to expand Φ in termsof Φ

(k,i , k, j , r 

)where k,l  are xed values. It is equivalent to interpolation.

Aer this expansion, the double integral over position vectors can be Fourier-transformed into a single integral over wave vectors. Using this implementation,the computational cost of vdW-DF is of the order of magnitude of a plain GGAcalculation even for systems containing several hundreds of atoms. It was actually this advancement which initiated the heavy use of vdW-DF in computationalstudies.

e knowledge of a density functional is sucient for calculation of the energy,but not enough for obtaining the electron density by means of the KS scheme.For that, the XC potential v xc has to be known, which is a functional derivative of 

the energy functional,

v nlc =δ Enl

c

δρ(.)

e early implementations of vdW-DF were done non-self-consistently, that isthe density was obtained using only the local XC functional and aerwards, thetotal vdW-DF was evaluated on this density. It has been argued that the vdW-DFinteraction is too weak to has any signicant impact on the density, but there wasno denitive proof. onhauser et al. derived the potential and illustrated thatthe eect of performing self-consistent calculation is negligible []. e slight

change in electron density corresponding the self-consistent use of the nonlocalfunctional is identied to be a ow of density from the atoms to the areas betweenthe fragments, which maximizes the interaction. Vydrov et al. independently derived the matrix elements of the XC potential needed in the self-consistent

Page 39: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 39/102

. Implementation

calculation [],

⟨µv nlc ν⟩ = dEnlc

dP µν(.)

where P µν is the density matrix and µ, ν are the basis set functions.

Page 40: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 40/102

Page 41: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 41/102

Chapter

Investigations of vdW-DF

is chapter presents several of our own investigations of vdW-DF. ey deal withthe nature of dispersion interaction, with dispersion interaction in excited states

and with optimization of the Z ab parameter in vdW-DF. We use our custom codefor evaluation of the vdW-DF nonlocal functional documented in Appendix A.

. Nonlocal energy decomposition

e nonlocal correlation energy is given by (.) which reduces the nonlocalsix-dimensional kernel Φ to only one number. To better understand the nonlocalenergy, one can plot the kernel in terms of D and δ (Figure .), but this still doesnot shed light on how the nonlocal energy looks when evaluated on a real system.

e full six-dimensional kernel cannot be visualized, but it can be half-integratedinto the energy density, a three-dimensional quantity, whose visualization isalready feasible.

As a model system, we consider the argon dimer, which is a prototypical vdWsystem. Our implementation of vdW-DF uses Becke’s integration scheme, whichuses atom-centered quadrature grids. is straightforwardly divides the totalelectron density ρ on into individual atom densities ρi , ρ = ∑i ρi . Accordingly, ittranslates any integral over the whole space into a sum of integrals over atoms.Using this property, we can rewrite the total nonlocal energy of the argon dimer

dened in (.) as

  ρΦ ρ =   ρΦ ρ +   ρΦ ρ +  ρΦ ρ (.)

where ρ, ρ are the electron densities corresponding to atom and respectively.e rst two terms correspond to the nonlocal interaction of the densities of 

Page 42: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 42/102

Chapter Investigations of vdW-DF 

the individual atoms with themselves, while the last term corresponds to theinteraction of the density on atom with the density on atom . One is usually interested in the interaction energy which is dened as the total energy of the

dimer minus the sum of the total energies of the individual fragments. e totalnonlocal energy of the individual non-interacting fragments is

  ρ′Φ ρ′ +   ρ′Φ ρ′ (.)

where ρ′, ρ′

are the electron densities of the noninteracting fragments. Note thatwhile there is almost no density overlap of the fragments in case of dispersioninteraction, there is still some depletion of the density from the area between thefragments due to the Pauli principle. erefore, ρi and ρ′i are very similar but not

identical.e interaction energy thus consists of two principally dierent parts,

  ρΦ ρ +  ( ρ ρ + ρ ρ − ρ′ ρ′ − ρ′ ρ′)Φ (.)

In the case of non-overlapping fragments, the second term is zero and only therst term is relevant. Our tests showed that this holds approximately even for realmolecules. On the S database set [], for example, the second term accountsfor several percent only. erefore, we consider only the rst term in (.) in thefollowing. is leads to smaller computational cost and also easier interpretation

of the nonlocal correlation energy.Figure . shows the nonlocal energy density of ∬ ρΦ ρ, that is energy density 

on atom generated by electron density on atom . e shell structure of the argonatom can be clearly seen. e energy density and even the energy contributionsare greatest for the valence shell. is corresponds to the fact that the electrons of the valence shell are most easily polarizable and thus most prone to correlationwith the electrons of the other atom. is gure also illustrates that the dispersioninteraction is well “localized” on atoms, which justies all atom-pair dispersioncorrection methods.

e nonlocal correlation functional is combined with LDA correlation and it isclaimed that the gradient correction usually contained within a GGA functional iscovered by the nonlocal part. Figure . puts this assertion into test by comparingthe nonlocal correlation energy density of one single atom (∬ ρΦ ρ) with agradient correction from PBE. While the shell structure is clearly represented

Page 43: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 43/102

. Nonlocal energy decomposition

Figure . | Nonlocal interaction energy. Nonlocal energy of an argon atom generated bythe electron density of another argon atom at the distance of . Å. a, The nonlocal energydensity ε

nl

(r) = ∫ Φ(r , r)ρ(r) dr . b, The nonlocal energy contribution ρ(r)εnl

(r).

Page 44: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 44/102

Chapter Investigations of vdW-DF 

Figure . | Nonlocal self-energy of an atom. Nonlocal energy of an argon atom generatedby its own density. a, The nonlocal part of the semi-local PBE correlation energy densityεPBE

c − εLDA

c . b, The nonlocal energy density εnl

(r) = ∫ Φ(r , r)ρ(r) dr.

Page 45: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 45/102

. Excited states with vdW-DF 

in both in the same manner, there are some quantitative dierences. e PBEgradient correction is positive everywhere. e vdW-DF energy density goesmore quickly to zero with the distance from the nucleus, it is generally smaller

and it is negative in the density tail areas. e tail areas are far enough from thecore of the atom to be in the attractive region of the nonlocal kernel Φ. is gureshows that while part of the semi-local gradient correction might be recoveredby the nonlocal functional, some loss of accuracy has to be expected.

is section presented several visualizations of the vdW-DF nonlocal energy.It was shown that nonlocal energy is well “localized” on atoms and that its maincontribution comes from the valence electrons. A comparison between the non-local energy and the gradient correction of the PBE correlation functional wasalso presented, illustrating that they share some qualitative aspects but dier

quantitatively.

. Excited states with vdW-DF

e wavefunction-based methods which accurately account for dispersion arepractically limited by the size of the studied system. is is true for the study of electronic ground state and the limitations are even more severe for the excitedstates. An equivalent of the HF method for excited states is the CASSCF method.Here, the trial wavefunction consists of more than one Slater determinants, gen-

erated by all possible electronic excitations within a specied set of occupiedand virtual orbitals (active space). In theory, if the active space contained all theorbitals, CASSCF would give the exact energy (within the basis set), but due toprohibitive computational cost, one usually uses only several orbitals. erefore,in practical calculations, CASSCF does not account for dispersion, which is com-putationally covered only by excitations to higher virtual orbitals not present in atypical active space. CASPT is a method for excited states, which gives resultssimilar to MP for systems with single-conguration character, but is able to treatalso multi-conguration systems.

Excimers are dimers which are only weakly or not at all bonded in the groundstate, but are bonded when one of the monomers is in an excited state. One of themain contributions to the bonding energy are oen vdW interactions. ere aremany excimers which can be calculated by CASSCF, but are too big for CASPT,

Complete-active-space self-consistent eld.Complete-active-space perturbation theory to second order.

Page 46: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 46/102

Chapter Investigations of vdW-DF 

but as CASSCF does not contain dispersion, the interaction energies are oenwell underestimated.

Here, we illustrate a possible approximate solution to this problem by adding

 vdW-DF nonlocal energy to CASSCF energies. e reason behind this approach isthat the total interaction energy of vdW systems consists mainly of exchange repul-sion (exact in CASSCF) and dispersion (added by vdW-DF). e CASSCF+vdW-DF combination should thus describe the main components of the interaction.e original version of vdW-DF is used because it is compatible with the revPBEexchange, which is tted to the HF exchange, which in turn is equivalent to theCASSCF exchange.

We consider the case of the benzene excimer, which is one of the most studiedexcimersboth theoretically and experimentally []. e three lowest lyingexcited

states of the benzene molecule correspond to excitations of electrons from theoccupied π -orbitals with one nodal plane (Eg symmetry) to the virtual π -orbitalswith two nodal planes (Eu). e transition from Eg to Eu leads to the excitedstates of symmetries Bu, Bu and Eu. In case of the dimer, its lowest excited statesare formed by (anti)symmetrized combinations of one benzene molecule in theground state and the other one in an excited states. e combined wavefunctioncan be either symmetric or antisymmetric with respect to inversion (equivalentto bonding and nonbonding orbitals in a hydrogen molecule), resulting in twoexcited states of the dimer per one excited state of the monomer. From the threelowest lying excited state of the monomer, only Bu and Eu lead to observabletransitions, resulting in four excited states which are subject of our study.

All calculations were performed in the Molpro package [], using the ANObasis set with spd basis set functions on carbon atoms and sp on hydrogenatoms. e CASPT calculations were carried out with the standard IPEA modi-cation. e active space comprised the six π -orbitals of both benzene molecules,resulting in electrons in orbitals. e basis set superposition error (BSSE)was taken into account by using the counterpoise correction (CP) in the formas presented in Ref. . e vdW-DF nonlocal energy was calculated from theCASSCF densities.

Figure . shows results for the benzene excimer. e addition of nonlocalcorrelation energy improves the CASSCF interaction curves in all cases. eCASSCF curve for the ground state is purely repulsive due to the missing disper-sion. In contrast, the CASSCF+vdW-DF and CASPT curves nearly coincide.e agreement is not that perfect for excited states but still promising. For the

Page 47: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 47/102

. Excited states with vdW-DF 

Figure . | Benzene excimer. Interaction curves of the ground state and lowest lyingexcited states of benzene dimer. CP stands for counterpoise correction. For comparison, a

constant is added to the CASSCF curves so that they have the same dissociation limit asCASPT curves. The lower excited state corresponds to the Bu monomer excitation, thehigher to the E u excitation. The CASSCF energies without CP correction are not presented,because BSSE is almost negligible in case of CASSCF.

non-bonding (antisymmetric) states, the vdW-DF correction works very well.e worst case are the bonding (symmetric) states, the interaction in the Bu

and Eu case being underestimated and overestimated, respectively, by severaltenths of eV. But still, the CASSCF+vdW-DF energies are much better than pureCASSCF energies. On a dierent note, the BSSE in case of CASPT is clearly 

non-negligible, being of the same magnitude as the dispersion from vdW-DF.We have also studied the dependence of the dispersion energy on the electronic

state of a molecule. For this purpose, we used the benzene–argon system insteadof the benzene dimer to have only one fragment which can undergo electronictransitions (the excited states of an argon atom lie much higher than those of a

Page 48: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 48/102

Chapter Investigations of vdW-DF 

−0.006

−0.004

−0.002

0.000

2 4 6 8 10

Distance (angstrom)

   E  n  e  r  g  y   (  e   V   )

Excited state

B2u

B1u

E1u

Figure . | Dispersion in excited states. The dierence between the nonlocal energy of abenzene–argon system calculated from the ground state density and from the excited statedensity.

benzene molecule). Figure . shows that the change in dispersion interactioncoming from the change in electron density due to electronic excitation is in-signicant, being less than one hundredth of eV even for short interfragmentdistances. e dierence is even smaller between individual excited states. is

independence of dispersion on the electronic state can be understood solely interms of the number of electrons. Benzene molecule has valence electrons,and the transition of one of them can aect several percent of dispersion at most.Moreover, the transition is of the π → π type so even the electron density comingfrom the excited electron does not change much. Finally, the transitions arebetween the same orbitals, diering mainly in symmetry, resulting in the almostidentical dispersion for the individual excited states.

is section introduced a potential way how to correct CASSCF interactionenergies of excimers for dispersion by simply adding the vdW-DF nonlocal energy.

It was shown that this scheme works well for the ground state and nonbondingexcited states of the benzene excimer, and it improves also the bonding states albeitless accurately. is discrepancy should be further investigated if this approacheswas to be turned into a real method. Further, it was shown here that the nonlocalenergy depends on the electronic states only negligibly.

Page 49: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 49/102

. Optimizing the Zab parameter 

. Optimizing the  Z ab parameter

e Z ab parameter in the vdW-DF nonlocal functional controls screening of the

electrons and the more negative it is, the weaker the dispersion interaction. In theoriginal version of vdW-DF, Z ab is derived from gradient expansion of density in the slowly varying electron gas. In the second version, vdW-DF, Z ab is takenfrom the large-N  asymptote, that is the asymptote of hypothetical atoms with N 

electrons where N goes to innity. e large-N  asymptote has been used in thederivation of some semi-local functionals and it is probably closer to the reality of molecules than the slowly varying electron gas. However, it is clear that neitherof these two approaches is exactly similar to real molecules. e idea is thus tooptimize the Z ab parameter with respect to some reference benchmark energies.

.. S set

e S database set contains seven hydrogen-bonded complexes, eight predom-inantly dispersion-bonded complexes, and seven mixed complexes []. It hasbecome a standard for benchmarking methods intended for vdW interactions[, ]. We have used the reference S energies to optimize the Z ab parameterin vdW-DF. Taking into account that vdW-DF and vdW-DF use also dierentexchange functionals, we have examined various semi-local functionals to becombined with the vdW-DF nonlocal functionals. Inspired by the VV nonlocal

functional, we have not limited the search for combinations with LDA correlation,but also considered semi-local correlation functionals. We tested combinationsof PBE, revPBE, B, B and PW exchange functionals and of LDA, LYP, andPBE correlation functionals.

e optimized values of Z ab are presented in Table .. e best mean absolutepercentage error (MAPE) of .% is obtained with the revPBE functional (revPBEexchange and PBE correlation). e semi-local functionals of vdW-DF and vdW-DF perform worse, with MAPE of .% and .% and optimized Z ab values of −. (−. in vdW-DF) and −. (−. in vdW-DF), respectively. isshows that the Z 

abvalues in the original methods were already quite optimal

with respect to the S set, but they could be improved. Also, it can be seen thatthe improvement of vdW-DF over vdW-DF stems mainly from the hydrogen-bonded complexes, which corresponds to earlier ndings. Two best performingfunctionals have semi-local correlation, which suggests that while the argument

Page 50: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 50/102

Chapter Investigations of vdW-DF 

0%20%

0%

−20%0%

20%

0%20%40%

−20%0%

20%

0%20%

0%20%40%60%

80%

0%20%40%60%80%

0%20%

−20%0%

20%40%60%80%

−20%0%

20%40%

−20%0%

20%40%60%

revPBE

B88LYP

B88LDAc

PW86LDAc

HF

PBE

PBExLDAc

B86LDAc

PW86P86

revPBExLDAc

PW86LYP

B86LYP

1 3 5 7 9 11 13 15 17 19 21

S22

   P  e  r  c  e  n   t  a  g  e  e  r  r  o  r

Figure . | Optimizing Zab on S set. The percentage errors of interaction energies of 

individual complexes ( x -axis) from the S set as a function of the used semi-local XCfunctional. Complexes – are hydrogen-bonded, – are dispersion-bonded and - aremixed. The HF method is included for comparison.

Page 51: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 51/102

. Optimizing the Zab parameter 

Table . | Values of Zab for dierent semi-local functionals optimized on the S set.

XC functional Z ab MAPEa

revPBE −. .%BLYP −. .%BLDAc −. .%PWLDAc

b−. .%−.c .%

HFd−. .%

PBE −. .%PBExLDAc −. .%BLDAc −. .%revPBExLDAc

e−. .%−.f  .%

PWLYP −. .%BLYP −. .%a The mean absolute percentage error of the interaction energies as calculated with the

specied semi-local XC functional and vdW-DF nonlocal functional with given Z ab with re-

spect to the reference S energies. MAPE is used as the target quantity in the optimization.b The functional used in vdW-DF. c The value of Z ab in the original vdW-DF method.d The Hartree–Fock method is included only for comparison. e The functional used in

vdW-DF. f The value of Z ab in the original vdW-DF method.

against the use of semi-local correlation (due to potential double counting) mightbe theoretically justiable, it does not seem useful in the light of numerical results.Notable is the good performance of the HF method, which suggests that the localcorrelation is not that important in case of interaction energies of vdW complexes.e nal note is on the Z ab values of two worst performing functionals, whichare lesser than −. Such a low Z ab value is unreasonable and suggests that theunderlying semi-local functionals are a bad approximation for E

xc. In contrast,the Z ab values for the top ve functionals are all roughly in the range marked by 

 vdW-DF and vdW-DF values.

Figure . sheds further light on the performance of the individual semi-localfunctionals. Dierent behaviour for the three groups of the S set can be seen, es-

pecially for the hydrogen-bonded complexes as compared to the other two groups.e PWLDAc functional of vdW-DF or even BLDAc perform perfectly forthe hydrogen-bonded complexes, but lack in the other two groups when com-pared to the best performing functionals. With the exception of revPBExLDAc, itcan be said that the best functionals for hydrogen-bonded complexes are those

Page 52: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 52/102

Chapter Investigations of vdW-DF 

with LDA correlation. e most problematic complex for most of the functionalsis number , the methane dimer. is can be easily understood as the interactionenergy of this complex is lowest in the S set (. kcal/mol), making the percent-

age error large. Indeed, the smallest systems are oen the most stringent test forDFT methods, this case being no exception.

is section presented a systematic study of the interplay between choosingthe right semi-local functional for approximating E

xc and the value of the Z abparameter. e semi-local functionals of vdW-DF and vdW-DF are includedand while the improvement of the second version is apparent, we showed thatbetter choice can be made, at least based on the results on the S set. However,the improvement made is only by %, and other approaches have to be searchedfor to improve the accuracy of vdW-DF more signicantly.

.. Noble gas dimers

Dimers of noble gas atoms are prototypical dispersion-bonded systems. Beingsymmetrical, the electrostatic and induction forces are not present and the at-tractive forces come from dispersion only. erefore, they are oen used ininvestigating and testing dispersion methods.

Wehaveusedthenoblegasdimerstooptimizethe Z ab values for the PWLDAc

functional (from vdW-DF) against CCSD(T)/CBS energies. In contrast to thecase of the S set however, a distinct Z ab value for each individual dimer and in-

teratomic distance was obtained. is investigation could lead to parametrizationof Z ab as a function of the atom type.

Figure . shows the optimized Z ab values. For all dimers, the optimal Z ab value goes from small negative values to large negative values, passes through aminimum, and then approaches zero with growing distance. All the curves havea similar shape, but they dier quantitatively. e biggest outliers are the helium,neon and He−Ne dimer, that is the smallest dimers.

Figure . shows the dependence of the nonlocal energy at individual pointson the interaction curve. e dependence is much stronger for shorter distance,

which is simply due to the dispersion interaction itself being stronger. A moreinteresting observation is that the shape of the dependence is also dierent. While

Coupled clusters method with single, double and perturbative triple excitations at the com-plete basis set limit. We have used a standard method for the basis set extrapolation,CCSD(T)/CBS = CCSD(T)/AVDZ + MP/CBS − MP/AVDZ, MP/AVnZ = MP/CBS + A× n− . All energies were calculated in Molpro [].

Page 53: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 53/102

. Optimizing the Zab parameter 

−5

−4

−3

−2

−1

0

2 4 6 8 10

Distance (angstrom)

        Z      a        b

He−He

He−Ar

He−Kr

Ne−Ne

Ne−Ar

Ne−Kr

Ar−Ar

Ar−KrKr−Kr

Figure . | Zab values for noble gas dimers. Optimal Z ab for PWLDAc as a function of the

noble gas dimer and interatomic distance. The He−Ne dimer is not present because itsoptimal Z ab is too negative for a large part of the interatomic distance and not enough points

have been obtained for it.

at short distances, the nonlocal energy changes signicantly even for very negative values of Z ab, it is nearly constant and changes only for Z ab values close to zeroat longer distances. is would suggest to ignore the tail part of the interactioncurves when searching for optimal Z ab. However, this approach would invalidateany calculations where asymptotic interactions are important, such as in bulk matter or molecular crystals.

is section illustrated that the compatibility between the semi-local and non-local functional is far from perfect. If it was, the Z ab parameter would be inde-

pendent of the interatomic distance, because it is present in the local quantity k from (.). us Z ab determines the behaviour of the local density, not of the actual nonlocal interaction. erefore, it cannot be made dependent on thedistance, at least not without seriously violating the spirit of vdW-DF. In light of these consideration, it seems that parametrizing Z ab as a function of the atom

Page 54: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 54/102

Chapter Investigations of vdW-DF 

−0.002

−0.001

0.0000.001

−0.002

−0.001

0.000

0.001

−0.001

0.000

−0.001

0.000

0.001

0.000

0.001

−0.003

−0.002

−0.001

0.000

0.001

0.002

−0.002

−0.001

0.000

0.001

−0.002

−0.001

0.000

0.001

−0.001

0.000

0.001

H e−H e

H e−N e

 e−A 

H e−K r  

N e−N e

N e−A r  

N e−K r  

A r  −A r  

A r  −K r  

2 3 4 5 6

Distance (angstrom)

   E  n  e  r  g  y   (  a .  u .   )

Figure . | Optimizing Zab on noble gas dimers. Interaction curves (black) of noble gas

dimers obtained from CCSD(T)/CBS. The yellow curves (without displayed axes) denote thedependence of the nonlocal energy on Z ab ∈ (−, ) for interatomic distance at which theyintersect the interaction curve. The intersection also denotes the Z ab value with whichPWLDAc+vdW-DF exactly reproduces the CCSD(T)/CBS energy.

Page 55: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 55/102

. Concluding remarks

type would be superuous as the underlying mechanism is awed on a deeperlevel of the theory.

. Concluding remarks

is chapter presented three studies of the behaviour of vdW-DF, namely (i) the visualization of the vdW-DF nonlocal energy, (ii) a potential use of vdW-DF fortreating excimers and (iii) optimizing the Z ab parameter together with selectingthe best semi-local functional for vdW-DF. It is apparent from (i) that the nonlocalinteraction is mainly between the individual atoms, and that it can be decomposedinto a pseudo-sum over atom pairs. At the same time, the results in (iii) showedthat optimizing the Z ab parameter is not as promising as previously expect, and

that dierent approaches have to be sought. Progressively, the combination of these two results lead to the development of the correction scheme presented inthe next chapter.

Page 56: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 56/102

Page 57: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 57/102

Chapter

vdW-DF/CC correction scheme

One of the most studied processes where van der Waals interactions, or dispersionforces, play a major role is the physisorption of molecules on various external

or internal surfaces of materials [–]. DFT is a major tool of computationalchemistry for studying such systems (surfaces or crystals). As mentioned earlier,however, traditional local and semi-local DFT functionals either do not coverdispersion at all or simulate it unreliably with non-physical binding by exchangeenergy []. Signicant eorts have been made to reliably include dispersion intoDFT, and many dierent methods have been suggested, implemented and tested,ranging from empirical to purely ab-initio approaches [].

is chapter presents a method for the prediction of the binding energies of physisorption with subchemical accuracy (∼ . kcal/mol) []. Such accuracy is necessary for a qualitative comparison of computational results with someexperiments, e. g. measurements of adsorption isotherms []. Two state-of-the-art generally applicable DFT dispersion methods, DFT-D of Grimme []and VV of Vydrov and Van Voorhis [], reach the accuracy of several tenthsof kcal/mol on the S set [], on which they are partly parametrized, andof about kcal/mol on the noncovalent subset of GMTKN [], which is apredominantly independent benchmark for both [, ]. However sucient forgeneral use, they are not accurate enough for the specic purposes mentionedabove.

e method presented here is based on vdW-DF and introduces an empirical

scaling derived from accurate CCSD(T) calculations on small models of the ad-sorption system. e price for this empiricism is system-specicity, but its benet

is chapter closely follows the paper “Hermann, J. & Bludský, O. A novel correction scheme

for DFT: A combined vdW-DF/CCSD(T) approach” submitted to the Journal of ChemicalPhysics.

Page 58: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 58/102

Chapter vdW-DF/CC correction scheme

is that the method meets the strict criteria for accuracy needed for comparisonwith adsorption experiments.

. DFT/CC and vdW-DF/CC

e vdW-DF method introduced and investigated in previous chapters is used asa starting point for our correction scheme. vdW-DF has been shown to providebinding energies in good agreement with benchmark methods or experiment [].At the same time, it is non-empirical and there is a strong assumption that it isunbiased to any specic type of chemical systems.

e empirical part of our method, which brings in the required accuracy, drawsupon the ideas of DFT/CC, an empirical scheme for correcting DFT []. Here,

the dierence ∆E between the accurate CCSD(T) and local DFT interactionenergies of two fragments A, B is approximated by a set of correction curves ε XY ,

∆E =i∈ A

 j∈B

εT (i)T ( j)(Ri j) (.)

where the summation is over the pairs of atoms i, j, T (k) is the atom type (H,C,. . . ) of atom k, and Ri j is the interatomic distance. To parametrize ε XY , one hasto devise a series of models where each model serves for parametrizing a new correction curve while all the others have to be known from previous models.

For example, for parametrizing εHH, εCH, εCC, one uses H⋅⋅⋅H, Bz⋅⋅⋅H, Bz⋅⋅⋅Bz,respectively []. e individual curves are obtained by  interpolation asdescribed in Ref. . is approach can provide superb accuracy (< . kcal/mol),but the parametrization procedure has some deciencies. It can be tedious in caseswith many atom types, and it can also be numerically unstable, e. g. when thereare regularly alternating atoms of dierent types, such as Si and O in silica-basedmaterials.

Our new correction scheme, dubbed vdW-DF/CC, overcomes these two obsta-cles. It uses only one correction curve ε and the weight functions wi j, obtained

from vdW-DF, to dierentiate between atom types.

e correction energy is thusapproximated as

∆E =i∈ A

 j∈B

ε(Ri j)wT (i)T ( j)(Ri j) (.)

is scheme needs only a single cluster model to be parametrized for any given

Page 59: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 59/102

. T and T silica models

adsorbent−adsorbate system. Moreover, any numerical instabilities of DFT/CCare eradicated, as the distinction between atom types is now made outside of thecorrection scheme on the vdW-DF level.

It was shown in Chapter that the vdW-DF nonlocal energy is localized onpairs of atoms and that it can be naturally expressed as a sum over the pairs inour implementation,

Enlc=

i∈ A

 j∈B

Enlci j (Ri j) (.)

To turn from Enlci j for individual atom pairs (i j) to є  XY (r ) for atom-type pairs

( XY ), the interpolation is used again such that

i∈ X 

 j∈Y 

Enlci j (Ri j) =

i∈ X 

 j∈Y 

є  XY (Ri j) (.)

Preliminary tests have shown that at least on a class of similar molecular systems,this representation of vdW-DF by pair curves is well transferable and that theerror associated with this approximate representation is signicantly smaller thanthe error of the resulting correction method. us, we can evaluate the vdW-DFenergy approximately as a simple atom-pair curve method.

e dimensionless weights w XY  are then given as

w XY  =є  XY 

є  X ′Y ′(.)

where є  X ′Y ′ is an arbitrary reference curve.

Our method can also be interpreted in a dierent way than as a modiedDFT/CC method. Aer rewriting Eq. . as

∆E =i∈ A

 j∈B

ε(Ri j)є  X ′Y ′(Ri j)є T (i)T ( j)(Ri j) (.)

 vdW-DF/CC can be seen as a scaling of vdW-DF by εє  X ′Y ′ . us, our schemeis a merge of two worlds in a sense. It can be interpreted either as an empirical

pair correction curves weighed by non-empirical method, or as a non-empiricalnonlocal functional scaled by empirical factors.

Page 60: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 60/102

Chapter vdW-DF/CC correction scheme

Figure . | Models of silica. a, The T model (Si(OH)) is the simplest relevant model of silica.

The O atoms are terminated by H atoms. b, The T model (Si(OH)OSi(OH)) is the simplestmodel of silica containing the Si−O−Si bridge, which is characteristic of silica-based surfaces.

. T and T silica models

We have used our method to calculate the interaction energies of ve small

molecules (CH, CO, H, HO, N) with two dierent silica-based surfaces.Figure .a shows the T model of silica utilized to parametrize the correctioncurves ε and to obtain the vdW-DF curves є  XY . Figure .b shows the T modelused to verify the transferability of the parametrization. Figure . depicts all therelative orientations of the nT models and molecules used in our study. Geome-tries with C v have been used to facilitate the costly CCSD(T) calculations. emost strongly binding orientation of each molecule on the T model was used forparametrization. Figures . and . show the obtained є  XY  and ε, respectively.e correction curves ε have all similar shape but they are displaced along the

x -axis. On the contrary, a hypothetical correction curve ε = є  X ′Y ′ which wouldreproduce the vdW-DF energies exactly has a dierent shape. is suggests thatthere is a systemic error and a universal correction curve for all molecules couldbe devised which would still provide better energies than vdW-DF.

e numerical work uses the vdW-DF avor (PW exchange functional,Z ab = .) as it provides better interaction energies than the original vdW-DF []. e CCSD(T)/CBS energies and DFT electron densities used for theevaluation of vdW-DF were obtained by M []. e standard procedurefor obtaining the CBS limit was used. e PW+LDA(c)/AVQZ energies wereobtained by Gaussian []. e geometries and energies of extended systemswere obtained by VASP using so and hard PAW pseudopotentials, respectively [].

CCSD(T)/CBS = CCSD(T)/AVDZ +MP/CBS−MP/AVDZ, MP/AVnZ = MP/CBS+ A×n−

Page 61: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 61/102

. T and T silica models

Figure . | Geometries of model systems. Geometries of model systems with the T (a) andT (b) models. The numbers denote the geometry index used throughout this chapter. Thegeometries of models with H and N are dened equivalently to CO.

Page 62: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 62/102

Page 63: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 63/102

. T and T silica models

0

−2

2 4 6 8

Rij (angstrom)

   E  n  e  r  g  y   (   k  c  a   l   /  m  o   l   )

Molecule CH4 CO2 H2 H2O N2

Figure . | vdW-DF/CC correction curves. Correction curves parametrized on the T model

as a function of the interatomic distance R i j . The black curve is a hypothetical correctioncurve that would reproduce vdW-DF interaction energies if used.

Figures . and . show the calculated interaction curves of the moleculeswith the T and T model, respectively. vdW-DF systematically overbinds in allcases. When going from the T model, on which our scheme is parametrized,to the T model, where it is tested, its accuracy deteriorates somewhat, but it is

still several times better than vdW-DF. e order of binding energies of theindividual geometries oen diers between the T and T model. is illustratesthe dierence between T and T. e molecules interact predominantly withthe terminal O atoms in case of the T model, whereas the dominant part of the interaction with the T model is with the Si−O−Si bridge. It is notable that

 vdW-DF/CC works best for the most binding geometries of the T model systemseven though they are dierent from the most binding T geometries.

Table . presents the binding energies of the T model systems. e root-mean-square error of our method is . kcal/mol (all molecules and all bonding

orientations) while it is . kcal/mol for vdW-DF.

e mean absolute percentageerror is % for our method and % for vdW-DF. is shows that our methodprovides roughly an order of magnitude better binding energies for the systemsfor which it has been parametrized than vdW-DF.

Page 64: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 64/102

Chapter vdW-DF/CC correction scheme

0

−1

0−1

−4

0

0−1

−4

0

−1

 C H4  

 C  O2  

H2  

H2   O

N2  

4 6 8

Distance (angstrom)

   E  n  e  r  g  y   (   k  c  a   l   /  m  o   l   )

Geometry 1 2 3 4

Method CCSD(T) vdW−DF2 vdW−DF/CC

Figure . | Interaction curves of the T model. Geometries correspond to dierent

orientation of the fragments dened in Figure .. vdW-DF/CC is our method parametrized onthe most bonding geometry of the T model, hence it is coincident with the CCSD(T) curve for

that geometry.

Page 65: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 65/102

. T and T silica models

0

−1

0

−1

−4

0

−1

0−1

−4

0

−1

 C H4  

 C  O2  

H2  

H2   O

N2  

4 6 8

Distance (angstrom)

   E  n  e  r  g  y   (   k  c  a   l   /  m  o   l   )

Geometry 1 2 3 4

Method CCSD(T) vdW−DF2 vdW−DF/CC

Figure . | Interaction curves of the T model. Geometries correspond to dierentorientation of the fragments dened in Figure .. vdW-DF/CC is our method parametrized on

the most bonding geometry of the T model.

Page 66: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 66/102

Chapter vdW-DF/CC correction scheme

Table . | Binding energies (kcal/mol) of the T model systems by dierent methods.

Molecule Geometrya vdW-DF vdW-

DF/CCCCSD(T) ∆vdW-

DF/CCb∆CCSD(T)c

CH -. -. -. . -. -. -. -. . .

CO -. -. -. . -. -. -. -. . . -. -. -. . -.

H -. -. -. . -. -. -. -. . -. -. -. -. . .

HO -. -. -. . -. -. -. -. . -.

non-bonding non-bondingN -. -. -. . -.

-. -. -. . -. -. -. -. . -.

a The geometry index dened in Figure .. b The dierence vdW-DF/CC − vdW-DF.c The dierence CCSD(T) − vdW-DF/CC.

. Tests on quartz surface and UTL lamella

We have tested the T model parametrization of vdW-DF/CC on two silica sur-faces, namely the quartz surface and the UTL lamella. e perfectly reconstructedα-quartz surface is obtained by cutting the bulk quartz crystal and rearranging thesurface atoms such that they fully saturate their covalent bonding []. Figure .depicts the resulting surface. It is possibly the most simple extended silica surface.Two dierent sites on the quartz surface are considered: site A above a -ring andsite B above an Si atom.

e equilibrium geometries of the adsorbed molecules were preoptimized using vdW-DF. is is justied by the fact that while vdW-DF generally overbinds onT and T models, it provides very accurate bonding distances. In the periodicsettings, vdW-DF/CC is evaluated by considering all silica–molecule atom pairswhich are closer than some threshold. e contribution of pairs distanced to Å is less than one hundredth of kcal/mol, so the threshold of Å has beenadopted.

Table . shows the calculated binding energies. ey range from−. kcal/mol

Page 67: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 67/102

. Tests on quartz surface and UTL lamella

Figure . | Quartz surface. The side (a) and top (b) views of the perfectly reconstructedα-quartz silica surface slab with sites A and B denotes by orange circles. Site A is on top of the

-ring, site B is on top of the Si atom.

Table . | Binding energies (kcal/mol) of molecules with the quartz surface by dierentmethods.

Molecule Sitea GGAb vdW-DF vdW-

DF/CC∆vdW-

DF/CCc

CH A . -. -. .B . -. -. .

CO A . -. -. .B . -. -. .

H A . -. -. .B . -. -. .

HO A -. -. -. .B -. -. -. .

N A . -. -. .B . -. -. .

a The sites are dened in Figure .. b Bare semi-local functional, PWLDAc.c The dierence vdW-DF/CC − vdW-DF.

for H and site B to −. kcal/mol for HO and site A (our method). vdW-DFoverbinds by . to . kcal/mol. e dierence between vdW-DF/CC and vdW-DF is most pronounced for weakly bonded molecules (CH, H, N), where itcan be more than %. is also illustrates why physisorption is such a problem

Page 68: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 68/102

Chapter vdW-DF/CC correction scheme

Figure . | UTL lamella. The front (a) and side (b, c) views of the UTL lamella with a methane

molecule bonded to four dierent sites denotes by letters A–D. Site A is on top of the “hill”formed by four silanol groups, sites B and C are in the valleys between the silanol hills and site

D is in the intersection of the valleys.

from the theoretical point of view. Even absolute errors of less than kcal/molcan produce signicant relative errors.

e UTL lamella is obtained by removal of the double--ring units from UTL[]. e material made of stacked UTL lamellas is one of the rst examples of theso-called D zeolites. Properties of these novel materials are yet mostly unraveled,but as their characterisation is oen based on adsorption experiments, it is of great importance to know the binding energies of small probe molecules on thesurface of an individual lamella. Figure . shows the computational model of the

UTL lamella, along with four dierent bonding sites which were considered. echoice of these sites is justied by the topological picture of the surface, which isthat of two perpendicular systems of valleys separating the silanol hills. e sitesare chosen on the hills, in the passes in-between and in the valley intersections.e computational procedure is identical to the case of the quartz-surface.

Page 69: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 69/102

. Tests on quartz surface and UTL lamella

Table . | Binding energies (kcal/mol) of molecules with the UTL lamella by dierentmethods.

Molecule Sitea GGAb vdW-DF vdW-

DF/CC

∆vdW-

DF/CCc

CH A . -. -. .B . -. -. .C . -. -. .D . -. -. .

CO A -. -. -. .B . -. -. .C -. -. -. .D . -. -. .

H A -. -. -. .

B -. -. -. .C . -. -. .D . -. -. .

HO A -. -. -. .B -. -. -. .C -. -. -. .D -. -. -. .

N A -. -. -. .B -. -. -. .C -. -. -. .D . -. -. .

a The sites are dened in Figure .. b Bare semi-local functional, PWLDAc .c The dierence vdW-DF/CC − vdW-DF.

Table . presents the calculated binding energies. Compared to the quartzsurface, the energies are signicantly bigger, ranging from −. kcal/mol for H

and site D (valleys intersection) to −. kcal/mol for HO and site A (silanolhill). e preference for bonding decreases generally in the order A > B ≈ C > D

and it should be noted that this is reproduced by both methods. However, as inthe case of quartz, the weakly bonded molecules are seriously overbinded. vdW-DF overbinds by . to . kcal/mol with respect to vdW-DF/CC, CH

being

the most serious case with % overbinding. e dierence between ∆ vdW-DFof dierent sites (same molecule) can be as much as %, showing that ourcorrection scheme is sensitive to the surrounding of the adsorbing molecule.

Page 70: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 70/102

Chapter vdW-DF/CC correction scheme

. Concluding remarks

In computational chemistry, it is usually aimed at generally applicable methods,

which take only the molecular geometry as an input and produce the energy.Here, we presented a dierent approach, which is rather instructions on how todevise a model for a particular system. is leads to increased eorts when onewants to describe some system for the rst time, but enables much rmer grip onthe nal errors in binding energies. Indeed, the information about accuracy of the generally applicable method is oen only statistical, but one does not know how well the method works in a particular case. e earlier DFT/CC scheme is apioneer of the system-specic approach, but it is quite laborious to use and hassome minor complications in certain cases. e vdW-DF/CC is relatively simpleto use and is numerically more stable.

e vdW-DF nonlocal functional is at the core of vdW-DF/CC. Our methodadds the scaling which eectively dumps or enhances the vdW-DF energy to bettermatch the underlying semi-local functional. Indeed, the DFT/CC can cover evenerrors in electrostatic interactions coming from the semi-local functional, due todierent correction curves for each individual atom types. On the other hand,

 vdW-DF/CC has one universal correction curve for all atoms, which cannotrepresent the anisotropic electrostatic bonding. us we can suppose that ourempirical scheme merely improves the description of dispersion forces.

e results on the T and T models illustrate that the transferability of vdW-

DF/CC is very good. e models dier quite signicantly, yet the errors on the Tmodel are generally within . kcal/mol, even though the method is parametrizedon the T model. e similarity of the T model with real silica surfaces (theSi−O−Si bridges) leads to the conclusion that the parametrization should be welltransferable even to extended systems. e accuracy of vdW methods for DFT isoen measured in absolute errors. However, this can be misleading as the vdWbinding energies span more than one order of magnitude. We illustrated on thecases of quartz surface and UTL lamella that the chemical accuracy of kcal/molis insucient for some physisorbed molecules, whose binding energy is in the

order of several kcal/mol. While the non-empirical vdW-DF method describedall qualitative aspects correctly, our method provides a higher level of accuracy,which is needed for quantitative comparison with experiments.

Page 71: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 71/102

Summary

e aim of this thesis was to investigate the nonlocal correlation density functionalmethods. e van der Waals interactions has become an extensively studiedphenomenon in computational chemistry and the nonlocal functionals provide astraightforward way for their description. However, the accuracy of these methodshas not reached the quality of state-of-the-art empirical methods. e motivation

for this study was to produce new ndings about the nonlocal functionals thatcould bring ideas about the improvement of their accuracy.

We have presented several studies about the behaviour of vdW-DF, the oldest

nonlocal functional. We have found out that the nonlocal energy is well localizedon the atom pairs and that the main contribution comes from the valence shellelectrons. e replacement of the semi-local gradient correction to correlationby the non-local correlation reproduces qualitatively the node structure of theenergy density, but is not quantitatively equivalent. We haven shown that the

 vdW-DF nonlocal energy can greatly improve the binding energies of excimers inexcited states calculated by the CASSCF method. e ground and non-bondingexcited states are described very well by our combination, but there is a roomfor improvement for the bonding states. We have extensively studied the Z abparameter of the vdW-DF functional. We have shown that it can be reoptimizedto provide higher accuracy for the S benchmark set. e optimal value dependson the semi-local functional and it has been found that the revPBE exchangefunctional with the revPBE semi-local correlation is the best performer. eoptimizations of Z ab on the noblegasdimersshowed that the parameter is formally dependent on the distance. However, this dependency is not compatible withthe theory and indicates that the PWLDAc semi-local functional is not fully 

compatible with the nonlocal functional.In the second part, we presented an empirical correction scheme which takes

 vdW-DF as a starting point. e vdW-DF is decomposed into atom pairs andthe resulting pair curves are scaled using the interpolation. e methodis formally very similar to the earlier DFT/CC method, which has been shown

Page 72: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 72/102

Summary 

to have a superb accuracy. Our scheme retains much of this quality and addssimplicity and robustness. We have tested our method on silica-based surfaces.e dierence between our method and vdW-DF can be as much as kcal/mol

or %. Such dierences can be crucial when comparing theoretical results withexperiments.

is thesis represents a broad study of the vdW-DF functional. It gave us theinsight into how the method works, where does it work well and where are itsaws. It showed how a non-empirical method can be combined with an empiricalscheme to reach better accuracy. We hope that this will enable more studies whereexperimental results are accompanied by theoretical rationalizations.

Page 73: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 73/102

References

. Autumn, K. et al. Evidence for van der Waals adhesion in gecko setae. P.

Natl. Acad. Sci. USA , – ().

. Mandelbrot, B. How long is the coast of Britain? Statistical self-similarity andfractional dimension. Science , – ().

. Langreth, D. C. et al. A density functional for sparse matter. J. Phys.: Condens.

 Matter , ().. Johnson, E. R. et al. Revealing noncovalent interactions. J. Am. Chem. Soc.

, – ().

. Burke, K. Perspective on density functional theory. J. Chem. Phys. , ().

. Langreth, D. C. & Vosko, S. H. Exact electron-gas response functions at highdensity. Phys. Rev. Lett. , – ().

. Andersson, Y., Langreth, D. C. & Lundqvist, B. I. Van der Waals interactionsin density-functional theory. Phys. Rev. Lett. , – ().

. Langreth, D. et al. Van der Waals density functional theory with applications.Int. J. Quantum Chem. , – ().

. Dion, M., Rydberg, H., Schröder, E., Langreth, D. & Lundqvist, B. Van derWaals density functional for general geometries. Phys. Rev. Lett. , ().

. Piela, L. Ideas of Quantum Chemistry (Elsevier, ).

. Koch, W. & Holthausen, M. C. A Chemist’s Guide to Density Functional eory 

(Wiley-VCH, ).

. Berland, K. Bound by long-range interactions: Molecular crystals and benzene

on Cu(). Ph.D. thesis, Chalmers University of Technology ().

. Parr, R. G. & Yang, W. Density-functional theory of atoms and molecules(Oxford University Press, ).

. Burke, K. & Wagner, L. O. DFT in a nutshell. Int. J. Quantum Chem. ,– ().

. Kristyán, S. & Pulay, P. Can (semi)local density functional theory account for

Page 74: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 74/102

References

the London dispersion forces? Chem. Phys. Lett. , – ().

. Dion, M. Van der Waals forces in density functional theory . Ph.D. thesis,Rutgers University, New Jersey ().

. Tkatchenko, A., Ambrosetti, A. & Robert A. DiStasio, J. Interatomic methodsfor the dispersion energy derived from the adiabatic connection uctuation-dissipation theorem. J. Chem. Phys. , ().

. Lee, K., Murray, E. D., Kong, L., Lundqvist, B. I. & Langreth, D. C. Higher-accuracy van der Waals density functional. Phys. Rev. B , ().

. Vydrov, O. A. & Van Voorhis, T. Improving the accuracy of the nonlocal vander Waals density functional with minimal empiricism. J. Chem. Phys. , ().

. Vydrov, O. A. & Van Voorhis, T. Nonlocal van der Waals density functional

made simple. Phys. Rev. Lett.

, ().. Langreth, D. C. & Lundqvist, B. I. Comment on “Nonlocal van der Waalsdensity functional made simple”. Phys. Rev. Lett. , ().

. Vydrov, O. A. & Van Voorhis, T. Vydrov and Van Voorhis reply. Phys. Rev.

Lett. , ().

. Vydrov, O. A. & Van Voorhis, T. Nonlocal van der Waals density functional:e simpler the better. J. Chem. Phys. , ().

. Murray, E. D., Lee, K. & Langreth, D. C. Investigation of exchange energy den-sity functional accuracy for interacting molecules. J. Chem.eory Comput.

, – ().

. Pernal, K., Podeszwa, R., Patkowski, K. & Szalewicz, K. Dispersionless density functional theory. Phys. Rev. Lett. , ().

. Cooper, V. R. Van der Waals density functional: An appropriate exchangefunctional. Phys. Rev. B , ().

. Klimeš, J., Bowler, D. R. & Michaelides, A. Chemical accuracy for the van derWaals density functional. J. Phys.: Condens. Mattter , ().

. Klimeš, J., Bowler, D. R. & Michaelides, A. Van der Waals density functionalsapplied to solids. Phys. Rev. B , ().

. Austin, A. et al. A density functional with spherical atom dispersion terms.

 J. Chem.eory Comput. , – ().. Wellendor, J. et al. Density functionals for surface science: Exchange-

correlation model development with Bayesian error estimation. Phys. Rev. B

, ().

. Román-Peréz, G. & Soler, J. M. Ecient implementation of a van der Waals

Page 75: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 75/102

References

density functional: Application to double-wall carbon nanotubes. Phys. Rev.

Lett. , ().

. onhauser, T. et al. Van der Waals density functional: Self-consistent po-

tential and the nature of the van der Waals bond. Phys. Rev. B , ().

. Vydrov, O. A., Wu, Q. & Van Voorhis, T. Self-consistent implementation of anonlocal van der Waals density functional with a gaussian basis set. J. Chem.

Phys. , ().

. Jurečka, P., Šponer, J., Černý, J. & Hobza, P. Benchmark database of accurate(MP and CCSD(T) complete basis set limit) interaction energies of smallmodel complexes, DNA base pairs, and amino acid pairs. Phys. Chem. Chem.

Phys. , – ().

. Rocha-Rinza, T., De Vico, L., Veryazov, V. & Roos, B. O. A theoretical study of singlet low-energy excited states of the benzene dimer. Chem. Phys. Lett.

, – ().

. Werner, H.-J. & Knowles, P. J. MOLPRO, version . (University CollegeCardi Consultants Limited, UK, ). Available at http://www.molpro.net/.

. Riley, K. E., Pitoňák, M., Jurečka, P. & Hobza, P. Stabilization and structurecalculations for noncovalent interactionsin extended molecular systems basedon wave function and density functional theories. Chem. Rev. , –().

. Carter, D. J. & Rohl, A. L. Noncovalent interactions in SIESTA using the

 vdW-DF functional: S benchmark and macrocyclic structures. J. Chem.

eory Comput. , – ().

. Schlapbach, L. & Züttel, A. Hydrogen-storage materials for mobile applica-tions. Nature , – ().

. Morris, R. E. & Wheatley, P. S. Gas storage in nanoporous materials. Angew.

Chem. Int. Edit. , – ().

. Kruk, M. & Jaroniec, M. Gas adsorption characterization of ordered organic-inorganic nanocomposite materials. Chem. Mater. , – ().

. Wu, X., Vargas, M. C., Nayak, S., Lotrich, V. & Scoles, G. Towards extending

the applicability of density functional theory to weakly bound systems. J.Chem. Phys. , – ().

. Klimeš, J. & Michaelides, A. Perspective: Advances and challenges in treating van der Waals dispersion forces in density functional theory. J. Chem. Phys.

, ().

Page 76: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 76/102

References

. Chen, L., Grajciar, L., Nachtigall, P. & Düren, T. Accurate prediction of methane adsorption in a metal-organic framework with unsaturated metalsites by direct implementation of an ab-initio derived potential energy surface

in GCMC simulation. J. Phys. Chem. C , – ().. Grimme, S., Antony, J., Ehrlich, S. & Krieg, H. A consistent and accurate ab

initio parametrization of density functional dispersion correction (DFT-D)for the elements H-Pu. J. Chem. Phys. , ().

. Goerigk, L. & Grimme, S. Ecient and accurate double-hybrid-meta-GGA

density functionals: Evaluation with the extended GMTKN database forgeneral main group thermochemistry, kinetics, and noncovalent interactions.

 J. Chem.eory Comput. , – ().

. Hujo, W. & Grimme, S. Performance of the van der Waals density functional

VV and (hybrid)GGA variants for thermochemistry and noncovalent inter-actions. J. Chem.eory Comput. , – ().

. Vydrov, O. A. & Van Voorhis, T. Benchmark assessment of the accuracy of several van der Waals density functionals. J. Chem. eory Comput. ,– ().

. Bludský, O., Rubeš, M., Soldán, P. & Nachtigall, P. Investigation of the benzene-dimer potential energy surface: DFT/CCSD(T) correction scheme. J. Chem.

Phys. , ().

. Frisch, M. J. et al. Gaussian , Revision A. (Gaussian, Inc., Wallingford,CT, ). Available at http://www.gaussian.com/.

. Hafner, J., Kresse, G., Vogtenhuber, D. & Marsman, M. VASP, version ..(University of Vienna, Austria, ). Available at http://www.vasp.at/.

. Chen, Y.-W., Cao, C. & Cheng, H.-P. Finding stable α-quartz () surfacestructures via simulations. Appl. Phys. Lett. , ().

. Chlubná, P. et al. D to D routes to ultrathin and expanded zeolitic materials.Chem. Mater. , – ().

. Becke, A. D. A multicenter numerical integration scheme for polyatomicmolecules. J. Chem. Phys. , – ().

Page 77: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 77/102

Appendix A

Evaluation of vdW-DF in Matlab

To be able to tweak vdW-DF and use it in unusual ways, I have implemented itin M, a high-level programming language that is interpreted on-the-y 

rather than compiled into a binary code. It is intended for numerical computationand contains a large number of mathematical functions available as ready-to-uselibraries. All source les needed to run my implementation are listed below.

Implementing the evaluation of any energy density functional requires almostthe complete DFT machinery, except for the self-consistent cycle. is includesconstruction of a quadrature grid [], evaluation of the basis functions, imple-mentation of mathematical formulas dening the functionals and performing thequadrature. e information about the density is obtained from the KS orbitals,which are read from the Molden format outputted by Molpro [].

Listing A. | setparam.m% loads parameters

function param = setparam(le)param = defaults();if nargin >

param = addparams(param,le);end

end

function param = defaults()param.d = ;param.method = 'hf ';

param.maxiter = ; % SCF iterationsparam.diismax = ; % number of DIIS matrixesparam.debug = ; % no debug infoparam.nonlocal = '';param.scfmax = e;param.scfrms = e;param.scfdelta = e;

Page 78: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 78/102

 Appendix A Evaluation of vdW-DF in M  

param.grid = 'ne';param.denst = '';param.charge = ;param.mult = ;

param.basistype ='default

';param.nlcignore = e;

param.nlccontrib = false;param.zab = nan;

end

function param = addparams(param,le)d = fopen(le,'r');while ~feof (d)

l = fgets(d);if isempty(l) || l()=='%' % empty or comment line

continueendtok = regexp(l,'(\S+)\s*=(.*)','tokens');if isempty(tok)

continueelse

var = tok{}{}; % paramterendtok{}{} = strtrim(tok{}{});if isempty(strnum(tok{}{}))

val = tok{}{};else

val = strnum(tok{}{});endparam.(var) = val;

end

fclose(d);end

Listing A. | dispcorr.m

function E = dispcorr(paramarg)global paramparam = paramarg;param.maxder = ;param.basistype = 'molpro';if isnan(param.zab)

switch param.nonlocalcase 'vdw', zabs = .; % vdwdf case 'vdw', zabs = .; % vdwdf

endelse zabs = param.zab;end[C, occ, bas, geom] = loadmolden(param.molden);bas = normalize(bas);frag = :param.frags();frag = (param.frags()+):sum(param.frags);

Page 79: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 79/102

P = C*diag(occ)*C'; % density matrixgrid = buildgrid(geom, bas);E = [];nlc = strfunc(param.nonlocal);

for i = :length(zabs)param.zab = zabs(i); j = ;for a = :length(frag)

for b = :length(frag)E(j, i) = * evalnlc(P, nlc, grid(frag(a)), grid(frag(b))); j = j + ;

endend

endif ~param.nlccontrib

E = sum(E,);end

end

Listing A. | loadmolden.m

function [C, occ, bas, geom] = loadmolden(le)spherical = false(, );f = fopen(le,'r');while ~feof (f)

s = fgets(f);if isempty(regexp(s, '\S+', 'once'))

continueendsection = regexp(s, '\[([\w\s]+)\](.*)?', 'tokens');if isempty(section)

error('Invalid Molden format

')end

[section, info] = deal(lower(section{}{}), section{}{});info = regexp(info, '(\w+)', 'tokens');if isempty(info)

info = [];else

info = lower(info{}{});endswitch section

case 'molden format'

case 'n_atoms'

fgets(f);case 'molpro variables'

var = molprovariables(f);case 'atoms'

if strnd(info, 'ang')units = 'angs';

elseif strnd(info, 'au')units = 'au';

else

Page 80: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 80/102

 Appendix A Evaluation of vdW-DF in M  

units = 'angs';warning('Units in Molden le not specied, assuming angstroms');

endgeom = readgeom(f, units);

case'd

'

spherical() = true;case 'f '

spherical() = true;case 'g'

spherical() = true;case 'charge'

for i = :length(geom.atoms)fgets(f);

endcase 'gto'

bas = readbasis(f, geom);case 'mo'

nbas = ;for i = :length(bas)

l = bas(i).l;if l > && spherical(l)

type = 's';else

type = 'c';endnbas = nbas + nharm(l, type);

end[C, occ, missed] = readorbitals(f, nbas);

otherwisewarning('Unknown Molden section')

end

endfclose(f);if ~isempty(missed)

warning(['Orbitals ' sprintf ('%g ', missed) 'were set to zero']);endif any(spherical)

i = ; j = ;for k = :length(bas)

l = bas(k).l;if l > && spherical(l)

B = carsphr(l, strfunc('genns'), 'real')';else

B = eye(nharm(l, 'c'));endA(i:i+size(B, ), j:j+size(B, )) = B;i = i+size(B, ); j = j+size(B, );

endC = A * C;

end

Page 81: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 81/102

end

function n = nharm(l, type)switch lower(type())

case'c

'

n = (l+)*(l+)/;case 's'

n = *l + ;end

end

function var = molprovariables(f)while ~feof (f)

s = fgets(f);switch s()

case '!'

tok = regexp(s, '!(\w+)=\s*(\S*)', 'tokens');val = sscanf (tok{}{}, '%f ', );if isempty(val)

switch tok{}{}case 'TRUE'

val = true;case 'FALSE'

val = false;otherwise

val = [];end

endvar.(tok{}{}) = val;

case '['

fseek (f, length(s), );

break endend

end

function geom = readgeom(f, units)if strcmp(units, 'angs')

bohr = .;else

bohr = ;endgeom.atoms = [];geom.xyz = [];geom.frags = [];while true

atom = fscanf (f, '%s', );if atom() == '['

fseek (f, length(atom), );break 

endelem = regexp(atom, '([azAZ]+)', 'tokens');

Page 82: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 82/102

 Appendix A Evaluation of vdW-DF in M  

geom.atoms(end+,) = element(elem{}{});fscanf (f, '%d', );geom.xyz(end+, :) = bohr*fscanf (f, '%f ', [ ]);if geom.xyz(end, ) <

frag = ;elsefrag = ;

endgeom.frags(end+,) = frag;

endend

function bas = readbasis(f,geom)alphabet = 'spdfghi';for i = :length(alphabet)

angular.(alphabet(i)) = i;endIbf = ;bas = [];for i = :length(geom.atoms)

atom = fscanf (f, '%d', ); fgets(f);while true

s = fgets(f);tok = regexp(s,'\s*([spdfghi])\s+(\d+)','tokens');if isempty(tok)

break endl = angular.(tok{}{});exp = [];contr = [];nprim = sscanf (tok{}{}, '%d');

for j = :nprims = fgets(f);s = regexprep(s, 'D', 'e');d = sscanf (s, '%f ', );if d() ==

continueendexp(end+, ) = d();contr(end+, ) = d();

endR = geom.xyz(atom, :)';Nr = radialnorm(exp, l); % radial part of normsNa = angularnorm(l); % angluar part of normsNbf = length(Na); % number of cartesian primitivesbas = [bas; struct(...

'R', R, 'l', l, 'exp', exp, 'contr', contr,...'Nr', Nr, 'Na', Na, 'Nbf ', Nbf, 'Ibf ', Ibf)];

Ibf = Ibf + Nbf;end

endend

Page 83: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 83/102

function [C, occ, missed] = readorbitals(f, n)missed = [];C = zeros(n);

occ = zeros(n, );i = ;while true

if i == endfor j = :

s = fgets(f);endif s ==

break % end of leendtok = regexp(s, '=\s+(\S+)', 'tokens');occ(i) = sscanf (tok{}{}, '%f ');s = fscanf (f, '%f ', [ n])';fgets(f);if size(s, ) < n

missed(end+) = i;for j = :(n size(s, ))

fgets(f);ends = zeros(n, );

endC(:, i) = s(:, );i = i+;

endC(:, i:end) = [];occ(i:end) = [];

end

function y = radialnorm(zeta,l)y = (*zeta/pi).^(/).*(*zeta).^(l/);

end

function y = angularnorm(l)ns = genns(l);N = lton(l);y = zeros(N,);for i = :N

y(i) = /sqrt(dbf(*ns(i,))*dbf(*ns(i,))*dbf(*ns(i,)));end

end

% double factorial n!!function y = dbf(n)

y = prod(::n);if y ==

y = ;end

Page 84: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 84/102

 Appendix A Evaluation of vdW-DF in M  

end

Listing A. | normalize.m

% calculates electron integrals (overlap S, core H) and% normalizes contractions in basis set

function bas = normalize(bas)genindexing();Nsh = length(bas); % number of shellsIbf = [bas.Ibf bas(end).Ibf+bas(end).Nbf]; % shell locationS = zeros(Ibf(end));for i = :Nsh % loop over diagonal

ri = Ibf(i):Ibf(i+); % shell ranges = calcshell(bas([i i])); % calculate the submatrixS(ri,ri) = s; % update the big matrix

endN = ./sqrt(diag(S)); % inverse normsfor i = :Nsh

bas(i).contr = N(Ibf(i))*bas(i).contr; % normalize contractionsend

end

% calculates electron integrals over contracted shellsfunction S = calcshell(sh)

ls = [sh.l]; % angular momentaif ls()<ls(), pi = [ ]; else

pi = [ ]; endsh = sh(pi);ls = ls(pi);S = zeros(sh.Nbf);

NprA = length(sh().exp);NprB = length(sh().exp);factor = (sh().contr*sh().contr').*(sh().Nr*sh().Nr');code = [ ]*ls'; % e.g., for dsfor i = :NprA % loop over primitives

for j = :NprBsprim = calcprim(...

ls,code,sh().exp(i),sh().exp(j),sh.R);S = S + factor(i,j)*sprim;

endendanorms = sh().Na*sh().Na';S = anorms.*S;S = ipermute(S,pi);

end

% calculates electron integrals over primitive gaussiansfunction int = calcprim(l,code,za,zb,A,B)

zeta = za+zb;xi = za*zb/zeta;P = (za*A+zb*B)/zeta;

Page 85: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 85/102

ss = calcss(A,B,zeta,xi);switch code

case int = ss;

otherwiseint = generalint(l,A,B,P,zeta,ss);end

end

function ss = calcss(A,B,zeta,xi)AB = sum((AB).^);ss = (pi/zeta)^(/)*exp(xi*AB);

end

% calculates el integrals for general l

function ints = generalint(l,A,B,P,zeta,ss)dPR = (P(:,ones(,))[A B])';S = preparetrees(l,ss);for b = :l()

S = step(S,dPR,zeta,,b,);endfor a = :l()

for b = :l()+S = step(S,dPR,zeta,a,b,);

endendints = extracttargets(S);

end

function ints = extracttargets(S)

ints = S{end};end

function S = preparetrees(l,ss)S = cell(l()+,l()+);S{,} = ss;

end

function S = step(S,dPR,zeta,a,b,pos)global anc des niswitch pos

case at = a+;bt = b;

case at = a;bt = b+;

endA = lton(at);B = lton(bt);% prepare integral matrices

Page 86: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 86/102

 Appendix A Evaluation of vdW-DF in M  

S{at,bt} = zeros(A,B);% loop over the integral matrixI = ;for k = :lton(a)

for l = :lton(b)ind = [k l];switch ind(pos)

case i = :;

case {,,,,,}i = :;

otherwisei = ;

endfor q = :length(i)

S = increase(a,b,k,l,pos,i(q),S,dPR,zeta,anc,des,ni);I = I+;

endend

endend

function S = increase(a,b,k,l,pos,i,S,dPR,zeta,anc,des,ni)anck = anc(a,k,i);ancl = anc(b,l,i);desk = des(a,k,i);desl = des(b,l,i);nia = ni(a,k,i);nib = ni(b,l,i);invz = /(*zeta);% (a,b) terms

st = dPR(pos,i)*S{a,b}(k,l);% (a,b) terms

if anck > st = st + invz*nia*S{a,b}(anck,l);

end% (a,b) termsif ancl >

st = st + invz*nib*S{a,b}(k,ancl);end% (a+,b) term% update the treeswitch pos

case S{a+,b}(desk,l) = st;

case S{a,b+}(k,desl) = st;

endend

Listing A. | buildgrid.m

Page 87: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 87/102

% builds grid for all atoms and evalutes basis set on that grid

function grid = buildgrid(geom,bas)

N = length(geom.atoms);grid = [];for n = :N

xyz = geom.xyz(n,:);atom = geom.atoms(n);grid = buildgrid(xyz,atom);grid.w = grid.w.*evalwn(n,grid,geom);% w_ngrid = evalbasis(grid,bas); % evaluate basis functionsgrid = [grid; grid];

endend

Listing A. | buildgrid.m

% builds grid for one atom

function grid = buildgrid(R,Z)global paramif Z <= , period = ;elseif Z <= , period = ;elseif Z <= , period = ;elseif Z <= , period = ; else

error('Don''t have grids for Z>');endrad = radius(Z,'grid');switch period

case

part = rad*[ . . . Inf ];case

part = rad*[ . . . . Inf ];otherwise

part = rad*[ . . . . Inf ];endswitch param.grid

case 'nlc'

nrad = ;nang = [ ];

case 'sg'

nrad = ;nang = [ ];

case 'ne'

nrad = ;nang = [ ];

case 'ultrane'

nrad = ;nang = [ ];

case 'plot'

nrad = ;

Page 88: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 88/102

 Appendix A Evaluation of vdW-DF in M  

nang = *ones(,);case 'eml'

nrad = ;nang = *ones(,);

otherwiseerror('unknown grid');endi = :nrad;r = rad*i.^./(nrad+i).^;wr = *rad^*(nrad+)*i.^./(nrad+i).^;[grid.x,grid.y,grid.z,grid.w] = deal([]);for i = :

leb = getLebedevSphere(getdeg(nang(i)));ind = and(r>part(i),r<=part(i+));rpart = r(ind);wrpart = wr(ind);grid.x = [grid.x; reshape(rpart'*leb.x',[],)+R()];grid.y = [grid.y; reshape(rpart'*leb.y',[],)+R()];grid.z = [grid.z; reshape(rpart'*leb.z',[],)+R()];grid.w = [grid.w; reshape(wrpart'*leb.w',[],)];

endend

% gives nearest greater available Lebedev degreefunction n = getdeg(n)

lebdeg = [ ... ... ];

n = lebdeg(nd(lebdeg>=n,));end

Listing A. | evalwn.m

% evaluates atomic cell weights

function wn = evalwn(n,grid,geom)N = length(geom.atoms);p = @(x)((*xx.^)/);sx = @(pppx)(.*(pppx));dist = @(x,y,z,r)(sqrt((xr()).^+(yr()).^+(zr()).^));P = cell(,N);r = cell(,N);for i = :N

r{i} = dist(grid.x,grid.y,grid.z,geom.xyz(i,:));ends = cell(N);for i = :N

P{i} = ones(size(grid.x));for j = :i

Rij = sqrt(sum((geom.xyz(j,:)geom.xyz(i,:)).^));muij = (r{i}r{j})/Rij;chi = sqrt(radius(geom.atoms(i), 'atom')...

Page 89: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 89/102

/radius(geom.atoms(j),'atom'));uij = (chi)/(chi+);aij = uij/(uij^);aij(aij>/) = /;

aij(aij</) = /;nuij = muij+aij*(muij.^);pppx = p(p(p(nuij)));s{i,j} = sx(pppx);s{j,i} = sx(pppx);

endendfor i = :N

P{i} = ones(size(grid.x));for j = [:i i+:N]

P{i} = P{i}.*s{i,j};end

endsumPm = zeros(size(grid.x));for m = :N

sumPm = sumPm + P{m};endwn = P{n}./sumPm;

end

Listing A. | evalbasis.m

% evaluates basis on a grid

function grid = evalbasis(grid,bas)global paramNsh = length(bas); % number of shells

Ibf = [bas.Ibf bas(end).Ibf+bas(end).Nbf]; % shell locationN = Ibf(end);ngrid = length(grid.w);grid.f = zeros(ngrid,N);if param.maxder >

[grid.fx,grid.fy,grid.fz] = deal(grid.f);endif param.maxder >

[grid.fxx,grid.fyy,grid.fzz,grid.fxy,grid.fxz,grid.fyz] = ...deal(grid.f);

endfor i = :Nsh % loop over all shells

b = bas(i);x = grid.xb.R();y = grid.yb.R();z = grid.zb.R();x(x==) = e;y(y==) = e;z(z==) = e;R = x.^+y.^+z.^;[sum,sum,sum] = deal(zeros(ngrid,));

Page 90: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 90/102

 Appendix A Evaluation of vdW-DF in M  

for j = :length(b.exp) % loop over primitivest = b.contr(j)*b.Nr(j)*exp(b.exp(j)*R);sum = sum+t;sum = sum+b.exp(j)*t;

sum = sum+b.exp(j)^*t;end

switch param.basistypecase 'default', fgenns = 'genns';case 'molpro', fgenns = 'genns';

endfgenns = strfunc(fgenns);ns = fgenns(b.l);for j = :size(ns,) % loop over angular momenta

k = Ibf(i)+j;n = ns(j,:);ang = b.Na(j).*x.^n().*y.^n().*z.^n();grid.f(:,k) = ang.*sum;if param.maxder == , continue, endgrid.fx(:,k) = dfdx(x,n(),sum,sum,ang);grid.fy(:,k) = dfdx(y,n(),sum,sum,ang);grid.fz(:,k) = dfdx(z,n(),sum,sum,ang);if param.maxder == , continue, endgrid.fxx(:,k) = dfdx(x,n(),sum,sum,sum,ang);grid.fyy(:,k) = dfdx(y,n(),sum,sum,sum,ang);grid.fzz(:,k) = dfdx(z,n(),sum,sum,sum,ang);grid.fxy(:,k) = dfdxy(x,y,n(),n(),sum,sum,sum,ang);grid.fxz(:,k) = dfdxy(x,z,n(),n(),sum,sum,sum,ang);grid.fyz(:,k) = dfdxy(y,z,n(),n(),sum,sum,sum,ang);

endend

end

function y = dfdx(x,m,sum,sum,ang)rad = *x.*sum;if m > , rad = rad+m./x.*sum; endy = ang.*rad;

end

function y = dfdx(x,m,sum,sum,sum,ang)rad = *(*m+)*sum+*x.^.*sum;if m > , rad = rad+m*(m)./x.^.*sum; endy = ang.*rad;

end

function y = dfdxy(x,y,m,n,sum,sum,sum,ang)rad = *x.*y.*sum;if m > , rad = rad*m*y./x.*sum; endif n > , rad = rad*n*x./y.*sum; endif m*n > , rad = rad+m*n./(x.*y).*sum; endy = ang.*rad;

end

Page 91: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 91/102

Listing A. | evalnlc.m

% calculates nonlocal energy term

function Enlc = evalnlc(P,phi,grid,grid)

global paramif nargin <

grid = grid;endthre = param.nlcignore;n = evaldensity(grid,P);n = evaldensity(grid,P);nw = n.f.*grid.w;nw = n.f.*grid.w;pass = nw > thre;pass = nw > thre;[n,grid] = reducegrid(n,grid,pass);[n,grid] = reducegrid(n,grid,pass);

R = distance(grid,grid);[kern,shift] = phi(n,n,R);Enlc = nw(pass)'*(kern*nw(pass)/+shift);end

function R = distance(g,g)n = length(g.x);n = length(g.x);ind = :n;ind = ind(ones(,n),:)';ind = :n;ind = ind(ones(,n),:);R = sqrt((g.x(ind)g.x(ind)).^ ...

+(g.y(ind)g.y(ind)).^ ...

+(g.z(ind)g.z(ind)).^);% [a,b] = nd(R==);% for i = :length(a)% R(a(i),b(i)) = e;%(g.w(a(i))*g.w(b(i)))^(/);% endend

function [n,grid] = reducegrid(n,grid,pass)global paramn.f = n.f(pass);n.g = n.g(pass);if param.maxder >

n.lap = n.lap(pass);

n.gHg = n.gHg(pass);endgrid.x = grid.x(pass);grid.y = grid.y(pass);grid.z = grid.z(pass);grid.w = grid.w(pass);grid.f = grid.f(pass,:);

Page 92: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 92/102

 Appendix A Evaluation of vdW-DF in M  

grid.fx = grid.fx(pass,:);grid.fy = grid.fy(pass,:);grid.fz = grid.fz(pass,:);

end

Listing A. | preparekernel.m

function kernel = preparekernel(dD,dd)D = *(./((:dD:)));d = :dd:;nD = length(D);nd = length(d);kern = zeros(nD,nd);for i = :nD

for j = :ndkern(i,j) = evalkernel(D(i),d(j));

endendkernel.D = D;kernel.d = d;kernel.kern = kern;save vdw.mat kernel v

end

function phi = evalkernel(D,d)del = .;M = ;b = del/:del:M;a = b';d = D*(+d);d = D*(d);

int = /pi^*a.^

*b.^.

*W(a,b)....*T(nu(a,d),nu(b,d),nu(a,d),nu(b,d));

int(isnan(int)) = ;phi = sum(sum(int))*del^;

end

function w = W(a,b)a = a.^;b = b.^;sa = sin(a);sb = sin(b);ca = cos(a);cb = cos(b);ab = a(:,ones(size(b)))+b(ones(size(a)),:);w = *(((a).*sa)*(b.*cb)+(a.*ca)*((b).*sb)...

+(ab).*(sa*sb)*a.*ca*(b.*cb))./(a*b).^;end

function t = T(w,x,y,z)a = ones(size(w));b = ones(size(x));

Page 93: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 93/102

t = /*(./(w(:,b)+x(a,:))+./(y(:,b)+z(a,:)))....*(./((w+y)*(x+z))+./((w(:,b)+z(a,:)).*(y(:,b)+x(a,:))));

end

function z = nu(y,d)z = y.^./(*h(y/d));end

function z = h(y)z = exp(*pi/*y.^);

end

Listing A. | evaldensity.m

% evaluates density on the grid

function rho = evaldensity(grid,P)global paramif isstruct(P)

[rho.a,d.a] = evalsingledensity(grid,P.a);[rho.b,d.b] = evalsingledensity(grid,P.b);if param.maxder == , return, endrho.gab = d.a.x.*d.b.x+d.a.y.*d.b.y+d.a.z.*d.b.z;rho.gaa = rho.a.g;rho.gbb = rho.b.g;d = maketot(d);rho.g = d.x.^+d.y.^+d.z.^;if param.maxder == , return, endrho.lap = d.xx+d.yy+d.zz;rho.gHg = d.xx.*d.x.^+d.yy.*d.y.^+d.zz.*d.z.^ ...

+*(d.xy.*d.x.*d.y+d.xz.*d.x.*d.z+d.yz.*d.y.*d.z);

else rho = evalsingledensity(grid,P);end

end

function tot = maketot(d)a = d.a;b = d.b;f = eldnames(d.a);for i = :length(f)

tot.(f{i}) = d.a.(f{i})+d.b.(f{i});end

end

function [rho,d] = evalsingledensity(grid,P)global paramphiP = grid.f *P;rho.f = sum(phiP.*grid.f,);if param.maxder == , d = []; return, endd.x = *sum(phiP.*grid.fx,);d.y = *sum(phiP.*grid.fy,);

Page 94: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 94/102

 Appendix A Evaluation of vdW-DF in M  

d.z = *sum(phiP.*grid.fz,);rho.g = d.x.^+d.y.^+d.z.^;if param.maxder == , return, endd.xx = *sum((grid.fx*P).*grid.fx,)+*sum(phiP.*grid.fxx,);

d.yy = *sum((grid.fy

*P).

*grid.fy,)+

*sum(phiP.

*grid.fyy,);d.zz = *sum((grid.fz*P).*grid.fz,)+*sum(phiP.*grid.fzz,);

rho.lap = d.xx+d.yy+d.zz;d.xy = *sum((grid.fx*P).*grid.fy,)+*sum(phiP.*grid.fxy,);d.xz = *sum((grid.fx*P).*grid.fz,)+*sum(phiP.*grid.fxz,);d.yz = *sum((grid.fy*P).*grid.fz,)+*sum(phiP.*grid.fyz,);rho.gHg = d.xx.*d.x.^+d.yy.*d.y.^+d.zz.*d.z.^ ...

+*(d.xy.*d.x.*d.y+d.xz.*d.x.*d.z+d.yz.*d.y.*d.z);end

Listing A. | vdw.m

% vdW kernel

function [kern,shift] = vdw(n,n,R)global kernelt = regexp(mlename('fullpath'),'(.*)[\\/][^\\/]*','tokens');load([t{}{} lesep 'vdw.mat'],'kernel');q = calcq(n);q = calcq(n);qD = repmat(q,,length(q));qD = repmat(q',length(q),);q = qD+qD;D = R.*q/; D(isnan(D)) = ;D(D<.) = .;d = abs(qDqD)./q;d(q==) = ;

d(isnan(d)) = ;clear qD qD qkern = corekern(D,d);shift = ;

end

function q = calcq(n)global paramkF = (*pi^*n.f).^(/);gamma = param.zab/;s = n.g./(*kF.*n.f).^;q = *pi/*(pwc(n)+dirac(n).*(+gamma*s));

end

function kern = corekern(D,d)global kernelD(isinf (D)) = e;kernel.D(isinf (kernel.D)) = e;id = d/.+;iD = (./(D/+))/.+;kern = interp(kernel.kern,id,iD);

Page 95: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 95/102

end

function ind = subind(siz,s,s)ind = (s)*siz()+s;

end

Listing A. | dirac.m

% Dirac exchange functional

function [eX,vX] = dirac(rho)vX = (/pi)^(/)*rho.f.^(/);eX = /*vX;

end

Listing A. | pwc.m

% PerdewWang ' correlation functional

function [eC,vC] = pwc(rho)if iseld(rho,'a')

n = rho.a.f+rho.b.f;rs = (/(*pi)./n).^(/);zeta = (rho.a.frho.b.f)./n;zeta(isnan(zeta)) = ;[eC,vC] = eCunif(rs,zeta);

elsers = (/(*pi)./rho.f).^(/);[eC,vC] = eCunif(rs);

endend

function [eC,vC] = eCunif(rs,zeta)[ecrs,decrs] = G(rs,...

.,.,.,.,.,.,);[ecrs,decrs] = G(rs,...

.,.,.,.,.,.,);[acrs,dacrs] = G(rs,...

.,.,.,.,.,.,);acrs = acrs;dacrs = dacrs;fpp = .;zetap = (+zeta).^(/);zetam = (zeta).^(/);fzeta = (zetap.*(+zeta)+zetam.*(zeta))/(^(/));fpzeta = (/*(zetapzetam)/(^(/)));zeta = zeta.^;eC = ecrs+acrs.*fzeta/fpp.*(zeta)+(ecrsecrs).*fzeta.*zeta;drsec = decrs.*(fzeta.*zeta)+decrs.*fzeta.*zeta ...

+dacrs.*fzeta/fpp.*(zeta);dzetaec = *zeta.^.*fzeta.*(ecrsecrsacrs/fpp)...

+fpzeta.*zeta.*(ecrsecrs+(zeta).*acrs/fpp);

Page 96: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 96/102

 Appendix A Evaluation of vdW-DF in M  

tmp = eCrs/.*drseczeta.*dzetaec;tmp(isnan(tmp)) = ;vC.a = tmp+dzetaec;vC.b = tmpdzetaec;

end

function [eC,vC] = eCunif(rs)[eC,drsec] = G(rs,...

.,.,.,.,.,.,);vC = eCrs/.*drsec;vC(isnan(vC)) = ;

end

function [y,dy] = G(rs,A,a,b,b,b,b,p)sqrs = sqrt(rs);Q = *A*(+a*rs);Q = *A*(b*sqrs+b*rs+b*sqrs.^+b*rs.^(p+));Qp = A*(b./sqrs+*b+*b*sqrs+*(p+)*b*rs.^p);logpoQ = logp(./Q);y = Q.*logpoQ;y(isnan(y)) = ;dy = *A*a*logpoQQ.*Qp./(Q.^+Q);dy(isnan(dy)) = ;

end

Listing A. | pbec.m

% PBE correlation functional

function [eC,vC] = pbec(rho)if ~iseld(rho,'a')

n = rho.f;phi = ;else

n = rho.a.f+rho.b.f;zeta = (rho.a.frho.b.f)./n;phi = ((+zeta).^(/)+(zeta).^(/))/;

endkF = (*pi^*n).^(/);ks = sqrt(*kF/pi);t = rho.g./(*phi.*ks.*n).^;

%gamma = (log())/pi^; % this is PBE%beta = .;gamma = .; % this is Molprobeta = .*gamma;

[eCunif,vCunif] = pwc(rho);

gf = gamma*phi.^;bg = beta/gamma;S = exp(eCunif./gf);

Page 97: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 97/102

A = bg./(S);At = A.*t;Atquad = +At+At.^;Q = (+At)./Atquad;

bgtQ = bg*t.

*Q;H = gf.*log(+bgtQ);

eC = eCunif+H;eC(isnan(eC)|isinf (eC)) = ;

g = rho.g;R = At.*(+At)./Atquad.^;RAtQ = R.*At./Q;xxbgtQ = bgtQ./(+bgtQ);V = (At.^+*At.^*At)./Atquad.^;W = At.*(At.*VR)./(At.*RQ);dgH = gf.*xxbgtQ./g.*(RAtQ);dgdgH = dgH./g.*(xxbgtQ.*(RAtQ)W);if ~iseld(rho,'a')

SS = S./(S).*(vCunifeCunif)./gf/;dnH = gf.*xxbgtQ./n.*(/+RAtQ.*SS);dndgH = dgH./n.*(xxbgtQ.*(/+RAtQ.*SS)/W.*SS);vC = vCunif+(H*dgH.*g)+n.*(dnH*dndgH.*g...

*dgdgH.*(*rho.gHg)*dgH.*rho.lap);vC(isnan(vC)|isinf (vC)) = ;

elseffz.a = ((zeta).*(+zeta).^(/)(zeta).^(/))./phi/;ffz.b = ((+zeta).*(zeta).^(/)(+zeta).^(/))./phi/;ffz.a(zeta==) = ;ffz.b(zeta==) = ;f.a = /+*ffz.a;f.b = /+*ffz.b;

SS.a = S./(S).*(vCunif.aeCunif.

*(+

*ffz.a))./gff.a;SS.b = S./(S).*(vCunif.beCunif.*(+*ffz.b))./gff.b;

dnaH = *ffz.a./n.*H...gf.*xxbgtQ./n.*(f.a+RAtQ.*SS.a);

dnbH = *ffz.b./n.*H...gf.*xxbgtQ./n.*(f.b+RAtQ.*SS.b);

dnadgH = dgH./n....*(*ffz.a+xxbgtQ.*(f.a+RAtQ.*SS.a)f.aW.*SS.a);

dnbdgH = dgH./n....*(*ffz.b+xxbgtQ.*(f.b+RAtQ.*SS.b)f.bW.*SS.b);

tmp = (H*dgH.*g)+n.*(*dgH.*rho.lap*dgdgH.*(*rho.gHg)...*dnadgH.*(rho.gaa+rho.gab)*dnbdgH.*(rho.gbb+rho.gab));

vC.a = vCunif.a+n.*dnaH+tmp;vC.b = vCunif.b+n.*dnbH+tmp;vC.a(isnan(vC.a)|isinf (vC.a)) = ;vC.b(isnan(vC.b)|isinf (vC.b)) = ;

endend

Listing A. | genindexing.m

Page 98: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 98/102

 Appendix A Evaluation of vdW-DF in M  

% generates indexing arrays for elintegral recursion formulas% [l+,anc(l,k,i)] is (l,k)+_i% [l,des(l,k,i)] is (l,k)_i

% [ni(l,k,),ni(l,k,),ni(l,k,)] is (l,k)function genindexing(n)

global anc des nione = eye();for i = :n

ns{i} = genns(i);endanc = zeros(n,size(ns{end},),);des = zeros(n,size(ns{end},),);ni = zeros(n,size(ns{end},),);anc(,,:) = zeros(,);des(,,:) = :;for i = :n

for j = :size(ns{i},)for k = :s = nd(sum(...

repmat(ns{i}(j,:)one(k,:),size(ns{i},),)==ns{i}...,)==);

if isempty(s)s = ;

endanc(i,j,k) = s;if i < n

s = nd(sum(...repmat(ns{i}(j,:)+one(k,:),size(ns{i+},),)==ns{i+}...,)==);

des(i,j,k) = s;endni(i,j,k) = ns{i}(j,k);

endend

endend

Listing A. | genns.m

% generates list of cartesian polynomials for given l

function ns = genns(l)N = lton(l);

ns = zeros(N,);n = [l ];for j = :N

ns(j,:) = n;if n() >

n(:) = n(:)+[ ];else

Page 99: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 99/102

n = [n() ln()+ ];end

endend

Listing A. | genns.m

function n = genns(l)switch l

case n = zeros(,);

case n = eye();

case n = extract({'xx' 'yy' 'zz' 'xy' 'xz' 'yz'});

case n = extract({'xxx' 'yyy' 'zzz' 'xyy' 'xxy' 'xxz'...

'xzz' 'yzz' 'yyz' 'xyz'});case

n = extract({'xxxx' 'yyyy' 'zzzz' 'xxxy' 'xxxz'...'yyyx' 'yyyz' 'zzzx' 'zzzy' 'xxyy' 'xxzz'...'yyzz' 'xxyz' 'yyxz' 'zzxy'});

otherwiseerror('Molden doesn''t support l > ');

endend

function n = extract(s)n = [];t = 'xyz';for i = :length(s)

m = zeros(,);for j = :m(j) = sum(ismember(s{i},t(j)));

endn = [n; m];

endend

Listing A. | carsphr.m

function coe = carsphr(l, fgenns, type)switch l

case coe = ;

case coe = eye();

otherwisels = fgenns(l);coe = zeros(*l+, size(ls, ));for i = :size(coe, )

m = il;

Page 100: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 100/102

 Appendix A Evaluation of vdW-DF in M  

for j = :size(coe, )coe(i, j) = c(l, m, ls(j, ), ls(j, ), ls(j, ));

endend

if nargin > && strcmp(type,'real

')A = zeros(*l+);

A(, l+) = ;for i = :l

A(*i, l+i) = /sqrt();A(*i, l++i) = /sqrt();A(*i+, l+i) = /sqrt();A(*i+, l++i) = /sqrt();

endcoe = A * coe;coe = real(coe) + imag(coe);

endend

end

function coe = c(l, m, lx, ly, lz) j = (lx+lyabs(m)) / ;if j ~= round(j)

coe = ;return

endif m <

pm = ;else

pm = ;endA = factorial(*lx) * factorial(*ly) * factorial(*lz)...

*factorial(l)

*factorial(labs(m)).../ (factorial(*l) * factorial(lx) * factorial(ly)...

* factorial(lz) * factorial(l+abs(m)));B = ;for i = :(labs(m))/

C = binom(l, i)*binom(i, j) * ()^i...* factorial(*l*i) / factorial(labs(m)*i);

D = ;for k = :j

E = binom(j, k) * binom(abs(m), lx*k)...* ()^(pm*(abs(m)lx+*k)/);

D = D + E;endB = B + C * D;

endcoe = sqrt(A) * /(^l*factorial(l)) * B;

end

function x = binom(n, k)if k < || k > n

x = ;

Page 101: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 101/102

returnelse

x = nchoosek(n, k);end

end

Listing A. | element.m

% converts element symbol on atomic number or vice versa. //

function n = element(s)table = {'H' 'He' 'Li' 'Be' 'B' 'C' 'N' 'O' 'F' 'Ne'...

'Na' 'Mg' 'Al' 'Si' 'P' 'S' 'Cl' 'Ar' 'K '...'Ca' 'Sc' 'Ti' 'V' 'Cr' 'Mn' 'Fe' 'Co' 'Ni'...'Cu' 'Zn' 'Ga' 'Ge' 'As' 'Se' 'Br' 'Kr' 'Rb'...'Sr' 'Y' 'Zr' 'Nb' 'Mo' 'Tc' 'Ru' 'Rh' 'Pd'...'Ag' 'Cd' 'In' 'Sn' 'Sb' 'Te' 'I' 'Xe' 'Cs'...'Ba' 'La' 'Ce' 'Pr' 'Nd' 'Pm' 'Sm' 'Eu' 'Gd'...'Tb' 'Dy' 'Ho' 'Er' 'Tm' 'Yb' 'Lu' 'Hf ' 'Ta' 'W'...'Re' 'Os' 'Ir' 'Pt' 'Au' 'Hg' 'Tl' 'Pb' 'Bi'...'Po' 'At' 'Rn' 'Fr' 'Ra' 'Ac' 'Th' 'Pa' 'U'};

if isnumeric(s)n = table{s};

elsefor n = :length(table)

if strcmpi(s,table{n}), return, endenderror('Unknown element symbol');

endend

Listing A. | lton.m

% gives number of cartesian spherical harmonics

function N = lton(l)N = (l+).*(l+)/;

end

Listing A. | radius.m

% returns various atomic radii

function r = radius(n,type)bohr = .;switch type

case 'atom'

data = bohr*[. . . . . . .... . . .];

data() = bohr*.;data() = bohr*.;data() = bohr*.;

Page 102: Nonlocal correlation in density functional theory

7/30/2019 Nonlocal correlation in density functional theory

http://slidepdf.com/reader/full/nonlocal-correlation-in-density-functional-theory 102/102

 Appendix A Evaluation of vdW-DF in M  

case 'grid'

data = [ . . . . . .... . . .];

data() = .;

data() = .;data() = .;endnmax = length(data);if n <= nmax

r = data(n);if r > , return, end

enderror('Radius "%s" not dened for Z=%i',type,n);

end


Recommended