[Pw_forum] Wave function to charge density

Dmitry Korotin dkorotin at gmail.com
Wed Dec 12 14:18:07 CET 2007


Dear ESPRESSO developers,
Could you explain me meaning and usage on nls(), nl() and igk()
arrays? Or, please answer on my concrete question:
I have some Wannier-function stored in array wf(1:npwx). The order of
plane waves in the array index is the same that used for evc() array.
Now I want to generate charge density of my Wannier-function in
G-space and add it to the total charge density in the cell (I can do
it in the routine electrons() before charge densities mixing).

It is clear that rho_{g,g'} = \sum_k wk*wf(g)*wf^{*}(g')
But how to convert this square array to linear array rhognew(ngm) form
used in the code (file electrons.f90)?

I know that my question is strongly technical, and, I think, not
interesting for other community members, but I have no other place to
ask.

Thank you in advance,
Dmitry Korotin
PhD student,
Institute of Metal Physics,
Ural branch of RAS,
Russia



More information about the users mailing list