Chuyển đến nội dung
Skillpedia
Agent51k · #3455

esm

Skill này làm gì

Công cụ này dùng bộ công cụ ESM để tạo, hiểu và dự đoán hình dạng protein. Nó có thể tạo chuỗi protein mới, tạo biểu diễn số (embedding) cho các chuỗi có sẵn và dự đoán cấu trúc ba chiều (gấp nếp) của protein.

Khi nào nên dùng

  • ✓Để tạo chuỗi protein mới dựa trên một mẫu.
  • ✓Để lấy biểu diễn số của một chuỗi protein phục vụ phân tích tiếp theo.
  • ✓Để dự đoán cấu trúc ba chiều của protein từ chuỗi của nó.

Liên kết skill

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/esm/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/esm/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một chuỗi protein mới dựa trên “MPRT___KEND” rồi dự đoán cấu trúc ba chiều của nó.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn cung cấp một chuỗi protein hoặc một mẫu cho công cụ. Công cụ dùng các mô hình đã được huấn luyện sẵn để tạo chuỗi mới, tính toán embedding hoặc dự đoán cấu trúc ba chiều. Kết quả được kiểm tra lỗi trước khi trả về.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

ESM: protein generation, embeddings, and folding

When to use

Use for Biohub's esm SDK: ESM3 masked multimodal generation, ESMC sequence representations, and ESMFold2 all-atom prediction. The former Forge platform migrated to https://biohub.ai, including ESM3; SDK class names still contain Forge. This skill targets the released esm 3.4.1.post1, verified against its wheel and current official documentation.

fair-esm is Meta's separate, older ESM2/ESMFold/ESM-IF distribution. Both packages import as esm; install them in separate environments. The legacy esm.pretrained.esm2_* interface is not the Biohub ESMC interface. Hugging Face Transformers' native ESMC implementation is another API: do not interchange its version requirements or output types with this SDK.

Setup and model choice

uv venv --python 3.12 .venv-esm
uv pip install --python .venv-esm/bin/python "esm==3.4.1.post1"

The release declares Python >=3.12, Torch >=2.11,<2.12 and Transformers

=4.57.6,<5. Python 3.12, Torch 2.11.0 and Transformers 4.57.6 were tested on CPU. Linux x86_64 installs include GPU-specific dependencies; use a supported inference machine and budget disk space. Flash Attention is optional; it is unnecessary for the tiny CPU tests. Do not install this stack into a shared environment containing incompatible Transformers or Torch pins.

Task Local model/API Hosted client/model
ESM3 sequence/structure/function generation ESM3.from_pretrained("esm3-sm-open-v1") client("esm3-medium-2024-08"); small/large IDs in the ESM3 reference
ESMC embeddings EsmcForMaskedLM and EsmcTokenizer; biohub/ESMC-300M, biohub/ESMC-600M, biohub/ESMC-6B esmc_client("esmc-600m-2024-12"); 300M/6B also documented
ESMFold2 all-atom structures EsmFold2Model, ESMFold2InputBuilder; biohub/ESMFold2 esmfold2_client("esmfold2-fast-2026-05")

ESMC 6B weights are now available locally. Current Biohub model cards identify MIT licensing, with ESMC cards also linking third-party notices; review the exact selected artifact's card and access requirements. The older ESMC class remains as a deprecated compatibility wrapper. Local model sizes, hosted availability and account quotas are different constraints; a larger model does not guarantee better performance on a particular assay.

Workflow

  1. Specify the sequence/chain/residue mapping and whether the objective is generation, representation extraction or folding. Preserve input IDs and source provenance. Reject accidental ..., spaces, FASTA headers or gaps in plain single-chain sequences rather than silently deleting them.
  2. Choose a local checkpoint or explicit hosted model ID. Record SDK, checkpoint revision, model settings, mask locations and random seed where supported.
  3. Check every SDK result for ESMProteinError. Hosted failures may be returned as values. Use finite request timeouts, context managers and bounded concurrency. See hosted contracts.
  4. Validate the output contract: sequence length and fixed residues, residue-only embedding axes, or chain/atom mapping and confidence. Keep model predictions separate from experimental validation.
  5. Save sequences/structures with settings and identifiers. Avoid caches keyed only by sequence when model, structure, function or generation settings differ.

ESM3 completion and fresh structure prediction

Illustrative pretrained inference; no weights or hosted jobs were run in this refresh. This toy sequence demonstrates API mechanics, not a functional design.

import torch
from esm.models.esm3 import ESM3
from esm.sdk.api import ESMProtein, ESMProteinError, GenerationConfig

model = ESM3.from_pretrained("esm3-sm-open-v1", device=torch.device("cpu"))
prompt = "MPRT___KEND"
completed = model.generate(
    ESMProtein(sequence=prompt),
    GenerationConfig(track="sequence", num_steps=3, temperature=0.7),
)
if isinstance(completed, ESMProteinError):
    raise completed
assert completed.sequence is not None and len(completed.sequence) == len(prompt)
assert "_" not in completed.sequence
assert all(a == "_" or a == b for a, b in zip(prompt, completed.sequence))

# A fresh sequence-only prompt prevents old coordinates conditioning the check.
folded = model.generate(
    ESMProtein(sequence=completed.sequence),
    GenerationConfig(track="structure", num_steps=8),
)
if isinstance(folded, ESMProteinError):

…
Câu hỏi thường gặp

Khác biệt giữa ESM3, ESMC và ESMFold2 là gì?

ESM3 dùng để tạo chuỗi và cấu trúc. ESMC tạo biểu diễn số (embedding) cho chuỗi. ESMFold2 dự đoán cấu trúc ba chiều (gấp nếp) của protein.

Tôi có thể chạy công cụ này trên máy của mình không?

Có. Bạn có thể cài đặt và chạy các mô hình trên máy cục bộ, nhưng có thể cần một máy tính mạnh, đặc biệt với các mô hình lớn.

“Embedding” là gì?

Đó là cách biểu diễn một chuỗi protein dưới dạng một tập hợp các con số. Điều này giúp máy tính hiểu và so sánh các chuỗi khác nhau.

Chi tiết

Mô tả gốc của tác giả

Uses the Biohub esm Python SDK for ESM3 protein generation, ESMC embeddings, and ESMFold2 all-atom folding. Applies to local model inference and Biohub hosted clients, including former Forge workflows; distinguishes the separate legacy fair-esm distribution.

repo: K-Dense-AI/scientific-agent-skills

Độ phổ biến

Sao GitHub
51k
Vị trí xếp hạng
#3455
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự