get_diag_helemen_rs_hub Function

private function get_diag_helemen_rs_hub(nI) result(hel)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)

Return Value real(kind=dp)


Contents


Source Code

    function get_diag_helemen_rs_hub(nI) result(hel)
        integer, intent(in) :: nI(nel)
        HElement_t(dp) :: hel

        integer(n_int) :: ilut(0:NIfTot)
        ! the diagonal matrix element is essentialy just the number of
        ! doubly occupied sites times U

        call EncodeBitDet(nI, ilut)

        if (t_trans_corr_hop) then
            hel = get_diag_helemen_rs_hub_transcorr_hop(nI)
        else if (t_spin_dependent_transcorr) then
            hel = get_diag_helemen_rs_hub_transcorr_spin(nI)
        else
            hel = h_cast(uhub * count_double_orbs(ilut))
        end if

    end function get_diag_helemen_rs_hub