Cryo-EM Ensemble Optimization using JAX and OpenMM for Molecular Dynamics simulations.
Project description
Cryo-electron microscopy ensemble optimization using individual particles and physical constraints
Summary
CryoJAX ensemble optimization is a module of the cryoJAX library, a JAX and Equinox-based library for differentiable cryo-EM forward models. The purpose of this library is to provide a framework for optimizing structural ensembles, defined as a weighted discrete set of atomic structures, given a set of cryo-EM images. To do this, we implement an algorithm inspired by projected gradient descent, where the optimization step is performed by comparing the ensemble to the cryo-EM dataset, and the projection step is done through Steered Molecular Dynamics using the popular OpenMM library. Details and results are available in our preprint. Instructions for reproducing the paper results are provided below.
Installation
Our library has been tested on the latest Ubuntu version. Availability for other platforms is dependent on the availability of OpenMM and JAX.
CPU Installation
Our library can be installed to be used with a CPU via pip.
pip install cryojax_eo
We recommend using a freshly created virtual environment to install our library. A CPU installation is only recommended for dataset simulation, as OpenMM is built for GPU, and simulations will take a long time if run on CPU.
GPU Installation
We recommend installing our library using conda (or one of its variants), as matching JAX's and OpenMM's CUDA versions can be difficult otherwise. Here we show an example of how to install our library with mamba:
mamba create -n cryojax_eo_env python==3.11
mamba activate cryojax_eo_env
mamba install -c conda-forge openmm cuda-version==12.4 # Insert your cuda version!
pip install --upgrade "jax[cuda12]"
pip install cryojax_eo
To find your CUDA version, you can run nvidia-smi in a terminal. The CUDA version will appear in the top right corner of the output.
Cryo-EM Ensemble Optimization Input
See the input documentation
Cryo-EM heterogeneous dataset simulation
See the input documentation
Reproducing Paper Results
All the necessary data, atomic models, config files, and instructions to reproduce our results are available in Zenodo.
Contact
Please submit any bug reports, feature requests, or general feedback as a GitHub issue or discussion.
Contributing
If you are contributing to this project, please install the package with the following command:
pip install -e ".[dev]"
This will install the required dependencies for development, the most important being Ruff and pre-commit. After installation, activate your environment and install the pre-commit hooks by running
pre-commit install
Make sure that your code is formatted according to our guidelines by running:
pre-commit run --all-files
This will make sure the code is formatted correctly, fix whatever can be automatically fixed, and tell you if something else needs to be fixed.
Acknowledgements
We thank Michael O'Brien, Miro Astore, Lars Dingeldein, Wai Shing Tang, Aaditya Rangan, and Sonya Hanson for helpful discussions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cryojax_eo-0.2.1.tar.gz.
File metadata
- Download URL: cryojax_eo-0.2.1.tar.gz
- Upload date:
- Size: 249.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ea5314b88290d1a12ead4903e04d814f310f16ca8721651d5d58ddc56c11c3b
|
|
| MD5 |
0e86fc9d4861295109f39d21e4d34950
|
|
| BLAKE2b-256 |
19cd6ed43955dc15cc474f19c5d395d0acc7c3573b543f7761f55d521ad27ef9
|
Provenance
The following attestation bundles were made for cryojax_eo-0.2.1.tar.gz:
Publisher:
publish.yml on flatironinstitute/cryojax-ensemble-optimization
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cryojax_eo-0.2.1.tar.gz -
Subject digest:
0ea5314b88290d1a12ead4903e04d814f310f16ca8721651d5d58ddc56c11c3b - Sigstore transparency entry: 1189440139
- Sigstore integration time:
-
Permalink:
flatironinstitute/cryojax-ensemble-optimization@e0135de4867f75a84824091a2e192361b69bee72 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/flatironinstitute
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e0135de4867f75a84824091a2e192361b69bee72 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cryojax_eo-0.2.1-py3-none-any.whl.
File metadata
- Download URL: cryojax_eo-0.2.1-py3-none-any.whl
- Upload date:
- Size: 78.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8e3b0cddf6efcd0cfc951f934d053c56cd5133e5bc048fbfbc22ee7309ac3f6
|
|
| MD5 |
029b60fd51af8828ef84b5b77d75b78e
|
|
| BLAKE2b-256 |
c616ded4a3a922afacf5427469a4f9d04862ce97cb6452e896f7e73dd676ae72
|
Provenance
The following attestation bundles were made for cryojax_eo-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on flatironinstitute/cryojax-ensemble-optimization
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cryojax_eo-0.2.1-py3-none-any.whl -
Subject digest:
f8e3b0cddf6efcd0cfc951f934d053c56cd5133e5bc048fbfbc22ee7309ac3f6 - Sigstore transparency entry: 1189440142
- Sigstore integration time:
-
Permalink:
flatironinstitute/cryojax-ensemble-optimization@e0135de4867f75a84824091a2e192361b69bee72 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/flatironinstitute
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e0135de4867f75a84824091a2e192361b69bee72 -
Trigger Event:
release
-
Statement type: