You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Catalyst v14 was prompted by the (breaking) release of ModelingToolkit v9, which introduced several breaking changes to Catalyst. A summary of these (and how to handle them) can be found [here](https://docs.sciml.ai/Catalyst/stable/v14_migration_guide/). These are briefly summarised in the following bullet points:
9
-
-`ReactionSystem`s must now be marked *complete* before they are exposed to most forms of simulation and analysis. With the exception of `ReactionSystem`s created through the `@reaction_network` macro, all `ReactionSystem`s are *not* marked complete upon construction. The `complete` function can be used to mark `ReactionSystem`s as complete. To construct a `ReactionSystem` that is not marked complete via the DSL the new `@network_component` macro can be used.
10
-
- The `states` function has been replaced with `unknowns`. The `get_states` function has been replaced with `get_unknowns`.
11
-
- Support for most units (with the exception of `s`, `m`, `kg`, `A`, `K`, `mol`, and `cd`) has currently been dropped by ModelingToolkit, and hence they are unavailable via Catalyst too. Its is expected that eventually support for relevant chemical units such as molar will return to ModelingToolkit (and should then immediately work in Catalyst too).
12
-
- Problem parameter values are now accessed through `prob.ps[p]` (rather than `prob[p]`).
13
-
- A significant bug prevents the safe application of the `remake` function on problems for which `remove_conserved = true` was used when updating the values of initial conditions. Instead, the values of each conserved constant must be directly specified.
14
-
- The `reactionparams`, `numreactionparams`, and `reactionparamsmap` functions have been deprecated and removed.
15
-
- To be more consistent with ModelingToolkit's immutability requirement for systems, we have removed API functions that mutate `ReactionSystem`s such as `addparam!`, `addreaction!`, `addspecies`, `@add_reactions`, and `merge!`. Please use `ModelingToolkit.extend` and `ModelingToolkit.compose` to generate new merged and/or composed `ReactionSystem`s from multiple component systems.
7
+
#### Breaking changes
8
+
Catalyst v14 was prompted by the (breaking) release of ModelingToolkit v9, which
9
+
introduced several breaking changes to Catalyst. A summary of these (and how to
10
+
handle them) can be found
11
+
[here](https://docs.sciml.ai/Catalyst/stable/v14_migration_guide/). These are
12
+
briefly summarised in the following bullet points:
13
+
-`ReactionSystem`s must now be marked *complete* before they are exposed to
14
+
most forms of simulation and analysis. With the exception of `ReactionSystem`s
15
+
created through the `@reaction_network` macro, all `ReactionSystem`s are *not*
16
+
marked complete upon construction. The `complete` function can be used to mark
17
+
`ReactionSystem`s as complete. To construct a `ReactionSystem` that is not
18
+
marked complete via the DSL the new `@network_component` macro can be used.
19
+
- The `states` function has been replaced with `unknowns`. The `get_states`
20
+
function has been replaced with `get_unknowns`.
21
+
- Support for most units (with the exception of `s`, `m`, `kg`, `A`, `K`, `mol`,
22
+
and `cd`) has currently been dropped by ModelingToolkit, and hence they are
23
+
unavailable via Catalyst too. Its is expected that eventually support for
24
+
relevant chemical units such as molar will return to ModelingToolkit (and
25
+
should then immediately work in Catalyst too).
26
+
- Problem parameter values are now accessed through `prob.ps[p]` (rather than
27
+
`prob[p]`).
28
+
- ModelingToolkit currently does not support the safe application of the
29
+
`remake` function, or safe direct mutation, for problems for which
30
+
`remove_conserved = true` was used when updating the values of initial
31
+
conditions. Instead, the values of each conserved constant must be directly
32
+
specified.
33
+
- The `reactionparams`, `numreactionparams`, and `reactionparamsmap` functions
34
+
have been deprecated and removed.
35
+
- To be more consistent with ModelingToolkit's immutability requirement for
36
+
systems, we have removed API functions that mutate `ReactionSystem`s such as
37
+
`addparam!`, `addreaction!`, `addspecies`, `@add_reactions`, and `merge!`.
38
+
Please use `ModelingToolkit.extend` and `ModelingToolkit.compose` to generate
39
+
new merged and/or composed `ReactionSystem`s from multiple component systems.
16
40
17
41
#### General changes
18
-
- The `default_t()` and `default_time_deriv()` functions are now the preferred approaches for creating the default time independent variable and its differential. i.e.
42
+
- The `default_t()` and `default_time_deriv()` functions are now the preferred
43
+
approaches for creating the default time independent variable and its
44
+
differential. i.e.
19
45
```julia
20
46
# do
21
47
t =default_t()
@@ -25,110 +51,141 @@ Catalyst v14 was prompted by the (breaking) release of ModelingToolkit v9, which
25
51
@variables t
26
52
@speciesA(t)
27
53
- It is now possible to add metadata to individual reactions, e.g. using:
28
-
```julia
29
-
rn = @reaction_network begin
30
-
@parameters η
31
-
k, 2X --> X2, [description="Dimerisation"]
32
-
end
33
-
getdescription(rn)
34
-
```
35
-
a more detailed description can be found [here](https://docs.sciml.ai/Catalyst/dev/model_creation/dsl_advanced/#dsl_advanced_options_reaction_metadata).
36
-
-`SDEProblem` no longer takes the `noise_scaling` argument. Noise scaling is now handled through the `noise_scaling` metadata (described in more detail [here](https://docs.sciml.ai/Catalyst/stable/model_simulation/simulation_introduction/#simulation_intro_SDEs_noise_saling))
37
-
- Fields of the internal `Reaction` structure have been changed. `ReactionSystems`s saved using`serialize` on previous Catalyst versions cannot be loaded using this (or later) versions.
38
-
- A new function, `save_reactionsystem`, which permits the writing of `ReactionSystem` models to files, has been created. A thorough description of this function can be found [here](https://docs.sciml.ai/Catalyst/stable/model_creation/model_file_loading_and_export/#Saving-Catalyst-models-to,-and-loading-them-from,-Julia-files)
39
-
- Update how compounds are created. E.g. use
40
-
```julia
41
-
@variables t C(t) O(t)
42
-
@compound CO2 ~ C + 2O
43
-
```
44
-
to create a compound species `CO2` that consists of `C` and 2`O`.
45
-
- Added documentation for chemistry-related functionality (compound creation and reaction balancing).
54
+
```julia
55
+
rn = @reaction_network begin
56
+
@parameters η
57
+
k, 2X --> X2, [description="Dimerisation"]
58
+
end
59
+
getdescription(rn)
60
+
```
61
+
a more detailed description can be found [here](https://docs.sciml.ai/Catalyst/dev/model_creation/dsl_advanced/#dsl_advanced_options_reaction_metadata).
62
+
-`SDEProblem` no longer takes the `noise_scaling` argument. Noise scaling is
63
+
now handled through the `noise_scaling` metadata (described in more detail
to create a compound species `CO2` that consists of `C` and two `O`.
78
+
- Added documentation for chemistry-related functionality (compound creation and
79
+
reaction balancing).
46
80
- Added function`isautonomous` to check if a `ReactionSystem` is autonomous.
47
-
- Added function`steady_state_stability` to compute stability for steady states. Example:
48
-
```julia
49
-
# Creates model.
50
-
rn = @reaction_network begin
51
-
(p,d), 0 <--> X
52
-
end
53
-
p = [:p => 1.0, :d => 0.5]
81
+
- Added function`steady_state_stability` to compute stability for steady
82
+
states. Example:
83
+
```julia
84
+
# Creates model.
85
+
rn = @reaction_network begin
86
+
(p,d), 0 <--> X
87
+
end
88
+
p = [:p => 1.0, :d => 0.5]
54
89
55
-
# Finds (the trivial) steady state, and computes stability.
56
-
steady_state = [2.0]
57
-
steady_state_stability(steady_state, rn, p)
58
-
```
59
-
Here, `steady_state_stability` takes an optional argument `tol = 10*sqrt(eps())`, which is used to check that the real part of all eigenvalues are at least `tol` away from zero. Eigenvalues within `tol` of zero indicate that stability may not be reliably calculated.
60
-
- Added a DSL option, `@combinatoric_ratelaws`, which can be used to toggle whether to use combinatorial rate laws within the DSL (this feature was already supported for programmatic modelling). Example:
61
-
```julia
62
-
# Creates model.
63
-
rn = @reaction_network begin
64
-
@combinatoric_ratelaws false
65
-
(kB,kD), 2X <--> X2
66
-
end
67
-
```
68
-
- Added a DSL option, `@observables`for [creating observables](https://docs.sciml.ai/Catalyst/stable/model_creation/dsl_advanced/#dsl_advanced_options_observables) (this feature was already supported for programmatic modelling).
69
-
- Added DSL options `@continuous_events` and `@discrete_events` to add events to a model as part of its creation (this feature was already supported for programmatic modelling). Example:
70
-
```julia
71
-
rn = @reaction_network begin
72
-
@continuous_events begin
73
-
[X ~ 1.0] => [X ~ X + 1.0]
74
-
end
75
-
d, X --> 0
76
-
end
77
-
```
78
-
- Added DSL option `@equations` to add (algebraic or differential) equations to a model as part of its creation (this feature was already supported for programmatic modelling). Example:
79
-
```julia
80
-
rn = @reaction_network begin
81
-
@equations begin
82
-
D(V) ~ 1 - V
83
-
end
84
-
(p/V,d/V), 0 <--> X
85
-
end
86
-
```
87
-
- Coupled reaction network + differential equation (or algebraic differential equation) systems can now be converted to `SDESystem`s and `NonlinearSystem`s.
88
-
89
-
#### Structural identifiability extension
90
-
- Added CatalystStructuralIdentifiabilityExtension, which permits StructuralIdentifiability.jl function to be applied directly to Catalyst systems. E.g. use
to assess (global) structural identifiability for all parameters and variables of the `goodwind_oscillator` model (under the presumption that we can measure `M` only).
101
-
- Automatically handles conservation laws for structural identifiability problems (eliminates these internally to speed up computations).
102
-
- A more detailed of how this extension works can be found [here](https://docs.sciml.ai/Catalyst/stable/inverse_problems/structural_identifiability/).
90
+
# Finds (the trivial) steady state, and computes stability.
91
+
steady_state = [2.0]
92
+
steady_state_stability(steady_state, rn, p)
93
+
```
94
+
Here, `steady_state_stability` takes an optional keyword argument `tol =
95
+
10*sqrt(eps())`, which is used to check that the real part of all eigenvalues
96
+
are at least `tol` away from zero. Eigenvalues within `tol` of zero indicate
97
+
that stability may not be reliably calculated.
98
+
- Added a DSL option, `@combinatoric_ratelaws`, which can be used to toggle
99
+
whether to use combinatorial rate laws within the DSL (this feature was
100
+
already supported for programmatic modelling). Example:
(this feature was already supported for programmatic modelling).
111
+
- Added DSL options `@continuous_events` and `@discrete_events` to add events to
112
+
a model as part of its creation (this feature was already supported for
113
+
programmatic modelling). Example:
114
+
```julia
115
+
rn = @reaction_network begin
116
+
@continuous_events begin
117
+
[X ~ 1.0] => [X ~ X + 1.0]
118
+
end
119
+
d, X --> 0
120
+
end
121
+
```
122
+
- Added DSL option `@equations` to add (algebraic or differential) equations to
123
+
a model as part of its creation (this feature was already supported for
124
+
programmatic modelling). Example:
125
+
```julia
126
+
rn = @reaction_network begin
127
+
@equations begin
128
+
D(V) ~ 1 - V
129
+
end
130
+
(p/V,d/V), 0 <--> X
131
+
end
132
+
```
133
+
couples the ODE $dV/dt =1- V$ to the reaction system.
134
+
- Coupled reaction networks and differential equation (or algebraic differential
135
+
equation) systems can now be converted to `SDESystem`s and `NonlinearSystem`s.
103
136
104
-
#### Bifurcation analysis extension
105
-
- Add a CatalystBifurcationKitExtension, permitting BifurcationKit's `BifurcationProblem`s to be created from Catalyst reaction networks. Example usage:
106
-
```julia
107
-
using Catalyst
108
-
wilhelm_2009_model = @reaction_network begin
109
-
k1, Y --> 2X
110
-
k2, 2X --> X + Y
111
-
k3, X + Y --> Y
112
-
k4, X --> 0
113
-
k5, 0 --> X
114
-
end
137
+
#### Structural identifiability extension
138
+
- Added CatalystStructuralIdentifiabilityExtension, which permits
139
+
StructuralIdentifiability.jl to be applied directly to Catalyst systems. E.g.
0 commit comments