Page 1 of 1

Exercise on Extracellular Stimulation

Posted: Sat Apr 15, 2017 12:24 am
by dinkc
Dear Ted,

I was exercising your zip file in the hot tips area of the Neuron Forum called extracellular_stim_and_rec. I have few queries on the results I observed and therefore I am writing you. I hope you would help me in understanding it.
I didn't change or edit anything from your zip file. I just downloaded it , compiled the xtra.mod file and executed the initxstim.hoc file.
For the first few arbitrary values of current, it was working perfect. There was no change in resting membrane potential when current was 0 mA and when current was increased gradually I could see the small potential being generated (below threshold level). I gradually kept on increasing the stimulus current and reached certain threshold value where I got an action potential. Till this step, every thing seems to be well and good.
However, when I increased the stimulus current further, the action potential generated started changing shape and size and started looking weird. I think the neurons work on 'all or none' principal . However big or small the stimulus current may be , if it is beyond the threshold value , it will necessarily generate an action potential which should always look the same irrespective of the magnitude of the stimulus current. This is what I have understood so far but the results I observed does not match my understanding. The shape of the action potential is changing every time with changing value of stimulus current even beyond the threshold value. I am not able to comprehend this result. Could you please help me in understanding? I look forward to hearing from you.

Yours sincerely,
Dina

Re: Exercise on Extracellular Stimulation

