How does a section recognize a mechanism's current?
Posted: Fri Jul 12, 2019 5:00 pm
Hello. I am quite new to NEURON. I am trying to implement a custom mechanism (mod file) that outputs a synaptic current. I noticed that when trying to record the current at the section that contains the custom mechanism, the current from the mechanism is not present. To illustrate, here is some Python code that successfully captures a section's current with an inserted Exp2Syn mechanism.
When using Exp2Syn, you can directly see the effects of the synaptic current on the recording of the current of the section. When looking at the mod file for Exp2Syn, I thought the only significant part that would have the section "recognize" the current is to declare it as a NONSPECIFIC_CURRENT. So I tried making a very simple mod file to see if the current would be "seen" by the section:
The mod file simply initiates the current to -70nA and steps it up by 10nA every time an event is received. If you rerun the python code I copied but replace it to use my simple mod file ( syn = h.netcontest(s0(0.5) ) the plotted section current does not reflect the activity of the custom mechanism.
My main question is how do I get the section to "see" the current of my custom mechanism? Am I missing something crucial in the mod file? Thank you for any assistance!
Code: Select all
from neuron import h
import matplotlib.pyplot as plt
h.load_file("stdrun.hoc")
s0 = h.Section()
s0.insert('pas')
syn = h.Exp2Syn(s0(0.5)) # define as exponential synapse
h.tstop = 10000
h.dt = .1
h.steps_per_ms = 1.0/h.dt
evec = h.Vector()
# time of events
evec.append(200)
evec.append(1200)
evec.append(7000)
input_vector = h.VecStim()
input_vector.play(evec)
nc = h.NetCon(input_vector,syn)
nc.weight[0] = 1
i = h.Vector()
i.record(syn._ref_i) # record the current through the synapse
secI = h.Vector()
secI.record(s0(0.5)._ref_i_pas) # record the current at the section
h.run()
# plot currents
plt.figure(1)
plt.plot(i)
plt.figure(2)
plt.plot(secI)
plt.show()
When using Exp2Syn, you can directly see the effects of the synaptic current on the recording of the current of the section. When looking at the mod file for Exp2Syn, I thought the only significant part that would have the section "recognize" the current is to declare it as a NONSPECIFIC_CURRENT. So I tried making a very simple mod file to see if the current would be "seen" by the section:
Code: Select all
NEURON {
POINT_PROCESS netcontest
RANGE i
NONSPECIFIC_CURRENT i
}
UNITS {
(nA) = (nanoamp)
}
ASSIGNED {
i (nA)
}
INITIAL {
i = -70
}
NET_RECEIVE(weight (uS)) {
i = i + 10
}
My main question is how do I get the section to "see" the current of my custom mechanism? Am I missing something crucial in the mod file? Thank you for any assistance!