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
If you use this functionality in your research, [in addition to Catalyst](@refcatalyst_citation), please cite the following paper to support the authors of the GlobalSensitivity.jl package:
145
+
If you use this functionality in your research, [in addition to Catalyst](@refdoc_index_citation), please cite the following paper to support the authors of the GlobalSensitivity.jl package:
146
146
```
147
147
@article{dixit2022globalsensitivity,
148
148
title={GlobalSensitivity. jl: Performant and Parallel Global Sensitivity Analysis with Julia},
Copy file name to clipboardExpand all lines: docs/src/model_creation/model_file_loading_and_export.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
-
# Loading Chemical Reaction Network Models from Files
1
+
# [Loading Chemical Reaction Network Models from Files](@id model_file_import_export)
2
2
Catalyst stores chemical reaction network (CRN) models in `ReactionSystem` structures. This tutorial describes how to load such `ReactionSystem`s from, and save them to, files. This can be used to save models between Julia sessions, or transfer them from one session to another. Furthermore, to facilitate the computation modelling of CRNs, several standardised file formats have been created to represent CRN models (e.g. [SBML](https://sbml.org/)). This enables CRN models to be shared between different softwares and programming languages. While Catalyst itself does not have the functionality for loading such files, we will here (briefly) introduce a few packages that can load different file types to Catalyst `ReactionSystem`s.
3
3
4
-
## Saving Catalyst models to, and loading them from, Julia files
4
+
## [Saving Catalyst models to, and loading them from, Julia files](@id model_file_import_export_crn_serialization)
5
5
Catalyst provides a `save_reactionsystem` function, enabling the user to save a `ReactionSystem` to a file. Here we demonstrate this by first creating a [simple cross-coupling model](@ref basic_CRN_library_cc):
6
6
```@example file_handling_1
7
7
using Catalyst
@@ -56,7 +56,7 @@ end
56
56
57
57
In addition to transferring models between Julia sessions, the `save_reactionsystem` function can also be used or print a model to a text file where you can easily inspect its components.
58
58
59
-
## Loading and Saving arbitrary Julia variables using Serialization.jl
59
+
## [Loading and Saving arbitrary Julia variables using Serialization.jl](@id model_file_import_export_julia_serialisation)
60
60
Julia provides a general and lightweight interface for loading and saving Julia structures to and from files that it can be good to be aware of. It is called [Serialization.jl](https://docs.julialang.org/en/v1/stdlib/Serialization/) and provides two functions, `serialize` and `deserialize`. The first allows us to write a Julia structure to a file. E.g. if we wish to save a parameter set associated with our model, we can use
## [Loading .net files using ReactionNetworkImporters.jl](@idfile_loading_rni_net)
73
+
## [Loading .net files using ReactionNetworkImporters.jl](@idmodel_file_import_export_sbml_rni_net)
74
74
A general-purpose format for storing CRN models is so-called .net files. These can be generated by e.g. [BioNetGen](https://bionetgen.org/). The [ReactionNetworkImporters.jl](https://github.com/SciML/ReactionNetworkImporters.jl) package enables the loading of such files to Catalyst `ReactionSystem`. Here we load a [Repressilator](@ref basic_CRN_library_repressilator) model stored in the "repressilator.net" file:
75
75
```julia
76
76
using ReactionNetworkImporters
@@ -96,15 +96,15 @@ Note that, as all initial conditions and parameters have default values, we can
96
96
97
97
A more detailed description of ReactionNetworkImporter's features can be found in its [documentation](https://docs.sciml.ai/ReactionNetworkImporters/stable/).
98
98
99
-
## Loading SBML files using SBMLImporter.jl and SBMLToolkit.jl
99
+
## [Loading SBML files using SBMLImporter.jl and SBMLToolkit.jl](@id model_file_import_export_sbml)
100
100
The Systems Biology Markup Language (SBML) is the most widespread format for representing CRN models. Currently, there exist two different Julia packages, [SBMLImporter.jl](https://github.com/sebapersson/SBMLImporter.jl) and [SBMLToolkit.jl](https://github.com/SciML/SBMLToolkit.jl), that are able to load SBML files to Catalyst `ReactionSystem` structures. SBML is able to represent a *very* wide range of model features, with both packages supporting most features. However, there exist SBML files (typically containing obscure model features such as events with time delays) that currently cannot be loaded into Catalyst models.
101
101
102
102
SBMLImporter's `load_SBML` function can be used to load SBML files. Here, we load a [Brusselator](@ref basic_CRN_library_brusselator) model stored in the "brusselator.xml" file:
103
103
```julia
104
104
using SBMLImporter
105
105
prn, cbs =load_SBML("brusselator.xml", massaction =true)
106
106
```
107
-
Here, while [ReactionNetworkImporters generates a `ParsedReactionSystem` only](@reffile_loading_rni_net), SBMLImporter generates a `ParsedReactionSystem` (here stored in `prn`) and a [so-called `CallbackSet`](https://docs.sciml.ai/DiffEqDocs/stable/features/callback_functions/#CallbackSet) (here stored in `cbs`). While `prn` can be used to create various problems, when we simulate them, we must also supply `cbs`. E.g. to simulate our brusselator we use:
107
+
Here, while [ReactionNetworkImporters generates a `ParsedReactionSystem` only](@refmodel_file_import_export_sbml_rni_net), SBMLImporter generates a `ParsedReactionSystem` (here stored in `prn`) and a [so-called `CallbackSet`](https://docs.sciml.ai/DiffEqDocs/stable/features/callback_functions/#CallbackSet) (here stored in `cbs`). While `prn` can be used to create various problems, when we simulate them, we must also supply `cbs`. E.g. to simulate our brusselator we use:
108
108
```julia
109
109
using Catalyst, OrdinaryDiffEq, Plots
110
110
tspan = (0.0, 50.0)
@@ -121,10 +121,10 @@ A more detailed description of SBMLImporter's features can be found in its [docu
121
121
!!! note
122
122
The `massaction = true` option informs the importer that the target model follows mass-action principles. When given, this enables SBMLImporter to make appropriate modifications to the model (which are important for e.g. jump simulation performance).
123
123
124
-
### SBMLImporter and SBMLToolkit
124
+
### [SBMLImporter and SBMLToolkit](@id model_file_import_export_package_alts)
125
125
Above, we described how to use SBMLImporter to import SBML files. Alternatively, SBMLToolkit can be used instead. It has a slightly different syntax, which is described in its [documentation](https://github.com/SciML/SBMLToolkit.jl), and does not support as wide a range of SBML features as SBMLImporter. A short comparison of the two packages can be found [here](https://github.com/sebapersson/SBMLImporter.jl?tab=readme-ov-file#differences-compared-to-sbmltoolkit). Generally, while they both perform well, we note that for *jump simulations* SBMLImporter is preferable (its way for internally representing reaction event enables more performant jump simulations).
126
126
127
-
## Loading models from matrix representation using ReactionNetworkImporters.jl
127
+
## [Loading models from matrix representation using ReactionNetworkImporters.jl](@id model_file_import_export_matrix_representations)
128
128
While CRN models can be represented through various file formats, they can also be represented in various matrix forms. E.g. a CRN with $m$ species and $n$ reactions (and with constant rates) can be represented with either
129
129
- An $mxn$ substrate matrix (with each species's substrate stoichiometry in each reaction) and an $nxm$ product matrix (with each species's product stoichiometry in each reaction).
130
130
@@ -136,7 +136,7 @@ The advantage of these forms is that they offer a compact and very general way t
136
136
137
137
---
138
138
## [Citations](@id petab_citations)
139
-
If you use any of this functionality in your research, [in addition to Catalyst](@refcatalyst_citation), please cite the paper(s) corresponding to whichever package(s) you used:
139
+
If you use any of this functionality in your research, [in addition to Catalyst](@refdoc_index_citation), please cite the paper(s) corresponding to whichever package(s) you used:
Copy file name to clipboardExpand all lines: docs/src/steady_state_functionality/dynamical_systems.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,7 +124,7 @@ More details on how to compute Lyapunov exponents using DynamicalSystems.jl can
124
124
125
125
---
126
126
## [Citations](@id dynamical_systems_citations)
127
-
If you use this functionality in your research, [in addition to Catalyst](@refcatalyst_citation), please cite the following paper to support the author of the DynamicalSystems.jl package:
127
+
If you use this functionality in your research, [in addition to Catalyst](@refdoc_index_citation), please cite the following paper to support the author of the DynamicalSystems.jl package:
Copy file name to clipboardExpand all lines: docs/src/steady_state_functionality/nonlinear_solve.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,7 +133,7 @@ However, especially when the forward ODE simulation approach is used, it is reco
133
133
134
134
---
135
135
## [Citations](@id nonlinear_solve_citation)
136
-
If you use this functionality in your research, [in addition to Catalyst](@refcatalyst_citation), please cite the following paper to support the authors of the NonlinearSolve.jl package:
136
+
If you use this functionality in your research, [in addition to Catalyst](@refdoc_index_citation), please cite the following paper to support the authors of the NonlinearSolve.jl package:
137
137
```
138
138
@article{pal2024nonlinearsolve,
139
139
title={NonlinearSolve. jl: High-Performance and Robust Solvers for Systems of Nonlinear Equations in Julia},
Copy file name to clipboardExpand all lines: docs/src/steady_state_functionality/steady_state_stability_computation.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
# Steady state stability computation
1
+
# [Steady state stability computation](@id steady_state_stability)
2
2
After system steady states have been found using [HomotopyContinuation.jl](@ref homotopy_continuation), [NonlinearSolve.jl](@ref steady_state_solving), or other means, their stability can be computed using Catalyst's `steady_state_stability` function. Systems with conservation laws will automatically have these removed, permitting stability computation on systems with singular Jacobian.
3
3
4
4
!!! warn
5
5
Catalyst currently computes steady state stabilities using the naive approach of checking whether a system's largest eigenvalue real part is negative. While more advanced stability computation methods exist (and would be a welcome addition to Catalyst), there is no direct plans to implement these. Furthermore, Catalyst uses a tolerance `tol = 10*sqrt(eps())` to determine whether a computed eigenvalue is far away enough from 0 to be reliably used. This threshold can be changed through the `tol` keyword argument.
@@ -42,7 +42,7 @@ Finally, as described above, Catalyst uses an optional argument, `tol`, to deter
42
42
nothing# hide
43
43
```
44
44
45
-
## Pre-computing the Jacobian to increase performance when computing stability for many steady states
45
+
## [Pre-computing the Jacobian to increase performance when computing stability for many steady states](@id steady_state_stability_jacobian)
46
46
Catalyst uses the system Jacobian to compute steady state stability, and the Jacobian is computed once for each call to `steady_state_stability`. If you repeatedly compute stability for steady states of the same system, pre-computing the Jacobian and supplying it to the `steady_state_stability` function can improve performance.
47
47
48
48
In this example we use the self-activation loop from previously, pre-computes its Jacobian, and uses it to multiple `steady_state_stability` calls:
Copy file name to clipboardExpand all lines: docs/unpublished/petab_ode_param_fitting.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -523,7 +523,7 @@ There exist several types of plots for both types of calibration results. More d
523
523
524
524
---
525
525
## [Citations](@id petab_citations)
526
-
If you use this functionality in your research, [in addition to Catalyst](@refcatalyst_citation), please cite the following papers to support the authors of the PEtab.jl package (currently there is no article associated with this package) and the PEtab standard:
526
+
If you use this functionality in your research, [in addition to Catalyst](@refdoc_index_citation), please cite the following papers to support the authors of the PEtab.jl package (currently there is no article associated with this package) and the PEtab standard:
527
527
```
528
528
@misc{2023Petabljl,
529
529
author = {Ognissanti, Damiano AND Arutjunjan, Rafael AND Persson, Sebastian AND Hasselgren, Viktor},
0 commit comments