# Index file error when running GMXPBSA2.1

**URL:** <https://gromacs.bioexcel.eu/t/index-file-error-when-running-gmxpbsa2-1/981>\
**Category:** User discussions\
**Created:** [October 19, 2020, 1:24pm UTC](https://gromacs.bioexcel.eu/t/index-file-error-when-running-gmxpbsa2-1/981 "2020-10-19T13:24:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://gromacs.bioexcel.eu/u/Jason)\
**Post date:** [October 19, 2020, 1:24pm UTC](https://gromacs.bioexcel.eu/t/index-file-error-when-running-gmxpbsa2-1/981/1 "2020-10-19T13:24:58Z")

</div>

GROMACS version: 2020.3  
GROMACS modification: No  
Here post your question

Dear all,

When I run the script gmxpbsa0.sh of the GMXPBSA2.1, I already get the following error:

Fatal error:  
Index[5885] 5887 is larger than the number of atoms in the  
trajectory file (5886)

whatever I use the trajectory containing the protein-ligand complex and the water and that only containing the protein -ligand complex. Do you have any idea how this error is caused?

Best regards.

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [October 19, 2020, 3:58pm UTC](https://gromacs.bioexcel.eu/t/index-file-error-when-running-gmxpbsa2-1/981/2 "2020-10-19T15:58:13Z")

</div>

Hi,  
in general such a error occurs, when your select a index group that, as dimension (number of atoms), does not correspond to the number of atoms in your trajectory.  
Using an index file generated from a trajectory frame usually solves the problem. To generate an index file use, gmx make\_ndx.

Kind regards  
Alessandra

---

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://gromacs.bioexcel.eu/u/Jason)\
**Post date:** [October 20, 2020, 6:29am UTC](https://gromacs.bioexcel.eu/t/index-file-error-when-running-gmxpbsa2-1/981/3 "2020-10-20T06:29:05Z")

</div>

Hello alevilla,

Thank you for you response. I use the md.gro which was generated simutaneously with the trajectory file MD.xtc in the MD simulation.  
gmx make\_ndx -f md.gro  
This index file must have the same dimension with the trajectory, doesn’t it?  
But the same error mentioned above comes out. So there might be other reason for it?

Best regards,

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [October 20, 2020, 8:00am UTC](https://gromacs.bioexcel.eu/t/index-file-error-when-running-gmxpbsa2-1/981/4 "2020-10-20T08:00:45Z")

</div>

Hi,  
Please note that not necessary the gmx mdrun output files, gro and and xtc , contain the same number of atoms.  
What is saved in xtc file, depends on mdp option `compressed-x-grps` (group(s) to write to the compressed trajectory file, by default the whole system is written).

I have no experience in using the third-party tool GMXPBSA2.1, maybe someone else in the list has or you can directly contact the authors of the script.

Kind regards  
Alessandra

---

<div class="post-metadata">

**Author:** ![biotech70](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@biotech70](https://gromacs.bioexcel.eu/u/biotech70)\
**Post date:** [January 5, 2021, 7:03am UTC](https://gromacs.bioexcel.eu/t/index-file-error-when-running-gmxpbsa2-1/981/5 "2021-01-05T07:03:18Z")

</div>

Hi dear Dr Alevilla i want to use from GMXPBSA but i get below error. please guide me.

The Folder = that you indicated in the INPUT.dat file does not exist.  
Exiting…

i set GMXPBSA Dir in bashrc as follows:  
#for gmxpbsa 2.1.2  
export GMXPBSAHOME=/home/proteininstitute/GMXPBSAtool

[INPUT.dat](https://gromacs.bioexcel.eu/uploads/short-url/ji0lBIBJCrGArcLlwZW52h4Byk1.dat) (1.0 KB)

---

<div class="post-metadata">

**Author:** ![ShintY](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/shinty/32/3572_2.png) [@ShintY](https://gromacs.bioexcel.eu/u/ShintY)\
**Post date:** [June 28, 2024, 12:33pm UTC](https://gromacs.bioexcel.eu/t/index-file-error-when-running-gmxpbsa2-1/981/6 "2024-06-28T12:33:38Z")

</div>

even i’m getting same error while everything in my INPUT.dat file seems perfect. I ran the example mmpbsa and the run went smooth with no errors but when i introduce my trajectory files i get the error

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [June 28, 2024, 1:14pm UTC](https://gromacs.bioexcel.eu/t/index-file-error-when-running-gmxpbsa2-1/981/7 "2024-06-28T13:14:21Z")

</div>

Hi,  
GMXPBSA2.1 is a third party tools. Please contact the authors of the tools for any issues.  
Best regards  
Alessandra

---

<div class="post-metadata">

**Author:** ![scinikhil](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/scinikhil/32/3483_2.png) [@scinikhil](https://gromacs.bioexcel.eu/u/scinikhil)\
**Post date:** [June 28, 2024, 9:05pm UTC](https://gromacs.bioexcel.eu/t/index-file-error-when-running-gmxpbsa2-1/981/8 "2024-06-28T21:05:53Z")

</div>

you need to change the input.dat file as per the need or as per your new trajectories.

---

<div class="post-metadata">

**Author:** ![ShintY](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/shinty/32/3572_2.png) [@ShintY](https://gromacs.bioexcel.eu/u/ShintY)\
**Post date:** [June 29, 2024, 4:58am UTC](https://gromacs.bioexcel.eu/t/index-file-error-when-running-gmxpbsa2-1/981/9 "2024-06-29T04:58:22Z")

</div>

See, i have set the c path, g path, a path and also the root directory accordingly and the example runs went fine. I have made a folder where INPUT.dat is present and its name is present in the INPUT.dat, yet i get the error saying the directory is not present. i don’t know where to ask about this since there is no forums made specially for gmxpbsa2.1. Thanks for the reply
