function trans_corr_fac(ilutI, src, tgt) result(weight)
integer(n_int), intent(in) :: ilutI(0:NIfTot)
integer, intent(in) :: src, tgt
real(dp) :: weight
#ifdef DEBUG_
character(*), parameter :: this_routine = "trans_corr_fac"
#endif
real(dp) :: ni_opp, nj_opp
! if the spins are not the same, something went wrong..
ASSERT(is_beta(src) .eqv. is_beta(tgt))
ni_opp = 0.0_dp
nj_opp = 0.0_dp
if (is_beta(src)) then
! check if alpha orbital (i) and (j) in ilutI is occupied
if (IsOcc(ilutI, get_alpha(src))) then
nj_opp = 1.0_dp
end if
if (IsOcc(ilutI, get_alpha(tgt))) ni_opp = 1.0_dp
else
if (IsOcc(ilutI, get_beta(src))) nj_opp = 1.0_dp
if (IsOcc(ilutI, get_beta(tgt))) ni_opp = 1.0_dp
end if
weight = exp(trans_corr_param * (nj_opp - ni_opp))
end function trans_corr_fac