Hi there!

I’m trying to build a neural network model and use AMPA synapse model from Brunel_Wang_2001 example. I’m connecting two neural groups, one with external AMPA current as input (E1) and the other one with AMPA receptor current from the synapse (E2). I simplified the code given in the example, but E1 → E2 doesn’t seem to work. I couldn’t find where the problem is. Can anyone help me please, thanks

Minimal code to reproduce problem

```
# populations
N = 25
N_E = int(N * 0.8) # pyramidal neurons
# voltage
V_L = -70. * mV
V_thr = -50. * mV
V_reset = -55. * mV
V_E = 0. * mV
# membrane capacitance
C_m_E = 0.5 * nF
# membrane leak
g_m_E = 25. * nS
# refractory period
tau_rp_E = 2. * ms
# external stimuli
rate = 3 * Hz
C_ext = 800
# synapses
C_E = N_E
# AMPA (excitatory)
g_AMPA_ext_E = 2.08 * nS
g_AMPA_rec_E = 0.104 * nS * 800. / N_E
g_AMPA_ext_I = 1.62 * nS
g_AMPA_rec_I = 0.081 * nS * 800. / N_E
tau_AMPA = 2. * ms
start_scope()
eqs_E1 = '''
dv / dt = (- g_m_E * (v - V_L) - I_AMPA_ext) / C_m_E : volt (unless refractory)
I_AMPA_ext = g_AMPA_ext_I * (v - V_E) * s_AMPA_ext : amp
ds_AMPA_ext / dt = - s_AMPA_ext / tau_AMPA : 1
'''
eqs_E2 = '''
dv / dt = (- g_m_E * (v - V_L) - I_AMPA_rec) / C_m_E : volt (unless refractory)
I_AMPA_rec = g_AMPA_rec_I * (v - V_E) * 1 * s_AMPA : amp
ds_AMPA / dt = - s_AMPA / tau_AMPA : 1
'''
P_E1 = NeuronGroup(N_E, eqs_E1, threshold='v > V_thr', reset='v = V_reset', refractory=tau_rp_E, method='euler')
P_E1.v = V_L
P_E2 = NeuronGroup(N_E, eqs_E2, threshold='v > V_thr', reset='v = V_reset', refractory=tau_rp_E, method='euler')
P_E2.v = V_L
eqs_glut = '''
w : 1
'''
eqs_pre_glut = '''
s_AMPA += w
'''
eqs_pre_ext = '''
s_AMPA_ext += 1
'''
# E to E
C_P_E = PoissonInput(P_E1, 's_AMPA_ext', C_ext, rate, '1')
C_E_E = Synapses(P_E1, P_E2, model=eqs_glut, on_pre=eqs_pre_glut, method='euler')
C_E_E.connect('i != j')
C_E_E.w[:] = 1
# monitors
sp_E1 = SpikeMonitor(P_E1[:N_E])
r_E1 = PopulationRateMonitor(P_E1[:N_E])
sp_E2 = SpikeMonitor(P_E2[:N_E])
r_E2 = PopulationRateMonitor(P_E2[:N_E])
# simulate, can be long >120s
net = Network(collect())
net.add(sp_E1)
net.add(r_E1)
net.add(sp_E2)
net.add(r_E2)
net.run(4 * second, report='stdout')
```

Actual output