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

Proposed hh model example changes #867

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/pages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pages = Any[
"Model creation examples" => Any[
"model_creation/examples/basic_CRN_library.md",
"model_creation/examples/programmatic_generative_linear_pathway.md",
#"model_creation/examples/hodgkin_huxley_equation.md",
"model_creation/examples/hodgkin_huxley_equation.md",
#"model_creation/examples/smoluchowski_coagulation_equation.md"
]
],
Expand Down
4 changes: 3 additions & 1 deletion docs/src/model_creation/examples/hodgkin_huxley_equation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cells such as neurons and muscle cells.
We begin by importing some necessary packages.
```@example hh1
using ModelingToolkit, Catalyst, NonlinearSolve
using DifferentialEquations, Symbolics
using OrdinaryDiffEq, Symbolics
using Plots
t = default_t()
D = default_time_deriv()
Expand Down Expand Up @@ -77,6 +77,7 @@ I = I₀ * sin(2*pi*t/30)^2
# get the gating variables to use in the equation for dV/dt
@unpack m,n,h = hhrn

Dₜ = default_time_deriv()
eqs = [Dₜ(V) ~ -1/C * (ḡK*n^4*(V-EK) + ḡNa*m^3*h*(V-ENa) + ḡL*(V-EL)) + I/C]
@named voltageode = ODESystem(eqs, t)
nothing # hide
Expand All @@ -88,6 +89,7 @@ Finally, we add this ODE into the reaction model as

```@example hh1
@named hhmodel = extend(voltageode, hhrn)
hhmodel = complete(hhmodel)
nothing # hide
```

Expand Down
Loading