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.
- 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
vmapto handle large conformational ensembles.
Experience diff-hdx directly in your browser:
HDX-MS Prediction & Kinetics — Learn how to simulate intrinsic rates, protection factors, and deuterium uptake curves.
- Backend: JAX (XLA-compiled) — supports CPU, GPU, and TPU.
- Differentiability: Full support for forward and reverse-mode autodiff.
- Integration: Compatible with
biotitefor structural parsing anddiff-biophysfor ensemble averaging.
- Initial differentiable SASA and
$ln P$ kernels. - Integration with JAX
vmapfor ensemble averaging. - Residue-specific intrinsic exchange rates (Bai et al. 1993) — all 20 amino acids.
- Integration with MD trajectory loaders.
pip install diff-hdx- Parity Checks: Kernels are validated against standard non-differentiable implementations (e.g.,
biotiteSASA) to ensure physical accuracy. - Gradient Tests: All kernels are verified using JAX's
gradcheckto ensure numerically stable derivatives across the full support. - Ensemble Consistency: Verified against
diff-biophysensemble averaging for IDP conformational ensembles.
diff-hdx is part of the differentiable biophysics ecosystem:
- diff-biophys — Core differentiable biophysics engine.
- diff-fret — Differentiable FRET modeling.
- diff-epr — Differentiable EPR/DEER simulation.
- synth-pdb — Synthetic structure generation.
@software{diff_hdx,
author = {Elkins, George},
title = {diff-hdx: Differentiable HDX-MS prediction in JAX},
year = {2026},
url = {https://github.com/elkins-lab/diff-hdx},
version = {0.1.2}
}MIT