# Saving velocities and forces for a subset of the trajectory

**URL:** <https://gromacs.bioexcel.eu/t/saving-velocities-and-forces-for-a-subset-of-the-trajectory/9287>\
**Category:** User discussions\
**Tags:** gmx-trjconv\
**Created:** [June 3, 2024, 1:25pm UTC](https://gromacs.bioexcel.eu/t/saving-velocities-and-forces-for-a-subset-of-the-trajectory/9287 "2024-06-03T13:25:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvarun](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mvarun](https://gromacs.bioexcel.eu/u/mvarun)\
**Post date:** [June 3, 2024, 1:25pm UTC](https://gromacs.bioexcel.eu/t/saving-velocities-and-forces-for-a-subset-of-the-trajectory/9287/1 "2024-06-03T13:25:26Z")

</div>

GROMACS version: 2021  
GROMACS modification: No

I am trying to run a simulation of a polymer in water and to save disk space, I would like to write the positions, velocities, and forces of only the polymer atoms. i.e. I don’t want to save the information for the water molecules.

I know that I can define a group in my index file and use “compressed-x-grps” to output the coordinates of a subset of the atoms to the xtc file. Is there an equivalent command to select what to output to the trr?

The obvious workaround is to write the full trr and then use trjconv to remove the water. However I would like to avoid this to avoid writing enormous trajectories at all, if possible.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [June 3, 2024, 3:41pm UTC](https://gromacs.bioexcel.eu/t/saving-velocities-and-forces-for-a-subset-of-the-trajectory/9287/2 "2024-06-03T15:41:08Z")

</div>

There is no analogous feature for `.trr` files.
