Back

Computational Biochemistry Β· Methodology

Protein Molecular Dynamics Simulation

Complete step-by-step workflow Β· GROMACS Β· CHARMM36 force field Β· Click any step to expand

GROMACS CHARMM36 TIP3P Water PME Electrostatics GPU Accelerated
System
Prep
🧬
Protein Preparation
Step 1 pdb2gmx
πŸ’§
Define Box & Solvate
Step 2 solvate
⚑
Add Ions
Step 3 genion
πŸ“‰
Energy Minimization
Step 4 mdrun EM
Equil. &
Prod.
🌑️
NVT Equilibration
Step 5 100 ps
πŸ”¬
NPT Equilibration
Step 6 500 ps
πŸš€
Production MD
Step 7 10 ns
πŸ“Š
Trajectory Analysis
Step 8 RMSD Β· Rg Β· DSSP
1
System Preparation
🧬
Protein Preparation pdb2gmx
Download PDB β†’ remove crystal waters β†’ generate topology & position restraints
PDB download Remove HOH Force field topol.top posre.itp
β–Ό

1. Download & Inspect the PDB File

Get your structure from the RCSB Protein Data Bank. Before doing anything else, open the raw .pdb file in a text editor and check for:

  • MISSING entries β€” residues or atoms absent from the crystal structure. Terminal regions are common culprits. Any missing internal residues must be modeled in with external software (Modeller, Swiss-Model) before proceeding β€” pdb2gmx cannot handle gaps.
  • Alternate conformations β€” pick one and remove the others.
  • Non-standard residues or ligands β€” pdb2gmx only knows residues defined in the force field .rtp files. Anything else needs separate parameterization.

2. Remove Crystal Waters

grep -v HOH 1aki.pdb > 1AKI_clean.pdb

Crystal waters are artifacts of the crystallization process. You will be adding a proper explicit solvent box yourself. Exception: if a water molecule is tightly bound in the active site and functionally important, keep it.

3. Run pdb2gmx

gmx pdb2gmx -f 1AKI_clean.pdb -o 1AKI_processed.gro -water tip3p

This step adds missing hydrogen atoms, assigns protonation states, and generates three output files:

FileContents
1AKI_processed.groCoordinate file with all atoms including hydrogens
topol.topFull topology β€” bonds, angles, dihedrals, charges, masses
posre.itpPosition restraint file used during equilibration

4. Optional Flags

  • -ter β€” interactively set N- and C-terminal charge states
  • -inter β€” manually set protonation for Glu, Asp, Lys, Arg, His and disulfide bonds
  • -ignh β€” ignore H atoms in PDB (useful for NMR structures)
Common failure causes: missing backbone atoms in any residue Β· non-standard atom naming Β· residues not in the force field .rtp file Β· unresolved SEQRES vs ATOM record mismatches.
πŸ’§
Define Box & Solvate editconf + solvate
Create periodic cubic box β†’ fill with TIP3P water molecules
Cubic PBC d = 1.2 nm ~12,596 SOL spc216.gro Min. image conv.
β–Ό

Define the Simulation Box

gmx editconf -f 1AKI_processed.gro -o 1AKI_newbox.gro -c -d 1.2 -bt cubic
  • -c β€” centers the protein in the box
  • -d 1.2 β€” places the protein at least 1.2 nm from any box edge
  • -bt cubic β€” cubic box type. Rhombic dodecahedron is ~71% the volume and is more efficient for globular proteins
The 1.2 nm edge distance ensures a minimum of 2.4 nm between periodic protein images β€” large enough for any common cutoff scheme.

Solvate the Box

gmx solvate -cp 1AKI_newbox.gro -cs spc216.gro -o 1AKI_solv.gro -p topol.top

Uses spc216.gro, a generic 3-point solvent configuration compatible with SPC, SPC/E, and TIP3P water models. The topol.top file is updated automatically with the correct number of SOL molecules added.

Water model
TIP3P
Molecules added
~12,596
Box type
Cubic
Min. distance
1.2 nm
If you use a non-water solvent, solvate will not update topol.top automatically β€” you must edit the [molecules] directive by hand.
⚑
Add Ions grompp + genion
Replace water molecules with counter-ions to achieve charge neutrality
Net charge +8e 8 Γ— Cl⁻ Charge neutral ions.tpr
β–Ό

Generate the Run Input File

gmx grompp -f inputs/ions.mdp -c 1AKI_solv.gro -p topol.top -o ions.tpr

grompp (GROMACS pre-processor) assembles the coordinate file, topology, and simulation parameters into a binary .tpr file that contains the complete atomic description of the system.

Add Counter-ions with genion

gmx genion -s ions.tpr -o 1AKI_solv_ions.gro -p topol.top -pname NA -nname CL -neutral

