Skip to content

Commit c4bff2e

Browse files
Merge pull request #36 from ChrisRackauckas-Claude/docs-improvements-20260107-140750
Documentation improvements: grammar, typos, and consistency
2 parents c07f8c5 + c99f720 commit c4bff2e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

docs/src/examples.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ end
1616
sys = FSPSystem(rn)
1717

1818
# Parameters for our system
19-
ps = [10.0, 1.0]
19+
ps = [ => 10.0, :d => 1.0]
2020

2121
# Initial distribution (over 1 species)
2222
# Here we start with 0 copies of A
@@ -33,7 +33,7 @@ sol = solve(prob, Vern7())
3333

3434
Here we showcase the telegraph model, a simplistic description of mRNA transcription in biological cells. We have one gene that transitions stochastically between an *on* and an *off* state and produces mRNA molecules while it is in the *on* state.
3535

36-
The most straightforward description of this system includes three species: two gene states, `G_on` and `G_off`, and mRNA `M`. The state space for this system is 3-dimensional. We know, however, that `G_on` and `G_off` never occur at the same time, indeed the conservation law `[G_on] + [G_off] = 1` allows us to express the state of the system in terms of `G_on` and `M` only. The state space of this reduced system is 2-dimensional.If we use an mRNA cutoff of 100, the state space for the original model has size ``2 \times 2 \times 100 = 400``, while the reduced state space has size ``2 \times 100 = 200``, a two-fold saving. Since the FSP get computationally more expensive for each species in a system, eliminating redundant species as above is recommended for improved performance.
36+
The most straightforward description of this system includes three species: two gene states, `G_on` and `G_off`, and mRNA `M`. The state space for this system is 3-dimensional. We know, however, that `G_on` and `G_off` never occur at the same time, indeed the conservation law `[G_on] + [G_off] = 1` allows us to express the state of the system in terms of `G_on` and `M` only. The state space of this reduced system is 2-dimensional. If we use an mRNA cutoff of 100, the state space for the original model has size ``2 \times 2 \times 100 = 400``, while the reduced state space has size ``2 \times 100 = 200``, a two-fold saving. Since the FSP gets computationally more expensive for each species in a system, eliminating redundant species as above is recommended for improved performance.
3737

3838
!!! note
3939

@@ -53,7 +53,7 @@ end
5353
sys = FSPSystem(rn)
5454

5555
# Parameters for our system
56-
ps = [0.25, 0.15, 15.0, 1.0]
56+
ps = [:σ_on => 0.25, :σ_off => 0.15, => 15.0, :d => 1.0]
5757

5858
# Initial distribution (over two species)
5959
# Here we start with 0 copies of G_on and M

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ This function is generated dynamically as an `ODEFunction` for use with Differen
2727

2828
## Acknowledgments
2929

30-
Special thanks to [Xiamong Fu](https://github.com/palmtree2013), [Brian Munsky](https://www.engr.colostate.edu/%7Emunsky/) and [Huy Vo](https://github.com/voduchuy) for their examples and suggestions and for contributing most of the content in the [Tips & Tricks](@ref tips) page!
30+
Special thanks to [Xiaoming Fu](https://github.com/palmtree2013), [Brian Munsky](https://www.engr.colostate.edu/%7Emunsky/) and [Huy Vo](https://github.com/voduchuy) for their examples and suggestions and for contributing most of the content in the [Tips & Tricks](@ref tips) page!

docs/src/tips.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# [Tips and Tricks](@id tips)
22

3-
The FSP approximates an infinite-dimensional system of equations by truncating it to a finite number of variables. The accuracy of the FSP therefore depends on how many variables are retained, ie.~what portion of the state space is modelled. While simple reaction networks with 1 or 2 species are not too difficult to handle using the FSP, a naive approach will require unfeasibly large truncations for systems of even moderate complexity.
3+
The FSP approximates an infinite-dimensional system of equations by truncating it to a finite number of variables. The accuracy of the FSP therefore depends on how many variables are retained, i.e., what portion of the state space is modelled. While simple reaction networks with 1 or 2 species are not too difficult to handle using the FSP, a naive approach will require unfeasibly large truncations for systems of even moderate complexity.
44

55
## Solving Linear Equations
66

@@ -33,4 +33,4 @@ expmv!(vec(ut), t, A, vec(u0), tol=1e-6) # really fast
3333

3434
## Further Comments
3535

36-
Choosing the right solver for large systems of ODEs can result in time savings on the order of 10-100x, and it is recommended that you experiment with a few solvers to see which works best in your case. This section is still work in progress and there has been a lot of research on accelerating the FSP and extending it to larger reaction networks which will hopefully be reviewed here soon. Feel free to share any comments or suggestions in this direction at the [Github repository](https://github.com/kaandocal/FiniteStateProjection.jl)!
36+
Choosing the right solver for large systems of ODEs can result in time savings on the order of 10-100x, and it is recommended that you experiment with a few solvers to see which works best in your case. This section is still work in progress and there has been a lot of research on accelerating the FSP and extending it to larger reaction networks which will hopefully be reviewed here soon. Feel free to share any comments or suggestions in this direction at the [Github repository](https://github.com/SciML/FiniteStateProjection.jl)!

docs/src/troubleshoot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Solving the Chemical Master Equation numerically is a difficult task and errors
44

55
## Ensure your state space has the right dimension
66

7-
If your are solving an SIR model with three species, ``S``, ``I`` and ``R``, your state space will be 3-dimensional. FiniteStateProjection.jl computes probabilities for all states simultaneously and stores the results in a 3-dimensional array. In particular, `u0` must have type `Float64` or similar as it represents numbers between 0 and 1.
7+
If you are solving an SIR model with three species, ``S``, ``I`` and ``R``, your state space will be 3-dimensional. FiniteStateProjection.jl computes probabilities for all states simultaneously and stores the results in a 3-dimensional array. In particular, `u0` must have type `Float64` or similar as it represents numbers between 0 and 1.
88

99
```julia
1010
# correct
@@ -47,7 +47,7 @@ end
4747
sys_fsp = FSPSystem(rn)
4848
```
4949

50-
Here the propensity function for the first reaction will negative if ``I > N``, so the following may result in numerical instabilities:
50+
Here the propensity function for the first reaction will be negative if ``I > N``, so the following may result in numerical instabilities:
5151

5252
```julia
5353
u0 = zeros(30)

0 commit comments

Comments
 (0)