function make_ilutJ(ilutI, ex, ic) result(ilutJ)
! function similar to make_single and make_double to create the
! accompaning ilut form.
integer(n_int), intent(in) :: ilutI(0:niftot)
integer, intent(in) :: ic
integer, intent(in) :: ex(2, ic)
integer(n_int) :: ilutJ(0:niftot)
#ifdef DEBUG_
character(*), parameter :: this_routine = "make_ilutJ"
#endif
integer :: ij(ic), ab(ic), i
#ifdef DEBUG_
ASSERT(ic == 1 .or. ic == 2 .or. ic == 3)
! should this every be called with 0 orbitals.. i guess no..
do i = 1, ic
ASSERT(ex(1, ic) > 0)
ASSERT(ex(2, ic) > 0)
ASSERT(ex(1, ic) <= nbasis)
ASSERT(ex(2, ic) <= nbasis)
end do
#endif
ilutJ = ilutI
ij = get_src(ex)
ab = get_tgt(ex)
do i = 1, ic
clr_orb(ilutJ, ij(i))
set_orb(ilutJ, ab(i))
end do
end function make_ilutJ