Compute Z-matrix (Gamma point routine)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp), | intent(inout) | :: | cbw(:,:) | |||
| complex(kind=dp), | intent(in) | :: | m_matrix_orig_local(:,:,:,:) | |||
| complex(kind=dp), | intent(inout) | :: | u_matrix_opt(:,:,:) | |||
| real(kind=dp), | intent(out) | :: | rmtrx(:,:) | |||
| real(kind=dp), | intent(in) | :: | wb(:) | |||
| integer, | intent(in) | :: | indxnfroz(:,:) | |||
| integer, | intent(in) | :: | ndimfroz(:) | |||
| integer, | intent(in) | :: | ndimwin(:) | |||
| integer, | intent(in) | :: | nnlist(:,:) | |||
| integer, | intent(in) | :: | nkp | |||
| integer, | intent(in) | :: | nntot | |||
| integer, | intent(in) | :: | num_bands | |||
| integer, | intent(in) | :: | num_wann | |||
| integer, | intent(in) | :: | timing_level | |||
| type(timer_list_type), | intent(inout) | :: | timer |
subroutine internal_zmatrix_gamma(cbw, m_matrix_orig_local, u_matrix_opt, rmtrx, wb, indxnfroz, & ndimfroz, ndimwin, nnlist, nkp, nntot, num_bands, num_wann, & timing_level, timer) !================================================! ! !! Compute Z-matrix (Gamma point routine) ! !================================================! use w90_constants, only: dp, cmplx_0, cmplx_1 use w90_io, only: io_stopwatch_start, io_stopwatch_stop use w90_types, only: timer_list_type implicit none ! arguments type(timer_list_type), intent(inout) :: timer integer, intent(in) :: timing_level integer, intent(in) :: num_bands, num_wann, nkp, nntot integer, intent(in) :: ndimwin(:) integer, intent(in) :: nnlist(:, :) integer, intent(in) :: ndimfroz(:) integer, intent(in) :: indxnfroz(:, :) real(kind=dp), intent(in) :: wb(:) real(kind=dp), intent(out) :: rmtrx(:, :) complex(kind=dp), intent(inout) :: cbw(:, :) complex(kind=dp), intent(in) :: m_matrix_orig_local(:, :, :, :) complex(kind=dp), intent(inout) :: u_matrix_opt(:, :, :) ! Internal variables integer :: l, m, n, p, q, nn, nkp2, ndimk complex(kind=dp) :: csum if (timing_level > 1) call io_stopwatch_start('dis: extract_gamma: zmatrix_gamma', timer) rmtrx = 0.0_dp ndimk = ndimwin(nkp) - ndimfroz(nkp) do nn = 1, nntot nkp2 = nnlist(nkp, nn) call zgemm('N', 'N', num_bands, num_wann, ndimwin(nkp2), cmplx_1, & m_matrix_orig_local(:, :, nn, nkp), num_bands, u_matrix_opt(:, :, nkp2), num_bands, & cmplx_0, cbw, num_bands) do n = 1, ndimk q = indxnfroz(n, nkp) do m = 1, n p = indxnfroz(m, nkp) csum = cmplx_0 do l = 1, num_wann csum = csum + cbw(p, l)*conjg(cbw(q, l)) end do rmtrx(m, n) = rmtrx(m, n) + wb(nn)*real(csum, dp) rmtrx(n, m) = rmtrx(m, n) end do end do end do if (timing_level > 1) call io_stopwatch_stop('dis: extract_gamma: zmatrix_gamma', timer) return !================================================! end subroutine internal_zmatrix_gamma