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!

PyNN

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

 
basePyNNCell

    extends baseCellMembPot

Base type of any PyNN standard cell model. Note: membrane potential v has dimensions voltage, but all other parameters are dimensionless. This is to facilitate translation to and from PyNN scripts in Python, where these parameters have implicit units, see http://neuralensemble.org/trac/PyNN/wiki/StandardModels
Parameters cm Dimensionless
i_offset Dimensionless
tau_syn_E Dimensionless
tau_syn_I Dimensionless
v_init Dimensionless
Exposures ISyn Dimensionless
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
spike_in_E Direction: in
spike_in_I Direction: in
 
basePyNNIaFCell

    extends basePyNNCell

Base type of any PyNN standard integrate and fire model
Parameters cm    (from basePyNNCell) Dimensionless
i_offset    (from basePyNNCell) Dimensionless
tau_m Dimensionless
tau_refrac Dimensionless
tau_syn_E    (from basePyNNCell) Dimensionless
tau_syn_I    (from basePyNNCell) Dimensionless
v_init    (from basePyNNCell) Dimensionless
v_reset Dimensionless
v_rest Dimensionless
v_thresh Dimensionless
Exposures ISyn    (from basePyNNCell) Dimensionless
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
spike_in_E    (from basePyNNCell) Direction: in
spike_in_I    (from basePyNNCell) Direction: in
 
basePyNNIaFCondCell

    extends basePyNNIaFCell

Base type of conductance based PyNN IaF cell models
Parameters cm    (from basePyNNCell) Dimensionless
e_rev_E Dimensionless
e_rev_I Dimensionless
i_offset    (from basePyNNCell) Dimensionless
tau_m    (from basePyNNIaFCell) Dimensionless
tau_refrac    (from basePyNNIaFCell) Dimensionless
tau_syn_E    (from basePyNNCell) Dimensionless
tau_syn_I    (from basePyNNCell) Dimensionless
v_init    (from basePyNNCell) Dimensionless
v_reset    (from basePyNNIaFCell) Dimensionless
v_rest    (from basePyNNIaFCell) Dimensionless
v_thresh    (from basePyNNIaFCell) Dimensionless
Exposures ISyn    (from basePyNNCell) Dimensionless
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
spike_in_E    (from basePyNNCell) Direction: in
spike_in_I    (from basePyNNCell) Direction: in
 
IF_curr_alpha

    extends basePyNNIaFCell

Leaky integrate and fire model with fixed threshold and alpha-function-shaped post-synaptic current
Parameters cm    (from basePyNNCell) Dimensionless
i_offset    (from basePyNNCell) Dimensionless
tau_m    (from basePyNNIaFCell) Dimensionless
tau_refrac    (from basePyNNIaFCell) Dimensionless
tau_syn_E    (from basePyNNCell) Dimensionless
tau_syn_I    (from basePyNNCell) Dimensionless
v_init    (from basePyNNCell) Dimensionless
v_reset    (from basePyNNIaFCell) Dimensionless
v_rest    (from basePyNNIaFCell) Dimensionless
v_thresh    (from basePyNNIaFCell) Dimensionless
Constants MSEC = 1ms time
SEC = 1s time
MVOLT = 1mV voltage
Exposures ISyn    (from basePyNNCell) Dimensionless
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
spike_in_E    (from basePyNNCell) Direction: in
spike_in_I    (from basePyNNCell) Direction: in
Attachments synapses alphaCurrSynapse
Dynamics State Variables

    lastSpikeTime    time
    v    voltage (exposed as v)

On Start

    v = v_init * MVOLT

Derived Variables

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

Regime: refractory (initial)

        On Entry

            lastSpikeTime = t
            v = v_reset * MVOLT

        On Conditions

            IF t > lastSpikeTime + (tau_refrac*MSEC) THEN
                TRANSITION to REGIME integrating

Regime: integrating (initial)

        On Conditions

            IF v > v_thresh * MVOLT THEN
                EVENT OUT on port spike
                TRANSITION to REGIME refractory

        Time Derivatives

            d v /dt = MVOLT * (((i_offset + ISyn)/cm) + ((v_rest - (v/MVOLT)) / tau_m))/MSEC


 
IF_curr_exp

    extends basePyNNIaFCell

