get_diag_helemen_rs_hub Function

private function get_diag_helemen_rs_hub(nI) result(hel)


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

Return Value real(kind=dp)


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)
            hel = h_cast(uhub * count_double_orbs(ilut))
        end if

    end function get_diag_helemen_rs_hub