The Elk Code
 
Loading...
Searching...
No Matches
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
6subroutine gengqf(ng,vqpc,vgqc,gqc,jlgqr,ylmgq,sfacgq)
7use modmain
8implicit none
9! arguments
10integer, intent(in) :: ng
11real(8), intent(in) :: vqpc(3)
12real(8), intent(out) :: vgqc(3,ng),gqc(ng),jlgqr(njcmax,nspecies,ng)
13complex(8), intent(out) :: ylmgq(lmmaxo,ng),sfacgq(ng,natmtot)
14! local variables
15integer ig
16do 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))
23end do
24! generate the spherical Bessel functions
25call genjlgpr(ng,gqc,jlgqr)
26! structure factors for G+q-vectors
27call gensfacgp(ng,vgqc,ng,sfacgq)
28end subroutine
29
subroutine gengqf(ng, vqpc, vgqc, gqc, jlgqr, ylmgq, sfacgq)
Definition gengqf.f90:7
subroutine genjlgpr(ngp, gpc, jlgpr)
Definition genjlgpr.f90:7
pure subroutine gensfacgp(ngp, vgpc, ld, sfacgp)
Definition gensfacgp.f90:10
pure subroutine genylmv(t4pil, lmax, v, ylm)
Definition genylmv.f90:10
integer lmaxo
Definition modmain.f90:201
real(8), dimension(:,:), allocatable vgc
Definition modmain.f90:420