Time to clear up many misconceptions. I hope that the following does not merely
foster new ones.
ttpuff wrote:By a stream, does that mean a single simulation cycle of NEURON?
"stream" = "afferent stream" = "stream of events delivered by a single NetCon"
Analogous to a spike train carried by a single axon.
If a NET_RECEIVE block starts with the declaration
NET_RECEIVE (w) {
then the weight is a scalar whose value is set by the weight of the NetCon that delivers
an event. If a NET_RECEIVE block starts with a declaration that includes more than one
variable name, e.g.
NET_RECEIVE (w, a1, a2, . . . an) {
then the weight is a vector with n+1 elements. Each NetCon that has this mechanism as its
target will automatically have a weight vector with n+1 elements. The first element of the
weight vector is just the "synaptic weight" in the usual sense of that term. The other
elements can be used to store information about the "state" of the synaptic mechanism.
In many models of stream-specific use-dependent synaptic plasticity, each stream needs
to keep track of the time of the previous event that it delivered, as well as the values of
variables that describe the degree of synaptic potentiation and/or depression immediately
after the delivery of that event. For such models to work properly, the "initial state" of
each afferent stream cannot be left to chance. The purpose of the INITIAL block
embedded inside a NET_RECEIVE block is to properly initialize the state of each afferent
stream (each NetCon that targets this synaptic mechanism).
So suppose a mechanism description contains two INITIAL blocks: one that lies outside a
NET_RECEIVE block (let's call this one "A"), and another that lies inside a NET_RECEIVE
block (let's call this one "B"). When the model is initialized, the following will occur:
Code: Select all
for each instance of this mechanism {
execute the contents of INITIAL block "A"
for each NetCon that targets this mechanism instance {
execute the contents of INITIAL block "B"
}
}
The difference between an initialization and a "run":
Initialization and running a simulation are not the same thing. Initialization means assigning
initial values to all state variables, and using these to calculate the corresponding values
of assigned variables. This constitutes the starting point of a simulation. A "run" consists
of starting from this point and advancing the solution from time t0 to tstop.
NEURON's standard run system contains a procedure called run() which does two
things: initializes the model, then advances the solution from t = 0 to tstop.
if I run the above code for 10 trials in one single simulation cycle. Results should be
F = 1 for the 1st trial, F = XXX in the following trials
No. After each initialization, F would be 1 for every NetCon that targets this mechanism.
Each run() would reset F to 1, for each NetCon that targets this mechanism, before
advancing the solution from t = 0 to tstop.
If I put F=1 in the INITIAL block of MOD file rather than the INITIAL of the NET_RECEIVE block, results should be
F = 1 for every trials
No. It would have no affect on the weight vectors of the NetCons that target the synapse.
Instead, each NetCon's weight vector would have F == 0.
2. Whenever an event is triggered in NET_RECEIVE block, will this event only follow this stream by exact flags we set?
This question is an abuse of terms. Flags do not control where events are delivered.
This example
Code: Select all
NET_RECEIVE(weight, nspike, on) {
if (flag == 1) {
WATCH (v > Thr ) 2 : threshod reached?
} else if (flag == 2) {
net_event(t) : deliver a message
on = 1
lastspike = t
nspike = nspike +1 :spike counted
v = vON : 40 mv
net_send(spikedur, 3)
} else if (flag == 3) { : spike off, refactory period on
v = vOFF : -60 mv
on = 0
}
contains a big mistake: v is a reserved name in NMODL. It means membrane potential.
You are asking for a conflict in variable name space, which will generate garbage
results. If you are lucky, the results will be extremely bad so you will recognize the fact
before wasting too much time. Better to use vm or Vm instead.
in the above code, my LIF cell has a spike duration as 1ms, i.e., if v>thr, I set v=40 mv for 1 ms. My question is that during this spike duration time, obviously v>Thr, so do this deliver another event?
No. Threshold crossings are detected when the monitored variable moves in a
positive-going direction.
Or the next event only happens after the first event go over all these three flags?
This question is an abuse of terms. Events do not go over flags.
suppose the fixed dt=0.1, v>thr at t=0, then t=0.1, we'll has v>thr. Do we have another event at t=0.1? If not, when we will have second event?
What do you think? Pretend you're the computer and try to figure it out. Then implement
your mechanism and see if it does what you predicted.
If the outcome disagrees with your prediction, try to figure out which is wrong.
But if the outcome agrees with your prediction, can you be sure that both are right? Or is
there a chance that both are wrong?