# Wrapping Inquiry

**URL:** <https://gromacs.bioexcel.eu/t/wrapping-inquiry/13662>\
**Category:** User discussions\
**Created:** [August 12, 2026, 4:29pm UTC](https://gromacs.bioexcel.eu/t/wrapping-inquiry/13662 "2026-08-12T16:29:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![quantang1903](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/quantang1903/32/5145_2.png) [@quantang1903](https://gromacs.bioexcel.eu/u/quantang1903)\
**Post date:** [August 12, 2026, 4:29pm UTC](https://gromacs.bioexcel.eu/t/wrapping-inquiry/13662/1 "2026-08-12T16:29:03Z")

</div>

GROMACS version: 2023  
GROMACS modification: Yes/No

Hello Gromacs users,

I have a system which is an aptamer binds to AMP and run for 10us. Since the aptamer is moving inside the PBC a lot, so I tried to wrap it with these commands:

· gmx make\_ndx -f 5x0x\_100.tpr -o 5x0x\_index\_fixed.ndx

# Combine RNA (1) + AMP (12) → group 11 RNA\_AMP

# nojump

gmx trjconv -s 5x0x\_100.tpr -f 5x0x\_100.xtc -o traj\_nojump.xtc -n 5x0x\_index\_fixed.ndx -pbc nojump  
**output: 0 (System)**

**# whole**

gmx trjconv -s 5x0x\_100.tpr -f traj\_nojump.xtc -o traj\_whole.xtc -n 5x0x\_index\_fixed.ndx -pbc whole

**output: 0 (System)**

**# center + compact**

gmx trjconv -s 5x0x\_100.tpr -f traj\_whole.xtc -o traj\_center.xtc -n 5x0x\_index\_fixed.ndx -center -pbc mol -ur compact

**center: 18 (RNA\_AMP)**  
**output: 0 (System)**

**# fit**

gmx trjconv -s 5x0x\_100.tpr -f traj\_center.xtc -o traj\_fit.xtc -n 5x0x\_index\_fixed.ndx -fit rot+trans

**fit reference: 18 (RNA\_AMP)**

**output: 0 (System)**

Unfortunately, after I fit the trajectory with -fit rot+trans and visualize it in VMD, the PBC box is moving around the aptamer, so when I use +x and -x for PBC, it does not align. Could you please help me how should I wrap my system?

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [August 13, 2026, 8:26am UTC](https://gromacs.bioexcel.eu/t/wrapping-inquiry/13662/2 "2026-08-13T08:26:07Z")

</div>

Hi @quantang1903

If I understand correctly you want to take a look at the PBC images after the full PBC clean-up procedure.

I think there is no way around this. Or you stop before the `-fit rot+trans` step, so you stay in the box reference frame, and so you can correctly represent the PBC images of your molecules, or you fit to a frame, and so you “move” your reference frame to the molecule, but in that case the box itself will rotate around the fitted molecule, and so will the PBC images. I would honestly visualize the trajectory before the fitting procedure if I wanted to check PBC and after if I wanted to check the molecule behaviour.

---

<div class="post-metadata">

**Author:** ![quantang1903](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/quantang1903/32/5145_2.png) [@quantang1903](https://gromacs.bioexcel.eu/u/quantang1903)\
**Post date:** [August 15, 2026, 1:18am UTC](https://gromacs.bioexcel.eu/t/wrapping-inquiry/13662/3 "2026-08-15T01:18:44Z")

</div>

Hi obZehn,

Thank you so much for your suggestion. I stopped at the step before -fit rot+trans, and the PBC stopped moving, which is exactly what I want. However, I am not sure whether I need to include the -fit step, because if I stop at the center+compact step, the RNA moves more than when I include -fit as the box is moving along the RNA.

Quan

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [August 23, 2026, 7:17am UTC](https://gromacs.bioexcel.eu/t/wrapping-inquiry/13662/4 "2026-08-23T07:17:36Z")

</div>

Hello @quantang1903

This is really up to you. The output of the simulation doesn’t (and shouldn’t) change with a clean up of the trajectory. So if you are worried about quantities like RMSD, RMSF, distances etc these are independent from any fitting. Personally, the `rot+trans` refitting is something useful when visualising complex trajectoriers, but I would be aware that a rotating box might cause issues with some tools.

---

<div class="post-metadata">

**Author:** ![quantang1903](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/quantang1903/32/5145_2.png) [@quantang1903](https://gromacs.bioexcel.eu/u/quantang1903)\
**Post date:** [August 24, 2026, 5:27pm UTC](https://gromacs.bioexcel.eu/t/wrapping-inquiry/13662/5 "2026-08-24T17:27:40Z")

</div>

Hi obZehn,

Thank you so much for your suggestion; it is very helpful for my project!
