🧪 diff-hdx: Differentiable HDX-MS Prediction in 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
vmapto handle large conformational ensembles.
📚 Tutorials
Experience diff-hdx directly in your browser:
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
biotitefor structural parsing anddiff-biophysfor ensemble averaging.
🚀 Roadmap
- 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.
🚀 Installation
pip install diff-hdx
🧪 Scientific Validation
- 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.
🔗 Related Projects
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.
📖 Citation
@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}
}
⚖️ License
MIT
Metadata
Release files for diff-hdx 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| diff_hdx-0.1.2.tar.gz | 10.6 kB | With provenance | Details for diff_hdx-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| diff_hdx-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for diff_hdx-0.1.2-py3-none-any.whl |
Total release size: 18.3 kB
Release files / diff_hdx-0.1.2.tar.gz
| Download URL | diff_hdx-0.1.2.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4027eb03ad43b39b9c3ebe30a10b97c7e283cd0b5f0af1cb07014222ecf0ab9b
|
|
BLAKE2b-256 checksum How to use checksums |
2070c0ee53c14996ff42f9dddbe24e00f17f6531f206c44229607ead4ddfdab8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.
Transparency logRelease files / diff_hdx-0.1.2-py3-none-any.whl
| Download URL | diff_hdx-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5324f497f8a3b6ce454e4e051b503a5e2b0d650640f64e127f9d3344d9286e48
|
|
BLAKE2b-256 checksum How to use checksums |
122581bf93d291f4c0578989e3d88d7a6ea810fcc3d5d9718c991c96fa5e9f17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.
Transparency logSecurity for diff-hdx 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for diff_hdx-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.