<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Dear Dominik,</p>
<p><br>
</p>
<p>This is the first time that I hear about negative Ueff. What I would do, I would just compute Ueff from first principles using the hp.x code of Quantum ESPRESSO: </p>
<h5 class="pub-info" style="box-sizing: border-box; margin: 0.2rem 0px 15px; padding: 0px; color: rgb(85, 85, 85); font-family: "Proxima Nova", "Helvetica Neue", Helvetica, Helvetica, Arial, sans-serif; font-weight: 400; line-height: 1; text-rendering: optimizeLegibility; font-size: 1.14286rem;">
Phys. Rev. B <span style="box-sizing: border-box; font-weight: 700; line-height: inherit;">98</span>, 085127 (2018).</h5>
<div><br>
</div>
<div>Best regards,</div>
<div>Iurii</div>
<div><br>
</div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif;">P.S.: Please do not forget to add your affiliation when posting to the pw_forum.</span><br>
</div>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<font size="3" face="'Times New Roman', Times, serif" color="808080">--<br>
Dr. Iurii Timrov<br>
Postdoctoral Researcher<br>
<font color="808080"><font face="'Times New Roman', Times, serif"></font></font></font></div>
<font color="808080"></font>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<font size="3" face="'Times New Roman', Times, serif" color="808080">STI - IMX <font color="808080">
<font face="'Times New Roman', Times, serif">- THEOS</font></font></font><font size="3" face="'Times New Roman', Times, serif" color="808080"> and NCCR - MARVEL<br>
</font></div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<font size="3" face="'Times New Roman', Times, serif" color="808080"><font size="3" face="'Times New Roman', Times, serif" color="808080">Swiss Federal Institute of Technology Lausanne (EPFL<font color="808080"><font face="'Times New Roman', Times, serif">)</font></font></font><br>
</font></div>
<font color="808080"></font>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<font size="3" face="'Times New Roman', Times, serif" color="808080">CH-1015 Lausanne, Switzerland<br>
+41 21 69 34 881</font></div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<a href="http://people.epfl.ch/265334" tabindex="0" id="LPNoLP">http://people.epfl.ch/265334</a><br>
</div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<br>
</div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<br>
</div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> users <users-bounces@lists.quantum-espresso.org> on behalf of Dominik Gresch <greschd@gmx.ch><br>
<b>Sent:</b> Tuesday, October 8, 2019 2:43:58 PM<br>
<b>To:</b> users@lists.quantum-espresso.org<br>
<b>Subject:</b> [QE-users] Negative dr2 error in DFT+U</font>
<div> </div>
</div>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Dear QE community,</div>
<div> </div>
<div>I am trying to run DFT+U calculations (lda_plus_u_kind=0) with a negative Ueff = U - J. However, this frequently results in the following error being raised:</div>
<div>
<p><span style="font-size:11pt"><span style="background:white"><span style="font-family:"Calibri",sans-serif"><span style="font-size:10.0pt"><span style="background:white"><span style="font-family:Consolas"><span style="color:#383a42">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
     Error in routine mix_rho (1):<br>
     negative dr2<br>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span></span></span></span></span></span></span></p>
<p>I have traced this to the <span style="font-size:10.5pt"><span style="font-family:Consolas">ns_ddot</span></span> function
<span style="font-size:10.5pt"><span style="font-family:"Calibri",sans-serif">in </span></span><span style="font-size:10.0pt"><span style="background:white"><span style="font-family:Consolas"><span style="color:black">PW/src/scf_mod.f90</span></span></span></span>,
 which calculates a contribution to dr2 from the Hubbard term. Due to the negative U, this value also becomes negative. Consequently, the error can be avoided by changing <span style="font-size:11.0pt"><span style="font-family:Consolas">Hubbard_U(nt)</span></span> <span style="font-size:11.0pt"><span style="font-family:"Calibri",sans-serif">to </span></span><span style="font-size:11.0pt"><span style="font-family:Consolas">ABS(Hubbard_U(nt))</span></span>
 in this function (in two places).</p>
<p>My question is this:</p>
<p>- Does this change make sense, or is the sign of ns_ddot relevant?</p>
<p>- Does it make sense physically to use negative U? These are empirical values, to match a known band structure.</p>
<p>Thank you and best regards,</p>
<p>Dominik Gresch</p>
</div>
</div>
</div>
</body>
</html>