The Elk Code
gengqf.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2013 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 gengqf(ng,vqpc,vgqc,gqc,jlgqr,ylmgq,sfacgq)
7 use modmain
8 implicit none
9 ! arguments
10 integer, intent(in) :: ng
11 real(8), intent(in) :: vqpc(3)
12 real(8), intent(out) :: vgqc(3,ng),gqc(ng),jlgqr(njcmax,nspecies,ng)
13 complex(8), intent(out) :: ylmgq(lmmaxo,ng),sfacgq(ng,natmtot)
14 ! local variables
15 integer ig
16 do ig=1,ng
17 ! G+q-vector in Cartesian coordinates
18  vgqc(1:3,ig)=vgc(1:3,ig)+vqpc(1:3)
19 ! G+q-vector length
20  gqc(ig)=sqrt(vgqc(1,ig)**2+vgqc(2,ig)**2+vgqc(3,ig)**2)
21 ! spherical harmonics for G+q-vectors
22  call genylmv(.true.,lmaxo,vgqc(:,ig),ylmgq(:,ig))
23 end do
24 ! generate the spherical Bessel functions
25 call genjlgpr(ng,gqc,jlgqr)
26 ! structure factors for G+q-vectors
27 call gensfacgp(ng,vgqc,ng,sfacgq)
28 end subroutine
29 
pure subroutine gensfacgp(ngp, vgpc, ld, sfacgp)
Definition: gensfacgp.f90:10
subroutine gengqf(ng, vqpc, vgqc, gqc, jlgqr, ylmgq, sfacgq)
Definition: gengqf.f90:7
integer lmaxo
Definition: modmain.f90:201
pure subroutine genylmv(t4pil, lmax, v, ylm)
Definition: genylmv.f90:10
real(8), dimension(:,:), allocatable vgc
Definition: modmain.f90:420
subroutine genjlgpr(ngp, gpc, jlgpr)
Definition: genjlgpr.f90:7