For more information on NeuroML 2 and LEMS see here.
Note: these descriptions have been updated to the latest NeuroML v2beta4 definitions, using the latest version of LEMS!

Cells

NeuroML2 ComponentType definitions from Cells.xml
Original LEMS ComponentType definitions: Cells.xml
Schema against which NeuroML based on these should be valid: NeuroML_v2beta4.xsd

 
baseCell

    extends baseStandalone

Base type of any cell which can be used in a population
 
baseSpikingCell

    extends baseCell

Base type of any cell which can emit spike events.
Event Ports spike
    Spike event
Direction: out
 
baseCellMembPot

    extends baseSpikingCell

Any spiking cell which has a membrane potential v with voltage units.
Exposures v
    Membrane potential
voltage
Event Ports spike    (from baseSpikingCell) Direction: out
 
baseCellMembPotDL

    extends baseSpikingCell

Any spiking cell which has a dimensioness membrane potential, V.
Exposures V
    Membrane potential
Dimensionless
Event Ports spike    (from baseSpikingCell) Direction: out
 
baseChannelPopulation

    extends baseVoltageDepPointCurrent

Base type for any current produced by a population of channels, all of type ionChannel
Component References ionChannel baseIonChannel
Exposures i    (from basePointCurrent) current
Requirements v    (from baseVoltageDepPointCurrent) voltage
 
channelPopulation

    extends baseChannelPopulation

Population of number ohmic ion channels. These each produce a conductance channelg across a reversal potential erev, giving a total current i.
Parameters erev voltage
number Dimensionless
Text fields ion
Exposures i    (from basePointCurrent) current
Requirements v    (from baseVoltageDepPointCurrent) voltage
Dynamics Structure

    CHILD INSTANCE: ionChannel

Derived Variables

    geff = channelg * number    
    i = geff * (erev - v)     (exposed as i)
    channelg = ionChannel->g    

 
channelPopulationNernst

    extends baseChannelPopulation

Population of channels with a time varying reversal potential erev determined by Nernst equation. Hard coded for Ca only!
Parameters number Dimensionless
Text fields ion
Constants R = 8.3144621 J_per_K_per_mol idealGasConstantDims
zCa = 2 Dimensionless
F = 96485.3 C_per_mol charge_per_mole
Exposures erev voltage
i    (from basePointCurrent) current
Requirements caConc concentration
caConcExt concentration
temperature temperature
v    (from baseVoltageDepPointCurrent) voltage
Dynamics Structure

    CHILD INSTANCE: ionChannel

Derived Variables

    i = totalConductance * (erev - v)     (exposed as i)
    singleChannelConductance = ionChannel->g    
    totalConductance = singleChannelConductance * number    
    erev = (R * temperature / (zCa * F)) * log(caConcExt / caConc)     (exposed as erev)

 
baseChannelDensity
Base type for current distributed on an area of a cell
Component References ionChannel baseIonChannel
Exposures iDensity currentDensity
Requirements v voltage
 
baseChannelDensityCond

    extends baseChannelDensity

Base type for distributed conductances on an area of a cell producing a (not necessarily ohmic) current
Parameters condDensity conductanceDensity
Exposures gDensity conductanceDensity
iDensity    (from baseChannelDensity) currentDensity
Requirements v    (from baseChannelDensity) voltage
 
variableParameter
Specifies a parameter which can vary its value across a segmentGroup
Text fields segmentGroup
parameter
Child elements inhomogeneousValue inhomogeneousValue
 
inhomogeneousValue
Specifies the value of a variableParameter
Text fields value
inhomogeneousParameter
 
channelDensityNonUniform

    extends baseChannelDensity

Specifies a time varying ohmic conductance density, which is distributed on a region of the cell. The conductance density of the channel is not uniform, but is set using the variableParameter. Note, there is no dynamical description of this in LEMS yet, as this type only makes sense for multicompartmental cells. A ComponentType for this needs to be present to enable export of NeuroML 2 multicompartmental cells via LEMS/jNeuroML to NEURON
Parameters erev voltage
Text fields ion
segmentGroup
Child elements variableParameter variableParameter
Constants ZERO_CURR_DENS = 0 A_per_m2 currentDensity
Exposures iDensity    (from baseChannelDensity) currentDensity
Requirements v    (from baseChannelDensity) voltage
Dynamics Structure

    CHILD INSTANCE: ionChannel

Derived Variables

    iDensity = ZERO_CURR_DENS     (exposed as iDensity)

 
channelDensityNonUniformNernst

    extends baseChannelDensity

Specifies a time varying conductance density, which is distributed on a region of the cell, and whose reversal potential is calculated from the Nernst equation. Hard coded for Ca only!. The conductance density of the channel is not uniform, but is set using the variableParameter. Note, there is no dynamical description of this in LEMS yet, as this type only makes sense for multicompartmental cells. A ComponentType for this needs to be present to enable export of NeuroML 2 multicompartmental cells via LEMS/jNeuroML to NEURON
Text fields ion
segmentGroup
Child elements variableParameter variableParameter
Constants ZERO_CURR_DENS = 0 A_per_m2 currentDensity
Exposures iDensity    (from baseChannelDensity) currentDensity
Requirements v    (from baseChannelDensity) voltage
Dynamics Structure

    CHILD INSTANCE: ionChannel

Derived Variables

    iDensity = ZERO_CURR_DENS     (exposed as iDensity)

 
channelDensityNonUniformGHK

    extends baseChannelDensity

Specifies a time varying conductance density, which is distributed on a region of the cell, and whose current is calculated from the Goldman-Hodgkin-Katz equation. Hard coded for Ca only!. The conductance density of the channel is not uniform, but is set using the variableParameter. Note, there is no dynamical description of this in LEMS yet, as this type only makes sense for multicompartmental cells. A ComponentType for this needs to be present to enable export of NeuroML 2 multicompartmental cells via LEMS/jNeuroML to NEURON
Text fields ion
segmentGroup
Child elements variableParameter variableParameter
Constants ZERO_CURR_DENS = 0 A_per_m2 currentDensity
Exposures iDensity    (from baseChannelDensity) currentDensity
Requirements v    (from baseChannelDensity) voltage
Dynamics Structure

    CHILD INSTANCE: ionChannel

Derived Variables

    iDensity = ZERO_CURR_DENS     (exposed as iDensity)

 
