I need to do the user-defined short-term plasticity.
My code is modified from Exp2Syn. Fac is for facilitation, Dep is for depression and DepR and FacR is for their recoveries.
NEURON {
POINT_PROCESS PlaExp2Syn
RANGE tau1, tau2, e, i
NONSPECIFIC_CURRENT i
RANGE g
RANGE Fac, Dep, FacR, DepR, F, D, plas
}
UNITS {
(nA) = (nanoamp)
(mV) = (millivolt)
(umho) = (micromho)
}
PARAMETER {
tau1 = 0.1 (ms) < 1e-9, 1e9 >
tau2 = 0.3 (ms) < 1e-9, 1e9 >
e = 0 (mV)
: these values are from Yan's model
}
ASSIGNED {
v (mV)
i (nA)
g (us)
factor
total (us)
Fac
FacR
Dep
DepR
plas
}
STATE {
A (us)
B (us)
}
INITIAL {
LOCAL tp
if (tau1/tau2 > 0.9999) {
tau1 = 0.9999*tau2
}
:when tau1>tau2, the syanpse turns into an alpha function synapse
A = 0
B = 0
D = 1
F = 1
tp = (tau1*tau2)/(tau2 - tau1) * log(tau2/tau1)
factor = -exp(-tp/tau1) + exp(-tp/tau2)
factor = 1/factor
}
BREAKPOINT {
SOLVE state METHOD cnexp
g = B - A
i = g*(v - e)
plas = D * F
}
DERIVATIVE state {
A' = -A/tau1
B' = -B/tau2
D' = DepR*(1-plas) - Dep
F' = Fac - FacR*(1-plas)
}
NET_RECEIVE(weight (us), Fac, FacR, Dep, DepR) {
:tsyn = t
A = A + weight*factor*plas
B = B + weight*factor*plas
}
I pass the Fac, FacR, Dep and DepR as weight array. in the format
netcon.weight[0]=weight
netcon.weight[1]=Fac
netcon.weight[2]=FacR
netcon.weight[3]=Dep
netcon.weight[4]=DepR
but no matter how I changed the value of Fac, FacR, Dep and DepR in hoc file, the EPSPs are not affected. But when I assign values to them in the mod file, EPSPs show plasticity.
Can you please tell me how to fix this? that means how can i change the short-term plasticity in hoc without recompiling the mod file each time?
Thanks a lot!

