ES

Use ESM2 to score protein sequences, generate embeddings, and predict function.

Install

mkdir -p .claude/skills/esm2-sequence-scoring && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16391" && unzip -o skill.zip -d .claude/skills/esm2-sequence-scoring && rm skill.zip

Installs to .claude/skills/esm2-sequence-scoring

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

ESM2 protein language model for sequence scoring, embeddings, and plausibility checks. Use this skill when: (1) Computing pseudo-log-likelihood (PLL) scores, (2) Getting protein embeddings for clustering, (3) Filtering designs by sequence plausibility, (4) Zero-shot variant effect prediction, (5) Analyzing sequence-function relationships. For structure prediction, use chai1-structure-prediction or boltz-structure-prediction. For QC thresholds, use protein-design-qc.
470 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • Compute pseudo-log-likelihood (PLL) scores for protein sequences
  • Generate protein embeddings for clustering and analysis
  • Filter design candidates by sequence plausibility
  • Perform zero-shot variant effect prediction
  • Analyze sequence-function relationships

How it works

The skill uses the ESM2 protein language model to process protein sequences. It computes pseudo-log-likelihood scores and generates embeddings, which can be used for plausibility checks, variant effect prediction, and sequence-function analysis.

Inputs & outputs

You give it
Protein sequences in FASTA or CSV format
You get back
Sequence-level embeddings, pseudo-log-likelihood scores, or mutation effect estimates

When to use esm2-sequence-scoring

  • Scoring protein sequences
  • Generating sequence embeddings
  • Predicting variant effects

About this skill

ESM2 Protein Language Model

Plain-language role: Use ESM when you want sequence-level scoring or embeddings rather than 3D structure prediction.

Prerequisites

RequirementMinimumRecommended
Python3.8+3.10
PyTorch1.10+2.0+
CUDA11.0+11.7+
GPU VRAM8GB24GB (A10G)
RAM16GB32GB

How to run

First time? See Installation Guide to set up Modal and biomodals.

Option 1: Modal

cd biomodals
modal run modal_esm2_predict_masked.py \
  --input-faa sequences.fasta \
  --out-dir embeddings/

GPU: A10G (24GB) | Timeout: 300s default

Option 2: Python API (recommended)

import torch
import esm2-sequence-scoring

# Load model
model, alphabet = esm2-sequence-scoring.pretrained.esm2_t33_650M_UR50D()
batch_converter = alphabet.get_batch_converter()
model = model.eval().cuda()

# Process sequences
data = [("seq1", "MKTAYIAKQRQISFVK...")]
batch_labels, batch_strs, batch_tokens = batch_converter(data)

with torch.no_grad():
    results = model(batch_tokens.cuda(), repr_layers=[33])

# Get embeddings
embeddings = results["representations"][33]

Key parameters

ESM2 Models

ModelParametersSpeedQuality
esm2_t6_8M8MFastestFast screening
esm2_t12_35M35MFastGood
esm2_t33_650M650MMediumBetter
esm2_t36_3B3BSlowBest

Output format

embeddings/
├── embeddings.npy       # (N, 1280) array
├── pll_scores.csv       # PLL for each sequence
└── metadata.json        # Sequence info

Sample output

Successful run

$ modal run modal_esm2_predict_masked.py --input-faa designs.fasta
[INFO] Loading ESM2-650M model...
[INFO] Processing 100 sequences...
[INFO] Computing pseudo-log-likelihood...

embeddings/pll_scores.csv:
sequence_id,pll,pll_normalized,length
design_0,-0.82,0.15,78
design_1,-0.95,0.08,85
design_2,-1.23,-0.12,72
...

Summary:
  Mean PLL: -0.91
  Sequences with PLL > 0: 42/100 (42%)

What good output looks like:

  • PLL_normalized: > 0.0 (more natural-like)
  • Embeddings shape: (N, 1280) for 650M model
  • Higher PLL = more natural sequence

Decision tree

Should I use ESM2?
│
├─ What do you need?
│  ├─ Sequence plausibility score → ESM2 PLL ✓
│  ├─ Embeddings for clustering → ESM2 ✓
│  ├─ Variant effect prediction → ESM2 ✓
│  └─ Structure prediction → Use ESMFold
│
├─ What model size?
│  ├─ Fast screening → esm2_t12_35M
│  ├─ Standard use → esm2_t33_650M ✓
│  └─ Best quality → esm2_t36_3B
│
└─ Use case?
   ├─ QC filtering → PLL > 0.0 threshold
   ├─ Diversity analysis → Mean-pooled embeddings
   └─ Mutation scanning → Per-position log-odds

