Recentering the protein and extracting frames

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

Dear All,

I have run a simulation for a protein of 123 residues and after simulation when I open the .xtc file with .gro , the protein is seen outside the simulation box. I tried to use -pbc commands (with mol and whole ) and -center -ur compact but it is still outside.

I need to center this protein and then extract frames (.pdb) at regular interval.

Also, I could do the same in vmd using pbc wrap command but then don’t know how to save the new centered coordinates as .xtc so as to use in gromacs ?
OR Is there any method to extract the individual frames using vmd (In vmd, we can save as .dcd file, but how to use it to extract frames as .pdb at regular interval)?

Thank you in advance


If all default settings fail, I usually resort to a two-step protocol as follows:

  1. use gmx trjconv -center, using a single-atom group (chosen as close to the molecule center as possible) for centering; this moves the system so that the whole molecule should be in the box
  2. then use gmx trjconv -pbc mol (or -pbc res if mol fails) to keep the molecule inside the box

In trjconv, you can use a combination of -dt and -sep to extract frames in regular intervals. In VMD, you can stride while saving the trajectory, but they will be all written to a single file (though you’re still free to write a TCL script that saves frames individually).