# Centerign the protein in the xy plane of the membrane after the MD simulation

**URL:** <https://gromacs.bioexcel.eu/t/centerign-the-protein-in-the-xy-plane-of-the-membrane-after-the-md-simulation/7908>\
**Category:** User discussions\
**Tags:** mdrun\
**Created:** [December 23, 2023, 8:11am UTC](https://gromacs.bioexcel.eu/t/centerign-the-protein-in-the-xy-plane-of-the-membrane-after-the-md-simulation/7908 "2023-12-23T08:11:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dulaj](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/dulaj/32/3408_2.png) [@Dulaj](https://gromacs.bioexcel.eu/u/Dulaj)\
**Post date:** [December 23, 2023, 8:11am UTC](https://gromacs.bioexcel.eu/t/centerign-the-protein-in-the-xy-plane-of-the-membrane-after-the-md-simulation/7908/1 "2023-12-23T08:11:40Z")

</div>

GROMACS version: 2023.2  
GROMACS modification: No  
Here post your question

I have done an MD simulation for a protein-dppc bilayer system. After 1000ns I have now achieved a converged system. After 1000ns, the protein is in a corner in the xy plane of the membrane. Now, I want to center the protein. I hope to run md simulation after docking with the docked ligand using this same sytem. Is it correct? Also, I though it is better if the protein is in the center at the begining of my post docking mdruns.  
I used gmx trjconv to center the protein giving the final frame of the mdrun (in PDB) as the input structure (as -f ) . However, I could not get a protein-centered system. Could you please tell me a method to do this?

---

<div class="post-metadata">

**Author:** ![milosz.wieczor](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@milosz.wieczor](https://gromacs.bioexcel.eu/u/milosz.wieczor)\
**Post date:** [December 24, 2023, 11:15am UTC](https://gromacs.bioexcel.eu/t/centerign-the-protein-in-the-xy-plane-of-the-membrane-after-the-md-simulation/7908/2 "2023-12-24T11:15:01Z")

</div>

There are a few options; if your protein is multimeric, it’s often preferable to define a single central-enough atom group in the `.ndx` to use with `gmx trjconv -center` so that PBC issues don’t come into play. Some more basic solutions involve moving the whole system around with VMD, or using `gmx editconf` with the `-translate` option.

If you want to keep your lipids wrapped around the molecule at the end, don’t forget to run `gmx trjconv -pbc mol` or `-pbc res` with the final structure.

---

<div class="post-metadata">

**Author:** ![Dulaj](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/dulaj/32/3408_2.png) [@Dulaj](https://gromacs.bioexcel.eu/u/Dulaj)\
**Post date:** [December 25, 2023, 6:36am UTC](https://gromacs.bioexcel.eu/t/centerign-the-protein-in-the-xy-plane-of-the-membrane-after-the-md-simulation/7908/3 "2023-12-25T06:36:07Z")

</div>

Thank you so much for your reply!  
I tried gmx trjconv in several ways. I tried to center just one chain also. It was also failed. I did not try gmx editconf yet. I will try those ways you have given!

---

<div class="post-metadata">

**Author:** ![Dulaj](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/dulaj/32/3408_2.png) [@Dulaj](https://gromacs.bioexcel.eu/u/Dulaj)\
**Post date:** [December 25, 2023, 8:31am UTC](https://gromacs.bioexcel.eu/t/centerign-the-protein-in-the-xy-plane-of-the-membrane-after-the-md-simulation/7908/4 "2023-12-25T08:31:38Z")

</div>

Finally, I could translate the coordinates and get the protein into the center by using this kind of command,  
gmx trjconv -f 1000ns.pdb -n onegroup.ndx -o centered.pdb -s 1000ns.tpr -trans 7 1 0 -pbc mol -ur compact

I changed vector values in the -trans flag and checked whether the protein is centered. Finally, I could do it.
