Compute the electronic occupancy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | eig(num_wann) | Eigenvalues |
||
real(kind=dp), | intent(out) | :: | occ(num_wann) | Occupancy of states |
||
real(kind=dp), | intent(in) | :: | ef | Fermi level |
subroutine pw90common_get_occ(eig, occ, ef)
!! Compute the electronic occupancy
use w90_constants, only: dp !,eps7
use w90_parameters, only: num_wann !,smear_temp
! use w90_constants, only : elem_charge_SI,k_B_SI
! Arguments
!
real(kind=dp), intent(in) :: eig(num_wann)
!! Eigenvalues
real(kind=dp), intent(in) :: ef
!! Fermi level
real(kind=dp), intent(out) :: occ(num_wann)
!! Occupancy of states
! Misc/Dummy
!
integer :: i
! real(kind=dp) :: kt
! State occupancies
!
! if(smear_temp < eps7) then
!
! Use a step function occupancy (T=0)
!
occ(:) = 0.0_dp
do i = 1, num_wann
if (eig(i) < ef) occ(i) = 1.0_dp
end do
! else
!
! Use a Fermi-Dirac occupancy (T=smear_temp, in Kelvin)
!
! k_B.T in electron-volts
!
! kt=k_B_SI*smear_temp/elem_charge_SI
! do i=1,num_wann
! occ(i)=1.0_dp/(exp((eig(i)-ef)/kt)+1.0_dp)
! end do
! end if
end subroutine pw90common_get_occ