[Pw_forum] Correlated wave-function in real space

Paolo Giannozzi giannozz at democritos.it
Wed Sep 2 16:30:15 CEST 2009


Andreas Linscheid wrote:

> Is it correct that
> 1. The 3D real space vector R in lattice coordinates, that corresponds 
>     to ir, where
>     ir = k + (j-1)*nrx3s +(i-1)*nrx3s*nrx2s

ir = i + (j-1)*nrx1s+(k-1)*nrx1s*nrx2s

>     is
>     R(1) = DBLE(i)/DBLE(nrx1s)
>     R(2) = DBLE(j)/DBLE(nrx2s)
>     R(3) = DBLE(k)/DBLE(nrx3s)

   R(1)= DBLE(i-1)/DBLE(nr1s)
   R(2)= DBLE(j-1)/DBLE(nr2s)
   R(3)= DBLE(k-1)/DBLE(nr3s)

>     ? (I am using nrx1s instead of nr1s on purpose!)

me too

> 2. Is it correct, that the 3D vector to the same index ir in karthesian   
> coordinates is
>     R(:) = DBLE(i)/DBLE(nrx1s)*at(:,1) + DBLE(j)/DBLE(nrx2s)*at(:,2) + 
> DBLE(k)/DBLE(nrx3s)*at(:,3)
> ? (I think in FAQ, this is described with nr3s,)

   R(:) = DBLE(i-1)/DBLE(nr1s)*at(:,1) +
          DBLE(j-1)/DBLE(nr2s)*at(:,2) +
          DBLE(k-1)/DBLE(nr3s)*at(:,3)

> 3. Can I take this vector (for example in lattice coords) and add
> R(:) = R(:) + S(:)

only if S(:) connects points of the real-space grid.
If not, the translation must be done in reciprocal space.

> map back to first unit cell
> R(:) = R(:)-nint(R(:))
> and map it back onto the real space FFT grid point (i_n,j_n,k_n):
> i_n =nint(nrx1s*R(1)) + 1
> j_n =nint(nrx2s*R(2)) + 1
> k_n =nint(nrx3s*R(3)) + 1

   i_n =nint(nr1s*R(1)) + 1
   j_n =nint(nr2s*R(2)) + 1
   k_n =nint(nr3s*R(3)) + 1

> What then has the the 1D index:
> ir_n = k_n + (j_n-1)*nrx3s +(i_n-1)*nrx3s*nrx2s

ir_n = i_n + (j_n-1)*nrx1s+(k_n-1)*nrx1s*nrx2s

P.
-- 
Paolo Giannozzi, Democritos and University of Udine, Italy



More information about the users mailing list