I am just adding a new mechanism to model a synapse by the product of 2 exponential functions, as follows (very simplified):
Code: Select all
NEURON {
POINT_PROCESS syn
RANGE gmax, tau0, tau1, e_rev, i
NONSPECIFIC_CURRENT i
}
UNITS {
(nA) = (nanoamp)
(mV) = (millivolt)
(uS) = (micromho)
}
PARAMETER {
tau0 = 0.3 (ms)
tau1 = 5.0 (ms)
gmax = 0.0 (uS)
e_rev = 0.0 (mV)
}
ASSIGNED {
i (nA)
g (uS)
v (mV)
}
UNITSOFF
INDEPENDENT { t FROM 0 TO 1 WITH 1 (ms) }
FUNCTION conductance(x) {
conductance = gmax*(1-exp(-t/tau0))*(exp(-t/tau1))
}
BREAKPOINT {
g = conductance(t)
i = g*(v - e_rev)
}
UNITSON
A second brief question: If i call neuron with nrniv the mechanism is not loaded. Even if I call later load_file("nrngui.hoc") the mechanism does not appear. Do I have always to use nrngui to call the simulation when I have compiled mechanisms?
Thanks a lot for your help in advance!