Logo Molclaw Foldx Tool

Molclaw Foldx Tool

Tổ chức
InternScience
molclaw-foldx-tool

Use when calling these MolClaw MCP tools: `mcp__molclaw-scp__foldx_tool`. 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…

Tổng quan

Nhà phát hànhInternScience
Kho mãMolClaw
Tên kỹ năngmolclaw-foldx-tool
Sao
39
Bản fork
5
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được InternScience công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Molclaw Foldx Tool trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/InternScience/MolClaw/tree/main/skills/L1_tools/molclaw-foldx-tool
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/InternScience/MolClaw.git /tmp/MolClaw
mkdir -p .claude/skills
cp -r /tmp/MolClaw/skills/L1_tools/molclaw-foldx-tool .claude/skills/molclaw-foldx-tool
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Molclaw Foldx Tool trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Molclaw Foldx Tool ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Molclaw Foldx Tool với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

FoldX Protein Stability & Mutation Analysis

Invocation

Use the exact tool name and parameter schema exposed by the current harness. Tool names in SDK examples below are raw MCP names, not model-facing aliases. Local files must be uploaded with molclaw-file-transfer before a server tool can use them. Repair PDB inputs first when the workflow requires it.

Critical Prerequisite

MANDATORY: Run mode=repairpdb on every PDB before any other FoldX mode. FoldX optimizes side-chain rotamers against its own empirical energy function; unrepaired structures produce unreliable energy values. This is independent of molclaw-fix-pdb — even pdbfixer-repaired structures need FoldX RepairPDB. The output *_Repair.pdb is the ONLY acceptable input for subsequent FoldX modes.

  • For PDB file inputs, it is recommended to preprocess them using molclaw-fix-pdb before FoldX RepairPDB.

When To Use This Skill

ScenarioUse FoldXUse other tool instead
Evaluate protein intrinsic stability (ΔG)✅ stability—
Predict effect of known mutations (ΔΔG)✅ buildmodel—
Protein–protein interface energy (fast, minutes)✅ analysecomplexMMPBSA (precise, hours)
Identify interface hotspot residues✅ alascan with chainsMMPBSA per-residue decomposition (precise)
Saturating mutagenesis scan at specific sites✅ positionscan—
Affinity maturation on complex interface✅ pssm—
Per-residue energy decomposition✅ sequencedetailinteraction-visualizer (geometry level)
Small-molecule binding free energy❌Boltz-2, MMPBSA
MD trajectory dynamics❌GROMACS, OpenMM
Batch docking pose evaluation❌EquiScore, ProLIF

Unified Tool Interface

All 8 modes are accessed through a single tool foldx_tool with a mode parameter. The full parameter set is:

tex
Run FoldX energy evaluation and mutation-scanning workflows for protein stability
or complex-interface screening.
Args:
    mode (str): FoldX command mode, REQUIRED. One of: repairpdb, stability,
        buildmodel, analysecomplex, alascan, positionscan, pssm, sequencedetail.
    pdb_path (str): Input PDB file path, REQUIRED for all modes.
    chains (str|None): Complex chain definition, e.g. 'A,B' or 'HL,A'.
        REQUIRED for analysecomplex and pssm.
        OPTIONAL for alascan (enables complex-mode interface scanning).
        Ignored by other modes. Default: None.
    positions (str|None): Comma-separated mutation position tokens.
        Format: OrigAA(1-letter) + ChainID + ResNum + TargetAA.
        REQUIRED for positionscan and pssm. Default: None.
    mutant_file (str|None): Path to FoldX-format mutation list file.
        REQUIRED for buildmodel. Default: None.
    number_of_runs (int): Independent repeats for buildmodel (1-100). Default: 5.
    water (str): Water handling: CRYSTAL|PREDICT|NONE|COMPARE. Default: CRYSTAL.
    pdb_hydrogens (bool): Read hydrogens from PDB. Default: False.
    dry_run (bool): Return planned command without execution. Default: False.
    timeout (int): Maximum execution time in seconds. Default: 7200.
Return:
    status (str): success | error | partial_success
    msg (str): Execution summary or error message
    mode (str): Normalized FoldX command mode
    output_dir (str|None): Run directory path
    foldx_command (str|None): Executed or planned command line
    pdb_file (str|None): Input PDB filename in output_dir
    key_files (dict): Key output files relative to output_dir
    metrics (dict): return_code, generated_file_count, and mode-specific values
        (total_energy, mean_ddg, ddg_values, interaction_energy, hotspot_count)
    stderr_tail (str, only on error): Last portion of FoldX stderr for diagnostics

Parameter–Mode Matrix

Parameterrepairpdbstabilitybuildmodelanalysecomplexalascanpositionscanpssmsequencedetail
pdb_pathREQUIREDREQUIREDREQUIREDREQUIREDREQUIREDREQUIREDREQUIREDREQUIRED
chains———REQUIREDoptional—REQUIRED—
positions—————REQUIREDREQUIRED—
mutant_file——REQUIRED—————
number_of_runs——used (default 5)—————
waterusedusedusedusedusedusedusedused
pdb_hydrogensusedusedusedusedusedusedusedused

