Only output protein molecule (exclude others) in trajectory files

GROMACS version: 2020
GROMACS modification: No
Here post your question
I have a system including protein and water molecules, and protein is the only molecule I care about in my analysis. Therefore, in mdrun, I want to have only protein (water molecules are not important) as the only molecule saved and output in the trajectories (.xtc). In this way, the generated trajectory files only have protein and will not be too large to save.
So I wonder if this is possible in GROMACS and how to set up this kind of mdrun. Thank you so much in advance.


In the mdp file you can control the frequency and (in same cases) the groups want to save in the output files.
You can control which groups to save in the xtc trajectory file by using the option compressed-x-grps (e.i. compressed-x-grps=protein)
see more here

Hi Alessandra,

Yes, this is what I want to know. Thank you so much for your information and kind reply.

Many thanks,