# Atom index out of bound

**URL:** <https://gromacs.bioexcel.eu/t/atom-index-out-of-bound/9946>\
**Category:** User discussions\
**Created:** [August 21, 2024, 9:29am UTC](https://gromacs.bioexcel.eu/t/atom-index-out-of-bound/9946 "2024-08-21T09:29:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Novaars](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@Novaars](https://gromacs.bioexcel.eu/u/Novaars)\
**Post date:** [August 21, 2024, 9:29am UTC](https://gromacs.bioexcel.eu/t/atom-index-out-of-bound/9946/1 "2024-08-21T09:29:48Z")

</div>

GROMACS version: 2019.6  
GROMACS modification: Yes/No  
Here post your question :I am encountering this error while running equilibrium simulations for my system on Ubuntu 18.04  
Command line:  
gmx grompp -f npt.mdp -r nvt.gro -c nvt.gro -t nvt.cpt -p top.top -o npt.tpr

Setting the LD random seed to 709664446  
Generated 2926 of the 2926 non-bonded parameter combinations  
Generating 1-4 interactions: fudge = 0.5  
Generated 2926 of the 2926 1-4 parameter combinations

ERROR 1 [file CA\_restr.itp, line 5]:  
Atom index (5) in position\_restraints out of bounds (1-3).  
This probably means that you have inserted topology section  
“position\_restraints”  
in a part belonging to a different molecule than you intended to.  
In that case move the “position\_restraints” section to the right molecule.

Can someone help me to fix this.  
Thank you so much for your help. I really appreciate it!  
The description of the file CA\_restr.itp is in the txt file  
[CA\_restr.txt](https://gromacs.bioexcel.eu/uploads/short-url/gSKcFzWvDN2cXAzdOI8ucQXVOuh.txt) (30.7 KB)

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [August 21, 2024, 10:53am UTC](https://gromacs.bioexcel.eu/t/atom-index-out-of-bound/9946/2 "2024-08-21T10:53:42Z")

</div>

I guess that the error message is right. Attaching only your restraint file doesn’t help. I guess you included that file somewhere too late and thus made the restraints apply to the water molecule type instead of a protein. Include the restraint file in the molecule section of the correct molecule.

---

<div class="post-metadata">

**Author:** ![Novaars](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@Novaars](https://gromacs.bioexcel.eu/u/Novaars)\
**Post date:** [September 30, 2024, 9:16am UTC](https://gromacs.bioexcel.eu/t/atom-index-out-of-bound/9946/3 "2024-09-30T09:16:24Z")

</div>

Thanks for the helpful advice! I have found the problem.

---

<div class="post-metadata">

**Author:** ![Miyu](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@Miyu](https://gromacs.bioexcel.eu/u/Miyu)\
**Post date:** [January 9, 2025, 2:45am UTC](https://gromacs.bioexcel.eu/t/atom-index-out-of-bound/9946/4 "2025-01-09T02:45:08Z")

</div>

Thanks a lot !!
