|
1 | 1 | # Breaking updates and feature summaries across releases
|
2 | 2 |
|
3 | 3 | ## Catalyst unreleased (master branch)
|
| 4 | +- The Catalyst release process is changing; certain core dependencies of |
| 5 | + Catalyst will now be capped to ensure Catalyst releases are only installed |
| 6 | + with versions of dependencies for which Catalyst CI and doc build tests pass |
| 7 | + (at the time the release is made). If you need a dependency version increased, |
| 8 | + please open an issue and we can update it and make a new Catalyst release once |
| 9 | + testing against the newer dependency version is complete. |
| 10 | +- Array symbolics support is more consistent with ModelingToolkit v9. Parameter |
| 11 | + arrays are no longer scalarized by Catalyst, while species and variables |
| 12 | + arrays still are (as in ModelingToolkit). As such, parameter arrays should now |
| 13 | + be specified as arrays in value mappings, i.e. |
| 14 | + ```julia |
| 15 | + @parameters k[1:4] |
| 16 | + pmap = [k => rand(4)] |
| 17 | + ``` |
| 18 | + While one can still manually scalarize a parameter array, it is recommended |
| 19 | + *not* to do this as it has signifcant performance costs with ModelingToolkit |
| 20 | + v9. Note, scalarized parameter arrays passed to the two-argument |
| 21 | + `ReactionSystem` constructor may become unscalarized. |
| 22 | +- Scoped species/variables/parameters are now treated similar to the latest MTK |
| 23 | + releases (≥ 9.49). |
| 24 | +- The structural identifiability extension is currently disabled due to issues |
| 25 | + StructuralIdentifiability has with Julia 1.10.5 and 1.11. |
| 26 | +- A tutorial on making interactive plot displays using Makie has been added. |
| 27 | +- The BifurcationKit extension has been updated to v.4. |
| 28 | +- There is a new DSL option `@require_declaration` that will turn off automatic inferring for species, parameters, and variables in the DSL. For example, the following will now error: |
| 29 | + ```julia |
| 30 | + rn = @reaction_network begin |
| 31 | + @require_declaration |
| 32 | + (k1, k2), A <--> B |
| 33 | + end |
| 34 | + ``` |
| 35 | + When this flag is set, all symbolics must be explicitly declared. |
| 36 | + ```julia |
| 37 | + rn = @reaction_network begin |
| 38 | + @species A(t) B(t) |
| 39 | + @parameters k1 k2 |
| 40 | + @require_declaration |
| 41 | + (k1, k2), A <--> B |
| 42 | + end |
| 43 | + ``` |
| 44 | +- Catalyst's network visualization capability has shifted from using Graphviz to [GraphMakie.jl](https://graph.makie.org/stable/). To use this functionality, load the GraphMakie extension by installing `Catalyst` and `GraphMakie`, along with a Makie backend like `GLMakie`. There are two new methods for visualizing graphs: `plot_network` and `plot_complexes`, which respectively display the species-reaction graph and complex graph. |
| 45 | + ```julia |
| 46 | + using Catalyst, GraphMakie, GLMakie |
| 47 | + brusselator = @reaction_network begin |
| 48 | + A, ∅ --> X |
| 49 | + 1, 2X + Y --> 3X |
| 50 | + B, X --> Y |
| 51 | + 1, X --> ∅ |
| 52 | + end |
| 53 | + plot_network(brusselator) |
| 54 | + ``` |
| 55 | + |
| 56 | +## Catalyst 14.4.1 |
| 57 | +- Support for user-defined functions on the RHS when providing coupled equations |
| 58 | + for CRNs using the @equations macro. For example, the following now works: |
| 59 | + ```julia |
| 60 | + using Catalyst |
| 61 | + f(A, t) = 2*A*t |
| 62 | + rn = @reaction_network begin |
| 63 | + @equations D(A) ~ f(A,t) |
| 64 | + end |
| 65 | + ``` |
| 66 | + Note that user-defined functions will not work on the LHS of equations. |
| 67 | + |
| 68 | +## Catalyst 14.4 |
| 69 | +- Symbolics 6 support. |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +## Catalyst 14.3 |
| 74 | +- Support for simulating stochastic chemical kinetics models with explicitly |
| 75 | + time-dependent propensities (i.e. where the resulting `JumpSystem` contains |
| 76 | + `VariableRateJump`s). As such `JumpProblem`s need to be defined over |
| 77 | + `ODEProblem`s or `SDEProblem`s instead of `DiscreteProblem`s we have |
| 78 | + introduced a new input struct, `JumpInputs`, that handles selecting via |
| 79 | + analysis of the generated `JumpSystem`, i.e. one can now say |
| 80 | + ```julia |
| 81 | + using Catalyst, OrdinaryDiffEq, JumpProcesses, Plots |
| 82 | + rn = @reaction_network begin |
| 83 | + k*(1 + sin(t)), 0 --> A |
| 84 | + end |
| 85 | + jinput = JumpInputs(rn, [:A => 0], (0.0, 10.0), [:k => .5]) |
| 86 | + # note that jinput.prob isa ODEProblem |
| 87 | + jprob = JumpProblem(jinput) |
| 88 | + sol = solve(jprob, Tsit5()) |
| 89 | + plot(sol, idxs = :A) |
| 90 | + |
| 91 | + rn = @reaction_network begin |
| 92 | + k, 0 --> A |
| 93 | + end |
| 94 | + jinput = JumpInputs(rn, [:A => 0], (0.0, 10.0), [:k => .5]) |
| 95 | + # note that jinput.prob isa DiscreteProblem |
| 96 | + jprob = JumpProblem(jinput) |
| 97 | + sol = solve(jprob) |
| 98 | + plot(sol, idxs = :A) |
| 99 | + ``` |
| 100 | + When calling solve for problems with explicit time-dependent propensities, |
| 101 | + i.e. where `jinput.prob isa ODEProblem`, note that one must currently |
| 102 | + explicitly select an ODE solver to handle time-stepping and integrating the |
| 103 | + time-dependent propensities. |
| 104 | +- Note that solutions to jump problems with explicit time-dependent |
| 105 | + propensities, i.e. a `JumpProblem` over an `ODEProblem`, require manual |
| 106 | + selection of the variables to plot. That is, currently `plot(sol)` will error |
| 107 | + in this case due to limitations in the SciMLBase plot recipe. |
| 108 | + |
| 109 | +## Catalyst 14.2 |
| 110 | +- Support for auto-algorithm selection in `JumpProblem`s. For systems with only |
| 111 | + propensities that do not have an explicit time-dependence (i.e. that are not |
| 112 | + `VariableRateJump`s in JumpProcesses), one can now run model simulations via |
| 113 | + ```julia |
| 114 | + using Catalyst, JumpProcesses |
| 115 | + model = @reaction_network begin |
| 116 | + kB, S + E --> SE |
| 117 | + kD, SE --> S + E |
| 118 | + kP, SE --> P + E |
| 119 | + end |
| 120 | + u0 = [:S => 50, :E => 10, :SE => 0, :P => 0] |
| 121 | + tspan = (0., 200.) |
| 122 | + ps = [:kB => 0.01, :kD => 0.1, :kP => 0.1] |
| 123 | + dprob = DiscreteProblem(model, u0, tspan, ps) |
| 124 | + jprob = JumpProblem(model, dprob) |
| 125 | + sol = solve(jprob) |
| 126 | + ``` |
| 127 | + For small systems this will just use Gillespie's `Direct` method, transitioning to using `RSSA` and `RSSACR` as system size increase. Once can still manually select a given SSA, but no longer needs to specify `SSAStepper` when calling `solve`, i.e. |
| 128 | + ```julia |
| 129 | + # use the SortingDirect method instead |
| 130 | + jprob = JumpProblem(model, dprob, SortingDirect()) |
| 131 | + sol = solve(jprob) |
| 132 | + ``` |
| 133 | +- Latexify recipe improvements including display fixes for array symbolics. |
| 134 | +- Deficiency one and concentration robustness checks. |
| 135 | + |
| 136 | +## Catalyst 14.1.1 |
| 137 | +The expansion of `ReactionSystem` models to spatial lattices has been enabled. Here follows a |
| 138 | +simple example where a Brusselator model is expanded to a 20x20 grid of compartments, with diffusion |
| 139 | +for species X, and then simulated using ODEs. Finally, an animation of the simulation is created. |
| 140 | +```julia |
| 141 | +using Catalyst, CairoMakie, OrdinaryDiffEq |
| 142 | + |
| 143 | +# Create `LatticeReactionSystem` model. |
| 144 | +brusselator = @reaction_network begin |
| 145 | + A, ∅ --> X |
| 146 | + 1, 2X + Y --> 3X |
| 147 | + B, X --> Y |
| 148 | + 1, X --> ∅ |
| 149 | +end |
| 150 | +diffusion_rx = @transport_reaction D X |
| 151 | +lattice = CartesianGrid((20,20)) |
| 152 | +lrs = LatticeReactionSystem(brusselator, [diffusion_rx], lattice) |
| 153 | + |
| 154 | +# Create a spatial `ODEProblem`. |
| 155 | +u0 = [:X => rand(20, 20), :Y => 10.0] |
| 156 | +tspan = (0.0, 40.0) |
| 157 | +ps = [:A => 1.0, :B => 4.0, :D => 0.2] |
| 158 | +oprob = ODEProblem(lrs, u0, tspan, ps) |
| 159 | + |
| 160 | +# Simulate the ODE and plot the results. |
| 161 | +sol = solve(oprob, FBDF()) |
| 162 | +lattice_animation(sol, :X, lrs, "brusselator.mp4") |
| 163 | +``` |
| 164 | +The addition of spatial modelling in Catalyst contains a large number of new features, all of which are |
| 165 | +described in the [corresponding documentation](https://docs.sciml.ai/Catalyst/stable/spatial_modelling/lattice_reaction_systems/). |
4 | 166 |
|
5 | 167 | ## Catalyst 14.0.1
|
6 |
| -Bug fix to address that independent variables, like time, should now be `@parameters` |
7 |
| -according to MTKv9. Converted internal time variables to consistently use `default_t()` |
| 168 | +Bug fix to address that independent variables, like time, should now be `@parameters` |
| 169 | +according to MTKv9. Converted internal time variables to consistently use `default_t()` |
8 | 170 | to hopefully avoid such issues going forward.
|
9 | 171 |
|
10 | 172 | ## Catalyst 14.0
|
|
0 commit comments