Computational Biochemistry Β· Methodology
Protein Molecular Dynamics Simulation
Complete step-by-step workflow Β· GROMACS Β· CHARMM36 force field Β· Click any step to expand
Prep
Prod.
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 β
pdb2gmxcannot handle gaps. - Alternate conformations β pick one and remove the others.
- Non-standard residues or ligands β
pdb2gmxonly knows residues defined in the force field.rtpfiles. Anything else needs separate parameterization.
2. Remove Crystal Waters
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
This step adds missing hydrogen atoms, assigns protonation states, and generates three output files:
| File | Contents |
|---|---|
| 1AKI_processed.gro | Coordinate file with all atoms including hydrogens |
| topol.top | Full topology β bonds, angles, dihedrals, charges, masses |
| posre.itp | Position 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)
.rtp file Β· unresolved SEQRES vs ATOM record mismatches.
Define the Simulation Box
-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
Solvate the Box
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.
solvate will not update topol.top automatically β you must edit the [molecules] directive by hand.Generate the Run Input File
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
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
-pname/-nname β always use the moleculetype name (elemental symbol). Wrong names here cause fatal errors in all downstream steps.Assemble the Input
Run Energy Minimization
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 file | Contents |
|---|---|
| em.log | ASCII log of the EM process |
| em.edr | Binary energy file |
| em.trr | Binary full-precision trajectory |
| em.gro | Energy-minimized structure (used as input for NVT) |
Success Criteria
Check Potential Energy
# Type "11 0" at prompt to select Potential
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 mdrun -deffnm nvt
Key .mdp Parameters
gen_vel = yesβ random velocity generation from Maxwell-Boltzmann distribution at target Ttcoupl = V-rescaleβ stochastic velocity rescaling thermostat (Bussi et al.)pcoupl = noβ pressure coupling is OFF at this stagedefine = -DPOSRESβ activates position restraints fromposre.itp
Monitor Temperature Convergence
# Type "16 0" at prompt
nvt.cpt carries the velocities forward to NPT.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 mdrun -deffnm npt
Key .mdp Changes from NVT
continuation = yesβ continuing from NVT phasegen_vel = noβ velocities read from NVT checkpointpcoupl = C-rescaleβ C-rescale barostat (Bernetti & Bussi) for pressure controlref_p = 1.0β target pressure 1 bar
Monitor Pressure & Density
gmx energy -f npt.edr -o density.xvg # "23 0"
Prepare and Launch
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
gmx mdrun -ntmpi N -ntomp M to control MPI ranks and OpenMP threads.Step 1 β Correct for Periodicity (PBC)
# 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
# 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.
Radius of Gyration (Rg) β Compactness
A stably folded protein maintains a near-constant Rg. For lysozyme: 1.409 Β± 0.008 nm β confirming no unfolding or elongation over 10 ns.
Secondary Structure β DSSP
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.
Hydrogen Bonds
# 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.
backbone deviation
flexibility
1.409 Β± 0.008 nm
Ξ±-helix, Ξ²-strand
proteinβwater
surface area
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.
| System type | Recommended force field |
|---|---|
| Soluble protein | CHARMM36 or AMBER99SB-ILDN |
| Membrane protein / lipids | CHARMM36 (with CHARMM36 lipids) |
| Intrinsically disordered protein | CHARMM36m or a99SB-disp |
| Proteinβsmall molecule | OPLS-AA/L + GAFF/CGenFF for ligand |
| Nucleic acids (DNA/RNA) | CHARMM36 or AMBER99bsc1 |
| Carbohydrates / glycoproteins | CHARMM36 |
| Coarse-grained systems | MARTINI (separate installation) |
Reference methodology: J. Lemkul, Virginia Tech Β· mdtutorials.com/gmx/lysozyme
