anchor.diff:  sLVtemp = sLV 
   call make_primitive(sLVtemp,aTypTemp,aBasTemp,.false.,eps)
   if(nAt/=size(aTypTemp)) then;
  -   write(17,'(/,"ERROR: The input structure wasn''t primitive")')
  -   write(17,'("atom type: ",20(i2,1x))') aTypTemp(:)
  -   write(17,'("number of atoms: ",i2,5x," size of aTyp:",i2)') nAt, size(aTypTemp)
  +   ! write(17,'(/,"ERROR: The input structure wasn''t primitive")')
  +   ! write(17,'("atom type: ",20(i2,1x))') aTypTemp(:)
  +   ! write(17,'("number of atoms: ",i2,5x," size of aTyp:",i2)') nAt, size(aTypTemp)
      stop "ERROR: input structure for get_gspace_representation was not primitive";endif
   aTypTemp = 1; pLVtemp = sLV
   call make_primitive(pLVtemp,aTypTemp,aBasTemp,.false.,eps)
  -write(17,'("Parent lattice (columns): ",/,3(3(f7.3,1x),/))') (pLVtemp(iAt,:),iAt=1,3)
  -write(17,'("Parent lattice (in): ",/,3(3(f7.3,1x),/))') (pLV(iAt,:),iAt=1,3)
  -write(17,'("Superlattice (columns): ",/,3(3(f7.3,1x),/))') (sLV(iAt,:),iAt=1,3)
  +! write(17,'("Parent lattice (columns): ",/,3(3(f7.3,1x),/))') (pLVtemp(iAt,:),iAt=1,3)
  +! write(17,'("Parent lattice (in): ",/,3(3(f7.3,1x),/))') (pLV(iAt,:),iAt=1,3)
  +! write(17,'("Superlattice (columns): ",/,3(3(f7.3,1x),/))') (sLV(iAt,:),iAt=1,3)
   call matrix_inverse(pLVtemp,parLattTest,err)
   if(err) stop "Parent lattice of input superstructure is wrong"
   T = matmul(parLattTest,pLV)
   if(.not. equal(T,nint(T),eps)) stop "Input for get_gspace_representation is inconsistent"
  -write(17,'("Size of supercell: ",i3)') abs(nint(determinant(sLV)/determinant(pLV)))
  -write(17,'("d-set: ",/,200(3(f7.3,1x),/))') (dset(:,iAt),iAt=1,size(dset,2))
  +! write(17,'("Size of supercell: ",i3)') abs(nint(determinant(sLV)/determinant(pLV)))
  +! write(17,'("d-set: ",/,200(3(f7.3,1x),/))') (dset(:,iAt),iAt=1,size(dset,2))
   !** Calls to enumlib routines **
     ! This call generates a list of permutations for the d-set under symmetry operations
     ! of the parent lattice (need this for d-g table permutations)
  
positive.code: enddo
  if (.not. mapped) stop "The lattice sites of the two parent lattices are not coincident"
  if (.not. equal(diff,0._dp,eps)) then
     write(17,'("The atomic sites of the parent lattice of the input structure have been shifted by")')
     write(17,'(3(f8.4,1x),/)') diff
     dset = dset - spread(diff,2,size(aBas(:,2)))
     do iAt = 1, nD
        call bring_into_cell(dset(:,iAt),pLVinv,pLV,eps)
        write(17,'("new pBas: ",3(f8.4,1x))') dset(:,iAt)
     enddo
     write(17,'(/)')
     call matrix_inverse(sLV,sLVinv,err)
     if(err) stop "Superlattice vectors are co-planar in routine ""get_HNF_of_derivative_superstructure"""
     do iAt = 1, size(aBas,2)
        aBas(:,iAt) = aBas(:,iAt) - diff
        call bring_into_cell(aBas(:,iAt),sLVinv,sLV,eps)
        write(17,'("new sLV bas: ",i2,3x,3(f8.4,1x))') iAt, aBas(:,iAt)
     enddo
     write(17,'(//)')
  endif
  
  if(.not. equal(determinant(sLV)/determinant(pLV),nint(determinant(sLV)/determinant(pLV)),eps)) stop &
  
negative.code: call find_equivalent_labelings(labeling,LattRotList,pLabel)
  
  nuq = size(pLabel,1)
  ! write(17,'(/,"Number of unique labelings: ",i5)') nuq
  ! do iuq = 1, nuq
  !    write(17,'("uq Labeling # :",i3,5x,"labeling:",1x,200(i1,1x))') iuq,pLabel(iuq,:)
  ! enddo
  ! close(17)
  
  END SUBROUTINE get_gspace_representation
  
  !***************************************************************************************************
  