anchor.diff:            sorted_i(ni) = sorted(ni,i,1)
           enddo
           
  -        do j=shortcut(sh2,1),endi
  + jloop: do j=shortcut(sh2,1),endi
             org_j = sort_idx(j,1)
  -          ext = exa
  -          do ni=1,Nint
  +          ext = exa + popcnt(xor(sorted_i(1), sorted(1,j,1)))
  +          if(ext > 4) then
  +            cycle jloop
  +          endif
  +          do ni=2,Nint
               ext = ext + popcnt(xor(sorted_i(ni), sorted(ni,j,1)))
  +            if(ext > 4) then
  +              cycle jloop
  +            endif
             end do
  -          if(ext <= 4) then
  -            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
  -          endif
  -        enddo
  +          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
  +        enddo jloop
         enddo
       enddo
     enddo
  
positive.code:   !$OMP DO SCHEDULE(dynamic)
    do sh=1,shortcut(0,1)
      do sh2=sh,shortcut(0,1)
        exa = 0
        do ni=1,Nint
          exa = exa + popcnt(xor(version(ni,sh,1), version(ni,sh2,1)))
        end do
        if(exa > 2) then
  
negative.code:       org_i = sort_idx(i,2)
        do j=shortcut(sh,2),i-1
          org_j = sort_idx(j,2)
          ext = popcnt(xor(sorted(1,i,2), sorted(1,j,2)))
          do ni=2,Nint
            ext = ext + popcnt(xor(sorted(ni,i,2), sorted(ni,j,2)))
          end do
          if(ext /= 4) then
            cycle
          endif
          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
    enddo
  