SlideShare a Scribd company logo
Libxc
a library of exchange and correlation functionals
Miguel A. L. Marques
1LPMCN, Universit´e Claude Bernard Lyon 1 and CNRS, France
2European Theoretical Spectroscopy Facility
March 2009 – ABINIT Workshop
M. A. L. Marques Libxc
Why the need for libxc?
The xc functional is at the heart of DFT
There are many approximations for the xc (probably of the
order of 150–200)
Most computer codes only include a very limited quantity
of functionals, typically around 10–15
Chemist and Physicists do not use the same functionals!
Difficult to reproduce older calculations with older
functionals
Difficult to reproduce calculations performed with other
codes
Difficult to perform calculations with the newest functionals
M. A. L. Marques Libxc
Why the need for libxc?
The xc functional is at the heart of DFT
There are many approximations for the xc (probably of the
order of 150–200)
Most computer codes only include a very limited quantity
of functionals, typically around 10–15
Chemist and Physicists do not use the same functionals!
Difficult to reproduce older calculations with older
functionals
Difficult to reproduce calculations performed with other
codes
Difficult to perform calculations with the newest functionals
M. A. L. Marques Libxc
Why the need for libxc?
The xc functional is at the heart of DFT
There are many approximations for the xc (probably of the
order of 150–200)
Most computer codes only include a very limited quantity
of functionals, typically around 10–15
Chemist and Physicists do not use the same functionals!
Difficult to reproduce older calculations with older
functionals
Difficult to reproduce calculations performed with other
codes
Difficult to perform calculations with the newest functionals
M. A. L. Marques Libxc
Why the need for libxc?
The xc functional is at the heart of DFT
There are many approximations for the xc (probably of the
order of 150–200)
Most computer codes only include a very limited quantity
of functionals, typically around 10–15
Chemist and Physicists do not use the same functionals!
Difficult to reproduce older calculations with older
functionals
Difficult to reproduce calculations performed with other
codes
Difficult to perform calculations with the newest functionals
M. A. L. Marques Libxc
Why the need for libxc?
The xc functional is at the heart of DFT
There are many approximations for the xc (probably of the
order of 150–200)
Most computer codes only include a very limited quantity
of functionals, typically around 10–15
Chemist and Physicists do not use the same functionals!
Difficult to reproduce older calculations with older
functionals
Difficult to reproduce calculations performed with other
codes
Difficult to perform calculations with the newest functionals
M. A. L. Marques Libxc
Why the need for libxc?
The xc functional is at the heart of DFT
There are many approximations for the xc (probably of the
order of 150–200)
Most computer codes only include a very limited quantity
of functionals, typically around 10–15
Chemist and Physicists do not use the same functionals!
Difficult to reproduce older calculations with older
functionals
Difficult to reproduce calculations performed with other
codes
Difficult to perform calculations with the newest functionals
M. A. L. Marques Libxc
Why the need for libxc?
The xc functional is at the heart of DFT
There are many approximations for the xc (probably of the
order of 150–200)
Most computer codes only include a very limited quantity
of functionals, typically around 10–15
Chemist and Physicists do not use the same functionals!
Difficult to reproduce older calculations with older
functionals
Difficult to reproduce calculations performed with other
codes
Difficult to perform calculations with the newest functionals
M. A. L. Marques Libxc
Kohn-Sham equations
The main equations of DFT are the Kohn-Sham equations:
−
1
2
2
+ vext(r) + vH(r) + vxc(r) ϕi(r) = iϕi(r)
where the exchange-correlation potential is defined as
vxc(r) =
δExc
δn(r)
In any practical application of the theory, we have to use an
approximation to Exc, or vxc(r).
M. A. L. Marques Libxc
Kohn-Sham equations
The main equations of DFT are the Kohn-Sham equations:
−
1
2
2
+ vext(r) + vH(r) + vxc(r) ϕi(r) = iϕi(r)
where the exchange-correlation potential is defined as
vxc(r) =
δExc
δn(r)
In any practical application of the theory, we have to use an
approximation to Exc, or vxc(r).
M. A. L. Marques Libxc
Jacob’s ladder
Local density approximation:
ELDA
xc (r) = ELDA
xc [n] n=n(r)
Generalized gradient approximation:
EGGA
xc (r) = EGGA
xc [n, n] n=n(r)
Meta-generalized gradient approximation:
EmGGA
xc (r) = EmGGA
xc [n, n, τ] n=n(r),τ=τ(r)
And more: orbital functionals, hybrid functionals, hyper-GGAs,
etc.
M. A. L. Marques Libxc
Jacob’s ladder
Local density approximation:
ELDA
xc (r) = ELDA
xc [n] n=n(r)
Generalized gradient approximation:
EGGA
xc (r) = EGGA
xc [n, n] n=n(r)
Meta-generalized gradient approximation:
EmGGA
xc (r) = EmGGA
xc [n, n, τ] n=n(r),τ=τ(r)
And more: orbital functionals, hybrid functionals, hyper-GGAs,
etc.
M. A. L. Marques Libxc
Jacob’s ladder
Local density approximation:
ELDA
xc (r) = ELDA
xc [n] n=n(r)
Generalized gradient approximation:
EGGA
xc (r) = EGGA
xc [n, n] n=n(r)
Meta-generalized gradient approximation:
EmGGA
xc (r) = EmGGA
xc [n, n, τ] n=n(r),τ=τ(r)
And more: orbital functionals, hybrid functionals, hyper-GGAs,
etc.
M. A. L. Marques Libxc
Jacob’s ladder
Local density approximation:
ELDA
xc (r) = ELDA
xc [n] n=n(r)
Generalized gradient approximation:
EGGA
xc (r) = EGGA
xc [n, n] n=n(r)
Meta-generalized gradient approximation:
EmGGA
xc (r) = EmGGA
xc [n, n, τ] n=n(r),τ=τ(r)
And more: orbital functionals, hybrid functionals, hyper-GGAs,
etc.
M. A. L. Marques Libxc
What do we need? - I
The energy is usually written as:
Exc = d3
r exc(r) = d3
r n(r) xc(r)
The potential in the LDA is:
vLDA
xc (r) =
d
dn
eLDA
xc (n)
n=n(r)
In the GGA:
vGGA
xc (r) =
∂
∂n
eLDA
xc (n, n)
n=n(r)
−
∂
∂( n)
eLDA
xc (n, n)
n=n(r)
M. A. L. Marques Libxc
What do we need? - II
For response properties we also need higher derivatives of exc
1st-order response (polarizabilities, phonon frequencies,
etc.):
fLDA
xc (r) =
d2
d2n
eLDA
xc (n)
n=n(r)
2st-order response (hyperpolarizabilities, etc.):
kLDA
xc (r) =
d3
d3n
eLDA
xc (n)
n=n(r)
And let’s not forget spin...
M. A. L. Marques Libxc
What do we need? - II
For response properties we also need higher derivatives of exc
1st-order response (polarizabilities, phonon frequencies,
etc.):
fLDA
xc (r) =
d2
d2n
eLDA
xc (n)
n=n(r)
2st-order response (hyperpolarizabilities, etc.):
kLDA
xc (r) =
d3
d3n
eLDA
xc (n)
n=n(r)
And let’s not forget spin...
M. A. L. Marques Libxc
An example: Perdew & Wang 91 (an LDA)
Perdew and Wang parametrized the correlation energy per unit
particle:
ec(rs, ζ) = ec(rs, 0) + αc(rs)
f(ζ)
f (0)
(1 − ζ4
) + [ec(rs, 1) − ec(rs, 0)]f(ζ)ζ4
The function f(ζ) is
f(ζ) =
[1 + ζ]4/3
+ [1 − ζ]4/3
− 2
24/3 − 2
,
while its second derivative f (0) = 1.709921. The functions ec(rs, 0),
ec(rs, 1), and −αc(rs) are all parametrized by the function
g = −2A(1 + α1rs) log 1 +
1
2A(β1r
1/2
s + β2rs + β3r
3/2
s + β4r2
s )
M. A. L. Marques Libxc
Libxc
Written in C from scratch
Bindings both in C and in Fortran
Lesser GNU general public license (v. 3.0)
Automatic testing of the functionals
Contains at the moment 19 LDA functionals, 55 GGA
functionals, 24 hybrids, and 7 mGGAs
Contains functionals for 1D, 2D, and 3D calculations
Returns εxc, vxc, fxc, and kxc
Quite mature: included in octopus, APE, GPAW, ABINIT,
and in the GW code of Murilo Tiago
M. A. L. Marques Libxc
Libxc
Written in C from scratch
Bindings both in C and in Fortran
Lesser GNU general public license (v. 3.0)
Automatic testing of the functionals
Contains at the moment 19 LDA functionals, 55 GGA
functionals, 24 hybrids, and 7 mGGAs
Contains functionals for 1D, 2D, and 3D calculations
Returns εxc, vxc, fxc, and kxc
Quite mature: included in octopus, APE, GPAW, ABINIT,
and in the GW code of Murilo Tiago
M. A. L. Marques Libxc
Libxc
Written in C from scratch
Bindings both in C and in Fortran
Lesser GNU general public license (v. 3.0)
Automatic testing of the functionals
Contains at the moment 19 LDA functionals, 55 GGA
functionals, 24 hybrids, and 7 mGGAs
Contains functionals for 1D, 2D, and 3D calculations
Returns εxc, vxc, fxc, and kxc
Quite mature: included in octopus, APE, GPAW, ABINIT,
and in the GW code of Murilo Tiago
M. A. L. Marques Libxc
Libxc
Written in C from scratch
Bindings both in C and in Fortran
Lesser GNU general public license (v. 3.0)
Automatic testing of the functionals
Contains at the moment 19 LDA functionals, 55 GGA
functionals, 24 hybrids, and 7 mGGAs
Contains functionals for 1D, 2D, and 3D calculations
Returns εxc, vxc, fxc, and kxc
Quite mature: included in octopus, APE, GPAW, ABINIT,
and in the GW code of Murilo Tiago
M. A. L. Marques Libxc
Libxc
Written in C from scratch
Bindings both in C and in Fortran
Lesser GNU general public license (v. 3.0)
Automatic testing of the functionals
Contains at the moment 19 LDA functionals, 55 GGA
functionals, 24 hybrids, and 7 mGGAs
Contains functionals for 1D, 2D, and 3D calculations
Returns εxc, vxc, fxc, and kxc
Quite mature: included in octopus, APE, GPAW, ABINIT,
and in the GW code of Murilo Tiago
M. A. L. Marques Libxc
Libxc
Written in C from scratch
Bindings both in C and in Fortran
Lesser GNU general public license (v. 3.0)
Automatic testing of the functionals
Contains at the moment 19 LDA functionals, 55 GGA
functionals, 24 hybrids, and 7 mGGAs
Contains functionals for 1D, 2D, and 3D calculations
Returns εxc, vxc, fxc, and kxc
Quite mature: included in octopus, APE, GPAW, ABINIT,
and in the GW code of Murilo Tiago
M. A. L. Marques Libxc
Libxc
Written in C from scratch
Bindings both in C and in Fortran
Lesser GNU general public license (v. 3.0)
Automatic testing of the functionals
Contains at the moment 19 LDA functionals, 55 GGA
functionals, 24 hybrids, and 7 mGGAs
Contains functionals for 1D, 2D, and 3D calculations
Returns εxc, vxc, fxc, and kxc
Quite mature: included in octopus, APE, GPAW, ABINIT,
and in the GW code of Murilo Tiago
M. A. L. Marques Libxc
Libxc
Written in C from scratch
Bindings both in C and in Fortran
Lesser GNU general public license (v. 3.0)
Automatic testing of the functionals
Contains at the moment 19 LDA functionals, 55 GGA
functionals, 24 hybrids, and 7 mGGAs
Contains functionals for 1D, 2D, and 3D calculations
Returns εxc, vxc, fxc, and kxc
Quite mature: included in octopus, APE, GPAW, ABINIT,
and in the GW code of Murilo Tiago
M. A. L. Marques Libxc
What is working!
εxc vxc fxc kxc
LDA OK OK OK OK
GGA OK OK PARTIAL NO
HYB GGA OK OK PARTIAL NO
mGGA TEST TEST NO NO
M. A. L. Marques Libxc
An example in C
switch ( x c f a m i l y f r o m i d ( xc . f u n c t i o n a l ) )
{
case XC FAMILY LDA :
i f ( xc . f u n c t i o n a l == XC LDA X)
x c l d a x i n i t (& lda func , xc . nspin , 3 , 0 ) ;
else
x c l d a i n i t (& lda func , xc . functional , xc . nspin ) ;
xc lda vxc (& lda func , xc . rho , &xc . zk , xc . vrho ) ;
xc lda end (& lda func ) ;
break ;
case XC FAMILY GGA :
x c g g a i n i t (& gga func , xc . functional , xc . nspin ) ;
xc gga vxc (& gga func , xc . rho , xc . sigma , &xc . zk , xc . vrho , xc . vsigma
xc gga end (& gga func ) ;
break ;
default :
f p r i n t f ( stderr , "Functional ’%d’ not foundn" , xc . f u n c t i o n a l ) ;
e x i t ( 1 ) ;
}
M. A. L. Marques Libxc
Another example in Fortran
program l x c t e s t
use l i b x c
i m p l i c i t none
real (8) : : rho , e c , v c
TYPE( xc func ) : : xc c func
TYPE( x c i n f o ) : : x c c i n f o
CALL x c f 9 0 l d a i n i t ( xc c func , xc c info , &
XC LDA C VWN, XC UNPOLARIZED)
CALL xc f90 lda vxc ( xc c func , rho , e c , v c )
CALL xc f90 lda end ( xc c func )
end program l x c t e s t
M. A. L. Marques Libxc
The info structure
typedef s t r u c t {
i n t number ; /∗ i n d e n t i f i e r number ∗/
i n t kind ; /∗ XC EXCHANGE or XC CORRELATION ∗/
char ∗name; /∗ name of the functional , e . g . ”PBE” ∗/
i n t family ; /∗ type of the functional , e . g . XC FAMILY GGA ∗/
char ∗ refs ; /∗ references ∗/
i n t provides ; /∗ e . g . XC PROVIDES EXC | XC PROVIDES VXC ∗/
. . .
} x c f u n c i n f o t y p e ;
This is an example on how you can use it:
xc gga type b88 ;
x c g g a i n i t (&b88 , XC GGA X B88 , XC UNPOLARIZED ) ;
p r i n t f ("The functional ’%s’ is defined in the reference(s):n%s" ,
b88 . info−>name, b88 . info−>refs ) ;
xc gga end (&b88 ) ;
M. A. L. Marques Libxc
The future
More functionals!
More derivatives!
More codes using it!
M. A. L. Marques Libxc
The future
More functionals!
More derivatives!
More codes using it!
M. A. L. Marques Libxc
The future
More functionals!
More derivatives!
More codes using it!
M. A. L. Marques Libxc
Where to find us!
http://www.tddft.org/programs/octopus/wiki/
index.php/Libxc
Comput. Phys. Commun. 151, 60–78 (2003)
Phys. Stat. Sol. B 243, 2465–2488 (2006)
M. A. L. Marques Libxc

More Related Content

PDF
Wien2k getting started
PPTX
Blaha krakow 2004
PDF
The all-electron GW method based on WIEN2k: Implementation and applications.
PPTX
Localized Electrons with Wien2k
PPTX
Methods available in WIEN2k for the treatment of exchange and correlation ef...
PDF
Graph Kernelpdf
PDF
Metodo Monte Carlo -Wang Landau
PDF
Density functional theory (DFT) and the concepts of the augmented-plane-wave ...
Wien2k getting started
Blaha krakow 2004
The all-electron GW method based on WIEN2k: Implementation and applications.
Localized Electrons with Wien2k
Methods available in WIEN2k for the treatment of exchange and correlation ef...
Graph Kernelpdf
Metodo Monte Carlo -Wang Landau
Density functional theory (DFT) and the concepts of the augmented-plane-wave ...

What's hot (20)

PDF
vasp-gpu on Balena: Usage and Some Benchmarks
PDF
Phonons & Phonopy: Pro Tips (2014)
PDF
Mathematics Colloquium, UCSC
PDF
AMS 250 - High-Performance, Massively Parallel Computing with FLASH
PDF
A Power Efficient Architecture for 2-D Discrete Wavelet Transform
PDF
Phonons & Phonopy: Pro Tips (2015)
PDF
First Place Memocode'14 Design Contest Entry
PDF
S4495-plasma-turbulence-sims-gyrokinetic-tokamak-solver
PDF
Advances in the Solution of Navier-Stokes Eqs. in GPGPU Hardware. Modelling F...
PDF
1147 smith[1]
PDF
射頻電子實驗手冊 [實驗6] 阻抗匹配模擬
PDF
Introduction to DFT Part 2
PDF
Multiband Transceivers - [Chapter 1]
PDF
Bayesian Inference and Uncertainty Quantification for Inverse Problems
PDF
RF Module Design - [Chapter 1] From Basics to RF Transceivers
PDF
discrete-hmm
PDF
Customization of LES turbulence model in OpenFOAM
PDF
Agilent ADS 模擬手冊 [實習1] 基本操作與射頻放大器設計
PDF
Agilent ADS 模擬手冊 [實習2] 放大器設計
PDF
Learning LWF Chain Graphs: A Markov Blanket Discovery Approach
vasp-gpu on Balena: Usage and Some Benchmarks
Phonons & Phonopy: Pro Tips (2014)
Mathematics Colloquium, UCSC
AMS 250 - High-Performance, Massively Parallel Computing with FLASH
A Power Efficient Architecture for 2-D Discrete Wavelet Transform
Phonons & Phonopy: Pro Tips (2015)
First Place Memocode'14 Design Contest Entry
S4495-plasma-turbulence-sims-gyrokinetic-tokamak-solver
Advances in the Solution of Navier-Stokes Eqs. in GPGPU Hardware. Modelling F...
1147 smith[1]
射頻電子實驗手冊 [實驗6] 阻抗匹配模擬
Introduction to DFT Part 2
Multiband Transceivers - [Chapter 1]
Bayesian Inference and Uncertainty Quantification for Inverse Problems
RF Module Design - [Chapter 1] From Basics to RF Transceivers
discrete-hmm
Customization of LES turbulence model in OpenFOAM
Agilent ADS 模擬手冊 [實習1] 基本操作與射頻放大器設計
Agilent ADS 模擬手冊 [實習2] 放大器設計
Learning LWF Chain Graphs: A Markov Blanket Discovery Approach
Ad

Viewers also liked (8)

PDF
Introduction to Electron Correlation
PDF
Mottphysics 2talk
PDF
Mottphysics 1talk
PDF
Quick and Dirty Introduction to Mott Insulators
PPTX
Presentation bi2 s3+son
PDF
Anderson localization, wave diffusion and the effect of nonlinearity in disor...
PPT
INTERMETALLICS
PDF
Mott insulators
Introduction to Electron Correlation
Mottphysics 2talk
Mottphysics 1talk
Quick and Dirty Introduction to Mott Insulators
Presentation bi2 s3+son
Anderson localization, wave diffusion and the effect of nonlinearity in disor...
INTERMETALLICS
Mott insulators
Ad

Similar to Libxc a library of exchange and correlation functionals (20)

PPTX
Dft presentation
PDF
SCF methods, basis sets, and integrals part III
PPT
computationalchemistry_12-6.ppt
PPT
Trent_to lto other gausisi ndnsdn talk.ppt
PPTX
Gdc2012 frames, sparsity and global illumination
PPTX
Digital signal processing parti cularly filter design ppt
PPT
Computational Chemistry: A DFT crash course
PDF
Benchmark Calculations of Atomic Data for Modelling Applications
PDF
QE-SSP - Lecture 1: Introduction to DFT with QE
PDF
Basics of Quantum and Computational Chemistry
PPTX
Quantum Chemistry II
PDF
Drugs and Electrons
PDF
Applications of Computational Quantum Chemistry
PDF
Smart Metrics for High Performance Material Design
PDF
Smart Metrics for High Performance Material Design
PDF
Differential Characters 1st Edition Christian Br Christian Becker Auth
PPTX
Advantages and applications of computational chemistry
PDF
The Spectra And Dynamics Of Diatomic Molecules 2nd Edition Helene Lefebvrebrion
PDF
Engineering Physics_M. R. Srinivasan
Dft presentation
SCF methods, basis sets, and integrals part III
computationalchemistry_12-6.ppt
Trent_to lto other gausisi ndnsdn talk.ppt
Gdc2012 frames, sparsity and global illumination
Digital signal processing parti cularly filter design ppt
Computational Chemistry: A DFT crash course
Benchmark Calculations of Atomic Data for Modelling Applications
QE-SSP - Lecture 1: Introduction to DFT with QE
Basics of Quantum and Computational Chemistry
Quantum Chemistry II
Drugs and Electrons
Applications of Computational Quantum Chemistry
Smart Metrics for High Performance Material Design
Smart Metrics for High Performance Material Design
Differential Characters 1st Edition Christian Br Christian Becker Auth
Advantages and applications of computational chemistry
The Spectra And Dynamics Of Diatomic Molecules 2nd Edition Helene Lefebvrebrion
Engineering Physics_M. R. Srinivasan

More from ABDERRAHMANE REGGAD (20)

PPTX
Presentation de mon mémoire de magister
PPTX
Présentation de thèse de doctorat
PPT
Introduction to the phenomenology of HiTc superconductors.
PPT
Strongly Interacting Atoms in Optical Lattices
PPT
The metal-insulator transition of VO2 revisited
PPT
Mean field Green function solution of the two-band Hubbard model in cuprates
PPT
Hidden Symmetries and Their Consequences in the Hubbard Model of t2g Electrons
PDF
Electronic structure of strongly correlated materials Part III V.Anisimov
PDF
Electronic structure of strongly correlated materials Part II V.Anisimov
PDF
Electronic structure of strongly correlated materials
PDF
ELECTRONIC STRUCTURE OF STRONGLY CORRELATED SYSTEMS
PDF
Strongly correlated electrons: LDA+U in practice
PDF
Density Functional and Dynamical Mean-Field Theory (DFT+DMFT) method and its ...
PPT
Theoretical picture: magnetic impurities, Zener model, mean-field theory
PPT
Magnetic semiconductors: classes of materials, basic properties, central ques...
PPT
Diluted Magnetic Semiconductors
PPT
Room Temperature Superconductivity: Dream or Reality?
PPTX
Phase Transitions in VO2 – Nikita Butakov
PPTX
Electrical transport and magnetic interactions in 3d and 5d transition metal ...
PDF
Mott metal insulator transitions satej soman, robert tang-kong
Presentation de mon mémoire de magister
Présentation de thèse de doctorat
Introduction to the phenomenology of HiTc superconductors.
Strongly Interacting Atoms in Optical Lattices
The metal-insulator transition of VO2 revisited
Mean field Green function solution of the two-band Hubbard model in cuprates
Hidden Symmetries and Their Consequences in the Hubbard Model of t2g Electrons
Electronic structure of strongly correlated materials Part III V.Anisimov
Electronic structure of strongly correlated materials Part II V.Anisimov
Electronic structure of strongly correlated materials
ELECTRONIC STRUCTURE OF STRONGLY CORRELATED SYSTEMS
Strongly correlated electrons: LDA+U in practice
Density Functional and Dynamical Mean-Field Theory (DFT+DMFT) method and its ...
Theoretical picture: magnetic impurities, Zener model, mean-field theory
Magnetic semiconductors: classes of materials, basic properties, central ques...
Diluted Magnetic Semiconductors
Room Temperature Superconductivity: Dream or Reality?
Phase Transitions in VO2 – Nikita Butakov
Electrical transport and magnetic interactions in 3d and 5d transition metal ...
Mott metal insulator transitions satej soman, robert tang-kong

Recently uploaded (20)

DOCX
Viruses (History, structure and composition, classification, Bacteriophage Re...
PPTX
7. General Toxicologyfor clinical phrmacy.pptx
PPTX
Comparative Structure of Integument in Vertebrates.pptx
PPTX
The KM-GBF monitoring framework – status & key messages.pptx
PPTX
GEN. BIO 1 - CELL TYPES & CELL MODIFICATIONS
PDF
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
PPTX
ANEMIA WITH LEUKOPENIA MDS 07_25.pptx htggtftgt fredrctvg
PPTX
Microbiology with diagram medical studies .pptx
PDF
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
PPTX
INTRODUCTION TO EVS | Concept of sustainability
PDF
. Radiology Case Scenariosssssssssssssss
PDF
The scientific heritage No 166 (166) (2025)
PPTX
2. Earth - The Living Planet earth and life
PPTX
famous lake in india and its disturibution and importance
PPT
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
PPTX
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
PPTX
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
PPTX
2. Earth - The Living Planet Module 2ELS
PPTX
TOTAL hIP ARTHROPLASTY Presentation.pptx
PDF
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
Viruses (History, structure and composition, classification, Bacteriophage Re...
7. General Toxicologyfor clinical phrmacy.pptx
Comparative Structure of Integument in Vertebrates.pptx
The KM-GBF monitoring framework – status & key messages.pptx
GEN. BIO 1 - CELL TYPES & CELL MODIFICATIONS
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
ANEMIA WITH LEUKOPENIA MDS 07_25.pptx htggtftgt fredrctvg
Microbiology with diagram medical studies .pptx
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
INTRODUCTION TO EVS | Concept of sustainability
. Radiology Case Scenariosssssssssssssss
The scientific heritage No 166 (166) (2025)
2. Earth - The Living Planet earth and life
famous lake in india and its disturibution and importance
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
2. Earth - The Living Planet Module 2ELS
TOTAL hIP ARTHROPLASTY Presentation.pptx
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf

Libxc a library of exchange and correlation functionals

  • 1. Libxc a library of exchange and correlation functionals Miguel A. L. Marques 1LPMCN, Universit´e Claude Bernard Lyon 1 and CNRS, France 2European Theoretical Spectroscopy Facility March 2009 – ABINIT Workshop M. A. L. Marques Libxc
  • 2. Why the need for libxc? The xc functional is at the heart of DFT There are many approximations for the xc (probably of the order of 150–200) Most computer codes only include a very limited quantity of functionals, typically around 10–15 Chemist and Physicists do not use the same functionals! Difficult to reproduce older calculations with older functionals Difficult to reproduce calculations performed with other codes Difficult to perform calculations with the newest functionals M. A. L. Marques Libxc
  • 3. Why the need for libxc? The xc functional is at the heart of DFT There are many approximations for the xc (probably of the order of 150–200) Most computer codes only include a very limited quantity of functionals, typically around 10–15 Chemist and Physicists do not use the same functionals! Difficult to reproduce older calculations with older functionals Difficult to reproduce calculations performed with other codes Difficult to perform calculations with the newest functionals M. A. L. Marques Libxc
  • 4. Why the need for libxc? The xc functional is at the heart of DFT There are many approximations for the xc (probably of the order of 150–200) Most computer codes only include a very limited quantity of functionals, typically around 10–15 Chemist and Physicists do not use the same functionals! Difficult to reproduce older calculations with older functionals Difficult to reproduce calculations performed with other codes Difficult to perform calculations with the newest functionals M. A. L. Marques Libxc
  • 5. Why the need for libxc? The xc functional is at the heart of DFT There are many approximations for the xc (probably of the order of 150–200) Most computer codes only include a very limited quantity of functionals, typically around 10–15 Chemist and Physicists do not use the same functionals! Difficult to reproduce older calculations with older functionals Difficult to reproduce calculations performed with other codes Difficult to perform calculations with the newest functionals M. A. L. Marques Libxc
  • 6. Why the need for libxc? The xc functional is at the heart of DFT There are many approximations for the xc (probably of the order of 150–200) Most computer codes only include a very limited quantity of functionals, typically around 10–15 Chemist and Physicists do not use the same functionals! Difficult to reproduce older calculations with older functionals Difficult to reproduce calculations performed with other codes Difficult to perform calculations with the newest functionals M. A. L. Marques Libxc
  • 7. Why the need for libxc? The xc functional is at the heart of DFT There are many approximations for the xc (probably of the order of 150–200) Most computer codes only include a very limited quantity of functionals, typically around 10–15 Chemist and Physicists do not use the same functionals! Difficult to reproduce older calculations with older functionals Difficult to reproduce calculations performed with other codes Difficult to perform calculations with the newest functionals M. A. L. Marques Libxc
  • 8. Why the need for libxc? The xc functional is at the heart of DFT There are many approximations for the xc (probably of the order of 150–200) Most computer codes only include a very limited quantity of functionals, typically around 10–15 Chemist and Physicists do not use the same functionals! Difficult to reproduce older calculations with older functionals Difficult to reproduce calculations performed with other codes Difficult to perform calculations with the newest functionals M. A. L. Marques Libxc
  • 9. Kohn-Sham equations The main equations of DFT are the Kohn-Sham equations: − 1 2 2 + vext(r) + vH(r) + vxc(r) ϕi(r) = iϕi(r) where the exchange-correlation potential is defined as vxc(r) = δExc δn(r) In any practical application of the theory, we have to use an approximation to Exc, or vxc(r). M. A. L. Marques Libxc
  • 10. Kohn-Sham equations The main equations of DFT are the Kohn-Sham equations: − 1 2 2 + vext(r) + vH(r) + vxc(r) ϕi(r) = iϕi(r) where the exchange-correlation potential is defined as vxc(r) = δExc δn(r) In any practical application of the theory, we have to use an approximation to Exc, or vxc(r). M. A. L. Marques Libxc
  • 11. Jacob’s ladder Local density approximation: ELDA xc (r) = ELDA xc [n] n=n(r) Generalized gradient approximation: EGGA xc (r) = EGGA xc [n, n] n=n(r) Meta-generalized gradient approximation: EmGGA xc (r) = EmGGA xc [n, n, τ] n=n(r),τ=τ(r) And more: orbital functionals, hybrid functionals, hyper-GGAs, etc. M. A. L. Marques Libxc
  • 12. Jacob’s ladder Local density approximation: ELDA xc (r) = ELDA xc [n] n=n(r) Generalized gradient approximation: EGGA xc (r) = EGGA xc [n, n] n=n(r) Meta-generalized gradient approximation: EmGGA xc (r) = EmGGA xc [n, n, τ] n=n(r),τ=τ(r) And more: orbital functionals, hybrid functionals, hyper-GGAs, etc. M. A. L. Marques Libxc
  • 13. Jacob’s ladder Local density approximation: ELDA xc (r) = ELDA xc [n] n=n(r) Generalized gradient approximation: EGGA xc (r) = EGGA xc [n, n] n=n(r) Meta-generalized gradient approximation: EmGGA xc (r) = EmGGA xc [n, n, τ] n=n(r),τ=τ(r) And more: orbital functionals, hybrid functionals, hyper-GGAs, etc. M. A. L. Marques Libxc
  • 14. Jacob’s ladder Local density approximation: ELDA xc (r) = ELDA xc [n] n=n(r) Generalized gradient approximation: EGGA xc (r) = EGGA xc [n, n] n=n(r) Meta-generalized gradient approximation: EmGGA xc (r) = EmGGA xc [n, n, τ] n=n(r),τ=τ(r) And more: orbital functionals, hybrid functionals, hyper-GGAs, etc. M. A. L. Marques Libxc
  • 15. What do we need? - I The energy is usually written as: Exc = d3 r exc(r) = d3 r n(r) xc(r) The potential in the LDA is: vLDA xc (r) = d dn eLDA xc (n) n=n(r) In the GGA: vGGA xc (r) = ∂ ∂n eLDA xc (n, n) n=n(r) − ∂ ∂( n) eLDA xc (n, n) n=n(r) M. A. L. Marques Libxc
  • 16. What do we need? - II For response properties we also need higher derivatives of exc 1st-order response (polarizabilities, phonon frequencies, etc.): fLDA xc (r) = d2 d2n eLDA xc (n) n=n(r) 2st-order response (hyperpolarizabilities, etc.): kLDA xc (r) = d3 d3n eLDA xc (n) n=n(r) And let’s not forget spin... M. A. L. Marques Libxc
  • 17. What do we need? - II For response properties we also need higher derivatives of exc 1st-order response (polarizabilities, phonon frequencies, etc.): fLDA xc (r) = d2 d2n eLDA xc (n) n=n(r) 2st-order response (hyperpolarizabilities, etc.): kLDA xc (r) = d3 d3n eLDA xc (n) n=n(r) And let’s not forget spin... M. A. L. Marques Libxc
  • 18. An example: Perdew & Wang 91 (an LDA) Perdew and Wang parametrized the correlation energy per unit particle: ec(rs, ζ) = ec(rs, 0) + αc(rs) f(ζ) f (0) (1 − ζ4 ) + [ec(rs, 1) − ec(rs, 0)]f(ζ)ζ4 The function f(ζ) is f(ζ) = [1 + ζ]4/3 + [1 − ζ]4/3 − 2 24/3 − 2 , while its second derivative f (0) = 1.709921. The functions ec(rs, 0), ec(rs, 1), and −αc(rs) are all parametrized by the function g = −2A(1 + α1rs) log 1 + 1 2A(β1r 1/2 s + β2rs + β3r 3/2 s + β4r2 s ) M. A. L. Marques Libxc
  • 19. Libxc Written in C from scratch Bindings both in C and in Fortran Lesser GNU general public license (v. 3.0) Automatic testing of the functionals Contains at the moment 19 LDA functionals, 55 GGA functionals, 24 hybrids, and 7 mGGAs Contains functionals for 1D, 2D, and 3D calculations Returns εxc, vxc, fxc, and kxc Quite mature: included in octopus, APE, GPAW, ABINIT, and in the GW code of Murilo Tiago M. A. L. Marques Libxc
  • 20. Libxc Written in C from scratch Bindings both in C and in Fortran Lesser GNU general public license (v. 3.0) Automatic testing of the functionals Contains at the moment 19 LDA functionals, 55 GGA functionals, 24 hybrids, and 7 mGGAs Contains functionals for 1D, 2D, and 3D calculations Returns εxc, vxc, fxc, and kxc Quite mature: included in octopus, APE, GPAW, ABINIT, and in the GW code of Murilo Tiago M. A. L. Marques Libxc
  • 21. Libxc Written in C from scratch Bindings both in C and in Fortran Lesser GNU general public license (v. 3.0) Automatic testing of the functionals Contains at the moment 19 LDA functionals, 55 GGA functionals, 24 hybrids, and 7 mGGAs Contains functionals for 1D, 2D, and 3D calculations Returns εxc, vxc, fxc, and kxc Quite mature: included in octopus, APE, GPAW, ABINIT, and in the GW code of Murilo Tiago M. A. L. Marques Libxc
  • 22. Libxc Written in C from scratch Bindings both in C and in Fortran Lesser GNU general public license (v. 3.0) Automatic testing of the functionals Contains at the moment 19 LDA functionals, 55 GGA functionals, 24 hybrids, and 7 mGGAs Contains functionals for 1D, 2D, and 3D calculations Returns εxc, vxc, fxc, and kxc Quite mature: included in octopus, APE, GPAW, ABINIT, and in the GW code of Murilo Tiago M. A. L. Marques Libxc
  • 23. Libxc Written in C from scratch Bindings both in C and in Fortran Lesser GNU general public license (v. 3.0) Automatic testing of the functionals Contains at the moment 19 LDA functionals, 55 GGA functionals, 24 hybrids, and 7 mGGAs Contains functionals for 1D, 2D, and 3D calculations Returns εxc, vxc, fxc, and kxc Quite mature: included in octopus, APE, GPAW, ABINIT, and in the GW code of Murilo Tiago M. A. L. Marques Libxc
  • 24. Libxc Written in C from scratch Bindings both in C and in Fortran Lesser GNU general public license (v. 3.0) Automatic testing of the functionals Contains at the moment 19 LDA functionals, 55 GGA functionals, 24 hybrids, and 7 mGGAs Contains functionals for 1D, 2D, and 3D calculations Returns εxc, vxc, fxc, and kxc Quite mature: included in octopus, APE, GPAW, ABINIT, and in the GW code of Murilo Tiago M. A. L. Marques Libxc
  • 25. Libxc Written in C from scratch Bindings both in C and in Fortran Lesser GNU general public license (v. 3.0) Automatic testing of the functionals Contains at the moment 19 LDA functionals, 55 GGA functionals, 24 hybrids, and 7 mGGAs Contains functionals for 1D, 2D, and 3D calculations Returns εxc, vxc, fxc, and kxc Quite mature: included in octopus, APE, GPAW, ABINIT, and in the GW code of Murilo Tiago M. A. L. Marques Libxc
  • 26. Libxc Written in C from scratch Bindings both in C and in Fortran Lesser GNU general public license (v. 3.0) Automatic testing of the functionals Contains at the moment 19 LDA functionals, 55 GGA functionals, 24 hybrids, and 7 mGGAs Contains functionals for 1D, 2D, and 3D calculations Returns εxc, vxc, fxc, and kxc Quite mature: included in octopus, APE, GPAW, ABINIT, and in the GW code of Murilo Tiago M. A. L. Marques Libxc
  • 27. What is working! εxc vxc fxc kxc LDA OK OK OK OK GGA OK OK PARTIAL NO HYB GGA OK OK PARTIAL NO mGGA TEST TEST NO NO M. A. L. Marques Libxc
  • 28. An example in C switch ( x c f a m i l y f r o m i d ( xc . f u n c t i o n a l ) ) { case XC FAMILY LDA : i f ( xc . f u n c t i o n a l == XC LDA X) x c l d a x i n i t (& lda func , xc . nspin , 3 , 0 ) ; else x c l d a i n i t (& lda func , xc . functional , xc . nspin ) ; xc lda vxc (& lda func , xc . rho , &xc . zk , xc . vrho ) ; xc lda end (& lda func ) ; break ; case XC FAMILY GGA : x c g g a i n i t (& gga func , xc . functional , xc . nspin ) ; xc gga vxc (& gga func , xc . rho , xc . sigma , &xc . zk , xc . vrho , xc . vsigma xc gga end (& gga func ) ; break ; default : f p r i n t f ( stderr , "Functional ’%d’ not foundn" , xc . f u n c t i o n a l ) ; e x i t ( 1 ) ; } M. A. L. Marques Libxc
  • 29. Another example in Fortran program l x c t e s t use l i b x c i m p l i c i t none real (8) : : rho , e c , v c TYPE( xc func ) : : xc c func TYPE( x c i n f o ) : : x c c i n f o CALL x c f 9 0 l d a i n i t ( xc c func , xc c info , & XC LDA C VWN, XC UNPOLARIZED) CALL xc f90 lda vxc ( xc c func , rho , e c , v c ) CALL xc f90 lda end ( xc c func ) end program l x c t e s t M. A. L. Marques Libxc
  • 30. The info structure typedef s t r u c t { i n t number ; /∗ i n d e n t i f i e r number ∗/ i n t kind ; /∗ XC EXCHANGE or XC CORRELATION ∗/ char ∗name; /∗ name of the functional , e . g . ”PBE” ∗/ i n t family ; /∗ type of the functional , e . g . XC FAMILY GGA ∗/ char ∗ refs ; /∗ references ∗/ i n t provides ; /∗ e . g . XC PROVIDES EXC | XC PROVIDES VXC ∗/ . . . } x c f u n c i n f o t y p e ; This is an example on how you can use it: xc gga type b88 ; x c g g a i n i t (&b88 , XC GGA X B88 , XC UNPOLARIZED ) ; p r i n t f ("The functional ’%s’ is defined in the reference(s):n%s" , b88 . info−>name, b88 . info−>refs ) ; xc gga end (&b88 ) ; M. A. L. Marques Libxc
  • 31. The future More functionals! More derivatives! More codes using it! M. A. L. Marques Libxc
  • 32. The future More functionals! More derivatives! More codes using it! M. A. L. Marques Libxc
  • 33. The future More functionals! More derivatives! More codes using it! M. A. L. Marques Libxc
  • 34. Where to find us! http://www.tddft.org/programs/octopus/wiki/ index.php/Libxc Comput. Phys. Commun. 151, 60–78 (2003) Phys. Stat. Sol. B 243, 2465–2488 (2006) M. A. L. Marques Libxc