diff-em provides high-performance, auto-differentiable kernels for fitting atomic structures into Cryo-EM density maps. Built on JAX, it enables gradient-based optimization of coordinates directly against 3D experimental data.
- Gaussian Mixture Volumes: Represent atomic models as differentiable 3D density maps using sum-of-Gaussians (electrostatic potential approximation).
- Cross-Correlation Kernels: Differentiable computation of map-to-model correlation coefficients (CC) for structural refinement (Rossmann, 2000).
- Optimization Strategy: Compatible with multi-resolution fitting and neural density fields (Zhong et al., 2021).
- Hardware Acceleration: Optimized for GPU/TPU execution via XLA, enabling the fitting of large complexes in seconds.
Experience diff-em directly in your browser:
Cryo-EM Density Fitting — Learn how to optimize atomic coordinates directly against 3D density maps using cross-correlation.
- Backend: JAX (XLA-compiled).
- Physics: 3D Gaussian placement with B-factor smoothing.
- Optimization: Pure JAX implementation compatible with
optaxfor high-dimensional gradient descent.
- Density Parity: Simulated densities are verified against standard EM map generation tools (e.g.,
gemmiorChimeraX). - CC Gradient Stability: Verified numerically stable gradients for structural refinement in the presence of noise.
- Resolution Limits: Benchmarked against known high-resolution and low-resolution experimental maps.
- Differentiable 3D Gaussian density kernels.
- Cross-correlation (CC) loss functions.
- Integration with MRC map loaders.
- Automated multi-resolution refinement schedules.
diff-em is part of the differentiable biophysics ecosystem:
- diff-biophys — Core differentiable biophysics engine.
- diff-hdx — Differentiable HDX-MS prediction.
- synth-cryo-em — Cryo-EM simulation.
@software{diff_em,
author = {Elkins, George},
title = {diff-em: Differentiable Cryo-EM map fitting in JAX},
year = {2026},
url = {https://github.com/elkins/diff-em},
version = {0.1.0}
}MIT