anchor.diff:  
   ! Check for 2D or 3D request
   if (pLatTyp=='s' .or. pLatTyp=='S') then; LatDim = 2
  -   if (.not. equal(parLV(:,1),(/1._dp,0._dp,0._dp/),eps)) &
  -        stop 'For "surf" setting, first vector must be 1,0,0'
  +   if (.not. equal(parLV(2:3,1),(/0._dp,0._dp/),eps)) &
  +        stop 'For "surf" setting, first vector must be x,0,0'
      if (.not. equal((/parLV(1,2),parLV(1,3)/),(/0._dp,0._dp/),eps)) &
  -        stop 'For "surf" setting, first component of second and third vectors &
  +        stop 'For "surf" setting, first component of second and third vector &
                  & must be zero'
   else if(pLatTyp=='b' .or. pLatTyp=='B') then; LatDim = 3
   else; stop 'Specify "surf" or "bulk" in call to "generate_derivative_structures"';endif
  
positive.code: enddo
  write(14, '(i5," # Number of points in the multilattice")') nD
  do iD = 1,nD
     write(14,'(3(g14.8,1x),3x,"# d",i2.2," d-vector")') d(:,iD),iD
  enddo
  write(14,'(i2,"-nary case")') k
  write(14,'(2i4," # Starting and ending cell sizes for search")') nMin, nMax
  
negative.code: real(dp), pointer :: uqlatts(:,:,:) => null()
  character, pointer :: lm(:) ! labeling markers (use to generate the labelings when writing results)
  character(80) filename ! String to pass filenames into output writing routines
  character(80) formatstring
  
  if (.not. conc_check) then
    cElementN = 1
  