Leaky integrate and fire model with fixed threshold and decaying-exponential post-synaptic current
Parameters cm    (from basePyNNCell) Dimensionless
i_offset    (from basePyNNCell) Dimensionless
tau_m    (from basePyNNIaFCell) Dimensionless
tau_refrac    (from basePyNNIaFCell) Dimensionless
tau_syn_E    (from basePyNNCell) Dimensionless
tau_syn_I    (from basePyNNCell) Dimensionless
v_init    (from basePyNNCell) Dimensionless
v_reset    (from basePyNNIaFCell) Dimensionless
v_rest    (from basePyNNIaFCell) Dimensionless
v_thresh    (from basePyNNIaFCell) Dimensionless
Constants MSEC = 1ms time
SEC = 1s time
MVOLT = 1mV voltage
Exposures ISyn    (from basePyNNCell) Dimensionless
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
spike_in_E    (from basePyNNCell) Direction: in
spike_in_I    (from basePyNNCell) Direction: in
Attachments synapses expCurrSynapse
Dynamics State Variables

    lastSpikeTime    time
    v    voltage (exposed as v)

On Start

    v = v_init * MVOLT

Derived Variables

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

Regime: refractory (initial)

        On Entry

            lastSpikeTime = t
            v = v_reset * MVOLT

        On Conditions

            IF t > lastSpikeTime + (tau_refrac*MSEC) THEN
                TRANSITION to REGIME integrating

Regime: integrating (initial)

        On Conditions

            IF v > v_thresh * MVOLT THEN
                EVENT OUT on port spike
                TRANSITION to REGIME refractory

        Time Derivatives

            d v /dt = MVOLT * (((i_offset + ISyn)/cm) + ((v_rest - (v/MVOLT)) / tau_m))/MSEC


 
IF_cond_alpha

    extends basePyNNIaFCondCell

Leaky integrate and fire model with fixed threshold and alpha-function-shaped post-synaptic conductance
Parameters cm    (from basePyNNCell) Dimensionless
e_rev_E    (from basePyNNIaFCondCell) Dimensionless
e_rev_I    (from basePyNNIaFCondCell) Dimensionless
i_offset    (from basePyNNCell) Dimensionless
tau_m    (from basePyNNIaFCell) Dimensionless
tau_refrac    (from basePyNNIaFCell) Dimensionless
tau_syn_E    (from basePyNNCell) Dimensionless
tau_syn_I    (from basePyNNCell) Dimensionless
v_init    (from basePyNNCell) Dimensionless
v_reset    (from basePyNNIaFCell) Dimensionless
v_rest    (from basePyNNIaFCell) Dimensionless
v_thresh    (from basePyNNIaFCell) Dimensionless
Constants MSEC = 1ms time
SEC = 1s time
MVOLT = 1mV voltage
Exposures ISyn    (from basePyNNCell) Dimensionless
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
spike_in_E    (from basePyNNCell) Direction: in
spike_in_I    (from basePyNNCell) Direction: in
Attachments synapses alphaCondSynapse
Dynamics State Variables

    lastSpikeTime    time
    v    voltage (exposed as v)

On Start

    v = v_init * MVOLT

Derived Variables

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

Regime: refractory (initial)

        On Entry

            lastSpikeTime = t
            v = v_reset * MVOLT

        On Conditions

            IF t > lastSpikeTime + (tau_refrac*MSEC) THEN
                TRANSITION to REGIME integrating

Regime: integrating (initial)

        On Conditions

            IF v > v_thresh * MVOLT THEN
                EVENT OUT on port spike
                TRANSITION to REGIME refractory

        Time Derivatives

            d v /dt = MVOLT * (((i_offset + ISyn) / cm) + ((v_rest - (v / MVOLT)) / tau_m)) / MSEC


 
IF_cond_exp

    extends basePyNNIaFCondCell

Leaky integrate and fire model with fixed threshold and exponentially-decaying post-synaptic conductance
Parameters cm    (from basePyNNCell) Dimensionless
e_rev_E    (from basePyNNIaFCondCell) Dimensionless
e_rev_I    (from basePyNNIaFCondCell) Dimensionless
i_offset    (from basePyNNCell) Dimensionless
tau_m    (from basePyNNIaFCell) Dimensionless
tau_refrac    (from basePyNNIaFCell) Dimensionless
tau_syn_E    (from basePyNNCell) Dimensionless
tau_syn_I    (from basePyNNCell) Dimensionless
v_init    (from basePyNNCell) Dimensionless
v_reset    (from basePyNNIaFCell) Dimensionless
v_rest    (from basePyNNIaFCell) Dimensionless
v_thresh    (from basePyNNIaFCell) Dimensionless
Constants MSEC = 1ms time
SEC = 1s time
MVOLT = 1mV voltage
Exposures ISyn    (from basePyNNCell) Dimensionless
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
spike_in_E    (from basePyNNCell) Direction: in
spike_in_I    (from basePyNNCell) Direction: in
Attachments synapses expCondSynapse
Dynamics State Variables

    lastSpikeTime    time
    v    voltage (exposed as v)

