Compute the electronic occupancy
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | ef |
Fermi level |
||
| real(kind=dp), | intent(in) | :: | eig(num_wann) |
Eigenvalues |
||
| real(kind=dp), | intent(out) | :: | occ(num_wann) |
Occupancy of states |
||
| integer, | intent(in) | :: | num_wann |
subroutine pw90common_get_occ(ef, eig, occ, num_wann) !================================================! ! !! Compute the electronic occupancy ! !================================================! use w90_constants, only: dp ! arguments integer, intent(in) :: num_wann 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 ! local variables integer :: i ! 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