https://github.com/elkins-lab/diff-epr
Differentiable EPR/DEER distance distribution modeling in JAX
https://github.com/elkins-lab/diff-epr
biophysics deer differentiable-programming epr jax structural-biology
Last synced: 16 days ago
JSON representation
Differentiable EPR/DEER distance distribution modeling in JAX
- Host: GitHub
- URL: https://github.com/elkins-lab/diff-epr
- Owner: elkins-lab
- License: mit
- Created: 2026-06-04T23:01:06.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-07-01T01:19:00.000Z (16 days ago)
- Last Synced: 2026-07-01T01:20:37.525Z (16 days ago)
- Topics: biophysics, deer, differentiable-programming, epr, jax, structural-biology
- Language: Python
- Homepage: https://elkins.github.io/diff-epr/
- Size: 631 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ป diff-epr: Differentiable EPR/DEER Simulation in JAX
[](https://github.com/elkins-lab/diff-epr/actions/workflows/test.yml)
[](https://opensource.org/licenses/MIT)
[](https://github.com/google/jax)
**diff-epr** provides differentiable kernels for simulating EPR distance distributions (DEER/PELDOR) from structural ensembles and spin-label rotamers.
---
## ๐ฏ Features
- **Spin-Label Modeling:** Differentiable distance calculations between paramagnetic centers.
- **Orientation Selection:** Support for the **Polyhach 5-angle formula** (Polyhach et al., 2007) to model relative domain orientations.
- **Time-Domain Simulation:** Simulate DEER modulation traces $V(t)$ with parameterizable background decay and modulation depth.
- **Rotamer Library Integration:** Support for weighted rotamer averages in distance distribution calculations.
- **Hardware Acceleration:** GPU-optimized distance kernels via JAX.
---
## ๐ Tutorials
Experience **diff-epr** directly in your browser:
- [](https://colab.research.google.com/github/elkins-lab/diff-epr/blob/main/examples/interactive_tutorials/deer_spectroscopy_tutorial.ipynb) **DEER Spectroscopy Simulation** โ Learn how to simulate time-domain traces from distance distributions and rotamer clouds.
---
## ๐๏ธ Technical Architecture
- **Backend:** JAX (XLA-compiled).
- **Physics:** Dipolar coupling frequency ($\omega$) based kernels.
- **Performance:** $O(N)$ scaling for distance distribution integration.
---
## ๐ Roadmap
- [x] Core DEER trace simulation kernels.
- [x] Background decay and modulation depth parameters.
- [ ] Integration with MMM (Multi-Scale Modeling of Macromolecules) rotamer libraries.
- [ ] Full orientation-dependence support.
---
## ๐ Installation
```bash
pip install diff-epr
```
## ๐งช Scientific Validation
- **Dipolar Frequency Parity:** Coupling frequencies verified against the Pake pattern $1/r^3$ dependence.
- **Time-Domain Accuracy:** DEER traces validated for parity against standard simulation tools (e.g., DeerAnalysis/MMM).
- **Auto-Diff Gradients:** Differentiable distance-to-signal kernels verified with JAX `grad`.
---
## ๐ Related Projects
diff-epr is part of the **differentiable biophysics** ecosystem:
- [diff-biophys](https://github.com/elkins-lab/diff-biophys) โ Core differentiable biophysics engine.
- [diff-hdx](https://github.com/elkins-lab/diff-hdx) โ Differentiable HDX-MS prediction.
- [diff-fret](https://github.com/elkins-lab/diff-fret) โ Differentiable FRET modeling.
- [synth-nmr](https://github.com/elkins-lab/synth-nmr) โ NMR observable simulation.
---
## ๐ Citation
```bibtex
@software{diff_epr,
author = {Elkins, George},
title = {diff-epr: Differentiable EPR/DEER simulation in JAX},
year = {2026},
url = {https://github.com/elkins-lab/diff-epr},
version = {0.1.2}
}
```
## โ๏ธ License
MIT