# PDB upload error HADDOCK2.4

**URL:** https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440
**Category:** HADDOCK
**Created:** [September 8, 2020, 3:04am UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440 "2020-09-08T03:04:13Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![hfei](https://avatars.discourse-cdn.com/v4/letter/h/53a042/32.png) [@hfei](https://ask.bioexcel.eu/u/hfei)
#### Post date: [September 8, 2020, 3:04am UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440/1 "2020-09-08T03:04:13Z")

</div>

Hi – I received this message when I upload my pdb file:  
Error in PDB file. Unknown error: string index out of range

The pdb was created by ChemBioDraw and Chem3D Pro, then opened and saved by Pymol. The file looks like this:

HETATM 1 N 1 -3.440 -0.748 3.540 0.00 0.00 N  
HETATM 2 N 1 -6.280 1.276 1.814 0.00 0.00 N  
HETATM 3 N 1 -3.375 4.072 6.280 0.00 0.00 N  
HETATM 4 N 1 -0.058 -1.494 0.306 0.00 0.00 N  
HETATM 5 N 1 -4.046 -2.617 0.839 0.00 0.00 N  
HETATM 6 N 1 -4.121 -0.493 0.826 0.00 0.00 N  
…  
HETATM 42 C 1 -2.258 -0.330 3.791 0.00 0.00 C  
HETATM 43 C 1 -1.556 -0.609 4.900 0.00 0.00 C  
HETATM 44 C 1 -2.138 -1.373 5.829 0.00 0.00 C  
HETATM 45 C 1 -3.382 -1.804 5.580 0.00 0.00 C  
HETATM 46 C 1 -4.005 -1.475 4.428 0.00 0.00 C  
HETATM 47 C 1 -5.267 -1.869 4.159 0.00 0.00 C  
HETATM 48 C 1 -5.830 -1.195 3.142 0.00 0.00 C  
…  
HETATM 138 H 1 -1.677 0.257 3.057 0.00 0.00 H  
HETATM 139 H 1 -0.530 -0.234 5.043 0.00 0.00 H  
HETATM 140 H 1 -1.614 -1.632 6.763 0.00 0.00 H  
HETATM 141 H 1 -3.854 -2.416 6.363 0.00 0.00 H  
HETATM 142 H 1 -7.601 -0.953 1.937 0.00 0.00 H  
…  
CONECT 268 123  
CONECT 269 38  
CONECT 270 38  
CONECT 271 39  
CONECT 272 39  
CONECT 273 40  
CONECT 274 125  
CONECT 275 125  
CONECT 276 41  
END

---

<div class="post-metadata">

### Author: ![hfei](https://avatars.discourse-cdn.com/v4/letter/h/53a042/32.png) [@hfei](https://ask.bioexcel.eu/u/hfei)
#### Post date: [September 8, 2020, 3:06am UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440/2 "2020-09-08T03:06:05Z")

</div>

Please could anyone help me understand what went wrong?

---

<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: [September 8, 2020, 8:52am UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440/3 "2020-09-08T08:52:52Z")

</div>

Your atoms have similar names…. All names must be unique!

---

<div class="post-metadata">

### Author: ![hfei](https://avatars.discourse-cdn.com/v4/letter/h/53a042/32.png) [@hfei](https://ask.bioexcel.eu/u/hfei)
#### Post date: [September 8, 2020, 9:10am UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440/4 "2020-09-08T09:10:34Z")

</div>

Thanks for your comments!  
I paste a section of a protein PDB below, as a reference:  
ATOM 1 N HIS A 3 59.884 14.395 8.814 1.00 94.62 N  
ATOM 2 CA HIS A 3 61.018 15.129 9.449 1.00 94.29 C  
ATOM 3 C HIS A 3 61.937 14.160 10.181 1.00 92.24 C

If I want to edit my pdb, perhaps I could add a # after the atom for a unique name? like the following?  
HETATM 1 N 1 1 -3.440 -0.748 3.540 0.00 0.00 N  
HETATM 2 N 2 1 -6.280 1.276 1.814 0.00 0.00 N  
HETATM 3 N 3 1 -3.375 4.072 6.280 0.00 0.00 N

---

<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: [September 8, 2020, 9:30am UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440/5 "2020-09-08T09:30:13Z")

</div>

Don’t put spaces in the name, i.e. rather: N1, N2, …

And also do not change the column order! if you add a number then remove a space.

---

<div class="post-metadata">

### Author: ![hfei](https://avatars.discourse-cdn.com/v4/letter/h/53a042/32.png) [@hfei](https://ask.bioexcel.eu/u/hfei)
#### Post date: [September 8, 2020, 9:42am UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440/6 "2020-09-08T09:42:49Z")

</div>

Thank you!!  
I prepared a test.pdb which contains the following as suggested:  
MODEL 1  
HETATM 1 N1 1 -3.440 -0.748 3.540 0.00 0.00 N  
HETATM 2 N2 1 -6.280 1.276 1.814 0.00 0.00 N  
HETATM 3 N3 1 -3.375 4.072 6.280 0.00 0.00 N  
HETATM 4 N4 1 -0.058 -1.494 0.306 0.00 0.00 N  
HETATM 5 N5 1 -4.046 -2.617 0.839 0.00 0.00 N  
HETATM 6 N6 1 -4.121 -0.493 0.826 0.00 0.00 N  
HETATM 7 N7 1 -1.134 -3.071 -1.838 0.00 0.00 N  
HETATM 8 N8 1 -6.435 -0.303 -4.369 0.00 0.00 N  
HETATM 9 N9 1 -6.685 -1.003 -2.301 0.00 0.00 N  
HETATM 10 N10 1 -5.692 -2.249 -3.885 0.00 0.00 N  
HETATM 11 N11 1 -3.380 1.815 2.158 0.00 0.00 N  
HETATM 12 N12 1 -4.027 3.729 1.535 0.00 0.00 N

Rasmol opened it fine. but the submission form still shows an error:  
Error in PDB file. Unknown error: string index out of range

---

<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: [September 8, 2020, 10:34am UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440/7 "2020-09-08T10:34:24Z")

</div>

You probably messed up the column order…

The PDB format is very strict! Compare your original and edited files.

Possibly read it in PyMol for example and export it again as PDB formatted file. This might correct some issues.

---

<div class="post-metadata">

### Author: ![hfei](https://avatars.discourse-cdn.com/v4/letter/h/53a042/32.png) [@hfei](https://ask.bioexcel.eu/u/hfei)
#### Post date: [September 8, 2020, 11:38am UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440/8 "2020-09-08T11:38:38Z")

</div>

I have gone thru most of the troubles but failed at a final place:  
Error in PDB file.  
Issue when parsing the PDB file at line **137**.  
Your PDB contains an elemental ion IR without specified charge

in fact, I added a charge to the end of the line, according to PDB handbook:  
HETATM 137 Ir IR 12 -4.676 0.378 2.507 0.00 0.00 IR1+

now this is really frustrated. I don’t know how to correct this error.  
Can you please help. thnx…

---

<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: [September 8, 2020, 2:53pm UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440/9 "2020-09-08T14:53:22Z")

</div>

You should format ions according to HADDOCK Requirements. See:

[https://bianca.science.uu.nl/haddock2.4/library](https://bianca.science.uu.nl/haddock2.4/library)

Note that the forum is searchable and the ion problem has been answered many times.

Also if the ion is part of your ligand it won’t work since we can not generate topologies for such systems.

---

<div class="post-metadata">

### Author: ![hfei](https://avatars.discourse-cdn.com/v4/letter/h/53a042/32.png) [@hfei](https://ask.bioexcel.eu/u/hfei)
#### Post date: [September 9, 2020, 12:45am UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440/10 "2020-09-09T00:45:38Z")

</div>

Thank you I will check these out

---

<div class="post-metadata">

### Author: ![hfei](https://avatars.discourse-cdn.com/v4/letter/h/53a042/32.png) [@hfei](https://ask.bioexcel.eu/u/hfei)
#### Post date: [September 9, 2020, 2:20am UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440/11 "2020-09-09T02:20:00Z")

</div>

Dear amjjbonvin,  
I seemed to have corrected the ion charge issue. But I still can not get through the submission stage, as the following message occurred. I wonder what next I could do.

An error has occurred, here are the details: Error reading ‘/home/enmr/csb\_webserver/data/process/haddock24/3592820364/523efefad33d3b70a612dfcc385ce1f2eb2006c4/protein2.pdb’.

---

<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: [September 9, 2020, 8:32am UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440/12 "2020-09-09T08:32:55Z")

</div>

As I explained previously, if the ion is part of the ligand it will not work…

---

<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: [September 10, 2020, 8:14am UTC](https://ask.bioexcel.eu/t/pdb-upload-error-haddock2-4/2440/14 "2020-09-10T08:14:59Z")

</div>

Only residue numbers
