SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

A Power Efficient Architecture for 2-D Discrete Wavelet Transform
A Power Efficient Architecture for 2-D Discrete Wavelet TransformA Power Efficient Architecture for 2-D Discrete Wavelet Transform
A Power Efficient Architecture for 2-D Discrete Wavelet Transform
Rahul Jain
 
S4495-plasma-turbulence-sims-gyrokinetic-tokamak-solver
S4495-plasma-turbulence-sims-gyrokinetic-tokamak-solverS4495-plasma-turbulence-sims-gyrokinetic-tokamak-solver
S4495-plasma-turbulence-sims-gyrokinetic-tokamak-solver
Praveen Narayanan
 
Learning LWF Chain Graphs: A Markov Blanket Discovery Approach
Learning LWF Chain Graphs: A Markov Blanket Discovery ApproachLearning LWF Chain Graphs: A Markov Blanket Discovery Approach
Learning LWF Chain Graphs: A Markov Blanket Discovery Approach
Pooyan Jamshidi
 

Tendances (20)

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

En vedette

En vedette (9)

Introduction to Electron Correlation
Introduction to Electron CorrelationIntroduction to Electron Correlation
Introduction to Electron Correlation
 
Mottphysics 2talk
Mottphysics   2talkMottphysics   2talk
Mottphysics 2talk
 
Mottphysics 1talk
Mottphysics  1talkMottphysics  1talk
Mottphysics 1talk
 
Introduction to Quantum Monte Carlo
Introduction to Quantum Monte CarloIntroduction to Quantum Monte Carlo
Introduction to Quantum Monte Carlo
 
Quick and Dirty Introduction to Mott Insulators
Quick and Dirty Introduction to Mott InsulatorsQuick and Dirty Introduction to Mott Insulators
Quick and Dirty Introduction to Mott Insulators
 
Presentation bi2 s3+son
Presentation bi2 s3+sonPresentation bi2 s3+son
Presentation bi2 s3+son
 
Anderson localization, wave diffusion and the effect of nonlinearity in disor...
Anderson localization, wave diffusion and the effect of nonlinearity in disor...Anderson localization, wave diffusion and the effect of nonlinearity in disor...
Anderson localization, wave diffusion and the effect of nonlinearity in disor...
 
INTERMETALLICS
INTERMETALLICSINTERMETALLICS
INTERMETALLICS
 
Mott insulators
Mott insulatorsMott insulators
Mott insulators
 

Similaire à Libxc a library of exchange and correlation functionals

Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++
Romain Francois
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++
Romain Francois
 

Similaire à Libxc a library of exchange and correlation functionals (20)

Optimizing with persistent data structures (LLVM Cauldron 2016)
Optimizing with persistent data structures (LLVM Cauldron 2016)Optimizing with persistent data structures (LLVM Cauldron 2016)
Optimizing with persistent data structures (LLVM Cauldron 2016)
 
An Efficient and Parallel Abstract Interpreter in Scala — First Algorithm
An Efficient and Parallel Abstract Interpreter in Scala — First AlgorithmAn Efficient and Parallel Abstract Interpreter in Scala — First Algorithm
An Efficient and Parallel Abstract Interpreter in Scala — First Algorithm
 
Designing Architecture-aware Library using Boost.Proto
Designing Architecture-aware Library using Boost.ProtoDesigning Architecture-aware Library using Boost.Proto
Designing Architecture-aware Library using Boost.Proto
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++
 
03_spectral_computing.pdf
03_spectral_computing.pdf03_spectral_computing.pdf
03_spectral_computing.pdf
 
A Lossless FBAR Compressor
A Lossless FBAR CompressorA Lossless FBAR Compressor
A Lossless FBAR Compressor
 
Programming Hp33s talk v3
Programming Hp33s talk v3Programming Hp33s talk v3
Programming Hp33s talk v3
 
signal and system
signal and system signal and system
signal and system
 
Lex and Yacc ppt
Lex and Yacc pptLex and Yacc ppt
Lex and Yacc ppt
 
Clojure intro
Clojure introClojure intro
Clojure intro
 
Ieee2013_upgrading_knowledge_matlab_pt2
Ieee2013_upgrading_knowledge_matlab_pt2Ieee2013_upgrading_knowledge_matlab_pt2
Ieee2013_upgrading_knowledge_matlab_pt2
 
An Efficient and Parallel Abstract Interpreter in Scala — Second Presentation
An Efficient and Parallel Abstract Interpreter in Scala — Second PresentationAn Efficient and Parallel Abstract Interpreter in Scala — Second Presentation
An Efficient and Parallel Abstract Interpreter in Scala — Second Presentation
 
R and C++
R and C++R and C++
R and C++
 
Dsp lab manual
Dsp lab manualDsp lab manual
Dsp lab manual
 
QMC: Operator Splitting Workshop, Forward-Backward Splitting Algorithm withou...
QMC: Operator Splitting Workshop, Forward-Backward Splitting Algorithm withou...QMC: Operator Splitting Workshop, Forward-Backward Splitting Algorithm withou...
QMC: Operator Splitting Workshop, Forward-Backward Splitting Algorithm withou...
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentation
 
F#3.0
F#3.0 F#3.0
F#3.0
 
RFC's impact on project using Kolmogorov model and Python
RFC's impact on project using Kolmogorov model and PythonRFC's impact on project using Kolmogorov model and Python
RFC's impact on project using Kolmogorov model and Python
 
Functional Programming - Past, Present and Future
Functional Programming - Past, Present and FutureFunctional Programming - Past, Present and Future
Functional Programming - Past, Present and Future
 

Plus de ABDERRAHMANE REGGAD

Plus de ABDERRAHMANE REGGAD (20)

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

Dernier

Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
levieagacer
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
PirithiRaju
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
seri bangash
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
NazaninKarimi6
 

Dernier (20)

Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
 
FAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceFAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical Science
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdf
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai YoungDubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
 
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
 
300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx
 
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptxCOST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
 
GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRLKochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
 
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit flypumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
Grade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsGrade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its Functions
 

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