Molecular dynamics / Trajectory analysis

How to Analyze MD Simulation Results

After a simulation finishes, the usual problem is not knowing where to start. Molecules cut by the box edge make RMSD jump for no physical reason, and there are many metrics without a clear answer to each one. This page lists the analysis steps in order. For each metric it gives the group selection, how to read the plot, and the question it answers; common wrong results are collected in the troubleshooting section.

Short answer

Analyze a GROMACS trajectory in this order: first handle periodic boundaries, then compute metrics such as RMSD and hydrogen bonds, and finally check whether the simulation has converged. A flat RMSD curve does not prove equilibrium; convergence needs at least three independent replicas and checks such as block-averaged errors.

About this page

How-to guide
What this page solves
The simulation has finished and you have a trajectory. You want to know whether the ligand stays in the pocket, whether the protein is stable, and whether the results can go into a paper. This page lists the analysis steps in order: it starts with repairing periodic boundaries, and each step says which question it answers, how to compute it, and what a normal result looks like.
Who it is for
Graduate students or researchers who have finished a GROMACS production run and are starting the analysis. You know basic gmx commands, but you are not sure how to choose groups for each metric or how to judge the result.
What you will have
You will have a prepared trajectory, the data and plots for each metric, a plot of replica means with their intervals, and the analysis results and reporting points needed for a paper.
Covers
  • Periodic boundary handling: why it is needed and in which order to run it, using a protein-ligand complex
  • Commands, group selection and plot reading for RMSD, RMSF, radius of gyration, SASA, hydrogen bonds and secondary structure
  • Judging equilibrium and convergence: replicas, block averaging and cosine content of principal components
  • The minimum reporting in a paper, and the command changes between GROMACS versions
Does not cover
  • Building and running the simulation (see the GROMACS protein-ligand guide)
  • Parameters and interpretation of MM/GBSA binding free energy (see the analysis section of the GROMACS page)
  • Theory behind PCA and free-energy landscapes (this page gives only the workflow and reading points)
  • Full usage of MDAnalysis and MDTraj (only example scripts are given)

Main steps

Step 1

Why this stepThe simulation uses a periodic box. A molecule that crosses the box edge is cut in two, or jumps to the other side. RMSD and distances computed from such coordinates show spikes of several nanometers that are not real. This step makes each molecule whole in every frame and centers the complex.

The GROMACS manual recommends this order: first make molecules whole (-pbc whole), then remove jumps across the box with the first frame as reference (-pbc nojump), then center on the complex (-center). If needed, cluster first (-pbc cluster).

Centering translates the whole system, so nojump cannot be used after it. -pbc, -fit, -ur and -center may not combine into the result you want in one trjconv call, so run them in several calls.

The fitted trajectory is only for visualization and MDAnalysis. gmx rms, gmx rmsf and gmx covar fit internally. gmx hbond, gmx sasa, gmx rdf and gmx dssp use periodic boundaries for distances, while fitting rotates the coordinates and leaves the box vectors unchanged, so these tools should read the centered, unfitted trajectory. All commands below use md_center.xtc.

If molecules jump, or the ligand seems to leave the protein, see the troubleshooting section.

Multi-chain protein or protein–ligand complexbash
# Multi-chain protein or protein-ligand complex: official order whole -> nojump -> center -> fit
# 0) Create a protein+ligand group (ligand residue name LIG as an example)
printf '"Protein" | "LIG"\nq\n' | gmx make_ndx -f md.tpr -o index.ndx
# 1) Make molecules broken by the box whole
printf "System\n" | gmx trjconv -s md.tpr -f md.xtc -o md_whole.xtc -pbc whole
# 2) Build a reference frame with protein and ligand on the same side (check it in VMD/PyMOL), then use it for nojump
printf "Protein_LIG\nSystem\n" | gmx trjconv -s md.tpr -f md_whole.xtc -n index.ndx -o frame0.gro -dump 0 -pbc mol -center -ur compact
printf "System\n" | gmx trjconv -s frame0.gro -f md_whole.xtc -o md_nojump.xtc -pbc nojump
# 3) Center on protein+ligand; do not use -pbc nojump after centering
printf "Protein_LIG\nSystem\n" | gmx trjconv -s md.tpr -f md_nojump.xtc -n index.ndx -o md_center.xtc -center
# 4) For visualization and MDAnalysis only: fit on the protein backbone; no PBC option after this step
printf "Backbone\nSystem\n" | gmx trjconv -s md.tpr -f md_center.xtc -n index.ndx -o md_fit.xtc -fit rot+trans
Tell real dissociation from a display artifactbash
# Real dissociation or a display artifact: mindist uses PBC and does not depend on trjconv processing
printf "Protein\nLIG\n" | gmx mindist -s md.tpr -f md.xtc -n index.ndx -od mindist_pl.xvg -tu ns
# Minimum distance between the protein and its periodic image; it should stay above the non-bonded cutoff (rcoulomb, rvdw)
printf "Protein\n" | gmx mindist -s md.tpr -f md.xtc -pi -od mindist_pi.xvg -tu ns
  1. 01

    Make molecules whole

    -pbc whole makes each molecule whole within the box. Select System for output.

  2. 02

    Build a reference frame and run nojump

    First export frame 0 with the complex as reference, and confirm that the protein and ligand are on the same side. Then use it as the starting point for nojump. If the reference frame is split, the whole trajectory stays split.

  3. 03

    Center

    Center on protein and ligand. After centering, do not use -pbc nojump.

  4. 04

    Fit (for visualization only)

    Fit on the backbone. No further PBC processing after this.

Step 2

Why this stepRMSD (root-mean-square deviation) measures how far each frame is from a reference structure. It answers two questions: has the protein kept its fold, and has the ligand stayed near its starting position?

gmx rms needs two group selections: the first is the fit group and the second is the calculation group. For the protein, choose Backbone for both.

For the ligand RMSD, use the protein backbone as the fit group and the ligand as the calculation group. The value then includes the ligand translation and rotation in the pocket and its own conformational change. If both selections are the ligand, a ligand that has left the pocket still gives a small RMSD.

With md.tpr as reference, the reference is the start of production. With em.tpr, the reference is the crystal structure after energy minimization. The starting difference between the two curves reflects the drift that already happened during equilibration.

