Skip to content

Channels

The ion-channel library and gating abstractions. Channel factories (make_*_channel) build the IonChannel instances that populate a Neuron.

neuroclamp.channels

Ion channel subpackage for the conductance-based neuron simulator.

Re-exports the base channel types and all factory functions so external callers can import from neuroclamp.channels (or neuroclamp) without knowing the internal submodule layout.

GatingVariable dataclass

A single gating variable with its kinetic rate functions.

Rate functions always accept (V, ca_i) — voltage in mV and intracellular Ca²⁺ concentration in mM. Voltage-only gates simply ignore the ca_i argument.

Attributes:

Name Type Description
name str

Unique name used as a key in gating-state dicts (e.g. 'r').

power int

Exponent applied to this gate's value when computing conductance.

alpha Rate

Forward rate function alpha(V, ca_i) in units 1/ms.

beta Rate

Backward rate function beta(V, ca_i) in units 1/ms.

Source code in neuroclamp/channels/base.py
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
@dataclass(frozen=True)
class GatingVariable:
    """A single gating variable with its kinetic rate functions.

    Rate functions always accept ``(V, ca_i)`` — voltage in mV and
    intracellular Ca²⁺ concentration in mM.  Voltage-only gates simply ignore
    the ``ca_i`` argument.

    Attributes:
        name: Unique name used as a key in gating-state dicts (e.g. 'r').
        power: Exponent applied to this gate's value when computing conductance.
        alpha: Forward rate function ``alpha(V, ca_i)`` in units 1/ms.
        beta: Backward rate function ``beta(V, ca_i)`` in units 1/ms.
    """

    name: str
    power: int
    alpha: Rate
    beta: Rate

GoldmanSpec dataclass

Reversal potential specification using the Goldman-Hodgkin-Katz equation.

Used for channels permeable to multiple monovalent ion species (e.g. Ih, which passes both Na⁺ and K⁺). Each entry in permeabilities provides a relative permeability weight and the corresponding :class:IonSpecies; the actual concentrations are looked up from the neuron model at simulation time.

All species listed must be monovalent (|valence| == 1). For divalent ions use :class:NernstSpec instead.

Attributes:

Name Type Description
permeabilities tuple[tuple[IonSpecies, float], ...]

Tuple of (species, relative_permeability) pairs. Permeabilities are dimensionless and relative to each other; their absolute scale cancels in the GHK equation.

Raises:

Type Description
ValueError

If any species has |valence| != 1 or if any relative permeability is negative.

Source code in neuroclamp/channels/base.py
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@dataclass(frozen=True)
class GoldmanSpec:
    """Reversal potential specification using the Goldman-Hodgkin-Katz equation.

    Used for channels permeable to multiple monovalent ion species (e.g. Ih,
    which passes both Na⁺ and K⁺).  Each entry in *permeabilities* provides a
    relative permeability weight and the corresponding :class:`IonSpecies`; the
    actual concentrations are looked up from the neuron model at simulation time.

    All species listed must be monovalent (|valence| == 1).  For divalent ions
    use :class:`NernstSpec` instead.

    Attributes:
        permeabilities: Tuple of ``(species, relative_permeability)`` pairs.
            Permeabilities are dimensionless and relative to each other; their
            absolute scale cancels in the GHK equation.

    Raises:
        ValueError: If any species has |valence| != 1 or if any relative
            permeability is negative.
    """

    permeabilities: tuple[tuple[IonSpecies, float], ...]

    def __post_init__(self) -> None:
        """Validate that all species are monovalent and permeabilities non-negative."""
        for species, p in self.permeabilities:
            if abs(species.valence) != 1:
                raise ValueError(
                    f"GoldmanSpec only supports monovalent ions; "
                    f"{species.symbol} has valence {species.valence}. "
                    "Use NernstSpec for divalent ions."
                )
            if p < 0:
                raise ValueError(
                    f"Relative permeability for {species.symbol} must be "
                    f"non-negative, got {p}."
                )

__post_init__

__post_init__()

Validate that all species are monovalent and permeabilities non-negative.

Source code in neuroclamp/channels/base.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
def __post_init__(self) -> None:
    """Validate that all species are monovalent and permeabilities non-negative."""
    for species, p in self.permeabilities:
        if abs(species.valence) != 1:
            raise ValueError(
                f"GoldmanSpec only supports monovalent ions; "
                f"{species.symbol} has valence {species.valence}. "
                "Use NernstSpec for divalent ions."
            )
        if p < 0:
            raise ValueError(
                f"Relative permeability for {species.symbol} must be "
                f"non-negative, got {p}."
            )

IonChannel dataclass

An ion channel whose reversal potential is derived from ion concentrations.

Computes current as g_max * prod(gate^power) * (V - E_rev) where E_rev is computed at runtime from the neuron's ion concentrations using either the Nernst equation (:class:NernstSpec) or the Goldman-Hodgkin-Katz equation (:class:GoldmanSpec).

Attributes:

Name Type Description
name str

Human-readable channel identifier (e.g. 'Ih').

g_max float

Maximum conductance in mS/cm².

gating_variables tuple[GatingVariable, ...]

Tuple of gating variable descriptors.

reversal_spec ReversalSpec

Specification for how the reversal potential is computed from the neuron's ion concentrations.

carries_calcium bool

True for channels that carry Ca²⁺ ions (e.g. ICaL, ICaT, ICaN). Used by the simulation loop to accumulate Ca²⁺ influx for the intracellular Ca²⁺ ODE and to compute a live Nernst E_Ca in :meth:compute_current. Defaults to False.

Raises:

Type Description
ValueError

If g_max is negative or if gating variable names are not unique within the channel.

Source code in neuroclamp/channels/base.py
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
@dataclass(frozen=True)
class IonChannel:
    """An ion channel whose reversal potential is derived from ion concentrations.

    Computes current as ``g_max * prod(gate^power) * (V - E_rev)`` where
    ``E_rev`` is computed at runtime from the neuron's ion concentrations using
    either the Nernst equation (:class:`NernstSpec`) or the Goldman-Hodgkin-Katz
    equation (:class:`GoldmanSpec`).

    Attributes:
        name: Human-readable channel identifier (e.g. ``'Ih'``).
        g_max: Maximum conductance in mS/cm².
        gating_variables: Tuple of gating variable descriptors.
        reversal_spec: Specification for how the reversal potential is computed
            from the neuron's ion concentrations.
        carries_calcium: ``True`` for channels that carry Ca²⁺ ions (e.g.
            ICaL, ICaT, ICaN).  Used by the simulation loop to accumulate
            Ca²⁺ influx for the intracellular Ca²⁺ ODE and to compute a
            live Nernst E_Ca in :meth:`compute_current`.  Defaults to
            ``False``.

    Raises:
        ValueError: If ``g_max`` is negative or if gating variable names are
            not unique within the channel.
    """

    name: str
    g_max: float
    gating_variables: tuple["GatingVariable", ...]
    reversal_spec: ReversalSpec
    carries_calcium: bool = field(default=False)

    def __post_init__(self) -> None:
        """Validate channel parameters on construction."""
        if self.g_max < 0:
            raise ValueError(
                f"Channel '{self.name}': g_max must be non-negative, got {self.g_max}."
            )
        names = [gv.name for gv in self.gating_variables]
        if len(names) != len(set(names)):
            raise ValueError(
                f"Channel '{self.name}': gating variable names must be unique, "
                f"got {names}."
            )

    @property
    def current_name(self) -> str:
        """Structured-array field name for this channel's current contribution.

        Always prepends ``'I'`` to the channel name, so e.g. a channel named
        ``'Na'`` contributes a field named ``'INa'``, and a channel named
        ``'h'`` contributes a field named ``'Ih'``.

        Returns:
            The field name string used in simulation result structured arrays.
        """
        return f"I{self.name}"

    def reversal_potential(self, neuron: Any) -> float:
        """Compute the reversal potential from the neuron's ion concentrations.

        Dispatches to :func:`~neuroclamp.electrochemistry.nernst_potential` for a
        :class:`NernstSpec` or
        :func:`~neuroclamp.electrochemistry.goldman_potential` for a
        :class:`GoldmanSpec`, using the concentrations stored on *neuron*.

        Args:
            neuron: A :class:`~neuroclamp.neuron.Neuron` instance
                whose ``ion_concentrations()`` method is used to look up ion
                concentrations.

        Returns:
            Reversal potential in mV.
        """
        from ..electrochemistry import goldman_potential, nernst_potential

        spec = self.reversal_spec
        if isinstance(spec, NernstSpec):
            c_out, c_in = neuron.ion_concentrations(spec.species)
            return nernst_potential(spec.species.valence, neuron.T, c_out, c_in)
        # GoldmanSpec — separate cations from anions
        cation_terms = []
        anion_terms = []
        for species, p in spec.permeabilities:
            c_out, c_in = neuron.ion_concentrations(species)
            if species.valence > 0:
                cation_terms.append((p, c_out, c_in))
            else:
                anion_terms.append((p, c_out, c_in))
        return goldman_potential(neuron.T, cation_terms, anion_terms)

    def compute_current(
        self,
        V: float,
        gating_state: dict[str, float],
        neuron: Any,
        ca_i: float | None = None,
    ) -> float:
        """Compute the ionic current through this channel.

        Evaluates ``g_max * prod(gate^power) * (V - E_rev)``.

        For Ca²⁺-carrying channels (``carries_calcium=True``), ``E_rev`` is
        computed from the Nernst equation using *ca_i* as the live intracellular
        Ca²⁺ concentration, enabling dynamic reversal potentials.  When *ca_i*
        is ``None``, the neuron's static ``Ca_in`` is used as a fallback (e.g.
        during equilibrium evaluation).

        For all other channels, ``E_rev`` is read from
        ``neuron.reversal_potentials`` (the frozen-ion-concentration cache) or
        computed on-the-fly via :meth:`reversal_potential` when the channel is
        not registered on *neuron*.

        Args:
            V: Membrane voltage in mV.
            gating_state: Mapping from gating variable name to current value.
            neuron: The :class:`~neuroclamp.neuron.Neuron` model whose
                ``reversal_potentials`` cache and ion concentrations are used.
            ca_i: Live intracellular Ca²⁺ concentration in mM.  Only used when
                ``carries_calcium=True``; ignored otherwise.

        Returns:
            Ionic current in µA/cm².
        """
        g = self.g_max
        for gv in self.gating_variables:
            g *= gating_state[gv.name] ** gv.power
        if self.carries_calcium:
            ca = max(
                ca_i if ca_i is not None else neuron.Ca_in,
                _CA_NERNST_FLOOR,
            )
            e_rev = nernst_potential(2, neuron.T, neuron.Ca_out, ca)
        else:
            e_rev = neuron.reversal_potentials.get(self.name)
            if e_rev is None:
                e_rev = self.reversal_potential(neuron)
        return g * (V - e_rev)

current_name property

current_name

Structured-array field name for this channel's current contribution.

Always prepends 'I' to the channel name, so e.g. a channel named 'Na' contributes a field named 'INa', and a channel named 'h' contributes a field named 'Ih'.

Returns:

Type Description
str

The field name string used in simulation result structured arrays.

__post_init__

__post_init__()

Validate channel parameters on construction.

Source code in neuroclamp/channels/base.py
168
169
170
171
172
173
174
175
176
177
178
179
def __post_init__(self) -> None:
    """Validate channel parameters on construction."""
    if self.g_max < 0:
        raise ValueError(
            f"Channel '{self.name}': g_max must be non-negative, got {self.g_max}."
        )
    names = [gv.name for gv in self.gating_variables]
    if len(names) != len(set(names)):
        raise ValueError(
            f"Channel '{self.name}': gating variable names must be unique, "
            f"got {names}."
        )

reversal_potential

reversal_potential(neuron)

Compute the reversal potential from the neuron's ion concentrations.

Dispatches to :func:~neuroclamp.electrochemistry.nernst_potential for a :class:NernstSpec or :func:~neuroclamp.electrochemistry.goldman_potential for a :class:GoldmanSpec, using the concentrations stored on neuron.

Parameters:

Name Type Description Default
neuron Any

A :class:~neuroclamp.neuron.Neuron instance whose ion_concentrations() method is used to look up ion concentrations.

required

Returns:

Type Description
float

Reversal potential in mV.

Source code in neuroclamp/channels/base.py
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
def reversal_potential(self, neuron: Any) -> float:
    """Compute the reversal potential from the neuron's ion concentrations.

    Dispatches to :func:`~neuroclamp.electrochemistry.nernst_potential` for a
    :class:`NernstSpec` or
    :func:`~neuroclamp.electrochemistry.goldman_potential` for a
    :class:`GoldmanSpec`, using the concentrations stored on *neuron*.

    Args:
        neuron: A :class:`~neuroclamp.neuron.Neuron` instance
            whose ``ion_concentrations()`` method is used to look up ion
            concentrations.

    Returns:
        Reversal potential in mV.
    """
    from ..electrochemistry import goldman_potential, nernst_potential

    spec = self.reversal_spec
    if isinstance(spec, NernstSpec):
        c_out, c_in = neuron.ion_concentrations(spec.species)
        return nernst_potential(spec.species.valence, neuron.T, c_out, c_in)
    # GoldmanSpec — separate cations from anions
    cation_terms = []
    anion_terms = []
    for species, p in spec.permeabilities:
        c_out, c_in = neuron.ion_concentrations(species)
        if species.valence > 0:
            cation_terms.append((p, c_out, c_in))
        else:
            anion_terms.append((p, c_out, c_in))
    return goldman_potential(neuron.T, cation_terms, anion_terms)

compute_current

compute_current(V, gating_state, neuron, ca_i=None)

Compute the ionic current through this channel.

Evaluates g_max * prod(gate^power) * (V - E_rev).

For Ca²⁺-carrying channels (carries_calcium=True), E_rev is computed from the Nernst equation using ca_i as the live intracellular Ca²⁺ concentration, enabling dynamic reversal potentials. When ca_i is None, the neuron's static Ca_in is used as a fallback (e.g. during equilibrium evaluation).

