Catalyst

Chemical reaction network and systems biology interface for scientific machine learning (SciML). High performance, GPU-parallelized, and O(1) solvers in open source software.

https://github.com/sciml/catalyst.jl

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
    Links to: plos.org
  • Committers with academic emails
    14 of 54 committers (25.9%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.8%) to scientific vocabulary

Keywords

biology chemical-reactions differential-equations dsl gillespie-algorithm julia ode rate-laws reaction-network scientific-machine-learning sciml sde simulation systems-biology systems-biology-simulation

Keywords from Contributors

symbolic-computation neural-sde pde stochastic-differential-equations ordinary-differential-equations dde delay-differential-equations dae neural-ode differentialequations
Last synced: 6 months ago · JSON representation ·

Repository

Chemical reaction network and systems biology interface for scientific machine learning (SciML). High performance, GPU-parallelized, and O(1) solvers in open source software.

Basic Info
Statistics
  • Stars: 494
  • Watchers: 14
  • Forks: 80
  • Open Issues: 126
  • Releases: 132
Topics
biology chemical-reactions differential-equations dsl gillespie-algorithm julia ode rate-laws reaction-network scientific-machine-learning sciml sde simulation systems-biology systems-biology-simulation
Created about 9 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Citation

README.md

Catalyst.jl

