braincell.mech module#
Declarative mechanism specs for braincell.Cell.
The braincell.mech package is purely declarative: it describes
what to install on a cell without touching runtime state, JAX, or
brainstate. Every declaration type inherits from the
Mechanism marker base class.
Density mechanisms — distributed over a region of a cell. See
Densityand its concrete subclassesChannel(for ion channels) andIon(for ion species). Both accept a registry key string or a class object for their first positional argument.Point mechanisms — attached to a single location. See
Pointand its concrete subclassesCurrentClamp,SineClamp,FunctionClamp,StateProbe,MechanismProbe,CurrentProbe,ProbeMechanism, andSynapse.Junctionis the gap-junction point declaration and lives inbraincell.mech._junction.
Passive cable properties are recorded via CableProperty.
Class lookup by name is handled by MechanismRegistry
(accessed through get_registry()). Concrete channel / ion /
synapse classes register themselves with the global registry via the
register_channel() / register_ion() /
register_synapse() decorators, which run as a side effect of
importing braincell.channel / braincell.ion /
braincell.synapse.
See also
braincell.channelConcrete ion-channel implementations.
braincell.ionConcrete ion-species implementations.
braincell.synapseConcrete synapse implementations.
braincell.mech is the purely declarative mechanism layer for
braincell.Cell. It describes what to install on a cell without
touching runtime state, JAX, or brainstate. Every declaration inherits
from the Mechanism marker base class and splits into two families:
Density mechanisms are distributed over a region of a cell (
Densityand its concrete subclassesChannelfor ion channels andIonfor ion species).Point mechanisms are attached to a single location (
Pointand its subclasses, includingSynapse,Junction, and the probe declarations).
The passive cable property and the stimulus clamps
(CableProperty, CurrentClamp,
SineClamp, FunctionClamp) are also
declared here but are re-exported at the top level; see
braincell module for their reference entries.
Base#
Density Mechanisms#
Point Mechanisms#
Probes#
Probe for cell-owned state at one placed location. |
|
Probe for runtime state on a named mechanism. |
|
Probe for current at a placed location. |
|
Observer that records a named variable at a point location. |