The Elk Code
writegclq.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2002-2005 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 !BOP
7 ! !ROUTINE: writegclq
8 ! !INTERFACE:
9 subroutine writegclq
10 ! !USES:
11 use modmain
12 ! !DESCRIPTION:
13 ! Outputs the volume-averaged integral of $4\pi/q^2$ in the small
14 ! parallelepiped around each discrete $q$-point to the file {\tt GCLQ.OUT}.
15 ! These represent the regularised Coulomb Green's function in reciprocal
16 ! space for small $q$. See the routine gengclq.
17 !
18 ! !REVISION HISTORY:
19 ! Created June 2005 (JKD)
20 !EOP
21 !BOC
22 implicit none
23 ! local variables
24 integer iq
25 real(8) t1
26 open(50,file='GCLQ'//trim(filext),form='FORMATTED',action='WRITE')
27 write(50,'(I6," : nqpt; q-point, vql, gclq, 4π/q² below")') nqpt
28 do iq=1,nqpt
29  t1=merge(fourpi/qc(iq)**2,0.d0,qc(iq) > 1.d-12)
30  write(50,'(I6,5G18.10)') iq,vql(:,iq),gclq(iq),t1
31 end do
32 close(50)
33 end subroutine
34 !EOC
35 
real(8), dimension(:), allocatable qc
Definition: modmain.f90:552
character(256) filext
Definition: modmain.f90:1301
integer nqpt
Definition: modmain.f90:528
real(8), dimension(:,:), allocatable vql
Definition: modmain.f90:548
real(8), dimension(:), allocatable gclq
Definition: modmain.f90:558
real(8), parameter fourpi
Definition: modmain.f90:1234
subroutine writegclq
Definition: writegclq.f90:10