<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><tt>Hi Daniel,</tt></p>
<p><tt><br>
</tt></p>
<p><tt>Thanks for reporting the issue. </tt><tt><tt>I think it is
going to be fixed soon (if not fixed yet) in the trunk. </tt>
We spotted this issue before when we were incorporating the SCAN
functional and had submitted a patch to fix it. We are attaching
the patch (meant for svn revision r13448) with this email if you
are interested, this patch allows one to do the following meta-GGA
calculation:</tt></p>
<p><tt><br>
</tt></p>
<p><tt>1. PW:<br>
- SCF calculation for both spin-unpolarized and spin-polarized
calculations<br>
- Structure optimization (fix cell)</tt><tt> for both
spin-unpolarized and spin-polarized calculations<br>
- Variable cell optimization with only spin-unpolarized
calculations.<br>
2. CP:<br>
- electron/ion minimization (and MD) </tt><tt><tt>for both
spin-unpolarized and spin-polarized calculations</tt><br>
</tt><tt><tt> - variable cell MD for spin-unpolarized cases.</tt></tt></p>
<p><tt><tt><br>
</tt></tt></p>
<p><tt><tt>The spin-polarized implementation and the PW part of the
patch was done by Marcos F. Calegari Andrade (cc'd) in Prof.
Annabella Selloni's group (Princeton).</tt></tt></p>
<p><tt><tt><br>
</tt></tt></p>
<p><tt><tt>Another note about the meta-GGA is that sometimes
diagonalization = 'david' is not stable (could converge to
wrong energy in the case of ice) since one has orbital-dependent
Vxc. We think the using </tt></tt><tt><tt><tt><tt>diagonalization
= 'cg' may be more appropriate. In case of CP, the
electronic structure is stable because it is minimized by
fictitious orbital damp dynamics which takes into account
of the orbital-dependent Vxc naturally in the
extrapolation. </tt></tt> </tt></tt></p>
<p><tt><tt><br>
</tt></tt></p>
<p><tt><tt>Best,<br>
Hsin-Yu<br>
</tt></tt></p>
<br>
<div class="moz-cite-prefix">On 11/11/17 00:37, Mejia Rodriguez,
Daniel wrote:<br>
</div>
<blockquote type="cite" cite="mid:1510378650255.68376@ufl.edu">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
<p>Dear QE developers,</p>
<p><br>
</p>
<p>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.</p>
<div><br>
</div>
<div>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.<br>
</div>
<div>As far as I understand the code, that factor should not be
present.<br>
</div>
<div><br>
</div>
<div>I kept digging into the code and found the following:</div>
<div><br>
</div>
<div>1. The NaNs were coming from the correlation part of TPSS. </div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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.<br>
</div>
<div><br>
</div>
<div>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.<br>
</div>
<div><br>
</div>
<div>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.<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Note that the 1/2 factor appear in all calls to LibXC
meta-GGA potentials, so it should be corrected for all
functionals.<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>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). <br>
</div>
<div><br>
</div>
<div>If you have further questions, please do not hesitate to ask.<br>
</div>
<p><br>
</p>
<p><br>
</p>
<div id="Signature">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:; margin:0" name="divtagdefaultwrapper">
<font size="3" face="Times,'Times New Roman',Serif"><font
color="#000000"><b><i>Daniel Mejia Rodriguez</i><br>
<font size="2"><br>
Postdoctoral Associate<br>
Q<font face="Times,'Times New Roman',Serif">TP <font
face="Times,'Times New Roman',Serif">
Department of Physics</font></font></font></b></font><font
size="2"><br>
University of Florida<br>
<font face="Times,'Times New Roman',Serif">2302 New
Physics Building<br>
<font face="Times,'Times New Roman',Serif">Gainesville,
FL 32611</font><br>
</font>(352)<font face="Times,'Times New Roman',Serif"> </font>392-9227</font></font><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Q-e-developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Q-e-developers@qe-forge.org">Q-e-developers@qe-forge.org</a>
<a class="moz-txt-link-freetext" href="http://qe-forge.org/mailman/listinfo/q-e-developers">http://qe-forge.org/mailman/listinfo/q-e-developers</a>
</pre>
</blockquote>
<br>
</body>
</html>