# Only output protein molecule (exclude others) in trajectory files

**URL:** <https://gromacs.bioexcel.eu/t/only-output-protein-molecule-exclude-others-in-trajectory-files/4335>\
**Category:** User discussions\
**Created:** [June 22, 2022, 4:24am UTC](https://gromacs.bioexcel.eu/t/only-output-protein-molecule-exclude-others-in-trajectory-files/4335 "2022-06-22T04:24:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Teabo](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@Teabo](https://gromacs.bioexcel.eu/u/Teabo)\
**Post date:** [June 22, 2022, 4:24am UTC](https://gromacs.bioexcel.eu/t/only-output-protein-molecule-exclude-others-in-trajectory-files/4335/1 "2022-06-22T04:24:56Z")

</div>

GROMACS version: 2020  
GROMACS modification: No  
Here post your question  
Hi,  
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.

Thanks,  
Teabo

---

<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 22, 2022, 12:36pm UTC](https://gromacs.bioexcel.eu/t/only-output-protein-molecule-exclude-others-in-trajectory-files/4335/2 "2022-06-22T12:36:03Z")

</div>

Hi,  
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  
[https://manual.gromacs.org/current/user-guide/mdp-options.html#output-control](https://manual.gromacs.org/current/user-guide/mdp-options.html#output-control)  
\Alessandra

---

<div class="post-metadata">

**Author:** ![Teabo](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@Teabo](https://gromacs.bioexcel.eu/u/Teabo)\
**Post date:** [June 22, 2022, 3:11pm UTC](https://gromacs.bioexcel.eu/t/only-output-protein-molecule-exclude-others-in-trajectory-files/4335/3 "2022-06-22T15:11:46Z")

</div>

Hi Alessandra,

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

Many thanks,  
Teabo
