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
Code: Select all
TITLE hhr.mod squid sodium, potassium, and leak channels with temperature as a range variable
Insert this line at the start of the COMMENT block:
Code: Select all
Modified from hh.mod so that temperature is controlled by RANGE variable localtemp
In the COMMENT block change the sentence
Code: Select all
Remember to set celsius=6.3 (or whatever) in your HOC file.
to
Code: Select all
Remember to set localtemp=6.3 (or whatever) in your HOC file.
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 line
to
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):
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)
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.