anchor.diff:      exc(0, :, s1) = 2
       exc(1, 1, s1) = hmi
       exc(2, 1, s1) = hma
  +    do p2=1,mo_tot_num
  +    if(banned(p2 + ns2)) cycle
       do p1=1,mo_tot_num
  -    do p2=1,mo_tot_num
  +      if(banned(p1 + ns1)) cycle
         if(p1 == p2) cycle
  +      if(banned_pair(p1 + ns1, p2 + ns2)) cycle
         call apply_particle(mask, (/s1,p1,s2,p2/), det2, ok, N_int)
         if(.not. ok) cycle
         mono = (hmi == p1 .or. hma == p2 .or. hmi == p2 .or. hma == p1)
         if(mono) then
           call i_h_j(gen, det2, N_int, mat(p1, p2))
  -        !mat(p1, p2) = phase
         else
           exc(1, 2, s1) = min(p1, p2)
           exc(2, 2, s2) = max(p2, p1)
           call get_double_excitation_phase(gen, det2, exc, phase, N_int)
  -        mat(p1, p2) = inv * (mat_mwen(p1, p2) - mat_mwen(p2, p1)) * phase
  +        mat(p1, p2) = inv * (integral8(p1, p2, h1, h2) - integral8(p2, p1, h1, h2)) * phase
         end if
       end do
       end do
  
positive.code: 
  
    do i=1, idx(0)
      if(n_element(1, i) + n_element(2, i) <= 2) then
        idx_microlist(cur_microlist(0)) = idx(i)
        do k=1,Nint
  
negative.code:     exc(1, 1, 1) = h2
      exc(1, 1, 2) = h1
  
      do p2=1, mo_tot_num
      if(banned(p2 + ns2)) cycle
      do p1=1, mo_tot_num
        if(banned(p1 + ns1)) cycle
        if(banned_pair(p1 + ns1, p2 + ns2)) cycle
        call apply_particle(mask, (/s1,p1,s2,p2/), det2, ok, N_int)
        if(.not. ok) cycle
        mono = (h1 == p1 .or. h2 == p2)
        if(mono) then
          call i_h_j(gen, det2, N_int, mat(p1, p2))
        else
          exc(1, 2, s1) = p1
          exc(1, 2, s2) = p2
          call get_double_excitation_phase(gen, det2, exc, phase, N_int)
          mat(p1, p2) = integral8(p1, p2, h1, h2) * phase
        end if
      end do
      end do
  