Back

Computational Biochemistry · Protein–Ligand MD

Protein–Ligand Complex MD Simulation

Step-by-step workflow for simulating a protein with a small-molecule ligand · GROMACS · CHARMM36 · CGenFF

GROMACS CHARMM36 CGenFF Ligand FF TIP3P Water PDB: 3HTB / JZ4
System
Prep
🧬
Protein Topology
Step 1 pdb2gmx
💊
Ligand Topology
Step 2 CGenFF
💧
Build Complex & Solvate
Step 3 solvate
Add Ions
Step 4 genion
Equil. &
Prod.
📉
Energy Minimization
Step 5 mdrun EM
🌡️
NVT Equilibration
Step 6 100 ps
🔬
NPT Equilibration
Step 7 500 ps
📊
Production & Analysis
Step 8 10 ns
1
System Preparation
🧬
Prepare Protein Topology pdb2gmx
Download 3HTB · separate JZ4 ligand · generate protein topology with CHARMM36
PDB 3HTB grep JZ4 CHARMM36 topol.top posre.itp

Download & Separate the PDB

Download PDB code 3HTB (T4 lysozyme L99A/M102Q with ligand JZ4 — 2-propylphenol). Remove crystal waters and save the JZ4 ligand to a separate file — it cannot be handled by pdb2gmx since it is not in any GROMACS force field topology file.

grep JZ4 3HTB_clean.pdb > jz4.pdb
# Then delete JZ4 lines from 3HTB_clean.pdb

Install CHARMM36 Force Field

tar -zxvf charmm36-jul2022.ff.tgz
# Produces charmm36-jul2022.ff/ subdirectory in working directory

Generate Protein Topology

gmx pdb2gmx -f 3HTB_clean.pdb -o 3HTB_processed.gro
# Select option 1: CHARMM36 (July 2022) from current directory
Output fileContents
3HTB_processed.groProtein structure with H atoms added by force field
topol.topProtein topology — bonds, angles, dihedrals, charges
posre.itpPosition restraint file for heavy atoms
Key difference from pure protein: The JZ4 ligand is NOT a recognized residue in GROMACS force fields. You must generate its topology separately using CGenFF (Step 2) before combining with the protein.
💊
Prepare Ligand Topology CGenFF Server
Add H atoms with Avogadro · generate .mol2 · upload to CGenFF · convert to GROMACS .itp
JZ4 ligand Sybyl .mol2 CGenFF jz4_gmx.itp penalty scores

Ligand Parameterization Tools

Force FieldToolDescription
AMBERAntechamber / acpypeGAFF parameters via Antechamber
CHARMMCGenFFOfficial CHARMM General Force Field server
GROMOS96ATBAutomated Topology Builder for GROMOS 54A7
OPLS-AALigParGenJorgensen group server for OPLS topologies

Step 1 — Add H Atoms with Avogadro

Open jz4.pdb in Avogadro → Build → Add Hydrogens. Save as jz4.mol2 (Sybyl Mol2 format). CHARMM36 is all-atom, so all H must be explicitly included.

Step 2 — Fix the .mol2 File

# In @<TRIPOS>MOLECULE section: replace ***** with JZ4
# Set all residue names and numbers to: 1 JZ4
perl sort_mol2_bonds.pl jz4.mol2 jz4_fix.mol2

Step 3 — Upload to CGenFF Server

Upload jz4_fix.mol2 at the CGenFF website. Download the GROMACS format ZIP. CGenFF provides penalty scores per parameter — values below 10 are acceptable, 10–50 need validation, above 50 need reparametrization.

Step 4 — Adapt jz4_gmx.itp

cp jz4_fix_gmx.top jz4_gmx.itp
  • Remove #include "charmm36.ff/forcefield.itp"
  • Replace #include "charmm36.ff/jz4_ffbonded.itp" with actual file content
  • Remove all lines from ; Include water topology to end of file
  • Rename [moleculetype] from Other to JZ4
  • Change #include "posre.itp" to #include "posre_jz4.itp"

Step 5 — Build Complex Coordinate File

gmx editconf -f jz4_ini.pdb -o jz4.gro
cp 3HTB_processed.gro complex.gro
# Paste jz4.gro atom lines into complex.gro before box vectors
# Increment atom count on line 2 of complex.gro (+22 atoms → 2636 total)

Step 6 — Update topol.top

#include "./charmm36-jul2022.ff/forcefield.itp"
#include "jz4_gmx.itp" <-- MUST appear before any [moleculetype]

[molecules]
Protein_chain_A 1
JZ4 1
Critical placement: The #include "jz4_gmx.itp" line MUST appear after the force field include but BEFORE any [moleculetype] section. Ligand parameters define new atom types that must be known before molecules are built.
💧
Define Box & Solvate editconf + solvate
Rhombic dodecahedron box · fill with TIP3P water · ~10,228 water molecules
Dodecahedron d = 1.0 nm TIP3P ~10,228 SOL PBC