RMSD commands (GROMACS 2026)bash
# Backbone RMSD: first prompt = fit group, second prompt = calculation group
printf "Backbone\nBackbone\n" | gmx rms -s md.tpr -f md_center.xtc -o rmsd_bb.xvg -tu ns
# RMSD relative to the crystal structure (em.tpr)
printf "Backbone\nBackbone\n" | gmx rms -s em.tpr -f md_center.xtc -o rmsd_xtal.xvg -tu ns
# Ligand RMSD: fit on protein backbone, compute on ligand, no fit on the ligand itself
printf "Backbone\nLIG\n" | gmx rms -s md.tpr -f md_center.xtc -n index.ndx -o rmsd_lig.xvg -tu ns
# Ligand internal conformational change only (a different quantity; report it separately)
printf "LIG\nLIG\n" | gmx rms -s md.tpr -f md_center.xtc -n index.ndx -o rmsd_lig_self.xvg -tu ns
# All-to-all RMSD matrix, to see whether the system revisits sampled states
printf "Backbone\nBackbone\n" | gmx rms -s md.tpr -f md_center.xtc -m rmsd_matrix.xpm -dt 100
  1. 01

    Backbone RMSD of the protein

    Use the start of production as reference, fit, then compute the backbone RMSD.

  2. 02

    RMSD against the crystal structure

    Use em.tpr (the crystal structure after energy minimization) as reference.

  3. 03

    Ligand RMSD

    Fit on the protein backbone and compute the ligand RMSD. It reflects the ligand moving relative to the pocket plus its own conformational change.

  4. 04

    Ligand conformational change alone

    Fit the ligand on itself, which reports only conformational change. It means something different from the previous item, so report the two separately.

  5. 05

    All-to-all matrix

    Compute the RMSD between every pair of frames, to check whether the system returns to conformations already sampled (see step 7).

Step 3

Why this stepRMSF (root-mean-square fluctuation) measures how far each residue moves around its average position. It shows which residues move a lot and which stay relatively fixed.

gmx rmsf fits by least squares by default, and -res gives one average per residue. Remove the equilibration segment first, or the heating and equilibration stages raise the RMSF of every residue.

For a multi-chain protein, compute the RMSF chain by chain, or fit each chain separately first; otherwise the relative motion between chains is added to every residue. When comparing two systems, average the RMSF over replicas and plot the spread between them.

On a single trajectory, differences of about 0.05 nm often fall within the spread between replicas, so do not draw conclusions from one trajectory alone.

C-alpha RMSF after removing equilibrationbash
# Drop the first 10 ns (-b in ps because -tu is not set); per-residue C-alpha RMSF
printf "C-alpha\n" | gmx rmsf -s md.tpr -f md_center.xtc -b 10000 -res -o rmsf.xvg -oq bfac.pdb
  1. 01

    Remove equilibration and compute the Cα RMSF

    -b 10000 discards the first 10 ns (for this command -b is in ps, so -tu is not given).

  2. 02

    Look at the peaks by residue

    Peaks at the N- and C-termini and in surface loops are usually the largest.

  3. 03

    Write B-factors

    -oq converts RMSF to B-factors in a PDB file. Color it by B-factor in PyMOL and compare it with the crystal B-factors side by side.

Step 4

Why this stepThe radius of gyration and SASA describe the protein from two sides: compactness and surface exposure. Read together, they show whether the protein stays compact and whether its surface changes.

The radius of gyration (Rg) is the mass-weighted root-mean-square distance of the selected atoms from their center of mass, and it measures how compact the protein is. SASA (solvent-accessible surface area) is the area traced by the center of a 0.14 nm probe sphere rolling over the molecular surface.

The default is 24 surface points per atom (-ndots 24); increase -ndots for per-residue comparisons. gmx sasa outputs nm²; MDTraj shrake_rupley also outputs nm², while MDAnalysis uses Å for lengths, so convert when mixing tools.

Compute the radius of gyration and SASAbash
# Radius of gyration (new implementation since GROMACS 2024, selected with -sel)
gmx gyrate -s md.tpr -f md_center.xtc -sel Protein -o gyrate.xvg -tu ns
# SASA: -surface contains all non-solvent atoms, -output takes subsets of it
gmx sasa -s md.tpr -f md_center.xtc -surface Protein -o sasa.xvg -or resarea.xvg -tu ns
# Protein-ligand system
gmx sasa -s md.tpr -f md_center.xtc -surface 'group "Protein" or resname LIG' \
         -output 'group "Protein"' 'resname LIG' -o sasa_pl.xvg -tu ns
  1. 01

    Radius of gyration

    -sel Protein selects the protein, and -tu ns puts time on the axis in nanoseconds.

  2. 02

    SASA

    -surface includes all non-solvent atoms, and -output selects a subset of them.

Step 5

Why this stepA hydrogen bond is a directional interaction, and the key ones often define the binding mode. Counting them over time shows whether the important interactions are maintained.

From GROMACS 2024, gmx hbond uses geometric criteria: donor–acceptor distance up to 0.35 nm (-hbr), hydrogen–donor–acceptor angle up to 30° (-hba), and donor and acceptor elements N and O by default.

Give both -r and -t selections. -num must be written explicitly, or no hydrogen-bond count file is produced.

gmx hbond (new) and gmx hbond-legacy (lifetime)bash
# GROMACS 2024+ new implementation: both -r and -t are required; -num must be given explicitly
gmx hbond -s md.tpr -f md_center.xtc -r Protein -t Protein -num hbnum.xvg -tu ns
# Protein-ligand H-bonds; -o writes the atom indices of each H-bond pair
gmx hbond -s md.tpr -f md_center.xtc -r Protein -t 'resname LIG' -num hbnum_pl.xvg -o hbond_pl.ndx -tu ns
# For lifetimes or an existence matrix use the legacy tool: -ac gives Luzar-Chandler rate constants, -hbm gives per-pair existence per frame
printf "Protein\nLIG\n" | gmx hbond-legacy -s md.tpr -f md_center.xtc -n index.ndx \
         -num hbnum_legacy.xvg -ac hbac.xvg -hbn hbond.ndx -hbm hbmap.xpm
  1. 01

    Hydrogen bonds within the protein

    Select Protein for both -r and -t. -num writes the number of hydrogen bonds over time.

  2. 02

    Protein–ligand hydrogen bonds

    Select the ligand for -t. -o writes the atom indices of each hydrogen-bond pair, so you can see which pairs they are.

Step 6

Why this stepSecondary structure labels each residue as helix, β strand or coil. Tracking it over time reveals local or global structural changes.

gmx dssp assigns secondary structure from the hydrogen-bond pattern between residues and outputs one-letter codes such as H (α-helix), E (β-strand), G (3₁₀-helix), I (π-helix), P (κ-helix, i.e. polyproline II), T, S, B and ~ (loop).

gmx dsspbash
# GROMACS 2023+ has DSSP v4 built in; no external dssp binary or DSSP variable needed
gmx dssp -s md.tpr -f md_center.xtc -sel Protein -o dssp.dat -num dssp_num.xvg -tu ns
# Structures without hydrogens: build pseudo-hydrogens from C and O
gmx dssp -s protein_noH.pdb -f protein_noH.pdb -sel Protein -hmode dssp -clear -o dssp_noH.dat
  1. 01

    Run gmx dssp

    -num writes the number of residues in each class per frame; each line of dssp.dat is one frame.

  2. 02

    If the structure has no hydrogens

    The default -hmode gromacs uses hydrogens already in the structure. For a structure without hydrogens, use -hmode dssp together with -clear (see the troubleshooting section).

  • -num outputs the number of residues in each secondary structure type per frame, suitable for a stacked plot over time; each line of dssp.dat is one frame and can be plotted in Python as a residue × time map.

