# Error: Cannot set residue number above 9999

**URL:** <https://ask.bioexcel.eu/t/error-cannot-set-residue-number-above-9999/4894>\
**Category:** HADDOCK\
**Created:** [March 30, 2024, 8:15pm UTC](https://ask.bioexcel.eu/t/error-cannot-set-residue-number-above-9999/4894 "2024-03-30T20:15:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdraga](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@sdraga](https://ask.bioexcel.eu/u/sdraga)\
**Post date:** [March 30, 2024, 8:15pm UTC](https://ask.bioexcel.eu/t/error-cannot-set-residue-number-above-9999/4894/1 "2024-03-30T20:15:40Z")

</div>

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,

S

---

<div class="post-metadata">

**Author:** ![amjjbonvin](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/amjjbonvin/32/23_2.png) [@amjjbonvin](https://ask.bioexcel.eu/u/amjjbonvin)\
**Post date:** [April 2, 2024, 7:44am UTC](https://ask.bioexcel.eu/t/error-cannot-set-residue-number-above-9999/4894/2 "2024-04-02T07:44:25Z")

</div>

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)

[

 ![banner_education-thin.jpg](https://europe1.discourse-cdn.com/flex013/uploads/bioexcel/original/1X/9cfac13c84d79c2705cfd715146e27e79620f62a.jpeg)

[Antibody-antigen modelling tutorial using a local version of HADDOCK3](https://www.bonvinlab.org/education/HADDOCK3/HADDOCK3-antibody-antigen/#preparing-the-antibody-structure)  
[bonvinlab.org](https://www.bonvinlab.org/education/HADDOCK3/HADDOCK3-antibody-antigen/#preparing-the-antibody-structure)

]([Antibody-antigen modelling tutorial using a local version of HADDOCK3 – Bonvin Lab](https://www.bonvinlab.org/education/HADDOCK3/HADDOCK3-antibody-antigen/#preparing-the-antibody-structure))

---

<div class="post-metadata">

**Author:** ![sdraga](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@sdraga](https://ask.bioexcel.eu/u/sdraga)\
**Post date:** [April 2, 2024, 8:12am UTC](https://ask.bioexcel.eu/t/error-cannot-set-residue-number-above-9999/4894/3 "2024-04-02T08:12:18Z")

</div>

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,

Sorin
