https://github.com/elkins-lab/diff-hdx
Differentiable HDX-MS prediction in JAX
https://github.com/elkins-lab/diff-hdx
biophysics differentiable-programming hdx-ms jax structural-biology
Last synced: 16 days ago
JSON representation
Differentiable HDX-MS prediction in JAX
- Host: GitHub
- URL: https://github.com/elkins-lab/diff-hdx
- Owner: elkins-lab
- License: mit
- Created: 2026-06-04T23:00:49.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-06-12T17:59:04.000Z (about 1 month ago)
- Last Synced: 2026-06-12T21:32:41.653Z (about 1 month ago)
- Topics: biophysics, differentiable-programming, hdx-ms, jax, structural-biology
- Language: Python
- Homepage: https://elkins.github.io/diff-hdx/
- Size: 623 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-hdx: Differentiable HDX-MS Prediction in JAX
[](https://github.com/elkins/diff-hdx/actions/workflows/test.yml)
[](https://opensource.org/licenses/MIT)
[](https://github.com/google/jax)
**diff-hdx** is a high-performance Python library for differentiable Hydrogen-Deuterium Exchange (HDX-MS) prediction. Built on **JAX**, it provides auto-differentiable kernels to bridge structural ensembles and experimental protection factors.
---
## π― Features
- **Differentiable SASA Kernels:** Hardware-accelerated approximations of Solvent Accessible Surface Area using Gaussian occlusion models.
- **Protection Factor Modeling:** Implementations of LinderstrΓΈm-Lang models for H-exchange rates ($PF$).
- **Kinetic Simulation:** Model time-dependent mass shifts using **EX2 kinetics** (Hvidt & Nielsen, 1966).
- **Gradient-Based Refinement:** Optimize protein structures or ensembles directly against experimental HDX-MS time-curves.
- **Vectorized Execution:** Native support for `vmap` to handle large conformational ensembles.
---
## π Tutorials
Experience **diff-hdx** directly in your browser:
- [](https://colab.research.google.com/github/elkins/diff-hdx/blob/main/examples/interactive_tutorials/hdx_prediction_tutorial.ipynb) **HDX-MS Prediction & Kinetics** β Learn how to simulate intrinsic rates, protection factors, and deuterium uptake curves.
---
## ποΈ Technical Architecture
- **Backend:** JAX (XLA-compiled) β supports CPU, GPU, and TPU.
- **Differentiability:** Full support for forward and reverse-mode autodiff.
- **Integration:** Compatible with `biotite` for structural parsing and `diff-biophys` for ensemble averaging.
---
## π Roadmap
- [x] Initial differentiable SASA and $ln P$ kernels.
- [x] Integration with JAX `vmap` for ensemble averaging.
- [x] Residue-specific intrinsic exchange rates (Bai et al. 1993) β all 20 amino acids.
- [ ] Integration with MD trajectory loaders.
---
## π Installation
```bash
pip install diff-hdx
```
## π§ͺ Scientific Validation
- **Parity Checks:** Kernels are validated against standard non-differentiable implementations (e.g., `biotite` SASA) to ensure physical accuracy.
- **Gradient Tests:** All kernels are verified using JAX's `gradcheck` to ensure numerically stable derivatives across the full support.
- **Ensemble Consistency:** Verified against `diff-biophys` ensemble averaging for IDP conformational ensembles.
---
## π Related Projects
diff-hdx is part of the **differentiable biophysics** ecosystem:
- [diff-biophys](https://github.com/elkins/diff-biophys) β Core differentiable biophysics engine.
- [diff-fret](https://github.com/elkins/diff-fret) β Differentiable FRET modeling.
- [diff-epr](https://github.com/elkins/diff-epr) β Differentiable EPR/DEER simulation.
- [synth-pdb](https://github.com/elkins/synth-pdb) β Synthetic structure generation.
---
## π Citation
```bibtex
@software{diff_hdx,
author = {Elkins, George},
title = {diff-hdx: Differentiable HDX-MS prediction in JAX},
year = {2026},
url = {https://github.com/elkins/diff-hdx},
version = {0.1.0}
}
```
## βοΈ License
MIT