Step 7

Why this stepEquilibrium means the system has moved away from the influence of its starting structure. Convergence means the quantity of interest is reliably estimated from the sampling you have. Neither can be judged by whether the RMSD curve has flattened. Before reporting averages, confirm that the time window you use is well sampled.

Block averaging, cosine content and subspace overlapbash
# Block-averaging error estimate (Hess 2002), production part only
gmx analyze -f gyrate.xvg -b 10 -ee gyrate_errest.xvg
# Cosine content: project one PC at a time, then run gmx analyze -cc
printf "C-alpha\nC-alpha\n" | gmx covar -s md.tpr -f md_center.xtc -b 10000 -o eigenval.xvg -v eigenvec.trr -av average.pdb
printf "C-alpha\nC-alpha\n" | gmx anaeig -s md.tpr -f md_center.xtc -b 10000 -v eigenvec.trr -eig eigenval.xvg -first 1 -last 1 -proj pc1.xvg
gmx analyze -f pc1.xvg -cc pc1_cosine.xvg
# Run covar on each half (production 10-60 ns here), then compare the subspaces spanned by the first 10 eigenvectors
printf "C-alpha\nC-alpha\n" | gmx covar -s md.tpr -f md_center.xtc -b 10000 -e 35000 -o eigval_h1.xvg -v eigvec_h1.trr
printf "C-alpha\nC-alpha\n" | gmx covar -s md.tpr -f md_center.xtc -b 35000 -e 60000 -o eigval_h2.xvg -v eigvec_h2.trr
gmx anaeig -v eigvec_h1.trr -v2 eigvec_h2.trr -first 1 -last 10 -over overlap.xvg
  1. 01

    Several independent replicas

    Start from NVT with different random seeds (gen_seed = -1) to regenerate velocities. Use at least three replicas per condition. The reasoning is in the explanation section.

  2. 02

    Block averaging

    Split the production segment into blocks of different numbers and compute the standard error of the block means. If the error reaches a plateau as the block length grows, the sampling is adequate.

  3. 03

    Cosine content of the principal components

    Run PCA on the production segment and compute the cosine content of PC1. A value near 1 means the simulation has certainly not converged.

  4. 04

    Compare the two halves

    Run PCA on each half and compare the overlap of their subspaces.

  5. 05

    All-to-all RMSD matrix

    gmx rms -m computes the RMSD between every pair of frames. Low-RMSD blocks off the diagonal show that the system returns to states it has already sampled.

MethodHowCriterionSource
Independent replicasRegenerate velocities with different random seeds (gen_seed = -1) from NVT; at least 3 replicas per conditionReplica means and their confidence intervals overlap; no overlap indicates insufficient samplingCommunications Biology 2023 reliability checklist item 1c; Grossfield et al. 2018 Sec. 4.4
Block averagingSplit the production part into different numbers of equal blocks and compute the standard error of the block meansThe standard error plateaus as blocks grow longer; if it keeps rising, the correlation time is comparable to the trajectory lengthGrossfield et al. 2018 Sec. 7.3.2; gmx analyze -ee (Hess 2002)
Cosine content of principal componentsRun PCA on the production part and compute the cosine content of the PC1 and PC2 projectionsClose to 1: the simulation is certainly not converged and the motion is close to random diffusion; values from a single 1 ns piece are widely spread and cannot prove convergence aloneHess, Phys. Rev. E 2002
First half vs. second halfRun PCA on each half and compare subspace overlap, or compare the distributions of the metricsBoth halves give consistent distributions and main directions of motiongmx anaeig -over manual
All-to-all RMSD matrixCompute the RMSD between every pair of frames with gmx rms -mLow-RMSD blocks off the diagonal show the system revisiting sampled statesGrossfield et al. 2018 Sec. 4.2

Choose by your situation

Hand it to an agent

Example instruction: “Run 3 independent replicas of lysozyme 1AKI at 300 K, 50 ns each; handle periodic boundaries with whole, nojump and centering; compute backbone RMSD, C-alpha RMSF, radius of gyration, SASA, intra-protein hydrogen bonds and DSSP; assess convergence with block averaging and cosine content; plot multi-replica mean ±SD figures and a PC1/PC2 free energy landscape.”

The agent uses the preinstalled GROMACS 2026.3 GPU build on a cloud computer for system setup, simulation and analysis: it generates mdp and tpr files, rents GPUs as needed to run the 3 replicas, executes the trjconv and analysis commands on this page, and summarizes and plots with Python. The project keeps the mdp, tpr, logs, xvg files, PNG figures and analysis scripts, so the work can be reproduced. The agent runs an adversarial review of the results, checking that every replica finished and that no jumps remain after PBC handling.

You still need to check yourself: whether the force field and water model suit your question, whether the simulation length covers the process you care about, whether the group selections match what the paper says, and whether the conclusions are supported given the differences between replicas.

Choice

A single-chain soluble protein such as lysozyme needs only two calls. For multi-chain proteins, complexes and membrane proteins, see the table for the order of steps.

Single-chain protein (lysozyme)bash
# Single-chain soluble protein (e.g. lysozyme): two calls are enough
# Call 1: center on Protein, put every molecule back in the box; output System
printf "Protein\nSystem\n" | gmx trjconv -s md.tpr -f md.xtc -o md_center.xtc -pbc mol -center -ur compact
# Call 2 (for visualization and MDAnalysis only): fit on Backbone, output System; no PBC option after this step
printf "Backbone\nSystem\n" | gmx trjconv -s md.tpr -f md_center.xtc -o md_fit.xtc -fit rot+trans
SystemRecommended processingTypical problem with a single step
Single-chain soluble protein (lysozyme etc.)-pbc mol -center -ur compact once, then fit separatelyUsually sufficient
Multi-chain protein, protein–ligand, protein–nucleic acidwhole → nojump with frame 0 as reference → center on the complex → fitChains, or ligand and protein, end up on opposite sides of the box; RMSD and ligand distances jump
Membrane proteinwhole → nojump → center on the membrane or protein, -pbc cluster for lipids if neededLipids are cut; membrane thickness, area and protein tilt are wrong
Groups: center on the protein or protein+ligand, output System; fit on Backbone.

Choice

The last command in the hydrogen-bond code block of the main line is gmx hbond-legacy, which produces lifetimes and occupancy matrices. The table shows which tool gives which result.

Result neededToolNotes
H-bond count vs. timegmx hbond -numNew implementation, one-column output
Occupancy of each H-bondgmx hbond-legacy -hbn -hbm, or MDAnalysis count_by_ids()Occupancy = frames present / total frames; papers usually list the pairs with the highest occupancy
H-bond lifetimegmx hbond-legacy -ac, or MDAnalysis lifetime()Legacy -ac gives rate constants from the Luzar–Chandler model; the developers recommend the Forward line of the -ac result, and the -life output is not used as a lifetime
Comparison with other softwareState the criteriaMDAnalysis defaults to D–A 3.0 Å and D–H–A ≥ 150°, unlike the GROMACS defaults of 0.35 nm and 30°, so counts differ

