Extracellular stimulation

Anything that doesn't fit elsewhere.
ChrisR
Posts: 21
Joined: Mon Mar 17, 2008 9:08 am
Location: Munich

Extracellular stimulation

Post by ChrisR » Wed Oct 14, 2009 3:15 pm

Hello Ted!

I am trying to create a myelinated axon model with extracellular stimulation.
To start I took your example scripts (http://www.neuron.yale.edu/ftp/ted/neur ... nd_rec.zip)
and tried to excite a single passive node with the following code:

Code: Select all

load_file("nrngui.hoc")

tstop=3

create node
node { 
L = 2
diam = 2
Ra = 110    
cm = 2
nseg = 1
    
insert pas
e_pas = -65
g_pas = 0.03

insert extracellular xraxial=1e9 xg=1e9 xc=0 e_extracellular=0
insert xtra rx_xtra=1 x_xtra=0 y_xtra=0 z_xtra=0
}

define_shape()

load_file("interpxyz.hoc")	// only interpolates sections that have extracellular
load_file("setpointers.hoc")	// automatically calls grindaway() in interpxyz.hoc
load_file("calcrxc.hoc")	// computes transfer r between segments and recording electrodes
load_file("stim.hoc")		// extracellular stimulus

setstim(1, 0.1, 0.1) 
But I just don't see any change in the membrane potential node.v(0.5).
However node.e_extracellular(0.5) and node.vext[0](0.5) both show a nice pulse with 0.1 ms duration and a peak of 57.5 mV.
Why does the membrane potential not change? It should be v+vext, or do miss something here?

Thanks a lot!
Chris

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

Re: Extracellular stimulation

Post by ted » Wed Oct 14, 2009 11:44 pm

Why does the membrane potential not change? It should be v+vext, or do miss something here?
Please read the first paragraph of the description of the extracellular mechanism in the Programmer's Reference. Does that resolve the issue?

ChrisR
Posts: 21
Joined: Mon Mar 17, 2008 9:08 am
Location: Munich

Re: Extracellular stimulation

Post by ChrisR » Mon Oct 19, 2009 5:47 pm

Ok, now I get it. Thanks!

I am currently working on a quite difficult s(t)imulation, would be great If you could give me some advice.

I want to replicate data obtained via stimulation with a suction electrode. Vestibular nerve fiber bundles are separately sucked inside (~500 um of nerve inside electrode) to separately stimulate them with current pulses.
The way I see it now there are three different resistance "domains".
(the fiber spreads along the x axis and starts at x=0, y and z coordinates are ignored, d is diameter of the electrode, dn is diameter of the fiber bundle,
x_xtra(x) is the current position on the x axis, the silver wire inside the electrode ends at x=-100, lstim = 500 is the end of the electrode)

1. From the end of the silver wire in the electrode to the beginning of the nerve. Here the resistance should be:

Code: Select all

Ri1 =  rho * ( 100 / (PI*(d/2)^2) )  * 0.01
2. From the beginning of the nerve to the desired location at the nerve (e.g. node), here the nerve takes away a significant amount of the diameter so the effective diameter of the electrode has to be reduced by that of the nerve bundle:

Code: Select all

Ri2 = rho * ( x_xtra(x) / ( PI*( (d/2)^2 - (dn/2)^2 )) ) * 0.01  
3. From the end of the electrode to infinity:

Code: Select all

Ri3 = (rho / 4 / PI)*(1/ ( x_xtra(x) - lstim ) ) * 0.01
So the resistance at a given position should be obtained by adding up in series all other resistances, so for a position at x > Istim this would be:

Code: Select all

Ri = rho * ( ( 100 / (PI*(d/2)^2) )   +   ( Istim / ( PI*( (d/2)^2 - (dn/2)^2 )) )  +  (1 / 4 / PI)*(1/ ( x_xtra(x) - lstim ) ) ) * 0.01
My Questions:
A: So what really puzzles me here is that even in infinity, the extracellular voltage would be as high as at the end of the electrode tip, can this be right?
B: Is the reduction of the effective electrode diameter correct? Our would it be better to just use another rho with the value for brain tissue? By the way, where can a find such values, for example for ringer's soultion and brain tissue?
C: Do you think the capacity of the suction electrode should be taken into account? Perhaps it could done by separating the electrode into RC cylinders and calculate the effect of these at the current nerve position.

Thanks a lot!
Chris

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

Re: Extracellular stimulation

Post by ted » Tue Oct 20, 2009 2:01 pm

The first issue to address is whether it is necessary to bother with xtra. Do I correctly understand that "~500 um of nerve inside electrode" means that the nerve bundle completely occludes the lumen of the cannula for a length of ~500 um?

ChrisR
Posts: 21
Joined: Mon Mar 17, 2008 9:08 am
Location: Munich

Re: Extracellular stimulation

Post by ChrisR » Tue Oct 20, 2009 2:54 pm

Yes, you are right, the canulla has pretty much the same inner diameter as the nerve bundle.
The method section states: "current pulses were applied across individually adjusted suction electrodes (diameter, 120-150 um)"

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

Re: Extracellular stimulation

Post by ted » Tue Oct 20, 2009 11:40 pm

ChrisR wrote:The method section states: "current pulses were applied across individually adjusted suction electrodes (diameter, 120-150 um)"
Is the physical arrangement as diagrammed here?

Code: Select all

]]]]]]]]]]]]]]]]]]]]]
           =========================   <
  lumen    =========================   < axons
           =========================   <
]]]]]]]]]]]]]]]]]]]]]      ^
   ^                     nerve
  wall                   bundle
   of
  cannula
