Protein-Ligand MM/PBSA Workflow (Execution-Ready)
Note:
- Local files are not directly accessible by the server. Please upload them to the server using
molclaw-file-transferbefore execution. - For PDB file inputs, it is recommended to preprocess them using
molclaw-pdbfixerbefore execution. - Please refer to skill
molclaw-scp-serverto complete tool invocation.
Canonical Toolchain
fix_pdb→ cleans the receptor and returnsoutput_file.prepare_complex→ consumes the repaired protein plus ligand to build the MD workspace and writesoutput_dir.run_mmpbsa→ consumeswork_dirto execute GB/PB calculations and emits CSV summaries.analyze_mmpbsa(optional) → consumesrun_mmpbsa.output_dirto derive plots/reports from the MM/PBSA results.
SCP Tool Names (must use)
fix_pdbprepare_complexrun_mmpbsaanalyze_mmpbsa
Tool References
fix_pdb: reference_fix_pdb.mdprepare_complex: reference_prepare_complex.mdrun_mmpbsa: reference_run_mmpbsa.mdanalyze_mmpbsa: reference_analyze_mmpbsa.md
Data Handover Contract
fix_pdb.output_file→prepare_complex.protein(never substitute with manual paths).prepare_complex.output_dir→run_mmpbsa.work_dir(required to contain em.gro, md.xtc, md.tpr, topol.top, ligand files).run_mmpbsa.output_dir→analyze_mmpbsa.work_dirwhen analysis is enabled.
Step Details
Step 1: fix_pdb
- Pre-flight checks: ensure
input_pathexists and is a readable PDB;dry_rundefaults toFalseso the file is written unless explicitly skipping. - Inputs:
input_path,add_hydrogens,remove_water,replace_nonstandard,add_missing_residues,dry_run. - Optional stage: set
keep_chainsto restrict the repair when a subset of chains is needed. - Success criteria:
status == "success",output_fileis populated, atom/residue counts report >0. - Fallback hints: replay the
msg, mention which residue/chain failed, or rerun withdry_run=Trueto diagnose before writing.
Step 2: prepare_complex
- Pre-flight checks: confirm
proteinequalsfix_pdb.output_file,ligandpath exists, and anyposeindex is valid within the ligand file. - Inputs:
protein,ligand,pose,gpu_ids,full_md,nvt_time,npt_time,md_time,ph. - Optional stage: short circuits such as
full_md=Falsefor quick workspace generation, but then downstream steps must adjust expectations. - Success criteria:
status == "success",output_diris non-empty,filescontainsem.gro/md.xtc/topol.top. - Fallback hints: if GPU resources are oversubscribed, rerun with
gpu_idstrimmed orfull_md=False; if ligand conversion fails, switch to.mol2or.pdbinput.
Step 3: run_mmpbsa
- Pre-flight checks:
work_direxists and matchesprepare_complex.output_dir; verify expectedem.gro,md.xtc, andtopol.topexist before invoking. - Inputs:
work_dir,method(gb/pb/both),nproc,interval,startframe,endframe,generate_input,dry_run. - Optional stage:
methodcontrols whether GB, PB, or both runs execute;dry_run=Truetests configuration without executing heavy compute. - Success criteria:
status == "success",gb_dirorpb_diris created,resultsdictionary contains energy estimates, required CSVs (FINAL_RESULTS.csv) exist. - Fallback hints: on missing CSVs, check
nproclimits or re-run withgenerate_input=True; ifdry_runwas leftTrue, rerun with the actual run.
Step 4: analyze_mmpbsa (optional)
- Pre-flight checks:
enable_analysisflagTrueandwork_direqualsrun_mmpbsa.output_dir; confirm the CSV outputs are present. - Inputs:
work_dir. - Optional stage: no extra per-file overrides are required in normal workflow usage.
- Success criteria:
status == "success",output_direxists,reportsdictionary lists generated PNG/CSV/MD artifacts. - Fallback hints: treat analyzer failures as soft; log the
msgand keep therun_mmpbsaresults as the primary output.
Agent Flow
- Protein repair → complex build:
fix_pdb.output_filefeedsprepare_complex.protein, guaranteeing the complex uses the cleaned receptor. - Workspace build → free-energy run:
prepare_complex.output_dirbecomesrun_mmpbsa.work_dir, producing bothmmgbsa/FINAL_RESULTS.csvandmmpbsa/FINAL_RESULTS.csvdepending onmethod. - Optional analysis: when enabled, the analyzer consumes
run_mmpbsa.output_dir(work_dir) to assemble summary plots, which are then surfaced throughanalyze_mmpbsa.output_dirandreports. - Normalized insights: every branch funnels into the same
work_dirCSV artifacts so downstream agents can compare GB, PB, and analyzer outputs uniformly.
Normalized Outputs (per workflow)
fix_pdb:output_file(cleaned receptor).prepare_complex:output_dir/files(workspace containing GROMACS artifacts).run_mmpbsa:work_dir,gb_dir,pb_dir,results,command.analyze_mmpbsa:output_dir,reports,detected_mode,missing_files(optional insights).
Safety Checklist
- Never pass manual MD files instead of
prepare_complex.output_dir. - Treat any missing
output_file/output_diras a hard failure and stop before the next tool. - Validate GPU/CPU resources before running long
run_mmpbsajobs (nproc,gpu_ids). - If
method="both", ensure both PB and GB CSVs are created; otherwise, rerun withmethod="pb"or"gb"only. - Surface actionable diagnostics (
missing file,invalid pose,transport error) in themsgfield.