<div dir="ltr"><div>Dear Fabio,</div><div>I added some lines in the attached file 'Modules/xc_mgga_drivers.f90' so that, by replacing it with the original one, you should be able to set the c parameter in tb09. You can do it directly into that module by setting the initial value of cc_param or in any part of the program by calling the routine 'set_cc_for_tb09(xx)' (but in case you may need to adjust the module dependencies).</div><div>Before the compilation you need to add the '-lxcf03' in LD_LIBS in the make.inc file</div><div>Hope it helps,</div><div>Fabrizio<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 6, 2019 at 8:36 PM Fabio Costa <<a href="mailto:fabiocosta4@hotmail.com">fabiocosta4@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Dear users and developers</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
After some more attempts to use the TB09 functional, I ended up finding this previous post: <a href="https://lists.quantum-espresso.org/pipermail/users/2019-April/042619.html" id="gmail-m_-1846458044245260968LPlnk619023" target="_blank">https://lists.quantum-espresso.org/pipermail/users/2019-April/042619.html</a> ,
and after changing v_of_rho.f90, the code is now able to end without any error.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
In my attempts, I'm performing the calculations as an initial scf run with a PBE pseudopotencial, and then another scf run, now with restart_mode = 'restart' and input_dft = 'MGGA_X_TB09'. By following this procedure, as described in E. Germaneau's paper, the
calculations do converge.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The issue now is that the gap energies I'm finding are very large. For example, for silicon, the calculations result in a 2.8 eV gap, larger even than the results presented in the paper, where the values ranged between 1.9 to 2.3. Despite the large gaps, the
band structure and DOS agree well with the ones obtained with PBE.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Is there any way to improve these results. My first guess is to adjust the "c" parameter in the mBJ functional. After some searching through the routines and Libxc files, I'm still clueless on how to proceed on this matter.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Any further suggestions will be much appreciated</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thank you</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Fábio Costa</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="gmail-m_-1846458044245260968appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-1846458044245260968divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>De:</b> users <<a href="mailto:users-bounces@lists.quantum-espresso.org" target="_blank">users-bounces@lists.quantum-espresso.org</a>> em nome de Fabio Costa <<a href="mailto:fabiocosta4@hotmail.com" target="_blank">fabiocosta4@hotmail.com</a>><br>
<b>Enviado:</b> segunda-feira, 14 de outubro de 2019 13:10<br>
<b>Para:</b> <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a> <<a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a>><br>
<b>Assunto:</b> [QE-users] On the use of the modified Becke-Johnson (TB09) functional</font>
<div> </div>
</div>
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Dear all</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I'm having some difficulties to work with the TB09 functional. After some reading, I found in some old posts that this can be done by compiling QE with Libxc, and by adding the line 'input_dft='tb09'' in the pw.x input.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
When I try to use this functional, the scf calculation always ends like this:</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
total energy = NaN Ry Harris-Foulkes estimate = -11.24358313 Ry estimated scf accuracy < 0.01858366 Ry iteration # 18 ecut= 120.00 Ry beta= 0.10 Davidson diagonalization with overlap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Error in routine cdiaghg (7): eigenvectors failed to converge %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">What draws my attention is that always in the last cycle before the error the total energy is printed as NaN. The parameters to the calculation seem to be fine, as it ends
smoothly without the input_dft line.</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div><font size="3" face="Calibri, Helvetica, sans-serif" color="#000000">By searching in the QE user guide, there is a reference to the work of E. Germaneau, which lead me to his paper
<font face="Calibri, Helvetica, sans-serif" color="#000000"><font size="3"><span style="font-size:12pt;line-height:normal">(</span></font></font><span style="margin:0px;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(136,136,136);text-align:left;display:inline;line-height:normal">DOI:</span><span style="margin:0px;font-family:Roboto,Arial,sans-serif;font-size:12px;color:rgb(136,136,136);text-align:left;display:inline"><span style="margin:0px;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;line-height:normal"> </span></span><span style="margin:0px;font-family:Calibri,Helvetica,sans-serif;font-size:12px;outline:currentcolor none medium;background-image:none;text-align:left;display:inline"><a href="http://dx.doi.org/10.1016/j.cpc.2013.02.020" rel="noopener" style="margin:0px;font-family:Roboto,Arial,sans-serif;outline:currentcolor none medium;background-image:none;display:inline" target="_blank"><span style="font-size:12pt;line-height:normal">10.1016/j.cpc.2013.02.020</span></a></span><span style="margin:0px;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;outline:currentcolor none medium;background-image:none;text-align:left;display:inline;line-height:normal">)</span>,
where the results of his implementation are presented. Even </font><font face="Calibri, Helvetica, sans-serif" color="#000000"><span>though, it is unclear to me how to use the functional </span></font><font face="Calibri, Helvetica, sans-serif" color="#000000">correctly.<font size="3"> </font></font></div>
<div><br>
</div>
<div><font size="3" face="Calibri, Helvetica, sans-serif" color="#000000"><span>Thanks for any assistance</span></font></div>
<div><font size="3" face="Calibri, Helvetica, sans-serif" color="#000000"><span>Fábio Costa</span></font></div>
</div>
</div>
_______________________________________________<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu/quantum-espresso" rel="noreferrer" target="_blank">www.max-centre.eu/quantum-espresso</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a></blockquote></div>