Compute D^H_a=UU^dag.del_a UU (a=x,y,z) using Eq.(24) of WYSV06
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp), | intent(in) | :: | delHH(:,:,:) | |||
| complex(kind=dp), | intent(out) | :: | D_h(:,:,:) | |||
| complex(kind=dp), | intent(in) | :: | UU(:,:) | |||
| real(kind=dp), | intent(in) | :: | eig(:) | |||
| integer, | intent(in) | :: | num_wann |
subroutine wham_get_D_h(delHH, D_h, UU, eig, num_wann) !================================================! ! !! Compute D^H_a=UU^dag.del_a UU (a=x,y,z) !! using Eq.(24) of WYSV06 ! !================================================! ! TO DO: Implement version where energy denominators only connect ! occupied and empty states. In this case probably do not need ! to worry about avoiding small energy denominators use w90_constants, only: dp, cmplx_0 use w90_utility, only: utility_rotate ! arguments complex(kind=dp), intent(in) :: delHH(:, :, :) complex(kind=dp), intent(in) :: UU(:, :) complex(kind=dp), intent(out) :: D_h(:, :, :) real(kind=dp), intent(in) :: eig(:) integer, intent(in) :: num_wann ! local variables complex(kind=dp), allocatable :: delHH_bar_i(:, :) integer :: n, m, i allocate (delHH_bar_i(num_wann, num_wann)) D_h = cmplx_0 do i = 1, 3 delHH_bar_i(:, :) = utility_rotate(delHH(:, :, i), UU, num_wann) do m = 1, num_wann do n = 1, num_wann if (n == m .or. abs(eig(m) - eig(n)) < 1.0e-7_dp) cycle D_h(n, m, i) = delHH_bar_i(n, m)/(eig(m) - eig(n)) end do end do end do end subroutine wham_get_D_h