function get_1_body_contrib_spin_transcorr(nI, ex) result(hel)
! get the contribution to the one-body matrix elements for the spin-
! dependent transcorrelated real-space hubbard model.
integer, intent(in) :: nI(nel), ex(2)
HElement_t(dp) :: hel
#ifdef DEBUG_
character(*), parameter :: this_routine = "get_1_body_contrib_spin_transcorr"
#endif
integer :: i, idX(2), id(nel), r1(3), r2(3), r_vec(3), ind_1(3), ind_2(3)
ASSERT(same_spin(ex(1), ex(2)))
ASSERT(is_alpha(ex(1)))
idX = get_spatial(ex)
id = get_spatial(nI)
r1 = lat%get_r_vec(idX(1))
r2 = lat%get_r_vec(idX(2))
hel = 0.0_dp
do i = 1, nel
! i have to sum over the beta spin-contributions
if (is_beta(nI(i))) then
r_vec = lat%get_r_vec(id(i))
! r1 is the hole vector
! r2 is the electron vector
ind_1 = r2 - r_vec
ind_2 = r_vec - r1
hel = hel + hop_transcorr_factor_cached_vec(ind_1(1), ind_1(2), ind_1(3)) * &
hop_transcorr_factor_cached_vec_m(ind_2(1), ind_2(2), ind_2(3))
end if
end do
hel = hel * uhub
end function get_1_body_contrib_spin_transcorr