When prompted, choose group 13 "SOL" β€” you want to replace water molecules, not protein atoms.

  • -pname NA / -nname CL β€” positive and negative ion names (always elemental symbol in all-caps)
  • -neutral β€” adds the minimum number of ions to reach net zero charge
  • -conc 0.15 β€” optionally add physiological ionic concentration (0.15 M) on top of neutralization
Protein charge
+8e
Cl⁻ added
8
Final SOL
12,588
Net charge
0
Do not use atom or residue names for -pname/-nname β€” always use the moleculetype name (elemental symbol). Wrong names here cause fatal errors in all downstream steps.
πŸ“‰
Energy Minimization mdrun -EM
Relax steric clashes and unfavorable geometry until convergence
Steepest descent Fmax < 1000 Epot negative ~566 steps
β–Ό

Assemble the Input

gmx grompp -f inputs/minim.mdp -c 1AKI_solv_ions.gro -p topol.top -o em.tpr

Run Energy Minimization

gmx mdrun -v -deffnm em

The -v flag makes mdrun verbose (prints progress). Steepest descent iteratively moves atoms downhill on the potential energy surface until the maximum force drops below the threshold.

Output fileContents
em.logASCII log of the EM process
em.edrBinary energy file
em.trrBinary full-precision trajectory
em.groEnergy-minimized structure (used as input for NVT)

Success Criteria

Fmax target
< 1000 kJ/mol/nm
Epot sign
Must be negative
Epot magnitude
10⁡–10⁢ range
Typical steps
~500–600

Check Potential Energy

gmx energy -f em.edr -o potential.xvg
# Type "11 0" at prompt to select Potential
A nice, steady convergence curve in the potential energy plot confirms the system is ready for dynamics. If Fmax converges but Epot is suspicious, investigate steric clashes before proceeding.
Potential Energy
1AKI Β· Steepest Descent Minimization with CHARMM36
Representative convergence curve Β· Epot converges to βˆ’6.28 Γ— 10⁡ kJ mol⁻¹
2
Equilibration
🌑️
NVT Equilibration mdrun -nvt
Isothermal-isochoric ensemble β€” stabilize temperature with position restraints
100 ps T = 298 K V-rescale Position restrained nvt.cpt
β–Ό

Why NVT First?

After energy minimization, the solvent is geometrically relaxed but not thermally equilibrated. Jumping directly to a full production run would cause the system to collapse or explode. NVT uses position restraints on protein heavy atoms so the solvent equilibrates around the protein without structural changes.

gmx grompp -f inputs/nvt.mdp -c em.gro -r em.gro -p topol.top -o nvt.tpr
gmx mdrun -deffnm nvt

Key .mdp Parameters

  • gen_vel = yes β€” random velocity generation from Maxwell-Boltzmann distribution at target T
  • tcoupl = V-rescale β€” stochastic velocity rescaling thermostat (Bussi et al.)
  • pcoupl = no β€” pressure coupling is OFF at this stage
  • define = -DPOSRES β€” activates position restraints from posre.itp

Monitor Temperature Convergence

gmx energy -f nvt.edr -o temperature.xvg
# Type "16 0" at prompt
Duration
100 ps
Target T
298 K
Thermostat
V-rescale
Ensemble
NVT
The temperature should plateau quickly and remain stable for the remainder of the run. The checkpoint file nvt.cpt carries the velocities forward to NPT.
Temperature
1AKI Β· NVT Equilibration Β· V-rescale thermostat
Temperature stabilizes at 298 K within the first ~20 ps
πŸ”¬
NPT Equilibration mdrun -npt
Isothermal-isobaric ensemble β€” stabilize pressure and density to experimental values
500 ps P = 1 bar C-rescale ~1025 kg/mΒ³ npt.cpt
β–Ό

Why NPT After NVT?

The NVT step fixed the temperature but not the density. The NPT ensemble (constant Number, Pressure, Temperature) most closely resembles real experimental conditions. The barostat adjusts the box volume until the pressure equilibrates.

gmx grompp -f inputs/npt.mdp -c nvt.gro -r nvt.gro -t nvt.cpt -p topol.top -o npt.tpr
gmx mdrun -deffnm npt

Key .mdp Changes from NVT

  • continuation = yes β€” continuing from NVT phase
  • gen_vel = no β€” velocities read from NVT checkpoint
  • pcoupl = C-rescale β€” C-rescale barostat (Bernetti & Bussi) for pressure control
  • ref_p = 1.0 β€” target pressure 1 bar

Monitor Pressure & Density

