Overview#

The BioLM Python SDK lets you call BioLM models from Python with minimal setup: encode sequences, predict structures, and generate sequences. Use a one-off function, a class-based Model, or the API client for more control.

Quick example

from biolmai import biolm

# Encode a sequence (e.g. ESM2-8M)
result = biolm(entity="esm2-8m", action="encode", type="sequence", items="MSILVTRPSPAGEEL")

# Predict structure (e.g. ESMFold)
result = biolm(entity="esmfold", action="predict", type="sequence", items=["MDNELE", "MENDEL"])

# Generate sequences (e.g. ProGen2-OAS)
result = biolm(
    entity="progen2-oas",
    action="generate",
    type="context",
    items="M",
    params={"temperature": 0.7, "num_samples": 2, "max_length": 17}
)

What you can do

  • Encode sequences to get embeddings (e.g. ESM2-8M).

  • Predict protein structures from sequences (e.g. ESMFold).

  • Generate new sequences from context (e.g. ProGen2-OAS).

Ways to use the SDK

Next steps

  • Models — Available models and examples.

  • Usage — Usage patterns and when to use which interface.

  • FAQ — Common questions.

  • SDK API — Full API reference.