Trajectory processing with only water

GROMACS version:
GROMACS modification: Yes/No
Here post your question

Hi, I have a protein in water-TFE trajectory in xtc format (all_pbc.xtc) and the corresponding tpr file (npt.tpr). I need to do some analysis on water molecules only. So, I extracted only water trajectory from the xtc using: gmx trjconv -f all_pbc.xtc -s npt.tpr -o sol.xtc and select group-16(SOL). Now if I try to use: gmx trjconv -f sol.xtc -s npt.tpr -dump 0 and select SOL to get water molecules coordinates at t=0 ps, Gromacs is showing an error “Index[7441] 12376 is larger than the number of atoms in the
trajectory file (12375). There is a mismatch in the contents
of your -f, -s and/or -n files.” If I use: gmx trjconv -f sol.xtc -s npt.tpr -dump 0 and select say Protein or TFE as output groups I am getting an output gro file, which seems weird since sol.xtc does not contain trajectory information about anything other than water/SOL. Total number of atoms including protein+water+TFE+ions=17314, no of water atoms=12375,protein=434

But we do use a similar protocol in order to analyze just the protein trajectory and using npt.tpr we can dump any protein structure at a particular frame

So if anyone can help me with the error message and why I am getting it, that would be really helpful. Thanks in advance

Did you regenerate the .tpr file so that it only contains water.

No Sir, I have not regenerated tpr containing only water

Hi
With “gmx trjconv -f sol.xtc -s npt.tpr -dump 0”, you ask to analysis an xtc file with only waters using a system description tpr file with protein-TFE-Water.
Thus you have select “Protein”, the program is selecting atoms " 1 2 3 4 …" of your system (that are the protein atoms according to tpr) but in your new trajectory sol.xtc those atoms are waters atoms (since you have removed protein and TFO). That is the reason of the output you got.
The program just looks at the index numbers, does not do any check on the “atom type” and etc.
An easy solution is to provide to the option “-s” a gro file (containing only waters ) in place of tpr file (or generate a new tpr file as previuosly suggested), it depends which type of analysis you would like to do.
Alessandra

Summary

This text will be hidden

Have you now? That is what the issue is.

Dear avilla and DR_DBW, thank you both for your clarification. Now I understand the problem that I was facing. Thanks for your help.