anchor.diff:                   ! | det_tmp_bis > = a^{\dagger}_{borb,kspin} a_{aorb,kspin} | det_tmp > 
                    call do_mono_excitation(det_tmp_bis,list_act(aorb),list_act(borb),kspin,i_ok)
                    if(i_ok .ne. 1)cycle
  +                 call get_mono_excitation(det_tmp,det_tmp_bis,exc,phase,N_int)
   
                    ! < det_tmp     | H | det_tmp_bis >  = F_{aorb,borb}
  -                 call i_H_j(det_tmp_bis,det_tmp,N_int,hab)
  +!                call i_H_j(det_tmp_bis,det_tmp,N_int,hab)
  +                 hab = fock_operator_local(aorb,borb,kspin) * phase  
                    ! < jdet | H | det_tmp_bis > = phase * (ir|cv)
   !                call i_H_j(det_tmp_bis,psi_det(1,1,idx(jdet)),N_int,hja)
                    call get_double_excitation(det_tmp_bis,psi_det(1,1,idx(jdet)),exc,phase,N_int)
  
positive.code: !!!!!!!!!!!!!!!!!!!!!!!!!!! determination of the connections between I and the other J determinants mono excited in the CAS
  !!!!!!!!!!!!!!!!!!!!!!!!!!!! the determinants I and J must be connected by the following operator 
  !!!!!!!!!!!!!!!!!!!!!!!!!!!! <Jdet | a^{\dagger}_b a_{a}  | Idet> 
         do jdet = 1, idx(0)
           if(idx(jdet).ne.idet)then
  !         print*, degree(jdet)
  
negative.code:            call get_mono_excitation(psi_det(1,1,idet),psi_det(1,1,idx(jdet)),exc,phase,N_int)
             if (exc(0,1,1) == 1) then
               ! Mono alpha
               i_hole = list_act_reverse(exc(1,1,1))   !!!  a_a
               i_part = list_act_reverse(exc(1,2,1))   !!!  a^{\dagger}_{b}
               kspin = 1                               !!!  kspin 
               index_orb_act_mono(idx(jdet),1) = i_hole
               index_orb_act_mono(idx(jdet),2) = i_part 
               index_orb_act_mono(idx(jdet),3) = kspin                          
               call i_H_j_dyall(psi_det(1,1,idet),psi_det(1,1,idx(jdet)),N_int,hij)
               fock_operator_local(i_hole,i_part,kspin) = hij * phase ! phase less fock operator 
               fock_operator_local(i_part,i_hole,kspin) = hij * phase ! phase less fock operator 
             else
               ! Mono beta
               i_hole = list_act_reverse(exc(1,1,2))   !!!  a_a
               i_part = list_act_reverse(exc(1,2,2))   !!!  a^{\dagger}_{b}
               kspin  = 2                              !!! kspin 
               index_orb_act_mono(idx(jdet),1) = i_hole
               index_orb_act_mono(idx(jdet),2) = i_part 
               index_orb_act_mono(idx(jdet),3) = kspin
               call i_H_j_dyall(psi_det(1,1,idet),psi_det(1,1,idx(jdet)),N_int,hij)
               fock_operator_local(i_hole,i_part,kspin) = hij * phase ! phase less fock operator 
               fock_operator_local(i_part,i_hole,kspin) = hij * phase ! phase less fock operator 
             endif
            else if(degree(jdet)==2)then
             call get_double_excitation(psi_det(1,1,idet),psi_det(1,1,idx(jdet)),exc,phase,N_int)
  