Skip to content

Reduced Calcium Soma-Dendrite (RCSD)

The default model for the brian2, NEURON, and Diffrax backends. RCSD pairs a motoneuron with a spinal inhibitory interneuron, both carrying calcium dynamics and a calcium-dependent potassium current, and both carrying a short unmyelinated axon so that an extracellular field can couple to them.

python
from livn.models.rcsd import ReducedCalciumSomaDendrite

model = ReducedCalciumSomaDendrite()
OptionDefaultMeaning
input_modeNoneOverride how the cell interprets a stimulus (current_density, conductance, current, irradiance). Only needed on the JAX backend, which bakes the choice into the compute graph
refractory_period2.0Spike-detector dead time in ms
short_term_depressionFalseWire AMPA through DepLinExp2Syn (Tsodyks-Markram depression, per presynaptic stream) instead of StdpLinExp2Syn

Cell types

Excitatory: Booth-Rinzel-Kiehn motoneuron

A soma, a dendrite and an axon, with the following ion channels:

  • Na⁺: Fast sodium (soma and axon)
  • K⁺: Delayed rectifier (soma and axon)
  • Ca²⁺: L-type (dendrite) and N-type (soma and dendrite)
  • KCa: Calcium-dependent potassium (soma and dendrite)

Calcium dynamics include influx via Ca²⁺ channels and extrusion via first-order kinetics, driving the KCa current. Soma and dendrite are coupled via gap-junction conductance; the axon is coupled by ordinary axial resistance.

python
params = model.params("BoothRinzelKiehn-MN")

The shipped fit targets input resistance, rheobase and spike-frequency adaptation targets from Miles et al. 2004.

Inhibitory: V1 Renshaw cell

INH is a spinal V1 Renshaw cell, the recurrent-inhibition subtype motoneurons wire onto preferentially (Hoang et al. 2018).

The cell has no dendrite but uses the same Booth-Rinzel-Kiehn channel formalism as the motoneuron:

  • Na⁺: fast sodium (Nas)
  • K⁺: delayed rectifier (Kdr) plus an A-type current (Ka_v1in), which the motoneuron does not have
  • Ca²⁺: N-type (CaN) with first-order calcium accumulation
  • KCa: calcium-dependent potassium, the afterhyperpolarization that paces repetitive firing
  • plus pas, a constant resting-current pin

The default parameters are fitted to ES-cell-derived Renshaw cells (Hoang et al. 2018).

python
params = model.params("V1In-Renshaw-InVitro")   # the default

Recurrent inhibition

The two cell types form a spinal recurrent-inhibition loop where motoneurons excite Renshaw cells cholinergically, Renshaw cells inhibit motoneurons glycinergically, on the motoneuron soma.

Compartments and stimulation

An extracellular field drives a cell through the difference it imposes across the cell's own axial resistances.

stimulus_coordinates names one field sampling point per section, so its width depends on the population:

python
coords = model.stimulus_coordinates(system.neuron_coordinates, population="EXC")
# [7 * n_neurons, 4] - soma, dendrite, 5 axon links, per neuron

coords = model.stimulus_coordinates(system.neuron_coordinates, population="INH")
# [6 * n_neurons, 4] - soma, 5 axon links (no dendrite)

The dendrite sits 60 µm from the soma while the axon extends the opposite way in five 30 µm sections, sampled at their midpoints (15, 45, 75, 105, 135 µm). With dendrite_orientation="random" (the default) that axis is drawn per gid from a stable hash while "aligned" puts it along x for every cell.

recording_coordinates is decoupled from this and returns the soma and the next field point regardless of population (the dendrite for EXC, the first axon link for INH).

Synaptic dynamics

RCSD declares four synapse types and the NEURON mechanism each maps to:

SynapseTypeMechanismVoltage-dependent
AMPAExcitatoryStdpLinExp2Syn, or DepLinExp2Syn with short_term_depression=TrueNo
NMDAExcitatoryStdpLinExp2SynNMDAYes (Mg²⁺ block)
GABA_AInhibitoryStdpLinExp2SynInhNo
GABA_BInhibitoryLinExp2SynNo
python
weights = {
    "EXC_EXC-dend-AMPA-weight": 0.001,   # MN -> MN, on the motoneuron dendrite
    "INH_EXC-soma-AMPA-weight": 2.9,        # MN -> Renshaw, cholinergic
    "EXC_INH-soma-GABA_A-weight": 9.4,      # Renshaw -> MN, glycinergic, on the soma
}
env.set_weights(weights)

dend is the motoneuron's dendritic compartment. A synapse placed off-soma on a Renshaw cell resolves to its soma, since it has no dendrite, but keeps the dend key so the same dict addresses both cell types. env.weight_names lists the keys a given network accepts, and returns the same list on NEURON and brian2.

Synaptic plasticity (STDP)

RCSD supports spike-timing-dependent plasticity via specialized synapse mechanisms:

  • Excitatory: StdpLinExp2Syn, StdpLinExp2SynNMDA
  • Inhibitory: StdpLinExp2SynInh

See the Plasticity reference and the Plasticity guide for usage details.

Opsin configuration

RCSD includes built-in opsin (channelrhodopsin) support for optical stimulation. The opsin_config() method controls which opsin mechanism is inserted and where:

python
model = ReducedCalciumSomaDendrite()
model.opsin_config()
# {'mechanism': 'RhO3c', 'sections': ['soma'], 'wavelength_nm': 473.0}

Override in a subclass to customize or disable:

python
class NoOpsin(ReducedCalciumSomaDendrite):
    def opsin_config(self):
        return None  # disable opsins

Background noise

RCSD uses an Ornstein-Uhlenbeck process (Gfluct3) to model fluctuating synaptic conductances. The noise is spatially split by section where the soma receives inhibitory noise only, and every non-soma section receives excitatory noise only.

python
noise_params = {
    "g_e0": 1.0,       # mean excitatory conductance
    "g_i0": 1.2,       # mean inhibitory conductance
    "std_e": 0.33,      # excitatory conductance std
    "std_i": 0.36,      # inhibitory conductance std
    "tau_e": 33.0,      # excitatory time constant (ms)
    "tau_i": 28.5,      # inhibitory time constant (ms)
}
env.set_noise(noise_params)

The conductance in use is clipped at zero, so a std above its g0 raises the mean drive rather than lowering it. Both backends do this, and both hold the fluctuation's stationary standard deviation at std independently of the integration step, so a fitted std_e/tau_e means the same thing on either.

Diffrax backend

When used with the Diffrax backend, RCSD provides a MotoneuronCulture Equinox module for differentiable simulation. It supports both current and conductance input modes and returns (time, soma_voltage, dend_voltage, soma_current, dend_current, final_state). Only the motoneuron is implemented there; a network simulated through Diffrax is excitatory-only.

python
model = ReducedCalciumSomaDendrite()
module = model.diffrax_module(env, key)

Released under the MIT License.