[Q-e-developers] Bug in meta-GGA interface with LIBXC
Davide Ceresoli
davide.ceresoli at cnr.it
Sat Nov 11 14:57:17 CET 2017
Dear Daniel,
I had noticed exactly what you are reporting. I had
tested the QE implementation vs the libXC implementation
of metaGGAs and I've got a factor 1/2 in one case. The
problem is that I didn't know which one is correct!
Regarding the NaN's, I found that that the problem is the
ratio tau over tau_w (tau is the valence, kinetic energy, tauw
is the corresponding Thomas-Fermi). The correlation formula is
valid for z < 1, but I've noticed that inside the pseudo
radius, it happens that z > 1 over small regions of space.
Since I didn't want to "break" arbitrarily the TPSS implementation
in QE, I made the changes in my own repository (github=>ce-espresso)
and I've tried z = max(1.0,z) or using a smooth z = a*tanh(z/a)
formula. Other choices are possible, but yield different results.
I'm glad to know that now the problems are fixed! Thanks a lot.
Best wishes,
Davide
On 11/11/2017 06:37 AM, Mejia Rodriguez, Daniel wrote:
> Dear QE developers,
>
>
> I'm using the PWSCF v.6.2 (svn rev. 13949:13950) interface with LibXC (version
> 4.0.2) to perform some calculations with meta-GGA functionals. I noticed that
> even for a very simple case, diamond computed with TPSS, QE interfaced with
> LibXC yields NaNs and stops early; however, the native TPSS implementation runs
> successfully.
>
>
> I started to look the source code for clues about this odd behavior and I
> discovered an odd 1/2 factor in the kinetic energy density when LibXC is used.
> As far as I understand the code, that factor should not be present.
>
> I kept digging into the code and found the following:
>
> 1. The NaNs were coming from the correlation part of TPSS.
>
> 2. By skipping the TPSS correlation call, I could manage to converge the SCF.
> However, the results using only TPSS exchange for both LibXC and the native
> implementation are different.
>
> 2. Getting rid of the 1/2 factor in tau (and the corresponding 1/2 factor in
> v3x) yields essentially the same result for LibXC and the native implementation
> using only TPSS exchange.
>
> 3. Getting rid of the 1/2 factor allows to use of LibXC TPSS correlation.
> Furthermore, both the LibXC and the native implementation yield the same result.
>
> 4. From my work with LibXC with other codes, I know that this interface can be
> rather tricky. In order to further stabilize the PWSCF and LibXC interface I
> added the same density threshold as in the native case, namely, skipping the
> computation of the potential when the density gets below 1.0E-10 a.u.
>
>
> Note that the 1/2 factor appear in all calls to LibXC meta-GGA potentials, so it
> should be corrected for all functionals.
>
>
>
> I hope that my explanation is not too cumbersome. I'm also attaching the input
> file I'm using (C.in) and the output files for the native (C.out) and the
> corrected LibXC implementation (C.out.2).
>
> If you have further questions, please do not hesitate to ask.
>
>
>
> */Daniel Mejia Rodriguez/
>
> Postdoctoral Associate
> QTP Department of Physics*
> University of Florida
> 2302 New Physics Building
> Gainesville, FL 32611
> (352)392-9227
>
>
> _______________________________________________
> Q-e-developers mailing list
> Q-e-developers at qe-forge.org
> http://qe-forge.org/mailman/listinfo/q-e-developers
>
More information about the developers
mailing list