I am quite new at NEURON programming and I'm a python programmer if I can say that. I am currently working in the field of transcranial stimulation and I am interested by the capabilities of NEURON to predict the effect of extracellular stimulation on complex geometrical neurons to predict/ understand neuromodulation.
For know I'm just doing basics and I write some code to reproduced the results from 10.1113/jphysiol.2012.247171 using the e_extracellular mechanism. The results of my script have deviations and I don't know if I'm doing it properly using python. In fact I set the values of e_extracellular in each segment but not using any waveform ( and so the play function of NEURON). But visualizing the v and e_extracellular recorded at soma it seems to work (at least as a DC stimulation). You can find the associated script here https://drive.google.com/file/d/1Ppzisw ... sp=sharing.
In a second time I tried to use the xtra.mod file (that I've compiled) and seems to work at the invocation but when I run the script, nothing happen. If I look the recorded e_extracellular at soma it is 0 all the long while I entered the desired voltage at rx_xtra and use a signal with ones all the time. Here are the lines :
I first load xtra using the following function
Code: Select all
def load_xtra(self):
for sec in self.all:
sec.insert('xtra')
h.load_file(1,"interpxyz.hoc") #only interpolates sections that have extracellular
h.load_file(1,"setpointers.hoc") #automatically calls grindaway() in interpxyz.hoc
Code: Select all
def apply_Eext_uniform_xtra(self, E0):
"""
Trying to apply extracellular stim with xtra mechanism
"""
for sec in self.all:
x_c = sec(0.5).x_xtra
y_c = sec(0.5).y_xtra
z_c = sec(0.5).z_xtra
v_ext = -1e-3*( E[0] * x_c + E[1] * y_c + E[2] * z_c )
sec.rx_xtra = v_ext * 1e-6 # 1e-6 to remove the MOhm factor in the xtra.mod file
## END apply_Eext_uniform_xtra()
Code: Select all
h.load_file("stdrun.hoc")
h.init()
h.finitialize(-70 * mV)
h.fcurrent()
h.tstop = 200 #ms
times =np.arange(0,h.tstop+h.dt,h.dt)
sig = np.ones(times.shape)
t = h.Vector(times)
stim = h.Vector(sig)
stim.play(h._ref_is_xtra, t , 0)
t = h.Vector().record(h._ref_t)
v = h.Vector().record(c.soma[0](0.5)._ref_v)
ve = h.Vector().record(c.soma[0](0.5)._ref_e_extracellular)
h.run()
PS: I know I should have used x_xtra, y_xtra and z_xtra for better results but that does not explain why it is not working I guess.
Finally, I have two basic theoretical questions.
1) Indeed, the extracellular mechanism seems to use a potential to stimulate the neuron but and so the extracellular mechanism is linear (with electric field too if the position does not change if I am not wrong ?). But is there a theoretical reason of such a mechanism ?
2) If the resistor are pseudo infinite (1 MOhms) and the capacitors set to zero (open circuit), it should not act as if it was directly connected to the membrane or I'm thinking at this wrong ?
Many thanks in advance