# Rotating my System

**URL:** <https://gromacs.bioexcel.eu/t/rotating-my-system/2253>\
**Category:** User discussions\
**Created:** [May 31, 2021, 5:12am UTC](https://gromacs.bioexcel.eu/t/rotating-my-system/2253 "2021-05-31T05:12:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carmen](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@Carmen](https://gromacs.bioexcel.eu/u/Carmen)\
**Post date:** [May 31, 2021, 5:12am UTC](https://gromacs.bioexcel.eu/t/rotating-my-system/2253/1 "2021-05-31T05:12:35Z")

</div>

GROMACS version: 2020.4  
GROMACS modification: No

I need a way to rotate my entire system (DNA-Protein complex and solvent) such that the axis of the DNA lies along the x-axis, but I want the periodic boundaries to be preserved. Here’s an image of my system:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/1X/f74b011ee3a96d7336e150b4c513273db7536428.png)

When I try rotating, I end up with this:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/1X/b794dbfdfd315cdf6d781f732cf650c4f33e983c.png)

This will cause blow-ups when I run again. How can I edit things in such a way that the entire system is rotated, but molecules stay within the box? (basically the water molecules that were rotated down and went outside the box should reappear up inside the box)

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![jlottammer](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jlottammer](https://gromacs.bioexcel.eu/u/jlottammer)\
**Post date:** [June 1, 2021, 4:36am UTC](https://gromacs.bioexcel.eu/t/rotating-my-system/2253/2 "2021-06-01T04:36:04Z")

</div>

I think the “orient” plugin in VMD is quite useful for this kind of task. There are probably many other ways to do this, but hopefully this points you in the right direction at least.

[http://www.ks.uiuc.edu/Research/vmd/script\_library/scripts/orient/](http://www.ks.uiuc.edu/Research/vmd/script_library/scripts/orient/)

---

<div class="post-metadata">

**Author:** ![Carmen](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@Carmen](https://gromacs.bioexcel.eu/u/Carmen)\
**Post date:** [June 1, 2021, 8:36pm UTC](https://gromacs.bioexcel.eu/t/rotating-my-system/2253/3 "2021-06-01T20:36:46Z")

</div>

Hi, thank you for your reply!

I’m sorry, I should’ve specified that it’s the coordinate file on gromacs that I want modified, not the VMD visualization. I want to be able to continue my simulation on gromacs with the rotated system. Is that possible?

---

<div class="post-metadata">

**Author:** ![jlottammer](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jlottammer](https://gromacs.bioexcel.eu/u/jlottammer)\
**Post date:** [June 2, 2021, 6:18pm UTC](https://gromacs.bioexcel.eu/t/rotating-my-system/2253/4 "2021-06-02T18:18:05Z")

</div>

You can save out the new coordinates after aligning in vmd.

---

<div class="post-metadata">

**Author:** ![Masrul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/masrul/32/234_2.png) [@Masrul](https://gromacs.bioexcel.eu/u/Masrul)\
**Post date:** [June 3, 2021, 6:09am UTC](https://gromacs.bioexcel.eu/t/rotating-my-system/2253/5 "2021-06-03T06:09:03Z")

</div>

This will violate PBC, as once you wrap this rotated system there will be overlapping atoms. A workaround would be, align protein along x axis, and then fill box with water using **gmx solvate**
