anchor.diff:    integer, allocatable :: n_element(:,:), idx(:), list(:,:,:)
     integer :: cur_microlist(0:mo_tot_num*2+1), cur_tmicrolist(0:mo_tot_num*2+1)
     integer(bit_kind) :: key_mask_neg(Nint,2), mobileMask(Nint,2)
  -  integer :: mo_tot_num_2
  +  integer :: mo_tot_num_2, pwen(4), pweni
     logical,intent(out) :: isinwf(mo_tot_num*2, mo_tot_num*2)
     double precision, intent(out) :: d0s(mo_tot_num, mo_tot_num, N_states)
     double precision :: integ(mo_tot_num, mo_tot_num)
  +  logical :: banned(mo_tot_num*2), banned_pair(mo_tot_num*2, mo_tot_num*2)
  +  banned = .false.
  +  banned_pair = .false.
   
     allocate(list(4,2,N_minilist), n_element(2,N_minilist), idx(0:N_minilist))
   
  
positive.code: 
  
  subroutine selection_slave(thread,iproc)
  
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
  