GithubHelp home page GithubHelp logo

rajdandekar / catalyst.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sciml/catalyst.jl

0.0 0.0 0.0 2.65 MB

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

Home Page: https://catalyst.sciml.ai

License: Other

Julia 99.41% TeX 0.59%

catalyst.jl's Introduction

Catalyst.jl

Join the chat at https://gitter.im/JuliaDiffEq/Lobby Build Status Coverage Status codecov.io

Stable API Stable Dev API Dev

Note for pre-version 5 users: Version 5 is a breaking release, with the DSL now generating ModelingToolkit.ReactionSystems and DiffEqBiological being renamed to Catalyst. As such, the @reaction_network macro no longer allows the generation of custom types. Please see the updated documentation to understand changes to the API and functionality. In particular, the earlier bifurcation functionality has not yet been updated to the new system. If you rely on this functionality please do not update at this time, or consider using BifurcationKit.jl.

Catalyst.jl is a domain specific language (DSL) for high performance simulation and modeling of chemical reaction networks. Catalyst utilizes ModelingToolkit ReactionSystems, leveraging ModelingToolkit to enable large-scale simulations through auto-vectorization and parallelism. 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 SciML ecosystem, including higher level SciML packages (e.g. for sensitivity analysis, parameter estimation, machine learning applications, etc).

Tutorials and Documentation

For information on using the package, see the stable documentation. The in-development documentation describes unreleased features in the current master branch.

Features

  • DSL provides a simple and readable format for manually specifying chemical reactions.
  • The Catalyst.jl API provides functionality for extending networks, building networks programmatically, and for composing multiple networks together.
  • ReactionSystems generated by the DSL can be converted to a variety of ModelingToolkit.AbstractSystems, including ODE, SDE and jump process representations.
  • By leveraging ModelingToolkit, users have a variety of options for generating optimized system representations to use in solvers. These include construction of dense or sparse Jacobians, multithreading or parallelization of generated derivative functions, automatic classification of reactions into optimized jump types for Gillespie type simulations, automatic construction of dependency graphs for jump systems, and more.
  • Generated systems can be solved using any DifferentialEquations.jl ODE/SDE/jump solver, and can be used within EnsembleProblems for carrying out GPU-parallelized parameter sweeps and statistical sampling. Plot recipes are available for visualizing the solutions.
  • Julia Exprs can be obtained for all rate laws and functions determining the deterministic and stochastic terms within resulting ODE, SDE or jump models.
  • Latexify can be used to generate LaTeX expressions corresponding to generated mathematical models or the underlying set of reactions.
  • Graphviz can be used through Catlab.jl to generate and visualize reaction network graphs.

Illustrative Examples

Gillespie Simulations of Michaelis-Menten Enzyme Kinetics

rs = @reaction_network begin
  c1, S + E --> SE
  c2, SE --> S + E
  c3, SE --> P + E
end c1 c2 c3
p = (0.00166,0.0001,0.1)   # [c1,c2,c3]
tspan = (0., 100.)
u0 = [301., 100., 0., 0.]  # [S,E,SE,P]

# solve JumpProblem
dprob = DiscreteProblem(rs, u0, tspan, p)
jprob = JumpProblem(rs, dprob, Direct())
jsol = solve(jprob, SSAStepper())
plot(jsol,lw=2,title="Gillespie: Michaelis-Menten Enzyme Kinetics")

Adaptive SDEs for A Birth-Death Process

using Catalyst, Plots, StochasticDiffEq, DiffEqJump
rs = @reaction_network begin
  c1, X --> 2X
  c2, X --> 0
  c3, 0 --> X
end c1 c2 c3
p = (1.0,2.0,50.) # [c1,c2,c3]
tspan = (0.,10.)
u0 = [5.]         # [X]
sprob = SDEProblem(rs, u0, tspan, p)
ssol  = solve(sprob, LambaEM(), reltol=1e-3)
plot(ssol,lw=2,title="Adaptive SDE: Birth-Death Process")

catalyst.jl's People

Contributors

torkele avatar isaacsas avatar chrisrackauckas avatar github-actions[bot] avatar korsbo avatar devmotion avatar alanderos91 avatar spcornelius avatar weilandtd avatar scottpjones avatar femtocleaner[bot] avatar zlatanvasovic avatar asinghvi17 avatar staticfloat avatar juliatagbot avatar matbesancon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.