# Peptide not centered in box

**URL:** <https://gromacs.bioexcel.eu/t/peptide-not-centered-in-box/6871>\
**Category:** User discussions\
**Created:** [July 23, 2023, 8:15am UTC](https://gromacs.bioexcel.eu/t/peptide-not-centered-in-box/6871 "2023-07-23T08:15:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miriam](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@Miriam](https://gromacs.bioexcel.eu/u/Miriam)\
**Post date:** [July 23, 2023, 8:15am UTC](https://gromacs.bioexcel.eu/t/peptide-not-centered-in-box/6871/1 "2023-07-23T08:15:23Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question

Hi  
I am trying to run MD simulations on a peptide in gromacs (following an article called “information drivin, ensemble flexible docking using HADDOCK”)  
for some reason when I do the MD my peptide escapes the box, I think it is because originally the peptide is not centered. (I see this in the file beta\_solvated.gro)  
showing my steps, what did I do wrong?

→ gmx\_mpi pdb2gmx -f beta.pdb -o beta.gro -ignh -ff amber99sb-ildn -water tip3p  
 → gmx\_mpi editconf -f beta.gro -o beta\_pbc.gro -c -bt dodecahedron -box 4.872  
 → gmx\_mpi grompp -f vacuum.mdp -c beta\_pbc.gro -p topol.top -o beta\_vac.tpr -maxwarn 1  
 → gmx\_mpi mdrun -v -deffnm beta\_vac  
 → gmx\_mpi solvate -cp beta\_pbc.gro -cs spc216.gro -p topol.top -o beta\_solvated.gro

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

---

<div class="post-metadata">

**Author:** ![Karis](https://avatars.discourse-cdn.com/v4/letter/k/ed8c4c/32.png) [@Karis](https://gromacs.bioexcel.eu/u/Karis)\
**Post date:** [July 23, 2023, 5:50pm UTC](https://gromacs.bioexcel.eu/t/peptide-not-centered-in-box/6871/2 "2023-07-23T17:50:31Z")

</div>

My understanding is that editconf is using the center of mass of the entire system as the center, not just the protein. It looks like you have ions in the system (the purple spheres), if they were in the original pdb then editconf might have placed the center of mass of both those ions and the protein at the box center rather than centering just the protein. If you check beta\_pbc.gro and this is the case, some suggestions are to either manually specify in editconf where the box is to be centered or remove the ions and add them back in later if they’re necessary to the simulation.

To be clear, due to periodic boundary conditions, the peptide moving out one side of the box effectively means it is moving back in from the opposite side, so if the concern is simply that the peptide will ‘escape’ the box and disappear, that wouldn’t be the case
