skills/qmmm_adaptive/SKILL.md
QM/MM hybrid simulations with adaptive sampling for enzyme mechanisms and reaction dynamics. Combines quantum mechanics (reactive center) with molecular mechanics (protein/solvent) for accurate transition state and reaction pathway calculations. Supports metadynamics, umbrella sampling, and accelerated MD for enhanced conformational sampling.
npx skillsauth add lamm-mit/scienceclaw qmmm-adaptiveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
QM/MM (Quantum Mechanics/Molecular Mechanics) hybrid simulations enable accurate computational investigation of enzyme mechanisms, chemical reactions in biological environments, and reaction pathways. This skill combines quantum mechanical accuracy for reactive regions with classical force fields for the surrounding protein and solvent, enabling study of phenomena inaccessible to pure classical or pure quantum approaches.
Adaptive sampling techniques (metadynamics, umbrella sampling, accelerated MD) overcome energy barriers and efficiently explore reaction coordinates, making QM/MM practical for computational drug discovery and enzyme engineering.
Hybrid System Preparation:
Build QM/MM systems with defined quantum and classical regions:
from qmmm import QMMMSystem
# Define QM region (reaction center)
qm_atoms = ["C1", "C2", "N3", "O4"] # Reactive atoms
qm_method = "MOPAC" # or ORCA, TeraChem for higher accuracy
# Define MM region (protein + solvent)
mm_forcefield = "AMBER14"
# Create hybrid system
system = QMMMSystem(
structure="enzyme_complex.pdb",
qm_atoms=qm_atoms,
qm_method=qm_method,
mm_forcefield=mm_forcefield,
qm_charge=0,
qm_multiplicity=1,
buffer_distance=15 # Å from QM center
)
# Equilibrate in stages
system.equilibrate_qm_region(steps=5000) # Fix MM atoms
system.equilibrate_hybrid(steps=10000) # Allow coupling
system.equilibrate_full(steps=50000) # Full system
Key Parameters:
Free Energy Landscape Calculation:
Map reaction pathways and identify transition states:
# Define collective variable (reaction coordinate)
cv = ReactionCoordinate(
atoms=["C1", "C2"],
type="distance" # or angle, dihedral, custom
)
# Run metadynamics
metad = Metadynamics(
system=qmmm_system,
cv=cv,
sigma=0.1, # Width of Gaussian hills
height=5.0, # Energy height (kcal/mol)
stride=100, # Add hill every N steps
temperature=300, # K
timestep=1.0 # fs
)
trajectory = metad.run(steps=100000) # 100 ps with ~1000 hills
# Get free energy profile
free_energy = trajectory.get_free_energy()
barriers = free_energy.analyze_barriers()
Outputs:
Constrained MD for PMF Calculation:
Systematically sample reaction coordinate windows:
# Define windows along reaction coordinate
windows = [(1.5 + i*0.1) for i in range(20)] # 1.5 Å to 3.5 Å
umbrella = UmbrellaSampling(
system=qmmm_system,
cv=cv,
windows=windows,
force_constant=100.0, # kcal/mol/Ų
timestep=1.0,
temperature=300
)
# Run each window (can be parallelized)
umbrella.run_windows(
equilibration=5000, # 5 ps equilibration per window
production=20000, # 20 ps production per window
save_frequency=100, # Save every 0.1 ps
n_parallel=4 # Run 4 windows in parallel
)
# Analyze using WHAM
free_energy = umbrella.analyze_wham()
Advantages:
Enhanced Sampling via Potential Energy Boost:
Accelerate sampling by reducing energy barriers:
amd = AcceleratedMD(
system=qmmm_system,
boost_type="dual", # Boost both dihedral + total energy
e_threshold=10.0, # Boost below E+10 kcal/mol
alpha_dihedral=5.0, # Dihedral boost strength
alpha_total=10.0, # Total energy boost strength
timestep=2.0,
temperature=300
)
trajectory = amd.run(steps=200000) # 400 ps with acceleration
# Reweight trajectory to remove boost
free_energy = trajectory.reweight_by_boost_energy()
Applications:
Locate and Characterize TS Structures:
# From metadynamics trajectory
ts_finder = TransitionStateFinder(
metad_trajectory=metad_traj,
free_energy_surface=fe_profile
)
# Find TS structure (highest energy on MEP)
ts_structure = ts_finder.find_ts(
refine=True,
opt_method="L-BFGS"
)
# Characterize TS
ts_analysis = ts_structure.analyze()
print(f"TS Energy: {ts_analysis['energy']:.2f} kcal/mol")
print(f"Barrier height: {ts_analysis['barrier_forward']:.2f} kcal/mol")
print(f"Barrier height (reverse): {ts_analysis['barrier_reverse']:.2f} kcal/mol")
print(f"TS geometry verified: {ts_analysis['verified']}")
Multi-Step Reaction Mechanisms:
Study sequential bond breaking/forming:
# Example: Serine protease reaction mechanism
# Step 1: Nucleophilic attack (Ser195 on substrate)
# Step 2: Tetrahedral intermediate formation
# Step 3: Acyl-enzyme formation
# Step 4: Water activation and acyl hydrolysis
steps = [
{
"name": "Nucleophilic attack",
"cv": Distance(["Ser195-OG", "C1-substrate"]),
"expected_barrier": 12.0 # kcal/mol
},
{
"name": "Proton transfer",
"cv": Distance(["His57-NE", "Proton"]),
"expected_barrier": 8.0
},
{
"name": "Acylation",
"cv": Distance(["Ser195-C", "Peptide-N"]),
"expected_barrier": 5.0
},
{
"name": "Deacylation",
"cv": Distance(["Water-O", "Acyl-C"]),
"expected_barrier": 15.0
}
]
# Run each step with QM/MM
for step in steps:
result = qmmm.study_step(step)
print(f"{step['name']}: {result['barrier']:.1f} kcal/mol")
| Technique | Speed | Accuracy | Use Case | |-----------|-------|----------|----------| | Metadynamics | Fast | Good | Explore landscape, find TS guess | | Umbrella Sampling | Medium | Excellent | Precise barriers, PMF convergence | | aMD | Very Fast | Medium | Escape local minima, sample states | | Targeted MD | Fast | Good | Pull along specific pathway | | Steered MD | Very Fast | Medium | Non-equilibrium pulling experiments |
Enzyme Mechanism Elucidation:
Drug Metabolism Prediction:
Protein Engineering:
Chemical Reactivity in Proteins:
Input:
pdb skillpubchemuniprotpubmedOutput:
aseopenmm MD validationComputational Cost:
Hardware:
# 1. Prepare QM/MM system
python qmmm_setup.py --pdb enzyme_complex.pdb \
--qm-atoms "catalytic_residues.txt" \
--qm-method MOPAC --force-field AMBER14
# 2. Equilibrate
python qmmm_equilibrate.py --system prepared_qmmm.inp \
--temperature 300 --steps 50000
# 3. Run metadynamics to explore
python qmmm_metad.py --system equilibrated.inp \
--cv "distance C1 C2" --duration 100 \
--output metad_landscape.txt
# 4. Find transition state
python qmmm_ts_finder.py --metad-traj metadynamics.dcd \
--refine true --output ts_structure.pdb
# 5. Run umbrella sampling for precise barrier
python qmmm_umbrella.py --system equilibrated.inp \
--cv "distance C1 C2" --windows 20 \
--window-width 0.1 --output pmf.txt
# 6. Analyze mechanism
python qmmm_mechanism.py --ts-structure ts_structure.pdb \
--umbrella-pmf pmf.txt --report mechanism.md
tools
Onboard and manage Paperclip AI for research-paper knowledge and agent orchestration
development
Perform AI-powered web searches with real-time information using Perplexity models via LiteLLM and OpenRouter. This skill should be used when conducting web searches for current information, finding recent scientific literature, getting grounded answers with source citations, or accessing information beyond the model knowledge cutoff. Provides access to multiple Perplexity models including Sonar Pro, Sonar Pro Search (advanced agentic search), and Sonar Reasoning Pro through a single OpenRouter API key.
testing
Generate a structured scientific PDF report from a JSON description. Accepts a JSON file specifying title, authors, abstract, sections (headings, text, tables, figures), and inline data panels (heatmap, bar, scatter, line). Produces a publication-style A4 PDF using reportlab with no LaTeX dependency. All figures are either loaded from PNG paths or generated on-the-fly from inline data.
development
Execute arbitrary Python code and return stdout. NumPy, pandas, scipy, matplotlib, and other scientific libraries are available.