using ri(x) - what "r I" doing wrong?

Anything that doesn't fit elsewhere.
Post Reply
tpv

using ri(x) - what "r I" doing wrong?

Post by tpv »

Hi there. I am trying to use the ri function, but somehow i am missing the point. here is my file:

load_file ("nrngui.hoc")
create dendrite

create dendrite
dendrite {
L = 4
diam = 2
nseg = 51
cm = 1
Ra = 400
insert pas g_pas=0.0003
e_pas=-80
}


access dendrite

ri(0.01)
ri(1)

============
output:

4.9930963
4.9930963

==> My problem: The values are both the same where i thought they should differ since i am measuring between the same starting at different end points. Hm

Now, I thought ri(x) would give me the resistance "between the center of the segment containing x and its parent segment" (documentation).

Clearly, i have a misconception of what "parent segment" is supposed to mean. I thought it was segment zero, but it seems as if it's just "the next segment over" in other words, ri s the resistance between two ajacent node points, yes?

So my next question would be: How do I make neuron give me the resistance bewteen point a and b, in the same compartment, and between different compartments?

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

Re: using ri(x) - what "r I" doing wrong?

Post by ted »

tpv wrote:Clearly, i have a misconception of what "parent segment" is supposed to mean. I thought it was segment zero, but it seems as if it's just "the next segment over" in other words, ri s the resistance between two ajacent node points, yes?
Yep.
So my next question would be: How do I make neuron give me the resistance bewteen point a and b, in the same compartment, and between different compartments?
One could get very tricky here with algorithms that traverse the branched tree of a cell
to find a direct path from one point to another, or a bit less tricky by exploiting the
RangeVarPlot class to discover the path for us, but there's nothing wrong with the quick
and dirty approach--

Set all membrane conductances to 0.
Attach an SEClamp with rs = 1e-6 megohm and dur1 = 1e9 ms to point a.

Next you have a choice:

1. Attach an IClamp with del 0, dur 1e9, amp 1 nA to point b.
Run a simulation. The steady state membrane potential at b in mV is the axial resistance
between a and b in megohms.

OR

2. Use the Impedance class or the GUI's Impedance tools to determine Zin (the input
impedance) of the cell at point b for a frequency of 0.1 Hz, or even 1 Hz--either should
be close enough to DC (steady state) for this purpose. The numeric values are in units
of megohms.

Thanks to Alfred P. Doolittle.

--Ted

If Necessity be the Mother of Invention, then surely Gifted Indolence is the absentee Father.
tpv

Post by tpv »

Ok, so for branched structures the "switch of the membrane currents off methods is of course the easiest. Nice.

But for a simple one compartment dendrite, i can't get the resistance with ri? I suppose i can simply do ri(0.01)* dendrite.nseg ?

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

Post by ted »

tpv wrote:But for a simple one compartment dendrite, i can't get the resistance with ri?
No, it is possible to calculate it--"all things are possible with programming," but it's not
always worth the effort if a simpler method is available.
I suppose i can simply do ri(0.01)* dendrite.nseg ?
Not that way, not even if the section is perfectly cylindrical. To see why, try this:

Code: Select all

create dend
access dend
L = 1000
diam = 1
nseg = 1
print nseg
for (x) print x, ri(x)
nseg = 3
print nseg
for (x) print x, ri(x)
Further complications arise if diam is not constant.

If diameter is constant, nseg >= 3, and the locations of the two points are a and b where
1 > b > a > 0, you could do this:
rab = ri(0.5)*int(nseg*(b-a)/L)
ri(0.5) is the axial resistance of a single segment (assuming that nseg >= 3), and
int(nseg*(b-a)/L) is the number of segments between a and b.
Post Reply