On Start

    v = v_init * MVOLT

Derived Variables

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

Regime: refractory (initial)

        On Entry

            lastSpikeTime = t
            v = v_reset * MVOLT

        On Conditions

            IF t > lastSpikeTime + (tau_refrac*MSEC) THEN
                TRANSITION to REGIME integrating

Regime: integrating (initial)

        On Conditions

            IF v > v_thresh * MVOLT THEN
                EVENT OUT on port spike
                TRANSITION to REGIME refractory

        Time Derivatives

            d v /dt = MVOLT * (((i_offset + ISyn)/cm) + ((v_rest - (v / MVOLT)) / tau_m)) / MSEC


 
EIF_cond_exp_isfa_ista

    extends basePyNNIaFCondCell

Adaptive exponential integrate and fire neuron according to Brette R and Gerstner W (2005) with exponentially-decaying post-synaptic conductance
Parameters a Dimensionless
b Dimensionless
cm    (from basePyNNCell) Dimensionless
delta_T Dimensionless
e_rev_E    (from basePyNNIaFCondCell) Dimensionless
e_rev_I    (from basePyNNIaFCondCell) Dimensionless
i_offset    (from basePyNNCell) Dimensionless
i_offset Dimensionless
tau_m    (from basePyNNIaFCell) Dimensionless
tau_refrac Dimensionless
tau_refrac    (from basePyNNIaFCell) Dimensionless
tau_syn_E    (from basePyNNCell) Dimensionless
tau_syn_I    (from basePyNNCell) Dimensionless
tau_w Dimensionless
v_init    (from basePyNNCell) Dimensionless
v_reset    (from basePyNNIaFCell) Dimensionless
v_rest    (from basePyNNIaFCell) Dimensionless
v_rest Dimensionless
v_spike Dimensionless
v_thresh    (from basePyNNIaFCell) Dimensionless
Constants MSEC = 1ms time
SEC = 1s time
MVOLT = 1mV voltage
Exposures ISyn    (from basePyNNCell) Dimensionless
v    (from baseCellMembPot) voltage
w Dimensionless
Event Ports spike    (from baseSpikingCell) Direction: out
spike_in_E    (from basePyNNCell) Direction: in
spike_in_I    (from basePyNNCell) Direction: in
Attachments synapses expCondSynapse
Dynamics State Variables

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

On Start

    v = v_init * MVOLT
    w = 0

Derived Variables

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

Regime: refractory (initial)

        On Entry

            lastSpikeTime = t
            v = v_reset * MVOLT
            w = w+b

        On Conditions

            IF t > lastSpikeTime + (tau_refrac*MSEC) THEN
                TRANSITION to REGIME integrating

        Time Derivatives

            d w /dt = (1 / tau_w) * (a * ((v / MVOLT) - v_rest) - w) / MSEC

Regime: integrating (initial)

        On Conditions

            IF v > v_spike * MVOLT THEN
                EVENT OUT on port spike
                TRANSITION to REGIME refractory

        Time Derivatives

            d w /dt = (1 / tau_w) * (a * ((v / MVOLT) - v_rest) - w) / MSEC
            d v /dt = MVOLT * ((-1 * ((v / MVOLT) - v_rest) + delta_T * exp(((v / MVOLT) - v_thresh) / delta_T)) / tau_m + (i_offset + ISyn - w) / cm) / MSEC


 
EIF_cond_alpha_isfa_ista

    extends basePyNNIaFCondCell

Adaptive exponential integrate and fire neuron according to Brette R and Gerstner W (2005) with alpha-function-shaped post-synaptic conductance
Parameters a Dimensionless
b Dimensionless
cm    (from basePyNNCell) Dimensionless
delta_T Dimensionless
e_rev_E    (from basePyNNIaFCondCell) Dimensionless
e_rev_I    (from basePyNNIaFCondCell) Dimensionless
i_offset    (from basePyNNCell) Dimensionless
i_offset Dimensionless
tau_m    (from basePyNNIaFCell) Dimensionless
tau_refrac    (from basePyNNIaFCell) Dimensionless
tau_refrac Dimensionless
tau_syn_E    (from basePyNNCell) Dimensionless
tau_syn_I    (from basePyNNCell) Dimensionless
tau_w Dimensionless
v_init    (from basePyNNCell) Dimensionless
v_reset    (from basePyNNIaFCell) Dimensionless
v_rest Dimensionless
v_rest    (from basePyNNIaFCell) Dimensionless
v_spike Dimensionless
v_thresh    (from basePyNNIaFCell) Dimensionless
Constants MSEC = 1ms time
SEC = 1s time
MVOLT = 1mV voltage
Exposures ISyn    (from basePyNNCell) Dimensionless
v    (from baseCellMembPot) voltage
w Dimensionless
Event Ports spike    (from baseSpikingCell) Direction: out
spike_in_E    (from basePyNNCell) Direction: in
spike_in_I    (from basePyNNCell) Direction: in
Attachments synapses alphaCondSynapse
Dynamics State Variables

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

