NOTE: the latest version of this documentation can be found on docs.neuroml.org!


For more information on NeuroML 2 and LEMS see here.
Note: these descriptions have been updated to the latest NeuroML v2.2 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_v2.2.xsd

 
baseCell

    extends baseStandalone

Base type of any cell (either abstract like izhikevich2007Cell or morphologically detailed like 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 producing 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
Constants vShift = 0mV voltage
Exposures i    (from basePointCurrent) current
Requirements v    (from baseVoltageDepPointCurrent) voltage
Dynamics Structure

    CHILD INSTANCE: ionChannel

Derived Variables

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

 
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
vShift = 0mV voltage
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

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

 
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 parameter
segmentGroup
Child elements inhomogeneousValue inhomogeneousValue
 
inhomogeneousValue
Specifies the value of a variableParameter
Text fields inhomogeneousParameter
value
 
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 segmentGroup
ion
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 segmentGroup
ion
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 segmentGroup
ion
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 segmentGroup
ion
Constants vShift = 0mV voltage
Exposures gDensity    (from baseChannelDensityCond) conductanceDensity
iDensity    (from baseChannelDensity) currentDensity
Requirements v    (from baseChannelDensity) voltage
Dynamics Structure

    CHILD INSTANCE: ionChannel

Derived Variables

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

 
channelDensityVShift

    extends channelDensity

Same as channelDensity, but with a vShift parameter to change voltage activation of gates. The exact usage of vShift in expressions for rates is determined by the individual gates.
Parameters condDensity    (from baseChannelDensityCond) conductanceDensity
erev    (from channelDensity) voltage
vShift voltage
Text fields segmentGroup
ion
Exposures gDensity    (from baseChannelDensityCond) conductanceDensity
iDensity    (from baseChannelDensity) currentDensity
Requirements v    (from baseChannelDensity) voltage
 
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 segmentGroup
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
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 a second independent Ca++ pool (ca2). See https://github.com/OpenSourceBrain/ghk-nernst.
Parameters condDensity    (from baseChannelDensityCond) conductanceDensity
Text fields segmentGroup
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
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 segmentGroup
ion
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)    
    expKv = exp(-1 * K * v)    
    channelf = ionChannel->fopen    

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 segmentGroup
ion
Constants VOLT_SCALE = 1 mV voltage
CONC_SCALE = 1 mM concentration
TEMP_SCALE = 1 K temperature
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

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

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

    v    voltage (exposed as v)
    spiking    Dimensionless

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 populations baseChannelPopulation
concentrationModels concentrationModel
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

    v    voltage (exposed as v)
    spiking    Dimensionless

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

Time Derivatives

    d v /dt = iMemb / C

 
distal

    extends point3DWithDiam

Point furthest from the soma/root in a segment. See also proximal.
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. The fractionAlong specifies where it is connected usually 1 (the default value), meaning the distal point of the parent, or 0, meaning the proximal point. If it is between these, a linear interpolation between the 2 points should be used.
Text fields segment
fractionAlong
 
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 parent parent
distal distal
proximal proximal
Constants LEN = 1m length
Exposures length length
radDist length
surfaceArea area
Dynamics Derived Variables

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

Conditional Derived Variables

    IF length = 0 * LEN THEN
        surfaceArea = 4 * radDist * radDist * 3.14159265     (exposed as surfaceArea)
    IF length > 0 * LEN 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 property property
members member
paths path
subTrees subTree
includes include
inhomogeneousParameter inhomogeneousParameter
 
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 from from
to to
 
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 proximal proximalProperties
distal distalProperties
 
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
populations baseChannelPopulation
channelDensities baseChannelDensity
Exposures iCa current
totChanCurrent current
totSpecCap specificCapacitance
Requirements surfaceArea area
Dynamics Derived Variables

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

 
membraneProperties2CaPools

    extends membraneProperties

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

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

 
biophysicalProperties
The biophysical properties of the cell, including the membraneProperties and the intracellularProperties
Child elements membraneProperties membraneProperties
intracellularProperties intracellularProperties
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 membraneProperties2CaPools membraneProperties2CaPools
intracellularProperties2CaPools intracellularProperties2CaPools
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 ionic 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 speciesList species
resistivity resistivity
Exposures caConc    (from intracellularProperties) concentration
caConc2 concentration
caConcExt    (from intracellularProperties) concentration
caConcExt2 concentration
Dynamics Derived Variables

    caConc2 = speciesList[ion='ca2']->concentration (reduce method: add)     (exposed as caConc2)
    caConcExt2 = speciesList[ion='ca2']->extConcentration (reduce method: add)     (exposed as caConcExt2)
    caConc = speciesList[ion='ca']->concentration (reduce method: add)     (exposed as caConc)
    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

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