Choice

PCA diagonalizes the covariance matrix of the fitted atomic coordinates; the eigenvectors with the largest eigenvalues (principal components) describe the collective motions with the largest amplitude. A free energy landscape (FEL) converts the 2D distribution P of the trajectory on two principal components into G = −kT ln P.

PCA and FEL workflowbash
# 1) Covariance matrix on C-alpha only, equilibration removed (-b in ps)
printf "C-alpha\nC-alpha\n" | gmx covar -s md.tpr -f md_center.xtc -b 10000 -o eigenval.xvg -v eigenvec.trr -av average.pdb
# 2) Project on PC1 and PC2; -2d writes two columns (PC1 PC2) without a time column
printf "C-alpha\nC-alpha\n" | gmx anaeig -s md.tpr -f md_center.xtc -b 10000 -v eigenvec.trr -eig eigenval.xvg \
       -first 1 -last 2 -2d 2dproj.xvg
# 3) Extreme structures along PC1, to see the direction of motion
printf "C-alpha\nC-alpha\n" | gmx anaeig -s md.tpr -f md_center.xtc -v eigenvec.trr -first 1 -last 1 -extr pc1_extreme.pdb -nframes 10
# 4) Free energy landscape: -notime is required; set -tsham to the simulation temperature
gmx sham -f 2dproj.xvg -notime -tsham 300 -ngrid 40 40 40 -nlevels 50 -ls fel.xpm -lp prob.xpm
  • gmx anaeig -2d writes two columns (PC1 and PC2) with no time column; read them with gmx sham using -notime.
  • -tsham defaults to 298.15 K; set it to the simulation temperature. Without -xmin/-xmax the axis ranges are taken from the data. gmx sham outputs kJ/mol with the minimum at 0.
  • To compare FELs of two systems (for example with and without ligand), concatenate both trajectories and run covar once, then project each; only then are both maps in the same coordinates. PCA done separately gives different PC1 directions that cannot be compared directly.
  • eigenval.xvg gives the eigenvalues; compute the fraction of total variance for PC1 and PC2 and put it in the figure caption.
  • Minimum depths in an FEL depend on the amount of sampling. The FEL of a single short trajectory shows where that trajectory stayed, not the equilibrium distribution; an FEL from concatenated replicas is more reliable, and the number of frames used should be reported.
  • Getting representative structures from a minimum (an experience-based approach from gmx-users): find the frames whose PC1 and PC2 fall in the minimum bin in 2dproj.xvg, then export them with gmx trjconv -dump. fel_from_2dproj.py below prints the frame indices in the lowest bin; indices start from the anaeig -b start time, and multiplying by the output interval gives the time.
  • To build an FEL from two other quantities (for example RMSD and Rg), paste the value columns of two xvg files into a two-column file and pass it to gmx sham -notime; gmx sham only converts a histogram into energies, and you decide which quantities go in.

Choice

MSD (mean square displacement) is used to compute diffusion coefficients; the RDF (radial distribution function) describes the density of one type of particle around reference particles.

gmx msd fits a straight line on 10% to 90% of the MSD curve by default; if the ends of the curve are not linear, set the range with -beginfit and -endfit. Use a trajectory that has been processed with nojump for MSD (see step 2 of the complex workflow above). gmx rdf uses a bin width of 0.002 nm by default, and -rmax 0 means half the box length.

bash
# Water self-diffusion (fit on 10%-90% of the MSD curve by default)
gmx msd -s md.tpr -f md_nojump.xtc -sel 'resname SOL and name OW' -o msd.xvg
# RDF of water oxygens around the ligand
gmx rdf -s md.tpr -f md_center.xtc -ref 'resname LIG' -sel 'resname SOL and name OW' -selrpos res_com -o rdf.xvg

Choice

Use this to extend a finished run or to continue an interrupted one. The full instructions are in the continuing and extending section of the GROMACS protein-ligand guide.

Extending a run and joining continuation partsbash
# Extend a finished run (ps; +100 ns here)
gmx convert-tpr -s md.tpr -extend 100000 -o md_ext.tpr
gmx mdrun -deffnm md -s md_ext.tpr -cpi md.cpt   # appends to the existing files by default
# With -noappend you get md.part0002.xtc etc. (the number is the simulation part and increases with each part); concatenate before analysis
gmx trjcat -f md.xtc md.part0002.xtc -o md_all.xtc

Concepts and judgment

Explanation

The simulation only succeeded if ligand RMSD is below 2 Å

2 Å is the success threshold used to evaluate pose reproduction by docking and co-folding methods; PoseBusters, for example, counts the fraction with RMSD ≤ 2 Å. It is not a criterion for MD stability. In MD, judge whether the binding mode is kept from the ligand RMSD after backbone fitting, the distances between the ligand and key pocket residues, and H-bond occupancy.

A flat RMSD means the system has equilibrated

A flat RMSD curve only shows that it did not change much over this window. The system can still switch between several states. For how to judge, see the convergence section on this page.

Lower RMSD means a more stable protein

A low RMSD only means the structure is close to the reference. Proteins with many flexible regions, disordered peptides and multi-domain proteins normally have larger RMSD. When comparing mutants or ligands, compare multi-replica means and intervals with the same groups and the same reference.

Rg only measures how compact the selected atoms are

An Rg computed on the protein alone has nothing to do with ligand binding strength. The claim in popular tutorials that “a smaller radius of gyration means tighter protein–ligand binding” has no basis. A steadily rising Rg indicates partial unfolding or domain separation; a stable Rg only means the overall size is stable.

  • RMSF peaks usually appear at the N- and C-termini and surface loops. Interpreting a peak directly as an active site has no basis; compare with known functional sites, crystallographic B-factors or the RMSF of the apo system.
  • A single residue switching from coil to β-bridge in a few frames is a common fluctuation. Only secondary structure changes that recur across replicas and persist for a substantial fraction of the time are suitable as conclusions.

Explanation

Basis for the number of replicas: the Communications Biology 2023 reliability checklist asks for at least 3 simulations per condition with statistical analysis, and for evidence that results are independent of the initial configuration. Knapp et al. (JCTC 2018) ran 100 replicas for each of two systems; their rule of thumb is a minimum of 5 to 10 replicas, and conclusions from several shorter replicas are more reliable than from a single long trajectory.

Limits of the cosine content: Berk Hess noted on the gmx-users list that convergence of the subspace spanned by the first 10 eigenvectors does not mean the first few eigenvectors themselves have converged. A low cosine content only rules out “close to random diffusion”; it does not prove sufficient sampling.

Reference and appendix

Reference

Most tutorials are based on GROMACS 2018–2022. The table lists commands whose behavior has changed in 2026.

