The Elk Code
writevclr.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2019 T. Mueller, J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 subroutine writevclr
7 use modmain
8 use modulr
9 implicit none
10 ! local variables
11 integer i1,i2,i3,ir
12 ! automatic arrays
13 real(8) vclr(nqpt)
14 ! Fourier transform external Coulomb potential from Q-space to real-space
15 call rzfftifc(3,ngridq,1,vclr,vclq)
16 ! write the real-space potential to file
17 open(50,file='VCLR.OUT',form='FORMATTED')
18 write(50,'(3I6," : grid size")') ngridq
19 ir=0
20 do i3=1,ngridq(3)
21  do i2=1,ngridq(2)
22  do i1=1,ngridq(1)
23  ir=ir+1
24  write(50,'(3I6,G18.10)') i1,i2,i3,vclr(ir)
25  end do
26  end do
27 end do
28 close(50)
29 end subroutine
30 
subroutine writevclr
Definition: writevclr.f90:7
complex(8), dimension(:), allocatable vclq
Definition: modulr.f90:66
integer, dimension(3) ngridq
Definition: modmain.f90:515
subroutine rzfftifc(nd, n, sgn, r, z)
Definition: modulr.f90:6