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
Copy file name to clipboardExpand all lines: docs/src/steady_state_functionality/steady_state_stability_computation.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
@@ -2,7 +2,7 @@
2
2
After system steady states have been found using [HomotopyContinuation.jl](@ref homotopy_continuation), [NonlinearSolve.jl](@ref nonlinear_solve), 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
-
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 arbitrary tolerance $tol ~ 1.5*10^-7$ to determine whether a computed eigenvalue is far away enough from 0 to be reliably used. This selected threshold, however, have not been subject to further analysis (and can be changed through the `tol` argument).
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 arbitrary tolerance $tol ≈ 1.5*10^-7$ to determine whether a computed eigenvalue is far away enough from 0 to be reliably used. This selected threshold, however, have not been subject to further analysis (and can be changed through the `tol` argument).
6
6
7
7
## Basic examples
8
8
Let us consider the following basic example:
@@ -19,7 +19,7 @@ steady_state = [:X => 4.0]
19
19
steady_state_stability(steady_state, rn, ps)
20
20
```
21
21
22
-
Next, let us consider the following self-activation loop:
22
+
Next, let us consider the following [self-activation loop](@ref ref):
23
23
```@example stability_1
24
24
sa_loop = @reaction_network begin
25
25
(hill(X,v,K,n),d), 0 <--> X
@@ -31,18 +31,15 @@ import HomotopyContinuation
31
31
ps = [:v => 2.0, :K => 0.5, :n => 3, :d => 1.0]
32
32
steady_states = hc_steady_states(sa_loop, ps)
33
33
```
34
-
Next, we can apply `steady_state_stability`directly to this steady state vector, receiving the stability for each:
34
+
Next, we can apply `steady_state_stability` to each steady state yielding a vector of their stabilities:
[steady_state_stability(sstate, sa_loop, ps) for sstate in steady_states]
37
37
```
38
38
39
-
!!! note
40
-
For systems with [conservation laws](@ref homotopy_continuation_conservation_laws), `steady_state_jac` must be supplied a `u0` vector (indicating species concentrations for conservation law computation). This is required to eliminate the conserved quantities, preventing a singular Jacobian. These are supplied using the `u0` optional argument.
41
-
42
39
## Pre-computing the Jacobian to increase performance when computing stability for many steady states
43
40
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.
44
41
45
-
In this example we use the self-activation loop from previously, pre-computes the Jacobian, and uses it to multiple `steady_state_stability` calls:
42
+
In this example we use the self-activation loop from previously, pre-computes its Jacobian, and uses it to multiple `steady_state_stability` calls:
46
43
```@example stability_1
47
44
ss_jac = steady_state_jac(sa_loop)
48
45
@@ -60,4 +57,7 @@ It is possible to designate that a [sparse Jacobian](@ref ref) should be used us
60
57
```@example stability_1
61
58
ss_jac = steady_state_jac(sa_loop; sparse = true)
62
59
nothing # hide
63
-
```
60
+
```
61
+
62
+
!!! warn
63
+
For systems with [conservation laws](@ref homotopy_continuation_conservation_laws), `steady_state_jac` must be supplied a `u0` vector (indicating species concentrations for conservation law computation). This is required to eliminate the conserved quantities, preventing a singular Jacobian. These are supplied using the `u0` optional argument.
0 commit comments