Centering using Gromacs


One of the things we need to do from time is get rid of the drift in a simulation. This is especially important for TDMD simulations (and see below!). This can be done in VMD, but we find that VMD does not do that great a job (or else we are not good at telling VMD how to do it using TCL!). So we come to Gromacs and 'gmx trjconv'.

For basic centering, you may be able to simply run gmx trjconv on the DCD with the PDB as a reference:
gmx trjconv -s molecule.pdb -f molecule.dcd -center -o molecule.trr
This will ask you the normal questions about which selections to center on, etc (read the trjconv manual!).

This often leaves the molecule with a lot of residual rotations, however. Especially in TDMD simulations, this seems to be true. gmx trjconv has the '-fit progressive' option which does take care of these rotations rather nicely. But it requires a Gromacs tpr (binary run parameters file) for the reference. Which feels like you need to do the simulation in Gromacs, but there is a way to create this file.
  1. gmx pdb2gmx -f molecule.pdb -o molecule.gro -water none (this will produce molecule.gro, topol.top and posre.itp)
  2. gmx editconf -f molecule.gro -o molecule_box.gro -c -bt cubic -box 100 100 100 -d 50 (this will add a PBC box of L=1000A)
  3. Use the file mdout.mdp for the next step
  4. gmx grompp -f mdout.mdp -c molecule_box.gro -p topol.top -o molecule.tpr -maxwarn 1 (The process will complain that the system is charged, and PME is not good for this, etc)