Claude Skill

alterlab-proteinmpnn

Design protein sequences for a fixed backbone with ProteinMPNN (Dauparas 2022) — message-passing inverse folding that outputs sequences predicted to fold to a given structure, with fixed positions, tied/symmetric chains, amino-acid bias, and a soluble-model variant. Use when inve

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download alterlab-ieu-alterlab-academic-skills-skills_bioinformatics_alterlab-proteinmpnn-e4836c0.zip · 4 KB
Part of alterlab-ieu/alterlab-academic-skills — 94 skills

Install

skills CLI npx skills add https://github.com/AlterLab-IEU/AlterLab-Academic-Skills/tree/main/skills/bioinformatics/alterlab-proteinmpnn
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install alterlab-ieu-alterlab-academic-skills@llmmart
Git git clone https://github.com/AlterLab-IEU/AlterLab-Academic-Skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole alterlab-ieu/alterlab-academic-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

ProteinMPNN (fixed-backbone sequence design)

Overview

ProteinMPNN (Dauparas et al., Science 2022; dauparas/ProteinMPNN) solves the inverse-folding problem: given a protein backbone (a 3D structure with no or a placeholder sequence), it designs amino-acid sequences predicted to fold to that backbone. It is fast, robust, runs on CPU, and is the standard "sequence" step between backbone generation (alterlab-rfdiffusion) and structure validation (alterlab-alphafold).

When to Use This Skill

Use this skill when the user wants to:

  • Inverse-fold a backbone PDB into one or more candidate sequences.
  • Redesign only selected positions while fixing the rest (partial design).
  • Enforce symmetry by tying residues/chains so homo-oligomers get identical sequences.
  • Bias the amino-acid composition (e.g. avoid cysteines) or use the soluble model.
  • Produce the sequence step of a design → fold → score loop.

Does NOT Trigger

Scenario Use instead
Design a pocket/interface with a ligand, metal, or nucleic acid present alterlab-ligandmpnn
Generate a new backbone (no starting structure) alterlab-rfdiffusion
Refold a designed sequence to check it (validation) alterlab-alphafold
Generative multimodal (sequence+structure+function) design alterlab-esm

Core Capabilities

1. Basic inverse folding

# Parse the PDB(s), then design sequences (dauparas/ProteinMPNN), from the repo
# root. HS points at the repo's helper_scripts directory.
HS=./helper_scripts
python "$HS"/parse_multiple_chains.py --input_path=pdbs/ --output_path=parsed.jsonl
python protein_mpnn_run.py \
  --jsonl_path parsed.jsonl --out_folder out/ \
  --num_seq_per_target 8 --sampling_temp "0.1" --seed 37

# Single structure, no parsing step:
python protein_mpnn_run.py --pdb_path backbone.pdb --pdb_path_chains A \
  --out_folder out/ --num_seq_per_target 8 --sampling_temp "0.1"

Lower --sampling_temp (e.g. 0.1) gives conservative, high-confidence designs; higher temperatures increase diversity. Output FASTA headers carry the model score (lower = better) and sequence recovery.

2. Fixed positions and chains

