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 – HH or Markov – when the conductance depends on voltage, time, or an ion concentration.

See also

IL

Concrete leak channel with a fixed conductance and reversal potential.

Notes

root_type is HHTypedNeuron: instances are attached to a Hodgkin-Huxley-typed neuron, not to an ion. There is no equation here – current() raises NotImplementedError and must be implemented by a subclass such as IL.

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