[CP2K-user] [CP2K:15243] Re: About XC functionals available

Ivan Scivetti ivansc... at gmail.com
Mon Apr 26 12:43:36 UTC 2021


Dear Frederick,
Thanks a lot for your clear answers. Indeed, they help a lot!

Regarding question 1 above, now it makes sense. However, my confusion
originated after looking at the PURE SUBROUTINE wigner_slater_functional in
src/atoms_util.F:






















*   PURE SUBROUTINE wigner_slater_functional(rho, vxc)      REAL(KIND=dp),
DIMENSION(:), INTENT(IN)            :: rho      REAL(KIND=dp),
DIMENSION(:), INTENT(OUT)           :: vxc      INTEGER
                       :: i      REAL(KIND=dp)
         :: ec, ex, rs, vc, vx      vxc = 0._dp      DO i = 1, SIZE(rho)
     IF (rho(i) > 1.e-20_dp) THEN            ! 3/4 * (3/pi)^{1/3} ==
0.7385588            ex = -0.7385588_dp*rho(i)**0.333333333_dp
vx = 1.333333333_dp*ex            rs =
(3._dp/fourpi/rho(i))**0.333333333_dp            ec = -0.88_dp/(rs +
7.8_dp)            vc = ec*(1._dp + rs/(3._dp*(rs + 7.8_dp)))
vxc(i) = vx + vc         END IF      END DO   END SUBROUTINE
wigner_slater_functional*

You can see this subroutine computes both the correlation energy (ec, vc)
as well as the exchange energy (ex,vx), which contradicted the flag*
LDA_C_WIGNER* to compute *only the correlation bit.* Now your explanation
helps to unpuzzle my concern. Since there was no date recorded in the
description of each sections in the online manual, I could not even guess
when these flags were introduced.

I shall continue investigating further. Thanks a lot for your help.
Best wishes

Ivan


On Mon, 26 Apr 2021 at 13:25, 'Frederick Stein' via cp2k <
cp... at googlegroups.com> wrote:

> Dear Ivan,
>
> Short answer:
> All section names you are referring to are actually functionals from
> LibXC. That is why you do not find the respective code in CP2K.
> A pseudo potential optimized for a functional of a given class usually
> provides reasonable results for other functionals of the same class. For
> metals, you should check that separately.
>
> Long answer:
> To 1+2) Do you mean by accident the master branch instead of 8.1 ? Your
> given functional names are functional names from LibXC. In the recent
> trunk, we have added separate sections for the functionals from LibXC. That
> is why you will not find the code in CP2K but in LibXC and why these
> sections do not work with older versions of CP2K. Some more information
> about the the naming scheme of LibXC (also consult the manual of LibXC):
> - Names starting with "HYB_" refer to hybrid functionals for which you
> have to set up a separate Hartree-Fock section on your own.
> - Then, you will find the class of the underlying DFT functional ("LDA",
> "GGA", "MGGA").
> - Then, the type of functional ("K" for kinetic energy, "X" for
> exchange-only, "C" for correlation-only, "XC" for exchange-correlation
> functional).
> - Finally, the functional name (have a look at the manual of LibXC for you
> LibXC distribution in-use).
>
> There is one functional which sticks to the above convention but is not
> provided by LibXC but by CP2K (LDA_HOLE_T_C_LR).
> Some functionals from LibXC are natively supported by CP2K like LYP (in
> LibXC: GGA_C_LYP) or PZ81 (in LibXC: LDA_C_PZ).
>
> To 3+4)
> Basically yes, but you should always check the suitability of the
> pseudopotentials, especially for metals.
>
> To 5)
> Probably yes. In case of doubt, check the references in the LibXC manual
> (I do not know these functionals)
>
> To 6)
> As stated above, "_C_" tells you that the corresponding functional is just
> a correlation functional and you have to add a suitable exchange functional
> (or Hartree-Fock). For LDA-based functionals, it is LDA_X (from LibXC) or
> XALPHA (from CP2K).
>
> I hope it helps you. If you have more questions, just ask.
>
> Best,
> Frederick
>
> iva... at gmail.com schrieb am Montag, 26. April 2021 um 13:10:26 UTC+2:
>
>>
>> Dear CP2K community,
>>
>> I attach the test.png file where I have tested different XC functionals
>> of my interest in a table format. I have tried CP2K versions from 6.1 to
>> 8.1. Questions:
>>
>> 1) Functional with directives LDA_C_HL, LDA_C_PZ, LDA_C_WIGNER,
>> GGA_C_AM05, GGA_X_AM05 and GGA_X_RPBE do not seem to be recognised for
>> version 7.1 and 6.1, but they work well for 8.1. Is this correct? If not,
>> what I am doing wrong? The only two XC subroutines I have found in the src
>> folder for version 8.1 related to the above functionals is
>> wigner_slater_functional (for WIGNER defined in src/atom_utils.F, created
>> in 2008) and (for PZ, in src/xc/xc_perdew_zunger.F, created in 2004). So I
>> wonder why LDA_C_WIGNER nor LDA_C_PZ are recognised for versions 6.1 and
>> 7.1.
>> 2) This is related to 1), somehow. Apart from WIGNER, PZ, PBE, REVPBE
>> and PBESOL, I cannot find the subroutines that correspond to the other
>> functionals using *grep*. Could you please instruct me how/where to find
>> the relevant subroutines?
>> 3) Shall one use PADE potentials for HL, PZ and Wigner?
>> 4) Shall one use PBE potentials for AM05, RPEB, PBESOL?
>> 5) Regarding AM05: if I want to use this functional, shall I specify
>> both GGA_C_AM05 and GGA_X_AM05 together as follows?
>>
>> &XC
>>   &XC_FUNCTIONAL
>>      &GGA_X_AM05
>>      &END GGA_X_AM05
>>      &GGA_C_AM05
>>      &END GGA_C_AM05
>>   &END XC_FUNCTIONAL
>> &END XC
>>
>> 6) For LDA_C_HL, “_C_” refers that the HL only proposed a correlation
>> term, and used the Slater functional for the exchange part (from the paper
>> Hedin and Lundquist wrote). Does LDA_C_HL (and the rest LDA_C_ of the
>> table) include the exchange part already? Or one also need to include
>> directive LDA_X (Slater exchange) in the input file? I mean, shall LDA_X
>> block below be defined or not?
>>
>> &XC
>>   &XC_FUNCTIONAL
>> *     &LDA_X *
>> *     &END LDA_X*
>>      &LDA_C_HL
>>      &END LDA_C_HL
>>   &END XC_FUNCTIONAL
>> &END XC
>>
>> Thanks a lot in advance for your help with these questions
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cp... at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/cp2k/d54e315d-468a-4e25-92fd-d4fd8950501cn%40googlegroups.com
> <https://groups.google.com/d/msgid/cp2k/d54e315d-468a-4e25-92fd-d4fd8950501cn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20210426/08d1068e/attachment.htm>


More information about the CP2K-user mailing list