ConductanceSystem
A ConductanceSystem
describes the state- and time-dependence of a conductance (i.e. classically g, the inverse of resistance; typically measured in Siemens). It can be used to model the conductance associated with ionic membrane currents, synaptic currents, and axial currents that flow between connected neuronal compartments. By default, a Conductance System
is composed of zero or more gates and a parameter for the maximum conductance value ($\overline{g}$). The output of a ConductanceSystem
is equal to the the product of each individual gate and $\overline{g}$.
To model sodium conductance in a Hodgkin-Huxley model:
using Conductor, ModelingToolkit, Unitful
import Unitful: mV, mS, cm
Vₘ = ParentScope(MembranePotential())
nav_kinetics = [
Gate(AlphaBeta,
ifelse(Vₘ == -40.0, 1.0, (0.1*(Vₘ + 40.0))/(1.0 - exp(-(Vₘ + 40.0)/10.0))),
4.0*exp(-(Vₘ + 65.0)/18.0), p = 3, name = :m)
Gate(AlphaBeta,
0.07*exp(-(Vₘ+65.0)/20.0),
1.0/(1.0 + exp(-(Vₘ + 35.0)/10.0)), name = :h)]
@named NaV = IonChannel(Sodium, nav_kinetics, max_g = 120mS/cm^2)
equations(NaV) # includes: g(t) ~ gbar*(m(t)^3)*h(t)
\[ \begin{align} \frac{\mathrm{d} m\left( t \right)}{\mathrm{d}t} =& \left( 1 - m\left( t \right) \right) \mathrm{ifelse}\left( 1, \frac{0.1 \left( 40 + V_m\left( t \right) \right)}{1 - e^{0.1 \left( -40 - V_m\left( t \right) \right)}}; \left( V_m\left( t \right) = -40 \right) \right) - 4 m\left( t \right) e^{0.055556 \left( -65 - V_m\left( t \right) \right)} \\ \frac{\mathrm{d} h\left( t \right)}{\mathrm{d}t} =& \frac{ - h\left( t \right)}{1 + e^{0.1 \left( -35 - V_m\left( t \right) \right)}} + 0.07 \left( 1 - h\left( t \right) \right) e^{0.05 \left( -65 - V_m\left( t \right) \right)} \\ g\left( t \right) =& \left( m\left( t \right) \right)^{3} gbar h\left( t \right) \end{align} \]
Conductor.ConductanceSystem
— Typestruct ConductanceSystem{T<:Conductor.ConductanceModel} <: Conductor.AbstractConductanceSystem
A model of conductance.
eqs
iv
: Independent variable. Defaults to time, $t$.states
ps
observed
name
systems
defaults
output
: Conductance, $g$, of the system.gbar
: Maximum conductance, $\overline{g}$.ion
: Permeability of the conductance.model
gate_vars
: Gating variables.extensions
: Additional systems to extend dynamics. Extensions are composed with the parent system during conversion toODESystem
.
inputs
Conductor.IonChannel
— FunctionIonChannel(ion, gate_vars; <keyword arguments>)
An ionic membrane conductance.
Arguments
max_g
: Default value for maximum conductance, $\overline{g}$.extensions::Vector{ODESystem}
: Additional systems to extend dynamics. Extensions are composed with the parent system during conversion toODESystem
.defaults::Dict
: Default values for states and parameters.name::Symbol
: Name of the system.
Conductor.AxialConductance
— FunctionAxialConductance(gate_vars; <keyword arguments>)
A non-specific conductance between morphologically contiguous compartments.
Arguments
max_g
: Maximum conductance, $\overline{g}$.extensions::Vector{ODESystem}
: Additional systems to extend dynamics. Extensions are composed with the parent system during conversion toODESystem
.defaults::Dict
: Default values for states and parameters.name::Symbol
: Name of the system.
Conductor.SynapticChannel
— FunctionSynapticChannel(ion, gate_vars; <keyword arguments>)
A synaptically activated conductance. Depends on extrinsic (i.e. presynaptic) state.
Arguments
max_g
: Maximum conductance, $\overline{g}$.extensions::Vector{ODESystem}
: Additional systems to extend dynamics. Extensions are composed with the parent system during conversion toODESystem
.aggregate::Bool
: whether the Conductance model should aggregate extrinsic sources of state instead of integrating them independently. Defaults tofalse
.defaults::Dict
: Default values for states and parameters.name::Symbol
: Name of the system.