[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EDRMM41FD8X6DMY8XJNCZP":3,"skill-same:01M7EDRMM41FD8X6DMY8XJNCZP":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M7EDRMM41FD8X6DMY8XJNCZP","molclaw-foldx-tool",null,"FoldX protein stability and mutation analysis tool. Supports 8 modes: structure repair (RepairPDB), stability calculation (Stability), mutation ΔΔG (BuildModel), complex interface energy (AnalyseComplex), alanine scanning (AlaScan), position scanning (PositionScan), PSSM generation (Pssm), and per-residue energy decomposition (SequenceDetail). Covers fast empirical force-field evaluation between geometric analysis (interaction-visualizer) and full MD simulation (MMPBSA).","sherkevin\u002Fbenchmark","sherkevin","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F78121652?v=4","01M7EDKCMQC9GKR7A7J45YNK7F","Shervin","01M7EDKCNA0A6ZHHG5XJ3VK1E5",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsherkevin\u002Fbenchmark\u002Fblob\u002Fcodex\u002Fprogress-20260924\u002Fsrc\u002Fmolbench_repo\u002Fskills\u002FL1_tools\u002Fmolclaw-foldx-tool\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: molclaw-foldx-tool\ndescription: >\n  FoldX protein stability and mutation analysis tool. Supports 8 modes: structure\n  repair (RepairPDB), stability calculation (Stability), mutation ΔΔG (BuildModel),\n  complex interface energy (AnalyseComplex), alanine scanning (AlaScan), position\n  scanning (PositionScan), PSSM generation (Pssm), and per-residue energy\n  decomposition (SequenceDetail). Covers fast empirical force-field evaluation\n  between geometric analysis (interaction-visualizer) and full MD simulation (MMPBSA).\nlicense: MIT license\nmetadata:\n    skill-author: PJLab\n    skill-level: L1-Tool\n    methodology-ref: >\n      L3 Principle 2 (Tiered Screening — FoldX as Tier 3 extension for protein\n      engineering between docking\u002Frescoring and MD\u002FMMPBSA),\n      L3 Principle 9 (Never trust single tool — cross-validate FoldX ΔΔG with\n      MMPBSA or Boltz-2),\n      L3 Principle 13 (Computation-first — ΔΔG values must come from FoldX tool\n      calls, never from LLM training knowledge),\n      L3 Principle 17 (Residue numbering — positions\u002Fmutant_file use PDB numbering,\n      translate from task numbering scheme before calling)\n---\n\n# FoldX Protein Stability & Mutation Analysis\n\nNote: \n- Local files are not directly accessible by the server. Please upload them to the server using `molclaw-file-transfer` before execution. \n- For PDB file inputs, it is recommended to preprocess them using `molclaw-pdbfixer` before execution.\n- Please refer to skill `molclaw-scp-server` to complete tool invocation.\n\n## Critical Prerequisite\n\n> **MANDATORY: Run `mode=repairpdb` on every PDB before any other FoldX mode.**\n> FoldX optimizes side-chain rotamers against its own empirical energy function;\n> unrepaired structures produce unreliable energy values. This is independent of\n> `molclaw-pdbfixer` — even pdbfixer-repaired structures need FoldX RepairPDB.\n> The output `*_Repair.pdb` is the ONLY acceptable input for subsequent FoldX modes.\n\n- For PDB file inputs, it is recommended to preprocess them using `molclaw-pdbfixer` before FoldX RepairPDB.\n\n## When To Use This Skill\n\n| Scenario | Use FoldX | Use other tool instead |\n|----------|:---------:|----------------------|\n| Evaluate protein intrinsic stability (ΔG) | ✅ `stability` | — |\n| Predict effect of known mutations (ΔΔG) | ✅ `buildmodel` | — |\n| Protein–protein interface energy (fast, minutes) | ✅ `analysecomplex` | MMPBSA (precise, hours) |\n| Identify interface hotspot residues | ✅ `alascan` with `chains` | MMPBSA per-residue decomposition (precise) |\n| Saturating mutagenesis scan at specific sites | ✅ `positionscan` | — |\n| Affinity maturation on complex interface | ✅ `pssm` | — |\n| Per-residue energy decomposition | ✅ `sequencedetail` | interaction-visualizer (geometry level) |\n| Small-molecule binding free energy | ❌ | Boltz-2, MMPBSA |\n| MD trajectory dynamics | ❌ | GROMACS, OpenMM |\n| Batch docking pose evaluation | ❌ | EquiScore, ProLIF |\n\n## Unified Tool Interface\n\nAll 8 modes are accessed through a single tool `foldx_tool` with a `mode` parameter. The full parameter set is:\n\n```tex\nRun FoldX energy evaluation and mutation-scanning workflows for protein stability\nor complex-interface screening.\nArgs:\n    mode (str): FoldX command mode, REQUIRED. One of: repairpdb, stability,\n        buildmodel, analysecomplex, alascan, positionscan, pssm, sequencedetail.\n    pdb_path (str): Input PDB file path, REQUIRED for all modes.\n    chains (str|None): Complex chain definition, e.g. 'A,B' or 'HL,A'.\n        REQUIRED for analysecomplex and pssm.\n        OPTIONAL for alascan (enables complex-mode interface scanning).\n        Ignored by other modes. Default: None.\n    positions (str|None): Comma-separated mutation position tokens.\n        Format: OrigAA(1-letter) + ChainID + ResNum + TargetAA.\n        REQUIRED for positionscan and pssm. Default: None.\n    mutant_file (str|None): Path to FoldX-format mutation list file.\n        REQUIRED for buildmodel. Default: None.\n    number_of_runs (int): Independent repeats for buildmodel (1-100). Default: 5.\n    water (str): Water handling: CRYSTAL|PREDICT|NONE|COMPARE. Default: CRYSTAL.\n    pdb_hydrogens (bool): Read hydrogens from PDB. Default: False.\n    dry_run (bool): Return planned command without execution. Default: False.\n    timeout (int): Maximum execution time in seconds. Default: 7200.\nReturn:\n    status (str): success | error | partial_success\n    msg (str): Execution summary or error message\n    mode (str): Normalized FoldX command mode\n    output_dir (str|None): Run directory path\n    foldx_command (str|None): Executed or planned command line\n    pdb_file (str|None): Input PDB filename in output_dir\n    key_files (dict): Key output files relative to output_dir\n    metrics (dict): return_code, generated_file_count, and mode-specific values\n        (total_energy, mean_ddg, ddg_values, interaction_energy, hotspot_count)\n    stderr_tail (str, only on error): Last portion of FoldX stderr for diagnostics\n```\n\n## Parameter–Mode Matrix\n\n| Parameter | repairpdb | stability | buildmodel | analysecomplex | alascan | positionscan | pssm | sequencedetail |\n|-----------|:---------:|:---------:|:----------:|:--------------:|:-------:|:------------:|:----:|:--------------:|\n| `pdb_path` | **REQUIRED** | **REQUIRED** | **REQUIRED** | **REQUIRED** | **REQUIRED** | **REQUIRED** | **REQUIRED** | **REQUIRED** |\n| `chains` | — | — | — | **REQUIRED** | optional | — | **REQUIRED** | — |\n| `positions` | — | — | — | — | — | **REQUIRED** | **REQUIRED** | — |\n| `mutant_file` | — | — | **REQUIRED** | — | — | — | — | — |\n| `number_of_runs` | — | — | used (default 5) | — | — | — | — | — |\n| `water` | used | used | used | used | used | used | used | used |\n| `pdb_hydrogens` | used | used | used | used | used | used | used | used |\n\n## Mode 1: repairpdb — Structure Repair for FoldX\n\nOptimizes side-chain rotamers and removes bad contacts against the FoldX energy function.\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"repairpdb\",\n    \"pdb_path\": prepared_pdb_path\n})\nresult = client.parse_result(response)\nrepaired_pdb = result[\"output_dir\"] + \"\u002F\" + [k for k in result[\"key_files\"] if k.endswith(\"_Repair.pdb\")][0]\n```\n\nKey outputs: `{stem}_Repair.pdb` (repaired structure), `{stem}_Repair.fxout` (energy log).\n\n## Mode 2: stability — Protein Free Energy (ΔG)\n\nComputes total free energy of the protein structure. Lower (more negative) ΔG = more stable.\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"stability\",\n    \"pdb_path\": foldx_repaired_pdb_path\n})\nresult = client.parse_result(response)\ntotal_energy = result[\"metrics\"][\"total_energy\"]  # ΔG in kcal\u002Fmol\n```\n\nKey outputs: `{stem}_0_ST.fxout`. Key metric: `metrics.total_energy`.\n\n## Mode 3: buildmodel — Mutation ΔΔG Calculation\n\nModels specified mutations and computes ΔΔG (free energy change upon mutation).\n\n### Mutant file format\n\nEach line contains one mutation or combination, terminated by semicolon. Format per mutation: `OrigAA(1-letter) + ChainID + ResidueNumber + NewAA(1-letter)`.\n\n```\nLA42G;\nVA68D;\nLA42G,VA68D;\n```\n\nLine 1: chain A position 42 Leu→Gly. Line 3: simultaneous double mutation.\n\nCommon format errors:\n- ❌ `Leu42Gly;` — must use single-letter amino acid codes\n- ❌ `L42G;` — must include chain ID between amino acid code and residue number\n- ❌ `LA42G` — must end with semicolon\n\n**Residue numbering (L3 Principle 17):** Use the PDB file's numbering, not UniProt or literature numbering. Translate before writing the mutant file.\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"buildmodel\",\n    \"pdb_path\": foldx_repaired_pdb_path,\n    \"mutant_file\": \"\u002Fpath\u002Fto\u002Fmutations.txt\",\n    \"number_of_runs\": 5\n})\nresult = client.parse_result(response)\nmean_ddg = result[\"metrics\"][\"mean_ddg\"]       # average ΔΔG in kcal\u002Fmol\nddg_values = result[\"metrics\"][\"ddg_values\"]   # per-mutation ΔΔG list\n```\n\nKey outputs: `Dif_{stem}.fxout` (core ΔΔG), `Average_{stem}.fxout`, `Raw_{stem}.fxout`. Key metrics: `metrics.mean_ddg`, `metrics.ddg_values`.\n\n## Mode 4: analysecomplex — Protein–Protein Interface Energy\n\nComputes interaction energy between two sides of a protein complex.\n\n### Determining the chains parameter\n\n**Before calling analysecomplex, you MUST check actual chain IDs in the PDB file.** Do not assume chains are A and B. Use `calculate_pdb_basic_info` or inspect the PDB to identify chain IDs, then decide which chains form each side of the complex:\n- Antibody H+L vs antigen A → `chains=\"HL,A\"`\n- Receptor A vs ligand B → `chains=\"A,B\"`\n- Trimer AB vs C → `chains=\"AB,C\"`\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"analysecomplex\",\n    \"pdb_path\": foldx_repaired_complex_path,\n    \"chains\": \"A,B\"   # MUST match actual PDB chain IDs\n})\nresult = client.parse_result(response)\ninteraction_energy = result[\"metrics\"][\"interaction_energy\"]  # kcal\u002Fmol\n```\n\nKey outputs: `Interaction_{stem}_AC.fxout`, `Interface_Residues_{stem}_AC.fxout`, `Summary_{stem}_AC.fxout`, `Indiv_energies_{stem}_AC.fxout`. Key metric: `metrics.interaction_energy`.\n\n## Mode 5: alascan — Alanine Scanning\n\nMutates each residue to alanine and computes ΔΔG. Two sub-modes:\n\n**Monomer mode (no chains):** Computes effect on protein folding stability only.\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"alascan\",\n    \"pdb_path\": foldx_repaired_pdb_path\n})\n```\n\n**Complex mode (with chains):** Computes effect on interface interaction energy. **This is the correct mode for interface hotspot identification.**\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"alascan\",\n    \"pdb_path\": foldx_repaired_complex_path,\n    \"chains\": \"A,B\"   # MUST match actual PDB chain IDs\n})\nresult = client.parse_result(response)\nhotspot_count = result[\"metrics\"][\"hotspot_count\"]  # residues with ΔΔG > 1.0\n```\n\nKey output: `{stem}_AS.fxout`. Key metric: `metrics.hotspot_count`.\n\n> **⚠ Common mistake:** Running AlaScan without `chains` on a complex PDB gives ΔΔG for monomer stability, NOT interface binding contribution. If your goal is to find interface hotspots, you MUST provide `chains`.\n\n## Mode 6: positionscan — Saturating Mutagenesis\n\nScans specified positions through all 20 amino acid substitutions (or a specified target).\n\n### Positions format\n\nEach token: `OrigAA(1-letter) + ChainID + ResidueNumber + Target`. Use lowercase `a` to scan all 20 amino acids.\n\n- `RA32a` → Arg at chain A position 32, scan all 20 AAs\n- `KA45G` → Lys at chain A position 45, mutate only to Gly\n- `RA32a,KA45a` → scan both positions\n\nCommon format errors:\n- ❌ `ArgA32a` — must use single-letter AA code (R, not Arg)\n- ❌ `R32a` — must include chain ID (RA32a)\n- ❌ `R:A:32:a` — no separators within a token\n\n**Residue numbering (L3 Principle 17):** positions use the PDB file's numbering. Translate from task numbering before calling.\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"positionscan\",\n    \"pdb_path\": foldx_repaired_pdb_path,\n    \"positions\": \"RA32a,KA45a\"\n})\nresult = client.parse_result(response)\n```\n\nKey output: `PS_{stem}_scanning_output.txt`.\n\n## Mode 7: pssm — Position-Specific Scoring Matrix on Complex\n\nCombines position scanning with complex analysis. For each position, evaluates all 20 substitutions considering BOTH protein stability AND interface binding energy. **Requires both `chains` and `positions`.**\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"pssm\",\n    \"pdb_path\": foldx_repaired_complex_path,\n    \"chains\": \"A,B\",\n    \"positions\": \"RA32a,KA45a\"\n})\nresult = client.parse_result(response)\n```\n\nKey outputs: `PSSM_{stem}.txt` (scoring matrix), `PSSM_Clash_{stem}.txt` (steric clashes).\n\n## Mode 8: sequencedetail — Per-Residue Energy Decomposition\n\nReports energy contribution of each residue broken down by van der Waals, hydrogen bonds, solvation, electrostatics, etc.\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"sequencedetail\",\n    \"pdb_path\": foldx_repaired_pdb_path\n})\nresult = client.parse_result(response)\n```\n\nKey output: `SD_{stem}.fxout`.\n\n## Typical Workflow Combinations\n\n**Flow A — Protein stability assessment:**\n`repairpdb` → `stability` (wild-type ΔG) → `buildmodel` (mutant ΔΔG)\n\n**Flow B — Interface hotspot identification:**\n`repairpdb` → `analysecomplex` (total interface energy) → `alascan` with chains (per-residue hotspots)\n\n**Flow C — Affinity maturation:**\n`repairpdb` → `analysecomplex` → `pssm` (systematic interface scanning for optimal substitutions)\n\n**Flow D — Mutation site discovery:**\n`repairpdb` → `positionscan` (saturating scan) → select ΔΔG \u003C −0.5 → `buildmodel` (validate combinations)\n\n## Scoring Interpretation\n\n**ΔΔG sign convention:** Positive = destabilizing (harmful mutation). Negative = stabilizing (beneficial mutation). Unit: kcal\u002Fmol.\n\n**Confidence thresholds:**\n- |ΔΔG| \u003C 0.5 kcal\u002Fmol → within FoldX noise range, not actionable\n- ΔΔG > 1.0 kcal\u002Fmol → likely destabilizing\n- ΔΔG \u003C −0.5 kcal\u002Fmol → potentially stabilizing\n- ΔΔG \u003C −1.0 kcal\u002Fmol → significantly stabilizing (strong candidate)\n\n**AlaScan hotspot:** ΔΔG(Ala) > 1.0 kcal\u002Fmol → interface hotspot residue.\n\n**AnalyseComplex interaction energy:** More negative = stronger binding. Near zero or positive = no significant complex formation.\n\n**Do NOT treat FoldX energies as exact binding free energies.** FoldX uses an empirical force field with systematic errors of ±0.5–1.0 kcal\u002Fmol. Use for ranking and trend identification, not absolute affinity prediction. For high-accuracy ΔG, use MMPBSA (Skill 6).\n\n## Common Failures & Recovery\n\n| Failure | Likely Cause | Recovery |\n|---------|-------------|----------|\n| `\"FoldX executable not found\"` | foldx binary not in PATH | Check `foldx_bin` parameter; verify FoldX installation |\n| `\"chains is required for mode=analysecomplex\"` | Forgot to specify chains | Check PDB chain IDs with `calculate_pdb_basic_info`, then set chains |\n| `\"invalid position token: 'Arg-A-32'\"` | positions format incorrect | Use format `RA32a` (1-letter AA + chain + number + target) |\n| `\"invalid chains format: 'A B'\"` | Chains not comma-separated | Use `\"A,B\"` not `\"A B\"` |\n| FoldX exit code ≠ 0 + stderr \"not found in PDB\" | Chain ID in `chains` parameter doesn't exist in PDB | Re-check PDB chain IDs |\n| FoldX timeout | Large protein + many-site scan | Reduce positions count or increase timeout |\n| `partial_success` with empty key_files | FoldX ran but output filenames don't match expected patterns | Manually check output_dir contents |\n| BuildModel ΔΔG all near 0 | Input structure not FoldX-repaired | Run mode=repairpdb first, then retry |\n| AlaScan finds no hotspots (all ΔΔG \u003C 1.0) | Ran without chains (monomer mode instead of complex mode) | Add `chains` parameter to enable complex-mode scanning |\n| `\"mutant_file is required\"` | Forgot mutant_file for buildmodel | Create mutation list file in FoldX format (see Mode 3) |\n\n## Relationship to Other Tools\n\n- **vs `molclaw-pdbfixer` (fix_pdb):** PDBFixer does topology repair (missing atoms, non-standard residues). FoldX RepairPDB does energy-based side-chain optimization. For FoldX workflows, apply BOTH: pdbfixer first, then FoldX repairpdb.\n- **vs `molclaw-protein-ligand-mmpbsa` \u002F `molclaw-protein-protein-mmpbsa`:** MMPBSA uses MD simulation for precise ΔG (Tier 4, hours). FoldX provides fast empirical ΔG\u002FΔΔG (Tier 3, minutes). Use FoldX for screening\u002Franking, MMPBSA for final validation of top candidates.\n- **vs `molclaw-interaction-visualizer`:** interaction-visualizer analyzes geometric interactions (H-bonds, hydrophobic contacts, etc.). FoldX provides energy quantification. They are complementary — use interaction-visualizer for visual\u002Fgeometric analysis, FoldX for energy-based ranking.\n- **vs `proteinmpnn_tool`:** ProteinMPNN designs sequences from structure (generative). FoldX evaluates mutations on existing sequences (evaluative). Use ProteinMPNN for design, FoldX BuildModel\u002FPositionScan for evaluation and cross-validation.\n","# FoldX Protein Stability & Mutation Analysis\n\nNote: \n- Local files are not directly accessible by the server. Please upload them to the server using `molclaw-file-transfer` before execution. \n- For PDB file inputs, it is recommended to preprocess them using `molclaw-pdbfixer` before execution.\n- Please refer to skill `molclaw-scp-server` to complete tool invocation.\n\n## Critical Prerequisite\n\n> **MANDATORY: Run `mode=repairpdb` on every PDB before any other FoldX mode.**\n> FoldX optimizes side-chain rotamers against its own empirical energy function;\n> unrepaired structures produce unreliable energy values. This is independent of\n> `molclaw-pdbfixer` — even pdbfixer-repaired structures need FoldX RepairPDB.\n> The output `*_Repair.pdb` is the ONLY acceptable input for subsequent FoldX modes.\n\n- For PDB file inputs, it is recommended to preprocess them using `molclaw-pdbfixer` before FoldX RepairPDB.\n\n## When To Use This Skill\n\n| Scenario | Use FoldX | Use other tool instead |\n|----------|:---------:|----------------------|\n| Evaluate protein intrinsic stability (ΔG) | ✅ `stability` | — |\n| Predict effect of known mutations (ΔΔG) | ✅ `buildmodel` | — |\n| Protein–protein interface energy (fast, minutes) | ✅ `analysecomplex` | MMPBSA (precise, hours) |\n| Identify interface hotspot residues | ✅ `alascan` with `chains` | MMPBSA per-residue decomposition (precise) |\n| Saturating mutagenesis scan at specific sites | ✅ `positionscan` | — |\n| Affinity maturation on complex interface | ✅ `pssm` | — |\n| Per-residue energy decomposition | ✅ `sequencedetail` | interaction-visualizer (geometry level) |\n| Small-molecule binding free energy | ❌ | Boltz-2, MMPBSA |\n| MD trajectory dynamics | ❌ | GROMACS, OpenMM |\n| Batch docking pose evaluation | ❌ | EquiScore, ProLIF |\n\n## Unified Tool Interface\n\nAll 8 modes are accessed through a single tool `foldx_tool` with a `mode` parameter. The full parameter set is:\n\n```tex\nRun FoldX energy evaluation and mutation-scanning workflows for protein stability\nor complex-interface screening.\nArgs:\n    mode (str): FoldX command mode, REQUIRED. One of: repairpdb, stability,\n        buildmodel, analysecomplex, alascan, positionscan, pssm, sequencedetail.\n    pdb_path (str): Input PDB file path, REQUIRED for all modes.\n    chains (str|None): Complex chain definition, e.g. 'A,B' or 'HL,A'.\n        REQUIRED for analysecomplex and pssm.\n        OPTIONAL for alascan (enables complex-mode interface scanning).\n        Ignored by other modes. Default: None.\n    positions (str|None): Comma-separated mutation position tokens.\n        Format: OrigAA(1-letter) + ChainID + ResNum + TargetAA.\n        REQUIRED for positionscan and pssm. Default: None.\n    mutant_file (str|None): Path to FoldX-format mutation list file.\n        REQUIRED for buildmodel. Default: None.\n    number_of_runs (int): Independent repeats for buildmodel (1-100). Default: 5.\n    water (str): Water handling: CRYSTAL|PREDICT|NONE|COMPARE. Default: CRYSTAL.\n    pdb_hydrogens (bool): Read hydrogens from PDB. Default: False.\n    dry_run (bool): Return planned command without execution. Default: False.\n    timeout (int): Maximum execution time in seconds. Default: 7200.\nReturn:\n    status (str): success | error | partial_success\n    msg (str): Execution summary or error message\n    mode (str): Normalized FoldX command mode\n    output_dir (str|None): Run directory path\n    foldx_command (str|None): Executed or planned command line\n    pdb_file (str|None): Input PDB filename in output_dir\n    key_files (dict): Key output files relative to output_dir\n    metrics (dict): return_code, generated_file_count, and mode-specific values\n        (total_energy, mean_ddg, ddg_values, interaction_energy, hotspot_count)\n    stderr_tail (str, only on error): Last portion of FoldX stderr for diagnostics\n```\n\n## Parameter–Mode Matrix\n\n| Parameter | repairpdb | stability | buildmodel | analysecomplex | alascan | positionscan | pssm | sequencedetail |\n|-----------|:---------:|:---------:|:----------:|:--------------:|:-------:|:------------:|:----:|:--------------:|\n| `pdb_path` | **REQUIRED** | **REQUIRED** | **REQUIRED** | **REQUIRED** | **REQUIRED** | **REQUIRED** | **REQUIRED** | **REQUIRED** |\n| `chains` | — | — | — | **REQUIRED** | optional | — | **REQUIRED** | — |\n| `positions` | — | — | — | — | — | **REQUIRED** | **REQUIRED** | — |\n| `mutant_file` | — | — | **REQUIRED** | — | — | — | — | — |\n| `number_of_runs` | — | — | used (default 5) | — | — | — | — | — |\n| `water` | used | used | used | used | used | used | used | used |\n| `pdb_hydrogens` | used | used | used | used | used | used | used | used |\n\n## Mode 1: repairpdb — Structure Repair for FoldX\n\nOptimizes side-chain rotamers and removes bad contacts against the FoldX energy function.\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"repairpdb\",\n    \"pdb_path\": prepared_pdb_path\n})\nresult = client.parse_result(response)\nrepaired_pdb = result[\"output_dir\"] + \"\u002F\" + [k for k in result[\"key_files\"] if k.endswith(\"_Repair.pdb\")][0]\n```\n\nKey outputs: `{stem}_Repair.pdb` (repaired structure), `{stem}_Repair.fxout` (energy log).\n\n## Mode 2: stability — Protein Free Energy (ΔG)\n\nComputes total free energy of the protein structure. Lower (more negative) ΔG = more stable.\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"stability\",\n    \"pdb_path\": foldx_repaired_pdb_path\n})\nresult = client.parse_result(response)\ntotal_energy = result[\"metrics\"][\"total_energy\"]  # ΔG in kcal\u002Fmol\n```\n\nKey outputs: `{stem}_0_ST.fxout`. Key metric: `metrics.total_energy`.\n\n## Mode 3: buildmodel — Mutation ΔΔG Calculation\n\nModels specified mutations and computes ΔΔG (free energy change upon mutation).\n\n### Mutant file format\n\nEach line contains one mutation or combination, terminated by semicolon. Format per mutation: `OrigAA(1-letter) + ChainID + ResidueNumber + NewAA(1-letter)`.\n\n```\nLA42G;\nVA68D;\nLA42G,VA68D;\n```\n\nLine 1: chain A position 42 Leu→Gly. Line 3: simultaneous double mutation.\n\nCommon format errors:\n- ❌ `Leu42Gly;` — must use single-letter amino acid codes\n- ❌ `L42G;` — must include chain ID between amino acid code and residue number\n- ❌ `LA42G` — must end with semicolon\n\n**Residue numbering (L3 Principle 17):** Use the PDB file's numbering, not UniProt or literature numbering. Translate before writing the mutant file.\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"buildmodel\",\n    \"pdb_path\": foldx_repaired_pdb_path,\n    \"mutant_file\": \"\u002Fpath\u002Fto\u002Fmutations.txt\",\n    \"number_of_runs\": 5\n})\nresult = client.parse_result(response)\nmean_ddg = result[\"metrics\"][\"mean_ddg\"]       # average ΔΔG in kcal\u002Fmol\nddg_values = result[\"metrics\"][\"ddg_values\"]   # per-mutation ΔΔG list\n```\n\nKey outputs: `Dif_{stem}.fxout` (core ΔΔG), `Average_{stem}.fxout`, `Raw_{stem}.fxout`. Key metrics: `metrics.mean_ddg`, `metrics.ddg_values`.\n\n## Mode 4: analysecomplex — Protein–Protein Interface Energy\n\nComputes interaction energy between two sides of a protein complex.\n\n### Determining the chains parameter\n\n**Before calling analysecomplex, you MUST check actual chain IDs in the PDB file.** Do not assume chains are A and B. Use `calculate_pdb_basic_info` or inspect the PDB to identify chain IDs, then decide which chains form each side of the complex:\n- Antibody H+L vs antigen A → `chains=\"HL,A\"`\n- Receptor A vs ligand B → `chains=\"A,B\"`\n- Trimer AB vs C → `chains=\"AB,C\"`\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"analysecomplex\",\n    \"pdb_path\": foldx_repaired_complex_path,\n    \"chains\": \"A,B\"   # MUST match actual PDB chain IDs\n})\nresult = client.parse_result(response)\ninteraction_energy = result[\"metrics\"][\"interaction_energy\"]  # kcal\u002Fmol\n```\n\nKey outputs: `Interaction_{stem}_AC.fxout`, `Interface_Residues_{stem}_AC.fxout`, `Summary_{stem}_AC.fxout`, `Indiv_energies_{stem}_AC.fxout`. Key metric: `metrics.interaction_energy`.\n\n## Mode 5: alascan — Alanine Scanning\n\nMutates each residue to alanine and computes ΔΔG. Two sub-modes:\n\n**Monomer mode (no chains):** Computes effect on protein folding stability only.\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"alascan\",\n    \"pdb_path\": foldx_repaired_pdb_path\n})\n```\n\n**Complex mode (with chains):** Computes effect on interface interaction energy. **This is the correct mode for interface hotspot identification.**\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"alascan\",\n    \"pdb_path\": foldx_repaired_complex_path,\n    \"chains\": \"A,B\"   # MUST match actual PDB chain IDs\n})\nresult = client.parse_result(response)\nhotspot_count = result[\"metrics\"][\"hotspot_count\"]  # residues with ΔΔG > 1.0\n```\n\nKey output: `{stem}_AS.fxout`. Key metric: `metrics.hotspot_count`.\n\n> **⚠ Common mistake:** Running AlaScan without `chains` on a complex PDB gives ΔΔG for monomer stability, NOT interface binding contribution. If your goal is to find interface hotspots, you MUST provide `chains`.\n\n## Mode 6: positionscan — Saturating Mutagenesis\n\nScans specified positions through all 20 amino acid substitutions (or a specified target).\n\n### Positions format\n\nEach token: `OrigAA(1-letter) + ChainID + ResidueNumber + Target`. Use lowercase `a` to scan all 20 amino acids.\n\n- `RA32a` → Arg at chain A position 32, scan all 20 AAs\n- `KA45G` → Lys at chain A position 45, mutate only to Gly\n- `RA32a,KA45a` → scan both positions\n\nCommon format errors:\n- ❌ `ArgA32a` — must use single-letter AA code (R, not Arg)\n- ❌ `R32a` — must include chain ID (RA32a)\n- ❌ `R:A:32:a` — no separators within a token\n\n**Residue numbering (L3 Principle 17):** positions use the PDB file's numbering. Translate from task numbering before calling.\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"positionscan\",\n    \"pdb_path\": foldx_repaired_pdb_path,\n    \"positions\": \"RA32a,KA45a\"\n})\nresult = client.parse_result(response)\n```\n\nKey output: `PS_{stem}_scanning_output.txt`.\n\n## Mode 7: pssm — Position-Specific Scoring Matrix on Complex\n\nCombines position scanning with complex analysis. For each position, evaluates all 20 substitutions considering BOTH protein stability AND interface binding energy. **Requires both `chains` and `positions`.**\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"pssm\",\n    \"pdb_path\": foldx_repaired_complex_path,\n    \"chains\": \"A,B\",\n    \"positions\": \"RA32a,KA45a\"\n})\nresult = client.parse_result(response)\n```\n\nKey outputs: `PSSM_{stem}.txt` (scoring matrix), `PSSM_Clash_{stem}.txt` (steric clashes).\n\n## Mode 8: sequencedetail — Per-Residue Energy Decomposition\n\nReports energy contribution of each residue broken down by van der Waals, hydrogen bonds, solvation, electrostatics, etc.\n\n```python\nresponse = await client.session.call_tool(\"foldx_tool\", arguments={\n    \"mode\": \"sequencedetail\",\n    \"pdb_path\": foldx_repaired_pdb_path\n})\nresult = client.parse_result(response)\n```\n\nKey output: `SD_{stem}.fxout`.\n\n## Typical Workflow Combinations\n\n**Flow A — Protein stability assessment:**\n`repairpdb` → `stability` (wild-type ΔG) → `buildmodel` (mutant ΔΔG)\n\n**Flow B — Interface hotspot identification:**\n`repairpdb` → `analysecomplex` (total interface energy) → `alascan` with chains (per-residue hotspots)\n\n**Flow C — Affinity maturation:**\n`repairpdb` → `analysecomplex` → `pssm` (systematic interface scanning for optimal substitutions)\n\n**Flow D — Mutation site discovery:**\n`repairpdb` → `positionscan` (saturating scan) → select ΔΔG \u003C −0.5 → `buildmodel` (validate combinations)\n\n## Scoring Interpretation\n\n**ΔΔG sign convention:** Positive = destabilizing (harmful mutation). Negative = stabilizing (beneficial mutation). Unit: kcal\u002Fmol.\n\n**Confidence thresholds:**\n- |ΔΔG| \u003C 0.5 kcal\u002Fmol → within FoldX noise range, not actionable\n- ΔΔG > 1.0 kcal\u002Fmol → likely destabilizing\n- ΔΔG \u003C −0.5 kcal\u002Fmol → potentially stabilizing\n- ΔΔG \u003C −1.0 kcal\u002Fmol → significantly stabilizing (strong candidate)\n\n**AlaScan hotspot:** ΔΔG(Ala) > 1.0 kcal\u002Fmol → interface hotspot residue.\n\n**AnalyseComplex interaction energy:** More negative = stronger binding. Near zero or positive = no significant complex formation.\n\n**Do NOT treat FoldX energies as exact binding free energies.** FoldX uses an empirical force field with systematic errors of ±0.5–1.0 kcal\u002Fmol. Use for ranking and trend identification, not absolute affinity prediction. For high-accuracy ΔG, use MMPBSA (Skill 6).\n\n## Common Failures & Recovery\n\n| Failure | Likely Cause | Recovery |\n|---------|-------------|----------|\n| `\"FoldX executable not found\"` | foldx binary not in PATH | Check `foldx_bin` parameter; verify FoldX installation |\n| `\"chains is required for mode=analysecomplex\"` | Forgot to specify chains | Check PDB chain IDs with `calculate_pdb_basic_info`, then set chains |\n| `\"invalid position token: 'Arg-A-32'\"` | positions format incorrect | Use format `RA32a` (1-letter AA + chain + number + target) |\n| `\"invalid chains format: 'A B'\"` | Chains not comma-separated | Use `\"A,B\"` not `\"A B\"` |\n| FoldX exit code ≠ 0 + stderr \"not found in PDB\" | Chain ID in `chains` parameter doesn't exist in PDB | Re-check PDB chain IDs |\n| FoldX timeout | Large protein + many-site scan | Reduce positions count or increase timeout |\n| `partial_success` with empty key_files | FoldX ran but output filenames don't match expected patterns | Manually check output_dir contents |\n| BuildModel ΔΔG all near 0 | Input structure not FoldX-repaired | Run mode=repairpdb first, then retry |\n| AlaScan finds no hotspots (all ΔΔG \u003C 1.0) | Ran without chains (monomer mode instead of complex mode) | Add `chains` parameter to enable complex-mode scanning |\n| `\"mutant_file is required\"` | Forgot mutant_file for buildmodel | Create mutation list file in FoldX format (see Mode 3) |\n\n## Relationship to Other Tools\n\n- **vs `molclaw-pdbfixer` (fix_pdb):** PDBFixer does topology repair (missing atoms, non-standard residues). FoldX RepairPDB does energy-based side-chain optimization. For FoldX workflows, apply BOTH: pdbfixer first, then FoldX repairpdb.\n- **vs `molclaw-protein-ligand-mmpbsa` \u002F `molclaw-protein-protein-mmpbsa`:** MMPBSA uses MD simulation for precise ΔG (Tier 4, hours). FoldX provides fast empirical ΔG\u002FΔΔG (Tier 3, minutes). Use FoldX for screening\u002Franking, MMPBSA for final validation of top candidates.\n- **vs `molclaw-interaction-visualizer`:** interaction-visualizer analyzes geometric interactions (H-bonds, hydrophobic contacts, etc.). FoldX provides energy quantification. They are complementary — use interaction-visualizer for visual\u002Fgeometric analysis, FoldX for energy-based ranking.\n- **vs `proteinmpnn_tool`:** ProteinMPNN designs sequences from structure (generative). FoldX evaluates mutations on existing sequences (evaluative). Use ProteinMPNN for design, FoldX BuildModel\u002FPositionScan for evaluation and cross-validation.\n",{"name":5,"license":24,"metadata":25,"description":29},"MIT license",{"skill-level":26,"skill-author":27,"methodology-ref":28},"L1-Tool","PJLab","L3 Principle 2 (Tiered Screening — FoldX as Tier 3 extension for protein engineering between docking\u002Frescoring and MD\u002FMMPBSA), L3 Principle 9 (Never trust single tool — cross-validate FoldX ΔΔG with MMPBSA or Boltz-2), L3 Principle 13 (Computation-first — ΔΔG values must come from FoldX tool calls, never from LLM training knowledge), L3 Principle 17 (Residue numbering — positions\u002Fmutant_file use PDB numbering, translate from task numbering scheme before calling)","FoldX protein stability and mutation analysis tool. Supports 8 modes: structure repair (RepairPDB), stability calculation (Stability), mutation ΔΔG (BuildModel), complex interface energy (AnalyseComplex), alanine scanning (AlaScan), position scanning (PositionScan), PSSM generation (Pssm), and per-residue energy decomposition (SequenceDetail). Covers fast empirical force-field evaluation between geometric analysis (interaction-visualizer) and full MD simulation (MMPBSA).\n","codex\u002Fprogress-20260924","c8ee42aa1da4aadc7e9b7e39b01c27ccdeea5cc9","src\u002Fmolbench_repo\u002Fskills\u002FL1_tools\u002Fmolclaw-foldx-tool","https:\u002F\u002Fgithub.com\u002Fsherkevin\u002Fbenchmark","https:\u002F\u002Fgithub.com\u002Fsherkevin","https:\u002F\u002Fwww.cnblogs.com\u002Fsherkevin","2026-10-09 16:43:49",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add sherkevin\u002Fbenchmark --skill molclaw-foldx-tool",{"tool":43,"command":44},"bunx","bunx skills add sherkevin\u002Fbenchmark --skill molclaw-foldx-tool",{"tool":46,"command":47},"pnpm","pnpm dlx skills add sherkevin\u002Fbenchmark --skill molclaw-foldx-tool","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsherkevin\u002Fbenchmark\u002Fblob\u002Fcodex\u002Fprogress-20260924\u002Fsrc\u002Fmolbench_repo\u002Fskills\u002FL1_tools\u002Fmolclaw-foldx-tool\u002FSKILL.md",true,[],[52,59,66,73,80,87],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7EDY1139HR68WB7A3B7S4SC","molclaw-smiles-valid-check","Check if the input molecule SMILES string is valid.","https:\u002F\u002Fgithub.com\u002Fsherkevin\u002Fbenchmark\u002Fblob\u002Fcodex\u002Fprogress-20260924\u002Fsrc\u002Fmolbench_repo\u002Fskills\u002FL1_tools\u002Fmolclaw-smiles-valid-check\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7EDXNFE3A53X9RJHZ7MEVR1","molclaw-skill-template-writer","Formats extracted execution patterns into standard MolClaw skill documents. Accepts structured input from the Skill Crystallization Meta-Workflow (L2-12) and outputs a properly formatted L1 or L2 skill document conforming to MolClaw conventions. This skill ensures that auto-generated skills are structurally identical to expert-curated skills, enabling seamless integration into the skill matching and loading pipeline.","https:\u002F\u002Fgithub.com\u002Fsherkevin\u002Fbenchmark\u002Fblob\u002Fcodex\u002Fprogress-20260924\u002Fsrc\u002Fmolbench_repo\u002Fskills\u002FL1_tools\u002Fmolclaw-skill-template-writer\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7EDXJSJESBRR1DQYRCS4DTW","molclaw-sequence-valid-check","Check if the input protein sequence is valid.","https:\u002F\u002Fgithub.com\u002Fsherkevin\u002Fbenchmark\u002Fblob\u002Fcodex\u002Fprogress-20260924\u002Fsrc\u002Fmolbench_repo\u002Fskills\u002FL1_tools\u002Fmolclaw-sequence-valid-check\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7EDXF2M82DJKKFBTPV1FJFN","molclaw-scp-server","All tools utilized within molclaw skills connect via the MCP protocol. This skill serves as a unified guide for using the MCP Server. This skill must be loaded to create the MCP server before invoking any tools.","https:\u002F\u002Fgithub.com\u002Fsherkevin\u002Fbenchmark\u002Fblob\u002Fcodex\u002Fprogress-20260924\u002Fsrc\u002Fmolbench_repo\u002Fskills\u002FL1_tools\u002Fmolclaw-scp-server\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7EDXBSW1SMA87ZMYJVGD1NW","molclaw-run-bioemu","Run BioEmu sequence sampling and extract ensemble structures for downstream conformation analysis.","https:\u002F\u002Fgithub.com\u002Fsherkevin\u002Fbenchmark\u002Fblob\u002Fcodex\u002Fprogress-20260924\u002Fsrc\u002Fmolbench_repo\u002Fskills\u002FL1_tools\u002Fmolclaw-run-bioemu\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7EDX8VMARAB5WTQ1DDVMY1P","molclaw-rgroup-sampling","Generate new molecules sampling from the input scaffold.","https:\u002F\u002Fgithub.com\u002Fsherkevin\u002Fbenchmark\u002Fblob\u002Fcodex\u002Fprogress-20260924\u002Fsrc\u002Fmolbench_repo\u002Fskills\u002FL1_tools\u002Fmolclaw-rgroup-sampling\u002FSKILL.md",[],[]]