CommandChange and versionProblem with the old usageCurrent usage
gmx do_dsspReplaced by the native gmx dssp in GROMACS 2023, implementing DSSP v4The command no longer exists; mkdssp and the DSSP variable are no longer neededgmx dssp -sel Protein -o dssp.dat -num dssp_num.xvg; -nopolypro reproduces DSSP v2 behavior
gmx hbondRewritten in GROMACS 2024; the old implementation is renamed gmx hbond-legacyOld tutorials choose two groups interactively and use -life, -ac, -hbmUse two selections, -r and -t (both required); the new tool has no -ac, -life or -hbm, so call gmx hbond-legacy when you need them
gmx hbond -num-num is an optional output in the new toolWithout -num, no H-bond count vs. time file is written; the old hbnum.xvg had two columns, the new one has oneWrite -num hbnum.xvg explicitly
gmx gyrateRewritten in GROMACS 2024; the old implementation is renamed gmx gyrate-legacyOld options such as -p, -moi, -nz are not in the new toolSelect with -sel, weight with -mode mass|charge|geometry; output has 4 columns: Rg and its components around x, y, z
-tu with -b/-e-b, -e and -dt are interpreted in the -tu unit (time options in the source code)-tu ns -b 10000 means starting at 10000 ns; tested on this page, gmx rms stops with Specified frame (time 10000000.000000) doesn't exist or file corrupt/inconsistent.With -tu ns write -b 10; without -tu write -b 10000 (ps)
gmx hbond with no donors or acceptors in a selection2024.3 fixed the premature exit (issue 5080)Early 2024 releases exit with an error for some selectionsUse 2024.3 or later; for ligands with carboxylate or sulfonate groups, cross-check with hbond-legacy or MDAnalysis. A ligand topology from ACPYPE without atomic numbers triggers the same error; see the hydrogen bond section

Reference

The first script reads the .xvg files of several replicas, plots each replica, the mean and a ±1 SD band, and prints the replica-to-replica standard error and the block-averaged standard error of the production part. The second plots an FEL directly from 2dproj.xvg. The third computes the same metrics with MDAnalysis and MDTraj.

The MDAnalysis RMSF class does not fit, so the trajectory must first be aligned to the average structure. AlignTraj in the script uses in_memory=True and rewrites the coordinates in memory, so RMSF is computed after RMSD and hydrogen bonds.

plot_replicas.py (usage: python plot_replicas.py "rep*/rmsd.xvg" 10 "RMSD (nm)")python
# Usage: python plot_replicas.py "rep*/rmsd.xvg" 10 RMSD_nm
# Arguments: xvg glob, equilibration time to discard (same unit as the xvg time column), y-axis label
import glob
import sys

import matplotlib

matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np


def read_xvg(path):
    """Read a GROMACS .xvg: skip # and @ lines, stop at & (first data set only)"""
    rows = []
    with open(path) as fh:
        for line in fh:
            s = line.strip()
            if not s or s[0] in "#@":
                continue
            if s.startswith("&"):
                break
            rows.append([float(v) for v in s.split()])
    return np.array(rows)


def block_se(x, n_blocks):
    """Block-average standard error: split into n_blocks equal blocks, return the SE of the block means"""
    m = len(x) // n_blocks
    blocks = x[: m * n_blocks].reshape(n_blocks, m).mean(axis=1)
    return blocks.std(ddof=1) / np.sqrt(n_blocks)


pattern, t_equil, ylabel = sys.argv[1], float(sys.argv[2]), sys.argv[3]
files = sorted(glob.glob(pattern))
if len(files) < 2:
    sys.exit("need at least 2 replicas, found %d" % len(files))
data = [read_xvg(f) for f in files]
n = min(len(d) for d in data)
t = data[0][:n, 0]
for f, d in zip(files, data):
    if not np.allclose(d[:n, 0], t):
        sys.exit("time axis differs: %s" % f)
Y = np.stack([d[:n, 1] for d in data])  # column 2; total Rg is also column 2
mean, sd = Y.mean(axis=0), Y.std(axis=0, ddof=1)

fig, ax = plt.subplots(figsize=(6, 3.5), dpi=200)
for f, y in zip(files, Y):
    ax.plot(t, y, lw=0.6, alpha=0.5, label=f.split("/")[0])
ax.plot(t, mean, lw=1.5, color="black", label="mean")
ax.fill_between(t, mean - sd, mean + sd, color="gray", alpha=0.3, label="±1 SD")
ax.axvline(t_equil, ls="--", lw=0.8, color="gray")
ax.set_xlabel("Time (same unit as xvg)")
ax.set_ylabel(ylabel)
ax.legend(fontsize=6, frameon=False)
fig.tight_layout()
fig.savefig("replicas.png")

# Production statistics: mean per replica, then SE = SD across replicas / sqrt(n)
prod = Y[:, t >= t_equil]
rep_means = prod.mean(axis=1)
se = rep_means.std(ddof=1) / np.sqrt(len(rep_means))
print("replica means:", np.round(rep_means, 4))
print("mean = %.4f, SE across replicas = %.4f (n=%d)" % (rep_means.mean(), se, len(rep_means)))
# Block averaging: the SE should plateau as blocks grow; no plateau means insufficient sampling
for nb in (40, 20, 10, 5):
    if prod.shape[1] < 2 * nb:  # at least 2 frames per block; skip when there are too few frames
        continue
    print("rep1 blocks=%2d  SE=%.4f" % (nb, block_se(prod[0], nb)))
fel_from_2dproj.py (usage: python fel_from_2dproj.py 2dproj.xvg 300)python
# Usage: python fel_from_2dproj.py 2dproj.xvg 300
# Same definition as gmx sham: G = -kT ln P, shifted so the minimum is 0
import sys

import matplotlib

matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np

path, T = sys.argv[1], float(sys.argv[2])
xy = np.array([[float(v) for v in l.split()[:2]] for l in open(path)
               if l.strip() and l.strip()[0] not in "#@&"])
H, xe, ye = np.histogram2d(xy[:, 0], xy[:, 1], bins=40)
P = H / H.sum()
kT = 0.0083144626 * T  # kJ/mol
with np.errstate(divide="ignore"):
    G = -kT * np.log(P)
