Author's Personal Copy
Total Page:16
File Type:pdf, Size:1020Kb
Author's personal copy Computer Physics Communications 183 (2012) 2272–2281 Contents lists available at SciVerse ScienceDirect Computer Physics Communications journal homepage: www.elsevier.com/locate/cpc Libxc: A library of exchange and correlation functionals for density functional theory✩ Miguel A.L. Marques a,b,∗, Micael J.T. Oliveira c, Tobias Burnus d a Université de Lyon, F-69000 Lyon, France b LPMCN, CNRS, UMR 5586, Université Lyon 1, F-69622 Villeurbanne, France c Center for Computational Physics, University of Coimbra, Rua Larga, 3004-516 Coimbra, Portugal d Peter Grünberg Institut and Institute for Advanced Simulation, Forschungszentrum Jülich, and Jülich Aachen Research Alliance, 52425 Jülich, Germany a r t i c l e i n f o a b s t r a c t Article history: The central quantity of density functional theory is the so-called exchange–correlation functional. This Received 8 March 2012 quantity encompasses all non-trivial many-body effects of the ground-state and has to be approximated Received in revised form in any practical application of the theory. For the past 50 years, hundreds of such approximations have 7 May 2012 appeared, with many successfully persisting in the electronic structure community and literature. Here, Accepted 8 May 2012 we present a library that contains routines to evaluate many of these functionals (around 180) and their Available online 19 May 2012 derivatives. Keywords: Program summary Density functional theory Program title: LIBXC Density functionals Catalogue identifier: AEMU_v1_0 Local density approximation Generalized gradient approximation Program summary URL: http://cpc.cs.qub.ac.uk/summaries/AEMU_v1_0.html Hybrid functionals Program obtainable from: CPC Program Library, Queen’s University, Belfast, N. Ireland Licensing provisions: GNU Lesser General Public License version 3 No. of lines in distributed program, including test data, etc.: 87455 No. of bytes in distributed program, including test data, etc.: 945365 Distribution format: tar.gz Programming language: C with Fortran bindings. Computer: All. Operating system: All. RAM: N.A. Classification: 7.3, 16.1. Nature of problem: Evaluation of the exchange–correlation energy functional and its derivatives. This is a fundamental part of any atomic, molecular, or solid-state code that uses density-functional theory. Solution method: The values of the energy functional and its derivatives are given in a real grid of mesh points. Running time: Typically much smaller than the remainder of the electronic structure code. The running time has a natural linear scaling with the number of grid points. © 2012 Elsevier B.V. All rights reserved. 1. Introduction century [1–4]. It is currently used to predict the structure and the properties of atoms, molecules, and solids; it is a key ingredient of Density functional theory (DFT) is perhaps one of the most the new field of Materials Design, where one tries to create new successful theories in Physics and in Chemistry of the last half- materials with specific properties; it is making its way in Biology as an important tool in the investigation of proteins, DNA, etc. These are only a few examples of a discipline that even now, almost ✩ 50 years after its birth, is growing at an exponential rate. This paper and its associated computer program are available via the Computer Almost all applications of DFT are performed within the so- Physics Communication homepage on ScienceDirect (http://www.sciencedirect.com/science/journal/00104655). called Kohn–Sham scheme [5], that uses a non-interacting elec- ∗ Corresponding author at: Université de Lyon, F-69000 Lyon, France. tronic system to calculate the density of the interacting system [6]. E-mail address: [email protected] (M.A.L. Marques). The Kohn–Sham scheme leeds to the following equations. (Hartree 0010-4655/$ – see front matter © 2012 Elsevier B.V. All rights reserved. doi:10.1016/j.cpc.2012.05.007 Author's personal copy M.A.L. Marques et al. / Computer Physics Communications 183 (2012) 2272–2281 2273 atomic units are used throughout the paper, i.e. e2 = h¯ = me = 1.) ∇2 − + vext(r) + vHartree[n](r) + vxc[n](r) ψi(r) 2 = εiψi(r), (1) where the first term represents the kinetic energy of the electrons; the second is the external potential usually generated by a set of Coulombic point charges (sometimes described by pseudopoten- tials); the third term is the Hartree potential that describes the clas- sical electrostatic repulsion between the electrons, ′ 3 ′ n(r ) vHartree[n](r) = d r , (2) |r − r′| Z and the exchange–correlation (xc) potential vxc[n] is defined by Fig. 1. Jacob’s ladder of density functional approximations for the xc energy. δExc[n] vxc[n](r) = . (3) δn(r) As one can see, one now adds the gradient of the density, a semi- local quantity that depends on an infinitesimal region around r, as E [n] is the xc energy functional. Note that by [n] we denote that xc a parameter to the energy density. Note that there is a considerable the quantity is a functional of the electronic density, amount of craftsmanship and physical/chemical intuition going occ. GGA into the creation of the function exc (n, ∇n), but also a fair 2 n(r) = |ψi(r)| , (4) quantity of arbitrariness. It is therefore not surprising that many i different forms were proposed over the years. The same is true for X where the sum runs over the occupied states. the functionals on the next rung, the meta-GGAs The central quantity of this scheme is the xc energy Exc[n] that mGGA 3 mGGA 2 describes all non-trivial many-body effects. Clearly, the exact form Exc = d r n(r)exc (n(r), ∇n(r), ∇ n(r), τ(r)). (7) of this quantity is unknown and it must be approximated in any Z practical application of DFT. We emphasize that the precision of This time one adds the Laplacian of the density ∇2n(r) and also any DFT calculation depends solely on the form of this quantity, as (twice) the kinetic energy density this is the only real approximation in DFT (neglecting numerical occ approximations that are normally controllable). 2 The first approximation to the exchange energy, the local τ(r) = |∇ψi(r)| . (8) i density approximation (LDA), was already proposed by Kohn and X Sham in the same paper where they described their Kohn–Sham Note that the meta-GGAs are effectively orbital functionals due to scheme [5]. It states that the value of xc energy density at any point the dependence in τ(r). in space is simply given by the xc energy density of a homogeneous The forth rung is occupied by functionals that include the exact- electron gas (HEG) with electronic density n(r). Mathematically, exchange (EXX) contribution to the energy this is written as ψ (r)ψ∗(r′)ψ (r′)ψ∗(r) EXX 1 3 3 ′ i i j j LDA 3 HEG E = − d r d r . (9) E = d r n(r)e (n(r)), (5) x 2 |r − r′| xc xc Z Z Z These functionals can include the whole EEXX or only a fraction of where eHEG(n) is the xc energy per electron of the HEG. Note x xc it, and EEXX can be evaluated with the bare Coulomb interaction or that this quantity is a function of n. While the exchange x HEG with a screened version of it. Furthermore, one can add a (semi- contribution ex (n) can be easily calculated analytically, the correlation contribution is usually taken from Quantum Monte- )local xc term or one that depends on the orbitals. In any case, the Carlo simulations [7,8]. As defined, the LDA is unique, but, as we fourth rung only includes functionals that depend on the occupied will see in the Appendix, even such precise definition can give rise orbitals only. Notorious examples of functionals on this rung are to many different parameterizations. the hybrid functionals During the past 50 years, hundreds of different forms ap- EHyb = a EEXX + EmGGA[n(r), ∇n(r), ∇2n(r), τ(r)]. (10) peared [9] and they are usually arranged in families, which have xc x x xc names such as generalized-gradient approximations (GGAs), meta- Note that the local part of this functional can be a meta-GGA, a GGA, GGAs, hybrid functionals, etc. In 2001, John Perdew came up with or even an LDA. a beautiful idea on how to illustrate these families and their rela- Finally, on the last rung of Jacob’s ladder one finds functionals tionship [10]. He ordered these families as rungs in a ladder that that depend on the empty (virtual) Kohn–Sham orbitals. Perhaps leads to the heaven of ‘‘chemical accuracy’’, and that he christened the best known example of these functionals is the random-phase the Jacob’s ladder of density functional approximations for the xc approximation (RPA). energy (see Fig. 1). Every rung adds a dependency on another quan- In a practical DFT calculation one needs typically to evaluate tity, thereby increasing the precision of the functional but also in- both Exc and vxc. Furthermore, to obtain response properties higher creasing the numerical complexity and the computational time. derivatives of Exc are required. For example, in first order one can At the bottom of the ladder we find the LDA, a functional that get the electric polarizability, the magnetic susceptibility, phonon depends locally on the density only. The second rung is occupied frequencies, etc., and these usually require the knowledge of the xc by the GGA kernel GGA 3 GGA ′ δExc E = d r n(r)e (n(r), ∇n(r)). (6) fxc(r, r ) = . (11) xc xc δn(r)δn(r′) Z Author's personal copy 2274 M.A.L.