anchor.diff:  
   
   call find_labeling_from_atom_basis(L(:,:,1),pLV,aBas,dset,aTyp,SNF,eps,labeling)
  -write(17,'("Input atom labels: ",200(i2,1x))') aTyp
  -write(17,'("Labeling:          ",200(i2,1x))') labeling
  +! write(17,'("Input atom labels: ",200(i2,1x))') aTyp
  +! write(17,'("Labeling:          ",200(i2,1x))') labeling
   
   ! Now that we know the labeling for the input atomic basis, find all possible permutations of that
   ! labeling. These can be compared to the entries in struct_enum.out
  
positive.code: ! pick up extra symmetries from d-set permutations, these will not be effective
  ! if the allowed labels are different. In other words, it can't hurt anything.     
  
  write(17,'("After get_spaceGroup:")')
  do iAt = 1, nD
     call bring_into_cell(dsetStruc(:,iAt),pLVinv,pLV,eps) 
     call bring_into_cell(dset     (:,iAt),pLVinv,pLV,eps) 
     write(17,'("  dset struc: ",3(F8.4,1x))') dsetStruc(:,iAt)
     write(17,'("  dset      : ",3(F8.4,1x))') dset(:,iAt)   
  end do; print *
  
  nOp = size(sgrot,3)
  allocate(trow(nOp,6),vs(nOp),idx(nOp))
  open(16,file="debug_get_spacegroup.out")
  do iOp = 1, nOp
     do i = 1, 3
        write(16,'("Op#: ",i2,3x,3(f8.4,1x))') iOp,sgrot(i,:,iOp)
     end do
     write(16,'("Shift#: ",3(f8.4,1x),/)') sgshift(:,iOp)
  end do
  
  ! Find the unrotated form of this structure's HNF. We'll need this later to get the SNF's left
  ! transform matrix, L, to map atom postions into the group. The find_gspace_representation routine
  
negative.code: !        &,matmul(Ainv,aBas(:,iAt)))),diag)
  !enddo
  
  ! write(17,'("Left transform:",/,3(3i2,1x,/))') transpose(L(:,:,1))
  ! write(17,'("Smith Normal form:",/,3(3i2,1x,/))') transpose(SNFlist(:,:,1))
  ! write(17,'("Permutations:",/,8(24(i3,1x),/))') LattRotList(1)%RotIndx(:)
  SNF = SNFlist(:,:,1)
  
  ! This loads up the "perm" element of LattRotList
  call get_rotation_perms_lists(pLV,HNFout,L,SNFlist,fixOp,LattRotList,dRotList,eps)
  ! write(17,'("Rots Indx:",/,8(24(i3,1x),/))') LattRotList(1)%RotIndx(:)
  ! write(17,'("Permutation group (trans+rot):")')
  nP = size(LattRotList(1)%perm,1)
  ! do ip = 1, nP
  !    write(17,'("Perm #",i3,":",1x,200(i2,1x))') ip,LattRotList(1)%perm(ip,:)
  ! enddo
  
  !!! debug
  !print *,"HNF check",all(HNFin(:,:,1)==HNFout(:,:,1))
  