On Start

    concentration = initialConcentration
    extConcentration = initialExtConcentration

 
decayingPoolConcentrationModel

    extends concentrationModel

Model of an intracellular buffering mechanism for 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

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

On Start

    concentration = initialConcentration
    extConcentration = initialExtConcentration

On Conditions

    IF concentration < 0 THEN
        concentration = 0

Derived Variables

    effectiveRadius = LENGTH_SCALE * sqrt(surfaceArea/(AREA_SCALE * (4 * 3.14159)))    
    innerRadius = effectiveRadius - shellThickness    
    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 area
surfaceArea    (from concentrationModel) area
Dynamics State Variables

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

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

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

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

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

 
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 jLEMS 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
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

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

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

Derived Variables

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

Time Derivatives

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

 
cell2CaPools

    extends cell

Variant of cell with two independent Ca2+ pools. Cell with segments specified in a morphology element along with details on its biophysicalProperties. NOTE: this can only be correctly simulated using jLEMS 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
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

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

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

Derived Variables

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

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 transmembrane current (usually 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 constant 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

    v    voltage (exposed as v)
    lastSpikeTime    time

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

    v    voltage (exposed as v)
    lastSpikeTime    time

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 MSEC = 1ms time
MVOLT = 1mV voltage
Exposures U Dimensionless
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
Attachments synapses basePointCurrentDL
Dynamics State Variables

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

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 v /dt = (0.04 * v^2 / MVOLT + 5 * v + (140.0 - U + ISyn) * MVOLT)/MSEC
    d U /dt = a * (b * v / MVOLT - U) / 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

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

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 v /dt = iMemb / C
    d u /dt = a * (b * (v-vr) - u)

 
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

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

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 v /dt = iMemb / C
            d w /dt = (a * (v - EL) - w) / tauw


 
fitzHughNagumoCell

    extends baseCellMembPotDL

Simple dimensionless model of spiking cell from FitzHugh and Nagumo. Superseded by fitzHughNagumo1969Cell (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

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

Time Derivatives

    d V /dt = ( (V - ((V^3) / 3)) - W + I) / SEC
    d W /dt = (0.08 * (V + 0.7 - 0.8 * W)) / 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 MSEC = 1 ms time
MVOLT = 1 mV voltage
UAMP_PER_CM2 = 1 uA_per_cm2 currentDensity
Smax = 125.0 Dimensionless
Vsyn = 60.0 mV voltage
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

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

On Start

    Vs = eL
    Vd = eL
    qd = qd0

Derived Variables

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

Conditional Derived Variables

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

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

    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 Vd < -10*MVOLT THEN
        betacd_Vd = (2.0*exp((-53.5-Vd/MVOLT)/27.0)-alphacd_Vd)    
    OTHERWISE
        betacd_Vd = 0    

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


Time Derivatives

    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 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 Cad /dt = (-0.13*ICad/UAMP_PER_CM2-0.075*Cad) / MSEC
    d hs /dt = (alphahs_Vs-(alphahs_Vs+betahs_Vs)*hs) / MSEC
    d ns /dt = (alphans_Vs-(alphans_Vs+betans_Vs)*ns) / MSEC
    d sd /dt = (alphasd_Vd-(alphasd_Vd+betasd_Vd)*sd) / MSEC
    d cd /dt = (alphacd_Vd-(alphacd_Vd+betacd_Vd)*cd) / MSEC
    d qd /dt = (alphaqd-(alphaqd+betaqd)*qd) / MSEC
    d Si /dt = -Si/150.0
    d Wi /dt = -Wi/2.0