Error: Cannot set residue number above 9999

Hello everyone,
Hello Professor Bonvin @amjjbonvin:

I am encountering an error while preparing a rather large pdb file (3348 aminoacids in total, 3 chains with 1116 aminoacids per chain). After submitting the file to pdb_uniqname I further use pdb_reres, which gives me the error:

Cannot set residue number above 9999.

I had a look at the file and there are a lot of TER flags introduced (basically after every ATOM), not sure if this might have something to do with the problem. I also attempted pdb_tidy (-strict) before (on the original strucutre) and after pdb_uniqname with no result.

Any help is greatly appreciated!

Kind regards,


Something strange with your input PDB. It looks like you must have in it more than 9999 residues…

I assume you want your trimer to be defined as a single molecule for HADDOCK?

Check some of our tutorials for this, e.g. for preparing an antibody (you will see how to shift the residue numbering of the chains)


Antibody-antigen modelling tutorial using a local version of HADDOCK3

](Antibody-antigen modelling tutorial using a local version of HADDOCK3 – Bonvin Lab)

Thank you for your reply, Prof. Bonvin!

I was actually able to solve the problem renumbering with pymol, by using the simple alter command (keeping the 3 chains and renumbering residues in succession) thus avoiding the use of pdb_reres

Will have a look at the tutorials you provided just for the fun of it.

Kind regards,