channelDensity

    extends baseChannelDensityCond

Specifies a time varying ohmic conductance density, gDensity, which is distributed on an area of the cell with fixed reversal potential erev producing a current density iDensity
Parameters condDensity    (from baseChannelDensityCond) conductanceDensity
erev voltage
Text fields ion
segmentGroup
Exposures gDensity    (from baseChannelDensityCond) conductanceDensity
iDensity    (from baseChannelDensity) currentDensity
Requirements v    (from baseChannelDensity) voltage
Dynamics Structure

    CHILD INSTANCE: ionChannel

Derived Variables

    gDensity = condDensity * channelf     (exposed as gDensity)
    channelf = ionChannel->fopen    
    iDensity = gDensity * (erev - v)     (exposed as iDensity)

 
channelDensityNernst

    extends baseChannelDensityCond

Specifies a time varying conductance density, gDensity, which is distributed on an area of the cell, producing a current density iDensity and whose reversal potential is calculated from the Nernst equation. Hard coded for Ca only! See https://github.com/OpenSourceBrain/ghk-nernst.
Parameters condDensity    (from baseChannelDensityCond) conductanceDensity
Text fields ion
segmentGroup
Constants R = 8.3144621 J_per_K_per_mol idealGasConstantDims
zCa = 2 Dimensionless
F = 96485.3 C_per_mol charge_per_mole
Exposures erev voltage
gDensity    (from baseChannelDensityCond) conductanceDensity
iDensity    (from baseChannelDensity) currentDensity
Requirements caConc concentration
caConcExt concentration
temperature temperature
v    (from baseChannelDensity) voltage
Dynamics Structure

    CHILD INSTANCE: ionChannel

Derived Variables

    channelf = ionChannel->fopen    

Conditional Derived Variables

    IF caConcExt > 0 THEN
        gDensity = condDensity * channelf     (exposed as gDensity)
    IF caConcExt <= 0 THEN
        gDensity = 0     (exposed as gDensity)

    IF caConcExt > 0 THEN
        erev = (R * temperature / (zCa * F)) * log(caConcExt / caConc)     (exposed as erev)
    IF caConcExt <= 0 THEN
        erev = 0     (exposed as erev)

    IF caConcExt > 0 THEN
        iDensity = gDensity * (erev - v)     (exposed as iDensity)
    IF caConcExt <= 0 THEN
        iDensity = 0     (exposed as iDensity)


 
channelDensityNernstCa2

    extends baseChannelDensityCond

This component is similar to the original component type channelDensityNernst but it is changed in order to have a reversal potential that depends on 2nd independent pool of Ca (ca2). See https://github.com/OpenSourceBrain/ghk-nernst.
Parameters condDensity    (from baseChannelDensityCond) conductanceDensity
Text fields ion
segmentGroup
Constants R = 8.3144621 J_per_K_per_mol idealGasConstantDims
zCa = 2 Dimensionless
F = 96485.3 C_per_mol charge_per_mole
Exposures erev voltage
gDensity    (from baseChannelDensityCond) conductanceDensity
iDensity    (from baseChannelDensity) currentDensity
Requirements caConc2 concentration
caConcExt2 concentration
temperature temperature
v    (from baseChannelDensity) voltage
Dynamics Structure

    CHILD INSTANCE: ionChannel

Derived Variables

    channelf = ionChannel->fopen    

Conditional Derived Variables

    IF caConcExt2 > 0 THEN
        gDensity = condDensity * channelf     (exposed as gDensity)
    IF caConcExt2 <= 0 THEN
        gDensity = 0     (exposed as gDensity)

    IF caConcExt2 > 0 THEN
        erev = (R * temperature / (zCa * F)) * log(caConcExt2 / caConc2)     (exposed as erev)
    IF caConcExt2 <= 0 THEN
        erev = 0     (exposed as erev)

    IF caConcExt2 > 0 THEN
        iDensity = gDensity * (erev - v)     (exposed as iDensity)
    IF caConcExt2 <= 0 THEN
        iDensity = 0     (exposed as iDensity)


 
channelDensityGHK

    extends baseChannelDensity

Specifies a time varying conductance density, gDensity, which is distributed on an area of the cell, producing a current density iDensity and whose reversal potential is calculated from the Goldman Hodgkin Katz equation. Hard coded for Ca only! See https://github.com/OpenSourceBrain/ghk-nernst.
Parameters permeability permeability
Text fields ion
segmentGroup
Constants R = 8.3144621 J_per_K_per_mol idealGasConstantDims
zCa = 2 Dimensionless
F = 96485.3 C_per_mol charge_per_mole
Exposures iDensity    (from baseChannelDensity) currentDensity
Requirements caConc concentration
caConcExt concentration
temperature temperature
v    (from baseChannelDensity) voltage
Dynamics Structure

    CHILD INSTANCE: ionChannel

Derived Variables

    K = (zCa * F) / (R * temperature)    
    channelf = ionChannel->fopen    
    expKv = exp(-1 * K * v)    

Conditional Derived Variables

    IF caConcExt > 0 THEN
        iDensity = -1 * channelf * permeability * zCa * F * K * v * ( caConc - (caConcExt * expKv) ) / (1 - expKv)     (exposed as iDensity)
    IF caConcExt <= 0 THEN
        iDensity = 0     (exposed as iDensity)


 
channelDensityGHK2

    extends baseChannelDensityCond

Time varying conductance density, gDensity, which is distributed on an area of the cell, producing a current density iDensity. Modified version of Jaffe et al. 1994 (used also in Lawrence et al. 2006). See https://github.com/OpenSourceBrain/ghk-nernst.
Parameters condDensity    (from baseChannelDensityCond) conductanceDensity
Text fields ion
segmentGroup
Constants TEMP_SCALE = 1 K temperature
VOLT_SCALE = 1 mV voltage
CONC_SCALE = 1 mM concentration
Exposures gDensity    (from baseChannelDensityCond) conductanceDensity
iDensity    (from baseChannelDensity) currentDensity
Requirements caConc concentration
caConcExt concentration
temperature temperature
v    (from baseChannelDensity) voltage
Dynamics Structure

    CHILD INSTANCE: ionChannel

