get_double_helem_rs_hub_transcorr Function

private function get_double_helem_rs_hub_transcorr(ex, tpar) result(hel)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ex(2,2)
logical, intent(in) :: tpar

Return Value real(kind=dp)


Contents


Source Code

    function get_double_helem_rs_hub_transcorr(ex, tpar) result(hel)
        ! newly introduced 2-body matrix element in the hopping
        ! transcorrelated real-space hubbard model
        integer, intent(in) :: ex(2, 2)
        logical, intent(in) :: tpar
        HElement_t(dp) :: hel
#ifdef DEBUG_
        character(*), parameter :: this_routine = "get_double_helem_rs_hub_transcorr"
#endif
        integer :: src(2), tgt(2), ij(2), ab(2)

        ASSERT(t_trans_corr_hop)

        if (same_spin(ex(1, 1), ex(1, 2)) .or. &
            same_spin(ex(2, 1), ex(2, 2))) then
            hel = 0.0_dp
            return
        end if

        src = get_src(ex)
        tgt = get_tgt(ex)

        ij = get_spatial(src)
        ab = get_spatial(tgt)

        ! this weird combined sign convention..
        ! NOTE: i have to be careful due to the non-hermitian hamiltonian..
        ! i guess it matters now where i put the holes and electrons!
        ! and maybe it even matters where i put the indices for electrons
        ! and their corresponding fitting hole.. to be tested!
        if (same_spin(src(1), tgt(1)) .and. same_spin(src(2), tgt(2))) then

            hel = get_umat_rs_hub_trans(ij(1), ij(2), ab(1), ab(2))

        else if (same_spin(src(1), tgt(2)) .and. same_spin(src(2), tgt(1))) then

            hel = -get_umat_rs_hub_trans(ij(1), ij(2), ab(1), ab(2))

        end if

        if (tpar) hel = -hel

    end function get_double_helem_rs_hub_transcorr