BioEmu2, now on your Mac
Molecular dynamics (MD) simulations calculate the forces between atoms to predict how a molecule moves over time. In drug design, that motion can reveal a binding pocket that opens only briefly or show whether a candidate stays in contact with its target.
With our RFD4-Proteina release, you can design a binder on your Mac and screen it with Boltz-2. Say you’ve kept a design with a loop next to the target. Where else might that loop sit when the binder is on its own?
We’ve ported Microsoft Research’s BioEmu2 to Apple silicon so you can explore that question on the same Mac. Give it the binder sequence and overlay the structures it samples. If the loop turns up in a position you’d like to investigate, you can relax that structure and start a short all-atom molecular dynamics (MD) simulation with OpenMM.
BioEmu2 samples conformations directly using a model trained on structures and MD trajectories. Our port runs the original weights. On our MacBook Pro with an M5 Pro and 48 GB of memory, 20 conformations of ubiquitin took 12.7 seconds with the official sampler, down from 171.2 seconds in PyTorch on the same machine (about 13× faster). We also timed 20 shapes of villin, a smaller protein. Using the same 200-step sampler, the Mac took 6.3 seconds and an NVIDIA H100 running the default settings took 9.6 seconds.
Get the Mac port on Hugging Face
Watching adenylate kinase move
Adenylate kinase has a lid that closes over its active site. An equilibrium ensemble lets you see which lid positions BioEmu2 samples. To watch how the lid might move from one position to another, you can also ask the model to predict a series of structures, each starting from the previous one.
We tried both on the enzyme without a ligand. In the equilibrium samples, the lid came within 25 Å of the core about a quarter of the time. In one emulated trajectory, only 1.7% of frames came that close. Watching that trajectory alone, you’d miss many of the more closed structures.
The 50 µs shown in the clip is the sum of the time intervals we asked the model to predict. We haven’t validated those intervals against the physical timescale of lid motion.
Get started on your Mac
You’ll need an Apple silicon Mac and Python 3.12 or newer. We tested an M5 Pro with 48 GB of memory on macOS 26.4.1. The port includes a fallback for M1–M4 GPUs, which we haven’t benchmarked on those machines.
Install BioEmu2-MLX
In a fresh Python environment, run the commands below. The model weights are about 2 GB.
shgit clone https://huggingface.co/bios-labs/BioEmu2-MLX
cd BioEmu2-MLX
python -m pip install -e .Sample ubiquitin
For a first run, sample 100 conformations of ubiquitin, a 76-residue protein.
shbioemu2-mlx sample --pdb-id 1UBQ --num-samples 100 --out out/ubqOpen samples.xtc with topology.cif from out/ubq in a molecular viewer. Align the structures on the backbone and look for places where they fan apart. Frame order is arbitrary in an equilibrium ensemble. The run also writes physicality.json with the results of the structural checks.
If you’re working with an unpublished sequence, supply a local alignment with --msa your_alignment.a3m. Inference runs on your Mac, but the default alignment lookup sends the sequence to the public ColabFold server. The ubiquitin example also downloads the structure from the PDB.
Run molecular dynamics (optional)
From the same directory, install the OpenMM dependencies. This example relaxes all 100 ubiquitin samples, then starts a 5 ns simulation from sample 0.
shpython -m pip install -e '.[md]'
python -m bioemu2_mlx.md --in out/ubq --out out/ubq-md \
--relax-all --md-sample 0 --md-ns 5The simulation writes its output to out/ubq-md. The model card uses villin for its worked example.
How long does sampling take?
With the same 200-step sampler, MLX was 9.9–14.5× faster than PyTorch on the M5 Pro across four proteins, from 10 to 214 residues. All four runs used less than 5 GB of peak memory.
For a quick look at a protein, try fast-reuse. It makes fewer calls to the model, bringing the ubiquitin run down from 12.7 seconds to 3.7. It passed all 19 of our ensemble checks on ubiquitin and villin. When we want to estimate how often a larger protein adopts different shapes, we use the official sampler.
Timings for all four proteins
Seconds for 20 samples, in this order: MLX official, MLX fast, MLX fast-reuse, PyTorch MPS on the same Mac, A100 at upstream defaults, H100 at upstream defaults.
- Chignolin (10 residues) · 2.7 / 1.4 / 0.7 / 26.5 / 12.2 / 10.0
- Villin HP35 (35) · 6.3 / 3.3 / 1.7 / 79.4 / 12.3 / 9.6
- Ubiquitin (76) · 12.7 / 6.9 / 3.7 / 171.2 / 17.4 / 10.4
- Adenylate kinase (214) · 38.2 / 20.4 / 12.8 / 553.2 / 46.0 / 22.0
GPU settings matter here. With the default settings, ubiquitin took 17.4 seconds on an A100 and 10.4 seconds on an H100. With the optional --compile-denoiser flag, the H100 ran villin in 4.8 seconds, ahead of the Mac’s 6.3 seconds. Compiling the denoiser also brought the A100 down to 13.0 seconds on ubiquitin, about even with the Mac. On the largest protein, the compiled A100 was faster. We report the faster of two runs, timing the trunk and sampler only. Model loading, alignment retrieval and file writing take additional time.
How closely do the Mac samples match CUDA?
We compared 500 Mac samples per protein with ensembles from the official CUDA implementation. The 19 checks cover properties such as how much each residue moves, how compact the protein is and which residues stay in contact. For each check, we used the difference between two halves of a reference CUDA run to set a tolerance. A second CUDA run with a different seed served as a control.
With the official sampler, ubiquitin passed all 19 checks, as did adenylate kinase on the first release build. Villin passed 18. The one miss was the correlation in per-residue fluctuations. The CUDA control missed it too.
Those tests cover three single-chain proteins. For complexes, ligands and nucleic acids, we checked numerical agreement and ran 20-sample checks. We haven’t benchmarked the RFD4-to-BioEmu2 workflow end to end.
Inside the Mac port
We rewrote BioEmu2’s trunk, diffusion denoiser and sampler in Apple’s MLX framework. Much of the speedup came from avoiding repeated work. For example, the attention bias for a pair of residues depends on the input system, so we compute it once and reuse it at every sampling step. We also wrote Metal kernels for attention and triangle multiplication. The port works with the official Python API and command line.
The denoiser uses fp16 for matrix multiplication inputs and keeps coordinates, normalization and residuals in fp32. In strict fp32 mode, replaying the random draws from an official 200-step CUDA run gave a relative error of about 4 × 10⁻⁶. The release repository includes the technical report, raw timings and fidelity tests.
Credits
Microsoft Research AI for Science developed the model and released its weights and reference code under the MIT license. BioEmu2-MLX is an unofficial community port. It is not affiliated with or endorsed by Microsoft.
If you use the port, cite BioEmu2 (Gastegger et al., 2026), BioEmu (Lewis et al., 2025) and the Mac port. Our implementation is MIT-licensed and builds on MLX and Metal kernel designs from boltz-mlx.
Follow BIOS on X for new ports, experiments, and results from the team.
Cite this benchmark
If you use our Apple silicon timings, please cite this post.
text@misc{george2026bioemu2mac,
author = {George, Geeve and Weniger, Johannes},
title = {{BioEmu2}, now on your {Mac}},
howpublished = {BIOS Blog},
year = {2026},
month = dec,
url = {https://biosdiscovery.ai/blog/bioemu2-now-on-your-mac}
}