GROMACS with CHARMM36 Force Field
GROMACS 2025.4 is available on Sol with the CHARMM36 force field (February 2021) pre-installed. This build includes GPU acceleration via NVIDIA A100 GPUs and MPI parallelism for multi-node production runs.
Loading the Module
module load gromacs/2025.4-gpu-mpi-charm
This module automatically loads its dependencies (GCC 12.1, CUDA 12.6, OpenMPI 4.1.5, FFTW 3.3.10)
and sources the GROMACS environment (GMXRC).
Available Binaries
| Binary | Purpose |
|---|---|
gmx | Serial pre- and post-processing (pdb2gmx, editconf, solvate, genion, grompp, analysis tools) |
gmx_mpi | MPI-parallel mdrun for production simulations — use this in job scripts |
Do not use gmx_mpi for setup and analysis steps. It is built mdrun-only and will not have those
subcommands. Use gmx for everything except running the simulation itself.
The CHARMM36 Force Field
Multiple CHARMM36 versions are pre-installed into the GROMACS topology directory — no manual
download or GMXLIB path changes are needed. Pass the exact force field name to gmx pdb2gmx
with -ff, or omit it and pick from the numbered list.
Installed CHARMM36 Versions
| Force Field Name | Release | Notes |
|---|---|---|
charmm36-feb2021 | February 2021 | General-purpose; broad literature compatibility |
charmm36-feb2026_cgenff-5.0 | February 2026 | Latest release; includes CGenFF 5.0 |
To confirm what is available in your session:
module load gromacs/2025.4-gpu-mpi-charm
gmx pdb2gmx -h 2>&1 | grep charmm36
Typical Workflow
1. Prepare the Protein Topology
Use pdb2gmx with CHARMM36 and the CHARMM-compatible TIP3P water model. Pass -ff with the
exact force field name from the Installed CHARMM36 Versions table:
# February 2021 (broad literature compatibility)
gmx pdb2gmx \
-f protein.pdb \
-o protein_processed.gro \
-water tip3p \
-ff charmm36-feb2021
# February 2026 with CGenFF 5.0 (latest)
gmx pdb2gmx \
-f protein.pdb \
-o protein_processed.gro \
-water tip3p \
-ff charmm36-feb2026_cgenff-5.0
Omit -ff entirely to get an interactive numbered menu of all available force fields.
2. Define the Simulation Box
gmx editconf \
-f protein_processed.gro \
-o protein_box.gro \
-c \
-d 1.2 \
-bt dodecahedron
3. Solvate
gmx solvate \
-cp protein_box.gro \
-cs spc216.gro \
-o protein_solv.gro \
-p topol.top
4. Add Ions
# Generate a tpr for genion
gmx grompp \
-f ions.mdp \
-c protein_solv.gro \
-p topol.top \
-o ions.tpr
gmx genion \
-s ions.tpr \
-o protein_solv_ions.gro \
-p topol.top \
-pname NA \
-nname CL \
-neutral
5. Energy Minimization
gmx grompp \
-f minim.mdp \
-c protein_solv_ions.gro \
-p topol.top \
-o em.tpr
gmx mdrun -v -deffnm em
6. Production MD
For production runs, use gmx_mpi inside a SLURM job (see below).
gmx grompp \
-f md.mdp \
-c npt.gro \
-t npt.cpt \
-p topol.top \
-o md.tpr
Example SLURM Job Script
The following script requests one A100 GPU and 16 MPI ranks (one per physical core pair) for a
production MD run. Adjust --ntasks and --grompp options to fit your system.
#!/bin/bash
#SBATCH --job-name=gromacs_md
#SBATCH --partition=gpu
#SBATCH --nodes=1
#SBATCH --ntasks=16
#SBATCH --cpus-per-task=1
#SBATCH --gres=gpu:a100:1
#SBATCH --mem=64G
#SBATCH --time=24:00:00
#SBATCH --output=%x_%j.out
#SBATCH --error=%x_%j.err
module purge
module load gromacs/2025.4-gpu-mpi-charm
# Run production MD
mpirun -np $SLURM_NTASKS gmx_mpi mdrun \
-s md.tpr \
-deffnm md \
-ntmpi 1 \
-ntomp $SLURM_CPUS_PER_TASK \
-gpu_id 0 \
-nb gpu \
-pme gpu \
-bonded gpu \
-update gpu
Multi-Node Example
#!/bin/bash
#SBATCH --job-name=gromacs_md_multinode
#SBATCH --partition=gpu
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=16
#SBATCH --cpus-per-task=1
#SBATCH --gres=gpu:a100:1
#SBATCH --mem=64G
#SBATCH --time=48:00:00
#SBATCH --output=%x_%j.out
#SBATCH --error=%x_%j.err
module purge
module load gromacs/2025.4-gpu-mpi-charm
mpirun -np $SLURM_NTASKS gmx_mpi mdrun \
-s md.tpr \
-deffnm md \
-ntomp $SLURM_CPUS_PER_TASK \
-nb gpu \
-pme gpu \
-bonded gpu
Small Molecules with CGenFF
For ligands and small molecules not parameterized in CHARMM36, generate parameters using the CGenFF program (requires a free account at the ParamChem server):
- Upload your ligand MOL2 file to https://cgenff.umaryland.edu
- Download the output
.strfile - Convert to GROMACS format with
cgenff_charmm2gmx.py(available from the MacKerell lab GitHub) - Include the resulting
lig.itpandlig.prmin your topology
; In topol.top — include ligand parameters before the system definition
#include "lig.prm"
#include "lig.itp"
High penalty scores (> 50) in the CGenFF output indicate parameters that should be validated or refined before use in publication-quality work.
Key MDP Settings for CHARMM36
CHARMM36 requires specific non-bonded settings. Use these in your .mdp files:
; Non-bonded interactions
cutoff-scheme = Verlet
ns-type = grid
nstlist = 20
rlist = 1.2
rcoulomb = 1.2
rvdw = 1.2
vdwtype = Cut-off
vdw-modifier = Force-switch
rvdw-switch = 1.0
; Electrostatics
coulombtype = PME
pme-order = 4
fourierspacing = 0.16
; Temperature and pressure coupling
tcoupl = V-rescale
pcoupl = C-rescale
The vdw-modifier = Force-switch with rvdw-switch = 1.0 is required for CHARMM36 accuracy.
Using plain Cut-off without the force switch will produce incorrect results.
Useful Commands After a Run
# Check energy conservation
gmx energy -f md.edr -o energy.xvg
# Extract a trajectory (remove PBC, center protein)
gmx trjconv -s md.tpr -f md.xtc -o md_nojump.xtc -pbc nojump -center
# Compute RMSD
gmx rms -s md.tpr -f md_nojump.xtc -o rmsd.xvg
# Compute RMSF
gmx rmsf -s md.tpr -f md_nojump.xtc -o rmsf.xvg -res
Additional Resources
- GROMACS 2025.4 Manual
- CHARMM36 force field page (MacKerell lab)
- CHARMM-GUI — web-based system builder with CHARMM36 support and GROMACS output
- CGenFF server — small molecule parameterization