PLL interpretation

Normalized PLLInterpretation
> 0.2Very natural sequence
0.0 - 0.2Good, natural-like
-0.5 - 0.0Acceptable
< -0.5May be unnatural

Typical performance

Campaign SizeTime (A10G)Cost (Modal)Notes
100 sequences5-10 min~$1Quick screen
1000 sequences30-60 min~$5Standard
5000 sequences2-3h~$20Large batch

Throughput: ~100-200 sequences/minute with 650M model.


Verify

wc -l embeddings/pll_scores.csv  # Should match input + 1 (header)

Troubleshooting

OOM errors: Use smaller model or batch sequences Slow processing: Use esm2_t12_35M for speed Low PLL scores: May indicate unusual/designed sequences

Error interpretation

ErrorCauseFix
RuntimeError: CUDA out of memorySequence too long or large batchReduce batch size
KeyError: representationWrong layer requestedUse layer 33 for 650M model
ValueError: sequenceInvalid amino acidCheck for non-standard AAs

Next: Structure prediction with chai1-structure-prediction or boltz-structure-predictionprotein-design-qc for filtering.

Inputs

  • Protein sequences in FASTA or CSV form for scoring, embedding, or variant analysis.
  • A selected ESM model size and any layer or batching preferences.
  • Optional metadata linking each sequence back to a design campaign.

Outputs

  • Sequence-level embeddings, pseudo-log-likelihood scores, or mutation effect estimates.
  • A plausibility signal that can be merged into protein-design-qc composite ranking.
  • Sequence features that support clustering, deduplication, or active-learning loops.

Next Step

Merge ESM-derived scores into protein-design-qc, then send surviving candidates to chai1-structure-prediction or boltz-structure-prediction for structure validation.

When not to use it

  • For 3D structure prediction, use chai1-structure-prediction or boltz-structure-prediction
  • When a generic 'ToastViewModel' or 'ErrorViewModel' is needed

Prerequisites

Python 3.8+PyTorch 1.10+CUDA 11.0+GPU VRAM 8GB

Limitations

  • For structure prediction, use chai1-structure-prediction or boltz-structure-prediction
  • OOM errors may occur with large sequences or batch sizes

How it compares

This skill provides sequence-level scoring and embeddings using the ESM2 protein language model, focusing on sequence plausibility and relationships, unlike tools for 3D structure prediction.

Compared to similar skills

esm2-sequence-scoring side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
esm2-sequence-scoring (this skill)02moReviewAdvanced
model-compare78moReviewAdvanced
cellxgene-census87moReviewAdvanced
tcga-bulk-data-preprocessing-with-omicverse15moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by BioTender-max

View all by BioTender-max

You might also like

model-compare

rawwerks

Compare 3D CAD models using boolean operations (IoU, Dice, precision/recall). Use when evaluating generated models against gold references, diffing CAD revisions, or computing similarity metrics for ML training. Triggers on: model diff, compare models, IoU, intersection over union, model similarity, CAD comparison, STEP diff, 3D evaluation, gold reference, generated model, precision recall 3D.

783

cellxgene-census

davila7

Query CZ CELLxGENE Census (61M+ cells). Filter by cell type/tissue/disease, retrieve expression data, integrate with scanpy/PyTorch, for population-scale single-cell analysis.

88

tcga-bulk-data-preprocessing-with-omicverse

Starlitnightly

Guide Claude through ingesting TCGA sample sheets, expression archives, and clinical carts into omicverse, initialising survival metadata, and exporting annotated AnnData files.

14

alterlab-hypogenic

AlterLab-IEU

Runs automated LLM-driven hypothesis generation and testing on tabular datasets with HypoGeniC, combining literature insights with data-driven testing. Use when systematically exploring hypotheses about patterns in empirical data (for example deception detection or content analysis). For manual hypo

00

esm

davila7

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.

353

hugging-face-paper-publisher

patchy631

Publish and manage research papers on Hugging Face Hub. Supports creating paper pages, linking papers to models/datasets, claiming authorship, and generating professional markdown-based research articles.

634

Search skills

Search the agent skills registry