Skip to content

Commit

Permalink
fix refs and doc build error
Browse files Browse the repository at this point in the history
  • Loading branch information
vyudu committed Nov 20, 2024
1 parent fc8ff3e commit 151573c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/src/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ Symbolics.jl before their use in Catalyst, see the discussion
[here](https://symbolics.juliasymbolics.org/stable/manual/functions/).

## How can I turn off automatic inferring of species and parameters when using the DSL?
This option can be set using the `@require_declaration` option inside `@reaction_network`. In this case all the species, parameters, and variables in the system must be pre-declared using one of the `@species`, `@parameters`, or `@variables` macros. For more information about what is inferred automatically and not, please see the section on [`@require_declaration`](@dsl_advanced_options_require_dec).
This option can be set using the `@require_declaration` option inside `@reaction_network`. In this case all the species, parameters, and variables in the system must be pre-declared using one of the `@species`, `@parameters`, or `@variables` macros. For more information about what is inferred automatically and not, please see the section on [`@require_declaration`](@ref dsl_advanced_options_require_dec).

```@example faq9
using Catalyst
Expand Down
7 changes: 5 additions & 2 deletions docs/src/model_creation/dsl_advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,13 @@ In some cases it may be desirable for Catalyst to not infer species and paramete
```@example dsl_advanced_no_infer
using Catalyst
# The following case will throw an UndeclaredSymbolicError.
rn = @reaction_network begin
try @macroexpand @reaction_network begin
@require_declaration
(k1, k2), A <--> B
end
catch e
println(e.msg)
end
```
In order to avoid an error in this case all the relevant species and parameters will have to be declared.
```
Expand All @@ -300,7 +303,7 @@ The following cases in which the DSL would normally infer variables will all thr
- Inferring a parameter in a reaction rate expression, as in the reaction line `k*n, A --> B`
- Inferring a parameter in the stoichiometry of a species, as in the reaction line `k, n*A --> B`
- Inferring a differential variable on the LHS of a coupled differential equation, as in `A` in `@equations D(A) ~ A^2`
- Inferring an [observable](@dsl_advanced_options_observables) that is declared using `@observables`
- Inferring an [observable](@ref dsl_advanced_options_observables) that is declared using `@observables`

## [Naming reaction networks](@id dsl_advanced_options_naming)
Each reaction network model has a name. It can be accessed using the `nameof` function. By default, some generic name is used:
Expand Down

0 comments on commit 151573c

Please sign in to comment.