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!

PyNN

NeuroML2 ComponentType definitions from PyNN.xml
Original LEMS ComponentType definitions: PyNN.xml
Schema against which NeuroML based on these should be valid: NeuroML_v2.2.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
Constants MSEC = 1ms time
MVOLT = 1mV voltage
NFARAD = 1nF capacitance
Exposures iSyn current
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) current
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) current
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
Exposures iSyn    (from basePyNNCell) current
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 baseSynapse
Dynamics State Variables

    v    voltage (exposed as v)
    lastSpikeTime    time

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/cm) + ((v_rest - (v/MVOLT)) / tau_m))/MSEC) + (iSyn / (cm * NFARAD))


 
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
Exposures iSyn    (from basePyNNCell) current
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 baseSynapse
Dynamics State Variables

    v    voltage (exposed as v)
    lastSpikeTime    time

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)/cm) + ((v_rest - (v/MVOLT)) / tau_m))/MSEC) + (iSyn / (cm * NFARAD))


 
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
Exposures iSyn    (from basePyNNCell) current
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 baseSynapse
Dynamics State Variables

    v    voltage (exposed as v)
    lastSpikeTime    time

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) / cm) + ((v_rest - (v / MVOLT)) / tau_m)) / MSEC) + (iSyn / (cm * NFARAD))


 
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
Exposures iSyn    (from basePyNNCell) current
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 baseSynapse
Dynamics State Variables

    v    voltage (exposed as v)
    lastSpikeTime    time

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)/cm) + ((v_rest - (v / MVOLT)) / tau_m)) / MSEC) + (iSyn / (cm * NFARAD))


 
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
tau_m    (from basePyNNIaFCell) 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_spike Dimensionless
v_thresh    (from basePyNNIaFCell) Dimensionless
Derived Parameters eif_threshold = v_spike * H(delta_T-1e-12) + v_thresh * H(-1*delta_T+1e-9) Dimensionless
Exposures iSyn    (from basePyNNCell) current
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 baseSynapse
Dynamics State Variables

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

On Start

    v = v_init * MVOLT
    w = 0

Derived Variables

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

Conditional Derived Variables

    IF delta_T > 0 THEN
        delta_I = delta_T * exp(((v / MVOLT) - v_thresh) / delta_T)    
    IF delta_T = 0 THEN
        delta_I = 0    


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 > eif_threshold * MVOLT THEN
                EVENT OUT on port spike
                TRANSITION to REGIME refractory

        Time Derivatives

            d v /dt = (MVOLT * ((-1 * ((v / MVOLT) - v_rest) + delta_I) / tau_m + (i_offset - w) / cm) / MSEC) + (iSyn / (cm * NFARAD))
            d w /dt = (1 / tau_w) * (a * ((v / MVOLT) - v_rest) - w) / 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
tau_m    (from basePyNNIaFCell) 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_spike Dimensionless
v_thresh    (from basePyNNIaFCell) Dimensionless
Derived Parameters eif_threshold = v_spike * H(delta_T-1e-12) + v_thresh * H(-1*delta_T+1e-9) Dimensionless
Exposures iSyn    (from basePyNNCell) current
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 baseSynapse
Dynamics State Variables

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

On Start

    v = v_init * MVOLT
    w = 0

Derived Variables

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

Conditional Derived Variables

    IF delta_T > 0 THEN
        delta_I = delta_T * exp(((v / MVOLT) - v_thresh) / delta_T)    
    IF delta_T = 0 THEN
        delta_I = 0    


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 > eif_threshold * MVOLT THEN
                EVENT OUT on port spike
                TRANSITION to REGIME refractory

        Time Derivatives

            d v /dt = (MVOLT * ((-1 * ( (v / MVOLT) - v_rest) + delta_I) / tau_m + (i_offset - w) / cm) / MSEC) + (iSyn / (cm * NFARAD))
            d w /dt = (1/ tau_w) * (a*((v/MVOLT)-v_rest) - w) /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
Exposures h Dimensionless
iSyn    (from basePyNNCell) current
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 baseSynapse
Dynamics State Variables

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

On Start

    v = v_init * MVOLT