Mode 1: repairpdb — Structure Repair for FoldX

Optimizes side-chain rotamers and removes bad contacts against the FoldX energy function.

python
response = await client.session.call_tool("foldx_tool", arguments={
    "mode": "repairpdb",
    "pdb_path": prepared_pdb_path
})
result = client.parse_result(response)
repaired_pdb = result["output_dir"] + "/" + [k for k in result["key_files"] if k.endswith("_Repair.pdb")][0]

Key outputs: {stem}_Repair.pdb (repaired structure), {stem}_Repair.fxout (energy log).

Mode 2: stability — Protein Free Energy (ΔG)

Computes total free energy of the protein structure. Lower (more negative) ΔG = more stable.

python
response = await client.session.call_tool("foldx_tool", arguments={
    "mode": "stability",
    "pdb_path": foldx_repaired_pdb_path
})
result = client.parse_result(response)
total_energy = result["metrics"]["total_energy"]  # ΔG in kcal/mol

Key outputs: {stem}_0_ST.fxout. Key metric: metrics.total_energy.

Mode 3: buildmodel — Mutation ΔΔG Calculation

Models specified mutations and computes ΔΔG (free energy change upon mutation).

Mutant file format

Each line contains one mutation or combination, terminated by semicolon. Format per mutation: OrigAA(1-letter) + ChainID + ResidueNumber + NewAA(1-letter).

LA42G;
VA68D;
LA42G,VA68D;

Line 1: chain A position 42 Leu→Gly. Line 3: simultaneous double mutation.

Common format errors:

  • ❌ Leu42Gly; — must use single-letter amino acid codes
  • ❌ L42G; — must include chain ID between amino acid code and residue number
  • ❌ LA42G — must end with semicolon

Residue numbering (L3 Principle 17): Use the PDB file's numbering, not UniProt or literature numbering. Translate before writing the mutant file.

python
response = await client.session.call_tool("foldx_tool", arguments={
    "mode": "buildmodel",
    "pdb_path": foldx_repaired_pdb_path,
    "mutant_file": "/path/to/mutations.txt",
    "number_of_runs": 5
})
result = client.parse_result(response)
mean_ddg = result["metrics"]["mean_ddg"]       # average ΔΔG in kcal/mol
ddg_values = result["metrics"]["ddg_values"]   # per-mutation ΔΔG list

Key outputs: Dif_{stem}.fxout (core ΔΔG), Average_{stem}.fxout, Raw_{stem}.fxout. Key metrics: metrics.mean_ddg, metrics.ddg_values.

Mode 4: analysecomplex — Protein–Protein Interface Energy

Computes interaction energy between two sides of a protein complex.

Determining the chains parameter

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:

  • Antibody H+L vs antigen A → chains="HL,A"
  • Receptor A vs ligand B → chains="A,B"
  • Trimer AB vs C → chains="AB,C"
python
response = await client.session.call_tool("foldx_tool", arguments={
    "mode": "analysecomplex",
    "pdb_path": foldx_repaired_complex_path,
    "chains": "A,B"   # MUST match actual PDB chain IDs
})
result = client.parse_result(response)
interaction_energy = result["metrics"]["interaction_energy"]  # kcal/mol

Key outputs: Interaction_{stem}_AC.fxout, Interface_Residues_{stem}_AC.fxout, Summary_{stem}_AC.fxout, Indiv_energies_{stem}_AC.fxout. Key metric: metrics.interaction_energy.

Mode 5: alascan — Alanine Scanning

Mutates each residue to alanine and computes ΔΔG. Two sub-modes:

Monomer mode (no chains): Computes effect on protein folding stability only.

python
response = await client.session.call_tool("foldx_tool", arguments={
    "mode": "alascan",
    "pdb_path": foldx_repaired_pdb_path
})

Complex mode (with chains): Computes effect on interface interaction energy. This is the correct mode for interface hotspot identification.

python
response = await client.session.call_tool("foldx_tool", arguments={
    "mode": "alascan",
    "pdb_path": foldx_repaired_complex_path,
    "chains": "A,B"   # MUST match actual PDB chain IDs
})
result = client.parse_result(response)
hotspot_count = result["metrics"]["hotspot_count"]  # residues with ΔΔG > 1.0

Key output: {stem}_AS.fxout. Key metric: metrics.hotspot_count.

⚠ 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.

Mode 6: positionscan — Saturating Mutagenesis

Scans specified positions through all 20 amino acid substitutions (or a specified target).

Positions format

Each token: OrigAA(1-letter) + ChainID + ResidueNumber + Target. Use lowercase a to scan all 20 amino acids.

  • RA32a → Arg at chain A position 32, scan all 20 AAs
  • KA45G → Lys at chain A position 45, mutate only to Gly
  • RA32a,KA45a → scan both positions

Common format errors:

  • ❌ ArgA32a — must use single-letter AA code (R, not Arg)
  • ❌ R32a — must include chain ID (RA32a)
  • ❌ R:A:32:a — no separators within a token

Residue numbering (L3 Principle 17): positions use the PDB file's numbering. Translate from task numbering before calling.