Derived Variables

    tmp = (25 * T) / (293.15 * 2)    
    gDensity = condDensity * channelf     (exposed as gDensity)
    channelf = ionChannel->fopen    
    V = v / VOLT_SCALE    
    T = temperature / TEMP_SCALE    
    ca_conc_ext = caConcExt / CONC_SCALE    
    ca_conc_i = caConc / CONC_SCALE    

Conditional Derived Variables

    IF V/tmp = 0. THEN
        pOpen = tmp * 1e-3 * (1 - ((ca_conc_i/ca_conc_ext) * exp(V/tmp))) * (1 - (V/tmp)/2)    
    IF V/tmp != 0. THEN
        pOpen = tmp * 1e-3 * (1 - ((ca_conc_i/ca_conc_ext) * exp(V/tmp))) * ((V/tmp) / (exp(V/tmp) - 1))    

    IF ca_conc_ext > 0 THEN
        iDensity = gDensity * pOpen     (exposed as iDensity)
    IF ca_conc_ext <= 0 THEN
        iDensity = 0     (exposed as iDensity)


 
pointCellCondBased

    extends baseCellMembPotCap

Simple model of a conductance based cell, with no separate morphology element, just an absolute capacitance C, and a set of channel populations
Parameters C    (from baseCellMembPotCap) capacitance
thresh voltage
v0 voltage
Children elements populations baseChannelPopulation
Exposures iMemb    (from baseCellMembPotCap) current
iSyn    (from baseCellMembPotCap) current
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
Attachments synapses basePointCurrent
Dynamics State Variables

    spiking    Dimensionless
    v    voltage (exposed as v)

On Start

    v = v0
    spiking = 0

On Conditions

    IF v > thresh AND spiking < 0.5 THEN
        spiking = 1
        EVENT OUT on port spike

    IF v < thresh THEN
        spiking = 0

Derived Variables

    iChannels = populations[*]->i (reduce method: add)    
    iSyn = synapses[*]->i (reduce method: add)     (exposed as iSyn)
    iMemb = iChannels + iSyn     (exposed as iMemb)

Time Derivatives

    d v /dt = iMemb / C

 
pointCellCondBasedCa

    extends baseCellMembPotCap

TEMPORARY: Point cell with conductances and Ca concentration info. Not yet fully tested!!!
Parameters C    (from baseCellMembPotCap) capacitance
thresh voltage
v0 voltage
Children elements concentrationModels concentrationModel
populations baseChannelPopulation
Exposures caConc concentration
iCa current
iMemb    (from baseCellMembPotCap) current
iSyn    (from baseCellMembPotCap) current
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
Attachments synapses basePointCurrent
Dynamics State Variables

    spiking    Dimensionless
    v    voltage (exposed as v)

On Start

    v = v0
    spiking = 0

On Conditions

    IF v > thresh AND spiking < 0.5 THEN
        spiking = 1
        EVENT OUT on port spike

    IF v < thresh THEN
        spiking = 0

Derived Variables

    iChannels = populations[*]->i (reduce method: add)    
    caConc = concentrationModels[species='ca']->concentration (reduce method: add)     (exposed as caConc)
    iCa = populations[ion='ca']->i (reduce method: add)     (exposed as iCa)
    iMemb = iChannels + iSyn     (exposed as iMemb)
    iSyn = synapses[*]->i (reduce method: add)     (exposed as iSyn)

Time Derivatives

    d v /dt = iMemb / C

 
distal

    extends point3DWithDiam

Point furthest from the soma in a segment
Parameters diameter    (from point3DWithDiam) Dimensionless
x    (from point3DWithDiam) Dimensionless
y    (from point3DWithDiam) Dimensionless
z    (from point3DWithDiam) Dimensionless
Derived Parameters radius = MICRON * diameter / 2    (from point3DWithDiam) length
xLength = MICRON * x    (from point3DWithDiam) length
yLength = MICRON * y    (from point3DWithDiam) length
zLength = MICRON * z    (from point3DWithDiam) length
 
proximal

    extends point3DWithDiam

Point closest to the soma in a segment. Note, if the proximal point is equal to the distal point of the parent segment, proximal can be omitted.
Parameters diameter    (from point3DWithDiam) Dimensionless
x    (from point3DWithDiam) Dimensionless
y    (from point3DWithDiam) Dimensionless
z    (from point3DWithDiam) Dimensionless
Derived Parameters radius = MICRON * diameter / 2    (from point3DWithDiam) length
xLength = MICRON * x    (from point3DWithDiam) length
yLength = MICRON * y    (from point3DWithDiam) length
zLength = MICRON * z    (from point3DWithDiam) length
 
parent
Specifies the segment which is this segment's parent
Text fields fractionAlong
segment
 
segment
A segment defines the smallest unit within a possibly branching structure (morphology), such as a dendrite or axon. The shape is given by the proximal and distal points. If proximal is missing, the proximal point is assumed to be the distal point of the parent. parent specifies the parent segment. The first segment (no parent) usually represents the soma. NOTE: LEMS does not yet support multicompartmental modelling, so the Dynamics here is only appropriate for single compartment modelling.
Text fields name
Child elements distal distal
proximal proximal
parent parent
Constants LEN = 1m length
Exposures length length
radDist length
surfaceArea area
Dynamics Derived Variables

    radDist = distal->radius     (exposed as radDist)
    pz = proximal->zLength    
    px = proximal->xLength    
    py = proximal->yLength    
    length = sqrt(((dx - px) * (dx - px) + (dy - py) * (dy - py) + (dz - pz) * (dz - pz))/(LEN * LEN)) * LEN     (exposed as length)
    dz = distal->zLength    
    dx = distal->xLength    
    dy = distal->yLength    

Conditional Derived Variables

    IF length = 0 THEN
        surfaceArea = 4 * radDist * radDist * 3.14159265     (exposed as surfaceArea)
    IF length > 0 THEN
        surfaceArea = 2 * radDist * 3.14159265 * length     (exposed as surfaceArea)


 
segmentGroup
A method to describe a group of segments in a morphology
Text fields neuroLexId
Child elements notes notes
annotation annotation
Children elements paths path
subTrees subTree
inhomogeneousParameter inhomogeneousParameter
includes include
members member
property property
 
member
A single identified segment which is part of the segmentGroup
Text fields segment
 
from
Specifies which segment distal from which to calculate the segmentGroup
Text fields segment
 