This seems almost amenable to analytical solution for extracellular potential in the nerve bundle as a function of distance from its left end and radial distance from its center. The boundary conditions are simple enough: taking x = 0 to be distance from the left end of the nerve bundle, they are
1. Potential over face of bundle at x = 0 is equal to v_lumen = v at the stimulating electrode that lies in the lumen (ignores voltage drop in the electrolyte that fills the cannula).
2. Radial current at interface between outer surface of bundle and inner surface of cannula is 0, i.e. from x = 0 to x = 500 um (or however far to the right of 0 the cannula extends). This assumes a snug fit between the ID of the cannula and the OD of the nerve bundle.
3. Potential over outer surface of bundle is 0 for x > 500 um (ignores resistance of bath in which the nerve bundle lies).

The three complicating factors are
capacitive reactance of the tissue
anisotropy of both tissue conductivity and capacitance
ephaptic interactions between adjacent axons

But if one could take account of these factors, or at least diminish their importance, then in principle one could compute the potential at any relevant set of points in the nerve bundle elicited by applying a stimulus current. If the relationship is a simple proportionality, then xtra would be useful. To this end, I wonder if you could take advantage of a mean field approach to calculate extracellular potential as a function of stimulus current, and also to take ephaptic interactions into consideration. Bokil et al. did this to investigate the consequences of ephaptic interactions in the olfactory nerve (citation and NEURON implementation available from ModelDB http://senselab.med.yale.edu/modeldb/ via accession number 3676).

ChrisR
Posts: 21
Joined: Mon Mar 17, 2008 9:08 am
Location: Munich

Re: Extracellular stimulation

Post by ChrisR » Wed Oct 21, 2009 6:59 pm

Hello Ted,
Is the physical arrangement as diagrammed here?
Yes, it is.

I've read Bokil et al. but I think since the vestibular nerves are myelinated with ratio rd (fiber diammeter / axon diameter) = 1.5, leading to a beta (ratio of extracellular to intracellular space) = (1.5^2 - 1^2)/(1^2) = 1.25, I think ephaptic interactions can be neglected.

However using the considerations from Bokil et al. on the longitudinal extracellular resistance I have created the following model.
Xraxial is set to reflect the longitudinal extracellular resistance and the transversal resistance is neglected like in Bokil et al.
But I am not sure If I correctly took into account the different values of xg at the myelinated sections.
Do you think this could work? At least I get the correct threshold currents of 1-5 uA as seen in the experiments.

Code: Select all

load_file("nrngui.hoc")
load_file("stdgui.hoc")

beta = (1.5^2 - 1^2)/(1^2) // = 1.25, ratio of extracellular to intracellular space, since for myelinated axons : fiber diam. = 1.5 * axon diam.
Nax = 1142 // number of axons in fascicle
d_mean = 3.6450 // mean axon diameter
d = d_mean

rho_i = 110 // Ohm cm (Stampfli et al. 1952)
rho_e = 300 // Ohm cm (Abzug et al. 1974)

r_i = 4*rho_i/PI/((d_mean*1e-4)^2)
r_e = r_i/Nax/beta

cm_n = 2  // uF/cm2 (Frankenhaeuser and Huxley 1964)
cm_m = 0.005 
gm_m = 1.5e-6 

l = 2.5 // um (Dodge and Frankenhaeuser 1959)

rifd = 100 // ratio of internodal space to fiber diameter (Dodge and Frankenhaeuser 1959)
rafd = 1/1.5 // ratio of axon to fiber diameters (Goldman and Albus 1968) (Dunn 1977, cited by Honrubia 1989)
Df = d/rafd 
Li = Df*rifd

nn=6 // number of nodes

Er= -70 // mV

create terminal, node[nn-1], myelin[nn]

terminal {
    L = 10        
    diam = d_mean     
    Ra = rho_i    
    cm = cm_n
    nseg = 1
    
    insert fh   // from http://senselab.med.yale.edu/modeldb/ShowModel.asp?model=3507
    nai=13.74  nao=114.5  ki=120 ko=2.5 
    insert extracellular xraxial=r_e xg=1e9 xc=0
}

for i=0, nn-2 {
    connect node[i](0), myelin[i](1)
    connect myelin[i+1](0), node[i](1)
}
connect terminal(1), myelin[0](0)

forsec "node" { 
    L = l
    diam = d_mean
    Ra = rho_i    
    cm = cm_n
    insert fh    // from http://senselab.med.yale.edu/modeldb/ShowModel.asp?model=3507
    nai=13.74  nao=114.5  ki=120 ko=2.5
    insert extracellular xraxial=r_e xg=1e9 xc=0
}

forsec "myelin" {
    L = Li
    diam = d_mean
    Ra = rho_i 
    cm = cm_m
    insert pas
    e_pas = Er
    g_pas = gm_m 
    insert extracellular xraxial=r_e xg=1e9 xc=0
}
To stimulate the axon, the voltage at the beginning (x=0) of the axon, produced by a silver wire at x=-100 is played to e_extracellular of the terminal node

Code: Select all


/* physical arrangement
]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
            =========================  <
 -wire--     lumen  ==================  < axons
            =========================  <
]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]      
*/

/*
create stimulation pattern with stim_amp and stim_time
*/

d = 120 // um diameter canulla
l = 100
Is = 1 // uA stimulation current
Vext = rho_e * (l*1e-4/(PI*(d*1e-4/2)^2)) * Is * 1e3
stim_amp.mul(Vext)

forsec "terminal" {  
    stim_amp.play(&e_extracellular(0), stim_time, 1)
}

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

Re: Extracellular stimulation

Post by ted » Thu Oct 22, 2009 12:15 am

ChrisR wrote:since the vestibular nerves are myelinated with ratio rd (fiber diammeter / axon diameter) = 1.5, leading to a beta (ratio of extracellular to intracellular space) = (1.5^2 - 1^2)/(1^2) = 1.25, I think ephaptic interactions can be neglected.
That's a fair first approximation, which would be supported if the resulting model reproduces or is predictive of experimental observations. However, I seem to recall that ephaptic interactions between myelinated axons in frog sciatic nerve were demonstrated in the 1930s, through experiments in which active axons altered the firing threshold of silent axons. Don't have the citation at my fingertips, unfortunately. Thoughtful and knowledgeable reviewers might raise the issue, so you might want to track it down; shouldn't be too hard to find since (1) there were only a handful of people working on that prep (Gasser, Erlanger, Grundfest, Katz, . . . ), (2) the rate of publication in that era was much lower than it is now, and (3) the big journals of those days still exist and many if not most have made their old archives available via pdfs.

However, ephaptic interactions matter most in two contexts:
1. when active axon(s) are in the electrical vicinity of silent axon(s), in which case the former affect the firing threshold of the latter
2. when a bunch of axons is conducting a volley of spikes, in which case ephaptic interactions tend to reduce temporal dispersion between fibers with different conduction velocities (the faster fibers produce currents that tend to accelerate conduction in the slower fibers, and the slower fibers produce currents that tend to retard conduction in the faster fibers).

Neither of these contexts pertains if one is considering spike initiation elicited by a significantly superthreshold stimulus, because (1) all fibers are silent to start with (so they won't be generating any fields that will affect their neighbors' membrane potentials), and (2) even though stimulus-elicited spike initiation will make them all produce sinks and sources that overlap closely in time and space, if the stimulus strength is large enough (2*threshold for example) it will dwarf the effects of any such ephaptic interactions.
I am not sure If I correctly took into account the different values of xg at the myelinated sections.
xg looks fine.
Do you think this could work?
Specification of the model's biological properties (your first block of hoc code) seems OK.

It is a good idea to examine the time course of the stimulus to verify that you're getting what you expect (plot e_extracellular(0) vs. t).

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

Re: Extracellular stimulation

Post by ted » Thu Oct 22, 2009 9:27 am

I am not sure If I correctly took into account the different values of xg at the myelinated sections.
And, thinking more about the boundary conditions within the cannula, I have my own concerns about xg everywhere. Within the cannula both xc and xg must be 0 to satisfy the boundary conditions.

(If only a single axon is excited, the extracellular current that it generates can spread radially and longitudinally through the entire extracellular space contained in the bundle. In that case, if one ignores resistivity in the radial direction, xraxial depends only on longitudinal resistivity, bundle cross sectional area, and the fraction of that area that is extracellular. During excitation of n axons that are spaced uniformly in the bundle, by symmetry the current from each axon is restricted to a cylinder whose cross sectional area is 1/nth the area of the entire bundle, so just multiply xraxial of the entire bundle by 1).

A couple of minor comments:
1. load_file("stdgui.hoc") is superfluous. load_file("nrngui.hoc") does that and more.
2. Should nseg be > 1 in the internodes? To find out, adjust stimulus intensity to just above threshold with nseg = 1, then run a series of simulations with internode nseg = 3, 9 . . . (established by executing
forsec "myelin" nseg *= 3
before each run) and compare results.

ChrisR
Posts: 21
Joined: Mon Mar 17, 2008 9:08 am
Location: Munich

Re: Extracellular stimulation

Post by ChrisR » Thu Oct 22, 2009 1:04 pm

Within the cannula both xc and xg must be 0 to satisfy the boundary conditions.
so just multiply xraxial of the entire bundle by 1).
If I understood you correctly, then extracellular has to be set like this, for sections inside:

Code: Select all

insert extracellular xraxial=r_e xg=0 xc=0
and outside the canulla?:

Code: Select all

insert extracellular xraxial=r_e xg=1e9 xc=0

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

Re: Extracellular stimulation

Post by ted » Thu Oct 22, 2009 2:59 pm

Whoops, I was thinking one thing but typed another. When n axons are excited, xraxial of the entire bundle should be multiplied by n, not by 1.
ChrisR wrote:If I understood you correctly, then extracellular has to be set like this, for sections inside:

Code: Select all

insert extracellular xraxial=r_e xg=0 xc=0
True.
and outside the canulla?:

Code: Select all

insert extracellular xraxial=r_e xg=1e9 xc=0
True if the assumption is that resistance to radial current flow is insignificant. Of course, if xg is so large, xraxial might as well be 0 for nodes outside the cannula. And any sections that are completely outside the cannula don't need the extracellular mechanism at all (because you're representing the effect of myelination by simple reduction of cm in internodes).

bchenley
Posts: 13
Joined: Mon Apr 12, 2010 3:55 pm

Re: Extracellular stimulation

Post by bchenley » Thu Apr 15, 2010 1:11 am

In the "Notes," it says, "after any change to cell geometry or nseg, be sure to invoke setpointers()." How can I do this? I have created a new "cell.ses" and can't get it to work....

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

