[Pw_forum] Making density matrix in sum_band subroutine
Paolo Giannozzi
giannozz at nest.sns.it
Tue Jan 15 10:22:53 CET 2008
On Jan 15, 2008, at 9:26 , Min Seung Kyu wrote:
> Looking in 'sum_band_gamma' subroutine in 'sum_band.f90', this
> subroutine
> does two FFTs at the same time [...]
> I changed above lines into below [...]
> But I failed to reproduce charge densities.
in the "gamma" case, i.e. k=0, the eigenvectors are real in real space.
Thus only half of the plane waves are stored, because \psi(-G)=\psi*(G).
In the FFT array, you need all of them. So you need
psic(nls(igk(1:npw))) = evc(1:npw,ibnd)
AND
psic(nlsm(igk(1:npw))) = CONJG(evc(1:npw,ibnd))
(the G=0 is copied twice but since \psi(0) is real it doesn't matter)
P.
---
Paolo Giannozzi, Dept of Physics, University of Udine
via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222
More information about the users
mailing list