get_2_body_contrib_transcorr_hop Function

private function get_2_body_contrib_transcorr_hop(nI, ex) result(hel)

Arguments

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

Return Value real(kind=dp)


Contents


Source Code

    function get_2_body_contrib_transcorr_hop(nI, ex) result(hel)
        ! new single excitation matrix element calculation
        ! in the hopping transcorrelation this has influence from the
        ! 2-body term now. the original 1-body term is already calulated
        ! outside this function
        integer, intent(in) :: nI(nel), ex(2)
        HElement_t(dp) :: hel
#ifdef DEBUG_
        character(*), parameter :: this_routine = "get_2_body_contrib_transcorr_hop"
#endif
        integer :: i, idX(2), idN

        ASSERT(same_spin(ex(1), ex(2)))

        hel = 0.0_dp

        idX = get_spatial(ex)

        ! i have to loop over the occupied sites from the opposite spin
        ! and retrieve the correct integral
        if (is_beta(ex(1))) then
            do i = 1, nel
                if (is_alpha(nI(i))) then
                    ! get the correct indices.
                    ! NOTE: i also have to think about the hermiticity here!
                    ! so the order in umat counts i guess!!! also important
                    ! for the setup of umat!
                    idN = get_spatial(nI(i))
                    hel = hel + get_umat_rs_hub_trans(idX(1), idN, idN, idX(2))
                end if
            end do
        else
            do i = 1, nel
                if (is_beta(nI(i))) then
                    idN = get_spatial(nI(i))
                    hel = hel + get_umat_rs_hub_trans(idX(1), idN, idN, idX(2))
                end if
            end do
        end if

    end function get_2_body_contrib_transcorr_hop