Conductor.R
— ConstantUniversal Gas Constant (base units)
Conductor.SpecificCapacitance
— TypeCapacitance per unit area.
Conductor.SpecificConductance
— TypeConductance per unit area.
Conductor.mR
— ConstantUniversal Gas Constant (milli-)
Scaled by 1000x. Results in output
Conductor.t
— ConstantThe independent variable for time, $t$.
Conductor.ℱ
— ConstantFaraday's Constant
The electric charge of one mole of electrons.
Unicode ℱ can be typed by writing \scrF then pressing tab in the Julia REPL, and in many editors.
Examples
julia> Conductor.ℱ
96485.33212331001 C mol^-1
Conductor.CompartmentSystem
— Typestruct CompartmentSystem{T<:Conductor.AbstractDynamics} <: Conductor.AbstractCompartmentSystem
A neuronal compartment.
voltage::Symbolics.Num
: Voltage potential.dynamics::Conductor.AbstractDynamics
capacitance::Union{Nothing, Symbolics.Num}
: Membrane capacitance.eqs::Vector{Symbolics.Equation}
iv::Symbolics.Num
: Independent variable. Defaults to time, $t$.states::Vector{Symbolics.Num}
ps::Vector{Symbolics.Num}
observed::Vector{Symbolics.Equation}
name::Symbol
systems::Vector{ModelingToolkit.AbstractTimeDependentSystem}
defaults::Dict
extensions::Vector{ModelingToolkit.ODESystem}
: Additional systems to extend dynamics. Extensions are composed with the parent system during conversion toODESystem
.
synapses::Vector{Synapse{<:ModelingToolkit.AbstractSystem}}
arbor::Conductor.Arborization
stimuli::Vector{<:Conductor.StimulusModel}
geometry::Conductor.Geometry
: Morphological geometry of the compartment.
Conductor.CompartmentSystem
— MethodCompartmentSystem(Vₘ, channels, reversals; <keyword arguments>)
Arguments
capacitance::SpecificCapacitance
: The capacitance of the compartment given in Farads per unit area (e.g. µF/cm^2).geometry::Geometry
: Morphological geometry of the compartment.extensions::Vector{ODESystem}
: Additional systems to extend dynamics. Extensions are composed with the parent system during conversion toODESystem
.stimuli::Vector{Equation}
:name::Symbol
: Name of the system.
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.ConductanceSystem
— MethodConductanceSystem(g, ion, gate_vars; <keyword arguments>)
Main constructor for ConductanceSystem
.
Arguments
gbar::Num
: Maximum conductance, $\overline{g}$.aggregate::Bool
: determines 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.
Conductor.EquilibriumPotential
— MethodEquilibriumPotential(ion::IonSpecies, val; <keyword arguments>)
An equilibrium (a.k.a. reversal) potential.
Arguments
dynamic::Bool = false
: a dynamicEquilbriumPotential
is assumed to vary with time (e.g. derived from the Nernst equation).name::Symbol = Symbol("I", Conductor.PERIODIC_SYMBOL[ion])
: the symbol to use for the symbolic variable. By default, a lookup table is used to find the ion's symbol on the periodic table of elements.
Conductor.Gate
— MethodGate(
form::Type{AlphaBeta},
α,
β;
name,
kwargs...
) -> Gate{AlphaBeta}
Accepts expressions for forward (α) and reverse (β) reaction rates as descriptors for its kinetics.
See also: get_eqs
.
Conductor.Gate
— MethodGate(
form::Type{Conductor.ParameterGate},
val;
name,
kwargs...
) -> Gate{Conductor.ParameterGate}
A static parameter gate with initial value, val
.
Conductor.Gate
— MethodGate(
form::Type{SimpleGate},
rhs::Symbolics.Num;
default,
name,
kwargs...
) -> Gate{SimpleGate}
Accepts any symbolic expression as an explicit definition of the gate dynamics.
Conductor.Gate
— MethodGate(
form::Type{SteadyStateTau},
x∞,
τₓ;
name,
kwargs...
) -> Gate{SteadyStateTau}
Accepts expressions for its steady-state activation, x∞(Vₘ), and the time constant, τₓ(Vₘ), as descriptors for its kinetics.
See also: get_eqs
.
Conductor.Gate
— Methodstruct Gate{T<:Conductor.GateVarForm} <: Conductor.AbstractGatingVariable
Low-level constructor for Gate
.
A gate has a single symbolic output
and stores properties (passed as a variable length list of keyword arguments). Gate properties are accessible via get
and getproperty
.
Example
julia> @variables t X(t)
2-element Vector{Num}:
t
X(t)
julia> g = Gate{MyGateType}(MyGateType, X, Equation[], prop1 = "foo", prop2 = 62)
Gate{MyGateType}(MyGateType, X(t), Symbolics.Equation[], Dict{Symbol, Any}(:prop2 => 62, :prop1 => "foo"))
julia> (g.prop1, g.prop2)
("foo", 62)
Conductor.GateVarForm
— Typeabstract type GateVarForm
Abstract supertype for extending the behavior of Gate
.
Stub subtypes of GateVarForm
are used as traits when writing new methods that call Gate
objects.
Example
struct MyNewGate <: Conductor.GateVarForm end
function Conductor.get_eqs(g::Gate{MyNewGate}, comp::CompartmentSystem)
# a function that returns a vector of equations defining gate dynamics
end
Conductor.IonConcentration
— TypeIonConcentration(ion::IonSpecies, val = nothing; <keyword arguments>)
An intra/extracellular concentration of ions.
Arguments
location::PrimitiveLocation = Inside
: location (Inside
orOutside
) w.r.t. the parent compartment (intracellular or extracellular).dynamic::Bool = false
: when false, the concentration will be a static parameter.name::Symbol = Conductor.PERIODIC_SYMBOL[ion]
: the symbol to use for the symbolic variable. By default, a lookup table is used to find the ion's symbol on the periodic table of elements.
Conductor.IonCurrent
— TypeIonCurrent(ion::IonSpecies, val = nothing; <keyword arguments>)
An ionic membrane current.
Arguments
aggregate::Bool = false
: aggregate currents are the sum of all conductances (with matched ion species) flowing into the parent compartment. For example, an aggregateIonCurrent
for Calcium will be the sum of all other Calcium-permeable currents.dynamic::Bool = true
: whendynamic == false
theIonCurrent
will be a static parameter value.name::Symbol = Symbol("I", Conductor.PERIODIC_SYMBOL[ion])
: the symbol to use for the symbolic variable. By default, a lookup table is used to find the ion's symbol on the periodic table of elements.
Conductor.IonSpecies
— TypeIon species to annotate ConductanceSystem
, IonCurrent
, IonConcentration
, etc. May be one of:
- NonIonic
- Sodium
- Potassium
- Chloride
- Calcium
- Cation
- Anion
- Glutamatergic
- Cholinergic
- AMPA
- NMDA
Conductor.MembranePotential
— TypeMembranePotential(V0 = -60mV; <keyword arguments>)
The voltage in an arbitrary compartment.
If V0 == nothing
, the default value of the resulting variable will be left unassigned.
Arguments
dynamic::Bool = true
: when false, the voltage will be a static parameter.source::PrimitiveSource = Intrinsic
: the expected origin of a voltage state.Intrinsic
sources are states from the parent compartment.Extrinsic
sources come from other compartments (e.g. presynaptic compartments).n::Integer = 1
: whenn > 1
, the voltage will be a symbolic array of lengthn
.name::Symbol = :Vₘ
: the symbol to use for the symbolic variable
Conductor.MultiCompartment
— MethodMultiCompartment(
topology::MultiCompartmentTopology;
extensions,
name,
defaults
) -> MultiCompartmentSystem
Basic constructor for a MultiCompartmentSystem
.
Conductor.MultiCompartmentSystem
— Typestruct MultiCompartmentSystem <: Conductor.AbstractCompartmentSystem
A neuron with 2+ morphologically connected compartments.
eqs::Vector{Symbolics.Equation}
iv::Symbolics.Num
: Independent variabe. Defaults to time, $t$.states::Vector{Symbolics.Num}
ps::Vector{Symbolics.Num}
observed::Vector{Symbolics.Equation}
name::Symbol
systems::Vector{ModelingToolkit.AbstractTimeDependentSystem}
defaults::Dict
topology::MultiCompartmentTopology
compartments::Vector{CompartmentSystem}
: Individual subcompartments of the neuron.extensions::Vector{ModelingToolkit.ODESystem}
: Additional systems to extend dynamics. Extensions are composed with the parent system during conversion toODESystem
.
Conductor.NeuronalNetworkSystem
— Typestruct NeuronalNetworkSystem <: Conductor.AbstractNeuronalNetworkSystem
A network of neurons with synaptic connections.
eqs::Vector{Symbolics.Equation}
iv::Symbolics.Num
: Independent variabe. Defaults to time, $t$.states::Vector
ps::Vector
observed::Vector{Symbolics.Equation}
name::Symbol
systems::Vector{ModelingToolkit.AbstractTimeDependentSystem}
defaults::Dict
topology::NetworkTopology
reversal_map::Dict
extensions::Vector{ModelingToolkit.ODESystem}
: Additional systems to extend dynamics. Extensions are composed with the parent system during conversion toODESystem
.
Conductor.NeuronalNetworkSystem
— TypeNeuronalNetworkSystem(
topology::NetworkTopology,
reversal_map
) -> NeuronalNetworkSystem
NeuronalNetworkSystem(
topology::NetworkTopology,
reversal_map,
extensions::Vector{<:ModelingToolkit.AbstractTimeDependentSystem};
defaults,
name
) -> NeuronalNetworkSystem
Basic constructor for a NeuronalNetworkSystem
.
Conductor.Population
— Typestruct Population{T<:Conductor.AbstractCompartmentSystem}
A population (or small group) of neurons.
A Population
is a lazy representation of neurons templated from a single model prototype. Iterating over a Population
returns up to n uniquely-named copies of the prototype that are serially numbered and, optionally, namespaced. Parameter values of the replicate neurons can be individually defined by indexed assignment, or applied to the entire group via distributions.
neurons
popname
: Base name of the population.defs
: Population defaultsstimuli
: Stimuli applied to select neurons.
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.D
— FunctionDifferential with respect to time, $t$.
Conductor.ExtrinsicPotential
— MethodExtrinsicPotential(; n = 1, name::Symbol = :Vₓ)
A voltage derived from an external source (i.e. not the parent compartment).
Equivalent to: MembranePotential(nothing; dynamic=true, source=Extrinsic, n=n, name=name)
Arguments
n::Integer = 1
: whenn > 1
, the voltage will be a symbolic array of lengthn
.name::Symbol = :Vₓ
: the symbol to use for the symbolic variable
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.Simulation
— MethodSimulation(
neuron::Conductor.AbstractCompartmentSystem,
tspan;
simplify,
parallel,
kwargs...
) -> Any
Compile and run a simulation of a single neuron
or network
of neurons for a specified duration, time
.
If return_system == true
, returns a simplified ODESystem
instead.
Conductor.SynapticChannel
— MethodSynapticChannel(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.
Conductor.Temperature
— MethodTemperature(temp; <keyword arguments>)
Temperature (in Kelvin)
Arguments
dynamic::Bool = false
: a dynamicTemperature
is assumed to vary with time.name::Symbol = :T
: the symbol to use for the symbolic variable.