Hi,
I am basically writing a script with the hoc file having the model of a simple soma.
In this soma, I need to insert some ionic currents ie HH type Na and K currents. ( and thus I have na.mod and k.mod files).
Within this K.mod and Na.mod files, I have blocks for calculating the Na and K currents. With regards to this I have 2 questions.
1. In the INITIAL block of the Na.mod file I have:
INITIAL {
rates()
m = minf
h = hinf
}
Would I be correct in assuming that this takes care of the initialization of the m and h gating variable for any v_init? And that if in the "Run" box in Neuron, I type v_init=-40mV, all the initial conditions for m and h will be re-computed to reflect the new initial conditions??
(I also have the other blocks like the "procedure" etc)
2. Secondly, how can I get these values (of the m and h) displayed on the main screen...
I tried oc>print m ( this did not work)
I tried oc>print minf ( this did not work)
note: minf is declared as "RANGE" in the NEURON block in the ".mod" file
I am guessing it has to do with the "m" is actually declared.
Thank you so much for your time! I really appreciate it....
Meena
Displaying state variable initial conditions
-
- Site Admin
- Posts: 6394
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Displaying state variable initial conditions
Depends on what rates() does, and what arguments it requires.Meena wrote:1. In the INITIAL block of the Na.mod file I have:
INITIAL {
rates()
m = minf
h = hinf
}
Would I be correct in assuming that this takes care of the initialization of the m and h gating variable for any v_init?
Save a RunControl panel to a session file all by itself. Then examine the contents of thatAnd that if in the "Run" box in Neuron, I type v_init=-40mV, all the initial conditions for m and h will be re-computed to reflect the new initial conditions?
session file. Among other things, you will see this statement
xvalue("Init","v_init", 1,"stdinit()", 1, 1 )
Read the documentation on xvalue and you will discover that, when a new value is
entered into the numeric field next to the RunControl's Init button, v_init is assigned that
value, and then stdinit() is called. That sets v to v_init everywhere in your model and
causes execution of the code in the INITIAL blocks of all mechanisms.
STATEs are automatically range variables, and are accessible to hoc with the syntaxhow can I get these values (of the m and h) displayed on the main screen
statename_suffixname(rangeval) for density (distributed) mechanisms, and
objrefname.statename for point processes.
Why print them? Why not plot them in a graph? That's what
NEURON Main Menu / Graph / State axis
is for. Use that graph's Plot what? tool to specify the name of what you want to plot.
This means you can also see how minf varies as a function of time, if you want to.minf is declared as "RANGE" in the NEURON block in the ".mod" file
Use the suffix or dot notation syntax as for STATEs.