MixIons#
- class braincell.MixIons(*ions, name=None, **channels)#
A pool for channels whose current depends on more than one ion.
A calcium-dependent potassium channel needs both the potassium reversal potential and the calcium concentration, so it cannot hang off either pool alone. It declares a joint
root_typeand is registered here instead; each of its owner ions then sees its current throughIon.register_external_current().- Parameters:
- Variables:
- Raises:
AssertionError – If fewer than two ions are given, if any is not an
Ion, or if their sizes differ.
- add(**elements)[source]#
Register new children with the container.
- Parameters:
*elems – Positional elements to add, for subclasses that accept them.
**elements – Named elements to add, keyed by the name to register them under.
- Raises:
NotImplementedError – Always, in the base class. Subclasses must override.
- current(V)[source]#
Sum the current carried by every channel in this mixed pool.
- Returns:
The summed current, or
Nonewhen the pool holds no channels.Noneis the same “nothing to contribute” sentinelIon.current()returns; this used to be a bare, unitless0.0, which made summing over a pool crash with a unit mismatch instead.- Return type:
brainunit.Quantity or None
- ind_update(V, *args, **kwargs)[source]#
Let every self-integrating child in this pool advance itself.
- reset_state(V, batch_size=None)[source]#
Return every channel in this mixed pool to its initial state.
- root_type#
alias of
HHTypedNeuron