[Q-e-developers] Bug in meta-GGA interface with LIBXC

Mejia Rodriguez, Daniel dmejiarodriguez at ufl.edu
Sat Nov 11 06:37:30 CET 2017


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20171111/af5ad929/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: C.in
Type: application/octet-stream
Size: 473 bytes
Desc: C.in
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20171111/af5ad929/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: C.out
Type: application/octet-stream
Size: 9269 bytes
Desc: C.out
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20171111/af5ad929/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: C.out.2
Type: application/octet-stream
Size: 9637 bytes
Desc: C.out.2
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20171111/af5ad929/attachment-0002.obj>


More information about the developers mailing list