Dear all,

I have problem with implementing biexponential synaptic currents. Actually, no synaptic currents has been recorded. In case I use s_GABA_rec_tot_post, the error I get is: *s_GABA_rec_tot_post cannot be used as a variable name, the -pre and -post suffixes are used to refer to …*

While when I changed the name to s_GABA_rec_tot_in the error did not came up, but no currents was recorded. I wonder what causes such a problem.

My other question is whether ,summed, should be there? And what is the difference between AMPA and NMDA currents from modeling point of view?

A part of code regarding the equations is attached in the following.

Thank you in advance for your help and time.

Hedyeh

eqs_E = ‘’’

dv / dt = (- g_m_E * (v - V_L) - I_syn) / C_m_E : volt (unless refractory)

I_syn = I_AMPA_ext + I_AMPA_rec + I_NMDA_rec + I_GABA_rec : amp

I_AMPA_ext = g_AMPA_ext_E * (v - V_E) * s_AMPA_ext : amp

ds_AMPA_ext / dt = (- s_AMPA_ext / tau_AMPA_decay) : 1

I_NMDA_rec = g_NMDA_E * (v - V_E) / (1 + Mg2 * exp(-0.062 * v / mV) / 3.57) * s_NMDA_tot : amp

s_NMDA_tot : 1

I_AMPA_rec = g_AMPA_rec_E * (v - V_E) * s_AMPA_rec_tot : amp

s_AMPA_rec_tot : 1

I_GABA_rec = g_GABA_E * (v - V_I) * s_GABA_rec_tot : amp

s_GABA_rec_tot : 1

‘’’

eqs_I = ‘’’

dv / dt = (- g_m_I * (v - V_L) - I_syn) / C_m_I : volt (unless refractory)

I_syn = I_AMPA_ext + I_AMPA_rec + I_NMDA_rec + I_GABA_rec : amp

I_AMPA_ext = g_AMPA_ext_I * (v - V_E) * s_AMPA_ext : amp

ds_AMPA_ext / dt = (- s_AMPA_ext / tau_AMPA_decay) : 1

I_NMDA_rec = g_NMDA_I * (v - V_E) / (1 + Mg2 * exp(-0.062 * v / mV) / 3.57) * s_NMDA_tot : amp

s_NMDA_tot : 1

I_AMPA_rec = g_AMPA_rec_I * (v - V_E) * s_AMPA_rec_tot : amp

s_AMPA_rec_tot : 1

I_GABA_rec = g_GABA_I * (v - V_I) * s_GABA_rec_tot : amp

s_GABA_rec_tot : 1

‘’’

# populations

E = NeuronGroup(N_E, eqs_E, threshold=‘v > V_thr’, reset=‘v = V_reset’, refractory=tau_rp_E, method=‘euler’)

E.v = V_L

I = NeuronGroup(N_I, eqs_I, threshold=‘v > V_thr’, reset=‘v = V_reset’, refractory=tau_rp_I, method=‘euler’)

I.v = V_L

# Synaptic equations

eqs_NMDA = ‘’’

s_NMDA_tot_post = w * s_NMDA : 1 (summed)

ds_NMDA / dt = - s_NMDA / tau_NMDA_decay + alpha * x * (1 - s_NMDA) : 1 (clock-driven)

dx / dt = - x / tau_NMDA_rise : 1 (clock-driven)

w : 1

‘’’

eqs_AMPA_rec=‘’’

s_AMPA_rec_tot_post = w * s_AMPA_rec : 1 (summed)

ds_AMPA_rec / dt = ((tau_AMPA_decay / tau_AMPA_rise) ** (tau_AMPA_rise / (tau_AMPA_decay - tau_AMPA_rise)) * x_AMPA_rec - s_AMPA_rec ) / tau_AMPA_rise : 1 (clock-driven)

dx_AMPA_rec / dt = (- x_AMPA_rec / tau_AMPA_decay) : 1 (clock-driven)

w : 1

‘’’

eqs_GABA_rec=‘’’

s_GABA_rec_tot_post = w * s_GABA : 1

ds_GABA / dt = ((tau_GABA_decay / tau_GABA_rise) ** (tau_GABA_rise / (tau_GABA_decay - tau_GABA_rise)) * x_GABA - s_GABA ) / tau_GABA_rise : 1 (clock-driven)

dx_GABA/ dt = (- x_GABA / tau_GABA_decay) : 1 (clock-driven)

w : 1

‘’’

# Receptors

eqs_pre_NMDA = ‘’’

x += 1

‘’’

eqs_pre_rec = ‘’’

x_AMPA_rec += 1

‘’’

eqs_pre_ext = ‘’’

s_AMPA_ext += 1

‘’’

eqs_pre_gaba = ‘’’

x_GABA += 1

‘’’

# Connections involving NMDA synapses

C_E_E = Synapses(E, E, model=eqs_NMDA, on_pre=eqs_pre_NMDA, delay = 1.0 * ms, method=‘euler’)

C_E_E.connect(p=sparsness)

C_E_E.connect(‘i != j’)

C_E_I = Synapses(E, I, model=eqs_NMDA, on_pre=eqs_pre_NMDA, delay = 1.0 * ms, method=‘euler’)

C_E_I.connect(p=sparsness)

# Connections involving AMPA synapses

C_E_E = Synapses(E, E, model=eqs_AMPA_rec, on_pre=eqs_pre_rec, delay = 1.0 * ms, method=‘euler’)

C_E_E.connect(p=sparsness)

C_E_E.connect(‘i != j’)

C_E_I = Synapses(E, I, model=eqs_AMPA_rec, on_pre=eqs_pre_rec, delay = 1.0 * ms, method=‘euler’)

C_E_I.connect(p=sparsness)

# Connections involving GABA synapses

C_I_E = Synapses(I, E, model=eqs_GABA_rec, on_pre=eqs_pre_gaba, delay = 1.0 * ms, method=‘euler’)

C_I_E.connect(p=sparsness)

C_I_I = Synapses(I, I, model=eqs_GABA_rec, on_pre=eqs_pre_gaba, delay = 1.0 * ms, method=‘euler’)

C_I_I.connect(p=sparsness)

C_I_I.connect(‘i != j’)

# External inputs

C_P_E = PoissonInput(E, ‘s_AMPA_ext’, N=N_X, rate=rate_exc, weight=1.52)

C_P_I = PoissonInput(I, ‘s_AMPA_ext’, N=N_X, rate=rate_inh, weight=1.52)