to
Specifies which segment up to which to calculate the segmentGroup
Text fields segment
 
include
Include all members of another segmentGroup in this
Text fields href
segmentGroup
 
path
Include all the segments between those specified by from and to, inclusive
Child elements to to
from from
 
subTree
Include all the segments distal to that specified by from in the segmentGroup
Child elements from from
 
inhomogeneousParameter
An inhomogeneous parameter specified across the segmentGroup
Text fields variable
metric
Child elements distal distalProperties
proximal proximalProperties
 
proximalProperties
What to do at the proximal point when creating an inhomogeneous parameter
Text fields translationStart
 
distalProperties
What to do at the distal point when creating an inhomogeneous parameter
Text fields normalizationEnd
 
morphology
The collection of segments which specify the 3D structure of the cell, along with a number of segmentGroups
Children elements segments segment
segmentGroups segmentGroup
 
specificCapacitance
Capacitance per unit area
Parameters value specificCapacitance
Text fields segmentGroup
Exposures specCap specificCapacitance
Dynamics Derived Variables

    specCap = value     (exposed as specCap)

 
initMembPotential
Explicitly set initial membrane potential for the cell
Parameters value voltage
 
spikeThresh
Membrane potential at which to emit a spiking event. Note, usually the spiking event will not be emitted again until the membrane potential has fallen below this value and rises again to cross it in a positive direction
Parameters value voltage
 
membraneProperties
Properties specific to the membrane, such as the populations of channels, channelDensities, specificCapacitance, etc.
Child elements initMembPotential initMembPotential
spikeThresh spikeThresh
Children elements specificCapacitances specificCapacitance
channelDensities baseChannelDensity
populations baseChannelPopulation
Exposures iCa current
totChanCurrent current
totSpecCap specificCapacitance
Requirements surfaceArea area
Dynamics Derived Variables

    totSpecCap = specificCapacitances[*]->specCap (reduce method: add)     (exposed as totSpecCap)
    iCa = totChanPopCurrentCa + (totChanDensCurrentDensityCa * surfaceArea)     (exposed as iCa)
    totChanDensCurrentDensityCa = channelDensities[ion='ca']->iDensity (reduce method: add)    
    totChanCurrent = totChanPopCurrent + (totChanDensCurrentDensity * surfaceArea)     (exposed as totChanCurrent)
    totChanDensCurrentDensity = channelDensities[*]->iDensity (reduce method: add)    
    totChanPopCurrent = populations[*]->i (reduce method: add)    
    totChanPopCurrentCa = populations[ion='ca']->i (reduce method: add)    

 
membraneProperties2CaPools

    extends membraneProperties

Variant of membraneProperties with 2 independent Ca pools
Child elements initMembPotential initMembPotential
spikeThresh spikeThresh
Children elements specificCapacitances specificCapacitance
channelDensities baseChannelDensity
populations baseChannelPopulation
Exposures iCa    (from membraneProperties) current
iCa current
iCa2 current
totChanCurrent    (from membraneProperties) current
totChanCurrent current
totSpecCap    (from membraneProperties) specificCapacitance
totSpecCap specificCapacitance
Requirements surfaceArea area
surfaceArea    (from membraneProperties) area
Dynamics Derived Variables

    totChanPopCurrentCa2 = populations[ion='ca2']->i (reduce method: add)    
    totSpecCap = specificCapacitances[*]->specCap (reduce method: add)     (exposed as totSpecCap)
    iCa = totChanPopCurrentCa + (totChanDensCurrentDensityCa * surfaceArea)     (exposed as iCa)
    totChanDensCurrentDensityCa2 = channelDensities[ion='ca2']->iDensity (reduce method: add)    
    totChanDensCurrentDensityCa = channelDensities[ion='ca']->iDensity (reduce method: add)    
    totChanCurrent = totChanPopCurrent + (totChanDensCurrentDensity * surfaceArea)     (exposed as totChanCurrent)
    totChanDensCurrentDensity = channelDensities[*]->iDensity (reduce method: add)    
    totChanPopCurrent = populations[*]->i (reduce method: add)    
    iCa2 = totChanPopCurrentCa2 + (totChanDensCurrentDensityCa2 * surfaceArea)     (exposed as iCa2)
    totChanPopCurrentCa = populations[ion='ca']->i (reduce method: add)    

 
biophysicalProperties
The biophysical properties of the cell, including the membraneProperties and the intracellularProperties
Child elements intracellularProperties intracellularProperties
membraneProperties membraneProperties
Exposures totSpecCap specificCapacitance
Dynamics Derived Variables

    totSpecCap = membraneProperties->totSpecCap     (exposed as totSpecCap)

 
biophysicalProperties2CaPools
The biophysical properties of the cell, including the membraneProperties2CaPools and the intracellularProperties2CaPools for a cell with two Ca pools
Child elements intracellularProperties2CaPools intracellularProperties2CaPools
membraneProperties2CaPools membraneProperties2CaPools
Exposures totSpecCap specificCapacitance
Dynamics Derived Variables

    totSpecCap = membraneProperties2CaPools->totSpecCap     (exposed as totSpecCap)

 
intracellularProperties
Biophysical properties related to the intracellular space within the cell, such as the resistivity and the list of species present. caConc and caConcExt are explicitly exposed here to facilitate accessing these values from other Components, even though caConcExt is clearly not an intracellular property
Children elements resistivity resistivity
speciesList species
Exposures caConc concentration
caConcExt concentration
Dynamics Derived Variables

    caConc = speciesList[ion='ca']->concentration (reduce method: add)     (exposed as caConc)
    caConcExt = speciesList[ion='ca']->extConcentration (reduce method: add)     (exposed as caConcExt)

 
intracellularProperties2CaPools

    extends intracellularProperties

Variant of intracellularProperties with 2 independent Ca pools
Children elements resistivity resistivity
speciesList species
Exposures caConc concentration
caConc    (from intracellularProperties) concentration
caConc2 concentration
caConcExt concentration
caConcExt    (from intracellularProperties) concentration
caConcExt2 concentration
Dynamics Derived Variables

    caConc2 = speciesList[ion='ca2']->concentration (reduce method: add)     (exposed as caConc2)
    caConc = speciesList[ion='ca']->concentration (reduce method: add)     (exposed as caConc)
    caConcExt2 = speciesList[ion='ca2']->extConcentration (reduce method: add)     (exposed as caConcExt2)
    caConcExt = speciesList[ion='ca']->extConcentration (reduce method: add)     (exposed as caConcExt)

 