Re: Extracellular stimulation

Post by ted » Thu Apr 15, 2010 10:34 am

bchenley wrote:In the "Notes," it says, "after any change to cell geometry or nseg, be sure to invoke setpointers()." How can I do this?
At the oc> prompt type
setpointers()
then press the Enter key.

bchenley
Posts: 13
Joined: Mon Apr 12, 2010 3:55 pm

Re: Extracellular stimulation

Post by bchenley » Thu Apr 15, 2010 5:24 pm

Yes, I tried doing that with my cell and keep getting this error: "setpointers undefined function." When I use the given cell.ses, and delete one ore two axons and type setpointers() in the prompt, it works... ???

Sami.B
Posts: 3
Joined: Thu Apr 15, 2010 8:44 pm

Re: Extracellular stimulation

Post by Sami.B » Thu Apr 15, 2010 8:47 pm

Hi Ted,

We've implemented steps 1-4, and we're somewhat confident that we've done it correctly. All we're trying to do here is replace your cell.ses file
with our cell.ses file. We keep getting the following error:


"After any change to cell geometry or nseg, be sure to invoke setpointers()"
1

nrniv: dend not an array variable
in rigc.ses near line 64
dend[77] rvp_.begin(1)

xopen("rigc.ses" )
execute1("{xopen("rigc.ses")}" )
load_file("rigc.ses" )

.
.
.


oc>"


Certainly, we've made geometrical changes to the original cell.ses file that you've created. Our question is: where, when, and how many times
do we invoke setpointers() when using our modified cell.ses? We've successfully built xtra.mod, and we can successfully run initxstim.hoc (with the original cell.ses file) by double clicking
on it. Thank you for your time and effort.


Best,

Sami and bchenley

Post Reply