Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for chemistry functionalities #679

Closed
wants to merge 1 commit into from

Conversation

LalitChauhan56
Copy link
Member

Fix #677

@LalitChauhan56
Copy link
Member Author

Adding a documentation tutorial shortly.

@isaacsas
Copy link
Member

Please make sure to document functions with the normal conventions we use to show function signatures, i.e. see

"""
setdefaults!(rn, newdefs)
Sets the default (initial) values of parameters and species in the
`ReactionSystem`, `rn`.
For example,
```julia
sir = @reaction_network SIR begin
β, S + I --> 2I
ν, I --> R
end
setdefaults!(sir, [:S => 999.0, :I => 1.0, :R => 1.0, :β => 1e-4, :ν => .01])
# or
@parameter β ν
@variables t
@species S(t) I(t) R(t)
setdefaults!(sir, [S => 999.0, I => 1.0, R => 0.0, β => 1e-4, ν => .01])
```
gives initial/default values to each of `S`, `I` and `β`
Notes:
- Can not be used to set default values for species, variables or parameters of
subsystems or constraint systems. Either set defaults for those systems
directly, or [`flatten`](@ref) to collate them into one system before setting
defaults.
- Defaults can be specified in any iterable container of symbols to value pairs
or symbolics to value pairs.
"""
function setdefaults!(rn, newdefs)

Please also add doc strings for the exported accessor functions for querying compounds.

Finally, please add these functions into a new API section on compounds within the docs in addition to the tutorial.

Thanks!

@isaacsas
Copy link
Member

Given the API change in #715 we’ll add new docs for that usage.

@isaacsas isaacsas closed this Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add documentation for chemistry related functionality
2 participants