anchor.diff:          ! <I|H|k>
           hIk = hij_mrcc(idx_alpha(k_sd),i_I)
           !         call i_h_j(psi_ref(1,1,i_I),psi_non_ref(1,1,idx_alpha(k_sd)),Nint,hIk)
  +        
  +        
           do i_state=1,N_states
  -          dIk(i_state) = hIk * lambda_mrcc(i_state,idx_alpha(k_sd))
  +          dIk(i_state) = get_dij(psi_ref(1,1,i_I), psi_non_ref(1,1,idx_alpha(k_sd)), N_int) !!hIk * lambda_mrcc(i_state,idx_alpha(k_sd))
           enddo
  +        
  +        
  +        
           ! |l> = Exc(k -> alpha) |I>
           call get_excitation(psi_non_ref(1,1,idx_alpha(k_sd)),tq(1,1,i_alpha),exc,degree,phase,Nint)
           call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
  
positive.code:   integer, allocatable           :: idx_microlist(:), N_microlist(:), ptr_microlist(:), idx_microlist_zero(:)
    integer :: mobiles(2), smallerlist
    logical, external :: detEq, is_generable
  
  
    leng = max(N_det_generators, N_det_non_ref)
    allocate(miniList(Nint, 2, leng), tq(Nint,2,n_selected), idx_minilist(leng), hij_cache(N_det_non_ref))
  
negative.code:         
          ! Loop if lambda == 0
          logical                        :: loop
  !         loop = .True.
  !         do i_state=1,N_states
  !           if (lambda_mrcc(i_state,idx_alpha(k_sd)) /= 0.d0) then
  !             loop = .False.
  !             exit
  !           endif
  !         enddo
  !         if (loop) then
  !           cycle
  !         endif
          
          call get_excitation_degree(psi_ref(1,1,i_I),psi_non_ref(1,1,idx_alpha(k_sd)),degree,Nint)
          if (degree > 2) then
  