For alpha=0: O_ij(R) --> O_ij(k) = sum_R e^{+ik.R}*O_ij(R)
For alpha=1,2,3: sum_R [cmplx_iR_alphae^{+ik.R}O_ij(R)] where R_alpha is a Cartesian component of R REMOVE EVENTUALLY* (replace with pw90common_fourier_R_to_k_new)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ws_region_type), | intent(in) | :: | ws_region | |||
| type(wannier_data_type), | intent(in) | :: | wannier_data | |||
| type(ws_distance_type), | intent(inout) | :: | ws_distance | |||
| type(wigner_seitz_type), | intent(in) | :: | wigner_seitz | |||
| complex(kind=dp), | intent(out) | :: | OO(:,:) | |||
| complex(kind=dp), | intent(in) | :: | OO_R(:,:,:) | |||
| real(kind=dp), | intent(in) | :: | kpt(3) | |||
| real(kind=dp), | intent(in) | :: | real_lattice(3,3) | |||
| integer, | intent(in) | :: | mp_grid(3) | |||
| integer, | intent(in) | :: | alpha | |||
| integer, | intent(in) | :: | num_wann | |||
| type(w90_error_type), | intent(out), | allocatable | :: | error | ||
| type(w90_comm_type), | intent(in) | :: | comm |
subroutine pw90common_fourier_R_to_k(ws_region, wannier_data, ws_distance, wigner_seitz, OO, & OO_R, kpt, real_lattice, mp_grid, alpha, num_wann, & error, comm) !================================================! ! !! For alpha=0: !! O_ij(R) --> O_ij(k) = sum_R e^{+ik.R}*O_ij(R) !! !! For alpha=1,2,3: !! sum_R [cmplx_i*R_alpha*e^{+ik.R}*O_ij(R)] !! where R_alpha is a Cartesian component of R !! ***REMOVE EVENTUALLY*** (replace with pw90common_fourier_R_to_k_new) ! !================================================! use w90_constants, only: dp, cmplx_0, cmplx_i, twopi use w90_types, only: wannier_data_type, ws_region_type, ws_distance_type use w90_ws_distance, only: ws_translate_dist use w90_postw90_types, only: wigner_seitz_type use w90_comms, only: w90_comm_type implicit none ! arguments type(ws_region_type), intent(in) :: ws_region type(wannier_data_type), intent(in) :: wannier_data type(wigner_seitz_type), intent(in) :: wigner_seitz type(ws_distance_type), intent(inout) :: ws_distance type(w90_error_type), allocatable, intent(out) :: error type(w90_comm_type), intent(in) :: comm integer, intent(in) :: num_wann integer, intent(in) :: mp_grid(3) integer, intent(in) :: alpha real(kind=dp), intent(in) :: kpt(3), real_lattice(3, 3) complex(kind=dp), intent(in) :: OO_R(:, :, :) complex(kind=dp), intent(out) :: OO(:, :) ! local variables integer :: ir, i, j, ideg real(kind=dp) :: rdotk complex(kind=dp) :: phase_fac OO(:, :) = cmplx_0 do ir = 1, wigner_seitz%nrpts_pw90 ! [lp] Original code, without IJ-dependent shift: rdotk = twopi*dot_product(kpt(:), wigner_seitz%irvec_pw90(:, ir)) phase_fac = cmplx(cos(rdotk), sin(rdotk), dp) if (alpha == 0) then OO(:, :) = OO(:, :) + phase_fac*OO_R(:, :, ir) elseif (alpha == 1 .or. alpha == 2 .or. alpha == 3) then OO(:, :) = OO(:, :) + & cmplx_i*wigner_seitz%crvec_pw90(alpha, ir)*phase_fac*OO_R(:, :, ir) else stop 'wrong value of alpha in pw90common_fourier_R_to_k' end if end do end subroutine pw90common_fourier_R_to_k