For all other channels, E_rev is read from neuron.reversal_potentials (the frozen-ion-concentration cache) or computed on-the-fly via :meth:reversal_potential when the channel is not registered on neuron.

Parameters:

Name Type Description Default
V float

Membrane voltage in mV.

required
gating_state dict[str, float]

Mapping from gating variable name to current value.

required
neuron Any

The :class:~neuroclamp.neuron.Neuron model whose reversal_potentials cache and ion concentrations are used.

required
ca_i float | None

Live intracellular Ca²⁺ concentration in mM. Only used when carries_calcium=True; ignored otherwise.

None

Returns:

Type Description
float

Ionic current in µA/cm².

Source code in neuroclamp/channels/base.py
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
def compute_current(
    self,
    V: float,
    gating_state: dict[str, float],
    neuron: Any,
    ca_i: float | None = None,
) -> float:
    """Compute the ionic current through this channel.

    Evaluates ``g_max * prod(gate^power) * (V - E_rev)``.

    For Ca²⁺-carrying channels (``carries_calcium=True``), ``E_rev`` is
    computed from the Nernst equation using *ca_i* as the live intracellular
    Ca²⁺ concentration, enabling dynamic reversal potentials.  When *ca_i*
    is ``None``, the neuron's static ``Ca_in`` is used as a fallback (e.g.
    during equilibrium evaluation).

    For all other channels, ``E_rev`` is read from
    ``neuron.reversal_potentials`` (the frozen-ion-concentration cache) or
    computed on-the-fly via :meth:`reversal_potential` when the channel is
    not registered on *neuron*.

    Args:
        V: Membrane voltage in mV.
        gating_state: Mapping from gating variable name to current value.
        neuron: The :class:`~neuroclamp.neuron.Neuron` model whose
            ``reversal_potentials`` cache and ion concentrations are used.
        ca_i: Live intracellular Ca²⁺ concentration in mM.  Only used when
            ``carries_calcium=True``; ignored otherwise.

    Returns:
        Ionic current in µA/cm².
    """
    g = self.g_max
    for gv in self.gating_variables:
        g *= gating_state[gv.name] ** gv.power
    if self.carries_calcium:
        ca = max(
            ca_i if ca_i is not None else neuron.Ca_in,
            _CA_NERNST_FLOOR,
        )
        e_rev = nernst_potential(2, neuron.T, neuron.Ca_out, ca)
    else:
        e_rev = neuron.reversal_potentials.get(self.name)
        if e_rev is None:
            e_rev = self.reversal_potential(neuron)
    return g * (V - e_rev)

IonSpecies

Bases: Enum

Ion species with associated valence and symbol.

Each member stores its chemical symbol and ionic valence, which are used when looking up concentrations from the neuron model and when computing Nernst potentials.

Attributes:

Name Type Description
SODIUM

Na⁺, valence +1.

POTASSIUM

K⁺, valence +1.

CALCIUM

Ca²⁺, valence +2.

Source code in neuroclamp/channels/base.py
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
class IonSpecies(Enum):
    """Ion species with associated valence and symbol.

    Each member stores its chemical symbol and ionic valence, which are used
    when looking up concentrations from the neuron model and when computing
    Nernst potentials.

    Attributes:
        SODIUM: Na⁺, valence +1.
        POTASSIUM: K⁺, valence +1.
        CALCIUM: Ca²⁺, valence +2.
    """

    SODIUM = ("Na", 1)
    POTASSIUM = ("K", 1)
    CALCIUM = ("Ca", 2)

    def __init__(self, symbol: str, valence: int) -> None:
        """Initialize the enum member with its symbol and valence.

        Args:
            symbol: Chemical symbol string (e.g. ``'Na'``).
            valence: Signed ionic charge (e.g. ``+1`` for Na⁺, ``+2`` for Ca²⁺).
        """
        self._symbol = symbol
        self._valence = valence

    @property
    def symbol(self) -> str:
        """Chemical symbol string (e.g. ``'Na'``)."""
        return self._symbol

    @property
    def valence(self) -> int:
        """Signed ionic valence (e.g. +1 for Na⁺, -1 for Cl⁻)."""
        return self._valence

symbol property

symbol

Chemical symbol string (e.g. 'Na').

valence property

valence

Signed ionic valence (e.g. +1 for Na⁺, -1 for Cl⁻).

__init__

__init__(symbol, valence)

Initialize the enum member with its symbol and valence.

Parameters:

Name Type Description Default
symbol str

Chemical symbol string (e.g. 'Na').

required
valence int

Signed ionic charge (e.g. +1 for Na⁺, +2 for Ca²⁺).

required
Source code in neuroclamp/channels/base.py
36
37
38
39
40
41
42
43
44
def __init__(self, symbol: str, valence: int) -> None:
    """Initialize the enum member with its symbol and valence.

    Args:
        symbol: Chemical symbol string (e.g. ``'Na'``).
        valence: Signed ionic charge (e.g. ``+1`` for Na⁺, ``+2`` for Ca²⁺).
    """
    self._symbol = symbol
    self._valence = valence

NernstSpec dataclass

Reversal potential specification using the Nernst equation.

The reversal potential is computed at simulation time from the ion concentrations stored in the neuron model using the Nernst equation.

Attributes:

Name Type Description
species IonSpecies

The ion species that carries current through this channel.

Source code in neuroclamp/channels/base.py
57
58
59
60
61
62
63
64
65
66
67
68
@dataclass(frozen=True)
class NernstSpec:
    """Reversal potential specification using the Nernst equation.

    The reversal potential is computed at simulation time from the ion
    concentrations stored in the neuron model using the Nernst equation.

    Attributes:
        species: The ion species that carries current through this channel.
    """

    species: IonSpecies

make_ical_channel

make_ical_channel(g_max=DEFAULT_G_ICAL)

Create an ICaL (L-type Ca²⁺) ion channel.

ICaL is a high-voltage-activated Ca²⁺ channel with slow voltage-dependent inactivation. It is the dominant source of Ca²⁺ influx during action potentials in many neuron types. It uses two gating variables: d (activation, power 2) and f (inactivation, power 1).

Because ICaL carries Ca²⁺, carries_calcium=True is set so that the simulation loop accumulates its contribution for the Ca²⁺ ODE and :meth:~neuroclamp.channels.IonChannel.compute_current uses live ca_i for a dynamic E_Ca.

Kinetics use Boltzmann-cosh rate functions with activation centered at -10 mV (slope 6.2 mV) and inactivation centered at -35 mV (slope -9 mV, inverted).

The reversal potential is computed dynamically from the neuron's Ca²⁺ concentrations using the Nernst equation.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_ICAL.

DEFAULT_G_ICAL

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the ICaL current.

Source code in neuroclamp/channels/auxiliary.py
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
def make_ical_channel(
    g_max: float = DEFAULT_G_ICAL,
) -> IonChannel:
    """Create an ICaL (L-type Ca²⁺) ion channel.

    ICaL is a high-voltage-activated Ca²⁺ channel with slow voltage-dependent
    inactivation.  It is the dominant source of Ca²⁺ influx during action
    potentials in many neuron types.  It uses two gating variables: ``d``
    (activation, power 2) and ``f`` (inactivation, power 1).

    Because ICaL carries Ca²⁺, ``carries_calcium=True`` is set so that
    the simulation loop accumulates its contribution for the Ca²⁺ ODE
    and :meth:`~neuroclamp.channels.IonChannel.compute_current` uses live
    ``ca_i`` for a dynamic E_Ca.

    Kinetics use Boltzmann-cosh rate functions with activation centered at
    -10 mV (slope 6.2 mV) and inactivation centered at -35 mV (slope -9 mV,
    inverted).

    The reversal potential is computed dynamically from the neuron's Ca²⁺
    concentrations using the Nernst equation.

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_ICAL`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the ICaL current.
    """
    d_var = GatingVariable(name="d", power=2, alpha=_alpha_d, beta=_beta_d)
    f_var = GatingVariable(name="f", power=1, alpha=_alpha_f, beta=_beta_f)
    return IonChannel(
        name="CaL",
        g_max=g_max,
        gating_variables=(d_var, f_var),
        reversal_spec=NernstSpec(IonSpecies.CALCIUM),
        carries_calcium=True,
    )

make_ican_channel

make_ican_channel(g_max=DEFAULT_G_ICAN)

Create an ICaN (N-type Ca²⁺) ion channel.

ICaN is a high-voltage-activated Ca²⁺ channel that inactivates more rapidly than ICaL. It is widely expressed in neuronal dendrites and presynaptic terminals and contributes to neurotransmitter release. It uses two gating variables: dn (activation, power 2) and fn (inactivation, power 1).

Kinetics use Boltzmann-cosh rate functions with activation centered at -20 mV and inactivation centered at -40 mV.

The reversal potential is computed dynamically from the neuron's Ca²⁺ concentrations using the Nernst equation.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_ICAN.

DEFAULT_G_ICAN

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the ICaN current.

Source code in neuroclamp/channels/auxiliary.py
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
def make_ican_channel(
    g_max: float = DEFAULT_G_ICAN,
) -> IonChannel:
    """Create an ICaN (N-type Ca²⁺) ion channel.

    ICaN is a high-voltage-activated Ca²⁺ channel that inactivates more
    rapidly than ICaL.  It is widely expressed in neuronal dendrites and
    presynaptic terminals and contributes to neurotransmitter release.
    It uses two gating variables: ``dn`` (activation, power 2) and
    ``fn`` (inactivation, power 1).

    Kinetics use Boltzmann-cosh rate functions with activation centered at
    -20 mV and inactivation centered at -40 mV.

    The reversal potential is computed dynamically from the neuron's Ca²⁺
    concentrations using the Nernst equation.

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_ICAN`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the ICaN current.
    """
    dn_var = GatingVariable(name="dn", power=2, alpha=_alpha_dn, beta=_beta_dn)
    fn_var = GatingVariable(name="fn", power=1, alpha=_alpha_fn, beta=_beta_fn)
    return IonChannel(
        name="CaN",
        g_max=g_max,
        gating_variables=(dn_var, fn_var),
        reversal_spec=NernstSpec(IonSpecies.CALCIUM),
        carries_calcium=True,
    )

make_icat_channel

make_icat_channel(g_max=DEFAULT_G_ICAT)

Create an ICaT (T-type Ca²⁺) ion channel.

ICaT is a low-voltage-activated, transient Ca²⁺ channel. It activates near the resting potential and contributes to burst firing and oscillatory behavior (e.g. in thalamic neurons). It uses two gating variables: dt (activation, power 2) and ft (inactivation, power 1).

Kinetics follow Destexhe et al. (1994) with activation half-point at -56 mV and inactivation half-point at -80 mV.

The reversal potential is computed dynamically from the neuron's Ca²⁺ concentrations using the Nernst equation.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_ICAT.

DEFAULT_G_ICAT

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the ICaT current.

Source code in neuroclamp/channels/auxiliary.py
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
def make_icat_channel(
    g_max: float = DEFAULT_G_ICAT,
) -> IonChannel:
    """Create an ICaT (T-type Ca²⁺) ion channel.

    ICaT is a low-voltage-activated, transient Ca²⁺ channel.  It activates
    near the resting potential and contributes to burst firing and
    oscillatory behavior (e.g. in thalamic neurons).  It uses two gating
    variables: ``dt`` (activation, power 2) and ``ft`` (inactivation, power 1).

    Kinetics follow Destexhe et al. (1994) with activation half-point at
    -56 mV and inactivation half-point at -80 mV.

    The reversal potential is computed dynamically from the neuron's Ca²⁺
    concentrations using the Nernst equation.

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_ICAT`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the ICaT current.
    """
    dt_var = GatingVariable(name="dt", power=2, alpha=_alpha_dt, beta=_beta_dt)
    ft_var = GatingVariable(name="ft", power=1, alpha=_alpha_ft, beta=_beta_ft)
    return IonChannel(
        name="CaT",
        g_max=g_max,
        gating_variables=(dt_var, ft_var),
        reversal_spec=NernstSpec(IonSpecies.CALCIUM),
        carries_calcium=True,
    )

make_ih_channel

make_ih_channel(g_max=DEFAULT_G_IH, p_na=DEFAULT_IH_P_NA)

Create an Ih (HCN/funny current) ion channel.

The Ih channel is hyperpolarization-activated and carries a mixed Na⁺/K⁺ cation current. It is responsible for the depolarizing sag potential seen during sustained hyperpolarization in many neuron types.

Kinetics follow Destexhe et al. (1993) with a single gating variable r (power 1). At resting potential (~-65 mV) the channel is largely closed; deep hyperpolarization (~-100 mV) activates it strongly.

The reversal potential is computed dynamically from the neuron's Na⁺ and K⁺ concentrations using the Goldman-Hodgkin-Katz equation, parameterised by the Na⁺ permeability relative to K⁺ (p_na).

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_IH.

DEFAULT_G_IH
p_na float

Na⁺ permeability relative to K⁺ (dimensionless). A value of ~0.289 yields a reversal potential near -30 mV at default HH ion concentrations. Defaults to :data:~neuroclamp.constants.DEFAULT_IH_P_NA.

DEFAULT_IH_P_NA

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the Ih current.

Source code in neuroclamp/channels/auxiliary.py
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
def make_ih_channel(
    g_max: float = DEFAULT_G_IH,
    p_na: float = DEFAULT_IH_P_NA,
) -> IonChannel:
    """Create an Ih (HCN/funny current) ion channel.

    The Ih channel is hyperpolarization-activated and carries a mixed Na⁺/K⁺
    cation current. It is responsible for the depolarizing sag potential seen
    during sustained hyperpolarization in many neuron types.

    Kinetics follow Destexhe et al. (1993) with a single gating variable ``r``
    (power 1).  At resting potential (~-65 mV) the channel is largely closed;
    deep hyperpolarization (~-100 mV) activates it strongly.

    The reversal potential is computed dynamically from the neuron's Na⁺ and
    K⁺ concentrations using the Goldman-Hodgkin-Katz equation, parameterised by
    the Na⁺ permeability relative to K⁺ (``p_na``).

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_IH`.
        p_na: Na⁺ permeability relative to K⁺ (dimensionless). A value of
            ~0.289 yields a reversal potential near -30 mV at default HH ion
            concentrations.  Defaults to
            :data:`~neuroclamp.constants.DEFAULT_IH_P_NA`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the Ih current.
    """
    r_var = GatingVariable(name="r", power=1, alpha=_alpha_r, beta=_beta_r)
    return IonChannel(
        name="h",
        g_max=g_max,
        gating_variables=(r_var,),
        reversal_spec=GoldmanSpec(
            permeabilities=(
                (IonSpecies.SODIUM, p_na),
                (IonSpecies.POTASSIUM, 1.0),
            )
        ),
    )

