Archive of AI

Source Snapshot / 2025-07-10-microsoft-bioemu-science-3

microsoft/bioemu

Linked event: 2025-07-10 · Microsoft Publishes and Open-Sources Protein Equilibrium Emulator BioEmu in Science, Moving Beyond Static Structure Prediction

Publisher
GitHub
Archived
2026-11-23
Capture Method
Direct page capture
HTTP / SHA-256
200 / 6c17b854c26ed390
Original URL
Open source ↗
Wayback Backup
Not archived
This page preserves a plain-text static snapshot against link rot. When citing figures, tables, or full legal terms, verify against the original URL and Wayback Machine archive.

[来源关键摘录] Open-source inference code and weights for scalable emulation of protein equilibrium ensembles.

[正文前段节选] Skip to content

Navigation Menu

Appearance settings

You signed in with another tab or window. Reload to refresh your session.

You signed out in another tab or window. Reload to refresh your session.

You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

This repository was archived by the owner on Oct 21, 2026. It is now read-only.

Repository navigation

Public archive

NotificationsYou must be signed in to change notification settings

Fork152 (152)

Star900 (900)You must be signed in to star a repository

Inference code for scalable emulation of protein equilibrium ensembles with generative deep learning

Code of conduct

Security policy

Custom properties

Report repository

BranchesTags

Open more actions menu

Latest commit

Folders and files

Last commit message

Last commit date

dev/afdb_cluster_definitions

.gitattributes

.pre-commit-config.yaml

AZURE_AI_FOUNDRY.md

CODE_OF_CONDUCT.md

MODEL_CARD.md

cgmanifest.json

pyproject.toml

View all files

Repository files navigation

This repository is no longer maintained. Please check out BioEmu2.

Biomolecular Emulator (BioEmu)

Biomolecular Emulator (BioEmu for short) is a model that samples from the approximated equilibrium distribution of structures for a protein monomer, given its amino acid sequence.

For more information see our paper, citation below.

This repository contains inference code and model weights.

Table of Contents

Installation

Sampling structures

Steering to avoid chain breaks and clashes

Azure AI Foundry

Training data

Get in touch

bioemu is provided as a Linux-only pip-installable package. We support Python 3.10 and above:

pip install bioemu

To install with CUDA support:

pip install bioemu[cuda]

BioEmu uses an inlined version of ColabFold and AlphaFold2 for MSA retrieval and embedding generation. These are bundled with the package — no separate environment or installation is needed. On first use, AlphaFold2 model weights (~3.5 GB) will be automatically downloaded to ~/.cache/colabfold/.

You can sample structures for a given protein sequence using the sample module. To run a tiny test using the default model parameters and denoising settings:

python -m bioemu.sample --sequence GYDPETGTWG --num_samples 10 --output_dir ~/test-chignolin

Alternatively, you can use the Python API:

from bioemu.sample import main as sample

sample(sequence='GYDPETGTWG', num_samples=10, output_dir='~/test_chignolin')

The model parameters will be automatically downloaded from huggingface. A path to a single-sequence FASTA file can also be passed to the sequence argument.

Sampling times will depend on sequence length and available infrastructure. The following table gives times for collecting 1000 samples measured on an A100 GPU with 80 GB VRAM for sequences of different lengths (using a batch_size_100=20 setting in sample.py):

sequence length

By default, unphysical structures (steric clashes or chain discontinuities) will be filtered out, so you will typically get fewer samples in the output than requested. The difference can be very large if your protein has large disordered regions which are very likely to produce clashes. If you want to get all generated samples in the output, irrespective of whether they are physically valid, use the --filter_samples=False argument.

If you wish to use your own generated MSA instead of the ones retrieved via the ColabFold MMseqs2 server, you can pass an A3M file containing the query sequence as the first row to the sequence argument. Additionally, the msa_host_url argument can be used to override the default MSA query server. See sample.py for more options.

This code only supports sampling structures of monomers. You can try to sample multimers using the linker trick, but in our limited experiments, this has not worked well.

BioEmu includes a steering system that guides the diffusion process toward more physically plausible protein structures.

Steering applies potential energy functions during denoising to favor conformations that satisfy physical constraints.

Two steering algorithms are available:

SMC (Sequential Monte Carlo): Simulates multiple candidate samples (particles) per desired output sample, where the candidates are denoised in an unbiased way, and resamples between them according to the favorability of the provided potentials. This is the default for physical steering.

FKC (Feynman–Kac Corrector): Uses importance weighting and may perform ESS-based resampling between particles; useful when targeting a specific collective variable value (e.g., RMSD to a reference). The samples are denoised with bias from the bias potential (reward).

Empirically, using three (or up to 10) steering particles per output sample greatly reduces the number of unphysical samples (steric clashes or chain breaks) produced by the model.

Quick start with steering

Steering is configured via a single YAML file passed as denoiser_config. This file specifies the denoiser, potentials, and steering parameters together.

Enable steering with physical constraints using the CLI:

python -m bioemu.sample \

--sequence GYDPETGTWG \

--num_samples 100 \

--output_dir ~/steered-samples \

--denoiser_config src/bioemu/config/steering/physical_steering.yaml

Or using the Python API:

sequence='GYDPETGTWG',

num_samples=100,

output_dir='~/steered-samples',

denoiser_config="src/bioemu/config/steering/physical_steering.yaml",

Key steering parameters

Inside the steering YAML config (e.g., physical_steering.yaml):

num_particles: Number of particles per sample (higher = stronger steering, more compute)

ess_threshold: Effective sample size threshold for resampling (0.0–1.0)

start: Diffusion time to start steering (0.0–1.0, default: 0.1; reverse process goes 1→0)

end: Diffusion time to stop steering (0.0–1.0, default: 0.0)

fk_potentials: List of potential energy functions to apply (Hydra-instantiated)

Available potentials

The physical_steering.yaml configuration provides potentials for physical realism:

CaCaDistance + UmbrellaPotential: Prevents backbone discontinuities by penalizing large Cα–Cα distances

PairwiseClash + UmbrellaPotential: Avoids steric clashes between non-neighboring residues

For custom steering, you can write your own YAML config targeting any combination of potentials and collective variables. See cv_steer.yaml for an example that steers toward a target RMSD value using FKC.

BioEmu is also available on Azure AI Foundry. See How to run BioEmu on Azure AI Foundry for more details.

The molecular dynamics training data used for BioEmu is available on Zenodo:

Octapeptides

For a full description of these, see the paper.

Reproducing results from the paper

You can use this code together with code from bioemu-benchmarks to approximately reproduce results from our paper.

The bioemu-v1.0 checkpoint contains the model weights used to produce the results in the preprint. Due to simplifications made in the embedding computation and a more efficient sampler, the results obtained with this code are not identical but consistent with the preprint statistics, i.e., mode coverage and free energy errors averaged over the proteins in a test set. Results for individual proteins may differ.

[Default] The bioemu-v1.1 checkpoint contains the model weights used to produce the results in the published Science paper.

The bioemu-v1.2 checkpoint contains the model weights trained from an extended set of MD simulations and experimental measurements of folding free energies.

For more details, please check the BIOEMU_RESULTS.md document on the bioemu-benchmarks repository.

To use a specific checkpoint, you can specify the model_name in the bioemu.sample args, for example, --model_name="bioemu-v1.1".

Side-chain reconstruction and MD-relaxation

[...内容已截断,完整版请查看原文或 Wayback 快照]