<html><head></head><body><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></body></html>