MD simulation in Gas Phase/Vacuum with Gromacs

For people doing MD it is a common question to ask the effect of solvent on there simulation. MD packages allow you to do Gas Phase/Vacuum simulation. Here is a short tutorial to run NVE simulation in vacuum using Gromacs.

What is key for user to understand is the fact that almost all force-fields are parameterised for solvent phase simulations. Hence the validity of gas-phase simulation done is in question.

In vacuum simulation, integration should be reduced compared to solvent phase simulation. Periodic boundary conditions, non-bonded interaction cutoffs, temperature coupling and pressure coupling were all turned off. Center of mass translation and rotation around the center of mass are to be removed to avoid the fast spin of the protein. One should also constrain the hydrogen bond using algorithms like SHAKE/LINCS.

In case domain decomposition does not work, for large systems use Point Decomposition method with ‘mdrun’
mdrun -pd -s *.tpr -v

Here is the mdp file ‘nvevacc.mdp‘ that can be used to run gas-phase simulations. However the user must remember that the with non-bonded interaction cutoffs turned off the simulation results can not be directly compared with solvent phase reactions even on a qualitative level.

Prepare Xmgrace input.

For people using scientific data-sets, often need to plot using Xmgrace (or GNUplot etc). However one might print data in multiple column format, and would like to select one of these columns only for plotting as y-axis with a user defined x-axis.

Here I am providing a perl code such as to take an file with input as shown below, and select only the 1st-column and plot it as y-axis. The code also demarks an x-axis starting with 2, with a step increment of 0.5.


0.582940966    0.52259173    0.98484968
0.456635    0.39353965    0.98544163
0.36926669    0.31931631    0.98585594
0.308628579    0.26983253    0.98615402
0.265035464    0.23422171    0.98638789
0.232430642    0.20719395    0.98656461
0.207167749    0.18594167    0.98671602
0.187011844    0.16871937    0.98683502

Perl Code – Detailed Code

Output – Output of the perl code, an input for Xmgrace.

* This is aimed at being a template for users to prepare Xmgrace input files for data generated by themselves.
You can tweak the code to do arithmetic operations before the y-axis is printed out.