Skip to content

elkins-lab/synth-cryo-em

Repository files navigation

synth-cryo-em

PyPI version Python versions License: MIT Tests Documentation Ruff Checked with mypy codecov

A lightweight Pythonic utility to convert atomic models (PDB/CIF) into synthetic 3D Cryo-EM maps with realistic noise, CTF effects and varying resolutions.

🌟 Features

  • Voxelize atomic models with accurate resolution simulation.
  • Simulate Physics: Apply Contrast Transfer Functions (CTF) and envelope functions.
  • Noise Modeling: Add adjustable Gaussian noise to simulate low-SNR experimental data.
  • Standard Format: Export results to MRC files compatible with RELION, ChimeraX, and other tools.

🚀 Quick Start

Installation

pip install synth-cryo-em

Basic Generation

synth-cryo-em structure.pdb output.mrc --resolution 4.0

Realistic Simulation

synth-cryo-em structure.pdb output.mrc --resolution 3.5 --apply-physics --snr 5

📚 Tutorials

Explore the project's functionality interactively via our Jupyter notebooks:

  • Interactive Physics & Visualization: Explore how resolution, noise (SNR), and CTF effects change the visual features of a map in 3D. Open In Colab
  • Core API Walkthrough: A step-by-step guide to using the Python API for custom workflows. Open In Colab

📖 Documentation

For detailed guides and API reference, visit the Documentation Site.

🛠️ Development

To install for development and documentation:

pip install -e ".[test,docs]"

Run tests:

pytest tests/

Build docs locally:

mkdocs serve

Related Projects

This library is part of the synth-pdb ecosystem:

Contributing

Contributions are welcome! Please open an issue or pull request on GitHub. Run pre-commit run --all-files before submitting.

License

MIT License — see LICENSE for details.

Citation

@software{synth_cryo_em,
  author  = {Elkins, George},
  title   = {synth-cryo-em: Synthetic cryo-EM map generation from atomic models},
  year    = {2026},
  url     = {https://github.com/elkins-lab/synth-cryo-em},
  version = {0.1.3}
}

About

Generate realistic synthetic 3D Cryo-EM densities from structural models for testing algorithms and training ML models.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors