function check_orbital_location_spatial(orbs, ic, part_type) result(loc)
! same function as above just for spatial orbitals
integer, intent(in) :: orbs(2), ic, part_type
integer :: loc
character(*), parameter :: this_routine = "check_orbital_location_spatial"
integer :: i
! the output:
! 0 ... both holes are in the occupied space of the reference
! 1 ... the holes are mixed in the occupied and virtual space
! 2 ... both holes are in the virtual space of the reference
if (ic == 1) then
if (is_in_virt_mask_spatial(orbs(1), part_type)) then
loc = 2
else
loc = 0
end if
else if (ic == 2) then
loc = 0
do i = 1, 2
if (is_in_virt_mask_spatial(orbs(i), part_type)) then
loc = loc + 1
end if
end do
end if
ASSERT(loc >= 0)
ASSERT(loc <= 2)
end function check_orbital_location_spatial