proteinmpnn
Skill163 starsChanged 11 months agoMITView on GitHub
Design protein sequences using ProteinMPNN inverse folding. Use this skill when: (1) Designing sequences for RFdiffusion backbones, (2) Redesigning existing protein sequences, (3) Fixing specific residues while designing others, (4) Optimizing sequences for expression or stability, (5) Multi-state or negative design.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- HughYau/AcademicForgetheir own version, first seen Jul 2, 2026
- JimLiu/science-skillstheir own version, first seen Jul 1, 2026
- naity/FM4Lifetheir own version, first seen Apr 7, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- HughYau/AcademicForge★ 2.6ksame name
- JimLiu/science-skills★ 227same name
- naity/FM4Life★ 2same 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 repository23 other files it gives its agents.
- alphafoldSkill
- bindcraftSkill
- binder-designSkill
- binding-characterizationSkill
- boltzgenSkill
- boltzSkill
- campaign-managerSkill
- cell-free-expressionSkill
- chaiSkill
- esmSkill
- foldseekSkill
- germinalSkill
- ipsaeSkill
- ligandmpnnSkill
- mosaicSkill
- pdbSkill
- protein-design-workflowSkill
- protein-qcSkill
- protenixSkill
- rfdiffusionSkill
- setupSkill
- solublempnnSkill
- uniprotSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 269
Unwanted cysteines: Use --omit_AAs "C"
≈ “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.
Files
ProteinMPNN Sequence Design
Prerequisites
| Requirement | Minimum | Recommended |
| Python | 3.8+ | 3.10 |
| CUDA | 11.0+ | 11.7+ |
| GPU VRAM | 8GB | 16GB (T4) |
| RAM | 8GB | 16GB |
How to run
First time? See Getting started to set up Modal and biomodals.
Option 1: Local installation (recommended)
git clone https://github.com/dauparas/ProteinMPNN.git
cd ProteinMPNN
python protein_mpnn_run.py \
--pdb_path backbone.pdb \
--out_folder output/ \
--num_seq_per_target 16 \
--sampling_temp "0.1"GPU: T4 (16GB) sufficient | Time: ~50-100 sequences/minute
Option 2: Modal (via LigandMPNN wrapper)
cd biomodals
# modal_ligandmpnn.py takes --input-pdb and forwards run.py args via --params-str
modal run modal_ligandmpnn.py \
--input-pdb backbone.pdb \
--params-str "--model_type protein_mpnn --number_of_batches 16 --temperature 0.1"GPU (Modal): A10G default | Timeout: 900s default
Note: LigandMPNN includes ProteinMPNN functionality (select with --model_type protein_mpnn).
Config Schema
Core Parameters
| Parameter | Default | Range | Description |
--pdb_path | required | path | Single PDB input |
--pdb_path_chains | all | A,B | Chains to design (comma-sep) |
--out_folder | required | path | Output directory |
--num_seq_per_target | 1 | 1-1000 | Sequences per structure |
--sampling_temp | "0.1" | "0.0001-1.0" | Temperature (string!) |
--seed | 0 | int | Random seed |
--batch_size | 1 | 1-32 | Batch size |
Temperature Guide
0.1 -> Low diversity, high recovery (production)
0.2 -> Moderate diversity (default)
0.3 -> Higher diversity (exploration)
0.5+ -> Very diverse, lower qualityIMPORTANT: Temperature must be passed as a string, not float.
Common mistakes
Temperature Parameter
✅ Correct:
--sampling_temp "0.1" # String with quotes❌ Wrong:
--sampling_temp 0.1 # Float without quotes - may cause errors
--sampling_temp 0.1,0.2 # Multiple temps need proper formatFixed Positions JSONL
✅ Correct:
{"A": [1, 2, 3, 10, 11], "B": [5, 6]}❌ Wrong:
{"A": "1,2,3,10,11"} # String instead of list
{A: [1, 2, 3]} # Missing quotes on key
{"A": [1,2,3,]} # Trailing commaChain Selection
✅ Correct:
--pdb_path_chains A,B # No spaces❌ Wrong:
--pdb_path_chains A, B # Space after comma
--pdb_path_chains "A,B" # Quotes may cause issuesAmino Acid Biases
# Bias toward certain AAs (positive = favor)
--bias_AA_jsonl '{"A": {"A": 1.5, "W": -2.0}}'
# Omit specific AAs globally
--omit_AAs "CM" # No cysteine or methionine
# Per-position omission
--omit_AA_jsonl '{"A": {"1": "C", "2": "CM"}}'Multi-Chain Design
# Design chains A and B together
--pdb_path_chains A,B
# Tie chains (same sequence)
--tied_positions_jsonl tied.jsonlVariants Comparison
| Variant | Use Case | Key Difference |
| ProteinMPNN | General | Original model |
| SolubleMPNN | Expression | Trained on soluble proteins |
| LigandMPNN | Small molecules | Ligand-aware context |
Output format
output/
├── seqs/
│ └── backbone.fa # FASTA sequences
└── backbone_pdb/
└── backbone_0001.pdb # PDBs with designed sequenceFASTA Header Format
>backbone_0001, score=1.234, global_score=1.234, seq_recovery=0.85
MKTAYIAKQRQISFVKSHFSRQLE...Common workflows
Binder Sequence Design
python protein_mpnn_run.py \
--pdb_path binder_backbone.pdb \
--out_folder output/ \
--num_seq_per_target 16 \
--sampling_temp "0.1" \
--pdb_path_chains B # Design binder chain onlyInterface Redesign
# Fix core, design interface
python protein_mpnn_run.py \
--pdb_path complex.pdb \
--fixed_positions_jsonl core_positions.jsonl \
--num_seq_per_target 32Multi-State Design
# Design for multiple conformations
python protein_mpnn_run.py \
--pdb_path_multi state1.pdb,state2.pdb \
--num_seq_per_target 16Sample output
Successful run
$ python protein_mpnn_run.py --pdb_path backbone.pdb --out_folder output/ --num_seq_per_target 8
Loading model weights...
Designing sequences for backbone.pdb
Generated 8 sequences in 2.3 seconds
output/seqs/backbone.fa:
>backbone_0001, score=1.234, global_score=1.189, seq_recovery=0.82
MKTAYIAKQRQISFVKSHFSRQLEERGLTKE...
>backbone_0002, score=1.198, global_score=1.156, seq_recovery=0.79
MKTAYIAKQRQISFVKSQFSRQLDERGLTKE...What good output looks like:
- Score: 1.0-2.0 (lower = more confident)
- Seq recovery: 0.3-0.6 for de novo, 0.7-0.9 for redesign
- Diverse sequences (not all identical) when temp > 0.1
Decision tree
Should I use ProteinMPNN?
│
├─ Have a backbone structure?
│ ├─ Yes → Continue below
│ └─ No → Use RFdiffusion first
│
├─ What's in the binding site?
│ ├─ Nothing / protein only → ProteinMPNN ✓
│ ├─ Small molecule / ligand → Use LigandMPNN
│ └─ Metal / cofactor → Use LigandMPNN
│
├─ Priority?
│ ├─ Solubility/expression → Consider SolubleMPNN
│ ├─ Speed → ProteinMPNN ✓
│ └─ AF2 optimization → Consider ColabDesign
│
└─ Need fixed positions?
├─ Yes → Use --fixed_positions_jsonl
└─ No → ProteinMPNN ✓ (design all)Typical performance
| Campaign Size | Time (T4) | Cost (Modal) | Notes |
| 100 backbones × 8 seq | 15-20 min | ~$2 | Standard |
| 500 backbones × 8 seq | 1-1.5h | ~$8 | Large campaign |
| 1000 backbones × 16 seq | 3-4h | ~$18 | Comprehensive |
Throughput: ~50-100 sequences/minute on T4 GPU.
Verify
grep -c "^>" output/seqs/*.fa # Should match backbone_count × num_seq_per_targetTroubleshooting
Low sequence diversity: Increase sampling_temp to 0.2-0.3 Poor recovery: Decrease sampling_temp to 0.1 OOM errors: Reduce batch_size Unwanted cysteines: Use --omit_AAs "C"
Error interpretation
| Error | Cause | Fix |
RuntimeError: CUDA out of memory | Long protein or large batch | Reduce batch_size or use larger GPU |
KeyError: 'A' | Chain not in PDB | Check chain IDs in your PDB file |
JSONDecodeError | Invalid JSONL format | Validate JSON syntax (see Common Mistakes) |
IndexError: list index | Empty chain or residue list | Check PDB has atoms, not just HEADER |
Next: Structure prediction for validation → protein-qc for filtering.
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
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.

