How to plot or record a mechanism's state variables

A collection of noteworthy items selected by our moderators from discussions about making and using models with NEURON.

Moderators: wwlytton, tom_morse

Post Reply
ted
Site Admin
Posts: 5592
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

How to plot or record a mechanism's state variables

Post by ted » Fri Jan 16, 2009 11:16 am

STATEs of NMODL-specified mechanisms are automatically range variables, therefore visible to hoc with the appropriate syntax (suffix for density mechanisms, dot notation for point processes). The same is true for mechanisms constructed with the Channel Builder.

Just like any other variable, states can be plotted in graphs (it is most convenient to use NEURON Main Menu / Graph / State axis, then use this new graph's "Plot what?" tool--see "Q: How do I plot something other than membrane potential?" in the FAQ list http://www.neuron.yale.edu/neuron/faq), or captured with the Vector class's record() method (see http://www.neuron.yale.edu/neuron/stati ... tml#record) for subsequent plotting, analysis, or writing to files.

The only question is: what is the name of any particular state?

Examples:
1. A density mechanism called khh that has one gating state called n. The value of this state variable at location 0.1 in a section called axon would be known to hoc as axon.n_khh(0.1).
2. A point process mechanism called Cad that has gating states m and h. Suppose an instance of this mechanism has been created with these statements:
objref cad
dend cad = new Cad(0.7)
Then the value of cad's m gating variable would be known as cad.m
3. A stochastic channel mechanism called Nahh, which has states called mihj where i = 0..3 and j = 0..1. Suppose there is a model with multiple instances of this class, with the instances having names of the form nahh[k] where k = 0, 1, . . .. Then the states of any particular instance will be known to hoc as nahh[k].mihj, e.g. nahh[2].m0h1. The numeric value of each state will be the number of channels in that state.

Post Reply