An interactive 2D intracellular calcium dynamics simulator with PyQt5/pyqtgraph GUI. Three source files: calcium_model.py (reaction-diffusion solver with stochastic IP3R gating, ER/mitochondria compartments), gui.py (tabbed visualization with overlay controls), and main.py (entry point). Includes three predefined cell state JSON files. Well-documented mathematical model with realistic biophysical parameters. Clean, focused codebase.
- Add
requirements.txt(PyQt5, pyqtgraph, numpy, scipy, scikit-image) - Add unit tests for
CalciumModel-- test diffusion kernel, SERCA flux calculation, IP3R gating statistics - Add input validation in
CalciumModel.__init__-- reject negative rates, zero grid sizes, dt > stability limit - Add numerical stability check -- warn if dt is too large relative to dx and diffusion coefficients (CFL condition)
- Add type hints throughout
calcium_model.pyandgui.py - Add a
--headlessmode inmain.pyfor running simulations without the GUI (save frames to TIFF) - Document the mathematical model in a separate
MODEL.mdwith equations and parameter references
- Add line profile tool -- draw a line on the image and plot Ca2+ concentration along it over time
- Implement IP3 uncaging simulation -- user clicks to release IP3 at specific locations
- Add NAADP-sensitive stores and lysosomal calcium release
- Implement SOCE (store-operated calcium entry) triggered by ER depletion
- Add ryanodine receptor (RyR) clusters for CICR modeling
- Support rectangular and non-circular cell geometries
- Add time-series recording -- plot Ca2+ at selected ROIs over simulation time
- Implement parameter sweep mode -- run multiple simulations with varying parameters and compare
- Add colormap selection and adjustable contrast in the GUI
- Extend to 3D simulation using volumetric rendering (vispy or VTK)
- Add multi-cell simulation with gap junction coupling
- Implement real cell morphologies from segmented microscopy images
- Create a model fitting tool -- optimize parameters to match experimental Ca2+ traces
- Add SBML/CellML model export for interoperability with other simulators
- Publish as a Napari plugin for integration with the imaging community
- Support GPU-accelerated diffusion using CuPy or JAX
-
calcium_model.pyhandles both simulation math and cell structure generation -- splitcreate_cell_structure()into a separatecell_geometry.py -
gui.pymixes visualization setup with simulation control logic -- extract a simulation controller -
__init__.pyre-exports from asrcsubpackage that does not exist in the current flat structure (fixed to package docstring) - The three JSON state files at the root should move into a
states/orconfigs/directory (moved toconfigs/) - No
.gitignorefor__pycache__/and generated outputs - No package metadata (
setup.pyorpyproject.toml) for installation (addedpyproject.toml)