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 | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | num_kpts | |||
| integer, | intent(in) | :: | nrpts | |||
| integer, | intent(in) | :: | irvec(:,:) | |||
| real(kind=dp), | intent(in) | :: | kpt_latt(:,:) | |||
| complex(kind=dp), | intent(in) | :: | op_q(:,:,:) |
Operator in q-space |
||
| complex(kind=dp), | intent(out) | :: | op_R(:,:,:) |
Operator in R-space |
subroutine fourier_q_to_R(num_kpts, nrpts, irvec, kpt_latt, 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) ! !================================================ implicit none ! Arguments real(kind=dp), intent(in) :: kpt_latt(:, :) integer, intent(in) :: num_kpts, nrpts, irvec(:, :) complex(kind=dp), intent(in) :: op_q(:, :, :) !! Operator in q-space complex(kind=dp), intent(out) :: op_R(:, :, :) !! Operator in R-space ! local variables 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) end do end do op_R = op_R/real(num_kpts, dp) end subroutine fourier_q_to_R