The Elk Code
Loading...
Searching...
No Matches
readvclr.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
readvclr
7
use
modmain
8
use
modulr
9
implicit none
10
! local variables
11
integer
i1,i2,i3,ir
12
integer
ngridq_(3),i1_,i2_,i3_
13
! automatic arrays
14
real
(8) vclr(nqpt)
15
! read the real-space external Coulomb potential from file
16
open
(50,file=
'VCLR.OUT'
,form=
'FORMATTED'
)
17
read
(50,*) ngridq_(1:3)
18
if
(any(
ngridq
(1:3) /= ngridq_(1:3)))
then
19
write
(*,*)
20
write
(*,
'("Error(readvclr): differing ngridq")'
)
21
write
(*,
'(" current : ",3I6)'
)
ngridq
22
write
(*,
'(" VCLR.OUT : ",3I6)'
) ngridq_
23
write
(*,*)
24
stop
25
end if
26
ir=0
27
do
i3=1,
ngridq
(3)
28
do
i2=1,
ngridq
(2)
29
do
i1=1,
ngridq
(1)
30
ir=ir+1
31
read
(50,*) i1_,i2_,i3_,vclr(ir)
32
if
((i1 /= i1_).or.(i2 /= i2_).or.(i3 /= i3_))
then
33
write
(*,*)
34
write
(*,
'("Error(readvclr): differing i1, i2 or i3")'
)
35
write
(*,
'(" current : ",3I6)'
) i1,i2,i3
36
write
(*,
'(" VCLR.OUT : ",3I6)'
) i1_,i2_,i3_
37
write
(*,*)
38
stop
39
end if
40
end do
41
end do
42
end do
43
close
(50)
44
! Fourier transform external Coulomb potential from real-space to Q-space
45
call
rzfftifc
(3,
ngridq
,-1,vclr,
vclq
)
46
end subroutine
47
modmain
Definition
modmain.f90:6
modmain::ngridq
integer, dimension(3) ngridq
Definition
modmain.f90:515
modulr
Definition
modulr.f90:6
modulr::vclq
complex(8), dimension(:), allocatable vclq
Definition
modulr.f90:65
readvclr
subroutine readvclr
Definition
readvclr.f90:7
rzfftifc
subroutine rzfftifc(nd, n, sgn, r, z)
Definition
zfftifc_fftw.f90:32
readvclr.f90
Generated by
1.9.8