anchor.diff:  !               HkI = h_(J,l)
   !               dkI(i_state) = HkI * lambda_mrcc(i_state, l)
   !               contrib = dkI(i_state) * delta_JI
  +!               !$OMP ATOMIC
   !               delta_ij_old(J,det_cepa0_idx(k),i_state) += contrib
   !               if(dabs(psi_ref_coef(i_I,i_state)).ge.5.d-5) then
  +!                 !$OMP ATOMIC
   !                 delta_ii_old(J,i_state) -= contrib * ci_inv(i_state) * psi_non_ref_coef(det_cepa0_idx(k),i_state)
   !               end if
   !             enddo !i_state
  
positive.code:       stop "invalid mrmode"
      end if
    end do
    do i=1,N_det_ref
      print *, delta_ii(1,i)
    end do
    do i=1,min(N_det_non_ref,100)
      print *, delta_ij(1,i,:)
    end do
  !   stop
    
  
  
negative.code: !         i_I = J_s
  !         J = I_s
  !       end if
  !       
  !     !$OMP PARALLEL DO default(none) schedule(dynamic,1) shared(delta_ij_old, delta_ii_old)       &
  !     !$OMP private(m,m2,kk, i, k, degree, degree2, l, deg, ni, inac, virt)       &
  !     !$OMP private(ok,p1,p2,h1,h2,s1,s2, blok, wall, I_s, J_s)     &
  !     !$OMP private(phase_iI, phase_Ik, phase_Ji, phase_al, diI, hIi, hJi, delta_JI, dkI, HkI, ci_inv, dia_hla) &
  !     !$OMP private(i_state, contrib, exc_iI, exc_Ik, exc_IJ, det_tmp, det_tmp2)    &
  !     !$OMP shared(N_det_non_ref, N_det_ref, N_int, psi_non_ref, psi_non_ref_coef, psi_ref, psi_ref_coef)   &
  !     !$OMP shared(lambda_mrcc, hf_bitmask, active_sorb,cepa0_shortcut,det_cepa0,N_states) &
  !     !$OMP shared(i_I, J, h_,det_cepa0_idx, linked, blokMwen, nlink, iwall, searchance)
  !       do kk = 1 , nlink(i_I)
  !         k = linked(kk,i_I)
  !         blok = blokMwen(kk,i_I)
  