On Start

    v = v_init * MVOLT
    w = 0

Derived Variables

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

Regime: refractory (initial)

        On Entry

            lastSpikeTime = t
            v = v_reset * MVOLT
            w = w + b

        On Conditions

            IF t > lastSpikeTime + (tau_refrac * MSEC) THEN
                TRANSITION to REGIME integrating

        Time Derivatives

            d w /dt = (1 / tau_w) * (a * ((v / MVOLT) - v_rest) - w) / MSEC

Regime: integrating (initial)

        On Conditions

            IF v > v_spike * MVOLT THEN
                EVENT OUT on port spike
                TRANSITION to REGIME refractory

        Time Derivatives

            d w /dt = (1/ tau_w) * (a*((v/MVOLT)-v_rest) - w) /MSEC
            d v /dt = MVOLT * ((-1 * ( (v / MVOLT) - v_rest) + delta_T * exp(((v / MVOLT) - v_thresh) / delta_T)) / tau_m + (i_offset + ISyn - w) / cm) / MSEC


 
HH_cond_exp

    extends basePyNNCell

Single-compartment Hodgkin-Huxley-type neuron with transient sodium and delayed-rectifier potassium currents using the ion channel models from Traub.
Parameters cm    (from basePyNNCell) Dimensionless
e_rev_E Dimensionless
e_rev_I Dimensionless
e_rev_K Dimensionless
e_rev_Na Dimensionless
e_rev_leak Dimensionless
g_leak Dimensionless
gbar_K Dimensionless
gbar_Na Dimensionless
i_offset    (from basePyNNCell) Dimensionless
tau_syn_E    (from basePyNNCell) Dimensionless
tau_syn_I    (from basePyNNCell) Dimensionless
v_init    (from basePyNNCell) Dimensionless
v_offset Dimensionless
Constants MSEC = 1ms time
SEC = 1s time
MVOLT = 1mV voltage
Exposures ISyn    (from basePyNNCell) Dimensionless
h Dimensionless
m Dimensionless
n Dimensionless
v    (from baseCellMembPot) voltage
Event Ports spike    (from baseSpikingCell) Direction: out
spike_in_E    (from basePyNNCell) Direction: in
spike_in_I    (from basePyNNCell) Direction: in
Attachments synapses alphaCondSynapse
Dynamics State Variables

    h    Dimensionless (exposed as h)
    n    Dimensionless (exposed as n)
    m    Dimensionless (exposed as m)
    v    voltage (exposed as v)

On Start

    v = v_init * MVOLT

Derived Variables

    ISyn = synapses[*]->I (reduce method: add)     (exposed as ISyn)
    betam = 0.28 * ((v / MVOLT) - v_offset - 40) / (exp(((v / MVOLT) - v_offset - 40) / 5.0) - 1)    
    iLeak = g_leak * (e_rev_leak - (v / MVOLT))    
    iMemb = iLeak + iNa + iK + i_offset + ISyn    
    iK = gbar_K * (n * n * n * n) * (e_rev_K - (v / MVOLT))    
    betan = 0.5 * exp((10 - (v / MVOLT) + v_offset) / 40)    
    alphah = 0.128 * exp((17 - (v / MVOLT) + v_offset) / 18.0)    
    betah = 4.0 / (1 + exp((40 - (v / MVOLT) + v_offset) / 5))    
    alphan = 0.032 * (15 - (v / MVOLT) + v_offset) / (exp((15 - (v / MVOLT) + v_offset) / 5) - 1)    
    iNa = gbar_Na * (m * m * m) * h * (e_rev_Na - (v / MVOLT))    
    alpham = 0.32 * (13 - (v / MVOLT) + v_offset) / (exp((13 - (v / MVOLT) + v_offset) / 4.0) - 1)    

