LIBXC1: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
 
(169 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{TAGDEF|LIBXC1|[integer] or [string]}}
{{TAGDEF|LIBXC1|[string] or [integer]}}


Description: {{TAG|LIBXC1}} and [[LIBXC1|LIBXC2]] specify the functionals from the library of exchange-correlation functionals Libxc{{cite|marques:cpc:2012}}{{cite|lehtola:sx:2018}} that one wants to use.
Description: {{TAG|LIBXC1}} specifies the exchange or exchange-correlation functional from the library of exchange-correlation functionals Libxc{{cite|marques:cpc:2012}}{{cite|lehtola:sx:2018}}{{cite|libxc}}.
----
{{NB|important| This feature is available from VASP.6.3.0 onwards that needs to be compiled with [[Precompiler_options#-DUSELIBXC|-DUSELIBXC]].}}
{{TAG|LIBXC1}} and {{TAG|LIBXC2}} can be set to a label (string) or number (integer) associated with a functional listed on the Libxc website{{cite|libxc_list}}, e.g., <code>GGA_X_PBE</code> and <code>101</code> for PBE exchange. The label indicates if this is an exchange (X), correlation (C), or exchange-correlation (XC) functional, and which family it belongs to, namely LDA (LDA or HYB_LDA), GGA (GGA or HYB_GGA) or meta-GGA (MGGA or HYB_MGGA). If {{TAG|LIBXC1}} corresponds to an exchange functional, then it can be used in combination with {{TAG|LIBXC2}} for the correlation functional.


----
Libxc is a separate library package that has to be downloaded{{cite|libxc}} and compiled before VASP is compiled with the corresponding [[Precompiler_options#-DUSELIBXC|precompiler options]] and [[Makefile.include#Libxc_.28optional.29|links to the libraries]].
{{TAG|LIBXC1}} and [[LIBXC1|LIBXC2]] can be either integers or strings. The available functionals are listed on the Libxc website{{cite|libxc}} along with their associated number and tag (e.g., 101 and GGA_X_PBE for PBE exchange). The tag indicates if this is an exchange (X), correlation (C) or exchange-correlation (XC) functional, and to which family it belongs to, namely LDA (LDA or HYB_LDA), GGA (GGA or HYB_GGA) or meta-GGA (MGGA or HYB_MGGA).
 
Calculations with Laplacian-dependent meta-GGA functionals and meta-GGA-based hybrid functionals are possible since VASP.6.4.0.
{{NB|warning|Do not use the Libxc functionals that are hybrid-MGGA-exchange-only, i.e., those whose label starts with HYB_MGGA_X, since the results will be wrong.}}
{{NB|important|To get correct results with meta-GGA functionals (see discussion at {{TAG|LTBOUNDLIBXC}}), it is necessary to use Libxc from version 5.2.0 onwards (or the master version for the latest implemented functionals) and to [[Makefile.include#Libxc_.28optional.29|compile it with the option <code>--disable-fhc</code>]].}}


The allowed possibilities for {{TAG|LIBXC1}} and [[LIBXC1|LIBXC2]] are the following:
== How to ==


*Both {{TAGDEF|LIBXC1}} and [[LIBXC1|LIBXC2]] are specified and correspond to exchange and correlation functionals, respectively, or vice versa.
The allowed possibilities for {{TAG|LIBXC1}} and {{TAG|LIBXC2}} are the following:
*Only {{TAGDEF|LIBXC1}} (or [[LIBXC1|LIBXC2]]) is specified and corresponds to an exchange-correlation, exchange or correlation functional. As a side note, the latter choice would, from the physical point of view, make sense only if the correlation is combined with 100% of exact exchange ({{TAG|AEXX}}=1.0). Note also that if {{TAGDEF|LIBXC1}} (or [[LIBXC1|LIBXC2]]) is an exchange-correlation functional, then the other tag can not be used.
*Both {{TAGDEF|LIBXC1}} and {{TAG|LIBXC2}} are specified and correspond to exchange and correlation functionals, respectively.
*{{TAGDEF|LIBXC1}} and [[LIBXC1|LIBXC2]] can correspond to functionals of different families, e.g., a meta-GGA and a GGA, respectively.
*Only {{TAGDEF|LIBXC1}} is specified and corresponds to an exchange or exchange-correlation functional. {{NB|warning|If {{TAGDEF|LIBXC1}} is an exchange-correlation functional, then {{TAGDEF|LIBXC2}} can not be used.|:}}
*{{TAGDEF|LIBXC1}} and {{TAG|LIBXC2}} can correspond to functionals of different families, e.g., a meta-GGA and a GGA, respectively.


One has to specify also {{TAG|GGA}} = LIBXC for LDA, GGA and GGA-based hybrid functionals or {{TAG|METAGGA}} = LIBXC for meta-GGA functionals (calculations with meta-GGA-based hybrid functionals are not yet possible with VASP).
Regarding other tags in {{FILE|INCAR}} related to Libxc:
*One also has to specify {{TAG|GGA}} = LIBXC for LDA, GGA and GGA-based hybrid functionals or {{TAG|METAGGA}} = LIBXC for meta-GGA functionals and meta-GGA-based hybrid functionals. Note that if one of the tags ({{TAGDEF|LIBXC1}} or {{TAGDEF|LIBXC2}}) corresponds to a meta-GGA, while the other corresponds to a GGA or LDA, then {{TAG|METAGGA}} = LIBXC (and not {{TAG|GGA}} = LIBXC) has to be specified.
*Many of the functionals implemented in Libxc have parameters that can be modified. This can be done via the tags {{TAG|LIBXC1_Pn}} and {{TAG|LIBXC2_Pn}}, where <math>n=1, 2, \ldots</math>.
*The tag {{TAG|LTBOUNDLIBXC}}, which is .FALSE. by default, allows to enforce the lower bound on the kinetic-energy density (<math>\tau_{\sigma}^{\mathrm{W}}<\tau_{\sigma}</math>) with <math>\tau_{\sigma}=\max(\tau_{\sigma},\tau_{\sigma}^{\mathrm{W}})</math> before <math>\tau_{\sigma}</math> is used in a meta-GGA functional from Libxc.


In addition, many of the functionals implemented in Libxc have parameters that can be modified. This can be done with the tags {{TAG|LIBXC1_Pn}} and {{TAG|LIBXC2_Pn}}, where <math>n=1, 2, ...</math> in {{FILE|INCAR}}.
For calculations with hybrid functionals ({{TAG|LHFCALC}}=True), the following provides some explanations:
*The Libxc functionals whose tag starts with HYB already include the mixing parameter. Therefore, for them, the {{TAG|ALDAX}}, {{TAG|ALDAC}}, {{TAG|AGGAX}}, {{TAG|AGGAC}}, {{TAG|AMGGAX}}, and {{TAG|AMGGAC}} tags can not be used (more information on how to modify the mixing and screening parameters can be found at {{TAG|LIBXC1_Pn}}).
*If the semilocal component of the hybrid functional is constructed using Libxc functionals that do not contain HYB in the tag, then {{TAG|ALDAX}}, {{TAG|AGGAX}}, {{TAG|ALDAC}}, and {{TAG|AGGAC}} will be used and multiply
:<math>E_{\mathrm{x}}^{\mathrm{LDA}}=\int\epsilon_{\mathrm{x}}^{\mathrm{LDA}}(n)d^{3}r</math>
:<math>\Delta E_{\mathrm{x}}^{\mathrm{GGA}}=\int\left(\epsilon_{\mathrm{x}}^{\mathrm{GGA}}(n,\nabla n) - \epsilon_{\mathrm{x}}^{\mathrm{LDA}}(n)\right)d^{3}r</math>
:<math>E_{\mathrm{c}}^{\mathrm{LDA}}=\int\epsilon_{\mathrm{c}}^{\mathrm{LDA}}(n)d^{3}r</math>
:<math>\Delta E_{\mathrm{c}}^{\mathrm{GGA}}=\int\left(\epsilon_{\mathrm{c}}^{\mathrm{GGA}}(n,\nabla n) - \epsilon_{\mathrm{c}}^{\mathrm{LDA}}(n)\right)d^{3}r</math>
:respectively, where <math>\epsilon_{\mathrm{x}}^{\mathrm{LDA}}(n)=-\left(3/4\right)\left(3/\pi\right)^{1/3}n^{4/3}</math> and <math>\epsilon_{\mathrm{c}}^{\mathrm{LDA}}(n)=\epsilon_{\mathrm{c}}^{\mathrm{GGA}}(n,\nabla n=0)</math>.


For calculations with hybrid functionals (i.e., when {{TAG|LHFCALC}} = .TRUE.), the following explains how it works.
== Examples of {{FILE|INCAR}} ==
*The Libxc functionals whose tag starts with HYB_LDA_XC, HYB_GGA_XC or HYB_MGGA_XC{{cite|libxc}} consist directly of the whole semilocal component of a hybrid functional, and only {{TAG|LIBXC1}} (or {{TAG|LIBXC2}}) can be used (see the example below for PBEh). Furthermore, for these functionals {{TAG|AGGAX}}, {{TAG|AGGAC}} and {{TAG|ALDAC}} can not be used (more informations on how to modify the mixing and screening parameters can be found here {{TAG|LIBXC1_Pn}}).
*If the semilocal component of the hybrid functional is constructed using Libxc functionals that do not contain HYB in the tag, then (1-{{TAG|AEXX}}), {{TAG|AGGAX}}, {{TAG|ALDAC}} and {{TAG|AGGAC}} will be used and multiply
:<math>E_{\mathrm{x}}^{\mathrm{LDA}}=\int\epsilon_{\mathrm{x}}^{\mathrm{LDA}}(\rho)d^{3}r</math>
:<math>\Delta E_{\mathrm{x}}^{\mathrm{GGA}}=\int\Delta\epsilon_{\mathrm{x}}^{\mathrm{GGA}}(\rho,\nabla\rho)d^{3}r = \int\left(\epsilon_{\mathrm{x}}^{\mathrm{GGA}}(\rho,\nabla\rho) - \epsilon_{\mathrm{x}}^{\mathrm{LDA}}(\rho)\right)d^{3}r</math>
:<math>E_{\mathrm{c}}^{\mathrm{LDA}}=\int\epsilon_{\mathrm{c}}^{\mathrm{LDA}}(\rho)d^{3}r</math>
:<math>\Delta E_{\mathrm{c}}^{\mathrm{GGA}}=\int\Delta\epsilon_{\mathrm{c}}^{\mathrm{GGA}}(\rho,\nabla\rho)d^{3}r = \int\left(\epsilon_{\mathrm{c}}^{\mathrm{GGA}}(\rho,\nabla\rho) - \epsilon_{\mathrm{c}}^{\mathrm{LDA}}(\rho)\right)d^{3}r</math>
:respectively, where <math>\epsilon_{\mathrm{x}}^{\mathrm{LDA}}(\rho)=-\frac{3}{4}\left(\frac{3}{\pi}\right)^{1/3}\rho^{4/3}</math> and <math>\epsilon_{\mathrm{c}}^{\mathrm{LDA}}(\rho)=\epsilon_{\mathrm{c}}^{\mathrm{GGA}}(\rho,\nabla\rho=0)</math>.
Examples of how to specify a Libxc functional in {{FILE|INCAR}} are given below for the GGA PBE{{cite|perdew:prl:1996}}, meta-GGA SCAN{{cite|sun:prl:15}} and hybrid PBEh (PBE0){{cite|adamo:jcp:1999}} functionals.


*PBE
*PBE{{cite|perdew:prl:1996}}
{{TAG|GGA}} = LIBXC
{{TAG|LIBXC1}} = 101
[[LIBXC1|LIBXC2]] = 130
or
  {{TAG|GGA}} = LIBXC
  {{TAG|GGA}} = LIBXC
  {{TAG|LIBXC1}} = GGA_X_PBE
  {{TAG|LIBXC1}} = GGA_X_PBE # or 101
  [[LIBXC1|LIBXC2]] = GGA_C_PBE
  {{TAG|LIBXC2}} = GGA_C_PBE # or 130


*SCAN
*SCAN{{cite|sun:prl:15}}
  {{TAG|METAGGA}} = LIBXC
  {{TAG|METAGGA}} = LIBXC
  {{TAG|LIBXC1}} = 263
  {{TAG|LIBXC1}} = MGGA_X_SCAN # or 263
[[LIBXC1|LIBXC2]] = 267
  {{TAG|LIBXC2}} = MGGA_C_SCAN # or 267
or
  {{TAG|METAGGA}} = LIBXC
{{TAG|LIBXC1}} = MGGA_X_SCAN
[[LIBXC1|LIBXC2]] = MGGA_C_SCAN


*PBEh (PBE0)
*PBEh (PBE0){{cite|adamo:jcp:1999}}
  {{TAG|LHFCALC}} = .TRUE.
  {{TAG|LHFCALC}} = .TRUE.
  {{TAG|AEXX}} = 0.25
  {{TAG|AEXX}} = 0.25
  {{TAG|GGA}} = LIBXC
  {{TAG|GGA}} = LIBXC
  {{TAG|LIBXC1}} = 406
  {{TAG|LIBXC1}} = HYB_GGA_XC_PBEH # or 406
or
 
*SCAN0
  {{TAG|LHFCALC}} = .TRUE.
  {{TAG|LHFCALC}} = .TRUE.
  {{TAG|AEXX}} = 0.25
  {{TAG|AEXX}} = 0.25
  {{TAG|GGA}} = LIBXC
  {{TAG|METAGGA}} = LIBXC
  {{TAG|LIBXC1}} = HYB_GGA_XC_PBEH
  {{TAG|LIBXC1}} = MGGA_X_SCAN # or 263
{{TAG|LIBXC1}} = MGGA_C_SCAN # or 267


== Related Tags and Sections ==
== Related tags and articles ==
{{TAG|LIBXC2}},
{{TAG|LIBXC1_Pn}},
{{TAG|LIBXC1_Pn}},
{{TAG|LIBXC2_Pn}},
{{TAG|LTBOUNDLIBXC}},
{{TAG|GGA}},
{{TAG|GGA}},
{{TAG|METAGGA}},
{{TAG|METAGGA}},
{{TAG|LHFCALC}},
{{TAG|AEXX}},
{{TAG|AEXX}},
{{TAG|ALDAX}},
{{TAG|ALDAC}},
{{TAG|AGGAX}},
{{TAG|AGGAX}},
{{TAG|AGGAC}},
{{TAG|AGGAC}},
{{TAG|ALDAC}},
{{TAG|AMGGAX}},
[[Hartree-Fock_and_HF/DFT_hybrid_functionals|hybrid functionals]],
{{TAG|AMGGAC}},
[[specific_hybrid_functionals|settings for specific hybrid functionals]]
[[list_of_hybrid_functionals|List of hybrid functionals]]


{{sc|LIBXC1|Examples|Examples that use this tag}}
{{sc|LIBXC1|Examples|Examples that use this tag}}
== References ==
<references/>


----
----
 
[[Category:INCAR tag]][[Category:Exchange-correlation functionals]][[Category:GGA]][[Category:meta-GGA]][[Category:Hybrid_functionals]]
[[Category:INCAR]][[Category:XC Functionals]][[Category:GGA]][[Category:metaGGA]][[Category:Hybrids]]

Latest revision as of 13:18, 19 October 2023

LIBXC1 = [string] or [integer] 

Description: LIBXC1 specifies the exchange or exchange-correlation functional from the library of exchange-correlation functionals Libxc[1][2][3].


Important: This feature is available from VASP.6.3.0 onwards that needs to be compiled with -DUSELIBXC.

LIBXC1 and LIBXC2 can be set to a label (string) or number (integer) associated with a functional listed on the Libxc website[4], e.g., GGA_X_PBE and 101 for PBE exchange. The label indicates if this is an exchange (X), correlation (C), or exchange-correlation (XC) functional, and which family it belongs to, namely LDA (LDA or HYB_LDA), GGA (GGA or HYB_GGA) or meta-GGA (MGGA or HYB_MGGA). If LIBXC1 corresponds to an exchange functional, then it can be used in combination with LIBXC2 for the correlation functional.

Libxc is a separate library package that has to be downloaded[3] and compiled before VASP is compiled with the corresponding precompiler options and links to the libraries.

Calculations with Laplacian-dependent meta-GGA functionals and meta-GGA-based hybrid functionals are possible since VASP.6.4.0.

Warning: Do not use the Libxc functionals that are hybrid-MGGA-exchange-only, i.e., those whose label starts with HYB_MGGA_X, since the results will be wrong.
Important: To get correct results with meta-GGA functionals (see discussion at LTBOUNDLIBXC), it is necessary to use Libxc from version 5.2.0 onwards (or the master version for the latest implemented functionals) and to compile it with the option --disable-fhc.

How to

The allowed possibilities for LIBXC1 and LIBXC2 are the following:

  • Both LIBXC1  and LIBXC2 are specified and correspond to exchange and correlation functionals, respectively.
  • Only LIBXC1  is specified and corresponds to an exchange or exchange-correlation functional.
Warning: If LIBXC1  is an exchange-correlation functional, then LIBXC2  can not be used.
  • LIBXC1  and LIBXC2 can correspond to functionals of different families, e.g., a meta-GGA and a GGA, respectively.

Regarding other tags in INCAR related to Libxc:

  • One also has to specify GGA = LIBXC for LDA, GGA and GGA-based hybrid functionals or METAGGA = LIBXC for meta-GGA functionals and meta-GGA-based hybrid functionals. Note that if one of the tags (LIBXC1  or LIBXC2 ) corresponds to a meta-GGA, while the other corresponds to a GGA or LDA, then METAGGA = LIBXC (and not GGA = LIBXC) has to be specified.
  • Many of the functionals implemented in Libxc have parameters that can be modified. This can be done via the tags LIBXC1_Pn and LIBXC2_Pn, where .
  • The tag LTBOUNDLIBXC, which is .FALSE. by default, allows to enforce the lower bound on the kinetic-energy density () with before is used in a meta-GGA functional from Libxc.

For calculations with hybrid functionals (LHFCALC=True), the following provides some explanations:

  • The Libxc functionals whose tag starts with HYB already include the mixing parameter. Therefore, for them, the ALDAX, ALDAC, AGGAX, AGGAC, AMGGAX, and AMGGAC tags can not be used (more information on how to modify the mixing and screening parameters can be found at LIBXC1_Pn).
  • If the semilocal component of the hybrid functional is constructed using Libxc functionals that do not contain HYB in the tag, then ALDAX, AGGAX, ALDAC, and AGGAC will be used and multiply
respectively, where and .

Examples of INCAR

GGA = LIBXC
LIBXC1 = GGA_X_PBE # or 101
LIBXC2 = GGA_C_PBE # or 130
METAGGA = LIBXC
LIBXC1 = MGGA_X_SCAN # or 263
LIBXC2 = MGGA_C_SCAN # or 267
LHFCALC = .TRUE.
AEXX = 0.25
GGA = LIBXC
LIBXC1 = HYB_GGA_XC_PBEH # or 406
  • SCAN0
LHFCALC = .TRUE.
AEXX = 0.25
METAGGA = LIBXC
LIBXC1 = MGGA_X_SCAN # or 263
LIBXC1 = MGGA_C_SCAN # or 267

Related tags and articles

LIBXC2, LIBXC1_Pn, LIBXC2_Pn, LTBOUNDLIBXC, GGA, METAGGA, LHFCALC, AEXX, ALDAX, ALDAC, AGGAX, AGGAC, AMGGAX, AMGGAC, List of hybrid functionals

Examples that use this tag

References