# Gmx msd experiences error while reading index file

**URL:** <https://gromacs.bioexcel.eu/t/gmx-msd-experiences-error-while-reading-index-file/5961>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [March 11, 2023, 11:40pm UTC](https://gromacs.bioexcel.eu/t/gmx-msd-experiences-error-while-reading-index-file/5961 "2023-03-11T23:40:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![subhmaha](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@subhmaha](https://gromacs.bioexcel.eu/u/subhmaha)\
**Post date:** [March 11, 2023, 11:40pm UTC](https://gromacs.bioexcel.eu/t/gmx-msd-experiences-error-while-reading-index-file/5961/1 "2023-03-11T23:40:25Z")

</div>

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

I wanted to calculate properties such as end-to-end distance and radius of gyration of a branched polymer. So I created an index file for the polymer making sure the first and last indices constitute the ends of the longest chain. E.g.,

[mol1]  
10 1 2 3 4 5 6 8 9 11 … 42 7

When I tried to use the same index file to calculate msd, I got an error,

Calculating diffusion coefficients for molecules.  
Reading file md\_1.tpr, VERSION 2020.4 (single precision)  
Reading file md\_1.tpr, VERSION 2020.4 (single precision)

Select a group to calculate mean squared displacement for:  
Group 0 ( mol) has 42 elements  
There is one group in the index

* * *

Program: gmx msd, version 2020.4  
Source file: src/gromacs/gmxana/gmx\_msd.cpp (line 888)

Fatal error:  
The index group does not consist of whole molecules

## For more information and tips for troubleshooting, please check the GROMACS website at [Common Errors — GROMACS webpage https://www.gromacs.org documentation](http://www.gromacs.org/Documentation/Errors)

I noticed the error goes away if I use an index file where the atoms are numbered in order.

I wanted to report this issue so that it might be solved in future versions (if already not solved). I do understand that indices of the same molecule should be together in the case the where the group contains multiple molecules. I just do not understand why the indices in the molecule has to ordered in a certain way. Please let me know if I am not considering something.

Thank you in advance.
