LeakageChannel#
- class braincell.channel.LeakageChannel(size, name=None)#
Base class for leakage channel dynamics.
A leak conductance is voltage-independent: it has no gating variables and no state to integrate, so every lifecycle hook below is a no-op (or, for
current(), an obligation for the subclass to fill in). Subclass this directly to model a passive, always-open conductance such as the resting leak of a compartment. Use an ion-specific channel template instead –HHorMarkov– when the conductance depends on voltage, time, or an ion concentration.See also
ILConcrete leak channel with a fixed conductance and reversal potential.
Notes
root_typeisHHTypedNeuron: instances are attached to a Hodgkin-Huxley-typed neuron, not to an ion. There is no equation here –current()raisesNotImplementedErrorand must be implemented by a subclass such asIL.- compute_derivative(V)[source]#
Compute the derivative of the channel state variables.
- Parameters:
V (array-like) – The membrane potential.
- current(V)[source]#
Calculate the current through the leakage channel.
- Parameters:
V (array-like) – The membrane potential.
Raises
-------
NotImplementedError – This method should be implemented by subclasses.
- init_state(V, batch_size=None)[source]#
Initialize the state of the leakage channel.
- Parameters:
V (array-like) – The membrane potential.
batch_size (
int) – The batch size for initialization.
- post_integral(V)[source]#
Perform any necessary operations after the integration step.
- Parameters:
V (array-like) – The membrane potential.
- pre_integral(V)[source]#
Perform any necessary operations before the integration step.
- Parameters:
V (array-like) – The membrane potential.
- reset_state(V, batch_size=None)[source]#
Reset the state of the leakage channel.
- Parameters:
V (array-like) – The membrane potential.
batch_size (
int) – The batch size for resetting.
- root_type#
alias of
HHTypedNeuron