Hi, every one:<br><br>I&#39;m new to the field of DFT self-consistent calculation and now reading the pwscf code. I have been very puzzled for awhile on the calculation of the hartree potential which is in the subroutine &#39;v_h&#39; of file &#39;v_of_rho.f90&#39;. In the literature, v_hartree(G) = rho(G)/G^2, 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 correctly?<br><br><br>Best,<br><br>Wei<br>