Document related to NMODL

Particularly useful chunks of hoc and/or NMODL code. May be pedestrian or stunningly brilliant, may make you gasp or bring tears to your eyes, but always makes you think "I wish I had written that; I'm sure going to steal it."
Post Reply
virtualkss
Posts: 8
Joined: Thu Apr 29, 2021 11:57 pm

Document related to NMODL

Post by virtualkss »

Hello,

I am trying to implement synaptic mechanism in .mod file using NMODL.

However, neither the NEURON book nor the documentation at NEURON HOC documentation(https://neuronsimulator.github.io/nrn/n ... index.html) seems to have an explanation of the each syntax like "net_send()" or "WATCH".

Code: Select all

//in .mod files
net_send(0,1)

WATCH (v > 0) 2

Are there any other documents that I can refer to?

Thank you for checking my topics.

Kisung Shin
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Document related to NMODL

Post by ted »

net_send(), flag, WATCH, and FOR_NETCONS are not discussed in the hoc or Python documentation because they are features of NMODL, not of hoc or Python.

net_send() and flag

To learn about net_send() and flag read

Discrete event simulation in the NEURON environment.
Hines, M. L., and Carnevale N. T.
Neurocomputing, Volume 58, p.1117–1122, (2004)

preprint available from link at https://neuron.yale.edu/neuron/publicat ... nvironment

WATCH

WATCH was originally added to NMODL to enable implementation of Hebbian synaptic plasticity. Most conceptual models of Hebbian plasticity adjust the weight of a synapse depending on the interval between tpre (the time of the presynaptic spike at the presynaptic terminal) and tpost (the time at which a spike happens on its postsynaptic side).

Getting the value of tpre is easy--it's just the time at which a synaptic event is delivered to a synaptic mechanism. Determining tpost, however, requires the synaptic mechanism to detect when a spike has happened on the postsynaptic side. This is done by monitoring membrane potential (or, better, calcium concentration) in the segment to which the synapse is attached and detecting when there has been a positive-going threshold crossing. When such a threshold crossing occurs, a self-event is launched that returns immediately to force adjustment of the weights of all NetCons that target the synaptic mechanism. Specification of the variable to monitor and the threshold for spike detection is done with a WATCH statement, which has the form

WATCH (varname > thresholdvalue) flagvalue
where
varname is v or cai
thresholdvalue is the user-specified threshold for deciding that a postsynaptic spike happened
and
flagvalue is the flag value that is associated with the postsynaptic-spike-triggered self-event. The flag value is used by the NET_RECEIVE block to decide whether a received event is an ordinary synaptic event (in which case synaptic conductance is perturbed) or a self-event that signals occurrence of a postsynaptic spike (in which case synaptic weights must be adjusted according to the user-specified plasticity rule). Example:

Code: Select all

  WATCH (v > -20) 2
will launch a self event with flag == 2 if local membrane potential rises above -20 mV.

FOR_NETCONS

FOR_NETCONS is used in implementations of Hebbian synapses that can handle multiple afferent streams. Specifically, it is used to ensure that, every time a postsynaptic spike happens, each stream's synaptic weight is adjusted according to the user-specified synaptic plasticity rule. Its "arguments" refer to the elements of the NetCon's weight vector. Remember that the first element of a weight vector is always the user-specified weight of the synapse. The other elements can be used to store values that are used to calculate stream-specific synaptic plasticity. In the case of the Hebbian synaptic plasticity model proposed by Bi and Poo, the second element is used for a "plasticity factor" that reflects the degree to which the synapse has been potentiated or depressed, and the third element is used to store the most recent time at which this particular afferent stream delivered an event to the synapse (i.e. time of the most recent spike in the presynaptic terminal).

In the NMODL implementation of the Bi and Poo synaptic mechanism, a postsynaptic spike will increase the effective weights of all NetCons that project to it

Code: Select all

  FOR_NETCONS(w1, A1, tp) { : also can hide NET_RECEIVE args
    A1 = A1 + p*exp((tp - t)/ptau)
  }
virtualkss
Posts: 8
Joined: Thu Apr 29, 2021 11:57 pm

Re: Document related to NMODL

Post by virtualkss »

I think it will be very helpful for my study!

Thank you for the information.

Sincerely,

Kisung Shin
Post Reply