Hello:
in the chain tool, the output format can be increase the number of digit for te integer:
try to change
903 format(i6,i4,i4,3f10.4,3i4)
into
903 format(i6,i6,i6,3f10.4,3i4)
which mean that the write of the 2nd integer is over 6 digit instead of 4.
At least the will 'insert a space automatically'.
Then try a lammps run to see in te input file is read properly.
Hope this help.
Rafael