G -= G[np.isfinite(G)].min()
fig, ax = plt.subplots(figsize=(4.5, 3.8), dpi=200)
im = ax.pcolormesh(xe, ye, np.ma.masked_invalid(G).T, cmap="viridis", shading="flat")
fig.colorbar(im, label="G (kJ/mol)")
ax.set_xlabel("PC1 (nm)")
ax.set_ylabel("PC2 (nm)")
fig.tight_layout()
fig.savefig("fel.png")
print("frames: %d, empty bins: %d / %d" % (len(xy), int((H == 0).sum()), H.size))
# Frame indices in the lowest free-energy bin (counted from the anaeig -b start); export representative structures with gmx trjconv -dump
i, j = np.unravel_index(np.nanargmin(np.where(np.isfinite(G), G, np.nan)), G.shape)
ix = np.clip(np.digitize(xy[:, 0], xe) - 1, 0, len(xe) - 2)
iy = np.clip(np.digitize(xy[:, 1], ye) - 1, 0, len(ye) - 2)
print("frames in the minimum bin:", np.where((ix == i) & (iy == j))[0][:20])
mda_analysis.py (usage: python mda_analysis.py frame0.pdb md_fit.xtc)python
# Usage: python mda_analysis.py frame0.pdb md_fit.xtc
# MDAnalysis 2.10 cannot read GROMACS 2026 tpr files (Your tpx version is 138, which this parser does not support),
# so export frame0.pdb with gmx trjconv -dump 0 as topology; pass md.tpr directly where the tpr can be read
import sys

import MDAnalysis as mda
import mdtraj as md
import numpy as np
from MDAnalysis.analysis import align, rms
from MDAnalysis.analysis.hydrogenbonds import HydrogenBondAnalysis

top, traj = sys.argv[1], sys.argv[2]
u = mda.Universe(top, traj)
protein = u.select_atoms("protein")
has_lig = len(u.select_atoms("resname LIG")) > 0

# 1) RMSD: fit on backbone; ligand RMSD via groupselections, computed after the backbone fit with no extra fit
R = rms.RMSD(u, u, select="backbone",
             groupselections=["resname LIG"] if has_lig else None, ref_frame=0).run()
np.savetxt("rmsd_mda.dat", R.results.rmsd, fmt="%.4f",
           header="frame time_ps backbone_A" + (" ligand_A" if has_lig else ""))

# 2) Radius of gyration (Å, mass-weighted)
rg = np.array([(ts.time, protein.radius_of_gyration()) for ts in u.trajectory])
np.savetxt("rg_mda.dat", rg, fmt="%.4f", header="time_ps rg_A")

# 3) H-bonds: 3.5 Å to stay close to the GROMACS default; state the criteria in the paper
sel = "protein or resname LIG" if has_lig else "protein"
if hasattr(u.atoms, "charges"):  # tpr topology: guess hydrogens and acceptors from charges
    hb = HydrogenBondAnalysis(u, between=["protein", "resname LIG"] if has_lig else None,
                              d_a_cutoff=3.5, d_h_a_angle_cutoff=150)
    hb.hydrogens_sel = hb.guess_hydrogens(sel)
    hb.acceptors_sel = hb.guess_acceptors(sel)
else:  # PDB topology has no charges: select N/O donors, acceptors and H by atom name
    hb = HydrogenBondAnalysis(u, between=["protein", "resname LIG"] if has_lig else None,
                              donors_sel="(%s) and (name N* or name O*)" % sel,
                              hydrogens_sel="(%s) and name H*" % sel,
                              acceptors_sel="(%s) and (name O* or (resname HI* and name ND1 NE2))" % sel,
                              d_a_cutoff=3.5, d_h_a_angle_cutoff=150)
hb.run()
np.savetxt("hbnum_mda.dat", np.column_stack([hb.times, hb.count_by_time()]),
           fmt="%.3f", header="time_ps n_hbonds")
id2ix = {i: k for k, i in enumerate(u.atoms.ids)}  # count_by_ids returns atom ids (1-based), not indices
for d, h, a, n in hb.count_by_ids()[:15]:  # 15 pairs with the highest occupancy
    D, A = u.atoms[id2ix[d]], u.atoms[id2ix[a]]
    print("%s%d:%s -> %s%d:%s  occupancy=%.2f" % (
        D.resname, D.resid, D.name, A.resname, A.resid, A.name, n / u.trajectory.n_frames))
tau, acf = hb.lifetime(tau_max=50)  # continuous autocorrelation; tau in frames
np.savetxt("hb_lifetime_acf.dat", np.column_stack([tau, acf]), fmt="%.4f")

# 4) RMSF: MDAnalysis RMSF does not fit; align to the C-alpha average structure first (in_memory rewrites coordinates in u)
avg = align.AverageStructure(u, u, select="protein and name CA", ref_frame=0).run()
align.AlignTraj(u, avg.results.universe, select="protein and name CA", in_memory=True).run()
ca = u.select_atoms("protein and name CA")
F = rms.RMSF(ca).run()
np.savetxt("rmsf_mda.dat", np.column_stack([ca.resids, F.results.rmsf]), fmt="%.4f",
           header="resid rmsf_A")

# 5) SASA: MDTraj Shrake-Rupley (probe 0.14 nm, result in nm^2)
t = md.load(traj, top="frame0.pdb")
t = t.atom_slice(t.topology.select("protein"))
sasa = md.shrake_rupley(t, probe_radius=0.14, mode="residue")
np.savetxt("sasa_total_nm2.dat", np.column_stack([t.time, sasa.sum(axis=1)]), fmt="%.3f")

Reference

The items below come from the Communications Biology 2023 MD reliability and reproducibility checklist and from Grossfield et al.'s best practices for uncertainty. There is no accepted minimum simulation length; it must match the timescale of the process studied.

Common reviewer questionEvidence needed to answer
Only one trajectoryAdd at least 3 independent replicas and report the mean and interval across replicas
Equilibration claimed from a flat RMSD aloneBlock-averaged errors, first-half vs. second-half comparison, cosine content or an all-to-all RMSD matrix
Averages include the equilibration partState the discarded time and show the conclusion is insensitive to how much is discarded
Ligand RMSD fitted only on the ligandRecompute ligand RMSD after fitting on the protein backbone, and add distances between ligand and pocket residues
H-bond criteria not stated or different from the literatureState the distance and angle thresholds and the tool used
RMSF peaks interpreted as functional sitesCompare with known functional sites, B-factors or the apo system
FEL from a single short trajectoryConcatenate replicas, run one PCA, and report the number of frames and the temperature
Results disagree with experimentCheck that force field and water model, protonation states, temperature and ion concentration match the experimental conditions, and state whether the simulation length covers the timescale observed experimentally
  • At least 3 independent replicas per condition, with a statement of how they were generated (different initial velocities or different starting configurations).
  • State how equilibration and production were split, and which part and how many frames were analyzed.
  • State the simulation and analysis software and versions, for example GROMACS 2026.3 and the MDAnalysis version; for H-bonds, SASA and similar metrics state the criteria and parameters.
  • Provide a system composition table: box dimensions, total number of atoms, ion concentration, protonation states.
  • Provide initial coordinates, input files (mdp, top, itp) and final coordinates as supplementary material or in a public repository.
  • Give an uncertainty for each mean and state whether it is a standard deviation, a standard error or a 95% confidence interval; with few replicas, plot every replica's value instead of only a mean with error bars.
  • Report only significant figures, for example write 1.23456 ± 0.1 as 1.2 ± 0.1.
  • Connect simulation results with experimental data where possible, for example crystallographic B-factors, NMR chemical shifts or SAXS curves.