resistivity
The resistivity, or specific axial resistance, of the cytoplasm
Parameters value resistivity
Text fields segmentGroup
 
concentrationModel
Base for any model of an ion concentration which changes with time. Internal, concentration, and external, extConcentration, values for the concentration of the ion are given.
Text fields ion
Exposures concentration concentration
extConcentration concentration
Requirements initialConcentration concentration
initialExtConcentration concentration
surfaceArea area
Dynamics State Variables

    extConcentration    concentration (exposed as extConcentration)
    concentration    concentration (exposed as concentration)

On Start

    concentration = initialConcentration
    extConcentration = initialExtConcentration

 
decayingPoolConcentrationModel

    extends concentrationModel

Model of buffering of concentration of an ion (currently hard coded to be calcium, due to requirement for iCa) which has a baseline level restingConc and tends to this value with time course decayConstant. The ion is assumed to occupy a shell inside the membrane of thickness shellThickness.
Parameters decayConstant time
restingConc concentration
shellThickness length
Text fields ion
Constants Faraday = 96485.3C_per_mol charge_per_mole
AREA_SCALE = 1m2 area
LENGTH_SCALE = 1m length
Exposures concentration    (from concentrationModel) concentration
extConcentration    (from concentrationModel) concentration
Requirements iCa current
initialConcentration    (from concentrationModel) concentration
initialExtConcentration    (from concentrationModel) concentration
surfaceArea    (from concentrationModel) area
Dynamics State Variables

    extConcentration    concentration (exposed as extConcentration)
    concentration    concentration (exposed as concentration)

On Start

    concentration = initialConcentration
    extConcentration = initialExtConcentration

On Conditions

    IF concentration < 0 THEN
        concentration = 0

Derived Variables

    innerRadius = effectiveRadius - shellThickness    
    effectiveRadius = LENGTH_SCALE * sqrt(surfaceArea/(AREA_SCALE * (4 * 3.14159)))    
    shellVolume = (4 * (effectiveRadius * effectiveRadius * effectiveRadius) * 3.14159 / 3) - (4 * (innerRadius * innerRadius * innerRadius) * 3.14159 / 3)    

Time Derivatives

    d concentration /dt = iCa / (2 * Faraday * shellVolume) - ((concentration - restingConc) / decayConstant)

 
fixedFactorConcentrationModel

    extends concentrationModel

Model of buffering of concentration of an ion (currently hard coded to be calcium, due to requirement for iCa) which has a baseline level restingConc and tends to this value with time course decayConstant. A fixed factor rho is used to scale the incoming current INDEPENDENTLY OF THE SIZE OF THE COMPARTMENT to produce a concentration change.
Parameters decayConstant time
restingConc concentration
rho rho_factor
Text fields ion
Exposures concentration    (from concentrationModel) concentration
extConcentration    (from concentrationModel) concentration
Requirements iCa current
initialConcentration    (from concentrationModel) concentration
initialExtConcentration    (from concentrationModel) concentration
surfaceArea    (from concentrationModel) area
surfaceArea area
Dynamics State Variables

    extConcentration    concentration (exposed as extConcentration)
    concentration    concentration (exposed as concentration)

On Start

    concentration = initialConcentration
    extConcentration = initialExtConcentration

On Conditions

    IF concentration < 0 THEN
        concentration = 0

Time Derivatives

    d concentration /dt = (iCa/surfaceArea) * rho - ((concentration - restingConc) / decayConstant)

 
fixedFactorConcentrationModelTraub

    extends concentrationModel

Model of buffering of concentration of an ion (currently hard coded to be calcium, due to requirement for iCa) which has a baseline level restingConc and tends to this value with time course 1 / beta. A fixed factor phi is used to scale the incoming current INDEPENDENTLY OF THE SIZE OF THE COMPARTMENT to produce a concentration change. Not recommended for use in models other than Traub et al. 2005!
Parameters beta per_time
phi rho_factor
restingConc concentration
Text fields species
Exposures concentration    (from concentrationModel) concentration
extConcentration    (from concentrationModel) concentration
Requirements iCa current
initialConcentration    (from concentrationModel) concentration
initialExtConcentration    (from concentrationModel) concentration
surfaceArea area
surfaceArea    (from concentrationModel) area
Dynamics State Variables

    extConcentration    concentration (exposed as extConcentration)
    concentration    concentration (exposed as concentration)

On Start

    concentration = initialConcentration
    extConcentration = initialExtConcentration

On Conditions

    IF concentration < 0 THEN
        concentration = 0

Time Derivatives

    d concentration /dt = (iCa/surfaceArea) * 1e-9 * phi - ((concentration - restingConc) * beta)

 
species
Description of a chemical species identified by ion, which has internal, concentration, and external, extConcentration values for its concentration
Parameters initialConcentration concentration
initialExtConcentration concentration
Text fields ion
segmentGroup
Component References concentrationModel concentrationModel
Exposures concentration concentration
extConcentration concentration
Dynamics Structure

    CHILD INSTANCE: concentrationModel

Derived Variables

    extConcentration = concentrationModel->extConcentration     (exposed as extConcentration)
    concentration = concentrationModel->concentration     (exposed as concentration)

 
cell

    extends baseCellMembPot

Cell with segments specified in a morphology element along with details on its biophysicalProperties. NOTE: this can only be correctly simulated using LEMS when there is a single segment in the cell, and v of this cell represents the membrane potential in that isopotential segment!!!
Text fields neuroLexId
Child elements morphology morphology
biophysicalProperties biophysicalProperties
Exposures caConc concentration
caConcExt concentration
debugVal Dimensionless
iCa current
iChannels current
iSyn current
spiking Dimensionless
surfaceArea area
totSpecCap specificCapacitance
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
Attachments synapses basePointCurrent
Dynamics State Variables

    debugVal    Dimensionless (exposed as debugVal)
    spiking    Dimensionless (exposed as spiking)
    v    voltage (exposed as v)

On Start

    spiking = 0
    v = initMembPot

On Conditions

    IF v > thresh AND spiking < 0.5 THEN
        spiking = 1
        EVENT OUT on port spike

    IF v < thresh THEN
        spiking = 0

    IF t >= 0 THEN
        debugVal = debug

