Skip to main content

boileroom: protein prediction models across Modal and Apptainer

Python 3.12 License: MIT PyPI version GitHub last commit GitHub issues

boileroom is a Python package that provides a unified interface to protein prediction models across Modal's serverless GPUs and Apptainer-based local or HPC execution.

🚨🚨🚨 v0.3.0 introduced major changes, including new models and inference backends. If you're upgrading from v0.2, please see the Migration Guide for details on breaking changes and how to update your code. 🚨🚨🚨

⚠️ Note: This package is currently in active development. The API and features may change between versions. We recommend pinning your version in production environments.

Features

  • 🚀 Modal and Apptainer execution backends
  • 🔄 Unified API across different models and runtimes
  • 🎯 Production-ready with GPU acceleration
  • 📦 Easy installation and deployment

Installation

  1. Install the package using pip:
pip install boileroom
  1. If you plan to use Modal, set up Modal credentials:
modal token new

For local containerized execution instead, install Apptainer and use backend="apptainer".

Quick Start

from boileroom import ESMC, ESMFold

# Use Modal by default; pass backend="apptainer" for local containerized execution
model = ESMFold()

# Predict structure for a protein sequence
sequence = "MLKNVHVLVLGAGDVGSVVVRLLEK"

result = model.fold(sequence, options={"include_fields": ["plddt"]})

# Access prediction results
atom_array = result.atom_array[0]
coordinates = atom_array.coord
confidence = result.plddt[0]  # Requested explicitly via include_fields above

# ESM-C / ESM3 are embedding-only. Colon-separated chains are supported.
embedder = ESMC(config={"model_name": "esmc_300m"})
embedding_result = embedder.embed("ACD:EF")
embedding_result.embeddings.shape  # (1, 5, features), residue-only
embedding_result.chain_index       # [[0, 0, 0, 1, 1]]

ESM-C and ESM3 use the MIT-licensed 2026 Chan Zuckerberg Biohub esm fork (weights biohub/esmc-*-2024-12 and biohub/esm3-sm-open-v1). They share the Biohub esmfold2 runtime image — the same esm package backs all three. Set MODEL_DIR to control the shared model-weight cache.

Confidence metrics returned by structure wrappers use a consistent public shape: plddt entries are unit-scale per-residue arrays on [0, 1], and scalar scores such as ptm and iptm are returned as shape-(1,) arrays. In 0.3.1, this replaces ESMFold's old padded pLDDT batch array and moves Boltz ptm/iptm from nested confidence dictionaries to top-level fields.

Available Models

Model Status Description Reference
ESMFold Fast protein structure prediction Facebook (now Meta)
ESM-2 MSA-free embedding model Facebook (now Meta)
ESM-C MIT-licensed embedding-only model Chan Zuckerberg Biohub
ESM3 MIT-licensed multimodal model, embedding-only in Boileroom Chan Zuckerberg Biohub
Chai-1 Protein design and structure prediction model Chai Discovery
Boltz-2 Diffusion-based protein structure prediction Boltz / MIT

Licensing: all bundled model weights are MIT-licensed except Chai-1, whose weights are released under the non-commercial Chai Discovery Community License. Review Chai Discovery's terms before using Chai-1 outside research.

Development

  1. Clone the repository:
git clone https://github.com/jakublala/boileroom
cd boileroom
  1. Install development dependencies using uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install 3.12
uv sync
  1. Run tests:
uv run pytest

For Modal integration tests, run the model families in parallel shards:

uv run pytest -v -n 4 --dist loadgroup -m integration

This starts four pytest workers and keeps each model family on its own worker, so Boltz, Chai, ESM2, and ESMFold use separate Modal apps without registering unrelated GPU functions in the same app.

To run the same integration tests in series, omit xdist:

uv run pytest -v -m integration

or only one test that's more verbose and shows print statements:

uv run python -m pytest tests/test_basic.py::test_esmfold_batch -v -s

To specify a GPU type for Modal backend tests (defaults to T4 if not specified):

uv run pytest --gpu A100-40GB

To run Modal integration tests against a specific Docker Hub namespace, image tag, and GPU type:

uv run pytest -v -n 4 --dist loadgroup -m integration \
  --docker-user <your-dockerhub-user> \
  --image-tag cuda12.6-my-test-tag \
  --gpu A10

The same --image-tag option works for the Apptainer backend. For Apptainer you can also pass the tag inline as --backend apptainer:<tag> (the inline suffix wins over --image-tag).

Available GPU options include T4, A100-40GB, A100-80GB, and other Modal-supported GPU types.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use boileroom in your research, please cite:

@software{boileroom2025,
  author = {Lála, Jakub},
  title = {boileroom: serverless protein prediction models},
  year = {2025},
  publisher = {GitHub},
  url = {https://github.com/softnanolab/boileroom}
}

Acknowledgments

  • Modal Labs for the serverless infrastructure
  • The teams behind ESMFold, AlphaFold, and other protein prediction models

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

boileroom-0.4.1.tar.gz (5.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

boileroom-0.4.1-py3-none-any.whl (118.9 kB view details)

Uploaded Python 3

File details

Details for the file boileroom-0.4.1.tar.gz.

File metadata

  • Download URL: boileroom-0.4.1.tar.gz
  • Upload date:
  • Size: 5.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for boileroom-0.4.1.tar.gz
Algorithm Hash digest
SHA256 bfa1cd09d6600d422bace2d6d85c092f58a6467d36279467a0dfd8044f346687
MD5 0445acc858201b044e965b9fa7de54d2
BLAKE2b-256 d959d6b6b94efdf731b3c95b5a700a9edf3a315e7f98f506f507555ae0626dba

See more details on using hashes here.

File details

Details for the file boileroom-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: boileroom-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 118.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for boileroom-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 83b3fede37a102c9d35c3d6ef80ced6420fc92df43bdbfe3d188ee9671765ece
MD5 4fb827b6fc15eb259bae8b5208313604
BLAKE2b-256 0bfe76e47ffbc1cec012acb02dc63c7255c636a51e7c981d8450950e2f0c9fcb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page