Find the lower bound (band index) of the outer energy window at the specified k-point
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ik | Index of the required k-point |
||
integer, | intent(out) | :: | win_min | Index of the lower band of the outer energy window |
subroutine get_win_min(ik, win_min)
!===============================================
!
!! Find the lower bound (band index) of the
!! outer energy window at the specified k-point
!
!===============================================
use w90_constants, only: dp
use w90_parameters, only: num_bands, lwindow, have_disentangled
implicit none
! Arguments
!
integer, intent(in) :: ik
!! Index of the required k-point
integer, intent(out) :: win_min
!! Index of the lower band of the outer energy window
integer :: j
if (.not. have_disentangled) then
win_min = 1
return
endif
do j = 1, num_bands
if (lwindow(j, ik)) then
win_min = j
exit
end if
end do
end subroutine get_win_min