Derived Variables

    totSpecCap = biophysicalProperties->totSpecCap     (exposed as totSpecCap)
    totCap = totSpecCap * surfaceArea     
    iSyn = synapses[*]->i (reduce method: add)     (exposed as iSyn)
    iCa = biophysicalProperties->membraneProperties->iCa     (exposed as iCa)
    caConcExt = biophysicalProperties->intracellularProperties->caConcExt     (exposed as caConcExt)
    initMembPot = biophysicalProperties->membraneProperties->initMembPotential->value    
    thresh = biophysicalProperties->membraneProperties->spikeThresh->value    
    caConc = biophysicalProperties->intracellularProperties->caConc     (exposed as caConc)
    debug = biophysicalProperties->membraneProperties->totChanCurrent    
    surfaceArea = morphology->segments[*]->surfaceArea (reduce method: add)     (exposed as surfaceArea)
    iChannels = biophysicalProperties->membraneProperties->totChanCurrent     (exposed as iChannels)

Time Derivatives

    d v /dt = (iChannels + iSyn) / totCap

 
cell2CaPools

    extends cell

Variant of cell with 2 independnet Ca pools. Cell with segments specified in a morphology element along with details on its biophysicalProperties. NOTE: this can only be correctly simulated using LEMS when there is a single segment in the cell, and v of this cell represents the membrane potential in that isopotential segment!!!
Text fields neuroLexId
Child elements biophysicalProperties2CaPools biophysicalProperties2CaPools
Exposures caConc    (from cell) concentration
caConc2 concentration
caConcExt    (from cell) concentration
caConcExt2 concentration
debugVal    (from cell) Dimensionless
iCa    (from cell) current
iCa2 current
iChannels    (from cell) current
iSyn    (from cell) current
spiking    (from cell) Dimensionless
surfaceArea    (from cell) area
totSpecCap    (from cell) specificCapacitance
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
Attachments synapses basePointCurrent
Dynamics State Variables

    debugVal    Dimensionless (exposed as debugVal)
    spiking    Dimensionless (exposed as spiking)
    v    voltage (exposed as v)

On Start

    spiking = 0
    v = initMembPot

On Conditions

    IF v > thresh AND spiking < 0.5 THEN
        spiking = 1
        EVENT OUT on port spike

    IF v < thresh THEN
        spiking = 0

    IF t >= 0 THEN
        debugVal = debug

Derived Variables

    totSpecCap = biophysicalProperties2CaPools->totSpecCap     (exposed as totSpecCap)
    caConcExt2 = biophysicalProperties2CaPools->intracellularProperties2CaPools->caConcExt2     (exposed as caConcExt2)
    totCap = totSpecCap * surfaceArea     
    caConc2 = biophysicalProperties2CaPools->intracellularProperties2CaPools->caConc2     (exposed as caConc2)
    iSyn = synapses[*]->i (reduce method: add)     (exposed as iSyn)
    iCa = biophysicalProperties2CaPools->membraneProperties2CaPools->iCa     (exposed as iCa)
    caConcExt = biophysicalProperties2CaPools->intracellularProperties2CaPools->caConcExt     (exposed as caConcExt)
    iCa2 = biophysicalProperties2CaPools->membraneProperties2CaPools->iCa2     (exposed as iCa2)
    initMembPot = biophysicalProperties2CaPools->membraneProperties2CaPools->initMembPotential->value    
    thresh = biophysicalProperties2CaPools->membraneProperties2CaPools->spikeThresh->value    
    caConc = biophysicalProperties2CaPools->intracellularProperties2CaPools->caConc     (exposed as caConc)
    debug = biophysicalProperties2CaPools->membraneProperties2CaPools->totChanCurrent    
    surfaceArea = morphology->segments[*]->surfaceArea (reduce method: add)     (exposed as surfaceArea)
    iChannels = biophysicalProperties2CaPools->membraneProperties2CaPools->totChanCurrent     (exposed as iChannels)

Time Derivatives

    d v /dt = (iChannels + iSyn) / totCap

 
baseCellMembPotCap

    extends baseCellMembPot

Any cell with a membrane potential v with voltage units and a membrane capacitance C. Also defines exposed value iSyn for current due to external synapses and iMemb for total current crossing membrane (normally channel currents plus iSyn)
Parameters C capacitance
Exposures iMemb
    Total current crossing the cell membrane
current
iSyn
    Total current due to synaptic inputs
current
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
 
baseIaf

    extends baseCellMembPot

Base ComponentType for an integrate and fire cell which emits a spiking event at membrane potential thresh and and resets to reset
Parameters reset voltage
thresh voltage
Exposures v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
 
iafTauCell

    extends baseIaf

Integrate and fire cell which returns to its leak reversal potential of leakReversal with a time course tau
Parameters leakReversal voltage
reset    (from baseIaf) voltage
tau time
thresh    (from baseIaf) voltage
Exposures v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
Dynamics State Variables

    v    voltage (exposed as v)

On Start

    v = leakReversal

On Conditions

    IF v > thresh THEN
        v = reset
        EVENT OUT on port spike

Time Derivatives

    d v /dt = (leakReversal - v) / tau

 
iafTauRefCell

    extends iafTauCell

Integrate and fire cell which returns to its leak reversal potential of leakReversal with a time course tau. It has a refractory period of refract after spiking
Parameters leakReversal    (from iafTauCell) voltage
refract time
reset    (from baseIaf) voltage
tau    (from iafTauCell) time
thresh    (from baseIaf) voltage
Exposures v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
Dynamics State Variables

    lastSpikeTime    time
    v    voltage (exposed as v)

On Start

    v = leakReversal

Regime: refractory (initial)

        On Entry

            lastSpikeTime = t
            v = reset

        On Conditions

            IF t > lastSpikeTime + refract THEN
                TRANSITION to REGIME integrating

Regime: integrating (initial)

        On Conditions

            IF v > thresh THEN
                EVENT OUT on port spike
                TRANSITION to REGIME refractory

        Time Derivatives

            d v /dt = (leakReversal - v) / tau


 
baseIafCapCell

    extends baseCellMembPotCap