Reference

The following comes from Sobereva's blog, Jerkwin's blog, answers on the Keinsci forum and CSDN tutorials, checked against the GROMACS 2026 manual and the current versions of the tools.

Common DuIvyTools commandsbash
# DuIvyTools 0.6.0 (install with pip, command name dit)
pip install DuIvyTools
dit xvg_show -f rmsd.xvg                      # view a single curve
dit xvg_compare -f rep1/rmsd.xvg rep2/rmsd.xvg rep3/rmsd.xvg -c 1 1 1   # replicas on one plot
dit xpm_show -f fel.xpm                       # view the free energy landscape from gmx sham
dit xpm2csv -f fel.xpm -o fel.csv             # x, y, z columns for Origin or similar software
dit dssp -f dssp.dat -o dssp.xpm -x "Frame"     # turn dssp.dat from gmx dssp into an old-style xpm and two xvg files

The analysis commands in Jerkwin's Chinese tutorial are outdated

Jerkwin's Chinese GROMACS tutorial and Chinese manual both carry the note "this manual is outdated and no longer updated" at the top. The analysis part of the tutorial is based on GROMACS 4.6/5.1 and uses g_rms, g_sas, do_dssp, g_hbond and g_MMPBSA. GROMACS 2026 only has the gmx plus tool-name form, and g_sas corresponds to gmx sasa; for the changes to do_dssp and gmx hbond see the version table above. The analysis approach in the tutorial is still useful, but the commands must be rewritten against the current manual.

Choose the FEL grid by the number of frames

The default -ngrid of gmx sham is 32. Sobereva compared 50×50, 75×75, 100×100 and 200×200 grids for a PC1/PC2 projection of 10,000 frames: with many bins the map breaks up and the low-energy basins get holes, with few bins the edges become blocky; 75×75 worked best in that example, and he suggests trying values between 60×60 and 120×120. With few frames (for example 1,000 points after taking every 10th frame), reduce the number of bins or apply Gaussian smoothing to the points. When a forum user reported an FEL without visible basins, one of Sobereva's answers was that the grid spacing of the plot was too large.

Keep empty bins when plotting in Origin or similar software

Bins with zero probability have no free energy value. If only the bins with data are exported and handed to SigmaPlot, Origin or similar software for interpolation, the empty regions get interpolated into low-energy areas that do not exist. Sobereva keeps these bins and sets them to a constant 1 to 1.5 kT above the largest valid value, then adjusts the limits of the color scale. Keep the empty bins as well when converting fel.xpm to x, y, G columns with a script.

Atom selection and variance fraction in PCA

In Sobereva's example system with 232 Cα atoms, the first 10 principal components explain only 58.7% of the motion and PC1 plus PC2 explain 32.2%; he concluded that PCA on all Cα atoms is of little value there. Large motions in irrelevant regions such as flexible termini mask the motion of the region of interest; gmx covar can be run on the atoms of the binding pocket or of one domain only. Put the variance fraction of PC1 and PC2 in the figure caption; when it is low, the FEL reflects only a small part of the motion.

gmx dssp no longer writes an xpm map

From GROMACS 2023, gmx dssp writes only a data file and no longer produces the xpm map of the old do_dssp, so plotting scripts written for xpm do not work directly. Jerkwin wrote dssp2gp, which turns dssp.dat into a gnuplot script; dit dssp in DuIvyTools converts it to xpm and xvg. Residues in dssp.dat are renumbered from 1; when this differs from the original PDB numbering, give the starting number in dssp2gp as firstResidue:lastResidue:startNumber.

DuIvyTools

DuIvyTools is a GROMACS result plotting tool written by a Chinese developer, with Chinese documentation at duivytools.readthedocs.io. Analysis tutorials on CSDN often use it to look at curves and xpm files quickly; the commands are in the code block below. It is suited to checking data and making draft plots; for replica statistics in paper figures, keep using the Python scripts above so that means and intervals are reported.

Troubleshooting by error or symptom

Each item is titled by the message or symptom you see, with the cause and fix together.

RMSD jumps between 0 and 6 nm

Cause: Only one step was done, -pbc mol -ur compact -center, so molecules split across the box edge were not repaired (a forum case with a DNA system).

Fix: Process in the order whole, nojump, center, fit. In the same case, the RMSD dropped to 0.2–0.6 nm after this order.

The complex RMSD is about 1.5 nm, while other replicas are about 0.3 nm

Cause: In the reference structure for nojump, the protein and ligand were already on opposite sides of the box, so the whole trajectory keeps them apart. Justin Lemkul explains that whether a molecule is whole is determined by the topology, but not every tpr has coordinates suitable as a centering or nojump reference.

Fix: Export the centered frame 0 first, confirm that the protein and ligand are on the same side, and use it for nojump.

After centering, the ligand seems to drift away from the protein

Cause: The way trjconv processes the frames can cause a display artifact, or the ligand may really have left the binding site.

Fix: Compute the minimum protein–ligand distance with gmx mindist on the original md.xtc. If it stays within contact distance, it is a display artifact. If it keeps increasing, the ligand has really dissociated.

gmx mindist -pi gives a distance smaller than the non-bonded cutoff

Cause: The protein interacts directly with its own periodic image, and results such as RMSD and Rg are affected.

Fix: Enlarge the box and run the simulation again.

The ligand has left the pocket, but its RMSD is still small

Cause: Both the fit group and the calculation group were the ligand, so the RMSD reflects only the ligand conformation.

Fix: Use the protein backbone as the fit group and the ligand as the calculation group (see step 2).

The RMSF of every residue is high

Cause: The calculation included the heating and equilibration stages.

Fix: Remove the equilibration segment with -b (see step 3).

The SASA looks like the water surface area, or the ligand SASA is too large

Cause: Choosing SOL as the calculation group gives the surface area of water. Choosing only the ligand counts ligand surface hidden by the protein as accessible.

Fix: -surface must include all non-solvent atoms in the system, and -output selects a subset when you need separate results.

gmx gyrate does not recognize the old options -p, -moi or -nz

Cause: GROMACS 2024 rewrote gmx gyrate, and the old implementation is now gmx gyrate-legacy, which has the old options.

Fix: Use -sel for the group and -mode mass|charge|geometry for the weighting. For the old options, call gmx gyrate-legacy.

gmx do_dssp: command not found

Cause: Since GROMACS 2023, the built-in gmx dssp replaces it, and no external dssp program or DSSP environment variable is needed.

Fix: gmx dssp -s md.tpr -f md_center.xtc -sel Protein -o dssp.dat -num dssp_num.xvg. To reproduce DSSP v2 results, add -nopolypro.

gmx hbond reports has no donors AND has no acceptors for a membrane-lipid selection such as POPC

Cause: Forum reports say the new tool gives this error for a POPC selection, while hbond-legacy runs normally.

Fix: Use gmx hbond-legacy, or compute with MDAnalysis and cross-check the two.