Latest Release (for users) API Latest Release (for users) Master (for developers) API Master (for developers <!--Join the chat at https://julialang.zulipchat.com #sciml-bridged-->

Build Status codecov.io Coverage Status

ColPrac: Contributor's Guide on Collaborative Practices for Community Packages SciML Code Style Citation

Catalyst.jl is a symbolic modeling package for analysis and high-performance simulation of chemical reaction networks. Catalyst defines symbolic ReactionSystems, which can be created programmatically or easily specified using Catalyst's domain-specific language (DSL). Leveraging ModelingToolkit.jl and Symbolics.jl, Catalyst enables large-scale simulations through auto-vectorization and parallelism. Symbolic ReactionSystems can be used to generate ModelingToolkit-based models, allowing the easy simulation and parameter estimation of mass action ODE models, Chemical Langevin SDE models, stochastic chemical kinetics jump process models, and more. Generated models can be used with solvers throughout the broader Julia and SciML ecosystems, including higher-level SciML packages (e.g. for sensitivity analysis, parameter estimation, machine learning applications, etc).

Installation

Catalyst can be installed as follows. ```julia using Pkg

(optional but recommended) create new environment in which to install Catalyst

Pkg.activate("catalyst_environment")

install latest Catalyst release

Pkg.add("Catalyst") ```

Breaking changes and new features

NOTE: Version 15 is a breaking release, though most breaking changes are likely to only impact libraries being developed on top of Catalyst. Please see the HISTORY.md file for a summary of breaking changes and new functionality.

Tutorials and documentation

The latest tutorials and information on using Catalyst are available in the stable documentation. The in-development documentation describes unreleased features in the current master branch.

An overview of the package, its features, and comparative benchmarking (as of version 13) can also be found in its corresponding research paper, Catalyst: Fast and flexible modeling of reaction networks.

Features

Features of Catalyst

Features of Catalyst composing with other packages

Features of packages built upon Catalyst

Illustrative example

Deterministic ODE simulation of Michaelis-Menten enzyme kinetics

Here we show a simple example where a model is created using the Catalyst DSL, and then simulated as an ordinary differential equation.

```julia

Fetch required packages.

using Catalyst, OrdinaryDiffEqDefault, Plots

Create model.

model = @reaction_network begin kB, S + E --> SE kD, SE --> S + E kP, SE --> P + E end

Create an ODE that can be simulated.

u0 = [:S => 50.0, :E => 10.0, :SE => 0.0, :P => 0.0] tspan = (0., 200.) ps = [:kB => 0.01, :kD => 0.1, :kP => 0.1] ode = ODEProblem(model, u0, tspan, ps)

Simulate ODE and plot results.

sol = solve(ode) plot(sol; lw = 5) ``` ODE simulation

Stochastic jump simulations

The same model can be used as input to other types of simulations. E.g. here we instead generate and simulate a stochastic chemical kinetics jump process model for the reaction network. An exact realization of the jump process is sampled using an auto-selected stochastic simulation algorithm (SSA) (which for the small network in the current example ends up being Gillespie's Direct method): ```julia

The initial conditions are now integers as we track exact populations for each species.

using JumpProcesses u0integers = [:S => 50, :E => 10, :SE => 0, :P => 0] jinput = JumpInputs(model, u0integers, tspan, ps) jprob = JumpProblem(jinput) jumpsol = solve(jprob) plot(jumpsol; lw = 2) ``` Jump simulation

More elaborate example

In the above example, we used basic Catalyst workflows to simulate a simple model. Here we instead show how various Catalyst features can compose to create a much more advanced model. Our model describes how the volume of a cell ($V$) is affected by a growth factor ($G$). The growth factor only promotes growth while in its phosphorylated form ($G^P$). The phosphorylation of $G$ ($G \to G^P$) is promoted by sunlight, which is modeled as the cyclic sinusoid $ka (\sin(t) + 1)$. When the cell reaches a critical volume ($Vm$) it undergoes cell division. First, we declare our model: julia using Catalyst cell_model = @reaction_network begin @parameters Vₘ g @equations begin D(V) ~ g*Gᴾ end @continuous_events begin [V ~ Vₘ] => [V ~ V/2] end kₚ*(sin(t)+1)/V, G --> Gᴾ kᵢ/V, Gᴾ --> G end We now study the system as a Chemical Langevin Dynamics SDE model, which can be generated as follows julia u0 = [:V => 25.0, :G => 50.0, :Gᴾ => 0.0] tspan = (0.0, 20.0) ps = [:Vₘ => 50.0, :g => 0.3, :kₚ => 100.0, :kᵢ => 60.0] sprob = SDEProblem(cell_model, u0, tspan, ps) This problem encodes the following stochastic differential equation model: math \begin{align*} dG(t) &= - \left( \frac{k_p(\sin(t)+1)}{V(t)} G(t) + \frac{k_i}{V(t)} G^P(t) \right) dt - \sqrt{\frac{k_p (\sin(t)+1)}{V(t)} G(t)} \, dW_1(t) + \sqrt{\frac{k_i}{V(t)} G^P(t)} \, dW_2(t) \\ dG^P(t) &= \left( \frac{k_p(\sin(t)+1)}{V(t)} G(t) - \frac{k_i}{V(t)} G^P(t) \right) dt + \sqrt{\frac{k_p (\sin(t)+1)}{V(t)} G(t)} \, dW_1(t) - \sqrt{\frac{k_i}{V(t)} G^P(t)} \, dW_2(t) \\ dV(t) &= \left(g \, G^P(t)\right) dt \end{align*} where the $dW1(t)$ and $dW2(t)$ terms represent independent Brownian Motions, encoding the noise added by the Chemical Langevin Equation. Finally, we can simulate and plot the results. julia using StochasticDiffEq, Plots sol = solve(sprob, EM(); dt = 0.05) plot(sol; xguide = "Time (au)", lw = 2) Elaborate SDE simulation

Some features we used here: - The cell volume was modeled as a differential equation, which was coupled to the reaction network model. - The cell divisions were created by incorporating events into the model. - We designated a specific numeric solver and corresponding solver options. - The model simulation was plotted using Plots.jl.

Getting help or getting involved

Catalyst developers are active on the Julia Discourse and the Julia Slack channels #sciml-bridged and #sciml-sysbio. For bugs or feature requests, open an issue.

Supporting and citing Catalyst.jl

The software in this ecosystem was developed as part of academic research. If you would like to help support it, please star the repository as such metrics may help us secure funding in the future. If you use Catalyst as part of your research, teaching, or other activities, we would be grateful if you could cite our work: @article{CatalystPLOSCompBio2023, doi = {10.1371/journal.pcbi.1011530}, author = {Loman, Torkel E. AND Ma, Yingbo AND Ilin, Vasily AND Gowda, Shashi AND Korsbo, Niklas AND Yewale, Nikhil AND Rackauckas, Chris AND Isaacson, Samuel A.}, journal = {PLOS Computational Biology}, publisher = {Public Library of Science}, title = {Catalyst: Fast and flexible modeling of reaction networks}, year = {2023}, month = {10}, volume = {19}, url = {https://doi.org/10.1371/journal.pcbi.1011530}, pages = {1-19}, number = {10}, }

Owner

  • Name: SciML Open Source Scientific Machine Learning
  • Login: SciML
  • Kind: organization
  • Email: contact@chrisrackauckas.com

Open source software for scientific machine learning

Citation (CITATION.bib)

@article{CatalystPLOSCompBio2023,
    doi = {10.1371/journal.pcbi.1011530},
    author = {Loman, Torkel E. AND Ma, Yingbo AND Ilin, Vasily AND Gowda, Shashi AND Korsbo, Niklas AND Yewale, Nikhil AND Rackauckas, Chris AND Isaacson, Samuel A.},
    journal = {PLOS Computational Biology},
    publisher = {Public Library of Science},
    title = {Catalyst: Fast and flexible modeling of reaction networks},
    year = {2023},
    month = {10},
    volume = {19},
    url = {https://doi.org/10.1371/journal.pcbi.1011530},
    pages = {1-19},
    abstract = {We introduce Catalyst.jl, a flexible and feature-filled Julia library for modeling and high-performance simulation of chemical reaction networks (CRNs). Catalyst supports simulating stochastic chemical kinetics (jump process), chemical Langevin equation (stochastic differential equation), and reaction rate equation (ordinary differential equation) representations for CRNs. Through comprehensive benchmarks, we demonstrate that Catalyst simulation runtimes are often one to two orders of magnitude faster than other popular tools. More broadly, Catalyst acts as both a domain-specific language and an intermediate representation for symbolically encoding CRN models as Julia-native objects. This enables a pipeline of symbolically specifying, analyzing, and modifying CRNs; converting Catalyst models to symbolic representations of concrete mathematical models; and generating compiled code for numerical solvers. Leveraging ModelingToolkit.jl and Symbolics.jl, Catalyst models can be analyzed, simplified, and compiled into optimized representations for use in numerical solvers. Finally, we demonstrate Catalyst’s broad extensibility and composability by highlighting how it can compose with a variety of Julia libraries, and how existing open-source biological modeling projects have extended its intermediate representation.},
    number = {10},

}

@misc{ma2021modelingtoolkit,
      title={ModelingToolkit: A Composable Graph Transformation System For Equation-Based Modeling},
      author={Yingbo Ma and Shashi Gowda and Ranjan Anantharaman and Chris Laughman and Viral Shah and Chris Rackauckas},
      year={2021},
      eprint={2103.05244},
      archivePrefix={arXiv},
      primaryClass={cs.MS}
}

@article{DifferentialEquations.jl-2017,
 author = {Rackauckas, Christopher and Nie, Qing},
 doi = {10.5334/jors.151},
 journal = {The Journal of Open Research Software},
 keywords = {Applied Mathematics},
 note = {Exported from https://app.dimensions.ai on 2019/05/05},
 number = {1},
 pages = {},
 title = {DifferentialEquations.jl – A Performant and Feature-Rich Ecosystem for Solving Differential Equations in Julia},
 url = {https://app.dimensions.ai/details/publication/pub.1085583166 and http://openresearchsoftware.metajnl.com/articles/10.5334/jors.151/galley/245/download/},
 volume = {5},
 year = {2017}
}

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 4,596
  • Total Committers: 54
  • Avg Commits per committer: 85.111
  • Development Distribution Score (DDS): 0.483
Past Year
  • Commits: 1,174
  • Committers: 14
  • Avg Commits per committer: 83.857
  • Development Distribution Score (DDS): 0.547
Top Committers
Name Email Commits
Torkel t****n@g****m 2,376
Sam Isaacson i****s 1,235
vyudu v****n@g****m 321
Christopher Rackauckas a****s@c****m 167
Lalit Chauhan l****y@g****m 91
Nikhil Yewale y****5@g****m 69
Torkel Loman T****n@s****k 61
Niklas Korsbo n****o@s****k 40
Jonathan Fischer PEPE j****7@j****u 35
CompatHelper Julia c****y@j****g 28
github-actions[bot] 4****] 27
Aayush Sabharwal a****l@g****m 12
Shashi Gowda g****a@m****u 11
dependabot[bot] 4****] 8
sivasathyaseeelan d****1@i****n 8
Arno Strouwen a****n@t****e 8
Laura Brustenga i Moncusí b****t@m****k 7
vydu v****u@u****u 6
David Widmann d****t@d****e 6
Lewis Grozinger l****2@n****k 5
Yingbo Ma m****5@g****m 5
sebapersson s****1@g****m 5
Lucas Morton 2****n 4
Andreas Noack a****s@n****k 4
sophie strey s****y@g****m 4
zdroid z****c@g****m 3
Alfonso Landeros a****s@u****u 3
Niklas Korsbo n****o@g****m 3
Sean P. Cornelius s****s@g****m 3
eliascarv 7****v 3
and 24 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 238
  • Total pull requests: 640
  • Average time to close issues: 8 months
  • Average time to close pull requests: 21 days
  • Total issue authors: 51
  • Total pull request authors: 30
  • Average comments per issue: 6.11
  • Average comments per pull request: 2.66
  • Merged pull requests: 428
  • Bot issues: 0
  • Bot pull requests: 121
Past Year
  • Issues: 74
  • Pull requests: 307
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 10 days
  • Issue authors: 21
  • Pull request authors: 15
  • Average comments per issue: 4.22
  • Average comments per pull request: 2.31
  • Merged pull requests: 205
  • Bot issues: 0
  • Bot pull requests: 57
Top Authors
Issue Authors
  • isaacsas (105)
  • TorkelE (66)
  • vyudu (7)
  • ChrisRackauckas (5)
  • jonathanfischer97 (4)
  • devmotion (3)
  • sebapersson (3)
  • spackman (3)
  • gaurav-arya (2)
  • sivasathyaseeelan (2)
  • johannesnauta (2)
  • joegilkes (2)
  • lockwo (2)
  • yewalenikhil65 (2)
  • elbert5770 (2)
Pull Request Authors
  • TorkelE (419)
  • isaacsas (172)
  • github-actions[bot] (147)
  • vyudu (50)
  • ChrisRackauckas (29)
  • dependabot[bot] (14)
  • AayushSabharwal (13)
  • sivasathyaseeelan (5)
  • tstrey (5)
  • thazhemadam (5)
  • ArnoStrouwen (5)
  • jonathanfischer97 (5)
  • LalitChauhan56 (4)
  • sebapersson (4)
  • spaette (3)
Top Labels
Issue Labels
bug (67) V14 blocker (12) question (6) high priority (3) enhancement (2) good first issue (1) V15 blocker (1)
Pull Request Labels
documentation (17) dependencies (14) new section (9) proposed updates (6) src (3) github_actions (3) new example (2) comment additions (1) tests (1)

Packages

  • Total packages: 1
  • Total downloads:
    • julia 298 total
  • Total dependent packages: 17
  • Total dependent repositories: 0
  • Total versions: 90
juliahub.com: Catalyst

Chemical reaction network and systems biology interface for scientific machine learning (SciML). High performance, GPU-parallelized, and O(1) solvers in open source software.

  • Versions: 90
  • Dependent Packages: 17
  • Dependent Repositories: 0
  • Downloads: 298 Total
Rankings
Stargazers count: 2.0%
Forks count: 2.4%
Average: 4.9%
Dependent packages count: 5.4%
Dependent repos count: 9.9%
Last synced: 6 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/cache v3 composite
  • actions/checkout v4 composite
  • codecov/codecov-action v3 composite
  • coverallsapp/github-action master composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CompatHelper.yml actions
  • julia-actions/setup-julia v1 composite
.github/workflows/Documentation.yml actions
  • actions/checkout v4 composite
  • codecov/codecov-action v3 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/setup-julia latest composite
.github/workflows/FormatCheck.yml actions
  • actions/checkout v4 composite
  • julia-actions/setup-julia latest composite
.github/workflows/Invalidations.yml actions
  • actions/checkout v4 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-invalidations v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite