https://github.com/voduchuy/numcme.jl
Direct solution of the Chemical Master Equation in Julia.
https://github.com/voduchuy/numcme.jl
chemical-master-equation finite-state-projection numerical-analysis stochastic-reaction-networks
Last synced: 3 months ago
JSON representation
Direct solution of the Chemical Master Equation in Julia.
- Host: GitHub
- URL: https://github.com/voduchuy/numcme.jl
- Owner: voduchuy
- License: mit
- Created: 2022-02-23T06:04:18.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-29T00:58:04.000Z (about 2 years ago)
- Last Synced: 2025-10-21T12:48:32.224Z (3 months ago)
- Topics: chemical-master-equation, finite-state-projection, numerical-analysis, stochastic-reaction-networks
- Language: Julia
- Homepage:
- Size: 594 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NumCME.jl
[](https://voduchuy.github.io/NumCME.jl/dev/)
An extensible toolkit for direct numerical solution of the Chemical Master Equation based on the [Finite State Projection](https://www.atmos.colostate.edu/~munsky/Papers/JChemPhys_124_044104.pdf) and related algorithms.
## Features
This package aims to offer dynamic, fast, and customizable methods for direct numerical integration of the Chemical Master Equation (CME) in Julia. Currently, it has:
- Transient solution of the CME for time-homogeneous reaction rates/propensities as well as time-varying reaction rates/propensities using Finite State Projection and related variants.
- Dynamic state spaces: The truncated state space is adapted on-the-fly to remove redundant states with low probabilities and add more states to ensure the truncation error is within user-specified tolerance.
- Customizable: Users can choose how the dynamic state space is managed (by specifying parameters for existing `SpaceAdapter` subtypes or write their own `SpaceAdapter`) and how the reduced ODEs are solved (by choosing one among the multitude options offered by [`DifferentialEquations.jl`](https://github.com/SciML/DifferentialEquations.jl)). Advanced users can write their own dynamic state space management policy by subtyping `SpaceAdapter`.
- Sensitivity analysis: Compute partial derivatives of the FSP solution with respect to model parameters. Users do not need to write analytic expressions of the propensity's partial derivatives. Instead, the package applies existing tools from [`ModelingToolkit.jl`](https://github.com/SciML/ModelingToolkit.jl) and [`ForwardDiff.jl`](https://github.com/JuliaDiff/ForwardDiff.jl) to generate those derivatives automatically.
- Accept reaction systems defined using [`Catalyst.jl`](https://catalyst.sciml.ai/dev/) DSL.
## Installation
This package can be installed using Julia's package management. For the last stable version from the General Registry,
```julia
import Pkg; Pkg.add("NumCME")
```
For the latest commit on this repository,
```julia
import Pkg; Pkg.add("https://github.com/voduchuy/NumCME.jl")
```
## Possible improvements
- [ ] Implement more state space adaptation policy:
- [Sliding windows](https://bmcsystbiol.biomedcentral.com/articles/10.1186/1752-0509-4-42).
- [SSA-driven state space](https://doi.org/10.1016/j.mbs.2015.08.010).
- [Multi-finite buffer](http://gila.bioe.uic.edu/lab/papers/2016/ACME-CaoTerebusLiang-2016.pdf).
- [ ] Implement additional [methods](https://doi.org/10.1063/1.4994917) based on Tensor-train approximations.
- [ ] [Stationary FSP](https://pubmed.ncbi.nlm.nih.gov/29055349/).
- [ ] User-friendly support for computing the [Fisher Information Matrix](https://doi.org/10.1371/journal.pcbi.1006365) and optimal experiment design.