function get_guga_integral_contrib(occ_orbs, orb_a, orb_b) result(cpt)
! routine which gets the correct FCIDUMP integral contribution for
! orbital a, where electrons i and j are already picked!
! have to still figure out how to do that correctly..
integer, intent(in) :: occ_orbs(2), orb_a, orb_b
real(dp) :: cpt
integer :: ind(2)
ind = gtID(occ_orbs)
! ATTENTION! occ_orbs is given in spin orbitals, while orb is a
! spatial orbital!
! for now, since i dont know how to correctly do it, and for testing
! purposes just add a uniformly factor to all of the orbitals.
! do a input dependent switch to compare influence on the pgens..
if (tGen_guga_weighted) then
if (orb_b < 0) then
cpt = sqrt(abs_l1(UMat2D(max(ind(1), orb_a), min(ind(1), orb_a)))) &
+ sqrt(abs_l1(UMat2D(max(ind(2), orb_a), min(ind(2), orb_a))))
else
cpt = sqrt(abs(get_umat_el(ind(1), ind(2), orb_a, orb_b)) &
+ abs(get_umat_el(ind(1), ind(2), orb_b, orb_a)))
end if
else
if (orb_b < 0) then
cpt = 1.0_dp
else
cpt = sqrt(abs(get_umat_el(ind(1), ind(2), orb_a, orb_b)) + &
abs(get_umat_el(ind(1), ind(2), orb_b, orb_a)))
end if
end if
end function get_guga_integral_contrib