Simple Protein-Ligand Example¶
Quick Start
A complete, minimal example demonstrating the PRISM workflow from input files to a production-ready MD system.
Overview¶
This example shows how to:
- Build a protein-ligand system with default settings
- Generate all necessary GROMACS files
- Run molecular dynamics simulations
Complexity: Beginner Time: ~10 minutes (system building) + simulation time System: T4 Lysozyme L99A/M102Q + Benzene (PDB: 5JWT)
Download Example Files¶
Pre-processed input files are provided. The protein structure has been cleaned (solvent/ions removed, hydrogens added) and the ligand has been prepared in MOL2 format with correct atom types.
Or download via command line:
mkdir simple_example && cd simple_example
# Download from the PRISM Tutorial repository
wget https://raw.githubusercontent.com/AIB100/PRISM-Tutorial/main/docs/assets/examples/md/protein.pdb
wget https://raw.githubusercontent.com/AIB100/PRISM-Tutorial/main/docs/assets/examples/md/ligand.mol2
Your directory should contain:
simple_example/
├── protein.pdb # T4 Lysozyme L99A/M102Q (164 residues, 1309 atoms)
└── ligand.mol2 # Benzene (12 atoms: 6C + 6H)
Step 1: Build the System¶
Command Line¶
Python API¶
import prism as pm
system = pm.system("protein.pdb", "ligand.mol2", output_dir="t4l_benzene")
system.build()
PRISM will automatically:
- Generate ligand force field parameters (GAFF by default)
- Prepare the protein topology (AMBER99SB-ILDN by default)
- Combine protein and ligand into a complex
- Solvate in a TIP3P water box
- Add Na+/Cl- ions for charge neutralization (0.15 M)
- Generate MDP files for all simulation stages
- Create a ready-to-run simulation script
Output Structure¶
t4l_benzene/
├── LIG.amb2gmx/ # Ligand force field files
│ ├── LIG.gro # Ligand coordinates
│ ├── LIG.itp # Ligand topology
│ └── ...
├── GMX_PROLIG_MD/ # Simulation directory
│ ├── solv_ions.gro # Solvated system
│ ├── topol.top # System topology
│ └── localrun.sh # Run script
└── mdps/ # MD parameter files
├── em.mdp # Energy minimization
├── nvt.mdp # NVT equilibration
├── npt.mdp # NPT equilibration
└── md.mdp # Production MD
Step 2: Run the Simulation¶
The script runs four stages sequentially:
| Stage | Purpose | Typical Time (GPU) |
|---|---|---|
| Energy Minimization | Remove bad contacts | ~2 minutes |
| NVT Equilibration | Heat to 300 K | ~10 minutes |
| NPT Equilibration | Equilibrate pressure | ~10 minutes |
| Production MD | Data collection | 2-4 hours (for 100 ns) |
Monitor Progress¶
# Check which stage is running
ls -lh em/ nvt/ npt/ prod/
# Watch the production MD log
tail -f prod/md.log
Step 3: Check Results¶
After simulation completes, verify the output:
# Check production trajectory exists
ls -lh prod/md.xtc
# Quick energy check
gmx energy -f prod/md.edr -o energy.xvg
Expected System Statistics¶
| Property | Expected Value |
|---|---|
| Total atoms | ~25,000-35,000 |
| Protein atoms | 1,309 |
| Ligand atoms | 12 |
| Water molecules | ~8,000-11,000 |
| Na+/Cl- ions | ~20-40 |
Customization¶
Change Force Field¶
# Use OpenFF for ligand, AMBER14SB for protein
prism protein.pdb ligand.mol2 -o t4l_benzene \
--ligand-forcefield openff --forcefield amber14sb
Adjust Simulation Length¶
Edit mdps/md.mdp before running, or use configuration:
Change Water Model¶
Troubleshooting¶
"GROMACS command not found": Source the GROMACS environment first:
"Cannot generate GAFF parameters": Install AmberTools and ACPYPE:
"Ligand parameterization failed": Try OpenFF as an alternative: