Source-linked AI summary

Libxc: a library of exchange and correlation functionals for density functional theory

Miguel A. L. Marques, Micael J. T. Oliveira, Tobias Burnus

arXiv:1203.1739v2cond-mat.mtrl-sciphysics.comp-ph

TL;DR

DFT requires approximations to its exchange-correlation functional, which contains the theory’s non-trivial many-body effects and determines calculation precision. The paper presents Libxc, a library for evaluating around 180 such functionals and their derivatives, with broad cross-code use and ongoing expansion despite remaining gaps in meta-GGAs and hybrids.

  • Problem

    The exact exchange-correlation functional is unknown, although it contains all non-trivial many-body effects and must be approximated in practical DFT.

  • Method

    Libxc provides routines for evaluating many exchange-correlation functionals, their derivatives, and metadata for use by electronic-structure codes.

  • Results

    Around 180 functionals are included, with derivatives implemented through third order for LDAs and second order for other functionals.

  • Takeaways & Limitations

    Libxc enables functionals to be tested and used across different codes and physical situations, supporting reproducibility and rapid benchmarking.

Abstract

from arXiv · show

The central quantity of density functional theory is the so-called exchange-correlation functional. This quantity encompasses all non-trivial many-body effects of the ground-state and has to be approximated in any practical application of the theory. For the past 50 years, hundreds of such approximations have appeared, with many successfully persisting in the electronic structure community and literature. Here, we present a library that contains routines to evaluate many of these functionals (around 180) and their derivatives.

I. INTRODUCTION

DFT depends on approximating the exchange-correlation energy, which captures non-trivial many-body effects. Libxc organizes and evaluates many functionals and derivatives across approximation levels, while excluding forms too dependent on wave-function representations.

  • I. INTRODUCTION: The exchange-correlation energy is DFT’s only substantive approximation and determines the precision of practical calculations.Numerical approximations are described as normally controllable.
  • I. INTRODUCTION: Hundreds of functionals are arranged on Jacob’s ladder, with added dependencies increasing precision, numerical complexity, and computational cost.The ladder progresses from density-only LDA through gradient-, orbital-, and virtual-orbital-dependent approaches.
  • I. INTRODUCTION: Standard Kohn-Sham calculations require the exchange-correlation energy and first derivatives, while response properties require higher derivatives and the exchange-correlation kernel.Examples include polarizabilities, magnetic susceptibilities, phonon frequencies, hyperpolarizabilities, and Raman tensors.
  • I. INTRODUCTION: Libxc supplies energy densities and relevant partial derivatives for the first three rungs, plus hybrid mixing coefficients, but not highly representation-dependent fourth- and fifth-rung functionals.The required inputs may include n(r), ∇n(r), ∇2n(r), and τ(r).
  • I. INTRODUCTION: Libxc also supports orbital-free DFT through LDA and GGA kinetic-energy functionals and supports spin-polarized calculations.The orbital-free approach approximates the kinetic-energy functional directly in terms of density.

II. SOME HISTORY

Libxc began as an Octopus spin-off and expanded through interoperability efforts into a broadly used library. Its development emphasized comprehensive functional coverage and high-order derivatives for reproducible, cross-code calculations.

  • II. SOME HISTORY: Libxc originated in 2006 as a library extracted from Octopus because exchange-correlation evaluation was independent of the host code’s main structure.The first usable version contained several popular LDA and GGA functionals.
  • II. SOME HISTORY: Interfacing Libxc with codes from the European Theoretical Spectroscopy Facility accelerated its development and dissemination.The library subsequently connected with programs spanning solid-state physics and quantum chemistry.
  • II. SOME HISTORY: The library expanded to around 180 functionals, preserving older methods for reproduction while rapidly adding newly published functionals without judging their value.This policy leaves assessments of usefulness, elegance, or beauty to users.
  • II. SOME HISTORY: Libxc implemented derivatives through third order for LDAs and through second order for other functionals to avoid numerical errors and instabilities from finite differentiation.Higher derivatives are needed for response properties beyond standard Kohn-Sham calculations.
  • II. SOME HISTORY: The library’s interoperability lets a functional developed in one code be tested or applied in different physical settings and computational methods.The paper gives transferring a meta-GGA from solid-state band-gap work to molecular ionization potentials as an example.

A. Calling Libxc

Libxc can be called from C or Fortran by initializing a functional, selecting routines according to its family, evaluating energies, and releasing resources.

  • C interface: The example evaluates five density values and prints each density together with its returned energy before ending the functional.The interface passes rho and, for GGA families, sigma, into an output array ek.
  • C interface: C callers initialize a functional with an identifier and spin setting, then handle failure when the requested functional is unavailable.The example uses xc_func_init and reports an error if initialization returns a nonzero value.
  • C interface: The functional family determines whether Libxc evaluates an LDA or GGA/hybrid-GGA exchange-correlation energy.The C example dispatches to xc_lda_exc for LDA and xc_gga_exc for GGA or hybrid GGA families.
  • Data conventions: Libxc uses sigma rather than the full density gradient, converts derivatives through the chain rule, and returns quantities in atomic units.The convention applies to quantities passed to and returned by the library.

B. The info structure

Libxc associates each functional with metadata describing its identity, family, references, dimensionality, stability, and available derivative routines.

  • Metadata fields: Flags record whether exchange-correlation energies and derivatives are available, along with dimensionality, stability, and development status.The listed flags include HAVE_EXC, HAVE_VXC, HAVE_FXC, HAVE_KXC, HAVE_LXC, 1D, 2D, 3D, STABLE, and DEVELOPMENT.
  • Metadata fields: The xc_func_type metadata identifies a functional by number, kind, name, family, references, and flags.Examples include PBE as a name and XC_FAMILY_GGA as a family.
  • Example entry: A Slater exchange entry illustrates how a functional is classified as exchange within the LDA family and linked to bibliographic references.The example records XC_LDA_X, XC_EXCHANGE, the functional name, family, and citations.
  • User access: The metadata structure also stores references that users can access through the functional object.The example initializes B88 and prints its name and references before cleanup.

IV. CONCLUSIONS AND THE FUTURE

Libxc is a stable library used by hundreds of scientists, with continued development focused on expanding functional coverage and derivative orders.

  • Libxc is described as seven years old, stable, and used by hundreds of scientists worldwide.
  • The project plans to continue adding functionals and derivatives of the highest possible order.
  • Around 180 functionals are included, covering essentially all LDA and GGA functionals proposed in the literature at that time.
  • Important coverage gaps remain in meta-GGAs and hybrid functionals, which the authors intend to address in the near future.

Appendix A: Available functionals

Appendix A catalogs Libxc’s available functionals, organized by exchange, correlation, and exchange-correlation categories and accompanied by identifiers and timing information.

  • Organization: Libxc divides functionals into exchange, correlation, and exchange-correlation categories for users and developers.The paper notes that this division can be arbitrary but is often useful for constructing mixtures and organizing code.
  • Catalog and benchmarks: Table I lists available functionals, their Libxc labels, and the time required for 50,000,000 spin-unpolarized exchange-correlation-potential evaluations on one processor.The listed benchmark uses a single-core Intel Core 2 processor running at 2.83 GHz.
Loading 1203.1739v2…