# How does trjconv work

**URL:** <https://gromacs.bioexcel.eu/t/how-does-trjconv-work/10106>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [September 5, 2024, 4:12pm UTC](https://gromacs.bioexcel.eu/t/how-does-trjconv-work/10106 "2024-09-05T16:12:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![maham](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@maham](https://gromacs.bioexcel.eu/u/maham)\
**Post date:** [September 5, 2024, 4:12pm UTC](https://gromacs.bioexcel.eu/t/how-does-trjconv-work/10106/1 "2024-09-05T16:12:25Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question  
In my trajectory some water molecules were bound to Mg ion in a protein pocket. I wanted to track the motion of theses water molecules and calculate their displacement in absence of these ions and protein. I used trjconv to remove the ion and protein but these water molecules still appears to be bound to something. I wanted to know how does trjconv work and is this the correct approach.

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [September 5, 2024, 7:24pm UTC](https://gromacs.bioexcel.eu/t/how-does-trjconv-work/10106/2 "2024-09-05T19:24:58Z")

</div>

I’m not sure I understand what you mean. `tjrconv` will not change the environment of the water molecules if you remove the ion and protein. The water molecules will move exactly the same way - but there will be empty space in the trajectory where the removed molecules were located. `trjconv` does not change the trajectory.

---

<div class="post-metadata">

**Author:** ![maham](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@maham](https://gromacs.bioexcel.eu/u/maham)\
**Post date:** [September 6, 2024, 6:18am UTC](https://gromacs.bioexcel.eu/t/how-does-trjconv-work/10106/3 "2024-09-06T06:18:13Z")

</div>

Thank you. I also observe this but my question is this now the MG ion has been removed so why some water molecules still seems trapped inside a invisible cavity?  
I want to look at the displacement of these water molecules where they are not trapped in a cavity.

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [September 6, 2024, 6:44am UTC](https://gromacs.bioexcel.eu/t/how-does-trjconv-work/10106/4 "2024-09-06T06:44:21Z")

</div>

Then you need to run another simulation without the MG ion (and protein). All waters in the current trajectory move as if the MG ion and protein were there. The trajectory does not change based on what you decide to show in it.

---

<div class="post-metadata">

**Author:** ![maham](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@maham](https://gromacs.bioexcel.eu/u/maham)\
**Post date:** [September 6, 2024, 6:56am UTC](https://gromacs.bioexcel.eu/t/how-does-trjconv-work/10106/5 "2024-09-06T06:56:12Z")

</div>

thank you for your support.
