Fourier transforms Wannier-gauge representation of a given operator O from q-space to R-space:
O_ij(q) --> O_ij(R) = (1/N_kpts) sum_q e^{-iqR} O_ij(q)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in), | dimension(:, :, :) | :: | op_q | Operator in q-space |
|
complex(kind=dp), | intent(out), | dimension(:, :, :) | :: | op_R | Operator in R-space |
subroutine fourier_q_to_R(op_q, op_R)
!==========================================================
!
!! Fourier transforms Wannier-gauge representation
!! of a given operator O from q-space to R-space:
!!
!! O_ij(q) --> O_ij(R) = (1/N_kpts) sum_q e^{-iqR} O_ij(q)
!
!==========================================================
use w90_constants, only: dp, cmplx_0, cmplx_i, twopi
use w90_parameters, only: num_kpts, kpt_latt
use w90_postw90_common, only: nrpts, irvec
implicit none
! Arguments
!
complex(kind=dp), dimension(:, :, :), intent(in) :: op_q
!! Operator in q-space
complex(kind=dp), dimension(:, :, :), intent(out) :: op_R
!! Operator in R-space
integer :: ir, ik
real(kind=dp) :: rdotq
complex(kind=dp) :: phase_fac
op_R = cmplx_0
do ir = 1, nrpts
do ik = 1, num_kpts
rdotq = twopi*dot_product(kpt_latt(:, ik), irvec(:, ir))
phase_fac = exp(-cmplx_i*rdotq)
op_R(:, :, ir) = op_R(:, :, ir) + phase_fac*op_q(:, :, ik)
enddo
enddo
op_R = op_R/real(num_kpts, dp)
end subroutine fourier_q_to_R