Displaying state variable initial conditions

The basics of how to develop, test, and use models.
Post Reply
Meena
Posts: 31
Joined: Mon Jan 09, 2006 3:50 pm
Contact:

Displaying state variable initial conditions

Post by Meena »

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
ted
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

Post by ted »

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?
Depends on what rates() does, and what arguments it requires.
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?
Save a RunControl panel to a session file all by itself. Then examine the contents of that
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.
how can I get these values (of the m and h) displayed on the main screen
STATEs are automatically range variables, and are accessible to hoc with the syntax
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.
minf is declared as "RANGE" in the NEURON block in the ".mod" file
This means you can also see how minf varies as a function of time, if you want to.
Use the suffix or dot notation syntax as for STATEs.
Post Reply