Thursday, August 9, 2012

One Way To Center a Molecule from a Gromacs calculation

When you run an MD the molecule or ligand of interest might drift a little inside your box. Sometimes (oftentimes?) you want to center that ligand and force it to be there always. Searching the internet gave me inspiration but no solution. So thinking of a solution (and reading the manual a little more carefully) I ended up figuring out that one needs to run the trjconv tool multiple times to achieve proper results. It is only specified indirectly in some of the manuals and help-documents I've been able to find.

Here is a script that will ask you what you want to center (be sure that it has a proper index in the topology file).

Happy centering.

No comments: