Comprehensive toolkit for protein language models including ESM3 (generative multimodal protein design across sequence, structure, and function) and ESM C (efficient protein embeddings and representations). Use this skill when working with protein sequences, structures, or function prediction; designing novel proteins; generating protein embeddings; performing inverse folding; or conducting protein engineering tasks. Supports both local model usage and cloud-based Forge API for scalable inference.
Use the skills CLI to install this skill with one command. Auto-detects all installed AI assistants.
Method 1 - skills CLI
npx skills i K-Dense-AI/claude-scientific-skills/scientific-skills/esmMethod 2 - openskills (supports sync & update)
npx openskills install K-Dense-AI/claude-scientific-skillsAuto-detects Claude Code, Cursor, Codex CLI, Gemini CLI, and more. One install, works everywhere.
Installation Path
Download and extract to one of the following locations:
No setup needed. Let our cloud agents run this skill for you.
Select Provider
Select Model
Best for coding tasks
Environment setup included
ESM provides state-of-the-art protein language models for understanding, generating, and designing proteins. This skill enables working with two model families: ESM3 for generative protein design across sequence, structure, and function, and ESM C for efficient protein representation learning and embeddings.
Generate novel protein sequences with desired properties using multimodal generative modeling.
When to use:
Basic usage:
from esm.models.esm3 import ESM3
from esm.sdk.api import ESM3InferenceClient, ESMProtein, GenerationConfig
# Load model locally
model: ESM3InferenceClient = ESM3.from_pretrained("esm3-sm-open-v1").to("cuda")
# Create protein prompt
protein = ESMProtein(sequence="MPRT___KEND") # '_' represents masked positions
# Generate completion
protein = model.generate(protein, GenerationConfig(track="sequence", num_steps=8))
print(protein.sequence)For remote/cloud usage via Forge API:
from esm.sdk.forge import ESM3ForgeInferenceClient
from esm.sdk.api import ESMProtein, GenerationConfig
# Connect to Forge
model = ESM3ForgeInferenceClient(model="esm3-medium-2024-08", url="https://forge.evolutionaryscale.ai", token="<token>")
# Generate
protein = model.generate(protein, GenerationConfig(track="sequence"See references/esm3-api.md for detailed ESM3 model specifications, advanced generation configurations, and multimodal prompting examples.
Use ESM3's structure track for structure prediction from sequence or inverse folding (sequence design from structure).
Structure prediction:
from esm.sdk.api import ESM3InferenceClient, ESMProtein, GenerationConfig
# Predict structure from sequence
protein = ESMProtein(sequence="MPRTKEINDAGLIVHSP...")
protein_with_structure = model.generate(
protein,
GenerationConfig(track="structure", num_steps=protein.sequence.count("_"))
)
# Access predicted structure
Inverse folding (sequence from structure):
# Design sequence for a target structure
protein_with_structure = ESMProtein.from_pdb("target_structure.pdb")
protein_with_structure.sequence = None # Remove sequence
# Generate sequence that folds to this structure
designed_protein = model.generate(
protein_with_structure,
GenerationConfig(track="sequence", num_steps=50, temperature=0.7)
)Generate high-quality embeddings for downstream tasks like function prediction, classification, or similarity analysis.
When to use:
Basic usage:
from esm.models.esmc import ESMC
from esm.sdk.api import ESMProtein
# Load ESM C model
model = ESMC.from_pretrained("esmc-300m").to("cuda")
# Get embeddings
protein = ESMProtein(sequence="MPRTKEINDAGLIVHSP...")
protein_tensor = model.encode(protein)
# Generate embeddings
embeddings =Batch processing:
# Encode multiple proteins
proteins = [
ESMProtein(sequence="MPRTKEIND..."),
ESMProtein(sequence="AGLIVHSPQ..."),
ESMProtein(sequence="KTEFLNDGR...")
]
embeddings_list = [model.logits(model.forward(model.encode(p))) for p in proteins]See references/esm-c-api.md for ESM C model details, efficiency comparisons, and advanced embedding strategies.
Use ESM3's function track to generate proteins with specific functional annotations or predict function from sequence.
Function-conditioned generation:
from esm.sdk.api import ESMProtein, FunctionAnnotation, GenerationConfig
# Create protein with desired function
protein = ESMProtein(
sequence="_" * 200, # Generate 200 residue protein
function_annotations=[
FunctionAnnotation(label="fluorescent_protein", start=50, end=150)
Iteratively refine protein designs using ESM3's chain-of-thought generation approach.
from esm.sdk.api import GenerationConfig
# Multi-step refinement
protein = ESMProtein(sequence="MPRT" + "_" * 100 + "KEND")
# Step 1: Generate initial structure
config = GenerationConfig(track="structure", num_steps=50)
Process multiple proteins efficiently using Forge's async executor.
from esm.sdk.forge import ESM3ForgeInferenceClient
import asyncio
client = ESM3ForgeInferenceClient(model="esm3-medium-2024-08", token="<token>")
# Async batch processing
async def batch_generate(proteins_list):
tasks = [
client.async_generate(protein, GenerationConfig(track="sequence"
See references/forge-api.md for detailed Forge API documentation, authentication, rate limits, and batch processing patterns.
ESM3 Models (Generative):
esm3-sm-open-v1 (1.4B) - Open weights, local usage, good for experimentationesm3-medium-2024-08 (7B) - Best balance of quality and speed (Forge only)esm3-large-2024-03 (98B) - Highest quality, slower (Forge only)ESM C Models (Embeddings):
esmc-300m (30 layers) - Lightweight, fast inferenceesmc-600m (36 layers) - Balanced performanceesmc-6b (80 layers) - Maximum representation qualitySelection criteria:
esm3-sm-open-v1 or esmc-300mesm3-medium-2024-08 via Forgeesm3-large-2024-03 or esmc-6bBasic installation:
uv pip install esmWith Flash Attention (recommended for faster inference):
uv pip install esm
uv pip install flash-attn --no-build-isolationFor Forge API access:
uv pip install esm # SDK includes Forge clientNo additional dependencies needed. Obtain Forge API token at https://forge.evolutionaryscale.ai
For detailed examples and complete workflows, see references/workflows.md which includes:
This skill includes comprehensive reference documentation:
references/esm3-api.md - ESM3 model architecture, API reference, generation parameters, and multimodal promptingreferences/esm-c-api.md - ESM C model details, embedding strategies, and performance optimizationreferences/forge-api.md - Forge platform documentation, authentication, batch processing, and deploymentreferences/workflows.md - Complete examples and common workflow patternsThese references contain detailed API specifications, parameter descriptions, and advanced usage patterns. Load them as needed for specific tasks.
For generation tasks:
esm3-sm-open-v1)For embedding tasks:
For production deployment:
ESM is designed for beneficial applications in protein engineering, drug discovery, and scientific research. Follow the Responsible Biodesign Framework (https://responsiblebiodesign.ai/) when designing novel proteins. Consider biosafety and ethical implications of protein designs before experimental validation.