Time Derivatives

    d h /dt = (alphah * (1 - h) - betah * h) / MSEC
    d n /dt = (alphan * (1 - n) - betan * n) / MSEC
    d m /dt = (alpham * (1 - m) - betam * m) / MSEC
    d v /dt = MVOLT * (iMemb / cm) / MSEC

 
basePynnSynapse
Base type for all PyNN synapses. Note, the current I produced is dimensionless, but it requires a membrane potential v with dimension voltage
Parameters tau_syn Dimensionless
Exposures I Dimensionless
Requirements v voltage
Event Ports in Direction: in
 
expCondSynapse

    extends basePynnSynapse

Conductance based synapse with instantaneous rise and single exponential decay (with time constant tau_syn)
Parameters e_rev Dimensionless
tau_syn    (from basePynnSynapse) Dimensionless
Constants MVOLT = 1mV voltage
MSEC = 1ms time
Exposures I    (from basePynnSynapse) Dimensionless
g Dimensionless
Requirements v    (from basePynnSynapse) voltage
Event Ports in    (from basePynnSynapse) Direction: in
Dynamics State Variables

    g    Dimensionless (exposed as g)

On Events

    EVENT IN on port: in
        g = g+weight

Derived Variables

    I = g * (e_rev - (v/MVOLT))     (exposed as I)

Time Derivatives

    d g /dt = -g / (tau_syn*MSEC)

 
expCurrSynapse

    extends basePynnSynapse

Current based synapse with instantaneous rise and single exponential decay (with time constant tau_syn)
Parameters tau_syn    (from basePynnSynapse) Dimensionless
Constants MVOLT = 1mV voltage
MSEC = 1ms time
Exposures I    (from basePynnSynapse) Dimensionless
Requirements v    (from basePynnSynapse) voltage
Event Ports in    (from basePynnSynapse) Direction: in
Dynamics State Variables

    I    Dimensionless (exposed as I)

On Events

    EVENT IN on port: in
        I = I+weight

Time Derivatives

    d I /dt = -I / (tau_syn*MSEC)

 
alphaCondSynapse

    extends basePynnSynapse

Alpha synapse: rise time and decay time are both tau_syn. Conductance based synapse.
Parameters e_rev Dimensionless
tau_syn    (from basePynnSynapse) Dimensionless
Constants MVOLT = 1mV voltage
MSEC = 1ms time
Exposures I    (from basePynnSynapse) Dimensionless
g Dimensionless
y Dimensionless
Requirements v    (from basePynnSynapse) voltage
Event Ports in    (from basePynnSynapse) Direction: in
Dynamics State Variables

    y    Dimensionless (exposed as y)
    g    Dimensionless (exposed as g)

On Events

    EVENT IN on port: in
        y = y + weight

Derived Variables

    I = g * (e_rev - (v/MVOLT))     (exposed as I)

Time Derivatives

    d y /dt = -y /(tau_syn*MSEC)
    d g /dt = (2.7182818*y - g)/(tau_syn*MSEC)

 
alphaCurrSynapse

    extends basePynnSynapse

Alpha synapse: rise time and decay time are both tau_syn. Current based synapse.
Parameters tau_syn    (from basePynnSynapse) Dimensionless
Constants MVOLT = 1mV voltage
MSEC = 1ms time
Exposures I    (from basePynnSynapse) Dimensionless
y Dimensionless
Requirements v    (from basePynnSynapse) voltage
Event Ports in    (from basePynnSynapse) Direction: in
Dynamics State Variables

    I    Dimensionless (exposed as I)
    y    Dimensionless (exposed as y)

On Events

    EVENT IN on port: in
        y = y + weight

Time Derivatives

    d I /dt = (2.7182818*y - I)/(tau_syn*MSEC)
    d y /dt = -y /(tau_syn*MSEC)

 
SpikeSourcePoisson

    extends baseSpikeSource

Spike source, generating spikes according to a Poisson process.
Parameters duration time
rate per_time
start time
Derived Parameters end = start + duration time
Exposures tsince    (from baseSpikeSource) time
Event Ports in Direction: in
spike    (from baseSpikeSource) Direction: out
Dynamics State Variables

    nextSpike    time
    tsince    time (exposed as tsince)

On Start

    nextSpike = start + exp(-1*random(1))/rate
    tsince = 0

On Conditions

    IF tsince > nextSpike AND t <= end THEN
        nextSpike = exp(-1*random(1))/rate
        tsince = 0
        EVENT OUT on port spike

Time Derivatives

    d tsince /dt = 1