Posted: Sun Apr 16, 2017 10:44 pm
by ted
dinkc wrote:However big or small the stimulus current may be , if it is beyond the threshold value , it will necessarily generate an action potential which should always look the same irrespective of the magnitude of the stimulus current. This is what I have understood
(I'm assuming that you are using a brief stimulus current, so the effect on the shape of the cell's spike isn't just caused by temporal overlap of the stimulus current and the spike waveform) Did you get that understanding from a book, or from your own experience, either with "real" experiments on living cells or "computational" experiments on models?

Here's a simple experiment you might want to try. Make a "ball and stick" model cell with a 10x10 um soma and a 2 um diameter x 300 um long dend. Insert hh into the soma and pas into the dend. Set g_pas to 0.0001 S/cm2 and e_pas to -65 mV. Attach an IClamp to the soma, and set it to deliver a 0.1 ms x 1.66 nA current pulse that starts at 1 ms. Set Tstop to 15 ms and run a simulation. Observe the shape of the spike (better yet, turn on Keep Lines in a voltage axis graph so that the spike waveform persists). Now double the stimulus amplitude (make it 3.32 nA) and run a new simulation. Did the spike shape change? Why does this happen?

Now think about what happens with extracellular stimulation. Suppose stimulus intensity is just big enough to elicit a spike. The spike will originate at one point in the cell; let's call this point A. If you start increasing stimulus intensity, not only will the shape of the spike elicited at point A change, but you're probably also expanding the extent of the region around A where the spike is triggered. If you continue increasing stimulus intensity, one or more of the following things may happen:
--the width of the region around A where the spike begins may become so wide that propagation of the spike throughout the cell is altered (the locations at which the spike "takes off" to spread throughout the cell is at the margins of the region around A)
--the stimulus may also elicit independent spikes in other parts of the cell

Also remember that, unlike intracellular stimulation, extracellular stimulation that depolarizes one or more parts of a cell will also hyperpolarize other parts. Over most of the cell, these shifts of membrane potential may be subthreshold, but they can influence how a spike propagates throughout the cell.

You could explore this for yourself by examining membrane potential at several different locations in a model cell, or by examining space plots of membrane potential along paths that extend along the longitudinal and transverse axes of the model.

Re: Exercise on Extracellular Stimulation

Posted: Mon Apr 17, 2017 10:15 am
by ted
A couple of things I forgot to mention.

One is anode break excitation. Depending on the shape and biophysical properties of your model cell, the location of the stimulating electrode, and the polarity and duration of the stimulus current, it may be possible that low amplitude extracellular stimulation triggers anode break excitation, but increasing the stimulus amplitude produces direct excitation.

Another is that I clearly can't give a definitive answer to your question without being able to reproduce what you saw (and all I know about what you saw is that the responses to low and high amplitude extracellular stimuli look different). If you want me to take a look at it, please zip up the hoc, mod and ses files that you used and email the zip file to
ted dot carnevale at yale dot edu

Re: Exercise on Extracellular Stimulation

Posted: Mon Apr 17, 2017 7:10 pm
by dinkc
Dear Ted,

Thank you so much for your response.
I wrote in my last message that ' However big or small the stimulus current may be , if it is beyond the threshold value , it will necessarily generate an action potential which should always look the same irrespective of the magnitude of the stimulus current. This is what I have understood.'
Did you get that understanding from a book, or from your own experience, either with "real" experiments on living cells or "computational" experiments on models?
The way I wrote it may look bit different or may be I understood it wrong but I actually got this understanding from a book called 'Neurophysiology', 4th edition, R.H.S. CARPENTER and also from few online texts. I would like to quote a line from his book.
'When you record action potentials. one thing that becomes very obvious is that their size does not vary. In particular, it is not affected by the size of the stimulus that caused them.'
I took this line from topic 'threshold properties' under heading 'The all or nothing law', page 53. Similarly the book also explains that intensity of the stimulus is encoded in the frequency of the Action Potentials generated. So, this should mean, higher the magnitude of stimulus current more is the frequency or number of Action potentials generated. This theory is also explained in the book under topic 'coding and decoding frequency'.

So, I was expecting all action potential to peak at same voltage (around +30mV) and one action potential is not bigger than another even if we increase the stimulus current. Stronger stimulus could initiate multiple action potentials more quickly but individual signals are not bigger. However, in this simulation exercise in NEURON, when I change the stimulus current from -0.5 to -1 mA or 2mA, clearly the peak voltage of action potentials are increasing. I am really confused what is actually happening there.

Moreover, when I changed the cell morphology (used my own neuron cell instead of yours) but kept all other program same (i mean, I used the same code from your zip file except for the cell morphology ), I observed action potential even when stimulus current was 0 mA. I am not able to comprehend these results. I would be grateful to you if you could look into it and suggest something. I am sending you the file in the email you mentioned. Thank you so much!

Yours sincerely,
Dina KC

Re: Exercise on Extracellular Stimulation

Posted: Fri Apr 21, 2017 4:23 pm
by dinkc
Dear Ted,

I am stuck with the program on extracellular stimulation with no further progress as I am not able to figure out my mistakes with the exercise on extracellular_stim_and_rec. I would highly appreciate, if you could spare some of your valuable time and help me in solving it. I tried a lot to figure out what went wrong but I am not able to see anything. Your expert guidance is my only hope.

As I explained earlier, I used your zip file found in hot tips area of neuron forum named extracellular_stim_and_rec. I borrowed all codes from that zip file and just made one change : I used the hoc code for my own neuron cell (which I exported from cell builder). Except for this change, there are no other changes at all. When I execute the code, I get an action potential but the problem is I get it even when the stimulus current is set to zero. Even if I change the coordinates of the electrodes (position) that is stimulating the neuron, there is no change at all. For all condition, an action potential is initiated, irrespective of whether or not stimulus current is present. I am not able to understand anything.
I hope you would help me with with it.
I look forward to hearing from you.

Yours sincerely,
Dina KC

Re: Exercise on Extracellular Stimulation

Posted: Fri Apr 21, 2017 5:46 pm
by ted
OK, I'll be glad to help, but first I'd like you to do this: isolate the model setup code. This means create a file that contains just those statements that specify the topology, geometry, and biophysical properties of your model cell; include a
celsius = whatever
statement if it needs to be at some temperature other than 6.3 deg C. Also be sure to include any customized initialization code that your model needs (e.g. to force membrane potential to a particular value, or to ensure that ion concentrations are correct). If you use nrngui to execute that file, clicking on Init & Run should produce a simulation in which membrane potential stays constant at whatever its intitial is. Zip up that file and the necessary mod files and email it to me
ted dot carnevale at yale dot edu

Re: Exercise on Extracellular Stimulation

Posted: Sat Apr 22, 2017 11:10 pm
by dinkc
Dear Ted,

First of all tons of thanks for your kind words of support. It really means a lot to a beginner like me. Thanks a lot!
As you asked, I have made a new file named "testcell1.txt" which contains topology, geometry and biophysical properties of my model cell and have included a statement : celsius = 37 (human body temperature) in it.
And I have also included in it two other group of codes that may include initialization part. When I then used NEURON to Run it, I again got spikes even when stimulus current is set to zero. But unlike before, the height of the spike is lower now (just below 0 mV). I was however expecting it to be a straight line through around -70mV (resting membrane potential). Although the spikes are changing each time I do 'Init and Run', the heights and shape of the spike looks uncorrelated with the change in magnitude of stimulus current and electrode position. I would highly appreciate if you could kindly suggest something after looking my results.
I have sent you the complete zip file with all necessary mod files in the email address you mentioned.
Thank you once again for your help!

Yours sincerely,
Dina KC

Re: Exercise on Extracellular Stimulation

Posted: Thu Apr 27, 2017 11:33 pm
by dinkc
Dear Ted,
I am again trying the exercise on extracellular stimulation but this time I am trying to feed the values of extracellular potential field created around the electrode as an input from another simulation software . I have list of extracellular potentials that would be created along different sections and segments of my model cell. However, It was not calculated in NEURON (by calculating transfer resistance) but instead was generated from another software. Now, to incorporate these values and to make the simulation for extracellular stimulation, I did following things:
1) I made a model cell with 1 soma, 1 axon, 1 apical dendrite and 10 dendrites and defined its segments and biophysical properties.
2) I assigned the value of e_extracellular in each segment of my sections as follows:

