<div dir="ltr"><div>Thank you. The bug you mention is fixed in v6<br><br></div>Paolo<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 28, 2016 at 12:17 AM, Polanco, Carlos A. <span dir="ltr"><<a href="mailto:polancogarca@ornl.gov" target="_blank">polancogarca@ornl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Dear developers:<br>
</p>
<p><br>
</p>
<p>I was digging into the code that generates the phonon frequencies from the real space force constants and I think a found a little bug.<br>
</p>
<p><br>
</p>
<p>I have the set of files that you get when you download quantum espresso 5.4.0<br>
</p>
<p><br>
</p>
<p>The bug is in line 536 of matdyn.f90 (which is on PHonon/PH)<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(131,148,150);background-color:rgb(1,43,54)">
<span style="color:#bcba34"> 534 </span><span> </span><span style="color:#bcba34">IF</span><span>(na_ifc)
</span><span style="color:#bcba34">THEN</span></p>
<p style="margin-right:0px;margin-left:0px;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(131,148,150);background-color:rgb(1,43,54)">
<span style="color:#bcba34"> 535 </span><span> </span></p>
<p style="margin-right:0px;margin-left:0px;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(131,148,150);background-color:rgb(1,43,54)">
<span style="color:#bcba34"> 536 </span><span> qq</span><span style="color:#bcba34">=</span><span style="color:#46c8d5">sqrt</span><span>(q(</span><span style="color:#dd4f33">1</span><span>,n)</span><span style="color:#bcba34">**</span><span style="color:#dd4f33">2</span><span style="color:#bcba34">+</span><span>q(</span><span style="color:#dd4f33">2</span><span>,n)</span><span style="color:#bcba34">**</span><span style="color:#dd4f33">2</span><span style="color:#bcba34">+</span><span>q(</span><span style="color:#dd4f33"><wbr>3</span><span>,n)</span><span style="color:#bcba34">**</span><span style="color:#dd4f33">3</span><span>)
</span></p>
<p style="margin-right:0px;margin-left:0px;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(131,148,150);background-color:rgb(1,43,54)">
<span style="color:#bcba34"> 537 </span><span> </span><span style="color:#bcba34">if</span><span>(qq
</span><span style="color:#bcba34">==</span><span> </span><span style="color:#dd4f33">0.0</span><span>) qq</span><span style="color:#bcba34">=</span><span style="color:#dd4f33">1.0</span><span> </span></p>
<p style="margin-right:0px;margin-left:0px;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(131,148,150);background-color:rgb(1,43,54)">
<span style="color:#bcba34"> 538 </span><span> qhat(</span><span style="color:#dd4f33">1</span><span>)</span><span style="color:#bcba34">=</span><span>q(</span><span style="color:#dd4f33">1</span><span>,n)</span><span style="color:#bcba34">/</span><span>qq
</span></p>
<p style="margin-right:0px;margin-left:0px;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(131,148,150);background-color:rgb(1,43,54)">
<span style="color:#bcba34"> 539 </span><span> qhat(</span><span style="color:#dd4f33">2</span><span>)</span><span style="color:#bcba34">=</span><span>q(</span><span style="color:#dd4f33">2</span><span>,n)</span><span style="color:#bcba34">/</span><span>qq
</span></p>
<p style="margin-right:0px;margin-left:0px;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(131,148,150);background-color:rgb(1,43,54)">
<span style="color:#bcba34"> 540 </span><span> qhat(</span><span style="color:#dd4f33">3</span><span>)</span><span style="color:#bcba34">=</span><span>q(</span><span style="color:#dd4f33">3</span><span>,n)</span><span style="color:#bcba34">/</span><span>qq
</span></p>
<p style="margin-right:0px;margin-left:0px;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(131,148,150);background-color:rgb(1,43,54)">
<span style="color:#bcba34"> 541 </span><span> </span></p>
<p style="margin-right:0px;margin-left:0px;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(131,148,150);background-color:rgb(1,43,54)">
<span style="color:#bcba34"> 542 </span><span> </span><span style="color:#46c8d5">CALL</span><span> nonanal_ifc (nat,nat_blk,itau_blk,epsil,<wbr>qhat,zeu,omega,dyn,
</span><span style="color:#bcba34">&</span></p>
<p style="margin-right:0px;margin-left:0px;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(131,148,150);background-color:rgb(1,43,54)">
<span style="color:#bcba34"> 543 </span><span> nr1, nr2, nr3,f_of_q) </span></p>
<p style="margin-right:0px;margin-left:0px;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(131,148,150);background-color:rgb(1,43,54)">
<span style="color:#bcba34"> 544 </span><span> </span><span style="color:#bcba34">END IF</span><span>
</span></p>
<p><br>
</p>
<p>qq is the norm of the q vector. Note that q(3,n) is to the power 3 instead of 2.<br>
</p>
<p><br>
</p>
<p>Best,<br>
</p>
<p>Carlos<br>
</p>
<p><br>
</p>
</div>
<br>______________________________<wbr>_________________<br>
Q-e-developers mailing list<br>
<a href="mailto:Q-e-developers@qe-forge.org">Q-e-developers@qe-forge.org</a><br>
<a href="http://qe-forge.org/mailman/listinfo/q-e-developers" rel="noreferrer" target="_blank">http://qe-forge.org/mailman/<wbr>listinfo/q-e-developers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,<br>Univ. Udine, via delle Scienze 208, 33100 Udine, Italy<br>Phone +39-0432-558216, fax +39-0432-558222<br><br></div></div></div></div></div>
</div>