anchor.diff:          enddo
         enddo
       enddo
  -    !$OMP END DO NOWAIT
  -  enddo
  +  enddo
  +  !$OMP END DO 
   
     !$OMP CRITICAL (u0Hu0)
     do istate=1,N_st
  
positive.code:         call i_H_j(keys_tmp(1,1,org_j),keys_tmp(1,1,org_i),Nint,hij)
          do istate=1,N_st
            vt (istate,org_i) = vt (istate,org_i) + hij*ut(istate,org_j)
            vt (istate,org_j) = vt (istate,org_j) + hij*ut(istate,org_i)
          enddo
        end do
      end do
  
negative.code: 
        do i=shortcut(sh,1),shortcut(sh+1,1)-1
          org_i = sort_idx(i,1)
          do ni=1,Nint
            sorted_i(ni) = sorted(ni,i,1)
          enddo
  
          do j=shortcut(sh2,1),shortcut(sh2+1,1)-1
            if (i==j) cycle
            ext = exa + popcnt(xor(sorted_i(1), sorted(1,j,1)))
            if (ext > 4) cycle
            do ni=2,Nint
  