# Re-centering the protein in the box after MD simulation

**URL:** <https://gromacs.bioexcel.eu/t/re-centering-the-protein-in-the-box-after-md-simulation/3853>\
**Category:** User discussions\
**Created:** [March 17, 2022, 6:15am UTC](https://gromacs.bioexcel.eu/t/re-centering-the-protein-in-the-box-after-md-simulation/3853 "2022-03-17T06:15:54Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Bart](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/bart/32/1389_2.png) [@Bart](https://gromacs.bioexcel.eu/u/Bart)\
**Post date:** [March 22, 2022, 1:27pm UTC](https://gromacs.bioexcel.eu/t/re-centering-the-protein-in-the-box-after-md-simulation/3853/7 "2022-03-22T13:27:56Z")

</div>

Heya,

Take a look at the post I made a while ago at the 3rd party tools section of this forum. mdvwhole will solve your problem and you do not need to fiddle with your trajectory. I do not know how you solvent is named, but after installing (takes a while as I did not clean the dependencies yet…) you should run the following command replacing WATER and IONS with their respective residue names in your system:

mdvwhole -f your\_gro\_file.gro -x your\_xtc\_file.xtc -sel ‘not resname WATER IONS’ -o whole.xtc

as the output will not include the solvent and ions, you will also need to run this command once to create a matching gro file (if you want to visualize).

mdvwhole -f your\_gro\_file.gro -x your\_gro\_file.gro -sel ‘not resname WATER IONS’ -o whole.gro

Please contact me if you have any issues and/or create an issue at the github page.

Cheers,

Bart

> [@Making densities (multimers/aggregates/objects) whole over PBC](https://gromacs.bioexcel.eu/t/making-densities-multimers-aggregates-objects-whole-over-pbc/3635):
>
> MDVWhole can be used to make broken segments over PBC whole. All you need is a coordinate and or trajectory file. It does not make any copies of the box and can handle an arbitrary amount of consecutive PBC crossings. Making things whole runs near real time on a laptop for systems including up to millions of particles. Testing is still ongoing (beta), but functionality can be expected to give the right results. We will write a short paper to explain our methodology. This tool can be used for …

---

_[View the full topic](https://gromacs.bioexcel.eu/t/re-centering-the-protein-in-the-box-after-md-simulation/3853)._
