Hello,
I have a question about the cytoplasmic resistance Ra defined in NEURON:
In my model (about dendritic spines), I want to express the neck resistance (Ohm, not Ohm.cm) as explicitly as possible. The relation between Rneck and Ra is the following:
Rneck = (Ra*nech_Length)/(pi*(neck_Diameter)^2)
My problem is that when I enter this formula and set Rneck as a variable, varing its value on the GUI just doesn't change anything. As if it wasn't linked to anything regarding the spine. Howerver, Ra (which I conserved in the model) does affect the voltages in the spine when I vary it.
Here are the formulae where I cahnged Ra to Rneck:
forall { // this block is set in the cell definition (topology, geometry and conductances)(independante hoc.file)
insert pas
g_pas = 1/RmSpec // mho/cm2 conductance
e_pas = -70 // mV reversal potential (will be modified by seting Vrest)
Ra = RaSpec
for i = 0, 3 { // because I work with 4 spines
neck {
Rneck = (RaSpec*NECK_LENGTH)/(pi*(NECK_DIAM)^2)
Rn = Rneck
}
}
Then, in the simulation hoc.file I set this:
strdef space_constant_axon, space_constant_dendrite
proc ch_space_constant() {
forall{
Ra = RaSpec
g_pas = 1/RmSpec
}
for i = 0, 3 {
neck {
Rn = Rneck
}
}
lamda_ax = sqrt((RmSpec * axon.diam * 0.0001)/(4 * axon.Ra)) * 10000 // µm
lamda_dend = sqrt((RmSpec * dend.diam * 0.0001)/(4 * dend.Ra)) * 10000 // µm
sprint(space_constant_axon, "axon space constant %.0f um", lamda_ax)
sprint(space_constant_dendrite, "dendrite space constant %.0f um", lamda_dend)
}
What I am expecting is to see the amplitude of EPSPs in the dendrite decrease (and increase in the spine head) when I increase the neck resistance. But it doesn't work (no change at all) and I don't really se what's wrong.
Could you advice, please.
Thanks in advance.
Relation between Ra and a neck resistance.
Re: Relation between Ra and a neck resistance.
I am aware of the fact that Ra is defined for all the sections and that it takes into account the section morphology. But I really want to treat the neck resistance indenpendtly because I want to investigate the impact of neck resistance and spine morphology on EPSPs.
Re: Relation between Ra and a neck resistance.
Ah, I think I got it!
I don't have to give another name to Ra (when I specify it for the neck (Rn)), otherwise it treats it as a new and independent variable, I guess. It works when I change Rn to Ra.
I don't have to give another name to Ra (when I specify it for the neck (Rn)), otherwise it treats it as a new and independent variable, I guess. It works when I change Rn to Ra.
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Relation between Ra and a neck resistance.
Almost correct. For a cylindrical cable with cross-sectional area A and length L, the resistance between the two ends of the cable is Ra*L/A, where Ra is in (ohm cm), L in (cm), and A in (cm2). Your formula misses two key points:kahinou wrote:The relation between Rneck and Ra is the following:
Rneck = (Ra*nech_Length)/(pi*(neck_Diameter)^2)
--cross-sectional area of a cylinder is (PI*diam^2)/4
--in NEURON, L and diam are in um, not cm, so your formula needs a big scale factor
One minor suggestion: instead of using your own "pi" you can use hoc's predeclared variable which is called PI. PI has the correct value (as long as you don't play a trick like assigning it some other value like 22/7). I see that the new Sphinx-generated Programmer's reference has completely lost track of this fact (its Index doesn't seem to know about "predeclared-variables" at all, let alone PI) so I point you to the older static html
http://www.neuron.yale.edu/neuron/stati ... redec.html
and especially
http://www.neuron.yale.edu/neuron/stati ... #Constants
After all these caveats, the formula becomes
Rneck = 1e4 * 4*PI*Ra*L/diam^2
if you want Rneck in (ohm), and
Rneck = 0.01 * 4*Ra*L/(PI*diam^2)
if you prefer (megohm), as many investigators do.
This
Code: Select all
for i = 0, 3 { // because I work with 4 spines
neck[i] {
Rneck[i] = (RaSpec*NECK_LENGTH[i])/(pi*(NECK_DIAM[i])^2)
Rn = Rneck[i]
}
}
Ra = 100 * Rneck *PI*diam^2 / (4*L)
where Ra is in (ohm cm), Rneck is in (megohm), and diam and L are in (um). This is what you want:
Code: Select all
for i = 0, 3 neck[i] {
Ra = 100 * Rneck[i] *PI*diam^2 / (4*L)
}
This
Code: Select all
strdef space_constant_axon, space_constant_dendrite
proc ch_space_constant() {
forall{
. . . etc. . . .
Code: Select all
model setup
topology -- create sections and connect them
geometry -- specify their L and diam
biophysics -- specify Ra, cm, inserted channels and their densities
spatial discretization (i.e. each section's nseg)
model analysis
calculation and reporting of electrotonic lengths and whatever else you like
lamda_ax = sqrt((RmSpec * axon.diam * 0.0001)/(4 * axon.Ra)) * 10000 // µm
lamda_dend = sqrt((RmSpec * dend.diam * 0.0001)/(4 * dend.Ra)) * 10000 // µm
use incorrect scale factors, omit PI, rely on "user-invented" variables instead of using section properties, and beg to be replaced by function calls (so you have less code to write, read, and debug).
The length constant formula is
lambda = 0.5*sqrt(diameter*Rm/Ra)
where Rm is the membrane specific conductance in (ohm cm2) and Rax is cytoplasmic resistivity in (ohm cm). If diameter is in um, then diameter*Rm/Ra is in (cm um) which needs to be multiplied by 1e4 to turn it into (um2). That's why this
lambda = 0.5*sqrt(1e4*diameter*Rm/Ra)
gives lambda in um. No need for any additional scale factors.
So define a function that returns lambda of the currently accessed section, and you end up with this clean code
Code: Select all
// returns length constant of currently accessed section in um
func lambda() {
return 0.5*sqrt(1e4*diam*Rm/Ra)
}
axon lamda_ax = lambda()
dend lamda_dend = lambda()
Re: Relation between Ra and a neck resistance.
Thank you for your answer.
Concerning units conversions:
- I figured out the conversion of cm into um of Ra after I posted my question, sorry.
- However, I don't understand the "/4" in the cross sectional area. The cross sectional area is given by the integral of a surface element dA over the unit vector pointing along the viewing direction toward the viewer, which gives for a cylinder: pi*diam^2. Sorry, it's probably a stupid question but I don't get it.
Thanks for the clue about PI, I was indeed looking for the way it is declared in NEURON.
I agree with the rest of your suggestions, thank you very much.
Concerning units conversions:
- I figured out the conversion of cm into um of Ra after I posted my question, sorry.
- However, I don't understand the "/4" in the cross sectional area. The cross sectional area is given by the integral of a surface element dA over the unit vector pointing along the viewing direction toward the viewer, which gives for a cylinder: pi*diam^2. Sorry, it's probably a stupid question but I don't get it.
Thanks for the clue about PI, I was indeed looking for the way it is declared in NEURON.
I agree with the rest of your suggestions, thank you very much.
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Relation between Ra and a neck resistance.
First a definition, then a reality check, then a derivation. The cross section of a circular cylinder with diameter d is a circle with diameter d. In your mind's eye imagine a square with width = height = d. Now imagine a circle with diameter d that lies on top of the square, aligned with its center. The circle fits inside the square. Clearly a circle with diameter d does not occupy more than three times the area of a square whose width = height = d. The area of a circle with radius r iskahinou wrote:I don't understand the "/4" in the cross sectional area.
Code: Select all
2*PI |2*PI
INTEGRAL r*(r*dphi)/2 = phi*r^2/2 | = PI*r^2 = PI*d^2/4
phi = 0 |0
Re: Relation between Ra and a neck resistance.
Absolutly!
I was treating the diameter d as if it was the radius, absence of concentration. sorry for that and thank you for your patience,Ted.
I was treating the diameter d as if it was the radius, absence of concentration. sorry for that and thank you for your patience,Ted.
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Relation between Ra and a neck resistance.
You'd have caught the error yourself in seconds if we were discussing this at the blackboard. Communication via static text, like email and forums, is better than nothing, but not nearly as rapid as a real conversation.