[Pw_forum] charge density and pot file

Lilia Boeri L.Boeri at fkf.mpg.de
Tue Oct 11 17:41:01 CEST 2005


dear Paolo,

thanks a lot for your response. What confused me a little bit was actually 
the format in 
which the variables are stored. 
In particular, I have problems in locating which part of the code attaches 
and index "ig" to a particular plane wave: i.e. how is the index i related 
to ix, iy,iz?
thanks a lot in advance,
Lilia

On Tue, 11 Oct 2005, Paolo Giannozzi wrote:

> On Monday 10 October 2005 13:50, Lilia Boeri wrote:
> 
> > I would be interested in obtaining the potential/density 
> > file in G-space instead of r-space. Has anybody faced/solved
> > the same problem before? 
> 
> it is not really a new problem: converting from G- to r-space is
> done all the time in the code. You need to know how data is 
> stored and organized, though, or else you may adopt the "monkey 
> technique": find a piece of code that does what you need and
> copy it. A good place to look at and to modify could be routine 
> PP/chdens.f90, where you do not need to consider the k=0
> and the parallel case. Basically you need to copy the (real) 
> charge density in real space to a complex array, make the fft, 
> then re-order the array:
> 
>   psic(:) = DCMPLX (rhor(:), 0.d0)
>   call cft3 (psic, nr1, nr2, nr3, nrx1, nrx2, nrx3, - 1)
>   allocate (rhog( ngm))
>   rhog (:) = psic (nl (:) )
> 
> rhog(i), i=1, ngm, should contain the Fourier component for 
> G = g(:,i) (2pi/a units) whose norm is gg(i) ( (2pi/a)^2 units)
> 
> Paolo
> 
> -- 
> Paolo Giannozzi             e-mail:  giannozz at nest.sns.it
> Scuola Normale Superiore    Phone:   +39/050-509876, Fax:-563513 
> Piazza dei Cavalieri 7      I-56126 Pisa, Italy
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum
> 



More information about the users mailing list