Code: Select all

// the following code is only a part of the code that assigns values to 3 dendrites out of 10 dendrites I had
dend[0].e_extracellular(0.5) = 0.001112   //Attention: value obtained from another simulation
dend[1].e_extracellular(0.5) = 0.0011097  //Attention: value obtained from  another simulation
dend[2].e_extracellular(0.5) = 0.001112  //Attention: value obtained from another simulation
 
3) created a simple rectangular stimulus waveform in vector (borrowed your code from the file extracellular_stim_and_rec)
4) Now, I am confused with step 4, i.e. how to drive the stimulus waveform using this extra cellular potential value to make the simulation run?
Could you please give me some insight as to how to do this?
I tried something like this

Code: Select all

ATTACHED__ = 0
access soma
proc attach_stim() {
  forall {
    if (ATTACHED__ == 0) {  // don't bother if stim is already attached to something
	for (x,0) {
        stim_amp.play(&soma.e_extracellular(x), stim_time, 1) // "interpolated" play, use of e_extracellular for driving stimulus
	//stim_amp.play(&dend.e_extracellular(x), stim_time, 1) // "interpolated" play
	}
        ATTACHED__ = 1
    }
  }
}
However, when I try to run simulation , there is no spike or resting membrane potential or any thing. The graph of the spike is not printed and it gives an error saying 'segmentation violation'. It is important for me to incorporate these values of extracellular potential in the program and observe the spikes/results. Could you please suggest me how to do it? I look forward to hearing from you.
Sincerely,
Dina KC

Re: Exercise on Extracellular Stimulation

Posted: Mon May 08, 2017 11:59 am
by ted
dinkc wrote:this time I am trying to feed the values of extracellular potential field created around the electrode as an input from another simulation software . I have list of extracellular potentials that would be created along different sections and segments of my model cell. However, It was not calculated in NEURON (by calculating transfer resistance) but instead was generated from another software.
If the extracellular potentials were calculated under the assumption that the extracellular medium is linear and purely resistive, then the time course of extracellular potential vxj at any point pj equals the product of some function of time f(t) (which is the same at all extracellular locations and is directly analogous to the current delivered by a stimulating electrode or array of electrodes) and a constant aj (which is different for each point pj and represents the coupling between the stimulus and pj). Choose one of the pj as a "reference point" (let's say the index of this point is i) and assume that
f(t) = vxi(t)
Then
vxi = ai*f(t) where ai = 1
and, in fact, for every j
vxj = aj*f(t) where aj = vxj(t')/vxi(t') and t' is any time at which vxi != 0.

So all you need to do is

Code: Select all

pick the location that you want to use as the "reference point"
for each section
  for each segment in this section
    discover the aj that corresponds to the location of this segment's center
      and assign that value to the segment's rx_xtra
and then use the Vector class's play() method to drive is_xtra with the time course of vxi (the extracellular potential at the reference point).

I will defer discussing what to do if the extracellular medium is nonlinear or dissipative for the sake of time and space.

Re: Exercise on Extracellular Stimulation

Posted: Thu May 11, 2017 7:45 am
by dinkc
Dear Ted,

Thank you so much for your guidance. I have assumed my extracellular medium to be linear and purely resistive. So, I hope I will get it done with the method you explained.
Thanks a lot for your suggestions.

Yours sincerely,
Dina KC