Page 1 of 1

Recording multiple netcon's weight with one synapse mechanism

Posted: Thu Dec 30, 2021 1:58 am
by dragon88hj
Hi all, I have trouble with NEURON + Python.
I made the network model containing multiple presynaptic neuron and single postsynaptic neuron for convergence.
I built multiple NetCon from each presynaptic neuron with one single synaptic mechanism (its weight can be changed by specific rule) onto postsynaptic neuron.

I want to record each NetCon's weight changes, but i can't find the way in NEURON + Python.
When I used only hoc, I could do this like below (it is written as Pseudocode with some hoc.. )

Code: Select all

for each netcon as nc
     vec = new Vector()
     vec.record(&nc.weight[1]) // nc.weight[1] 
     veclist.append(vec)
In NEURON+Python, this approach made error that 'record' should use _ref_variable.
I also tried to make Range variable in synaptic mechanism, assign the second argument in NET_RECEIVE, and record that Range variable.
But I could only record one single weight change.
I think it is because I used only single synaptic mechanism.

Are there any method to record weight changes of each NetCon to single synaptic mechanism?
Or, is this approach (multiple NetCon to single synaptic mechanism) not suitable for this study?
(Should I make multiple NetCon and Multiple synaptic mechanism for regarding one synapse?)

I will be really appreciated if you can give me some comment about this problem

Best regrads,
Hyun Jae

Re: Recording multiple netcon's weight with one synapse mechanism

Posted: Thu Dec 30, 2021 9:59 pm
by ted

Code: Select all

vec.record(&nc.weight[1]) // nc.weight[1]
Actually you want to record the first element of each weight vector. That element's index is 0, so the hoc statement would be

Code: Select all

vec.record(&nc.weight[0])
In Python I would try a statement of the form
vec.record(nc._ref_weight[0])

Re: Recording multiple netcon's weight with one synapse mechanism

Posted: Fri Dec 31, 2021 1:01 am
by dragon88hj
Ted, Thank you very much!!

vec.record(nc._ref_weight[0])

It is what i needed. Actually,_ref_weight[1]

Thank you again and Happy New Year!
Hyun Jae

Re: Recording multiple netcon's weight with one synapse mechanism

Posted: Fri Dec 31, 2021 11:11 am
by ted
Actually, _ref_weight[1]
Maybe, for your particular application. Others who read this thread should note that, in most cases, the weight (strength) of a synaptic connection is specified by the first element of the weight vector, which is weight[0]. dragon88hj is probably working with a synaptic mechanism that expects the weight vector to have more than one element, and uses elements with index values > 1 to store the values of variables needed to implement stream-specific synaptic plasticity. My guess is that the peak conductance change elicited by a presynaptic spike depends on the product of weight[0] and weight[1], where weight[0] is the conductance change that happens when the synapse is "naive" (has been neither potentiated or depressed/depotentiated), and the value of weight[1] depends on the history of synaptic activation and some postsynaptic variable such as the time of the most recent postsynaptic spike or maybe the local calcium concentration or membrane potential. The value of weight[0] would be specified during network setup, and the value of weight[1] would be calculated when there is a postsynaptic spike or when the synapse is activated. The intitial value of weight[1] would be 1, and it would change during a simulation, so it's the variable that dragon88hj needs to record.