Define Simulation Box

gmx editconf -f complex.gro -o newbox.gro -bt dodecahedron -d 1.0

A rhombic dodecahedron is used instead of a cubic box for globular proteins. Its volume is ~71% of an equivalent cubic box — requiring far fewer water molecules and saving substantial computation time.

Solvate the System

gmx solvate -cp newbox.gro -cs spc216.gro -p topol.top -o solv.gro

Note: GROMACS always stores coordinates in the most numerically efficient triclinic representation. The dodecahedron shape is recovered after generating a .tpr file using trjconv -ur compact.

Box type
Dodecahedron
Edge distance
1.0 nm
Water model
TIP3P
~SOL added
10,228
Add Ions grompp + genion
Net charge +6e · add 6 × Cl⁻ to neutralize system
Net charge +6e 6 × Cl⁻ Neutral ions.tpr

Assemble & Neutralize

gmx grompp -f ions.mdp -c solv.gro -p topol.top -o ions.tpr
gmx genion -s ions.tpr -o solv_ions.gro -p topol.top -pname NA -nname CL -neutral
# Select group 15 "SOL" when prompted

The 3HTB protein has a net charge of +6e. Six Cl⁻ ions replace water molecules to achieve electrical neutrality.

Protein charge
+6e
Cl⁻ added
6
Final SOL
10,222
Net charge
0

Final [molecules] directive in topol.top:

Protein_chain_A 1
JZ4 1
SOL 10228
CL 6
2
Equilibration
📉
Energy Minimization mdrun -EM
Steepest descent · converges in 134 steps · Fmax < 1000 kJ mol⁻¹ nm⁻¹
Steepest descent 134 steps Fmax < 1000 Epot negative
gmx grompp -f em.mdp -c solv_ions.gro -p topol.top -o em.tpr
gmx mdrun -v -deffnm em

The complex system converged quickly due to the high quality of both topologies. The potential energy decreases monotonically and Fmax drops well below the 1000 kJ mol⁻¹ nm⁻¹ threshold.

Steps to converge
134
Potential energy
−4.897×10⁵
Fmax
826 kJ/mol/nm
Fmax target
<1000
Potential Energy — Energy Minimization
3HTB Complex · Steepest Descent · CHARMM36
Converges to −4.897 × 10⁵ kJ mol⁻¹ in 134 steps
🌡️
NVT Equilibration mdrun -nvt
Isothermal-isochoric · restrain protein + ligand heavy atoms · 298 K · 100 ps
100 ps 298 K V-rescale Ligand restrained posre_jz4.itp

Restrain the Ligand

gmx make_ndx -f jz4.gro -o index_jz4.ndx
> 0 & ! a H*
> q

gmx genrestr -f jz4.gro -n index_jz4.ndx -o posre_jz4.itp -fc 1000 1000 1000

Non-hydrogen JZ4 atoms are position-restrained during equilibration. This keeps the ligand in its binding pose while water and ions equilibrate around the complex.

Thermostat Coupling — Important

Do NOT couple each molecule separately. Coupling small groups (JZ4, CL) individually causes instability due to kinetic energy fluctuations. Use a combined group:

tc-grps = Protein_JZ4 SOL_CL
# NOT: Protein JZ4 SOL CL ← this will blow up

Run NVT

gmx grompp -f nvt.mdp -c em.gro -r em.gro -p topol.top -o nvt.tpr
gmx mdrun -deffnm nvt
Temperature — NVT Equilibration
3HTB Complex · 100 ps · V-rescale thermostat
Temperature stabilizes at 298 K within the first ~20 ps
🔬
NPT Equilibration mdrun -npt
Isothermal-isobaric · stabilize pressure and density · 500 ps
500 ps 1 bar C-rescale npt.cpt
gmx grompp -f npt.mdp -c nvt.gro -t nvt.cpt -r nvt.gro -p topol.top -o npt.tpr
gmx mdrun -deffnm npt

The -r nvt.gro flag provides the reference coordinates for position restraints, continuing to restrain protein and ligand while pressure equilibrates.

Pressure
3HTB · NPT Equilibration
Running avg: −3 ± 11 bar · Reference: 1 bar
Density
3HTB · NPT Equilibration
Stabilizes at ~1025 ± 0.5 kg m⁻³
3
Production & Analysis
📊
Production MD & Analysis mdrun + gmx
10 ns unrestrained MD · RMSD · H-bond distance · interaction energy · JZ4 RMSD
10 ns RMSD H-bond dist. Interaction energy JZ4 pose RMSD

