logical function is_in_virt_mask_spatial(orb, part_type)
! same function as above just for spatial orbital orb
integer, intent(in) :: orb
integer, intent(in), optional :: part_type
character(*), parameter :: this_routine = "is_in_virt_mask_spatial"
integer :: temp_part_type
integer(n_int) :: temp_ilut(0:niftot)
ASSERT(orb >= 0)
ASSERT(orb <= nBasis / 2)
if (present(part_type)) then
temp_part_type = part_type
else
temp_part_type = 1
end if
temp_ilut = mask_virt_ilut(:, part_type_to_run(temp_part_type))
is_in_virt_mask_spatial = (IsOcc(temp_ilut, 2 * orb) .or. IsOcc(temp_ilut, 2 * orb - 1))
end function is_in_virt_mask_spatial