python
response = await client.session.call_tool("foldx_tool", arguments={
    "mode": "positionscan",
    "pdb_path": foldx_repaired_pdb_path,
    "positions": "RA32a,KA45a"
})
result = client.parse_result(response)

Key output: PS_{stem}_scanning_output.txt.

Mode 7: pssm — Position-Specific Scoring Matrix on Complex

Combines 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.

python
response = await client.session.call_tool("foldx_tool", arguments={
    "mode": "pssm",
    "pdb_path": foldx_repaired_complex_path,
    "chains": "A,B",
    "positions": "RA32a,KA45a"
})
result = client.parse_result(response)

Key outputs: PSSM_{stem}.txt (scoring matrix), PSSM_Clash_{stem}.txt (steric clashes).

Mode 8: sequencedetail — Per-Residue Energy Decomposition

Reports energy contribution of each residue broken down by van der Waals, hydrogen bonds, solvation, electrostatics, etc.

python
response = await client.session.call_tool("foldx_tool", arguments={
    "mode": "sequencedetail",
    "pdb_path": foldx_repaired_pdb_path
})
result = client.parse_result(response)

Key output: SD_{stem}.fxout.

Typical Workflow Combinations

Flow A — Protein stability assessment: repairpdb → stability (wild-type ΔG) → buildmodel (mutant ΔΔG)

Flow B — Interface hotspot identification: repairpdb → analysecomplex (total interface energy) → alascan with chains (per-residue hotspots)

Flow C — Affinity maturation: repairpdb → analysecomplex → pssm (systematic interface scanning for optimal substitutions)

Flow D — Mutation site discovery: repairpdb → positionscan (saturating scan) → select ΔΔG < −0.5 → buildmodel (validate combinations)

Scoring Interpretation

ΔΔG sign convention: Positive = destabilizing (harmful mutation). Negative = stabilizing (beneficial mutation). Unit: kcal/mol.

Confidence thresholds:

  • |ΔΔG| < 0.5 kcal/mol → within FoldX noise range, not actionable
  • ΔΔG > 1.0 kcal/mol → likely destabilizing
  • ΔΔG < −0.5 kcal/mol → potentially stabilizing
  • ΔΔG < −1.0 kcal/mol → significantly stabilizing (strong candidate)

AlaScan hotspot: ΔΔG(Ala) > 1.0 kcal/mol → interface hotspot residue.

AnalyseComplex interaction energy: More negative = stronger binding. Near zero or positive = no significant complex formation.

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/mol. Use for ranking and trend identification, not absolute affinity prediction. For high-accuracy ΔG, use MMPBSA (Skill 6).

Common Failures & Recovery

FailureLikely CauseRecovery
"FoldX executable not found"foldx binary not in PATHCheck foldx_bin parameter; verify FoldX installation
"chains is required for mode=analysecomplex"Forgot to specify chainsCheck PDB chain IDs with calculate_pdb_basic_info, then set chains
"invalid position token: 'Arg-A-32'"positions format incorrectUse format RA32a (1-letter AA + chain + number + target)
"invalid chains format: 'A B'"Chains not comma-separatedUse "A,B" not "A B"
FoldX exit code ≠ 0 + stderr "not found in PDB"Chain ID in chains parameter doesn't exist in PDBRe-check PDB chain IDs
FoldX timeoutLarge protein + many-site scanReduce positions count or increase timeout
partial_success with empty key_filesFoldX ran but output filenames don't match expected patternsManually check output_dir contents
BuildModel ΔΔG all near 0Input structure not FoldX-repairedRun mode=repairpdb first, then retry
AlaScan finds no hotspots (all ΔΔG < 1.0)Ran without chains (monomer mode instead of complex mode)Add chains parameter to enable complex-mode scanning
"mutant_file is required"Forgot mutant_file for buildmodelCreate mutation list file in FoldX format (see Mode 3)

Relationship to Other Tools

  • vs molclaw-fix-pdb (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.
  • vs molclaw-mmpbsa-toolkit: MMPBSA uses MD simulation for precise ΔG (Tier 4, hours). FoldX provides fast empirical ΔG/ΔΔG (Tier 3, minutes). Use FoldX for screening/ranking, MMPBSA for final validation of top candidates.
  • 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/geometric analysis, FoldX for energy-based ranking.
  • vs proteinmpnn_tool: ProteinMPNN designs sequences from structure (generative). FoldX evaluates mutations on existing sequences (evaluative). Use ProteinMPNN for design, FoldX BuildModel/PositionScan for evaluation and cross-validation.

Câu hỏi thường gặp

Kỹ năng AI Molclaw Foldx Tool làm được gì?

Use when calling these MolClaw MCP tools: `mcp__molclaw-scp__foldx_tool`. 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…

Vì sao nên dùng Molclaw Foldx Tool trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Molclaw Foldx Tool là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Molclaw Foldx Tool trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/InternScience/MolClaw/tree/main/skills/L1_tools/molclaw-foldx-tool. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Molclaw Foldx Tool?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Molclaw Foldx Tool với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Molclaw Foldx Tool với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Molclaw Foldx Tool có miễn phí không?

Có. Kỹ năng này được InternScience phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