Thank you nick, that saves me.<br><br><div class="gmail_quote">On Mon, Mar 31, 2008 at 2:14 PM, Nicholas E. Singh-Miller <<a href="mailto:nedward@mit.edu">nedward@mit.edu</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Wei,<br>
<br>
from v_of_rho.f90<br>
...<br>
     !<br>
     ehart = ehart + ( rgtot_re**2 + rgtot_im**2 ) * fac<br>
     !<br>
     aux1(1,ig) = rgtot_re * fac<br>
     aux1(2,ig) = rgtot_im * fac<br>
     !<br>
...<br>
<br>
the potential in Fourier space is being stored in the array "aux1".<br>
<br>
"ehart" is the Hartree energy term that is later used in the<br>
determination of "etot":<br>
<br>
etot    = eband + ( etxc - etxcc ) + ewld + ehart + deband + demet<br>
<br>
hope that helps,<br>
<br>
Nick<br>
<div><div></div><div class="Wj3C7c"><br>
On Mon, 2008-03-31 at 13:57 -0400, willy kohn wrote:<br>
> Hi, every one:<br>
><br>
> I'm new to the field of DFT self-consistent calculation and now<br>
> reading the pwscf code. I have been very puzzled for awhile on the<br>
> calculation of the hartree potential which is in the subroutine 'v_h'<br>
> of file 'v_of_rho.f90'. In the literature, v_hartree(G) = rho(G)/G^2,<br>
> but in the subroutine, it seems v_hartree(G) = |rho(G)|^2/G^2.<br>
><br>
> Anyone can tell me what is going on here? Did I understand the formula<br>
> correctly?<br>
><br>
><br>
> Best,<br>
><br>
> Wei<br>
</div></div>> _______________________________________________<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>
--<br>
*****************************************<br>
Nicholas E. Singh-Miller<br>
Ph.D. Candidate<br>
Prof. Marzari Group (<a href="http://quasiamore.mit.edu" target="_blank">quasiamore.mit.edu</a>)<br>
Materials Science and Engineering<br>
Massachusetts Institute of Technology<br>
13-4066<br>
(617)324-0372<br>
*****************************************<br>
<br>
_______________________________________________<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>
</blockquote></div><br>