With a carboxylate or sulfonate on the ligand, the hydrogen-bond count is too low or zero

Cause: GitLab issue 4985 reports that the new gmx hbond does not recognize carboxylate and sulfonate groups on small molecules as acceptors.

Fix: Compute again with hbond-legacy or MDAnalysis and cross-check against the new result.

gmx hbond -t 'resname LIG' reports Selection 'resname LIG' has no donors AND has no acceptors! Nothing to be done.

Cause: The atomtypes written by ACPYPE have no atomic numbers, so the ligand atoms have atomnumber -1 in the tpr, and the new gmx hbond cannot identify the ligand donors and acceptors. The hydroxyl hydrogen bond to Gln102 is still found by hbond-legacy.

Fix: Add atomic numbers to the atomtypes and run grompp again; see step 3 of the GROMACS page. Check with gmx dump -s md.tpr | grep atomnumber.

hbnum.xvg is not written, or an old script reads the wrong number of columns

Cause: In the new gmx hbond, -num is optional and has one column; the old hbnum.xvg had two.

Fix: Write -num hbnum.xvg explicitly, and read one column.

gmx rms reports Specified frame (time 10000000.000000) doesn't exist or file corrupt/inconsistent

Cause: The -b value is read in the units given by -tu. With -tu ns, -b 10000 means 10000 ns, far beyond the trajectory length.

Fix: With -tu ns use -b 10; without -tu use -b 10000 (ps).

For a structure without hydrogens, nearly all helices are output as S (bend)

Cause: The default -hmode gromacs uses hydrogens already in the structure. For a structure with no hydrogens, this mode gives no error but wrong results.

Fix: Use -hmode dssp, which generates pseudo-hydrogens from C and O, and add -clear to drop residues missing key atoms.

Secondary-structure results differ from old do_dssp or VMD output

Cause: The DSSP versions differ. gmx dssp by default matches DSSP v4, and -nopolypro corresponds to DSSP v2.

Fix: First confirm that both results use the same DSSP version, then compare them.

An old xpm plotting script cannot read the gmx dssp output

Cause: Since GROMACS 2023, gmx dssp writes only data files and does not produce the xpm plot that do_dssp made.

Fix: Use dit dssp from DuIvyTools to convert to the old xpm and xvg, or dssp2gp from Jerkwin to make a gnuplot script (see the reference section).

gmx sham prints Read 1 sets of N points and There are 40 bins in the 1-dimensional histogram, giving a one-dimensional distribution

Cause: gmx sham by default treats the first column as time (-time is on), but 2dproj.xvg has no time column.

Fix: Add -notime. The screen should show Read 2 sets of N points.

gmx covar reports Segmentation fault

Cause: The memory and time of the covariance matrix grow at least with the square of the atom count, so a full-atom run can run out of memory.

Fix: Use only Cα or backbone atoms.

The free-energy landscape shows no valleys, or the image looks broken

Cause: The number of bins does not match the number of frames. Too many bins leave holes, and too few give angular edges.

Fix: Try between 60×60 and 120×120 bins. With few frames (for example only 1000 points after keeping every 10th frame), use fewer bins or Gaussian smoothing of the data.

After interpolation in Origin, empty regions show low-energy areas that do not exist

Cause: Only the populated bins were exported, so the interpolation fills the empty regions with low energies.

Fix: Keep the empty bins, set them to a constant 1 to 1.5 kT above the largest valid value, then adjust the color scale.

MDAnalysis reads tpr and reports Your tpx version is 138, which this parser does not support

Cause: MDAnalysis 2.10.0 does not support the tpr written by GROMACS 2026.3.

Fix: Export frame0.pdb as the topology with gmx trjconv -s md.tpr -f md_fit.xtc -o frame0.pdb -dump 0 (select System for output). A PDB has no charges, so guess_hydrogens is unavailable, and the script uses explicit selections by atom name instead.

In the hydrogen-bond list the donor shows as a neighboring hydrogen, not N or O

Cause: count_by_ids() returns atom ids, not AtomGroup indices. Writing u.atoms[d] directly shifts the lookup by one atom.

Fix: Map the ids to indices with id2ix before picking atoms. After the fix, the tested output is LIG164:O -> GLN102:OE1, which matches the crystal structure.

Old-tutorial commands such as g_rms, g_sas and g_hbond are reported as not found

Cause: Old tutorials are based on GROMACS 4.6 and 5.1, and these commands were renamed or changed in GROMACS 2026.

Fix: Rewrite them as gmx subcommands: g_sas becomes gmx sasa and do_dssp becomes gmx dssp. The version table has the rest.

RMSF of a multi-chain protein looks high at the chain interfaces

Cause: The relative motion between chains is added to each residue.

Fix: Compute chain by chain, or fit each chain separately first.

Sources

FAQ

What is the difference between RMSD and RMSF?

RMSD gives one value per frame: the overall deviation of the selected atoms from a reference structure, plotted against time. RMSF gives one value per atom or residue: its fluctuation around the average position over the whole trajectory, plotted against residue number. RMSD shows how the overall structure changes with time; RMSF locates flexible regions.

What RMSD counts as stable? Is there a universal threshold?

There is no universal threshold. The common “below 0.2 nm” comes from docking pose-reproduction benchmarks and does not apply to MD. Compare means and intervals across replicas with the same groups and the same reference, and judge convergence with block averaging or replica comparison.

How do I compute H-bond lifetimes after GROMACS 2024?

The new gmx hbond does not compute lifetimes. Use gmx hbond-legacy -ac to get rate constants and lifetimes from the Luzar–Chandler model, or compute the autocorrelation function with MDAnalysis HydrogenBondAnalysis.lifetime(). State the criteria and tool in the paper.

gmx do_dssp says the command does not exist. What now?

Since GROMACS 2023 do_dssp has been replaced by the built-in gmx dssp, and no external dssp program is needed. The command is gmx dssp -s md.tpr -f md_center.xtc -sel Protein -o dssp.dat -num dssp_num.xvg.

My simulation disagrees with experiment. What should I check first?

First confirm the analysis itself: periodic boundaries handled, equilibration removed, correct groups. Then check whether the simulation conditions match the experiment: force field and water model, protonation states, temperature and ion concentration. Finally judge whether the simulation length covers the process observed experimentally, and whether several replicas give consistent results.

How do I analyze a continued run?

When you extend with gmx convert-tpr -extend and continue with -cpi, mdrun appends to the original files by default, so analyze them directly. With -noappend you get files such as .part0002; concatenate them with gmx trjcat first, then apply the same periodic boundary workflow.

Hand this workflow to Scientify

The scientific agent runs the preinstalled GROMACS 2026.3 GPU build, MDAnalysis and MDTraj on an isolated cloud computer, rents GPUs automatically when needed, and after the replica simulations finish it handles periodic boundaries, computes the metrics, checks convergence and plots the results following this page, keeping every parameter file, log and script. New users get 5 USD of free credit on sign-up.