{"id":51310352,"url":"https://github.com/elkins-lab/diff-em","last_synced_at":"2026-07-01T03:02:58.682Z","repository":{"id":362590385,"uuid":"1259892529","full_name":"elkins-lab/diff-em","owner":"elkins-lab","description":"Differentiable Cryo-EM map fitting in JAX","archived":false,"fork":false,"pushed_at":"2026-06-30T21:11:29.000Z","size":735,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-30T22:24:04.602Z","etag":null,"topics":["biophysics","computational-biophysics","computational-structural-biology","cryo-em","differentiable-programming","jax","structural-biology"],"latest_commit_sha":null,"homepage":"https://elkins-lab.github.io/diff-em/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elkins-lab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-05T00:59:46.000Z","updated_at":"2026-06-30T21:09:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/elkins-lab/diff-em","commit_stats":null,"previous_names":["elkins/diff-em","elkins-lab/diff-em"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/elkins-lab/diff-em","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkins-lab%2Fdiff-em","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkins-lab%2Fdiff-em/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkins-lab%2Fdiff-em/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkins-lab%2Fdiff-em/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elkins-lab","download_url":"https://codeload.github.com/elkins-lab/diff-em/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkins-lab%2Fdiff-em/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34990846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["biophysics","computational-biophysics","computational-structural-biology","cryo-em","differentiable-programming","jax","structural-biology"],"created_at":"2026-07-01T03:02:57.679Z","updated_at":"2026-07-01T03:02:58.673Z","avatar_url":"https://github.com/elkins-lab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ❄️ diff-em: Differentiable Cryo-EM Fitting in JAX\n\n[![Tests](https://github.com/elkins-lab/diff-em/actions/workflows/test.yml/badge.svg)](https://github.com/elkins-lab/diff-em/actions/workflows/test.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![JAX](https://img.shields.io/badge/backend-JAX-9cf.svg)](https://github.com/google/jax)\n\n**diff-em** provides high-performance, auto-differentiable kernels for fitting atomic structures into Cryo-EM density maps. Built on **JAX**, it enables gradient-based optimization of coordinates directly against 3D experimental data.\n\n---\n\n## 🎯 Features\n\n- **Gaussian Mixture Volumes:** Represent atomic models as differentiable 3D density maps using sum-of-Gaussians (electrostatic potential approximation).\n- **Cross-Correlation Kernels:** Differentiable computation of map-to-model correlation coefficients (CC) for structural refinement (Rossmann, 2000).\n- **Optimization Strategy:** Compatible with multi-resolution fitting and neural density fields (Zhong et al., 2021).\n- **Hardware Acceleration:** Optimized for GPU/TPU execution via XLA, enabling the fitting of large complexes in seconds.\n\n---\n\n## 📚 Tutorials\n\nExperience **diff-em** directly in your browser:\n\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/elkins-lab/diff-em/blob/main/examples/interactive_tutorials/cryo_em_fitting_tutorial.ipynb) **Cryo-EM Density Fitting** — Learn how to optimize atomic coordinates directly against 3D density maps using cross-correlation.\n\n---\n\n## 🏗️ Technical Architecture\n\n- **Backend:** JAX (XLA-compiled).\n- **Physics:** 3D Gaussian placement with B-factor smoothing.\n- **Optimization:** Pure JAX implementation compatible with `optax` for high-dimensional gradient descent.\n\n---\n\n## 🧪 Scientific Validation\n\n- **Density Parity:** Simulated densities are verified against standard EM map generation tools (e.g., `gemmi` or `ChimeraX`).\n- **CC Gradient Stability:** Verified numerically stable gradients for structural refinement in the presence of noise.\n- **Resolution Limits:** Benchmarked against known high-resolution and low-resolution experimental maps.\n\n---\n\n## 🚀 Roadmap\n\n- [x] Differentiable 3D Gaussian density kernels.\n- [x] Cross-correlation (CC) loss functions.\n- [ ] Integration with MRC map loaders.\n- [ ] Automated multi-resolution refinement schedules.\n\n---\n\n## 🔗 Related Projects\n\ndiff-em is part of the **differentiable biophysics** ecosystem:\n\n- [diff-biophys](https://github.com/elkins-lab/diff-biophys) — Core differentiable biophysics engine.\n- [diff-hdx](https://github.com/elkins-lab/diff-hdx) — Differentiable HDX-MS prediction.\n- [synth-cryo-em](https://github.com/elkins-lab/synth-cryo-em) — Cryo-EM simulation.\n\n---\n\n## 📖 Citation\n\n```bibtex\n@software{diff_em,\n  author  = {Elkins, George},\n  title   = {diff-em: Differentiable Cryo-EM map fitting in JAX},\n  year    = {2026},\n  url     = {https://github.com/elkins-lab/diff-em},\n  version = {0.1.2}\n}\n```\n\n## ⚖️ License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felkins-lab%2Fdiff-em","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felkins-lab%2Fdiff-em","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felkins-lab%2Fdiff-em/lists"}