Derived Variables

    iSyn = synapses[*]->i (reduce method: add)     (exposed as iSyn)
    iLeak = g_leak * (e_rev_leak - (v / MVOLT))    
    iNa = gbar_Na * (m * m * m) * h * (e_rev_Na - (v / MVOLT))    
    iK = gbar_K * (n * n * n * n) * (e_rev_K - (v / MVOLT))    
    iMemb = iLeak + iNa + iK + i_offset    
    alpham = 0.32 * (13 - (v / MVOLT) + v_offset) / (exp((13 - (v / MVOLT) + v_offset) / 4.0) - 1)    
    betam = 0.28 * ((v / MVOLT) - v_offset - 40) / (exp(((v / MVOLT) - v_offset - 40) / 5.0) - 1)    
    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)    
    betan = 0.5 * exp((10 - (v / MVOLT) + v_offset) / 40)    

Time Derivatives

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

 
basePynnSynapse

    extends baseVoltageDepSynapse

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
Constants MSEC = 1ms time
MVOLT = 1mV voltage
NAMP = 1nA current
Exposures i    (from basePointCurrent) current
Requirements v    (from baseVoltageDepSynapse) voltage
Event Ports in    (from baseSynapse) 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
Exposures g Dimensionless
i    (from basePointCurrent) current
Requirements v    (from baseVoltageDepSynapse) voltage
Event Ports in    (from baseSynapse) 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)) * NAMP     (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
Exposures i    (from basePointCurrent) current
Requirements v    (from baseVoltageDepSynapse) voltage
Event Ports in    (from baseSynapse) Direction: in
Dynamics State Variables

    I    Dimensionless

On Events

    EVENT IN on port: in
        I = I + weight

Derived Variables

    i = I * NAMP     (exposed as i)

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
Exposures A Dimensionless
g Dimensionless
i    (from basePointCurrent) current
Requirements v    (from baseVoltageDepSynapse) voltage
Event Ports in    (from baseSynapse) Direction: in
Dynamics State Variables

    g    Dimensionless (exposed as g)
    A    Dimensionless (exposed as A)

On Events

    EVENT IN on port: in
        A = A + weight

Derived Variables

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

Time Derivatives

    d g /dt = (2.7182818*A - g)/(tau_syn*MSEC)
    d A /dt = -A /(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
Exposures A current
i    (from basePointCurrent) current
Requirements v    (from baseVoltageDepSynapse) voltage
Event Ports in    (from baseSynapse) Direction: in
Dynamics State Variables

    I    Dimensionless
    A    Dimensionless (exposed as A)

On Events

    EVENT IN on port: in
        A = A + weight

Derived Variables

    i = I * NAMP     (exposed as i)

Time Derivatives

    d I /dt = (2.7182818*A - I)/(tau_syn*MSEC)
    d A /dt = -A /(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
Constants LONG_TIME = 1e9hour time
SMALL_TIME = 1e-9ms time
Exposures isi time
tnextIdeal time
tnextUsed time
tsince    (from baseSpikeSource) time
Event Ports in Direction: in
spike    (from baseSpikeSource) Direction: out
Dynamics State Variables

    tsince    time (exposed as tsince)
    tnextIdeal    time (exposed as tnextIdeal)
    tnextUsed    time (exposed as tnextUsed)
    isi    time (exposed as isi)

On Start

    isi = start - log(random(1))/rate
    tsince = 0
    tnextIdeal = isi + H(((isi) - (start+duration))/duration)*LONG_TIME
    tnextUsed = tnextIdeal

On Conditions

    IF t > tnextUsed THEN
        isi = -1 * log(random(1))/rate
        tnextIdeal = (tnextIdeal+isi) + H(((tnextIdeal+isi) - (start+duration))/duration)*LONG_TIME
        tnextUsed = tnextIdeal*H( (tnextIdeal-t)/t ) + (t+SMALL_TIME)*H( (t-tnextIdeal)/t )
        tsince = 0
        EVENT OUT on port spike

Time Derivatives

    d tsince /dt = 1
    d tnextUsed /dt = 0
    d tnextIdeal /dt = 0