anchor.diff:    end if
   
     if(dist_readPartID) then
  -    ! If we have read particle IDs from file, they must be a number between 1 and napx.
  -    ! This is due to the partID sometimes being used as an index.
  -    ! In addition, each partID must be unique.
  -    tmpID(:) = 0
  -    do j=1,napx
  -      if(partID(j) < 1 .or. partID(j) > napx) then
  -        write(lerr,"(a,i0,a)") "DIST> ERROR Particle ID must be a value in the range 1 to ",napx," (napx)"
  -        call prror
  -      end if
  -      if(tmpID(partID(j)) == 0) then
  -        tmpID(partID(j)) = j
  -      else
  -        write(lerr,"(a,i0,a)") "DIST> ERROR Particle ID ",partID(j)," is not unique"
  -        call prror
  -      end if
  -    end do
  -
       if(dist_readParentID .eqv. .false.) then
         ! Particle parentID is not set, so we set its parentID to itself
         parentID(1:napx) = partID(1:napx)
       end if
  -
       call part_setPairID ! Set the pairID only
     else
  -    ! Now IDs provided, so we set them to the default range 1:napx and compute their corresponding pairID
  +    ! No IDs provided, so we set them to the default range 1:napx and compute their corresponding pairID
       call part_setParticleID ! Set partID, parentID and pairID
     end if
   
  
positive.code:   use numerical_constants
  
    real(kind=fPrec) chkP, chkE
    integer j, tmpID(napx)
  
    ! Finish the ION bits
    if(dist_numPart /= napx) then
  
negative.code:     ! This is added for the block to be compatible with the old, fixed column DIST file format.
      ! The scaling is hardcoded, and the file format has a few columns that are not used.
      ! Specifically the weight (column 3), and the z and pz coordinates (columns 6 and 9).
      call dist_appendFormat(dist_fmtPartID,   one,  0)
      call dist_appendFormat(dist_fmtParentID, one,  0)
      call dist_appendFormat(dist_fmtNONE,     one,  0)
      call dist_appendFormat(dist_fmtX,        c1e3, 1)
      call dist_appendFormat(dist_fmtY,        c1e3, 3)
  