File: gengqrf.f90

package info (click to toggle)
elkcode 5.4.24-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 12,840 kB
  • sloc: f90: 48,415; fortran: 22,457; perl: 965; makefile: 384; sh: 369; python: 105; ansic: 67
file content (31 lines) | stat: -rw-r--r-- 930 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

! Copyright (C) 2013 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
! This file is distributed under the terms of the GNU General Public License.
! See the file COPYING for license details.

subroutine gengqrf(vqpc,vgqc,gqc,jlgqr,ylmgq,sfacgq)
use modmain
implicit none
! arguments
real(8), intent(in) :: vqpc(3)
real(8), intent(out) :: vgqc(3,ngrf),gqc(ngrf)
real(8), intent(out) :: jlgqr(njcmax,nspecies,ngrf)
complex(8), intent(out) :: ylmgq(lmmaxo,ngrf),sfacgq(ngrf,natmtot)
! local variables
integer ig
real(8) tp(2)
do ig=1,ngrf
! determine the G+q-vectors
  vgqc(:,ig)=vgc(:,ig)+vqpc(:)
! G+q-vector length and (theta, phi) coordinates
  call sphcrd(vgqc(:,ig),gqc(ig),tp)
! spherical harmonics for G+q-vectors
  call genylm(lmaxo,tp,ylmgq(:,ig))
end do
! generate the spherical Bessel functions
call genjlgpr(ngrf,gqc,jlgqr)
! structure factors for G+q-vectors
call gensfacgp(ngrf,vgqc,ngrf,sfacgq)
return
end subroutine