Supply a fixed-positions spec (JSONL from make_fixed_positions_dict.py, in the repo's helper_scripts directory alongside the parser above) to keep catalytic/known residues while redesigning the rest, and assign_fixed_chains.py from the same directory to design only some chains. Add --use_soluble_model to load the soluble-only weights, and --ca_only for CA-only backbones (it switches to the CA model set).

3. Symmetry / tied positions

Tie positions across chains so a homo-oligomer receives one sequence applied symmetrically — essential for symmetric alterlab-rfdiffusion outputs.

4. Design → fold → score loop

The canonical de-novo pipeline:

  1. Generate a backbone with alterlab-rfdiffusion.
  2. Design sequences for it here (ProteinMPNN), sampling several per backbone.
  3. Score by refolding each with alterlab-alphafold and accepting only self-consistent designs (returns to the target backbone with high pLDDT, low PAE).

Resources

  • references/proteinmpnn_usage.md — install/pinning, helper-script inputs (fixed positions, tied chains, bias), the soluble model, temperature guidance, and loop integration. Loaded on demand.

Part of the AlterLab Academic Skills suite.

Files (alterlab-academic-skills)
  • evals
    • evals.json 2.9 KB
      {
        "skill": "alterlab-proteinmpnn",
        "evals": [
          {
            "id": "inverse-fold-backbone",
            "prompt": "I have a protein backbone PDB with no meaningful sequence. Design several amino-acid sequences that should fold into this exact structure.",
            "expected_output": "Invokes alterlab-proteinmpnn: parses the backbone PDB and runs protein_mpnn_run.py to inverse-fold it into multiple candidate sequences at a low sampling temperature, ranking by the model score. Notes designs should then be validated by refolding (alterlab-alphafold).",
            "assertions": [
              { "type": "should_trigger", "value": true },
              { "type": "output_contains", "value": "inverse" },
              { "type": "behavior", "value": "Designs sequences for a given fixed backbone rather than generating a new structure." }
            ]
          },
          {
            "id": "fixed-positions",
            "prompt": "Redesign my enzyme's surface but keep the three catalytic residues exactly as they are. Give me new sequences.",
            "expected_output": "Invokes alterlab-proteinmpnn with a fixed-positions specification: pins the catalytic residues and redesigns the rest, producing scored sequences.",
            "assertions": [
              { "type": "should_trigger", "value": true },
              { "type": "output_contains", "value": "fixed" }
            ]
          },
          {
            "id": "symmetric-oligomer",
            "prompt": "I designed a C3-symmetric homotrimer backbone. Design one sequence applied symmetrically across all three chains.",
            "expected_output": "Invokes alterlab-proteinmpnn with tied positions so the homo-oligomer receives a single symmetric sequence across chains, consistent with the symmetric backbone.",
            "assertions": [
              { "type": "should_trigger", "value": true },
              { "type": "behavior", "value": "Ties positions across chains to enforce symmetry in the designed sequence." }
            ]
          },
          {
            "id": "near-miss-ligandmpnn",
            "prompt": "I need to design the residues lining a binding pocket that has a small-molecule ligand and a zinc ion sitting in it.",
            "expected_output": "Should NOT trigger this skill; defers to alterlab-ligandmpnn, which conditions the design on ligand/metal context. Plain ProteinMPNN does not see the ligand or metal, so pocket design around them belongs to alterlab-ligandmpnn.",
            "assertions": [
              { "type": "should_not_trigger", "value": true },
              { "type": "output_contains", "value": "alterlab-ligandmpnn" }
            ]
          },
          {
            "id": "near-miss-rfdiffusion",
            "prompt": "I don't have a backbone yet — I want to generate a brand-new protein fold from scratch.",
            "expected_output": "Should NOT trigger this skill; defers to alterlab-rfdiffusion, which generates de-novo backbones. ProteinMPNN designs sequences for an existing backbone; it does not create the structure.",
            "assertions": [
              { "type": "should_not_trigger", "value": true },
              { "type": "output_contains", "value": "alterlab-rfdiffusion" }
            ]
          }
        ]
      }
      
  • references
    • proteinmpnn_usage.md 3 KB
      # ProteinMPNN — Usage Reference
      
      Deeper detail for `alterlab-proteinmpnn`. Script names and flags below were checked against the
      upstream `dauparas/ProteinMPNN` README (2026-09); forks vary, so confirm against the checkout
      you actually run.
      
      ## Install
      
      Clone `dauparas/ProteinMPNN`; it ships model weights in-repo (no download). Needs PyTorch —
      CPU is fine for typical designs; a GPU only helps very large batches.
      
      The same weights are also served by the newer `dauparas/LigandMPNN` repo via
      `--model_type protein_mpnn`. If a project already runs LigandMPNN, keep one checkout rather than
      two: the LigandMPNN CLI names residues directly (`A23`) instead of requiring the JSONL helper
      scripts below, which is usually less error-prone. Use this repo when you want the original CLI,
      the `--ca_only` models, or the tied-positions helpers.
      
      ## Inputs (helper scripts)
      
      ProteinMPNN reads a parsed JSONL describing chains and optional constraints, produced by the
      repo's `helper_scripts/`:
      
      - `parse_multiple_chains.py` — turn PDB(s) into the parsed JSONL.
      - `assign_fixed_chains.py` — choose which chains are designed vs. fixed.
      - `make_fixed_positions_dict.py` — pin specific residues (keep catalytic/known positions).
      - `make_tied_positions_dict.py` — tie positions across chains for symmetry.
      - `make_bias_AA.py` — up/down-weight specific amino acids (e.g. avoid Cys).
      
      ## Key run flags
      
      | Flag | Purpose |
      |------|---------|
      | `--num_seq_per_target N` | sequences designed per backbone (default 1) |
      | `--sampling_temp "0.1"` | sampling temperature(s), space-separated string; suggested 0.1–0.3, lower = conservative |
      | `--pdb_path` / `--pdb_path_chains` | single structure, and which chains to design |
      | `--jsonl_path` | parsed JSONL from `parse_multiple_chains.py` (batch mode) |
      | `--out_folder` | output directory |
      | `--model_name` | `v_48_002 / v_48_010 / v_48_020 / v_48_030` — the suffix is training-noise in 0.01 Å; `v_48_020` is the default and the usual choice |
      | `--use_soluble_model` | load the soluble-only weights |
      | `--ca_only` | parse CA-only backbones and use the CA model set |
      | `--save_score` / `--score_only` | write `-log_prob` scores to `.npy` |
      | `--seed` | 0 (default) picks a random seed |
      
      ## Output
      
      A FASTA per target with several designs; headers carry the model **score** (lower is better)
      and native-sequence recovery. Rank by score, then validate the top designs.
      
      ## Choosing between the design skills
      
      - **alterlab-proteinmpnn** — sequence for a fixed backbone, no ligand context.
      - **alterlab-ligandmpnn** — same idea but with ligand/metal/nucleic-acid context (pocket design).
      - **alterlab-rfdiffusion** — generate the backbone itself (upstream of MPNN).
      - **alterlab-esm** — generative multimodal design / ESM inverse folding.
      
      ## Design → fold → score
      
      Feed each designed sequence to `alterlab-alphafold`, refold, and accept only self-consistent
      designs (return to the intended backbone, high pLDDT, low PAE). Batch the folds via
      `alterlab-remote-compute`.
      
  • SKILL.md 4.7 KB
    ---
    name: alterlab-proteinmpnn
    description: Design protein sequences for a fixed backbone with ProteinMPNN (Dauparas 2022) — message-passing inverse folding that outputs sequences predicted to fold to a given structure, with fixed positions, tied/symmetric chains, amino-acid bias, and a soluble-model variant. Use when inverse-folding a backbone PDB into sequences, redesigning selected positions, imposing symmetry across chains, or generating the sequence step of a design→fold→score loop. For pocket/interface design WITH a bound ligand, metal, or nucleic acid prefer alterlab-ligandmpnn; to GENERATE a new backbone prefer alterlab-rfdiffusion; to refold and validate a design prefer alterlab-alphafold; for generative multimodal design prefer alterlab-esm. Part of the AlterLab Academic Skills suite.
    license: MIT
    allowed-tools: Read Write Edit Bash(python:*) Bash(uv:*)
    compatibility: "Runs `protein_mpnn_run.py` from `dauparas/ProteinMPNN` (PyTorch) under `uv run python`. The model is small — it runs on CPU and does not require a GPU (a GPU only speeds large batches). Network weights ship with the repo (no download/account). Input is a backbone PDB; output is a FASTA of designed sequences with scores."
    metadata:
        skill-author: AlterLab
        version: "1.1.0"
        last_updated: "2026-09-23"
    ---
    
    # ProteinMPNN (fixed-backbone sequence design)
    
    ## Overview
    
    **ProteinMPNN** (Dauparas et al., *Science* 2022; `dauparas/ProteinMPNN`) solves the
    **inverse-folding** problem: given a protein **backbone** (a 3D structure with no or a
    placeholder sequence), it designs amino-acid **sequences predicted to fold to that
    backbone**. It is fast, robust, runs on CPU, and is the standard "sequence" step between
    backbone generation (`alterlab-rfdiffusion`) and structure validation
    (`alterlab-alphafold`).
    
    ## When to Use This Skill
    
    Use this skill when the user wants to:
    - **Inverse-fold** a backbone PDB into one or more candidate sequences.
    - **Redesign** only selected positions while fixing the rest (partial design).
    - Enforce **symmetry** by tying residues/chains so homo-oligomers get identical sequences.
    - Bias the amino-acid composition (e.g. avoid cysteines) or use the **soluble** model.
    - Produce the sequence step of a **design → fold → score** loop.
    
    ### Does NOT Trigger
    
    | Scenario | Use instead |
    |----------|-------------|
    | Design a pocket/interface **with a ligand, metal, or nucleic acid** present | `alterlab-ligandmpnn` |
    | **Generate** a new backbone (no starting structure) | `alterlab-rfdiffusion` |
    | Refold a designed sequence to check it (validation) | `alterlab-alphafold` |
    | Generative multimodal (sequence+structure+function) design | `alterlab-esm` |
    
    ## Core Capabilities
    
    ### 1. Basic inverse folding
    
    ```bash
    # Parse the PDB(s), then design sequences (dauparas/ProteinMPNN), from the repo
    # root. HS points at the repo's helper_scripts directory.
    HS=./helper_scripts
    python "$HS"/parse_multiple_chains.py --input_path=pdbs/ --output_path=parsed.jsonl
    python protein_mpnn_run.py \
      --jsonl_path parsed.jsonl --out_folder out/ \
      --num_seq_per_target 8 --sampling_temp "0.1" --seed 37
    
    # Single structure, no parsing step:
    python protein_mpnn_run.py --pdb_path backbone.pdb --pdb_path_chains A \
      --out_folder out/ --num_seq_per_target 8 --sampling_temp "0.1"
    ```
    
    Lower `--sampling_temp` (e.g. 0.1) gives conservative, high-confidence designs; higher
    temperatures increase diversity. Output FASTA headers carry the model **score** (lower =
    better) and sequence recovery.
    
    ### 2. Fixed positions and chains
    
    Supply a fixed-positions spec (JSONL from `make_fixed_positions_dict.py`, in the repo's
    `helper_scripts` directory alongside the parser above) to keep catalytic/known residues while
    redesigning the rest, and `assign_fixed_chains.py` from the same directory to design only some
    chains. Add `--use_soluble_model` to load the soluble-only weights, and
    `--ca_only` for CA-only backbones (it switches to the CA model set).
    
    ### 3. Symmetry / tied positions
    
    Tie positions across chains so a homo-oligomer receives one sequence applied symmetrically —
    essential for symmetric `alterlab-rfdiffusion` outputs.
    
    ### 4. Design → fold → score loop
    
    The canonical de-novo pipeline:
    
    1. **Generate** a backbone with `alterlab-rfdiffusion`.
    2. **Design** sequences for it here (ProteinMPNN), sampling several per backbone.
    3. **Score** by refolding each with `alterlab-alphafold` and accepting only self-consistent
       designs (returns to the target backbone with high pLDDT, low PAE).
    
    ## Resources
    
    - `references/proteinmpnn_usage.md` — install/pinning, helper-script inputs (fixed positions,
      tied chains, bias), the soluble model, temperature guidance, and loop integration. Loaded on
      demand.
    
    Part of the AlterLab Academic Skills suite.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related