anchor.diff:  integer :: iuq, nuq, iP, nP, lc, iStr2, HNFtest(3,3), hdgenfact, labdgen, totdgen
   integer :: strN2, hnfN2, n2, pgOps2, diag2(3), iL, nL, idx, f1, f2, iLP, nLP, jp
   !integer :: sizeN2
  -integer, allocatable :: ilabeling(:), ilabeling2(:), atomType(:), permutedLab(:)
  +integer, allocatable :: ilabeling1(:), ilabeling2(:), atomType(:), automorphism(:)
   real(dp) :: eps
   logical full, HNFmatch, foundLab, err, equiatomic
   character(maxLabLength)   :: labeling ! List, 0..k-1, of the atomic type at each site
  
positive.code:          cycle
        endif
        do i = 0, k-1
           if (count(ilabeling2==i)/=count(ilabeling==i)) then
              write(13,'("Concentrations don''t match for color ",i1)') i
              write(*,'("Concentrations don''t match for color ",i1)') i
              cycle compareloop
  
negative.code:    ! Use the permutations effected by the rotations that fix the superlattice to generate labelings
     ! that are equivalent. The list of equivalent labelings will be used when we look for a match in the
     ! struct_enum file
     allocate(ilabeling1(n*nD1),ilabeling2(n*nD1))!,permutedLab(n*nD1)) 26 July, permutedLab not used
     read(labeling,'(500i1)') ilabeling1
     !write(*,'("ilabeling1:",/,30(i1),/)') ilabeling1
     !print *,"size",size(ilabeling1)
     !print *,"strN",strN
     call find_equivalent_labelings(ilabeling1,LattRotList1,pLabel,rotProdLab)
     ! do i = 1,size(plabel,1)
     !    write(*,'("equiv_labelings <> ",100(i1))') pLabel(i,:)
     ! enddo
  