Tutorial: MD simulation output analysis of a complex using GROMACS

4 mins read
MD simulation output analysis of a complex using GROMACS

We have provided several tutorials on molecular dynamics (MD) simulation (please check further reading section). They include installation of simulation software, simulation of a simple protein, and a complex. In this article, we will analyze the GROMACS [1] output of MD simulation of a complex.

We performed the MD simulation of human serum albumin (HSA) in complex with CMPF (Please refer to this article). This simulation was performed at 1 ns. We are going to use the same output files to analyze the results.

We have previously provided a detailed article on GROMACS [1] output analysis of MD simulation. Here, we are going to plot some important parameters based on which the complex simulation can be analyzed.

At first, correct the trajectory because the protein might appear broken or located on one side of the box. For that, use the trjconv module of GROMACS.vTo do this, we need .tpr and .xtc files as input resulted from the final MD run. Open the terminal, and type the following command:

$ gmx trjconv -s md_0_1.tpr -f md_0_1.xtc -o md_0_1_noPBC.xtc -pbc mol -center

When prompted, type “1” for selecting “Protein” as the group to be centered and “0” for “System”. It will generate md_0_1_noPBC.xtc as output that will be used for the analysis as shown below.

 1. RMSD

$ gmx rms -s md_0_1.tpr -f md_0_1_noPBC.xtc -o rmsd.xvg -tu ns

here, -tu refers to time units.

When prompted, type “4” for selecting “Backbone” and “0” for “System”. It will generate rmsd.xvg file that can be plotted using xmgrace software. The RMSD plot for this simulation looks like the one shown in the above-mentioned tutorial.


$ gmx rmsf -f md_0_1_noPBC.xtc -s md_0_1.tpr -o rmsf.xvg

When prompted, type “1” for “Protein”.

3. Radius of gyration

$ gmx gyrate -f md_0_1_noPBC.xtc -s md_0_1.tpr -o gyrate.xvg

When prompted, type “1” for protein.

4. Hydrogen bonds

gmx hbond module is used to analyze hydrogen bonds that are calculated on the basis of cutoffs for the angle Hydrogen – Donor-Acceptor and the distance Donor-Acceptor (or Hydrogen – Acceptor).

$ gmx hbond -f md_0_1_noPBC.xtc -s md_0_1.tpr -num -dist

here, -num calculates the number of hydrogen bonds and -dist calculates the average distance among them.

When prompted, select Protein and Ligand. This will display the status of hydrogen bonds between the protein and the ligand. This tells about the stability of hydrogen bonds between the protein and the ligand.

Protein-ligand interactions

If you want to see whether a hydrogen bond is present between the protein and the ligand during the complete simulation, then find the interaction between the ligand and the binding residues present in the pocket. For example, the binding residue in the pocket is Tyr150, then using the gmx distance module, you can find the hydrogen bond distance between the hydroxyl group of ligand (C1F) and the carbonyl O atom of the receptor (Tyr150).

$ gmx distance -s md_0_10.tpr -f md_0_10_center.xtc -select 'resname "C1F" and name OAB plus resid 150 and name OE1' -oall

here, -oall represents all distances as a function of time.

These are some basic operations that you can perform to analyze protein-ligand complex simulation using GROMACS modules.


  1. Abraham, M. J., Murtola, T., Schulz, R., Páll, S., Smith, J. C., Hess, B., & Lindahl, E. (2015). GROMACS: High performance molecular simulations through multi-level parallelism from laptops to supercomputers. SoftwareX1, 19-25.

Further Reading

  1. Tutorial: Molecular dynamics (MD) simulation using Gromacs.
  2. Tutorial: MD simulation output analysis of protein using GROMACS.
  3. Installing Gromacs on Ubuntu for MD Simulation
  4. MD Simulation using GROMACS: Things to remember
Muniba is a Bioinformatician based in the South China University of Technology. She has cutting edge knowledge of bioinformatics tools, algorithms, and drug designing. When she is not reading she is found enjoying with the family. Know more about Muniba

Leave a Reply

peddrew: pedigree analysis tool
Previous Story

ped_drew: A New Tool for Pedigree Visualization

This Month in Bioinformatics- Research Updates of December 2020
Next Story

This Month in Bioinformatics- Research Updates of December 2020

Latest from MD Simulation

0 $0.00