[Pw_forum] fft 3D

Fang Liu cufe.fliu at gmail.com
Thu May 16 19:18:43 CEST 2013


Dear Paolo,

Thank you very much for your quick reply.

>
> > In real space, the wavefunction is a real vector.
>
> only for k=0 or if there is inversion symmetry
>

Yes. I'm only considering the case k=0 at this moment.

>
> > I want to write some code using 3D fft (forward and backward)
> > in Quantum Espresso for general complex vector (stored in 3D
> > array)
>
> I am not sure I understand what you want to do: the 3D FFT in
> QE is quite general.
>
> _______________________________________________
>
> I tried the following test codes in QE.
That is, I use a 25*25*25 3D FFT mesh. The original 3d array g3d = (1.0_DP,
-1.0_DP).
First I do invfft and then fwfft. Finally I don't get the original 3d
array, but a 3d array g3dnew
 in which g3dnew(1),g3dnew(2),...,g3dnew(3025)= (1.0_DP, -1.0_DP)
while g3dnew(3026),....,g3dnew(15625)=0.0.

But if I do fwfft first and then invfft, I can finally get the original 3d
array.

I don't know the reason. I tried to attach my results, but it seems too
large to be sent
quickly. So I cancelled it.

Thank you very much.

===========
     open(UNIT=73, FILE='g3d.log',STATUS='replace', FORM='formatted',
ACTION='write')

    g3d = (1.0_DP, -1.0_DP)
    write(73,*), 'g3d: original'
    do i=1, dffts%nnr
       write(73,101), i, g3d(i)
    enddo


    CALL invfft ('Wave', g3d, dffts) !transform potential to real space

    write(73,*), 'g3d: after invfft'
    do i=1, dffts%nnr
       write(73,101), i, g3d(i)
    enddo

    CALL fwfft ('Wave', g3d, dffts) !transform potential to reciprocal space

    write(73,*), 'g3d: after fwfft'
    do i=1, dffts%nnr
       write(73,101), i, g3d(i)
    enddo

    close(73)
==============

Best,
Fang


2013/5/16 Paolo Giannozzi <paolo.giannozzi at uniud.it>

> On Wed, 2013-05-15 at 16:45 -0700, Fang Liu wrote:
>
> > In real space, the wavefunction is a real vector.
>
> only for k=0 or if there is inversion symmetry
>
> > I want to write some code using 3D fft (forward and backward)
> > in Quantum Espresso for general complex vector (stored in 3D
> > array)
>
> I am not sure I understand what you want to do: the 3D FFT in
> QE is quite general.
>
> P.
> --
>  Paolo Giannozzi, Dept. Chemistry&Physics&Environment,
>  Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
>  Phone +39-0432-558216, fax +39-0432-558222
>
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://pwscf.org/mailman/listinfo/pw_forum
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20130517/99386def/attachment.html>


More information about the users mailing list