gmx energy -f npt.edr -o pressure.xvg # "17 0"
gmx energy -f npt.edr -o density.xvg # "23 0"
Duration
500 ps
Target P
1 bar
Avg. density
~1025 kg/mΒ³
Avg. pressure
βˆ’3 Β± 11 bar
Pressure fluctuates widely (Β±hundreds of bar) β€” this is normal and expected in MD. What matters is that the running average is statistically indistinguishable from 1 bar. Once density is stable, the system is ready for production.
Pressure
1AKI Β· NPT Equilibration
Running avg: βˆ’3 Β± 11 bar Β· Reference: 1 bar
Density
1AKI Β· NPT Equilibration
Stabilizes at ~1025.3 ± 0.5 kg m⁻³
3
Production & Analysis
πŸš€
Production MD mdrun -md
Unrestrained MD simulation β€” full data collection trajectory
10 ns No restraints PME .xtc trajectory GPU accel.
β–Ό

Prepare and Launch

gmx grompp -f inputs/md.mdp -c npt.gro -t npt.cpt -p topol.top -o md_0_10.tpr
gmx mdrun -deffnm md_0_10

The checkpoint file from NPT carries the fully equilibrated coordinates, velocities, and barostat state. Position restraints are absent from the production .mdp file β€” the protein moves freely.

GPU Acceleration

GROMACS offloads PME (particle mesh Ewald) calculations and nonbonded interactions to GPU. As of GROMACS 2025, a Titan Xp GPU can run this lysozyme system at ~196 ns/day. Bonded forces remain on CPU cores.

Minimum GPU requirements: CUDA SDK + compute capability β‰₯ 2.0.

Key Production Parameters

Total time
10 ns
Timestep
2 fs
Electrostatics
PME
vdW cutoff
1.2 nm
Traj. output
every 10 ps
Constraints
h-bonds
For longer simulations or larger systems, GROMACS supports domain decomposition parallelism across multiple CPUs and GPUs. Use gmx mdrun -ntmpi N -ntomp M to control MPI ranks and OpenMP threads.
πŸ“Š
Trajectory Analysis gmx analysis
PBC correction β†’ extract structural, dynamic & thermodynamic properties
RMSD RMSF Rg DSSP H-bonds SASA
β–Ό

Step 1 β€” Correct for Periodicity (PBC)

gmx trjconv -s md_0_10.tpr -f md_0_10.xtc -o md_0_10_noPBC.xtc -pbc mol -center
# Select 1 (Protein) to center, 0 (System) for output

Proteins diffuse across periodic boundaries and can appear "broken" or jumping across the box. trjconv re-images the trajectory so the protein is intact and centered throughout.

RMSD β€” Structural Stability

gmx rms -s md_0_10.tpr -f md_0_10_noPBC.xtc -o rmsd.xvg -tu ns
# Select 4 (Backbone) for both fit and RMSD group

Measures average displacement of backbone atoms from the reference. For lysozyme: 0.09 Β± 0.01 nm β€” indicating a stable, compact fold. Note: RMSD is not a convergence criterion on its own.

RMSD
1AKI Β· Backbone Β· 500-ps smoothed running average
Both references (equilibrated & crystal) converge to ~0.09 Β± 0.01 nm

Radius of Gyration (Rg) β€” Compactness

gmx gyrate -s md_0_10.tpr -f md_0_10_noPBC.xtc -o gyrate.xvg -sel Protein -tu ns

A stably folded protein maintains a near-constant Rg. For lysozyme: 1.409 Β± 0.008 nm β€” confirming no unfolding or elongation over 10 ns.

Radius of Gyration
1AKI Β· Unrestrained MD Β· 10 ns
Rg remains stable at 1.409 Β± 0.008 nm β€” protein stays compact

Secondary Structure β€” DSSP

gmx dssp -s md_0_10.tpr -f md_0_10_noPBC.xtc -tu ns -o dssp.dat -num dssp_num.xvg

Invokes the DSSP algorithm to assign Ξ±-helices, Ξ²-strands, 3₁₀-helices, turns, and bends to each residue at each frame. The per-residue time series reveals which secondary structural elements are stable vs. transiently fluctuating.

DSSP Secondary Structure Analysis
1AKI Β· Unrestrained MD Β· Structure count per frame
Ξ±-helices and loops dominate; Ξ²-strands persist throughout the 10 ns trajectory

Hydrogen Bonds

gmx hbond -s md_0_10.tpr -f md_0_10_noPBC.xtc -tu ns -num hbnum_mainchain.xvg
# Group 7 (MainChain+H) for both selections β€” backbone H-bonds
gmx hbond ... # Group 8 (SideChain) β€” sidechain H-bonds
gmx hbond ... # Group 1 (Protein) + Group 12 (Water) β€” protein–water

