pw90common_get_occ Subroutine

public subroutine pw90common_get_occ(eig, occ, ef)

Uses

  • proc~~pw90common_get_occ~~UsesGraph proc~pw90common_get_occ pw90common_get_occ module~w90_parameters w90_parameters proc~pw90common_get_occ->module~w90_parameters module~w90_constants w90_constants proc~pw90common_get_occ->module~w90_constants module~w90_parameters->module~w90_constants module~w90_io w90_io module~w90_parameters->module~w90_io module~w90_io->module~w90_constants

Compute the electronic occupancy

Arguments

Type IntentOptional AttributesName
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


Called by

proc~~pw90common_get_occ~~CalledByGraph proc~pw90common_get_occ pw90common_get_occ proc~spin_get_moment_k spin_get_moment_k proc~spin_get_moment_k->proc~pw90common_get_occ proc~wham_get_d_h_a wham_get_D_h_a proc~wham_get_d_h_a->proc~pw90common_get_occ

Contents

Source Code


Source Code

  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