I have defined I as shown in the code below, and I’m wondering whether I need to add a negative sign to I_syn. Below is the fsn code. In which cases should the negative sign be added? The synapse connections are defined separately
Minimal code to reproduce problem
eqs = '''
dv/dt = (k * 1 * pF/ms/mV * (v - vr) * (v - vt) - u * pF + I) / C : volt (unless refractory)
du/dt = int(v <= vb) * (a * (b * (vb - v)**3 - u)) + int(v > vb) * (-a * u) : volt/second
I = Ispon + Istim + Isyn : amp
Istim : amp
Ispon : amp
Isyn = I_AMPA_FSN + I_NMDA + I_GABA_FSN: amp
I_GABA_FSN : amp
I_AMPA_FSN : amp
I_NMDA : amp
a : 1/second
b : volt**-2/second
k : 1
E_L : volt
vt : volt
vr : volt
vb : volt
tau_w : second
th : volt
C : farad
c : volt
d : volt/second
''''
Hi @keun. I’m not 100% sure whether I understood your question correctly, but the sign of Isyn usually does not change between excitatory and inhibitory synapses. I don’t know the details of your models, but your Isyn current seems to be a sum of inhibitory GABA and excitatory AMPA and NMDA synapses. An inhibitory neuron connecting to your target neuron would only increase the GABA current, and an excitatory neuron would connect with either AMPA or NMDA, or both. Does that help?
Hi, Thank you for the response. This was the part I was confused about, but now I completely understand. I have one more question: Below is the code for connecting synapses, but the ampa, nmda, and gaba all have a negative sign in the constant term. I’m wondering if this works correctly. Thanks to your answer, I was able to resolve the issue I was curious about.
Hi again @keun. Could you explain what you mean by “but the ampa, nmda, and gaba all have a negative sign in the constant term” – what is the “constant term” here? In your AMPA equations, w and g_a should be positive, and the (E_\text{AMPA} - v) term will be positive as well, since E_\text{AMPA} > v. In contrast, for an inhibitory synapse, E_\text{GABA} < v (almost always), so I_\text{GABA} will be negative.
I was wondering if the negative sign in the update of ( g_a ) would cause the synaptic current ( I_\text{syn} ) to become negative as well, since it is reflected in the equation. However, I understand that for inhibitory synapses like GABA, where ( E_\text{GABA} < v ), the current is expected to be negative. So, I was concerned whether the negative sign of ( g_a ) would inadvertently cause the current to be incorrectly negative.
Thank you for your detailed explanation – it really helped clarify things for me!
Hi again. For a model with actual conductances (i.e. terms in the equations that look like g*(E - v)), the conductances should always be positive – physically, there is no such thing as a negative conductance. The confusion might stem from the fact that examples like Example: CUBA — Brian 2 2.7.1 documentation increase the ge for excitatory synapses, but decrease gi for inhibitory synapses. This is because in such models, the ge and gi variables do not represent conductances, despite their names.