Hi,<br><br>The snippet of code in compute_dip.f90 I changed is as following<br><br>! rijk(ipol) = REAL(i1,dp)*at(ipol,1)*deltax + &<br>! REAL(j1,dp)*at(ipol,2)*deltay + &<br>! REAL(k11,dp)*at(ipol,3)*deltaz<br>
rijk(ipol) = (REAL(i,dp)-1.d0)*at(ipol,1)*deltax + &<br> (REAL(j,dp)-1.d0)*at(ipol,2)*deltay + &<br> (REAL(k,dp)-1.d0)*at(ipol,3)*deltaz<br><br>It works in my test of water. Someone who understands the code thoroughly should proof the change.<br>
<br>Aihua<br><br><div class="gmail_quote">On Wed, Mar 11, 2009 at 9:38 AM, Lorenzo Paulatto <span dir="ltr"><<a href="mailto:paulatto@sissa.it">paulatto@sissa.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, 11 Mar 2009 05:24:38 +0100, Aihua Zhang <<a href="mailto:zah7903@gmail.com">zah7903@gmail.com</a>> wrote:<br>
> The second possible bug is in compute_dip.f90, where r and r in rho(r)<br>
> seem dismatch when calculating the electronic dipole. After matching r with<br>
> rho(r) in the code, the reasonable identical results are obtains, i.e.<br>
> the calculated dipole and total energy are independent of where the molecule<br>
> is put in the supercell.<br>
<br>
</div>Good job Aihua Zhang!<br>
Could you please provide more information on this bug, so it can be fixed mainstream?<br>
I have long suspected a bug in that part, and I know at least another person who's working on it at the moment, as far as I know with no luck.<br>
<br>
cheers<br>
<br>
--<br>
Lorenzo Paulatto<br>
SISSA & DEMOCRITOS (Trieste)<br>
phone: +39 040 3787 511<br>
skype: paulatz<br>
www: <a href="http://people.sissa.it/%7Epaulatto/" target="_blank">http://people.sissa.it/~paulatto/</a><br>
<br>
*** save italian brains ***<br>
<a href="http://saveitalianbrains.wordpress.com/" target="_blank">http://saveitalianbrains.wordpress.com/</a><br>
<div><div></div><div class="h5">_______________________________________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>
<a href="http://www.democritos.it/mailman/listinfo/pw_forum" target="_blank">http://www.democritos.it/mailman/listinfo/pw_forum</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>------------------------------------------------------------------<br>Research Fellow,<br>Dept. of Physics, National Univ. of Singapore<br>10 Kent Ridge Crescent, Singapore, 119260<br>
Tel: +65 6516 7844<br>------------------------------------------------------------------<br><br>