skills/proteinmpnn/SKILL.md
# ProteinMPNN Sequence Design Inverse folding: design protein sequences that fold into a given backbone structure. Use after RFdiffusion backbone generation or to redesign existing protein sequences. ## Installation ```bash pip install proteinmpnn # Or from source (preferred for full control) git clone https://github.com/dauparas/ProteinMPNN cd ProteinMPNN pip install -e . ``` ## Basic Usage ### Single Chain Design ```bash python3 protein_mpnn_run.py \ --pdb_path designs/binder_0.pdb \
npx skillsauth add lamm-mit/scienceclaw skills/proteinmpnnInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Inverse folding: design protein sequences that fold into a given backbone structure. Use after RFdiffusion backbone generation or to redesign existing protein sequences.
pip install proteinmpnn
# Or from source (preferred for full control)
git clone https://github.com/dauparas/ProteinMPNN
cd ProteinMPNN
pip install -e .
python3 protein_mpnn_run.py \
--pdb_path designs/binder_0.pdb \
--out_folder output/ \
--num_seq_per_target 8 \
--sampling_temp "0.1" \
--seed 37 \
--batch_size 1
Lock specific positions while designing the rest:
python3 protein_mpnn_run.py \
--pdb_path structure.pdb \
--out_folder output/ \
--num_seq_per_target 8 \
--sampling_temp "0.1" \
--fixed_residues "A1 A2 A3 A45 A46" # keep these unchanged
Design binder (chain B) while fixing target (chain A):
python3 protein_mpnn_run.py \
--pdb_path complex.pdb \
--out_folder output/ \
--num_seq_per_target 8 \
--sampling_temp "0.1" \
--chain_id_jsonl chains.jsonl \
--fixed_chains_jsonl fixed.jsonl # fix chain A (target)
# Generate chains.jsonl
import json
with open("chains.jsonl", "w") as f:
json.dump({"complex": ["A", "B"]}, f)
f.write("\n")
# Generate fixed.jsonl (fix target chain A)
with open("fixed.jsonl", "w") as f:
json.dump({"complex": ["A"]}, f)
f.write("\n")
from protein_mpnn_utils import ProteinMPNN, parse_PDB
# Load model
model = ProteinMPNN(
num_letters=21,
node_features=128,
edge_features=128,
hidden_dim=128,
num_encoder_layers=3,
num_decoder_layers=3,
augment_eps=0,
k_neighbors=48,
)
model.load_state_dict(torch.load("vanilla_model_weights/v_48_020.pt"))
model.eval()
# Parse structure
X, S, mask, chain_M, chain_encoding_all, residue_idx, chain_list = parse_PDB(
"structure.pdb",
input_chain_list=["A", "B"]
)
# Sample sequences
with torch.no_grad():
sample_dict = model.sample(
X, randn, S, chain_M, chain_encoding_all,
residue_idx, mask, temperature=0.1,
num_samples=8
)
sequences = sample_dict["S"]
Controls sequence diversity vs. nativeness:
| Temperature | Effect | Use When | |-------------|--------|----------| | 0.05–0.1 | Conservative, high identity to native | Redesigning functional proteins | | 0.1–0.2 | Balanced diversity | Standard binder design | | 0.3–0.5 | High diversity | Exploring sequence space |
>design_0, score=1.234, global_score=1.189, seq_recovery=0.45
EVQLVESGGGLVQPGGSLRLSCAASGFTFSDYYMSWVRQAPGKGLEWVSYITYSGSTAYYADSVKGRFTISRDNAKNSLYLQMNSLRAEDTAVYYCARDYYGSGSYFDYWGQGTLVTVSS
>design_1, score=1.198, global_score=1.145, seq_recovery=0.43
EVQLVESGGGLVQPGGSLRLSCAASGFTFS...
Lower score = better fit to backbone.
python3 protein_mpnn_run.py \
--pdb_path structure.pdb \
--out_folder scores/ \
--score_only 1 \
--path_to_fasta sequences.fasta
Design sequences that fold well in multiple conformations:
python3 protein_mpnn_run.py \
--pdb_path_multi '{"state1": "conf1.pdb", "state2": "conf2.pdb"}' \
--out_folder output/ \
--num_seq_per_target 8
--num_seq_per_target 8 --sampling_temp 0.1tools
Onboard and manage Paperclip AI for research-paper knowledge and agent orchestration
development
Perform AI-powered web searches with real-time information using Perplexity models via LiteLLM and OpenRouter. This skill should be used when conducting web searches for current information, finding recent scientific literature, getting grounded answers with source citations, or accessing information beyond the model knowledge cutoff. Provides access to multiple Perplexity models including Sonar Pro, Sonar Pro Search (advanced agentic search), and Sonar Reasoning Pro through a single OpenRouter API key.
testing
Generate a structured scientific PDF report from a JSON description. Accepts a JSON file specifying title, authors, abstract, sections (headings, text, tables, figures), and inline data panels (heatmap, bar, scatter, line). Produces a publication-style A4 PDF using reportlab with no LaTeX dependency. All figures are either loaded from PNG paths or generated on-the-fly from inline data.
development
Execute arbitrary Python code and return stdout. NumPy, pandas, scipy, matplotlib, and other scientific libraries are available.