# Mismatch between atom numbers in index file and those reported in mdrun log file

**URL:** <https://gromacs.bioexcel.eu/t/mismatch-between-atom-numbers-in-index-file-and-those-reported-in-mdrun-log-file/2249>\
**Category:** User discussions\
**Created:** [May 30, 2021, 11:52am UTC](https://gromacs.bioexcel.eu/t/mismatch-between-atom-numbers-in-index-file-and-those-reported-in-mdrun-log-file/2249 "2021-05-30T11:52:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harry](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@Harry](https://gromacs.bioexcel.eu/u/Harry)\
**Post date:** [May 30, 2021, 11:52am UTC](https://gromacs.bioexcel.eu/t/mismatch-between-atom-numbers-in-index-file-and-those-reported-in-mdrun-log-file/2249/1 "2021-05-30T11:52:40Z")

</div>

GROMACS version:2020.3  
GROMACS modification: No  
BS"D

Tried to specify two groups for COM pulling, called END1 and END2 as follows in the  
index file

[END1]  
1 117 345 461  
[END2]  
109 225 237 353

But in the output file for the run GROMACS reports:

pull-group 1:  
atom (4):  
atom[0]=0  
atom[1]=116  
atom[2]=344  
atom[3]=460  
weight (4):  
weight[0]= 1.00000e+00  
weight[1]= 1.00000e+00  
weight[2]= 1.00000e+00  
weight[3]= 1.00000e+00  
pbcatom = 116  
pull-group 2:  
atom (4):  
atom[0]=108  
atom[1]=224  
atom[2]=236  
atom[3]=352  
weight (4):  
weight[0]= 1.00000e+00  
weight[1]= 1.00000e+00  
weight[2]= 1.00000e+00  
weight[3]= 1.00000e+00  
pbcatom = 224

So each atom number is off by one; it seems to be ordering the atoms from 0, not 1, as in the index file. Is that the way it should be?

Thanks

Harry

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [May 31, 2021, 1:48am UTC](https://gromacs.bioexcel.eu/t/mismatch-between-atom-numbers-in-index-file-and-those-reported-in-mdrun-log-file/2249/2 "2021-05-31T01:48:18Z")

</div>

This is normal. All arrays in GROMACS (like in all C/C++ code) are zero-based.

---

<div class="post-metadata">

**Author:** ![Harry](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@Harry](https://gromacs.bioexcel.eu/u/Harry)\
**Post date:** [June 2, 2021, 10:03am UTC](https://gromacs.bioexcel.eu/t/mismatch-between-atom-numbers-in-index-file-and-those-reported-in-mdrun-log-file/2249/3 "2021-06-02T10:03:46Z")

</div>

BS"D

Ok, thanks

Harry
