how to define temperature for each node of ranvier
-
- Posts: 38
- Joined: Fri Aug 27, 2010 7:23 am
how to define temperature for each node of ranvier
hello Ted,
now i have 21 nodes of Ranvier in my model, i use "forall" to define the temperature, do you know how to define the temperature for one of those nodes while the temperature for the others nodes are the same?
now i have 21 nodes of Ranvier in my model, i use "forall" to define the temperature, do you know how to define the temperature for one of those nodes while the temperature for the others nodes are the same?
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: how to define temperature for each node of ranvier
To understand what you need to do, you must first know the following facts.
hoc has a variable called celsius that may be used by mechanisms specified in NMODL to implement temperature effects. The only way to know if any mechanism includes temperature effects is to examine its NMODL source code. For example, hh.mod (the NMODL source code for the built-in hh mechanism) declares celsius to be an ASSIGNED variable, and uses it to adjust mtau and htau in PROCEDURE rates.
celsius may also affect the calculation of ionic equilibrium potentials (via the Nernst equation), but this only happens in the following cases:
1. in sections in which the intracellular and/or extracellular concentration of an ion is controlled by an ion accumulation mechanism. A mod file that contains a
USEION na READ ina, nai WRITE nai
statement would be an example of such a mechanism
2. in sections for which an ion_style statement has been executed that forces reversal potential for a particular ionic species to be calculated from ionic concentrations--see http://www.neuron.yale.edu/neuron/stati ... #ion_style
Finally, three more important facts about celsius. Its units are degrees centigrade, its default value is 6.3, and it is a "global"--which means that it has the same value for _all_ sections in a model. See http://www.neuron.yale.edu/neuron/stati ... ml#celsius
This last fact means that, if your model involves a mechanism that is sensitive to celsius, you cannot implement a local temperature change simply by changing the value of celsius, because anything you do to celsius will affect all sections that contain your temperature-sensitive mechanism.
But there is a workaround: create a new mechanism that is identical to your temperature-sensitive mechanism, but revise it so that your new mechanism is controlled not by the global variable celsius but by a range variable. Then you put your new mechanism in just those sections that need their own temperatures, and use whatever hoc statements are necessary to assign the desired local temperatures.
For example, suppose your model uses hh. You'd copy hh.mod to a file called hhr.mod (r to remind us that this new mechanism uses a range variable to specify temperature). Then you'd make the following changes to hhr.mod:
Change the TITLE statement to
Insert this line at the start of the COMMENT block:
In the COMMENT block change the sentenceto
In the NEURON block, just before the GLOBAL minf . . . line, insert the following line:
In the ASSIGNED block comment out celsius and declare localtemp, i.e. change this lineto
In PROCEDURE rates comment out each statement that uses celsius and replace it with a statement that uses localtemp. The final result should look like this (here I show only the changes):
After you have made all these changes, check the resulting mod file with modlunit, fix any errors that are reported, then compile the mod file.
You could then replace every occurrence of hh in your hoc code with hhr, and you'll also have to make sure that your hoc code specifies the correct value of localtemp_hhr for every section that contains hhr.
hoc has a variable called celsius that may be used by mechanisms specified in NMODL to implement temperature effects. The only way to know if any mechanism includes temperature effects is to examine its NMODL source code. For example, hh.mod (the NMODL source code for the built-in hh mechanism) declares celsius to be an ASSIGNED variable, and uses it to adjust mtau and htau in PROCEDURE rates.
celsius may also affect the calculation of ionic equilibrium potentials (via the Nernst equation), but this only happens in the following cases:
1. in sections in which the intracellular and/or extracellular concentration of an ion is controlled by an ion accumulation mechanism. A mod file that contains a
USEION na READ ina, nai WRITE nai
statement would be an example of such a mechanism
2. in sections for which an ion_style statement has been executed that forces reversal potential for a particular ionic species to be calculated from ionic concentrations--see http://www.neuron.yale.edu/neuron/stati ... #ion_style
Finally, three more important facts about celsius. Its units are degrees centigrade, its default value is 6.3, and it is a "global"--which means that it has the same value for _all_ sections in a model. See http://www.neuron.yale.edu/neuron/stati ... ml#celsius
This last fact means that, if your model involves a mechanism that is sensitive to celsius, you cannot implement a local temperature change simply by changing the value of celsius, because anything you do to celsius will affect all sections that contain your temperature-sensitive mechanism.
But there is a workaround: create a new mechanism that is identical to your temperature-sensitive mechanism, but revise it so that your new mechanism is controlled not by the global variable celsius but by a range variable. Then you put your new mechanism in just those sections that need their own temperatures, and use whatever hoc statements are necessary to assign the desired local temperatures.
For example, suppose your model uses hh. You'd copy hh.mod to a file called hhr.mod (r to remind us that this new mechanism uses a range variable to specify temperature). Then you'd make the following changes to hhr.mod:
Change the TITLE statement to
Code: Select all
TITLE hhr.mod squid sodium, potassium, and leak channels with temperature as a range variable
Code: Select all
Modified from hh.mod so that temperature is controlled by RANGE variable localtemp
Code: Select all
Remember to set celsius=6.3 (or whatever) in your HOC file.
Code: Select all
Remember to set localtemp=6.3 (or whatever) in your HOC file.
Code: Select all
RANGE localtemp
Code: Select all
celsius (degC)
Code: Select all
: celsius (degC)
localtemp (degC)
Code: Select all
: TABLE minf, mtau, hinf, htau, ninf, ntau DEPEND celsius FROM -100 TO 100 WITH 200
TABLE minf, mtau, hinf, htau, ninf, ntau DEPEND localtemp FROM -100 TO 100 WITH 200
. . .
: q10 = 3^((celsius - 6.3)/10)
q10 = 3^((localtemp - 6.3)/10)
You could then replace every occurrence of hh in your hoc code with hhr, and you'll also have to make sure that your hoc code specifies the correct value of localtemp_hhr for every section that contains hhr.
-
- Posts: 38
- Joined: Fri Aug 27, 2010 7:23 am
Re: how to define temperature for each node of ranvier
Many thanks, i use fh.mod. and i have change the global celsius to locatemp according your example. and it work. thanks a lot.
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: how to define temperature for each node of ranvier
If your work with NEURON leads to a scientific publication, please be sure to cite NEURON--
see http://www.neuron.yale.edu/phpBB/viewto ... ?f=22&t=73
see http://www.neuron.yale.edu/phpBB/viewto ... ?f=22&t=73
-
- Posts: 38
- Joined: Fri Aug 27, 2010 7:23 am
Re: how to define temperature for each node of ranvier
Sure,I really appreciate your help. It is my pleasure to cite NEURON. thanks.
-
- Posts: 38
- Joined: Fri Aug 27, 2010 7:23 am
Re: how to define temperature for each node of ranvier
Hi Ted,
Thanks so much for your full and clear explanation about how to define local temperature for hh.mod.
Now i meet another question, we want to change the temperature for myelin which I define like this
i want to define the celsius as local temperature for each myelin. but i don't know the code for 'pas' , do u have any idea about this?
Thanks a lot for your time.
Happy New Year
Thanks so much for your full and clear explanation about how to define local temperature for hh.mod.
Now i meet another question, we want to change the temperature for myelin which I define like this
Code: Select all
insert pas
e_pas = -65
g_pas = 1.5e-5/diam // S/cm2
cm=0.157/(PI*diam) // uF/cm2
fac = q10^((celsius - 18.5)/10)
Ra = 65 / fac
Thanks a lot for your time.
Happy New Year
-
- Posts: 38
- Joined: Fri Aug 27, 2010 7:23 am
Re: how to define temperature for each node of ranvier
Hi Ted,
I have searched a mod file named passive, is it the pas model for myelin? and i have changed the code in passive.mod as following
I have added localtemp parameter, then i can use it as local variable for myelin. am i right?
I have searched a mod file named passive, is it the pas model for myelin? and i have changed the code in passive.mod as following
TITLE passive membrane channel
UNITS {
(mV) = (millivolt)
(mA) = (milliamp)
(S) = (siemens)
}
NEURON {
SUFFIX passive
NONSPECIFIC_CURRENT i
RANGE g, e, localtemp
}
PARAMETER {
localtemp (degC) : 20
g = .001 (S/cm2) <0,1e9>
e = -70 (mV)
}
ASSIGNED {v (mV) i (mA/cm2)}
BREAKPOINT {
i = g*(v - e)
}
I have added localtemp parameter, then i can use it as local variable for myelin. am i right?
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: how to define temperature for each node of ranvier
So you are representing the electrical effect of myelin by reducing internodal specific membrane conductance and capacitance. But you are also assuming that cytoplasmic resistivity (Ra) depends on temperature. Is there experimental evidence for this?melissamou wrote:Now i meet another question, we want to change the temperature for myelin which I define like thisCode: Select all
insert pas e_pas = -65 g_pas = 1.5e-5/diam // S/cm2 cm=0.157/(PI*diam) // uF/cm2 fac = q10^((celsius - 18.5)/10) Ra = 65 / fac
Why are you asking about pas? According to your hoc code, temperature affects cytoplasmic resistivity, not g_pas or e_pas.i want to define the celsius as local temperature for each myelin. but i don't know the code for 'pas'
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: how to define temperature for each node of ranvier
No. passive.mod is a simple, passive leak conductance.melissamou wrote:I have searched a mod file named passive, is it the pas model for myelin?
Yes. I have only one suggestion for you: you probably want to assign a default value to localtemp in the PARAMETER blocki have changed the code in passive.mod as following
. . .
I have added localtemp parameter, then i can use it as local variable for myelin. am i right?
localtemp = 20 (degC)
Otherwise its default value would be 0.
-
- Posts: 38
- Joined: Fri Aug 27, 2010 7:23 am
Re: how to define temperature for each node of ranvier
Hi Ted,
Do you know the whole mod file for pas? I can only find the passive.mod.
The localtemp has nothing to do with pas.mod, i just want to use it as a local variable. so that i can define the localtemp for different myelin.
in my code, we want to hot some myelin, so the temperature for different myelin are different.
Do you know the whole mod file for pas? I can only find the passive.mod.
The localtemp has nothing to do with pas.mod, i just want to use it as a local variable. so that i can define the localtemp for different myelin.
in my code, we want to hot some myelin, so the temperature for different myelin are different.
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: how to define temperature for each node of ranvier
It is identical to your passive.mod, except that the SUFFIX is pas.melissamou wrote:Do you know the whole mod file for pas?
So membrane capacitance and conductance may be affected by temperature. Understood.in my code, we want to hot some myelin, so the temperature for different myelin are different.