agentleFS
naitynaity/FM4Life/skills/proteinmpnn/SKILL.md

proteinmpnn

Skill2 starsChanged 8 months agoMITView on GitHub

Skill for inverse folding — designing amino acid sequences for a given protein backbone structure. Use this skill when a user wants to design sequences for a PDB structure, score sequences against a structure, design symmetric oligomers with tied positions, fix specific residues while redesigning others, or use evolutionary (PSSM) guidance. Also trigger when the user mentions ProteinMPNN, inverse folding, sequence design, or the Baker Lab sequence design tool.

  • Installs packages

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. HughYau/AcademicForge★ 2.6ksame name
    2. JimLiu/science-skills★ 227same name
    3. adaptyvbio/protein-design-skills★ 163same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository14 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No pip install — run directly from the repository.

    line 46
  2. Very specific:

    Default: v_48_020.pt. Use --use_soluble_model or --ca_only to switch model families.

    line 59
  3. Distinctive:

    All chains get the same sequence.

    line 138
  4. Very specific:

    Use --omit_AAs "C M" to fully exclude amino acids.

    line 167

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ProteinMPNN: Inverse Folding for Protein Sequence Design

Overview

ProteinMPNN designs amino acid sequences for a given protein backbone structure. It is the sequence design step in the modern protein design pipeline:

RFdiffusion (backbone) → ProteinMPNN (sequence) → AlphaFold2 (validation)

Given a backbone PDB, ProteinMPNN outputs sequences that are predicted to fold into that structure. It can design multiple chains simultaneously, lock specific residues, enforce symmetry, and score existing sequences.

Core capabilities:

  • Sequence design — generate sequences for any protein backbone
  • Scoring — evaluate how well a given sequence fits a structure
  • Fixed positions — lock active site or interface residues
  • Tied positions — enforce symmetric sequences across chains (homooligomers)
  • Amino acid bias — favor or disfavor specific amino acids globally or per-residue
  • PSSM guidance — incorporate evolutionary information

Installation

# Create conda environment
conda create --name mlfold python=3.9
conda activate mlfold

# Install PyTorch with CUDA
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch

# Clone repository
git clone https://github.com/dauparas/ProteinMPNN.git
cd ProteinMPNN

No pip install — run directly from the repository.

Model Checkpoints

CheckpointUse case
v_48_020.ptDefault; best general-purpose model
v_48_030.ptLatest checkpoint
v_48_010.ptIntermediate checkpoint
v_48_002.ptEarly checkpoint
soluble_model_weights/v_48_020.ptSoluble proteins only
ca_model_weights/v_48_020.ptCA-only backbone (faster)

Default: v_48_020.pt. Use --use_soluble_model or --ca_only to switch model families.

Core Workflows

1. Minimal monomer design

python protein_mpnn_run.py \
  --pdb_path input.pdb \
  --pdb_path_chains "A" \
  --num_seq_per_target 8 \
  --sampling_temp "0.1" \
  --out_folder results/

Generates 8 sequences for chain A at temperature 0.1. Output: results/seqs/input.fa.

2. Multi-chain complex

Parse first, then design:

# Step 1: parse PDB directory to JSONL
python helper_scripts/parse_multiple_chains.py \
  --input_path pdbs/ --output_path parsed.jsonl

# Step 2: assign which chains to design
python helper_scripts/assign_fixed_chains.py \
  --input_path parsed.jsonl \
  --output_path chain_ids.jsonl \
  --chain_list "A B"

# Step 3: run design
python protein_mpnn_run.py \
  --jsonl_path parsed.jsonl \
  --chain_id_jsonl chain_ids.jsonl \
  --num_seq_per_target 2 \
  --sampling_temp "0.1" \
  --out_folder results/

3. Fixed positions (lock active site)

# Create fixed positions dict
python helper_scripts/make_fixed_positions_dict.py \
  --input_path parsed.jsonl \
  --output_path fixed.jsonl \
  --chain_list "A" \
  --position_list "1 2 3 45 46 47"

# Run with fixed positions
python protein_mpnn_run.py \
  --jsonl_path parsed.jsonl \
  --fixed_positions_jsonl fixed.jsonl \
  --num_seq_per_target 4 \
  --sampling_temp "0.1" \
  --out_folder results/

To specify designable positions instead (all others fixed): add --specify_non_fixed.

4. Homooligomer / symmetric design

# Tie equivalent positions across all chains
python helper_scripts/make_tied_positions_dict.py \
  --input_path parsed.jsonl \
  --output_path tied.jsonl \
  --homooligomer 1

python protein_mpnn_run.py \
  --jsonl_path parsed.jsonl \
  --tied_positions_jsonl tied.jsonl \
  --num_seq_per_target 4 \
  --sampling_temp "0.2" \
  --out_folder results/

All chains get the same sequence. Works for C2, C3, C6, etc.

5. Score existing sequences

python protein_mpnn_run.py \
  --pdb_path structure.pdb \
  --path_to_fasta sequences.fasta \
  --score_only 1 \
  --out_folder results/

Reports score (negative log probability) and seq_recovery for each sequence.

6. Amino acid bias (avoid cysteine)

python helper_scripts/make_bias_AA.py \
  --output_path bias.jsonl \
  --AA_list "C" \
  --bias_list "-1.0"

python protein_mpnn_run.py \
  --jsonl_path parsed.jsonl \
  --bias_AA_jsonl bias.jsonl \
  --omit_AAs "C" \
  --out_folder results/

Use --omit_AAs "C M" to fully exclude amino acids.

Key Parameters

ParameterDefaultDescription
--num_seq_per_target1Sequences to generate per structure
--sampling_temp—Sampling temperature (0.1–0.3 typical; higher = more diverse)
--model_namev_48_020Model checkpoint
--use_soluble_model—Use soluble-only model weights
--ca_only—Use CA-only model (faster, less accurate)
--backbone_noise0.0Gaussian noise on atom coordinates
--batch_size1GPU batch size
--seed0 (random)Random seed for reproducibility
--save_score0Save scores to NPZ
--save_probs0Save AA probabilities to NPZ
--score_only0Score without generating
--omit_AAs—Exclude amino acids (e.g. "C M")

Output Format

results/
├── seqs/
│   ├── protein_name.fa          ← designed sequences (FASTA)
├── scores/                      ← NPZ score files (if --save_score 1)
└── probs/                       ← probability NPZ files (if --save_probs 1)

FASTA header format:

>native, score=-0.45, global_score=-0.42, seq_recovery=1.0, model_name=v_48_020
>T=0.1, sample=1, score=-0.48, global_score=-0.46, seq_recovery=0.87
  • score — negative log probability over designed residues (lower = better fit)
  • global_score — negative log probability over all residues
  • seq_recovery — fraction of positions that match the input sequence

Scripts

  • scripts/design.py — design sequences from PDB files; see scripts/design.py --help

Resources

References

  • references/cli-reference.md — full CLI parameter reference, all input/output formats, PSSM guidance, conditional probabilities

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.