thanks, I have changed the conditions in the if statements.
I am trying to implement synaptic plasticity in inhibitory synapses as stated in the article "Spike-Timing-Dependent Plasticity of Inhibitory Synapses in the Entorhinal Cortex" DOI:
https://doi.org/10.1152/jn.00551.2006.
the equations are given under online implementation of STDP models (
http://www.scholarpedia.org/article/Spi ... plasticity)
the i and j represents presynaptic and post synaptic neurons. the mod file that I wrote is as follows:
Code: Select all
COMMENT
this is the implementation of iSTDP as reported by Haas et.al. 2006. this stdp rule was reported in the
inhibitory connections of inhibitory interneuron --> stellate cells as observed in the entorhinal cortex.
here, i is the presynaptic and j is the post synaptic neuron.
ENDCOMMENT
NEURON {
POINT_PROCESS iSTDPsyn
RANGE x, y, Aplus, Aminus
NONSPECIFIC_CURRENT i
}
UNITS {
(nA) = (nanoamp)
(mV) = (millivolt)
(uS) = (microsiemens)
}
PARAMETER {
tau = 0.1 (ms)
e = 0 (mV)
tauplus = 5 (/ms)
tauminus = 5 (/ms)
aplus = 18.0
aminus = 18.0
etaplus = 0.19
etaminus = 0.25
txlag = 8 (ms)
tylag = 8 (ms)
wmax = 3.0 (uS)
}
ASSIGNED {
x
y
v (mV)
i (nA)
w (uS)
tpre (ms)
tpost (ms)
Aplus
Aminus
}
STATE {
x
y
g (uS)
}
INITIAL {
g=0
net_send(0, 1)
}
BREAKPOINT {
SOLVE state METHOD cnexp
i = g*(v - e)
}
DERIVATIVE state {
if (((t - dt) <= (tpre + txlag)) && ((t + dt) >= (tpre + txlag))) {
x_' = (-x_ + aplus)/tauplus
y_' = -y_/tauminus
}
else if (((t - dt) <= (tpost + tylag)) && ((t + dt) >= (tpost + tylag))){
x_' = -x_/tauplus
y_' = (-y_ + aminus)/tauminus
}
else {
x_' = -x_/tauplus
y_' = -y_/tauminus
}
g' = -g/tau
}
NET_RECEIVE (w (uS), x, y, tpre (ms)){
if (flag == 0){ :presynaptic spike
tpre = t
Aminus = w * etaminus
g = g - ((Aminus * y)*dt)
}
else if (flag == 2) { : postsynaptic spike
tpost = t
FOR_NETCONS(w1, x, y, tpost) {
Aplus = (wmax - w1) * etaplus
g = g + ((Aplus * x)*dt)
}
}
else { : flag == 1 from INITIAL block
WATCH (v > -10) 2
}
}
can you please suggest a better way to implement it.