Skip to main content

Differentiable HDX-MS prediction in JAX

Project description

🧪 diff-hdx: Differentiable HDX-MS Prediction in JAX

Tests License: MIT 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.

🏗️ 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

  • Initial differentiable SASA and $ln P$ kernels.
  • Integration with JAX vmap for 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., 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 — 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/diff-hdx},
  version = {0.1.0}
}

⚖️ License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diff_hdx-0.1.1.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diff_hdx-0.1.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file diff_hdx-0.1.1.tar.gz.

File metadata

  • Download URL: diff_hdx-0.1.1.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for diff_hdx-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9da597c76e8559a788841f7d07f26c8fa1633d86ea7bfb4dd1ed767114a8ebef
MD5 3d0bf40c679b079157d88a546842089f
BLAKE2b-256 e185dc9b431581b81ab2faad849b0090974e7374561bc50ca6dbf45480b83b6f

See more details on using hashes here.

File details

Details for the file diff_hdx-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: diff_hdx-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for diff_hdx-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 42a258d0ee4e3e776edfe009d09036d07bbcb16896084942a0269785665af6da
MD5 8e00e61ca1d7132204e680133738bf26
BLAKE2b-256 4c97937e02e8f6b3395755d7c89e7f54085d433b5421ae580bc4b68e78c1b36f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page