Skip to content

Commit 84da329

Browse files
committed
try to fix docs
1 parent 56b494d commit 84da329

File tree

4 files changed

+11
-18
lines changed

4 files changed

+11
-18
lines changed

docs/src/model_creation/compositional_modeling.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ reactions *only* within a given system (i.e. ignoring subsystems), we can use
9595
Catalyst.get_species(rn)
9696
```
9797
```@example ex1
98-
Catalyst.parameters_toplevel(rn)
98+
Catalyst.get_ps(rn)
9999
```
100100
```@example ex1
101101
Catalyst.get_rxs(rn)
@@ -110,11 +110,6 @@ parameters(rn)
110110
```@example ex1
111111
reactions(rn) # or equations(rn)
112112
```
113-
!!! note
114-
Previously, `ModelingToolkit.get_ps(rn)` was recommended (rather than `Catalyst.parameters_toplevel(rn)`).
115-
While it can still be used, due to an update in ModelingToolkit, `get_ps` now also returns potential
116-
initialisation parameters (which are added to the model by ModelingToolkit, not the user).
117-
118113
If we want to collapse `rn` down to a single system with no subsystems we can use
119114
```@example ex1
120115
flatrn = Catalyst.flatten(rn)

docs/src/model_creation/constraint_equations.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,19 @@ eq = [D(V) ~ λ * V]
4343
@named osys = ODESystem(eq, t)
4444
4545
# build the ReactionSystem with no protein initially
46-
rn = @reaction_network begin
46+
rn = @network_component begin
4747
@species P(t) = 0.0
4848
$V, 0 --> P
4949
1.0, P --> 0
5050
end
5151
```
5252
Notice, here we interpolated the variable `V` with `$V` to ensure we use the
53-
same symbolic unknown variable in the `rn` as we used in building `osys`. See the
54-
doc section on [interpolation of variables](@ref
55-
dsl_advanced_options_symbolics_and_DSL_interpolation) for more information.
53+
same symbolic unknown variable in the `rn` as we used in building `osys`. See
54+
the doc section on [interpolation of variables](@ref
55+
dsl_advanced_options_symbolics_and_DSL_interpolation) for more information. We
56+
also use `@network_component` instead of `@reaction_network` as when merging
57+
systems together Catalyst requires that the systems have not been marked as
58+
`complete` (which indicates to Catalyst that a system is finalized).
5659

5760
We can now merge the two systems into one complete `ReactionSystem` model using
5861
[`ModelingToolkit.extend`](@ref):

docs/src/model_creation/reactionsystem_content_accessing.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,12 @@ Similarly, `parameters` retrieves five different parameters. Here, we note that
225225
parameters(rs)
226226
```
227227

228-
If we wish to retrieve the species (or parameters) that are specifically contained in the top-level system (and not only indirectly through its subsystems), we can use the `Catalyst.get_species` (or `Catalyst.parameters_toplevel`) functions:
228+
If we wish to retrieve the species (or parameters) that are specifically contained in the top-level system (and not only indirectly through its subsystems), we can use the `Catalyst.get_species` (or `ModelingToolkit.getps`) functions:
229229
```@example model_accessing_hierarchical
230230
Catalyst.get_species(rs)
231231
```
232232
```@example model_accessing_hierarchical
233-
Catalyst.parameters_toplevel(rs)
233+
ModelingToolkit.get_ps(rs)
234234
```
235235
Here, our top-level model contains a single parameter (`kₜ`), and two the two versions of the `Xᵢ` species. These are all the symbolic variables that occur in the transportation reaction (`@kₜ, $(nucleus_sys.Xᵢ) --> $(cytoplasm_sys.Xᵢ)`), which is the only reaction of the top-level system. We can apply these functions to the systems as well. However, when we do so, the systems' names are not prepended:
236236
```@example model_accessing_hierarchical
@@ -248,8 +248,3 @@ Other examples of similar pairs of functions are `get_unknowns` and `unknowns`,
248248

249249
!!! note
250250
Due to the large number of available accessor functions, most `get_` functions are not directly exported by Catalyst. Hence, these must be used as `Catalyst.get_rxs`, rather than `get_rxs` directly. Again, a full list of accessor functions and instructions on how to use them can be found in [Catalyst's API](@ref api).
251-
252-
!!! note
253-
Previously, `ModelingToolkit.get_ps(rn)` was recommended (rather than `Catalyst.parameters_toplevel(rn)`).
254-
While it can still be used, due to an update in ModelingToolkit, `get_ps` now also returns potential
255-
initialisation parameters (which are added to the model by ModelingToolkit, not the user).

src/reactionsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1445,7 +1445,7 @@ end
14451445

14461446
function complete_check(sys, method)
14471447
if MT.iscomplete(sys)
1448-
error("$method requires systems to not be marked complete, but system: $(MT.get_name(sys)) is marked complete.")
1448+
error("$method with one or more `ReactionSystem`s requires systems to not be marked complete, but system: $(MT.get_name(sys)) is marked complete.")
14491449
end
14501450
nothing
14511451
end

0 commit comments

Comments
 (0)