Run Production MD

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

Recenter & Rewrap Trajectory

gmx trjconv -s md_0_10.tpr -f md_0_10.xtc -o md_0_10_center.xtc -center -pbc mol -ur compact
# Select Protein for centering, System for output

For protein-ligand complexes, centering is more complex than a single protein — for long simulations it may be necessary to create a custom index group combining protein + ligand for centering.

Protein Backbone RMSD

gmx rms -s md_0_10.tpr -f md_0_10_center.xtc -o rmsd_backbone.xvg -tu ns
Protein Backbone RMSD
3HTB · Unrestrained MD · 10 ns
Backbone RMSD stabilizes — protein fold maintained throughout simulation

JZ4 Ligand Pose RMSD

gmx make_ndx -f em.gro -n index.ndx
> 13 & ! a H*
> name 23 JZ4_Heavy
gmx rms -s em.tpr -f md_0_10_center.xtc -n index.ndx -tu ns -o rmsd_jz4.xvg
# Backbone for fit, JZ4_Heavy for RMSD
JZ4 Ligand Heavy-Atom RMSD
3HTB · Binding pose stability · 10 ns
JZ4 RMSD ~0.15 ± 0.06 nm (1.5 Å) — binding pose well preserved

Protein–Ligand H-bond Distance

gmx distance -s md_0_10.tpr -f md_0_10_center.xtc -select 'resname "jz4" and name O10 plus resid 102 and name OE1' -o hbdist.xvg -tu ns

The JZ4 hydroxyl (O10) can hydrogen bond with the Gln102 carbonyl OE1. Average distance over 10 ns: 0.43 ± 0.17 nm. Over last 5 ns: 0.30 ± 0.03 nm — consistent with a stable H-bond (<0.36 nm threshold).

H-bond Distance: JZ4 O10 — Gln102 OE1
3HTB · Protein–Ligand H-bond · 10 ns
Distance drops below 0.36 nm threshold in later simulation — stable H-bond forms

Protein–Ligand Interaction Energy

gmx grompp -f ie.mdp -c npt.gro -t npt.cpt -p topol.top -n index.ndx -o ie.tpr
gmx mdrun -deffnm ie -rerun md_0_10.xtc -nb cpu
gmx energy -f ie.edr -o interaction_energy.xvg
# Select Coul-SR:Protein-jz4 and LJ-SR:Protein-jz4
Coulombic (SR)
−16.5 ± 10.0 kJ/mol
LJ (SR)
−96.8 ± 7.4 kJ/mol
Total interaction
−113.3 ± 12.4 kJ/mol
JZ4 pose RMSD
0.15 ± 0.06 nm
Important: The interaction energy is NOT a binding free energy or Kd. It cannot be validated experimentally. It is useful as a relative indicator of binding strength and can be compared across similar simulations.
Simulation Parameters
Protein FF
CHARMM36
Ligand FF
CGenFF
Water model
TIP3P
Box type
Dodecahedron
Timestep
2 fs
Electrostatics
PME
Thermostat
V-rescale
Barostat
C-rescale
📈
Analysis Metrics
RMSD
Protein backbone stability
JZ4 RMSD
Ligand binding pose — 0.15 nm
H-bond dist.
JZ4 O10 — Gln102 OE1
H-bond angle
≤30° criterion
Coul-SR
Electrostatic interaction energy
LJ-SR
van der Waals interaction energy
FF
Ligand Parameterization Tools

Unlike standard amino acids, small-molecule ligands must be parameterized using external tools before they can be included in an MD simulation. Each tool is designed to be consistent with a specific force field family. Always validate penalty scores before using a topology.

CHARMM / CGenFF
CHARMM-GUI Ligand Reader
Web-based GUI for ligand topology generation and complex assembly · Outputs GROMACS-ready files
CHARMM36 · GUI-based
AMBER / GAFF
Antechamber
AmberTools · Parametrizes molecules using GAFF (General AMBER Force Field) · Command-line
AMBER · GAFF · CLI
acpype
Python interface to Antechamber · Writes GROMACS-compatible topologies · pip install acpype
AMBER · GAFF · Python
GROMOS96 / OPLS-AA
ATB Server
Automated Topology Builder · atb.uq.edu.au · Generates GROMOS96 54A7-compatible topologies
GROMOS96 · Web server
LigParGen
Jorgensen group server · Yale University · OPLS-AA/CM1A parameters · Outputs GROMACS/LAMMPS files
OPLS-AA · Web server
CGenFF Penalty Score Guide
Penalty ScoreInterpretationAction
< 10Excellent — well-characterizedUse directly
10 – 50Moderate — assigned by analogyValidate topology
> 50Poor — unreliableManual reparametrization required