Error with index file while using the gmx msd command with -mol flag

GROMACS version:2021.1
GROMACS modification: No
Dear colleagues,
I want to calculate the mean square displacement and diffusion coefficient of EG molecules in a simulation and also the same for water molecule. but when i am using a index file where I have only used the carbon and oxygen molecules it is showing the following error. when I am selecting the whole molecule without index file it is running but for water the job is getting killed. please help me to solve this problem

Command line:
gmx_mpi msd -f tra.xtc -s md.tpr -n index_eg.ndx -mol -o msd_eg.xvg -b 0 -e 30000

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

Select a group to calculate mean squared displacement for:
Group 0 ( System) has 48761 elements
Group 1 ( Protein) has 2411 elements
Group 2 ( Protein-H) has 1199 elements
Group 3 ( C-alpha) has 153 elements
Group 4 ( Backbone) has 459 elements
Group 5 ( MainChain) has 611 elements
Group 6 ( MainChain+Cb) has 749 elements
Group 7 ( MainChain+H) has 762 elements
Group 8 ( SideChain) has 1649 elements
Group 9 ( SideChain-H) has 588 elements
Group 10 ( Prot-Masses) has 2411 elements
Group 11 ( non-Protein) has 46350 elements
Group 12 ( Other) has 3710 elements
Group 13 ( EGO) has 3710 elements
Group 14 ( Water) has 42640 elements
Group 15 ( SOL) has 42640 elements
Group 16 ( non-Water) has 6121 elements
Group 17 (EGO_&O1_O2_C1_C2) has 1484 elements
Select a group: 17
Selected 17: 'EGO
&_O1_O2_C1_C2’


Program: gmx msd, version 2021.1
Source file: src/gromacs/gmxana/gmx_msd.cpp (line 891)

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


MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.

The error message clearly states what the issue is.

I don’t understand what you mean with “for water”. You want the diffusion coefficient of EG. What happens when you select group 13?

Dear Hess,
Thank you so much for your prompt reply.
Actually when I am choosing group 13 it is running fine as the EGO molecules are only 370 in number. but when I am selecting group 15 for water molecules the job is getting terminated after certain point of time may be due to huge number of water molecules (12000 around water molecules in system).
So I have made an index file only for water OW atom so that the number of atoms become less for water molecule and it can calculate the MSD of water in the system. But for index group it is showing this error message:
Fatal error:
The index group does not consist of whole molecules

Now I am not able to calculate the MSD for water as when I am selecting group 15 its not running even for 5 ns of simulation time. please help me with this and guide me how to resolve the issue.

I guess you’re running out of memory.

I don’t know how many frames you have. It might help to select fewer with the -dt option.

That can be the issue. i will try with -dt.
But I have a doubt why I am unable to use the index file of OW atom of water? is it necessary to use the whole water molecule? Then why -n index.ndx flag is there in gmx msd?

The index file is not linked to any way you compute MSD’s.

It’s the -mol option that requires whole molecules. It also the -mol option that increases the memory needs a factor of #molecules. If you leave out the -mol option, you can use OW.

Thank you so much. Now i have clearly understood the issue.
-mol is calculating the diffusion coefficient for each water molecule (almost 12000 molecules), so it was getting killed when gmx msd is running even for 5 ns.

It was indeed helpful
Thank you for your guidance.
Subhasree