Base Type for all Integrate and Fire cells with a capacitance C, threshold thresh and reset membrane potential reset
Parameters C    (from baseCellMembPotCap) capacitance
reset voltage
thresh voltage
Exposures iMemb    (from baseCellMembPotCap) current
iSyn    (from baseCellMembPotCap) current
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
 
iafCell

    extends baseIafCapCell

Integrate and fire cell with capacitance C, leakConductance and leakReversal
Parameters C    (from baseCellMembPotCap) capacitance
leakConductance conductance
leakReversal voltage
reset    (from baseIafCapCell) voltage
thresh    (from baseIafCapCell) voltage
Exposures iMemb    (from baseCellMembPotCap) current
iSyn    (from baseCellMembPotCap) current
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
Attachments synapses basePointCurrent
Dynamics State Variables

    v    voltage (exposed as v)

On Start

    v = leakReversal

On Conditions

    IF v > thresh THEN
        v = reset
        EVENT OUT on port spike

Derived Variables

    iSyn = synapses[*]->i (reduce method: add)     (exposed as iSyn)
    iMemb = leakConductance * (leakReversal - v) + iSyn     (exposed as iMemb)

Time Derivatives

    d v /dt = iMemb / C

 
iafRefCell

    extends iafCell

Integrate and fire cell with capacitance C, leakConductance, leakReversal and refractory period refract
Parameters C    (from baseCellMembPotCap) capacitance
leakConductance    (from iafCell) conductance
leakReversal    (from iafCell) voltage
refract time
reset    (from baseIafCapCell) voltage
thresh    (from baseIafCapCell) voltage
Exposures iMemb    (from baseCellMembPotCap) current
iSyn    (from baseCellMembPotCap) current
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
Attachments synapses basePointCurrent
Dynamics State Variables

    lastSpikeTime    time
    v    voltage (exposed as v)

On Start

    v = leakReversal

Derived Variables

    iSyn = synapses[*]->i (reduce method: add)     (exposed as iSyn)
    iMemb = leakConductance * (leakReversal - v) + iSyn     (exposed as iMemb)

Regime: refractory (initial)

        On Entry

            lastSpikeTime = t
            v = reset

        On Conditions

            IF t > lastSpikeTime + refract THEN
                TRANSITION to REGIME integrating

Regime: integrating (initial)

        On Conditions

            IF v > thresh THEN
                EVENT OUT on port spike
                TRANSITION to REGIME refractory

        Time Derivatives

            d v /dt = iMemb / C


 
izhikevichCell

    extends baseCellMembPot

Cell based on the 2003 model of Izhikevich, see http://izhikevich.org/publications/spikes.htm
Parameters a Dimensionless
b Dimensionless
c Dimensionless
d Dimensionless
thresh voltage
v0 voltage
Constants MVOLT = 1mV voltage
MSEC = 1ms time
Exposures U Dimensionless
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
Attachments synapses basePointCurrentDL
Dynamics State Variables

    U    Dimensionless (exposed as U)
    v    voltage (exposed as v)

On Start

    v = v0
    U = v0 * b / MVOLT

On Conditions

    IF v > thresh THEN
        v = c * MVOLT
        U = U + d
        EVENT OUT on port spike

Derived Variables

    ISyn = synapses[*]->I (reduce method: add)    

Time Derivatives

    d U /dt = a * (b * v / MVOLT - U) / MSEC
    d v /dt = (0.04 * v^2 / MVOLT + 5 * v + (140.0 - U + ISyn) * MVOLT)/MSEC

 
izhikevich2007Cell

    extends baseCellMembPotCap

Cell based on the modified Izhikevich model in Izhikevich 2007, Dynamical systems in neuroscience, MIT Press
Parameters C    (from baseCellMembPotCap) capacitance
a per_time
b conductance
c voltage
d current
k conductance_per_voltage
v0 voltage
vpeak voltage
vr voltage
vt voltage
Exposures iMemb    (from baseCellMembPotCap) current
iSyn    (from baseCellMembPotCap) current
u current
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
Attachments synapses basePointCurrent
Dynamics State Variables

    u    current (exposed as u)
    v    voltage (exposed as v)

On Start

    v = v0
    u = 0

On Conditions

    IF v > vpeak THEN
        v = c
        u = u + d
        EVENT OUT on port spike

Derived Variables

    iSyn = synapses[*]->i (reduce method: add)     (exposed as iSyn)
    iMemb = k * (v-vr) * (v-vt) + iSyn - u     (exposed as iMemb)

Time Derivatives

    d u /dt = a * (b * (v-vr) - u)
    d v /dt = iMemb / C

 
adExIaFCell

    extends baseCellMembPotCap

Model based on Brette R and Gerstner W (2005) Adaptive Exponential Integrate-and-Fire Model as an Effective Description of Neuronal Activity. J Neurophysiol 94:3637-3642
Parameters C    (from baseCellMembPotCap) capacitance
EL voltage
VT voltage
a conductance
b current
delT voltage
gL conductance
refract time
reset voltage
tauw time
thresh voltage
Exposures iMemb    (from baseCellMembPotCap) current
iSyn    (from baseCellMembPotCap) current
v    (from baseCellMembPot) voltage
w current
Event Ports spike    (from baseSpikingCell) Direction: out
Attachments synapses basePointCurrent
Dynamics State Variables

    lastSpikeTime    time
    w    current (exposed as w)
    v    voltage (exposed as v)

On Start

    v = EL
    w = 0

Derived Variables

    iSyn = synapses[*]->i (reduce method: add)     (exposed as iSyn)
    iMemb = -1 * gL * (v - EL) + gL * delT * exp((v - VT) / delT) - w + iSyn     (exposed as iMemb)

Regime: refractory (initial)

        On Entry

            lastSpikeTime = t
            v = reset
            w = w + b

        On Conditions

            IF t > lastSpikeTime + refract THEN
                TRANSITION to REGIME integrating

        Time Derivatives

            d w /dt = (a * (v - EL) - w) / tauw

Regime: integrating (initial)

        On Conditions

            IF v > thresh THEN
                EVENT OUT on port spike
                TRANSITION to REGIME refractory

        Time Derivatives

            d w /dt = (a * (v - EL) - w) / tauw
            d v /dt = iMemb / C


 
fitzHughNagumoCell

    extends baseCellMembPotDL

