esm-protein-language-model
Protein language models (ESM3, ESM C) for sequence generation, structure prediction, inverse folding, and embeddings. Design novel proteins, extract ML features, or fold sequences. Local GPU or EvolutionaryScale Forge API. Use AlphaFold for traditional folding; RDKit for small molecules.
Install / Use
npx skills add jaechang-hits/SciAgent-Skills --skill esm-protein-language-modelInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of esm-protein-language-model
esm-protein-language-model scores 91/100 on our quality scale, 310th of 964 AI & Machine Learning skills we index (top 33%).
Its SKILL.md is 16 KB long, well organised into 50 sections with 12 code examples: a thorough specification that gives an agent plenty to work with.
It has 367 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 37 days ago, so esm-protein-language-model is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-10-05. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
esm-protein-language-model compared with similar skills
All 4 of these similar skills score higher than esm-protein-language-model; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| esm-protein-language-model (this skill)by jaechang-hits | 91 | 367 | 37d ago | SKILL.md |
| claude-memby thedotmack | 100 | 96.1k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 90.8k | 19d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 85.3k | 3d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.4k | today | CLAUDE.md |
Frequently asked questions
- How do I install esm-protein-language-model?
- Run
npx skills add jaechang-hits/SciAgent-Skills --skill esm-protein-language-model. The install tabs above show the steps for each supported agent. - Which AI agents does esm-protein-language-model work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is esm-protein-language-model safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is esm-protein-language-model still maintained?
- The repository was last updated 37 days ago, so esm-protein-language-model is actively maintained.
Skill content
View source on GitHubname: esm-protein-language-model description: "Protein language models (ESM3, ESM C) for sequence generation, structure prediction, inverse folding, and embeddings. Design novel proteins, extract ML features, or fold sequences. Local GPU or EvolutionaryScale Forge API. Use AlphaFold for traditional folding; RDKit for small molecules." license: MIT
ESM — Protein Language Models
Overview
ESM (Evolutionary Scale Modeling) provides pretrained protein language models for generative protein design and representation learning. ESM3 is a multimodal generative model conditioned on sequence, structure, and function simultaneously. ESM C is an efficient embedding model optimized for extracting protein representations for downstream ML tasks.
When to Use
- Generating novel protein sequences conditioned on desired structure or function
- Extracting fixed-length embeddings from protein sequences for classification, clustering, or regression
- Predicting 3D structure from amino acid sequence
- Inverse folding: designing sequences that fold into a target structure
- Annotating proteins with functional keywords (GO terms, EC numbers)
- Comparing protein similarity via embedding distance instead of sequence alignment
- Chain-of-thought protein design: iterative refinement of sequence/structure/function
- For traditional physics-based structure prediction, use AlphaFold instead
- For sequence alignment and homology search, use BLAST/HMMER via BioPython instead
Prerequisites
- Python packages:
esm(EvolutionaryScale package) - Hardware: GPU recommended for local inference (ESM3: 8GB+ VRAM; ESM C: 4GB+ VRAM). CPU works for small batches
- Cloud alternative: EvolutionaryScale Forge API (requires API token from forge.evolutionaryscale.ai)
- Model weights: Downloaded automatically on first use (~1-4 GB depending on model)
pip install esm
# For Forge cloud API
pip install esm[forge]
Quick Start
from esm.models.esmc import ESMC
from esm.sdk.api import ESMProtein
# Load ESM C model for embeddings
model = ESMC.from_pretrained("esmc_600m")
# Create protein from sequence
protein = ESMProtein(sequence="MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQAPILSRVGDGTQDNLSGAEKAVQVKVKALPDAQFEVVHSLAKWKRQQIAATGFHIIPGDKPDNRAGGYDN")
# Get per-residue embeddings
output = model(protein)
embeddings = output.embeddings # shape: (1, seq_len, embedding_dim)
print(f"Embedding shape: {embeddings.shape}")
# Embedding shape: (1, 101, 1152)
Core API
1. Protein Sequence Generation (ESM3)
Generate novel protein sequences conditioned on structure, function, or partial sequence.
from esm.models.esm3 import ESM3
from esm.sdk.api import ESM3InferenceClient, ESMProtein, GenerationConfig
# Load ESM3 locally
model = ESM3.from_pretrained("esm3_sm_open_v1")
# Generate from partial sequence (fill in masked positions)
prompt = ESMProtein(sequence="MKTAYIAK____ISFVK____RQLEERLG") # ____ = positions to generate
config = GenerationConfig(track="sequence", num_steps=10, temperature=0.7)
generated = model.generate(prompt, config)
print(f"Generated sequence: {generated.sequence[:50]}...")
# Conditional generation: design sequence for a target structure
from esm.sdk.api import ESMProtein, GenerationConfig
from esm.utils.structure.protein_chain import ProteinChain
# Load target structure from PDB
chain = ProteinChain.from_pdb("target.pdb")
prompt = ESMProtein.from_protein_chain(chain)
prompt.sequence = None # Clear sequence, keep structure
config = GenerationConfig(track="sequence", num_steps=16, temperature=0.5)
designed = model.generate(prompt, config)
print(f"Designed sequence ({len(designed.sequence)} residues): {designed.sequence[:50]}...")
2. Protein Embeddings (ESM C)
Extract fixed-length representations for downstream ML tasks.
from esm.models.esmc import ESMC
from esm.sdk.api import ESMProtein
import torch
model = ESMC.from_pretrained("esmc_600m") # or "esmc_300m" for lighter model
sequences = [
"MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQAPILSRVGDGTQDNLSGAEKAVQVKVKALPDAQFEVVHSLAKWKRQQIAATGFHIIPGDKPDNRAGGYDN",
"MKWVTFISLLFLFSSAYSRGVFRRDAHKSEVAHRFKDLGEENFKALVLIAFAQYLQQCPFEDHVKLVNEVTEFAKTCVADESAENCDKS",
]
embeddings = []
for seq in sequences:
protein = ESMProtein(sequence=seq)
output = model(protein)
# Mean-pool per-residue embeddings to get fixed-length vector
mean_emb = output.embeddings.mean(dim=1) # shape: (1, embedding_dim)
embeddings.append(mean_emb)
emb_matrix = torch.cat(embeddings, dim=0)
print(f"Embedding matrix: {emb_matrix.shape}") # (2, 1152)
# Compute pairwise similarity
similarity = torch.cosine_similarity(emb_matrix[0:1], emb_matrix[1:2])
print(f"Cosine similarity: {similarity.item():.4f}")
3. Structure Prediction
Predict 3D coordinates from amino acid sequence.
from esm.models.esm3 import ESM3
from esm.sdk.api import ESMProtein, GenerationConfig
model = ESM3.from_pretrained("esm3_sm_open_v1")
protein = ESMProtein(sequence="MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQAPILSRVGDGTQDNLSGAEKAVQVKVKALPDAQFEVVHSLAKWKRQQIAATGFHIIPGDKPDNRAGGYDN")
# Generate structure from sequence
config = GenerationConfig(track="structure", num_steps=16)
result = model.generate(protein, config)
# Save predicted structure
result.to_pdb("predicted.pdb")
print(f"Saved structure: {len(result.sequence)} residues → predicted.pdb")
4. Inverse Folding
Design amino acid sequences that fold into a target 3D structure.
from esm.models.esm3 import ESM3
from esm.sdk.api import ESMProtein, GenerationConfig
from esm.utils.structure.protein_chain import ProteinChain
model = ESM3.from_pretrained("esm3_sm_open_v1")
# Load target structure
chain = ProteinChain.from_pdb("target_structure.pdb")
prompt = ESMProtein.from_protein_chain(chain)
# Clear sequence but keep structure coordinates
prompt.sequence = None
# Generate multiple designs
designs = []
for i in range(5):
config = GenerationConfig(track="sequence", num_steps=16, temperature=0.7)
designed = model.generate(prompt, config)
designs.append(designed.sequence)
print(f"Design {i+1}: {designed.sequence[:40]}...")
print(f"Generated {len(designs)} sequence designs for target structure")
5. Function Conditioning
Generate proteins with desired functional annotations (GO terms, enzyme activity).
from esm.models.esm3 import ESM3
from esm.sdk.api import ESMProtein, GenerationConfig
model = ESM3.from_pretrained("esm3_sm_open_v1")
# Condition on functional keywords
protein = ESMProtein(
sequence=None, # generate de novo
function_annotations=["ATP binding", "kinase activity", "protein phosphorylation"],
)
config = GenerationConfig(track="sequence", num_steps=32, temperature=0.7)
result = model.generate(protein, config)
print(f"Function-conditioned sequence: {result.sequence[:50]}...")
print(f"Length: {len(result.sequence)} residues")
6. Forge Cloud API
Use EvolutionaryScale's cloud inference for large models without local GPU.
from esm.sdk.forge import ESM3ForgeInferenceClient
from esm.sdk.api import ESMProtein, GenerationConfig
# Authenticate (requires FORGE_API_TOKEN env var or explicit token)
client = ESM3ForgeInferenceClient(model="esm3-open-2024-03", token="your_token_here")
protein = ESMProtein(sequence="MKTAYIAKQRQISFVKSHFSRQLEERLG")
config = GenerationConfig(track="structure", num_steps=16)
result = client.generate(protein, config)
result.to_pdb("forge_predicted.pdb")
print("Predicted structure via Forge API → forge_predicted.pdb")
Key Concepts
ESM3 vs ESM C: When to Use Which
| Feature | ESM3 | ESM C | |---------|------|-------| | Primary use | Generative protein design | Embedding extraction | | Capabilities | Sequence generation, structure prediction, inverse folding, function conditioning | Per-residue and mean-pooled embeddings | | Model sizes | esm3_sm_open_v1 (~1.4B params) | esmc_300m, esmc_600m | | GPU requirement | 8GB+ VRAM | 4GB+ VRAM (esmc_300m: 2GB) | | Use case | Design new proteins, predict structures | Downstream ML (classification, clustering, regression) | | Cloud option | Forge API (larger models available) | Local only |
GenerationConfig Parameters
The GenerationConfig controls how ESM3 generates outputs:
track: Which modality to generate ("sequence","structure","function")num_steps: Number of iterative refinement steps (higher = better quality, slower)temperature: Sampling temperature (0.0 = greedy, 0.5-0.7 = diverse, 1.0 = maximum diversity)
ESMProtein Object
The central data container holding sequence, structure coordinates, and functional annotations:
.sequence— amino acid string (e.g., "MKTAY...").coordinates— 3D atom positions (Nx3 tensor).function_annotations— list of functional keywords- Use
ESMProtein.from_protein_chain()to load from PDB structures - Use
.to_pdb()to save predicted structures
Common Workflows
Workflow 1: Protein Embedding-Based Classification
Goal: Extract embeddings from protein sequences and train a downstream classifier.
from esm.models.esmc import ESMC
from esm.sdk.api import ESMProtein
import torch
import numpy as np
model = ESMC.from_pretrained("esmc_600m")
# Embed a set of sequences
sequences = ["MKTAY...", "MKWVT...", "MSGLI..."] # replace with actual sequences
labels = [0, 1, 0] # binary labels
embeddings = []
for seq in sequences:
protein = ESMProtein(sequence=seq)
output = model(protein)
mean_emb = output.embeddings.mean(dim=1).detach().cpu().numpy()
embeddings.append(mean_emb.squeeze())
X = np.array(embeddings)
y = np.array(labels)
print(f"Feature matrix: {X.shape}") # (n_samples, 1152)
# Train a simple classifier
from sklearn.linear_model import LogisticRegression
clf = LogisticRegression(max_iter=1000).fit(X, y)
print(f"Training accuracy: {clf.score(X, y):.2f}")
Workflow 2: Structure-Conditioned Protein Design
Goal: Design multiple novel sequences that fold into a target structure, then rank by predicted quality.
- Load target structure from PDB using
ProteinChain.from_pdb()(Core API module 4) - Create ESMProtein prompt with structure but no sequence
- Generate 10+ sequence designs with
temperature=0.7for diversity (Core API module 1) - For each design, predict structure from designed sequence (Core API module 3)
- Compare predicted structure to target structure (RMSD calculation) to rank designs
- Select top designs for experimental validation
Key Parameters
| Parameter | Module/Function | Default | Range / Options | Effect |
|-----------|----------------|---------|-----------------|--------|
| num_steps | GenerationConfig | varies | 1–64 | Iterative refinement steps; more = higher quality, slower |
| temperature | GenerationConfig | 1.0 | 0.0–1.5 | Sampling diversity; 0.0=greedy, 0.7=balanced, 1.0+=creative |
| track | GenerationConfig | — | "sequence", "structure", "function" | Which modality to generate |
| model name | from_pretrained | — | "esm3_sm_open_v1", "esmc_300m", "esmc_600m" | Model size/capability tradeoff |
| token | ESM3ForgeInferenceClient | env var | API token string | Forge cloud authentication |
Best Practices
-
Use ESM C for embedding tasks, ESM3 for generation: ESM C is smaller, faster, and optimized for representation quality. Only use ESM3 when you need generative capabilities (sequence design, structure prediction, inverse folding).
-
Mean-pool per-residue embeddings for fixed-length representations: ESM C outputs per-residue embeddings (seq_len × dim). For downstream ML that requires fixed-length input, average across the sequence dimension:
embeddings.mean(dim=1). -
Use temperature 0.5–0.7 for protein design: Temperature 1.0 produces very diverse but potentially non-functional sequences. Temperature 0.5–0.7
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
96.1kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
90.8kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
85.3kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
74.4kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