make_ika_channel

make_ika_channel(g_max=DEFAULT_G_IKA)

Create an IKa (A-type K⁺) ion channel.

IKa is a fast-inactivating, transient K⁺ current that delays the first spike and controls firing rate at stimulus onset. It uses two gating variables: a (activation, power 1) and b (inactivation, power 1).

Kinetics follow Traub & Miles (1991) hippocampal neuron models, shifted by -65 mV to match this codebase's absolute voltage convention.

The reversal potential is computed dynamically from the neuron's K⁺ concentrations using the Nernst equation.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_IKA.

DEFAULT_G_IKA

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the IKa current.

Source code in neuroclamp/channels/auxiliary.py
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
def make_ika_channel(
    g_max: float = DEFAULT_G_IKA,
) -> IonChannel:
    """Create an IKa (A-type K⁺) ion channel.

    IKa is a fast-inactivating, transient K⁺ current that delays the first
    spike and controls firing rate at stimulus onset.  It uses two gating
    variables: ``a`` (activation, power 1) and ``b`` (inactivation, power 1).

    Kinetics follow Traub & Miles (1991) hippocampal neuron models, shifted by
    -65 mV to match this codebase's absolute voltage convention.

    The reversal potential is computed dynamically from the neuron's K⁺
    concentrations using the Nernst equation.

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_IKA`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the IKa current.
    """
    a_var = GatingVariable(name="a", power=1, alpha=_alpha_a, beta=_beta_a)
    b_var = GatingVariable(name="b", power=1, alpha=_alpha_b, beta=_beta_b)
    return IonChannel(
        name="Ka",
        g_max=g_max,
        gating_variables=(a_var, b_var),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_ikca_channel

make_ikca_channel(g_max=DEFAULT_G_IKCA)

Create an IKCa (calcium-activated K⁺) ion channel.

IKCa is a BK-like K⁺ channel activated by both membrane depolarization and elevated intracellular Ca²⁺. It contributes to spike repolarization and the afterhyperpolarization following Ca²⁺ entry. It uses a single gating variable q (power 1) whose kinetics depend on both voltage and [Ca²⁺]ᵢ.

Note: IKCa is calcium-activated but carries K⁺, not Ca²⁺. carries_calcium is False.

Kinetics use a Hill function (K_d = 0.001 mM, n = 1) multiplied by a Boltzmann voltage factor (half-activation at -20 mV) for the steady state, and a cosh-based voltage-dependent time constant.

The reversal potential is computed dynamically from the neuron's K⁺ concentrations using the Nernst equation.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_IKCA.

DEFAULT_G_IKCA

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the IKCa current.

Source code in neuroclamp/channels/auxiliary.py
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
def make_ikca_channel(
    g_max: float = DEFAULT_G_IKCA,
) -> IonChannel:
    """Create an IKCa (calcium-activated K⁺) ion channel.

    IKCa is a BK-like K⁺ channel activated by both membrane depolarization
    and elevated intracellular Ca²⁺.  It contributes to spike repolarization
    and the afterhyperpolarization following Ca²⁺ entry.  It uses a single
    gating variable ``q`` (power 1) whose kinetics depend on both voltage and
    [Ca²⁺]ᵢ.

    Note: IKCa is calcium-*activated* but carries K⁺, not Ca²⁺.
    ``carries_calcium`` is ``False``.

    Kinetics use a Hill function (K_d = 0.001 mM, n = 1) multiplied by a
    Boltzmann voltage factor (half-activation at -20 mV) for the steady state,
    and a cosh-based voltage-dependent time constant.

    The reversal potential is computed dynamically from the neuron's K⁺
    concentrations using the Nernst equation.

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_IKCA`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the IKCa current.
    """
    q_var = GatingVariable(name="q", power=1, alpha=_alpha_q, beta=_beta_q)
    return IonChannel(
        name="KCa",
        g_max=g_max,
        gating_variables=(q_var,),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_ikir_channel

make_ikir_channel(g_max=DEFAULT_G_IKIR)

Create an IKir (inward rectifier K⁺) ion channel.

IKir is a K⁺ channel that is most active at hyperpolarized potentials (inward rectification). It helps stabilize the resting potential and contributes a large conductance near the K⁺ equilibrium potential. It uses a single gating variable kir (power 1).

Kinetics follow Hagiwara & Takahashi (1974) / Steephen & Bhalla (2009), with an inverted Boltzmann activation centered at -80 mV and a fast cosh-based time constant.

The reversal potential is computed dynamically from the neuron's K⁺ concentrations using the Nernst equation.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_IKIR.

DEFAULT_G_IKIR

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the IKir current.

Source code in neuroclamp/channels/auxiliary.py
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
def make_ikir_channel(
    g_max: float = DEFAULT_G_IKIR,
) -> IonChannel:
    """Create an IKir (inward rectifier K⁺) ion channel.

    IKir is a K⁺ channel that is most active at hyperpolarized potentials
    (inward rectification).  It helps stabilize the resting potential and
    contributes a large conductance near the K⁺ equilibrium potential.
    It uses a single gating variable ``kir`` (power 1).

    Kinetics follow Hagiwara & Takahashi (1974) / Steephen & Bhalla (2009),
    with an inverted Boltzmann activation centered at -80 mV and a fast
    cosh-based time constant.

    The reversal potential is computed dynamically from the neuron's K⁺
    concentrations using the Nernst equation.

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_IKIR`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the IKir current.
    """
    kir_var = GatingVariable(name="kir", power=1, alpha=_alpha_kir, beta=_beta_kir)
    return IonChannel(
        name="Kir",
        g_max=g_max,
        gating_variables=(kir_var,),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_ikv31_channel

make_ikv31_channel(g_max=DEFAULT_G_IKV31)

Create an IKv31 (Kv3.1-type K⁺) ion channel.

IKv31 is a high-threshold, fast-deactivating delayed-rectifier K⁺ current that is the hallmark conductance of fast-spiking interneurons. Its high activation threshold (~−12 mV V₁/₂) means it is virtually closed at rest, preventing the spurious hyperpolarization that a low-threshold K⁺ channel would produce. Fast deactivation enables rapid repolarization and supports high-frequency firing without adaptation.

Uses a single activation gate nk with power 2 (n-squared kinetics from Erisir et al. 1999). The reversal potential is computed dynamically from the neuron's K⁺ concentrations via the Nernst equation.

Kinetics follow Erisir et al. (1999), J. Neurophysiol. 82:2476, expressed with Boltzmann/cosh rate functions:

  • V₁/₂ = −12.4 mV, slope = 11.8 mV
  • τ_scale = 4.0 ms, τ_floor = 0.2 ms

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_IKV31.

DEFAULT_G_IKV31

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the IKv31

IonChannel

current.

Source code in neuroclamp/channels/auxiliary.py
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
def make_ikv31_channel(
    g_max: float = DEFAULT_G_IKV31,
) -> IonChannel:
    """Create an IKv31 (Kv3.1-type K⁺) ion channel.

    IKv31 is a high-threshold, fast-deactivating delayed-rectifier K⁺ current
    that is the hallmark conductance of fast-spiking interneurons.  Its high
    activation threshold (~−12 mV V₁/₂) means it is virtually closed at rest,
    preventing the spurious hyperpolarization that a low-threshold K⁺ channel
    would produce.  Fast deactivation enables rapid repolarization and supports
    high-frequency firing without adaptation.

    Uses a single activation gate ``nk`` with power 2 (n-squared kinetics from
    Erisir et al. 1999).  The reversal potential is computed dynamically from
    the neuron's K⁺ concentrations via the Nernst equation.

    Kinetics follow Erisir et al. (1999), J. Neurophysiol. 82:2476, expressed
    with Boltzmann/cosh rate functions:

    * V₁/₂ = −12.4 mV, slope = 11.8 mV
    * τ_scale = 4.0 ms, τ_floor = 0.2 ms

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_IKV31`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the IKv31
        current.
    """
    nk_var = GatingVariable(
        name="nk",
        power=2,
        alpha=_ikv31_alpha_nk,
        beta=_ikv31_beta_nk,
    )
    return IonChannel(
        name="Kv31",
        g_max=g_max,
        gating_variables=(nk_var,),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_im_channel

make_im_channel(g_max=DEFAULT_G_IM)

Create an IM (muscarinic K⁺) ion channel.

IM is a slow, non-inactivating K⁺ current that is suppressed by muscarinic receptor activation. It contributes to spike-frequency adaptation and the medium afterhyperpolarization. It uses a single gating variable w (power 1).

Kinetics follow Adams et al. (1982) / Traub & Miles (1991) with a Boltzmann activation centered at -35 mV and a slow cosh-based time constant (~150 ms near -35 mV).

The reversal potential is computed dynamically from the neuron's K⁺ concentrations using the Nernst equation.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_IM.

DEFAULT_G_IM

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the IM current.

Source code in neuroclamp/channels/auxiliary.py
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
def make_im_channel(
    g_max: float = DEFAULT_G_IM,
) -> IonChannel:
    """Create an IM (muscarinic K⁺) ion channel.

    IM is a slow, non-inactivating K⁺ current that is suppressed by
    muscarinic receptor activation.  It contributes to spike-frequency
    adaptation and the medium afterhyperpolarization.  It uses a single
    gating variable ``w`` (power 1).

    Kinetics follow Adams et al. (1982) / Traub & Miles (1991) with a
    Boltzmann activation centered at -35 mV and a slow cosh-based time
    constant (~150 ms near -35 mV).

    The reversal potential is computed dynamically from the neuron's K⁺
    concentrations using the Nernst equation.

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_IM`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the IM current.
    """
    w_var = GatingVariable(name="w", power=1, alpha=_alpha_w, beta=_beta_w)
    return IonChannel(
        name="M",
        g_max=g_max,
        gating_variables=(w_var,),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_inap_channel

make_inap_channel(g_max=DEFAULT_G_NAP)

Create an INaP (persistent Na⁺) ion channel.

INaP is a sustained Na⁺ current active near the resting potential that amplifies subthreshold depolarizations and can lower the threshold for action potential generation.

The channel always includes two gates: an activation gate p (Magistretti & Alonso 1999 kinetics, V½ = −52.6 mV) and a slow voltage-dependent inactivation gate sNaP (also Magistretti & Alonso 1999, §"Slow inactivation"; V½ = −45 mV, slope 7 mV, inverted Boltzmann; τ_scale = 200 ms / τ_floor = 20 ms). The slow gate is mostly available at hyperpolarized potentials and decays toward zero during sustained depolarization, providing the escape mechanism that lets the membrane repolarize after a prolonged suprathreshold step. Native INaP biologically undergoes this slow inactivation (Magistretti & Alonso 1999), so the gate is part of the standard topology rather than an opt-in feature. The simulation column is named sNaP rather than s to avoid colliding with :func:make_inar_channel's activation gate, which is also named s.

The reversal potential is computed dynamically from the neuron's Na⁺ concentrations using the Nernst equation.

References
  • Magistretti & Alonso (1999), J. Gen. Physiol. 114:491 (entorhinal INaP activation and slow inactivation).

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_NAP.

DEFAULT_G_NAP

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the INaP current.

Source code in neuroclamp/channels/auxiliary.py
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
def make_inap_channel(g_max: float = DEFAULT_G_NAP) -> IonChannel:
    """Create an INaP (persistent Na⁺) ion channel.

    INaP is a sustained Na⁺ current active near the resting potential that
    amplifies subthreshold depolarizations and can lower the threshold for
    action potential generation.

    The channel always includes two gates: an activation gate ``p``
    (Magistretti & Alonso 1999 kinetics, V½ = −52.6 mV) and a slow
    voltage-dependent inactivation gate ``sNaP`` (also Magistretti &
    Alonso 1999, §"Slow inactivation"; V½ = −45 mV, slope 7 mV, inverted
    Boltzmann; τ_scale = 200 ms / τ_floor = 20 ms).  The slow gate is
    mostly available at hyperpolarized potentials and decays toward zero
    during sustained depolarization, providing the escape mechanism that
    lets the membrane repolarize after a prolonged suprathreshold step.
    Native INaP biologically undergoes this slow inactivation (Magistretti
    & Alonso 1999), so the gate is part of the standard topology rather
    than an opt-in feature.  The simulation column is named ``sNaP``
    rather than ``s`` to avoid colliding with :func:`make_inar_channel`'s
    activation gate, which is also named ``s``.

    The reversal potential is computed dynamically from the neuron's Na⁺
    concentrations using the Nernst equation.

    References:
        - Magistretti & Alonso (1999), J. Gen. Physiol. 114:491
          (entorhinal INaP activation and slow inactivation).

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_NAP`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the INaP current.
    """
    p_var = GatingVariable(name="p", power=1, alpha=_alpha_p, beta=_beta_p)
    s_var = GatingVariable(name="sNaP", power=1, alpha=_alpha_sNaP, beta=_beta_sNaP)
    return IonChannel(
        name="NaP",
        g_max=g_max,
        gating_variables=(p_var, s_var),
        reversal_spec=NernstSpec(IonSpecies.SODIUM),
    )

make_inar_channel

make_inar_channel(g_max=DEFAULT_G_NAR)

Create an INaR (resurgent Na⁺) ion channel.

INaR produces a transient inward Na⁺ current on membrane repolarization, known as the resurgent current. The mechanism relies on two gating variables: s (activation, power 1) and hr (unblocking, power 1).

At rest s is low and hr is high (channel closed but unblocked). During an action potential s opens quickly while hr slowly blocks the channel. On repolarization hr recovers before s deactivates, producing a transient resurgent current.

Kinetics follow a simplified Raman & Bean (2001) two-variable alpha/beta model.

The reversal potential is computed dynamically from the neuron's Na⁺ concentrations using the Nernst equation.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_NAR.

DEFAULT_G_NAR

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the INaR current.

Source code in neuroclamp/channels/auxiliary.py
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
def make_inar_channel(
    g_max: float = DEFAULT_G_NAR,
) -> IonChannel:
    """Create an INaR (resurgent Na⁺) ion channel.

    INaR produces a transient inward Na⁺ current on membrane repolarization,
    known as the resurgent current.  The mechanism relies on two gating
    variables: ``s`` (activation, power 1) and ``hr`` (unblocking, power 1).

    At rest ``s`` is low and ``hr`` is high (channel closed but unblocked).
    During an action potential ``s`` opens quickly while ``hr`` slowly blocks
    the channel.  On repolarization ``hr`` recovers before ``s`` deactivates,
    producing a transient resurgent current.

    Kinetics follow a simplified Raman & Bean (2001) two-variable alpha/beta
    model.

    The reversal potential is computed dynamically from the neuron's Na⁺
    concentrations using the Nernst equation.

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_NAR`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the INaR current.
    """
    s_var = GatingVariable(name="s", power=1, alpha=_alpha_s, beta=_beta_s)
    hr_var = GatingVariable(name="hr", power=1, alpha=_alpha_hr, beta=_beta_hr)
    return IonChannel(
        name="NaR",
        g_max=g_max,
        gating_variables=(s_var, hr_var),
        reversal_spec=NernstSpec(IonSpecies.SODIUM),
    )

make_katp_channel

make_katp_channel(g_max=DEFAULT_G_KATP)

Create a K_ATP (ATP-sensitive K⁺) ion channel.

Real K_ATP channels are metabolically gated (Kir6.x/SUR octamers activated by low [ATP]/[ADP]); this factory models them phenomenologically with voltage-driven slow activation, since the simulator does not track metabolic state. The channel engages at sustained depolarization (V½ = −25 mV, well above autonomous pacemaking threshold) with a slow time constant (~400 ms peak), providing an outward K⁺ drive that helps the membrane escape depolarization block (#324 in STN).

Uses a single gating variable kATP (power 1). The reversal potential is computed dynamically from the neuron's K⁺ concentrations via the Nernst equation.

References
  • Stanford & Lacey (1996), J. Neurophysiol. 75:1714 (K_ATP in STN and SNc).
  • Bevan & Wilson (1999), J. Neurosci. 19:7617 (STN spontaneous activity).
  • Hahn & McIntyre (2010), J. Comput. Neurosci. 28:425 (STN model including K_ATP).
  • Erecińska & Silver (1989) (ATP/ADP dynamics during firing).

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_KATP.

DEFAULT_G_KATP

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the K_ATP

IonChannel

current.

Source code in neuroclamp/channels/auxiliary.py
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
def make_katp_channel(
    g_max: float = DEFAULT_G_KATP,
) -> IonChannel:
    """Create a K_ATP (ATP-sensitive K⁺) ion channel.

    Real K_ATP channels are metabolically gated (Kir6.x/SUR octamers
    activated by low [ATP]/[ADP]); this factory models them
    phenomenologically with voltage-driven slow activation, since the
    simulator does not track metabolic state.  The channel engages at
    sustained depolarization (V½ = −25 mV, well above autonomous
    pacemaking threshold) with a slow time constant (~400 ms peak),
    providing an outward K⁺ drive that helps the membrane escape
    depolarization block (#324 in STN).

    Uses a single gating variable ``kATP`` (power 1).  The reversal
    potential is computed dynamically from the neuron's K⁺ concentrations
    via the Nernst equation.

    References:
        - Stanford & Lacey (1996), J. Neurophysiol. 75:1714 (K_ATP in STN
          and SNc).
        - Bevan & Wilson (1999), J. Neurosci. 19:7617 (STN spontaneous
          activity).
        - Hahn & McIntyre (2010), J. Comput. Neurosci. 28:425 (STN model
          including K_ATP).
        - Erecińska & Silver (1989) (ATP/ADP dynamics during firing).

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_KATP`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the K_ATP
        current.
    """
    katp_var = GatingVariable(name="kATP", power=1, alpha=_alpha_kATP, beta=_beta_kATP)
    return IonChannel(
        name="KATP",
        g_max=g_max,
        gating_variables=(katp_var,),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_sk_channel

make_sk_channel(g_max=DEFAULT_G_SK)

Create an SK (small-conductance Ca²⁺-activated K⁺) ion channel.

SK is gated purely by intracellular Ca²⁺ (no voltage dependence) via a Hill function (K_d = 0.3 µM, Hill coefficient n = 4 — Drion et al. 2011). The kinetics are fast (τ ≈ 10 ms), so the channel follows each AP's Ca²⁺ transient and shapes the medium afterhyperpolarization.

In SNc DA neurons SK couples tightly to Cav1.3 Ca²⁺ entry: each spike loads Ca²⁺, SK opens to produce the medium AHP, the AHP closes Cav1.3, Ca²⁺ is buffered and SK closes — and the Cav1.3 sub-threshold window current then ramps the cell back to threshold. This Cav1.3↔SK loop is the Putzier 2009 mechanism for tonic SNc pacemaking.

Note: SK is calcium-activated but carries K⁺, not Ca²⁺; carries_calcium is therefore False.

The reversal potential is computed dynamically from the neuron's K⁺ concentrations using the Nernst equation.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_SK.

DEFAULT_G_SK

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the SK current.

Source code in neuroclamp/channels/auxiliary.py
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
def make_sk_channel(
    g_max: float = DEFAULT_G_SK,
) -> IonChannel:
    """Create an SK (small-conductance Ca²⁺-activated K⁺) ion channel.

    SK is gated purely by intracellular Ca²⁺ (no voltage dependence) via a
    Hill function (K_d = 0.3 µM, Hill coefficient n = 4 — Drion et al. 2011).
    The kinetics are fast (τ ≈ 10 ms), so the channel follows each AP's Ca²⁺
    transient and shapes the medium afterhyperpolarization.

    In SNc DA neurons SK couples tightly to Cav1.3 Ca²⁺ entry: each spike
    loads Ca²⁺, SK opens to produce the medium AHP, the AHP closes Cav1.3,
    Ca²⁺ is buffered and SK closes — and the Cav1.3 sub-threshold window
    current then ramps the cell back to threshold.  This Cav1.3↔SK loop is
    the Putzier 2009 mechanism for tonic SNc pacemaking.

    Note: SK is calcium-*activated* but carries K⁺, not Ca²⁺;
    ``carries_calcium`` is therefore ``False``.

    The reversal potential is computed dynamically from the neuron's K⁺
    concentrations using the Nernst equation.

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_SK`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the SK current.
    """
    qSK_var = GatingVariable(name="qSK", power=1, alpha=_alpha_qSK, beta=_beta_qSK)
    return IonChannel(
        name="SK",
        g_max=g_max,
        gating_variables=(qSK_var,),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_k_channel

make_k_channel(g_max)

Create the delayed rectifier potassium channel (K⁺).

Uses the classic HH activation gate n (power 4). The reversal potential is computed dynamically via the Nernst equation for K⁺.

The gating variable name is "n", matching the simulation result field used throughout the simulator.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the delayed

IonChannel

rectifier K⁺ channel.

Source code in neuroclamp/channels/hh52.py
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
def make_k_channel(g_max: float) -> IonChannel:
    """Create the delayed rectifier potassium channel (K⁺).

    Uses the classic HH activation gate *n* (power 4).  The reversal potential
    is computed dynamically via the Nernst equation for K⁺.

    The gating variable name is ``"n"``, matching the simulation result field
    used throughout the simulator.

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the delayed
        rectifier K⁺ channel.
    """
    return IonChannel(
        name="K",
        g_max=g_max,
        gating_variables=(
            GatingVariable(name="n", power=4, alpha=alpha_n, beta=beta_n),
        ),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_k_leak_channel

make_k_leak_channel(g_max)

Create the potassium leak channel (K⁺ background conductance).

No gating variables — conductance is always g_max. The reversal potential is computed dynamically via the Nernst equation for K⁺, representing two-pore-domain K⁺ background channels (e.g. TREK, TRAAK).

Parameters:

Name Type Description Default
g_max float

Maximum (and constant) conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the K⁺ leak

IonChannel

channel with current field IKL.

Source code in neuroclamp/channels/hh52.py
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
def make_k_leak_channel(g_max: float) -> IonChannel:
    """Create the potassium leak channel (K⁺ background conductance).

    No gating variables — conductance is always *g_max*.  The reversal
    potential is computed dynamically via the Nernst equation for K⁺,
    representing two-pore-domain K⁺ background channels (e.g. TREK, TRAAK).

    Args:
        g_max: Maximum (and constant) conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the K⁺ leak
        channel with current field ``IKL``.
    """
    return IonChannel(
        name="KL",
        g_max=g_max,
        gating_variables=(),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_na_channel

make_na_channel(g_max)

Create the fast sodium channel (Na⁺).

Uses the classic Hodgkin-Huxley kinetics: activation gate m (power 3) and inactivation gate h (power 1). The reversal potential is computed dynamically via the Nernst equation for Na⁺.

Gating variable names are "m" and "h", matching the simulation result fields used throughout the simulator.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the fast Na⁺

IonChannel

channel.

Source code in neuroclamp/channels/hh52.py
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
def make_na_channel(g_max: float) -> IonChannel:
    """Create the fast sodium channel (Na⁺).

    Uses the classic Hodgkin-Huxley kinetics: activation gate *m* (power 3)
    and inactivation gate *h* (power 1).  The reversal potential is computed
    dynamically via the Nernst equation for Na⁺.

    Gating variable names are ``"m"`` and ``"h"``, matching the simulation
    result fields used throughout the simulator.

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the fast Na⁺
        channel.
    """
    return IonChannel(
        name="Na",
        g_max=g_max,
        gating_variables=(
            GatingVariable(name="m", power=3, alpha=alpha_m, beta=beta_m),
            GatingVariable(name="h", power=1, alpha=alpha_h, beta=beta_h),
        ),
        reversal_spec=NernstSpec(IonSpecies.SODIUM),
    )

make_na_leak_channel

make_na_leak_channel(g_max)

Create the sodium leak channel (Na⁺ background conductance).

No gating variables — conductance is always g_max. The reversal potential is computed dynamically via the Nernst equation for Na⁺, representing persistent sodium leak channels (e.g. NALCN).

Parameters:

Name Type Description Default
g_max float

Maximum (and constant) conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the Na⁺ leak

IonChannel

channel with current field INaL.

Source code in neuroclamp/channels/hh52.py
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
def make_na_leak_channel(g_max: float) -> IonChannel:
    """Create the sodium leak channel (Na⁺ background conductance).

    No gating variables — conductance is always *g_max*.  The reversal
    potential is computed dynamically via the Nernst equation for Na⁺,
    representing persistent sodium leak channels (e.g. NALCN).

    Args:
        g_max: Maximum (and constant) conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the Na⁺ leak
        channel with current field ``INaL``.
    """
    return IonChannel(
        name="NaL",
        g_max=g_max,
        gating_variables=(),
        reversal_spec=NernstSpec(IonSpecies.SODIUM),
    )

make_mainen_sejnowski_kv_channel

make_mainen_sejnowski_kv_channel(g_max=DEFAULT_G_MSKV)

Create the Mainen-Sejnowski cortical pyramidal Kv delayed-rectifier.

Implements the high-threshold delayed-rectifier K⁺ channel from Mainen & Sejnowski (1996) — single activation gate n with power 1, essentially closed at rest (n_inf passes through 0.5 at V ≈ +4 mV), opens rapidly only above ~0 mV during the AP upstroke, and deactivates on a τ ~1–2 ms scale. Designed to broaden the cortical pyramidal AP into the literature 1.0–2.5 ms half-width band that the Pospischil n^4 form cannot reach on its own at any g_K (issue #311).

The channel name is "Kv" (not "K") and the gating-variable name is "nKv" so the channel can be added to a preset's channels tuple without colliding with a primary delayed-rectifier named "K". In CORTICAL_PYRAMIDAL this M-S Kv is the only active K conductance — the preset omits the HH-style core "K" channel entirely.

Rate constants are pre-scaled from the published 23 °C kinetics to 34 °C using Q10 = 2.3, so the channel matches the CORTICAL_PYRAMIDAL preset's T_ref = 307.15 K. The reversal potential is computed dynamically via the Nernst equation for K⁺.

Refs: Mainen, Z.F. & Sejnowski, T.J. (1996) Nature 382:363; canonical kv.mod ModelDB kinetics.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Defaults to :data:~neuroclamp.constants.DEFAULT_G_MSKV.

DEFAULT_G_MSKV

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the

IonChannel

Mainen-Sejnowski Kv delayed-rectifier K⁺ channel.

Source code in neuroclamp/channels/mainen_sejnowski.py
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
def make_mainen_sejnowski_kv_channel(g_max: float = DEFAULT_G_MSKV) -> IonChannel:
    """Create the Mainen-Sejnowski cortical pyramidal Kv delayed-rectifier.

    Implements the high-threshold delayed-rectifier K⁺ channel from Mainen &
    Sejnowski (1996) — single activation gate ``n`` with power 1, essentially
    closed at rest (n_inf passes through 0.5 at V ≈ +4 mV), opens rapidly
    only above ~0 mV during the AP upstroke, and deactivates on a τ ~1–2 ms
    scale.  Designed to broaden the cortical pyramidal AP into the literature
    1.0–2.5 ms half-width band that the Pospischil n^4 form cannot reach on
    its own at any g_K (issue #311).

    The channel name is ``"Kv"`` (not ``"K"``) and the gating-variable name
    is ``"nKv"`` so the channel can be added to a preset's ``channels`` tuple
    without colliding with a primary delayed-rectifier named ``"K"``.  In
    ``CORTICAL_PYRAMIDAL`` this M-S Kv is the only active K conductance —
    the preset omits the HH-style core ``"K"`` channel entirely.

    Rate constants are pre-scaled from the published 23 °C kinetics to 34 °C
    using Q10 = 2.3, so the channel matches the ``CORTICAL_PYRAMIDAL``
    preset's ``T_ref = 307.15 K``.  The reversal potential is computed
    dynamically via the Nernst equation for K⁺.

    Refs: Mainen, Z.F. & Sejnowski, T.J. (1996) Nature 382:363; canonical
    kv.mod ModelDB kinetics.

    Args:
        g_max: Maximum conductance in mS/cm². Defaults to
            :data:`~neuroclamp.constants.DEFAULT_G_MSKV`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the
        Mainen-Sejnowski Kv delayed-rectifier K⁺ channel.
    """
    return IonChannel(
        name="Kv",
        g_max=g_max,
        gating_variables=(
            GatingVariable(
                name="nKv",
                power=1,
                alpha=mainen_sejnowski_alpha_n,
                beta=mainen_sejnowski_beta_n,
            ),
        ),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_mainen_sejnowski_na_channel

make_mainen_sejnowski_na_channel(g_max)

Create the Mainen-Sejnowski cortical pyramidal fast Na⁺ channel.

Implements the fast Na⁺ kinetics from Mainen & Sejnowski (1996) via activation gate m (power 3) and inactivation gate h (power 1). Distinctive features relative to the Pospischil Na channel:

  • Stronger steady-state inactivation at depolarized V — h_inf passes through 0.5 at V = -65 mV (vs -56 for Pospischil) and collapses to ~7×10⁻⁴ at V = -20 mV (vs ~0.034 for Pospischil), so the steady-state Na window current at sustained depolarized V is ~50× smaller than Pospischil's.

Currently no preset wires this Na factory in — it is provided as a building block alongside :func:make_mainen_sejnowski_kv_channel (issue #311) for any future cortical-style preset that needs the weaker depolarized-V window current.

Rate constants are pre-scaled from the published 23 °C kinetics to 34 °C using Q10 = 2.3, matching the cortical pyramidal preset's T_ref = 307.15 K. Reversal potential is computed dynamically via the Nernst equation for Na⁺.

Refs: Mainen, Z.F. & Sejnowski, T.J. (1996) Nature 382:363; canonical na.mod ModelDB kinetics.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the

IonChannel

Mainen-Sejnowski cortical pyramidal Na⁺ channel.

Source code in neuroclamp/channels/mainen_sejnowski.py
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
def make_mainen_sejnowski_na_channel(g_max: float) -> IonChannel:
    """Create the Mainen-Sejnowski cortical pyramidal fast Na⁺ channel.

    Implements the fast Na⁺ kinetics from Mainen & Sejnowski (1996) via
    activation gate ``m`` (power 3) and inactivation gate ``h`` (power 1).
    Distinctive features relative to the Pospischil Na channel:

    * **Stronger steady-state inactivation at depolarized V** — h_inf
      passes through 0.5 at V = -65 mV (vs -56 for Pospischil) and
      collapses to ~7×10⁻⁴ at V = -20 mV (vs ~0.034 for Pospischil), so
      the steady-state Na window current at sustained depolarized V is
      ~50× smaller than Pospischil's.

    Currently no preset wires this Na factory in — it is provided as a
    building block alongside :func:`make_mainen_sejnowski_kv_channel`
    (issue #311) for any future cortical-style preset that needs the
    weaker depolarized-V window current.

    Rate constants are pre-scaled from the published 23 °C kinetics to
    34 °C using Q10 = 2.3, matching the cortical pyramidal preset's
    ``T_ref = 307.15 K``.  Reversal potential is computed dynamically via
    the Nernst equation for Na⁺.

    Refs: Mainen, Z.F. & Sejnowski, T.J. (1996) Nature 382:363; canonical
    na.mod ModelDB kinetics.

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the
        Mainen-Sejnowski cortical pyramidal Na⁺ channel.
    """
    return IonChannel(
        name="Na",
        g_max=g_max,
        gating_variables=(
            GatingVariable(
                name="m",
                power=3,
                alpha=mainen_sejnowski_alpha_m,
                beta=mainen_sejnowski_beta_m,
            ),
            GatingVariable(
                name="h",
                power=1,
                alpha=mainen_sejnowski_alpha_h,
                beta=mainen_sejnowski_beta_h,
            ),
        ),
        reversal_spec=NernstSpec(IonSpecies.SODIUM),
    )

make_nav11_channel

make_nav11_channel(g_max)

Create a Nav1.1-flavoured fast sodium channel (PV+ fast-spiking interneuron).

Composes Pospischil et al. (2008) Traub-Miles activation/fast-inactivation kinetics (gates m power 3 and h power 1, VT = −56.2 mV) with a weak Nav1.1-flavoured slow voltage-dependent inactivation gate sNa11 (V½ = −45 mV, slope 8 mV, inverted Boltzmann; τ_scale = 50000 ms / τ_floor = 5000 ms). The slow τ floor (5 s) ensures the gate barely engages at the 100–500 Hz firing rates typical of FSI, capturing the biological fact that Nav1.1 has slow inactivation (Patel et al. 2015 report Nav1.1 slow inactivation V½ ≈ −68 mV in HEK293; native PV+ interneurons express Nav1.1 with β1/β2 subunits that depolarize V½ by ~20 mV) without dominating FSI behavior.

The activation/fast-inactivation kinetics are Pospischil/Traub-Miles rather than isoform-specific Nav1.1 HEK fits — a fuller isoform-fitted overhaul is tracked as a follow-up. The "Nav1.1" naming reflects the cell-type-functional intent (FS-interneuron fast Na⁺) rather than a strict molecular claim.

The reversal potential is computed dynamically via the Nernst equation for Na⁺.

References
  • Pospischil et al. (2008), Biol. Cybern. 99:427 (cortical RS Na activation/fast-inactivation kinetics).
  • Patel, Barbosa, Xiao & Cummins (2015), PLOS ONE 10:e0133485 (Nav1.1 vs Nav1.6 isoform comparison; slow-inactivation V½).
  • Hu & Jonas (2014), Nat. Neurosci. 17:686 (Nav1.1 in PV+ interneurons; sustained high-frequency firing).

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing a

IonChannel

Nav1.1-flavoured fast-spiking-interneuron fast Na⁺ channel.

Source code in neuroclamp/channels/pospischil.py
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
def make_nav11_channel(g_max: float) -> IonChannel:
    """Create a Nav1.1-flavoured fast sodium channel (PV+ fast-spiking interneuron).

    Composes Pospischil et al. (2008) Traub-Miles activation/fast-inactivation
    kinetics (gates ``m`` power 3 and ``h`` power 1, VT = −56.2 mV) with a
    weak Nav1.1-flavoured slow voltage-dependent inactivation gate
    ``sNa11`` (V½ = −45 mV, slope 8 mV, inverted Boltzmann; τ_scale =
    50000 ms / τ_floor = 5000 ms).  The slow τ floor (5 s) ensures the
    gate barely engages at the 100–500 Hz firing rates typical of FSI,
    capturing the biological fact that Nav1.1 has slow inactivation
    (Patel et al. 2015 report Nav1.1 slow inactivation V½ ≈ −68 mV in
    HEK293; native PV+ interneurons express Nav1.1 with β1/β2 subunits
    that depolarize V½ by ~20 mV) without dominating FSI behavior.

    The activation/fast-inactivation kinetics are Pospischil/Traub-Miles
    rather than isoform-specific Nav1.1 HEK fits — a fuller isoform-fitted
    overhaul is tracked as a follow-up.  The "Nav1.1" naming reflects the
    cell-type-functional intent (FS-interneuron fast Na⁺) rather than a
    strict molecular claim.

    The reversal potential is computed dynamically via the Nernst equation
    for Na⁺.

    References:
        - Pospischil et al. (2008), Biol. Cybern. 99:427 (cortical RS Na
          activation/fast-inactivation kinetics).
        - Patel, Barbosa, Xiao & Cummins (2015), PLOS ONE 10:e0133485
          (Nav1.1 vs Nav1.6 isoform comparison; slow-inactivation V½).
        - Hu & Jonas (2014), Nat. Neurosci. 17:686 (Nav1.1 in PV+
          interneurons; sustained high-frequency firing).

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing a
        Nav1.1-flavoured fast-spiking-interneuron fast Na⁺ channel.
    """
    m_var, h_var = _make_pospischil_base_gates()
    s_var = GatingVariable(
        name="sNa11",
        power=1,
        alpha=_nav11_alpha_sNa,
        beta=_nav11_beta_sNa,
    )
    return IonChannel(
        name="Na",
        g_max=g_max,
        gating_variables=(m_var, h_var, s_var),
        reversal_spec=NernstSpec(IonSpecies.SODIUM),
    )

make_nav12_channel

make_nav12_channel(g_max)

Create a Nav1.2-flavoured fast sodium channel (cortical pyramidal somatic).

Composes Pospischil et al. (2008) Traub-Miles activation/fast-inactivation kinetics (gates m power 3 and h power 1, VT = −56.2 mV) with a Fleidervish-style slow voltage-dependent inactivation gate sNa12 (V½ = −50 mV, slope 8 mV, inverted Boltzmann; τ_scale = 200 ms / τ_floor = 20 ms). At V = −70 mV (cortical rest) sNa12_inf ≈ 0.92; at V = −15 mV sNa12_inf ≈ 0.01. The slow gate provides the depolarization-block escape route required by cortical/CA1 presets (#327, #328) and matches Fleidervish & Gutnick's native cortical pyramidal recordings within rounding.

The activation/fast-inactivation kinetics are Pospischil/Traub-Miles rather than isoform-specific Nav1.2 HEK fits — a fuller isoform-fitted overhaul is tracked as a follow-up. The "Nav1.2" naming reflects the cell-type-functional intent (cortical pyramidal somatic Na⁺) rather than a strict molecular claim.

The reversal potential is computed dynamically via the Nernst equation for Na⁺.

References
  • Pospischil et al. (2008), Biol. Cybern. 99:427 (cortical RS Na activation/fast-inactivation kinetics).
  • Fleidervish & Gutnick (1996), J. Physiol. 493:83 (slow Na inactivation, cortical pyramidal — primary source).
  • Mickus, Jung & Spruston (1999), Biophys. J. 76:846 (slow Na inactivation, CA1 pyramidal).

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing a

IonChannel

Nav1.2-flavoured cortical pyramidal somatic fast Na⁺ channel.

Source code in neuroclamp/channels/pospischil.py
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
def make_nav12_channel(g_max: float) -> IonChannel:
    """Create a Nav1.2-flavoured fast sodium channel (cortical pyramidal somatic).

    Composes Pospischil et al. (2008) Traub-Miles activation/fast-inactivation
    kinetics (gates ``m`` power 3 and ``h`` power 1, VT = −56.2 mV) with a
    Fleidervish-style slow voltage-dependent inactivation gate ``sNa12``
    (V½ = −50 mV, slope 8 mV, inverted Boltzmann; τ_scale = 200 ms /
    τ_floor = 20 ms).  At V = −70 mV (cortical rest) sNa12_inf ≈ 0.92; at
    V = −15 mV sNa12_inf ≈ 0.01.  The slow gate provides the
    depolarization-block escape route required by cortical/CA1 presets
    (#327, #328) and matches Fleidervish & Gutnick's native cortical
    pyramidal recordings within rounding.

    The activation/fast-inactivation kinetics are Pospischil/Traub-Miles
    rather than isoform-specific Nav1.2 HEK fits — a fuller isoform-fitted
    overhaul is tracked as a follow-up.  The "Nav1.2" naming reflects the
    cell-type-functional intent (cortical pyramidal somatic Na⁺) rather
    than a strict molecular claim.

    The reversal potential is computed dynamically via the Nernst equation
    for Na⁺.

    References:
        - Pospischil et al. (2008), Biol. Cybern. 99:427 (cortical RS Na
          activation/fast-inactivation kinetics).
        - Fleidervish & Gutnick (1996), J. Physiol. 493:83 (slow Na
          inactivation, cortical pyramidal — primary source).
        - Mickus, Jung & Spruston (1999), Biophys. J. 76:846 (slow Na
          inactivation, CA1 pyramidal).

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing a
        Nav1.2-flavoured cortical pyramidal somatic fast Na⁺ channel.
    """
    m_var, h_var = _make_pospischil_base_gates()
    s_var = GatingVariable(
        name="sNa12",
        power=1,
        alpha=_nav12_alpha_sNa,
        beta=_nav12_beta_sNa,
    )
    return IonChannel(
        name="Na",
        g_max=g_max,
        gating_variables=(m_var, h_var, s_var),
        reversal_spec=NernstSpec(IonSpecies.SODIUM),
    )

make_pospischil_k_channel

make_pospischil_k_channel(g_max)

Create the Pospischil cortical RS delayed-rectifier potassium channel (K⁺).

Uses Pospischil et al. (2008) Traub-Miles kinetics with VT = −56.2 mV: activation gate n (power 4). The reversal potential is computed dynamically via the Nernst equation for K⁺.

Used by the FSI and CA1 Pyramidal presets to match the Pospischil RS neuron model. (Cortical Pyramidal switched to Mainen-Sejnowski Kv as its sole delayed rectifier in #311.)

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the

IonChannel

Pospischil cortical RS delayed-rectifier K⁺ channel.

Source code in neuroclamp/channels/pospischil.py
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
def make_pospischil_k_channel(g_max: float) -> IonChannel:
    """Create the Pospischil cortical RS delayed-rectifier potassium channel (K⁺).

    Uses Pospischil et al. (2008) Traub-Miles kinetics with VT = −56.2 mV:
    activation gate *n* (power 4).  The reversal potential is computed
    dynamically via the Nernst equation for K⁺.

    Used by the FSI and CA1 Pyramidal presets to match the Pospischil RS
    neuron model.  (Cortical Pyramidal switched to Mainen-Sejnowski Kv as
    its sole delayed rectifier in #311.)

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the
        Pospischil cortical RS delayed-rectifier K⁺ channel.
    """
    return IonChannel(
        name="K",
        g_max=g_max,
        gating_variables=(
            GatingVariable(
                name="n", power=4, alpha=pospischil_alpha_n, beta=pospischil_beta_n
            ),
        ),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_purkinje_k_channel

make_purkinje_k_channel(g_max)

Create the cerebellar Purkinje delayed-rectifier potassium channel (K⁺).

Uses Traub-Miles kinetics with VT = −58 mV to match the somatic KDR activation threshold of mammalian cerebellar Purkinje neurons recorded by De Schutter & Bower (1994) at 32 °C.

Used as the Purkinje preset's K⁺ channel.

Reference: De Schutter & Bower (1994), J. Neurophysiol. 71:375. Kinetics recorded at 32 °C — use T_ref = 305.15 K with this factory.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the Purkinje

IonChannel

delayed-rectifier K⁺ channel.

Source code in neuroclamp/channels/purkinje.py
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
def make_purkinje_k_channel(g_max: float) -> IonChannel:
    """Create the cerebellar Purkinje delayed-rectifier potassium channel (K⁺).

    Uses Traub-Miles kinetics with VT = −58 mV to match the somatic KDR
    activation threshold of mammalian cerebellar Purkinje neurons recorded
    by De Schutter & Bower (1994) at 32 °C.

    Used as the Purkinje preset's K⁺ channel.

    Reference: De Schutter & Bower (1994), J. Neurophysiol. 71:375.
    Kinetics recorded at 32 °C — use T_ref = 305.15 K with this factory.

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the Purkinje
        delayed-rectifier K⁺ channel.
    """
    return IonChannel(
        name="K",
        g_max=g_max,
        gating_variables=(
            GatingVariable(
                name="n", power=4, alpha=purkinje_alpha_n, beta=purkinje_beta_n
            ),
        ),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_purkinje_na_channel

make_purkinje_na_channel(g_max)

Create the cerebellar Purkinje fast sodium channel (Na⁺).

Uses Traub-Miles kinetics with VT = −58 mV to match the somatic NaF activation threshold of mammalian cerebellar Purkinje neurons recorded by De Schutter & Bower (1994) at 32 °C.

Used as the Purkinje preset's Na⁺ channel. Compared with the default HH52 Na⁺ channel (fitted to squid axon at 22 °C), the Traub-Miles form with VT = −58 mV places the α_m singularity (and approximate activation inflection) near −45 mV and prevents the ~5.2× Q10 overcorrection that caused premature Na⁺ inactivation.

The channel exposes three gates: activation m (power 3), fast inactivation h (power 1), and slow voltage-dependent inactivation sNa (power 1; V½ = −50 mV, slope 8 mV, inverted Boltzmann). The slow gate is mostly available at hyperpolarized potentials and decays toward zero on sustained depolarization, providing the escape route from depol-block plateaus reported in real Purkinje cells (#329). The column is named sNa rather than s to avoid colliding with :func:~neuroclamp.channels.auxiliary.make_inar_channel's activation gate, which also appears in the Purkinje preset.

References
  • De Schutter & Bower (1994), J. Neurophysiol. 71:375 (m and h kinetics, recorded at 32 °C — use T_ref = 305.15 K).
  • Carter & Bean (2009), Neuron 64:898 (slow Na inactivation in cerebellar Purkinje cells — primary source for the sNa gate).
  • Do & Bean (2003), Neuron 39:109 (Na pacemaker channels, comparative).

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the Purkinje

IonChannel

fast Na⁺ channel.

Source code in neuroclamp/channels/purkinje.py
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
def make_purkinje_na_channel(g_max: float) -> IonChannel:
    """Create the cerebellar Purkinje fast sodium channel (Na⁺).

    Uses Traub-Miles kinetics with VT = −58 mV to match the somatic NaF
    activation threshold of mammalian cerebellar Purkinje neurons recorded
    by De Schutter & Bower (1994) at 32 °C.

    Used as the Purkinje preset's Na⁺ channel.  Compared with the default
    HH52 Na⁺ channel (fitted to squid axon at 22 °C), the Traub-Miles form
    with VT = −58 mV places the α_m singularity (and approximate activation
    inflection) near −45 mV and prevents the ~5.2× Q10 overcorrection that
    caused premature Na⁺ inactivation.

    The channel exposes three gates: activation ``m`` (power 3), fast
    inactivation ``h`` (power 1), and slow voltage-dependent inactivation
    ``sNa`` (power 1; V½ = −50 mV, slope 8 mV, inverted Boltzmann).  The
    slow gate is mostly available at hyperpolarized potentials and decays
    toward zero on sustained depolarization, providing the escape route
    from depol-block plateaus reported in real Purkinje cells (#329).  The
    column is named ``sNa`` rather than ``s`` to avoid colliding with
    :func:`~neuroclamp.channels.auxiliary.make_inar_channel`'s activation
    gate, which also appears in the Purkinje preset.

    References:
        - De Schutter & Bower (1994), J. Neurophysiol. 71:375 (m and h
          kinetics, recorded at 32 °C — use T_ref = 305.15 K).
        - Carter & Bean (2009), Neuron 64:898 (slow Na inactivation in
          cerebellar Purkinje cells — primary source for the sNa gate).
        - Do & Bean (2003), Neuron 39:109 (Na pacemaker channels,
          comparative).

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the Purkinje
        fast Na⁺ channel.
    """
    return IonChannel(
        name="Na",
        g_max=g_max,
        gating_variables=(
            GatingVariable(
                name="m", power=3, alpha=purkinje_alpha_m, beta=purkinje_beta_m
            ),
            GatingVariable(
                name="h", power=1, alpha=purkinje_alpha_h, beta=purkinje_beta_h
            ),
            GatingVariable(
                name="sNa",
                power=1,
                alpha=_purkinje_alpha_sNa,
                beta=_purkinje_beta_sNa,
            ),
        ),
        reversal_spec=NernstSpec(IonSpecies.SODIUM),
    )

make_cav13_channel

make_cav13_channel(g_max=DEFAULT_G_CAV13)

Create a Cav1.3 (LVA L-type Ca²⁺) ion channel.

Cav1.3 is the low-voltage-activated isoform of the neuronal L-type Ca²⁺ family. Activation follows the Putzier et al. 2009 dynamic-clamp Boltzmann fit (half = −31.1 mV, slope k = 5.35 mV) — the specific V½ at which a persistent sub-threshold window current drives SNc autonomous pacemaking. Putzier's central result is that shifting V½ by ±20 mV abolishes pacemaker rescue, so this V½ is load-bearing.

Inactivation is slow (τ ≈ 200 ms) and incomplete (half ≈ −50 mV, slope −8 mV), so the residual window persists through the full inter-spike interval. Two gating variables: dL13 (activation, power 1) and fL13 (inactivation, power 1). Activation power is 1 (not 2 as in HVA Cav1.2) — Putzier-class models treat the LVA L-type as a single-gate activator since the steepness is set by the Boltzmann slope, not gate multiplication.

Because Cav1.3 carries Ca²⁺, carries_calcium=True is set so the simulation loop accumulates its contribution for the Ca²⁺ ODE and :meth:~neuroclamp.channels.IonChannel.compute_current uses live ca_i for a dynamic E_Ca.

The reversal potential is computed dynamically from the neuron's Ca²⁺ concentrations using the Nernst equation.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_CAV13.

DEFAULT_G_CAV13

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the Cav1.3

IonChannel

current.

Source code in neuroclamp/channels/snc.py
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
def make_cav13_channel(
    g_max: float = DEFAULT_G_CAV13,
) -> IonChannel:
    """Create a Cav1.3 (LVA L-type Ca²⁺) ion channel.

    Cav1.3 is the low-voltage-activated isoform of the neuronal L-type Ca²⁺
    family.  Activation follows the Putzier et al. 2009 dynamic-clamp
    Boltzmann fit (half = −31.1 mV, slope k = 5.35 mV) — the specific V½ at
    which a persistent sub-threshold window current drives SNc autonomous
    pacemaking.  Putzier's central result is that shifting V½ by ±20 mV
    abolishes pacemaker rescue, so this V½ is load-bearing.

    Inactivation is slow (τ ≈ 200 ms) and incomplete (half ≈ −50 mV, slope
    −8 mV), so the residual window persists through the full inter-spike
    interval.  Two gating variables: ``dL13`` (activation, power 1) and
    ``fL13`` (inactivation, power 1).  Activation power is 1 (not 2 as in
    HVA Cav1.2) — Putzier-class models treat the LVA L-type as a single-gate
    activator since the steepness is set by the Boltzmann slope, not gate
    multiplication.

    Because Cav1.3 carries Ca²⁺, ``carries_calcium=True`` is set so the
    simulation loop accumulates its contribution for the Ca²⁺ ODE and
    :meth:`~neuroclamp.channels.IonChannel.compute_current` uses live ``ca_i``
    for a dynamic E_Ca.

    The reversal potential is computed dynamically from the neuron's Ca²⁺
    concentrations using the Nernst equation.

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_CAV13`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the Cav1.3
        current.
    """
    d_var = GatingVariable(name="dL13", power=1, alpha=_alpha_dL13, beta=_beta_dL13)
    f_var = GatingVariable(name="fL13", power=1, alpha=_alpha_fL13, beta=_beta_fL13)
    return IonChannel(
        name="Cav1.3",
        g_max=g_max,
        gating_variables=(d_var, f_var),
        reversal_spec=NernstSpec(IonSpecies.CALCIUM),
        carries_calcium=True,
    )

make_dopaminergic_k_channel

make_dopaminergic_k_channel(g_max)

Create the midbrain dopaminergic delayed-rectifier potassium channel (K⁺).

Uses Traub-Miles kinetics with VT = −67 mV, directly equivalent to the Canavier (1999) / Komendantov et al. (2004) α_n = 0.032*(V+52)/... rate function for SNc DA neurons at ~35 °C.

Used as the SNc Dopaminergic preset's K⁺ channel.

Reference: Canavier (1999), J. Comput. Neurosci. 6:49; Komendantov et al. (2004), J. Neurophysiol. 91:346. Kinetics at ~35 °C — use T_ref = 308.15 K with this factory.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the

IonChannel

dopaminergic delayed-rectifier K⁺ channel.

Source code in neuroclamp/channels/snc.py
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
def make_dopaminergic_k_channel(g_max: float) -> IonChannel:
    """Create the midbrain dopaminergic delayed-rectifier potassium channel (K⁺).

    Uses Traub-Miles kinetics with VT = −67 mV, directly equivalent to the
    Canavier (1999) / Komendantov et al. (2004) α_n = 0.032*(V+52)/...
    rate function for SNc DA neurons at ~35 °C.

    Used as the SNc Dopaminergic preset's K⁺ channel.

    Reference: Canavier (1999), J. Comput. Neurosci. 6:49;
    Komendantov et al. (2004), J. Neurophysiol. 91:346.
    Kinetics at ~35 °C — use T_ref = 308.15 K with this factory.

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the
        dopaminergic delayed-rectifier K⁺ channel.
    """
    return IonChannel(
        name="K",
        g_max=g_max,
        gating_variables=(
            GatingVariable(
                name="n",
                power=4,
                alpha=dopaminergic_alpha_n,
                beta=dopaminergic_beta_n,
            ),
        ),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_dopaminergic_na_channel

make_dopaminergic_na_channel(g_max)

Create the midbrain dopaminergic fast sodium channel (Na⁺).

Uses Traub-Miles kinetics with VT = −67 mV, directly equivalent to the Canavier (1999) / Komendantov et al. (2004) rate functions (α_m = 0.32(V+54)/..., α_n = 0.032(V+52)/...) for SNc DA neurons at ~35 °C.

Used as the SNc Dopaminergic preset's Na⁺ channel. Compared with the default HH52 Na⁺ channel (fitted to squid axon at 22 °C), these kinetics give m_inf ≈ 5.6% at the −60 mV resting potential and prevent the ~5.2× Q10 overcorrection that distorts Na⁺ inactivation under the default reference temperature.

The channel exposes three gates: activation m (power 3), fast inactivation h (power 1), and slow voltage-dependent inactivation sNa_da (power 1; V½ = −50 mV, slope 8 mV, inverted Boltzmann). The slow gate is mostly available at hyperpolarized potentials and decays toward zero on sustained depolarization, providing the escape route from depol-block plateaus reported in real SNc DA neurons (Khaliq & Bean 2010). The column is named sNa_da rather than sNa to match the SNc-specific pSNc namespacing convention used by :func:make_snc_inap_channel.

References
  • Canavier (1999), J. Comput. Neurosci. 6:49; Komendantov et al. (2004), J. Neurophysiol. 91:346 — m, h, n kinetics at ~35 °C (use T_ref = 308.15 K with this factory).
  • Khaliq & Bean (2010), J. Neurosci. 30:7401 (slow Na inactivation in SNc dopaminergic neurons — primary source for the sNa_da gate).
  • Tucker, Hagiwara & Williams (2012), J. Neurophysiol. 108:2492 (confirms slow Na inactivation in midbrain DA neurons).

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the

IonChannel

dopaminergic fast Na⁺ channel.

Source code in neuroclamp/channels/snc.py
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
def make_dopaminergic_na_channel(g_max: float) -> IonChannel:
    """Create the midbrain dopaminergic fast sodium channel (Na⁺).

    Uses Traub-Miles kinetics with VT = −67 mV, directly equivalent to the
    Canavier (1999) / Komendantov et al. (2004) rate functions (α_m =
    0.32*(V+54)/..., α_n = 0.032*(V+52)/...) for SNc DA neurons at ~35 °C.

    Used as the SNc Dopaminergic preset's Na⁺ channel.
    Compared with the default HH52 Na⁺ channel (fitted to squid axon at
    22 °C), these kinetics give m_inf ≈ 5.6% at the −60 mV resting potential
    and prevent the ~5.2× Q10 overcorrection that distorts Na⁺ inactivation
    under the default reference temperature.

    The channel exposes three gates: activation ``m`` (power 3), fast
    inactivation ``h`` (power 1), and slow voltage-dependent inactivation
    ``sNa_da`` (power 1; V½ = −50 mV, slope 8 mV, inverted Boltzmann).  The
    slow gate is mostly available at hyperpolarized potentials and decays
    toward zero on sustained depolarization, providing the escape route
    from depol-block plateaus reported in real SNc DA neurons (Khaliq &
    Bean 2010).  The column is named ``sNa_da`` rather than ``sNa`` to
    match the SNc-specific ``pSNc`` namespacing convention used by
    :func:`make_snc_inap_channel`.

    References:
        - Canavier (1999), J. Comput. Neurosci. 6:49; Komendantov et al.
          (2004), J. Neurophysiol. 91:346 — m, h, n kinetics at ~35 °C
          (use T_ref = 308.15 K with this factory).
        - Khaliq & Bean (2010), J. Neurosci. 30:7401 (slow Na inactivation in
          SNc dopaminergic neurons — primary source for the sNa_da gate).
        - Tucker, Hagiwara & Williams (2012), J. Neurophysiol. 108:2492
          (confirms slow Na inactivation in midbrain DA neurons).

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the
        dopaminergic fast Na⁺ channel.
    """
    return IonChannel(
        name="Na",
        g_max=g_max,
        gating_variables=(
            GatingVariable(
                name="m",
                power=3,
                alpha=dopaminergic_alpha_m,
                beta=dopaminergic_beta_m,
            ),
            GatingVariable(
                name="h",
                power=1,
                alpha=dopaminergic_alpha_h,
                beta=dopaminergic_beta_h,
            ),
            GatingVariable(
                name="sNa_da",
                power=1,
                alpha=_dopaminergic_alpha_sNa,
                beta=_dopaminergic_beta_sNa,
            ),
        ),
        reversal_spec=NernstSpec(IonSpecies.SODIUM),
    )

make_snc_inap_channel

make_snc_inap_channel(g_max=DEFAULT_G_NAP_SNC)

Create an SNc-specific INaP (persistent Na⁺) channel.

Drion et al. 2011 fit SNc DA INaP at V½ = −65 mV (slope k = 5 mV), well below firing threshold. In this regime INaP carries a subthreshold ramp-up current that, together with Cav1.3, drives the inter-spike depolarization in the Putzier+Drion reconciliation of SNc pacemaking.

The channel exposes two gates: activation pSNc (power 1) and slow voltage-dependent inactivation sNaP_snc (power 1; V½ = −55 mV, slope 7 mV, inverted Boltzmann). The slow gate is always on, mirroring the Khaliq & Bean (2010) and Tucker, Hagiwara & Williams (2012) observations of slow Na inactivation in SNc DA neurons. Both gate columns are SNc-namespaced (pSNc, sNaP_snc) so they do not collide with the p/sNaP gates of :func:~neuroclamp.channels.auxiliary.make_inap_channel.

The reversal potential is computed dynamically from the neuron's Na⁺ concentrations using the Nernst equation.

References
  • Drion et al. (2011), PLOS Comp Biol 7:e1002050 (activation V½).
  • Magistretti & Alonso (1999), J. Gen. Physiol. 114:491 (slow inactivation V½/slope band).
  • Khaliq & Bean (2010), J. Neurosci. 30:7401 (slow Na inactivation in SNc DA — primary source for the sNaP_snc gate).
  • Tucker, Hagiwara & Williams (2012), J. Neurophysiol. 108:2492.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_NAP_SNC.

DEFAULT_G_NAP_SNC

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the SNc INaP

IonChannel

current.

Source code in neuroclamp/channels/snc.py
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
def make_snc_inap_channel(
    g_max: float = DEFAULT_G_NAP_SNC,
) -> IonChannel:
    """Create an SNc-specific INaP (persistent Na⁺) channel.

    Drion et al. 2011 fit SNc DA INaP at V½ = −65 mV (slope k = 5 mV), well
    below firing threshold.  In this regime INaP carries a subthreshold
    ramp-up current that, together with Cav1.3, drives the inter-spike
    depolarization in the Putzier+Drion reconciliation of SNc pacemaking.

    The channel exposes two gates: activation ``pSNc`` (power 1) and slow
    voltage-dependent inactivation ``sNaP_snc`` (power 1; V½ = −55 mV,
    slope 7 mV, inverted Boltzmann).  The slow gate is always on, mirroring
    the Khaliq & Bean (2010) and Tucker, Hagiwara & Williams (2012)
    observations of slow Na inactivation in SNc DA neurons.  Both gate
    columns are SNc-namespaced (``pSNc``, ``sNaP_snc``) so they do not
    collide with the ``p``/``sNaP`` gates of
    :func:`~neuroclamp.channels.auxiliary.make_inap_channel`.

    The reversal potential is computed dynamically from the neuron's Na⁺
    concentrations using the Nernst equation.

    References:
        - Drion et al. (2011), PLOS Comp Biol 7:e1002050 (activation V½).
        - Magistretti & Alonso (1999), J. Gen. Physiol. 114:491 (slow
          inactivation V½/slope band).
        - Khaliq & Bean (2010), J. Neurosci. 30:7401 (slow Na inactivation
          in SNc DA — primary source for the sNaP_snc gate).
        - Tucker, Hagiwara & Williams (2012), J. Neurophysiol. 108:2492.

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_NAP_SNC`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the SNc INaP
        current.
    """
    p_var = GatingVariable(name="pSNc", power=1, alpha=_alpha_p_snc, beta=_beta_p_snc)
    s_var = GatingVariable(
        name="sNaP_snc",
        power=1,
        alpha=_alpha_sNaP_snc,
        beta=_beta_sNaP_snc,
    )
    return IonChannel(
        name="NaP_SNc",
        g_max=g_max,
        gating_variables=(p_var, s_var),
        reversal_spec=NernstSpec(IonSpecies.SODIUM),
    )

make_stn_na_channel

make_stn_na_channel(g_max)

Create the STN high-threshold sodium channel (Otsuka et al. 2004).

Uses high-threshold activation kinetics specific to subthalamic nucleus neurons. Compared with the classic HH52 channel, the activation half-point is the same (−40 mV) but the slope is gentler (8 mV vs ~10 mV in HH52) and τ_m is fixed at 0.2 ms, giving a faster, more sharply threshold-dependent activation. The inactivation half-point shifts to −45.5 mV with a 6.4 mV slope.

The channel always includes three gates: "m" (activation, power 3), "h" (fast inactivation, power 1), and "sNa" (slow voltage- dependent inactivation, power 1; V½ = −50 mV, slope 8 mV, inverted Boltzmann). The slow gate is mostly available at hyperpolarized potentials and decays toward zero on sustained depolarization, providing the escape mechanism that lets the membrane repolarize after a prolonged suprathreshold step (#324). The simulation column is named sNa rather than s to avoid colliding with :func:~neuroclamp.channels.auxiliary.make_inar_channel's activation gate.

References
  • Otsuka et al. (2004), J. Neurophysiol. 92:255 (fast Na kinetics).
  • Fleidervish & Gutnick (1996), J. Physiol. 493:83 (slow Na inactivation in cortical pyramidal cells).
  • Mickus, Jung & Spruston (1999), Biophys. J. 76:846 (slow Na inactivation in CA1 pyramidal cells).
  • Do & Bean (2003), Neuron 39:109 (Na pacemaker channels in STN).

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the STN Na⁺

IonChannel

channel.

Source code in neuroclamp/channels/stn.py
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
def make_stn_na_channel(g_max: float) -> IonChannel:
    """Create the STN high-threshold sodium channel (Otsuka et al. 2004).

    Uses high-threshold activation kinetics specific to subthalamic nucleus
    neurons.  Compared with the classic HH52 channel, the activation
    half-point is the same (−40 mV) but the slope is gentler (8 mV vs
    ~10 mV in HH52) and τ_m is fixed at 0.2 ms, giving a faster, more
    sharply threshold-dependent activation.  The inactivation half-point
    shifts to −45.5 mV with a 6.4 mV slope.

    The channel always includes three gates: ``"m"`` (activation, power 3),
    ``"h"`` (fast inactivation, power 1), and ``"sNa"`` (slow voltage-
    dependent inactivation, power 1; V½ = −50 mV, slope 8 mV, inverted
    Boltzmann).  The slow gate is mostly available at hyperpolarized
    potentials and decays toward zero on sustained depolarization,
    providing the escape mechanism that lets the membrane repolarize after
    a prolonged suprathreshold step (#324).  The simulation column is
    named ``sNa`` rather than ``s`` to avoid colliding with
    :func:`~neuroclamp.channels.auxiliary.make_inar_channel`'s activation
    gate.

    References:
        - Otsuka et al. (2004), J. Neurophysiol. 92:255 (fast Na kinetics).
        - Fleidervish & Gutnick (1996), J. Physiol. 493:83 (slow Na
          inactivation in cortical pyramidal cells).
        - Mickus, Jung & Spruston (1999), Biophys. J. 76:846 (slow Na
          inactivation in CA1 pyramidal cells).
        - Do & Bean (2003), Neuron 39:109 (Na pacemaker channels in STN).

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the STN Na⁺
        channel.
    """
    m_var = GatingVariable(name="m", power=3, alpha=_stn_alpha_m, beta=_stn_beta_m)
    h_var = GatingVariable(name="h", power=1, alpha=_stn_alpha_h, beta=_stn_beta_h)
    s_var = GatingVariable(
        name="sNa", power=1, alpha=_stn_alpha_sNa, beta=_stn_beta_sNa
    )
    return IonChannel(
        name="Na",
        g_max=g_max,
        gating_variables=(m_var, h_var, s_var),
        reversal_spec=NernstSpec(IonSpecies.SODIUM),
    )

make_thalamic_relay_icat_channel

make_thalamic_relay_icat_channel(g_max=DEFAULT_G_ICAT)

Create the Thalamic-Relay-tuned ICaT (T-type Ca²⁺) channel.

Variant of :func:make_icat_channel with slower inactivation kinetics (ft tau_scale = 100 ms vs the global default 20 ms) that match the McCormick & Huguenard (1992) recordings of guinea-pig dorsal LGN relay neurons. The slower inactivation sustains the low-threshold spike (LTS) plateau long enough to support a multi-spike burst (3–7 Na⁺ spikes at 200–500 Hz) on hyperpolarizing-step release — the defining feature of TC burst mode (Sherman & Guillery 1996; Llinás & Jahnsen 1982).

Activation half-point and slope are unchanged from the global ICaT (-56 mV / 6.2 mV). Inactivation half-point also unchanged (-80 mV / -9 mV slope).

The reversal potential is computed dynamically from the neuron's Ca²⁺ concentrations using the Nernst equation.

Reference: McCormick & Huguenard (1992), J. Neurophysiol. 68:1384; Pospischil et al. (2008), Biol. Cybern. 99:427, Table 2 (TC).

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_ICAT.

DEFAULT_G_ICAT

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the

IonChannel

Thalamic-Relay ICaT current.

Source code in neuroclamp/channels/thalamic.py
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
def make_thalamic_relay_icat_channel(
    g_max: float = DEFAULT_G_ICAT,
) -> IonChannel:
    """Create the Thalamic-Relay-tuned ICaT (T-type Ca²⁺) channel.

    Variant of :func:`make_icat_channel` with slower inactivation kinetics
    (``ft`` tau_scale = 100 ms vs the global default 20 ms) that match the
    McCormick & Huguenard (1992) recordings of guinea-pig dorsal LGN relay
    neurons.  The slower inactivation sustains the low-threshold spike (LTS)
    plateau long enough to support a multi-spike burst (3–7 Na⁺ spikes at
    200–500 Hz) on hyperpolarizing-step release — the defining feature of
    TC burst mode (Sherman & Guillery 1996; Llinás & Jahnsen 1982).

    Activation half-point and slope are unchanged from the global ICaT
    (-56 mV / 6.2 mV).  Inactivation half-point also unchanged (-80 mV /
    -9 mV slope).

    The reversal potential is computed dynamically from the neuron's Ca²⁺
    concentrations using the Nernst equation.

    Reference: McCormick & Huguenard (1992), J. Neurophysiol. 68:1384;
    Pospischil et al. (2008), Biol. Cybern. 99:427, Table 2 (TC).

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_ICAT`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the
        Thalamic-Relay ICaT current.
    """
    dt_var = GatingVariable(name="dt", power=2, alpha=_alpha_dt, beta=_beta_dt)
    ft_var = GatingVariable(name="ft", power=1, alpha=_alpha_ft_tc, beta=_beta_ft_tc)
    return IonChannel(
        name="CaT",
        g_max=g_max,
        gating_variables=(dt_var, ft_var),
        reversal_spec=NernstSpec(IonSpecies.CALCIUM),
        carries_calcium=True,
    )

make_thalamic_relay_k_channel

make_thalamic_relay_k_channel(g_max)

Create the thalamic relay delayed-rectifier potassium channel (K⁺).

Uses Traub-Miles kinetics with VT = −52 mV, parameterised for the thalamocortical relay (TC) cell model of Pospischil et al. (2008). Rate-equation half-points match McCormick & Huguenard (1992) recordings of guinea-pig dorsal LGN relay neurons at 36 °C.

Used as the Thalamic Relay preset's K⁺ channel.

Reference: McCormick & Huguenard (1992), J. Neurophysiol. 68:1384; Pospischil et al. (2008), Biol. Cybern. 99:427, Table 2 (TC model).

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the thalamic

IonChannel

relay delayed-rectifier K⁺ channel.

Source code in neuroclamp/channels/thalamic.py
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
def make_thalamic_relay_k_channel(g_max: float) -> IonChannel:
    """Create the thalamic relay delayed-rectifier potassium channel (K⁺).

    Uses Traub-Miles kinetics with VT = −52 mV, parameterised for the
    thalamocortical relay (TC) cell model of Pospischil et al. (2008).
    Rate-equation half-points match McCormick & Huguenard (1992) recordings
    of guinea-pig dorsal LGN relay neurons at 36 °C.

    Used as the Thalamic Relay preset's K⁺ channel.

    Reference: McCormick & Huguenard (1992), J. Neurophysiol. 68:1384;
    Pospischil et al. (2008), Biol. Cybern. 99:427, Table 2 (TC model).

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the thalamic
        relay delayed-rectifier K⁺ channel.
    """
    return IonChannel(
        name="K",
        g_max=g_max,
        gating_variables=(
            GatingVariable(
                name="n",
                power=4,
                alpha=thalamic_relay_alpha_n,
                beta=thalamic_relay_beta_n,
            ),
        ),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_thalamic_relay_na_channel

make_thalamic_relay_na_channel(g_max)

Create the thalamic relay fast sodium channel (Na⁺).

Uses Traub-Miles kinetics with VT = −52 mV, parameterised for the thalamocortical relay (TC) cell model of Pospischil et al. (2008). Rate-equation half-points match McCormick & Huguenard (1992) recordings of guinea-pig dorsal LGN relay neurons at 36 °C.

Used as the Thalamic Relay preset's Na⁺ channel. Compared with the default HH52 Na⁺ channel (fitted to squid axon at 22 °C), the Traub-Miles form with VT = −52 mV shifts the activation threshold ~13 mV depolarized and slows inactivation, preventing the ~5.2× Q10 overcorrection that caused premature Na⁺ inactivation.

Reference: McCormick & Huguenard (1992), J. Neurophysiol. 68:1384; Pospischil et al. (2008), Biol. Cybern. 99:427, Table 2 (TC model).

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the thalamic

IonChannel

relay fast Na⁺ channel.

Source code in neuroclamp/channels/thalamic.py
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
def make_thalamic_relay_na_channel(g_max: float) -> IonChannel:
    """Create the thalamic relay fast sodium channel (Na⁺).

    Uses Traub-Miles kinetics with VT = −52 mV, parameterised for the
    thalamocortical relay (TC) cell model of Pospischil et al. (2008).
    Rate-equation half-points match McCormick & Huguenard (1992) recordings
    of guinea-pig dorsal LGN relay neurons at 36 °C.

    Used as the Thalamic Relay preset's Na⁺ channel.  Compared with the
    default HH52 Na⁺ channel (fitted to squid axon at 22 °C), the Traub-Miles
    form with VT = −52 mV shifts the activation threshold ~13 mV depolarized
    and slows inactivation, preventing the ~5.2× Q10 overcorrection that
    caused premature Na⁺ inactivation.

    Reference: McCormick & Huguenard (1992), J. Neurophysiol. 68:1384;
    Pospischil et al. (2008), Biol. Cybern. 99:427, Table 2 (TC model).

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the thalamic
        relay fast Na⁺ channel.
    """
    return IonChannel(
        name="Na",
        g_max=g_max,
        gating_variables=(
            GatingVariable(
                name="m",
                power=3,
                alpha=thalamic_relay_alpha_m,
                beta=thalamic_relay_beta_m,
            ),
            GatingVariable(
                name="h",
                power=1,
                alpha=thalamic_relay_alpha_h,
                beta=thalamic_relay_beta_h,
            ),
        ),
        reversal_spec=NernstSpec(IonSpecies.SODIUM),
    )

make_trn_icat_channel

make_trn_icat_channel(g_max=DEFAULT_G_ICAT)

Create the TRN-tuned ICaT (T-type Ca²⁺) channel.

Variant of :func:make_icat_channel whose inactivation time constant tau_ft(V) is sigmoid-shaped rather than cosh-shaped: small (20 ms) at hyperpolarized V and large (200 ms) at LTS-plateau V, with a smooth transition centered at −50 mV. This sustains the low-threshold spike plateau long enough to support the 5–15 Na⁺ spike, 200–600 Hz rebound burst that defines TRN burst mode (Huguenard & Prince 1992) while preserving rest stability at −80 mV.

Activation half-point and slope are unchanged from the global ICaT (−56 mV / 6.2 mV). Inactivation half-point and slope are unchanged (−80 mV / −9 mV), so ft_inf(V) is bit-identical to the Destexhe (1994) default — the existing ft_inf-at-rest invariants for the TRN preset continue to hold.

The reversal potential is computed dynamically from the neuron's Ca²⁺ concentrations using the Nernst equation.

Reference: Huguenard & Prince (1992), J. Neurosci. 12:3804; Destexhe et al. (1994), J. Neurophysiol. 72:803; Pospischil et al. (2008), Biol. Cybern. 99:427, Table 2 (RE).

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm². Must be non-negative. Defaults to :data:~neuroclamp.constants.DEFAULT_G_ICAT.

DEFAULT_G_ICAT

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the

IonChannel

TRN ICaT current.

Source code in neuroclamp/channels/trn.py
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
def make_trn_icat_channel(
    g_max: float = DEFAULT_G_ICAT,
) -> IonChannel:
    """Create the TRN-tuned ICaT (T-type Ca²⁺) channel.

    Variant of :func:`make_icat_channel` whose inactivation time constant
    ``tau_ft(V)`` is sigmoid-shaped rather than cosh-shaped: small (20 ms) at
    hyperpolarized V and large (200 ms) at LTS-plateau V, with a smooth
    transition centered at −50 mV.  This sustains the low-threshold spike
    plateau long enough to support the 5–15 Na⁺ spike, 200–600 Hz rebound
    burst that defines TRN burst mode (Huguenard & Prince 1992) while
    preserving rest stability at −80 mV.

    Activation half-point and slope are unchanged from the global ICaT
    (−56 mV / 6.2 mV).  Inactivation half-point and slope are unchanged
    (−80 mV / −9 mV), so ``ft_inf(V)`` is bit-identical to the Destexhe
    (1994) default — the existing ft_inf-at-rest invariants for the TRN
    preset continue to hold.

    The reversal potential is computed dynamically from the neuron's Ca²⁺
    concentrations using the Nernst equation.

    Reference: Huguenard & Prince (1992), J. Neurosci. 12:3804;
    Destexhe et al. (1994), J. Neurophysiol. 72:803;
    Pospischil et al. (2008), Biol. Cybern. 99:427, Table 2 (RE).

    Args:
        g_max: Maximum conductance in mS/cm². Must be non-negative.
            Defaults to :data:`~neuroclamp.constants.DEFAULT_G_ICAT`.

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the
        TRN ICaT current.
    """
    dt_var = GatingVariable(name="dt", power=2, alpha=_alpha_dt, beta=_beta_dt)
    ft_var = GatingVariable(name="ft", power=1, alpha=_alpha_ft_trn, beta=_beta_ft_trn)
    return IonChannel(
        name="CaT",
        g_max=g_max,
        gating_variables=(dt_var, ft_var),
        reversal_spec=NernstSpec(IonSpecies.CALCIUM),
        carries_calcium=True,
    )

make_trn_k_channel

make_trn_k_channel(g_max)

Create the TRN delayed-rectifier potassium channel (K⁺).

Uses Traub-Miles kinetics with VT = −67 mV, parameterised for the thalamic reticular nucleus (RE) cell model of Pospischil et al. (2008). Rate-equation half-points match Huguenard & Prince (1992) recordings of rat TRN cells at 36 °C.

Used as the TRN preset's K⁺ channel.

Reference: Huguenard & Prince (1992), J. Neurosci. 12:3804; Destexhe et al. (1994), J. Neurophysiol. 72:803; Pospischil et al. (2008), Biol. Cybern. 99:427, Table 2 (RE model). Kinetics recorded at 36 °C — use T_ref = 309.15 K with this factory.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the TRN

IonChannel

delayed-rectifier K⁺ channel.

Source code in neuroclamp/channels/trn.py
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
def make_trn_k_channel(g_max: float) -> IonChannel:
    """Create the TRN delayed-rectifier potassium channel (K⁺).

    Uses Traub-Miles kinetics with VT = −67 mV, parameterised for the
    thalamic reticular nucleus (RE) cell model of Pospischil et al. (2008).
    Rate-equation half-points match Huguenard & Prince (1992) recordings
    of rat TRN cells at 36 °C.

    Used as the TRN preset's K⁺ channel.

    Reference: Huguenard & Prince (1992), J. Neurosci. 12:3804;
    Destexhe et al. (1994), J. Neurophysiol. 72:803;
    Pospischil et al. (2008), Biol. Cybern. 99:427, Table 2 (RE model).
    Kinetics recorded at 36 °C — use T_ref = 309.15 K with this factory.

    Args:
        g_max: Maximum conductance in mS/cm².

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the TRN
        delayed-rectifier K⁺ channel.
    """
    return IonChannel(
        name="K",
        g_max=g_max,
        gating_variables=(
            GatingVariable(name="n", power=4, alpha=trn_alpha_n, beta=trn_beta_n),
        ),
        reversal_spec=NernstSpec(IonSpecies.POTASSIUM),
    )

make_trn_na_channel

make_trn_na_channel(g_max, h_v_half_shift=0.0)

Create the TRN fast sodium channel (Na⁺).

Uses Traub-Miles kinetics with VT = −67 mV, parameterised for the thalamic reticular nucleus (RE) cell model of Pospischil et al. (2008). Rate-equation half-points match Huguenard & Prince (1992) recordings of rat TRN cells at 36 °C.

Used as the TRN preset's Na⁺ channel. Compared with the default HH52 Na⁺ channel (fitted to squid axon at 22 °C), the Traub-Miles form with VT = −67 mV shifts the activation threshold ~13 mV depolarized and slows inactivation, preventing the ~5.2× Q10 overcorrection that caused premature Na⁺ inactivation.

The optional h_v_half_shift parameter shifts the h-gate V½ depolarized while leaving m and n kinetics on the shared TRN_VT. This encodes an isoform-level kinetic difference (NaV1.6 vs NaV1.2; Rush et al. 2005, J. Physiol. 564:803; Hatch et al. 2017, J. Neurosci. 37:1641) — TRN expresses both isoforms, and the effective h V½ depends on isoform mix. A positive shift accelerates recovery from inactivation at LTS-plateau voltages, supporting full Na⁺ spikes on the rising LTS edge of REPETITIVE_FIRING.

Reference: Huguenard & Prince (1992), J. Neurosci. 12:3804; Destexhe et al. (1994), J. Neurophysiol. 72:803; Pospischil et al. (2008), Biol. Cybern. 99:427, Table 2 (RE model); Rush et al. (2005), J. Physiol. 564:803 (NaV1.6 vs NaV1.2 h kinetics); Hatch et al. (2017), J. Neurosci. 37:1641 (TRN NaV1.6/1.2 mix). Kinetics recorded at 36 °C — use T_ref = 309.15 K with this factory.

Parameters:

Name Type Description Default
g_max float

Maximum conductance in mS/cm².

required
h_v_half_shift float

Depolarized shift of the h-gate V½ in mV. Positive values accelerate recovery from inactivation (NaV1.6-like). Defaults to 0.0 (unshifted Pospischil RE kinetics).

0.0

Returns:

Name Type Description
An IonChannel

class:~neuroclamp.channels.IonChannel representing the TRN fast

IonChannel

Na⁺ channel.

Source code in neuroclamp/channels/trn.py
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
def make_trn_na_channel(g_max: float, h_v_half_shift: float = 0.0) -> IonChannel:
    """Create the TRN fast sodium channel (Na⁺).

    Uses Traub-Miles kinetics with VT = −67 mV, parameterised for the
    thalamic reticular nucleus (RE) cell model of Pospischil et al. (2008).
    Rate-equation half-points match Huguenard & Prince (1992) recordings
    of rat TRN cells at 36 °C.

    Used as the TRN preset's Na⁺ channel.  Compared with the default HH52
    Na⁺ channel (fitted to squid axon at 22 °C), the Traub-Miles form with
    VT = −67 mV shifts the activation threshold ~13 mV depolarized and slows
    inactivation, preventing the ~5.2× Q10 overcorrection that caused
    premature Na⁺ inactivation.

    The optional ``h_v_half_shift`` parameter shifts the h-gate V½
    depolarized while leaving m and n kinetics on the shared TRN_VT.  This
    encodes an isoform-level kinetic difference (NaV1.6 vs NaV1.2;
    Rush et al. 2005, J. Physiol. 564:803; Hatch et al. 2017,
    J. Neurosci. 37:1641) — TRN expresses both isoforms, and the effective
    h V½ depends on isoform mix.  A positive shift accelerates recovery
    from inactivation at LTS-plateau voltages, supporting full Na⁺ spikes
    on the rising LTS edge of REPETITIVE_FIRING.

    Reference: Huguenard & Prince (1992), J. Neurosci. 12:3804;
    Destexhe et al. (1994), J. Neurophysiol. 72:803;
    Pospischil et al. (2008), Biol. Cybern. 99:427, Table 2 (RE model);
    Rush et al. (2005), J. Physiol. 564:803 (NaV1.6 vs NaV1.2 h kinetics);
    Hatch et al. (2017), J. Neurosci. 37:1641 (TRN NaV1.6/1.2 mix).
    Kinetics recorded at 36 °C — use T_ref = 309.15 K with this factory.

    Args:
        g_max: Maximum conductance in mS/cm².
        h_v_half_shift: Depolarized shift of the h-gate V½ in mV.  Positive
            values accelerate recovery from inactivation (NaV1.6-like).
            Defaults to 0.0 (unshifted Pospischil RE kinetics).

    Returns:
        An :class:`~neuroclamp.channels.IonChannel` representing the TRN fast
        Na⁺ channel.
    """
    # Unshifted callers reuse the cached module-level rate objects so gate
    # identity is preserved; any shift wraps in the picklable dataclass.
    if h_v_half_shift == 0.0:
        alpha_h = trn_alpha_h
        beta_h = trn_beta_h
    else:
        alpha_h = _ShiftedTrnAlphaH(h_v_half_shift=h_v_half_shift)
        beta_h = _ShiftedTrnBetaH(h_v_half_shift=h_v_half_shift)
    return IonChannel(
        name="Na",
        g_max=g_max,
        gating_variables=(
            GatingVariable(name="m", power=3, alpha=trn_alpha_m, beta=trn_beta_m),
            GatingVariable(name="h", power=1, alpha=alpha_h, beta=beta_h),
        ),
        reversal_spec=NernstSpec(IonSpecies.SODIUM),
    )