Simple dimensionless model of spiking cell from FitzHugh and Nagumo. Based on http://www.scholarpedia.org/article/FitzHugh-Nagumo_model. Note: should be updated, see https://github.com/NeuroML/NeuroML2/issues/42
Parameters I Dimensionless
Constants SEC = 1s time
Exposures V    (from baseCellMembPotDL) Dimensionless
W Dimensionless
Event Ports spike    (from baseSpikingCell) Direction: out
Dynamics State Variables

    W    Dimensionless (exposed as W)
    V    Dimensionless (exposed as V)

Time Derivatives

    d W /dt = (0.08 * (V + 0.7 - 0.8 * W)) / SEC
    d V /dt = ( (V - ((V^3) / 3)) - W + I) / SEC

 
pinskyRinzelCA3Cell

    extends baseCellMembPot

Reduced CA3 cell model from Pinsky and Rinzel 1994. See https://github.com/OpenSourceBrain/PinskyRinzelModel
Parameters alphac Dimensionless
betac Dimensionless
cm specificCapacitance
eCa voltage
eK voltage
eL voltage
eNa voltage
gAmpa conductanceDensity
gCa conductanceDensity
gKC conductanceDensity
gKahp conductanceDensity
gKdr conductanceDensity
gLd conductanceDensity
gLs conductanceDensity
gNa conductanceDensity
gNmda conductanceDensity
gc conductanceDensity
iDend currentDensity
iSoma currentDensity
pp Dimensionless
qd0 Dimensionless
Constants Smax = 125.0 Dimensionless
MSEC = 1 ms time
Vsyn = 60.0 mV voltage
MVOLT = 1 mV voltage
UAMP_PER_CM2 = 1 uA_per_cm2 currentDensity
betaqd = 0.001 Dimensionless
Exposures Cad Dimensionless
ICad currentDensity
Si Dimensionless
Vd voltage
Vs voltage
Wi Dimensionless
cd Dimensionless
hs Dimensionless
ns Dimensionless
qd Dimensionless
sd Dimensionless
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
Dynamics State Variables

    Vd    voltage (exposed as Vd)
    hs    Dimensionless (exposed as hs)
    Wi    Dimensionless (exposed as Wi)
    cd    Dimensionless (exposed as cd)
    Si    Dimensionless (exposed as Si)
    Vs    voltage (exposed as Vs)
    qd    Dimensionless (exposed as qd)
    Sisat    Dimensionless
    Cad    Dimensionless (exposed as Cad)
    ns    Dimensionless (exposed as ns)
    sd    Dimensionless (exposed as sd)

On Start

    Vs = eL
    Vd = eL
    qd = qd0

Derived Variables

    alphams_Vs = 0.32*(-46.9-Vs/MVOLT)/(exp((-46.9-Vs/MVOLT)/4.0)-1.0)    
    Minfs_Vs = alphams_Vs/(alphams_Vs+betams_Vs)    
    betasd_Vd = 0.02*(Vd/MVOLT+8.9)/(exp((Vd/MVOLT+8.9)/5.0)-1.0)    
    alphahs_Vs = 0.128*exp((-43.0-Vs/MVOLT)/18.0)    
    Isyn = Iampa+Inmda    
    Inmda = gNmda*Sisat*(Vd-Vsyn)/(1.0+0.28*exp(-0.062*(Vd/MVOLT-60.0)))    
    Iampa = gAmpa*Wi*(Vd-Vsyn)    
    betams_Vs = 0.28*(Vs/MVOLT+19.9)/(exp((Vs/MVOLT+19.9)/5.0)-1.0)    
    betans_Vs = 0.25*exp(-1.0-0.025*Vs/MVOLT)    
    alphans_Vs = 0.016*(-24.9-Vs/MVOLT)/(exp((-24.9-Vs/MVOLT)/5.0)-1.0)    
    v = Vs     (exposed as v)
    alphasd_Vd = 1.6/(1.0+exp(-0.072*(Vd/MVOLT-5.0)))    
    ICad = gCa*sd*sd*(Vd-eCa)     (exposed as ICad)
    betahs_Vs = 4.0/(1.0+exp((-20.0-Vs/MVOLT)/5.0))    

Conditional Derived Variables

    IF Vd < -10*MVOLT THEN
        alphacd_Vd = exp((Vd/MVOLT+50.0)/11-(Vd/MVOLT+53.5)/27)/18.975    
    OTHERWISE
        alphacd_Vd = 2.0*exp((-53.5-Vd/MVOLT)/27.0)    

    IF Si > Smax THEN
        Sisat = Smax    
    OTHERWISE
        Sisat = Si    

    IF 0.00002*Cad > 0.01 THEN
        alphaqd = 0.01    
    OTHERWISE
        alphaqd = 0.00002*Cad    

    IF Vd < -10*MVOLT THEN
        betacd_Vd = (2.0*exp((-53.5-Vd/MVOLT)/27.0)-alphacd_Vd)    
    OTHERWISE
        betacd_Vd = 0    

    IF Cad/250 > 1 THEN
        chid = 1    
    OTHERWISE
        chid = Cad/250    


Time Derivatives

    d Vd /dt = (iDend/(1.0-pp)-Isyn/(1.0-pp)-gLd*(Vd-eL)-ICad-gKahp*qd*(Vd-eK)-gKC*cd*chid*(Vd-eK)+(gc*(Vs-Vd))/(1.0-pp)) / cm
    d hs /dt = (alphahs_Vs-(alphahs_Vs+betahs_Vs)*hs) / MSEC
    d Wi /dt = -Wi/2.0
    d cd /dt = (alphacd_Vd-(alphacd_Vd+betacd_Vd)*cd) / MSEC
    d Si /dt = -Si/150.0
    d Vs /dt = (-gLs*(Vs-eL)-gNa*(Minfs_Vs^2)*hs*(Vs-eNa)-gKdr*ns*(Vs-eK)+(gc/pp)*(Vd-Vs)+iSoma/pp) / cm
    d qd /dt = (alphaqd-(alphaqd+betaqd)*qd) / MSEC
    d Cad /dt = (-0.13*ICad/UAMP_PER_CM2-0.075*Cad) / MSEC
    d ns /dt = (alphans_Vs-(alphans_Vs+betans_Vs)*ns) / MSEC
    d sd /dt = (alphasd_Vd-(alphasd_Vd+betasd_Vd)*sd) / MSEC