variation in listing 9.8 of The Neuron Book

NMODL and the Channel Builder.
Post Reply
amal
Posts: 2
Joined: Fri Aug 13, 2010 2:02 pm

variation in listing 9.8 of The Neuron Book

Post by amal »

With reference to listing 9.8 of The Neuron Book,

1. How can we make Ca buffer to come into play only after certain level of cai is attained ?

2. How can we plot CaBuffer (CaBuffer[0],[1],[2] or [3]) with time? I have tried the following without success:

Code: Select all

objectvar g[20]
ngraph = 0
proc addgraph() { local ii
	ngraph = ngraph + 1
	ii = ngraph - 1
	g[ii] = new Graph()
	g[ii].size(0,tstop,$2,$3)
	
	g[ii].addexpr($s1,1,1)
	
	graphList[0].append(g[ii])
	
	g[ii].label($4, $5, $s1)
}
though, with

Code: Select all

addgraph("soma.cai(0.5)",0,0.001,0.4,0.1)
i get plot of cai during simulation.
but with

Code: Select all

addgraph("soma.CaBuffer[0]_cadifus(0.5)",0,.003e-6, 0.3,0.1)
or 
addgraph("CaBuffer[0]_cadifus",0,.003e-6, 0.3,0.1)
I get graph window but there is no plot during simulation.

thanks and regards
amal
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: variation in listing 9.8 of The Neuron Book

Post by ted »

amal wrote:How can we make Ca buffer to come into play only after certain level of cai is attained ?
If you mean "make buffering have a hard threshold," the answer is: that isn't going to happen with a mechanism specified using kinetic scheme notation.
How can we plot CaBuffer (CaBuffer[0],[1],[2] or [3]) with time?
When unsure about syntax for plotting a particular variable, the quick way to find out is make a toy model with just one section, insert the mechanism into it, use the GUI to bring up a graph ("Current axis" or "State axis" would be good for this), then use that graph's "Plot what?" to construct the string by clicking on menus. Avoids typos and syntax errors, and much easier done than said. In the FAQ list see
Q: How do I plot something other than membrane potential?
You'll find a link to the FAQ list at http://www.neuron.yale.edu/neuron/docs.

Since the variables of interest to you belong to a section, double click on the name of the section in the Plot what? tool's left column, and use the middle and right columns to select exactly what you want.

Two suggestions for your proc addgraph--
First, instead of predeclaring

Code: Select all

objectvar g[20]
,use a List

Code: Select all

objref glist
glist = new List()
You won't need the ngraph variable.
Second, instead of addexpr use addvar. addexpr will reinterpret the name of the plotted variable at every fadvance, which is absolutely unnecessary.
Your proc addgraph() then becomes

Code: Select all

proc addgraph() { localobj tobj
	tobj = new Graph()
	glist.append(tobj)
	tobj.size(0,tstop,$2,$3)
	
	tobj.addvar($s1,1,1)
	
	graphList[0].append(tobj)
	
	tobj.label($4, $5, $s1)
}
amal
Posts: 2
Joined: Fri Aug 13, 2010 2:02 pm

Re: variation in listing 9.8 of The Neuron Book

Post by amal »

Thanks Ted
Got the graph.
if you mean "make buffering have a hard threshold," the answer is: that isn't going to happen with a mechanism specified using kinetic scheme notation.
could you please suggest any workaround

Thanks and regards
Amal
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: variation in listing 9.8 of The Neuron Book

Post by ted »

Do it with differential equations.
Post Reply