CNT creation having more than 999 atoms

GROMACS version:
GROMACS modification: Yes/No
Hello,
I’m facing an issue while creating a CNT with more than 999 atoms. Since the PDB format restricts the atom name/serial number field to 4 characters, once it goes beyond C999, the numbering gets truncated and random values are assigned. This is causing errors. Can anyone suggest a solution for handling CNT structures with more than 999 atoms?

Only print the last three digits of the number.

But the sequence will repeat. We need to have unique no for each atom.

Is it unclear what you are referring to. The atom number field has 5 digits, the residue number 4. None have only 3.

The atom numbers are ignored completely by GROMACS. Atoms are renumbered consecutively from 1. Residues are recognized by a change in residue number. Repeats are fine, as long as consecutive residues have different numbers.