Criteria: donor-acceptor distance ≀ 0.35 nm AND donor-acceptor-H angle ≀ 30Β°. Lysozyme maintains ~50 backbone H-bonds, ~20 sidechain H-bonds, and ~280 protein-water H-bonds throughout the simulation.

Number of Hydrogen Bonds
1AKI Β· Backbone Β· Sidechain Β· Protein–Water
Protein–water H-bonds (~280) dominate; backbone (~50) and sidechain (~20) remain consistent
RMSD (backbone)
0.09 nm
Rg
1.41 nm
Backbone H-bonds
~50
Protein–water HB
~280
βš™
Simulation Parameters
Integrator
md / sd
Timestep
2 fs
Electrostatics
PME
vdW cutoff
1.2 nm
Constraints
h-bonds
Thermostat
V-rescale
Barostat
C-rescale
Traj. output
every 10 ps
πŸ“ˆ
Analysis Metrics
RMSD
Structural stability
backbone deviation
RMSF
Per-residue
flexibility
Rg
Compactness
1.409 Β± 0.008 nm
DSSP
Secondary structure
Ξ±-helix, Ξ²-strand
H-bonds
Backbone, side chain
protein–water
SASA
Solvent-accessible
surface area
FF
GROMACS Force Fields

GROMACS ships with 15+ built-in force fields. Selection depends on your system type β€” protein only, protein+ligand, membrane, nucleic acids, or free energy calculations. The force field determines all nonbonded parameters (charges, Lennard-Jones) and bonded parameters (bond, angle, dihedral terms) written to topol.top.

AMBER Family
AMBER03
Protein + nucleic AMBER94 Β· Duan et al., J. Comp. Chem. 24, 1999–2012 (2003)
Protein Β· Nucleic acid
AMBER94
Cornell et al., JACS 117, 5179–5197 (1995)
Protein Β· Nucleic acid
AMBER96
Protein + nucleic AMBER94 Β· Kollman et al., Acc. Chem. Res. 29, 461–469 (1996)
Protein Β· Nucleic acid
AMBER99
Protein + nucleic AMBER94 Β· Wang et al., J. Comp. Chem. 21, 1049–1074 (2000)
Protein Β· Nucleic acid
AMBER99SB
Improved backbone dihedrals Β· Hornak et al., Proteins 65, 712–725 (2006)
Protein Β· Backbone
AMBER99SB-ILDN
Improved Ile, Leu, Asp, Asn dihedrals Β· Lindorff-Larsen et al., Proteins 78, 1950–58 (2010)
Protein Β· Best for folding studies
AMBERGS
Garcia & Sanbonmatsu, PNAS 99, 2782–2787 (2002)
Protein Β· Helix propensity
CHARMM Family
CHARMM27
All-atom Β· CHARMM22 plus CMAP for proteins Β· MacKerell et al.
Protein Β· RNA Β· DNA
CHARMM36m
Extended for intrinsically disordered proteins Β· Huang et al., Nat. Methods 14, 71–73 (2017)
IDP Β· Protein Β· Lipid
GROMOS96 Family
GROMOS96 43a1
United-atom force field Β· van Gunsteren et al.
United-atom Β· Protein
GROMOS96 43a2
Improved alkane dihedrals Β· van Gunsteren et al.
United-atom Β· Alkane
GROMOS96 45a3
Schuler, JCC 22, 1205 (2001)
United-atom Β· Lipid
GROMOS96 53a5
Soares et al., JCC 25, 1656 (2004)
United-atom Β· Protein Β· Sugars
GROMOS96 53a6
Oostenbrink et al., JCC 25, 1656 (2004) β€” most widely used GROMOS variant
United-atom Β· Protein Β· Lipid
GROMOS96 54a7
Revised partial charges Β· Schmid et al., Eur. Biophys. J. 40, 843–856 (2011)
United-atom Β· Protein Β· Improved charges
OPLS Family
OPLS-AA/L
All-atom Β· Improved amino acid dihedrals Β· Kaminski et al., J. Phys. Chem. B 105, 6474 (2001)
All-atom Β· Protein Β· Small molecules
OPLS3e / OPLS4
Extended for drug-like molecules Β· Roos et al. (SchrΓΆdinger, requires separate license)
All-atom Β· Drug-like compounds
Quick Selection Guide
System typeRecommended force field
Soluble proteinCHARMM36 or AMBER99SB-ILDN
Membrane protein / lipidsCHARMM36 (with CHARMM36 lipids)
Intrinsically disordered proteinCHARMM36m or a99SB-disp
Protein–small moleculeOPLS-AA/L + GAFF/CGenFF for ligand
Nucleic acids (DNA/RNA)CHARMM36 or AMBER99bsc1
Carbohydrates / glycoproteinsCHARMM36
Coarse-grained systemsMARTINI (separate installation)