Skip to content

PMF Calculation Tutorial

Build a complete PMF workflow to calculate protein-ligand binding free energy.

Quick Start

prism protein.pdb ligand.mol2 -o pmf_output --pmf

Time: 2-4 hours + computation time Level: Advanced

Prerequisites

  • Completed Basic Tutorial
  • Understanding of free energy concepts
  • Access to computational resources (GPUs recommended)

Workflow Overview

  1. Build PMF-ready system with --pmf
  2. Run steered MD to pull ligand away from protein
  3. Run umbrella sampling along the unbinding pathway
  4. Perform WHAM analysis to extract binding free energy

Step 1: Build the PMF System

# Start from a protein-ligand complex
prism protein.pdb ligand.mol2 -o pmf_tutorial --pmf

PRISM automatically:

  • Aligns the system for optimal pulling (Z-axis)
  • Extends the box to accommodate ligand unbinding
  • Generates SMD and umbrella sampling MDP files
  • Creates run scripts for all stages

Step 2: Run Steered MD

cd pmf_tutorial/GMX_PROLIG_MD
bash run_smd.sh

Monitor the pull force during SMD:

# Check the pull force file (generated during SMD)
tail -f pullf.xvg

Step 3: Run Umbrella Sampling

After SMD completes:

bash run_umbrella.sh

For cluster submission, use a SLURM array job:

#!/bin/bash
#SBATCH --job-name=pmf_umbrella
#SBATCH --array=0-39
#SBATCH --gres=gpu:1
#SBATCH --time=24:00:00

cd pmf_tutorial/GMX_PROLIG_MD/umbrella/window_${SLURM_ARRAY_TASK_ID}
gmx mdrun -deffnm umbrella -v -nb gpu -pme gpu

Step 4: WHAM Analysis

bash run_wham.sh

Step 5: Visualize the PMF Profile

import matplotlib.pyplot as plt
import numpy as np

# Load PMF data (generated by WHAM)
data = np.loadtxt("pmf_tutorial/GMX_PROLIG_MD/pmf_profile.xvg", comments=['#', '@'])
distance = data[:, 0]
pmf = data[:, 1]

plt.figure(figsize=(10, 6))
plt.plot(distance, pmf, 'b-', linewidth=2)
plt.xlabel('Distance (nm)', fontsize=14)
plt.ylabel('PMF (kJ/mol)', fontsize=14)
plt.title('Protein-Ligand Unbinding PMF')
plt.grid(True, alpha=0.3)
plt.axhline(y=0, color='k', linestyle='--', alpha=0.5)
plt.savefig('pmf_profile.png', dpi=300)

Customizing the PMF

Slower Pulling (More Accurate)

prism protein.pdb ligand.mol2 -o pmf_accurate --pmf \
  --umbrella-spacing 0.08 \
  --umbrella-time 20

Specifying Pull Direction

# Use specific atom indices for pulling direction
prism protein.pdb ligand.mol2 -o pmf_custom --pmf \
  --pull-vector 100 200

Troubleshooting

Ligand Escapes Too Quickly

Reduce the pulling speed by editing the SMD MDP file before running.

Poor Window Overlap

Decrease --umbrella-spacing to place windows closer together.

Large Error Bars

Increase --umbrella-time to sample each window longer.

References

See PMF Calculations Guide for detailed parameter documentation.