jimliu/science-skills · Archived

proteinmpnn

Inverse-fold a protein backbone (PDB structure) into amino-acid sequence with ProteinMPNN (Dauparas et al. 2022, github.com/dauparas/ProteinMPNN). Reach for this skill to run sequence design on RFdiffusion backbones, to redesign one chain of a PDB while holding interface residues fixed, or to generate a temperature-swept set of sequences for downstream folding.

First seen Jul 2, 2026

Installation

$ npx skills add jimliu/science-skills --skill proteinmpnn

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from jimliu/science-skills · top by installs.

npx skills add jimliu/science-skills

Browse all from jimliu/science-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 225
License Apache-2.0
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseApache-2.0
More metadata
display-name
ProteinMPNN
third_party
{"0":"kind: weights","name":"ProteinMPNN","license":"MIT","terms_url":"https:\/\/github.com\/dauparas\/ProteinMPNN\/blob\/main\/LICENSE"}

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,587 B
  • docs SUMMARY.md 382 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

ProteinMPNN

ProteinMPNN is the default inverse-folding step in the binder pipeline: a message-passing network that sees backbone geometry only, so it is the right choice when the design surface is protein–protein and the wrong one as soon as a ligand, nucleic acid, or metal is part of the interface — ligandmpnn adds those atoms to the graph with a near-identical CLI, and solublempnn swaps in weights trained on soluble structures for an expression-biased prior. Code and weights are MIT (github.com/dauparas/ProteinMPNN). The model is small enough to run on CPU — for a handful of sequences on one backbone that is seconds and usually faster than dispatching a remote job; a GPU helps for batched campaigns (hundreds of backbones or large --numseqper_target). Either way the repo is cloned in-job — there is no PyPI dist and the checkpoints are bundled in the repo.

Running it

pip install torch numpy   # if not already present
git clone --depth 1 https://github.com/dauparas/ProteinMPNN.git proteinmpnn
cd proteinmpnn
python protein_mpnn_run.py \
  --pdb_path backbone.pdb --pdb_path_chains "A" \
  --out_folder out --num_seq_per_target 16 --sampling_temp "0.1"

Two flags trip almost everyone the first time. --samplingtemp is parsed as a space-separated string so one run can sweep several temperatures; a single value needs no quoting, but a multi-value sweep must be quoted ("0.1 0.2 0.3"), and commas never split — "0.1,0.2" fails the float cast. --pdbpath_chains is also space-separated inside one quoted argument ("A B"); a comma is kept as part of the chain ID.

Designs land in out/seqs/<pdbstem>.fa. The first record is the input sequence; each design header carries score= (mean negative log-likelihood — lower is more confident), globalscore=, and seqrecovery=. ProteinMPNN writes sequences only — it does not thread them back onto the backbone; if you need designed-sequence PDBs, the ligandmpnn runner writes them to backbones/ automatically and accepts --modeltype protein_mpnn for the same weights.

A flat chain map in --fixedpositionsjsonl silently redesigns every residue

--fixedpositionsjsonl expects one JSON object per line keyed by the PDB stem first, then chain, then a list of 1-indexed residue numbers: {"backbone": {"A": [10, 11, 12], "B": []}}. Passing the inner {"A": [...]} directly — the obvious guess — is silently treated as "no PDB matched," and every position is redesigned. The bundled helperscripts/makefixedpositionsdict.py writes the correct shape from a chain and range string and is worth the extra call; the same outer-stem rule applies to --chainidjsonl and --tiedpositionsjsonl.

Checkpoints — which one to pick

--model_name training noise use
v48002 0.02 Å highest recovery; close-to-native redesigns
v48020 (default) 0.20 Å de novo backbones — tolerates RFdiffusion imperfection
v48030 0.30 Å very rough backbones; lowest recovery
--usesolublemodel swaps to the soluble-trained set; see solublempnn

Errors worth recognizing

You see It means / do this
KeyError: 'A' Chain letter not in the PDB — `grep '^ATOM' file.pdb \ cut -c22 \ sort -u` to see what is.
JSONDecodeError on a *_jsonl flag The flag wants a file path, not inline JSON; write the file first.
All positions redesigned despite --fixedpositionsjsonl Outer PDB-stem key missing — see the gotcha above.
ModuleNotFoundError for relative imports Script run from the wrong cwd — cd into the cloned repo first; the imports are repo-relative.

Next: fold the designs in complex with the target via boltz, chai1, or esmfold2 and filter on ipTM.