where am I doing wrong ?
What did you expect to happen when you ran a simulation? What actually did happen?
i don't understand define a variable how i will use it
I don't understand your question.
can you link me about nmodl application examples ?
NMODL doesn't seem to have anything to do with making your program work--you're
apparently using the Channel Builder. If you absolutely must read about NMODL, see
chapter 9 of The NEURON Book, or read
"Expanding NEURON's Repertoire of Mechanisms with NMODL"
(see the Documentation page
http://www.neuron.yale.edu/neuron/docs
for a link to download that paper). But it's not going to help you make my.hoc work.
You can make your life easier by creating a new file called init.hoc
init.hoc should contain these statements:
Code: Select all
load_file("nrngui.hoc")
load_file("channels.ses") // Channel Builders
load_file("cell.hoc")
load_file("my.hoc")
Double clicking on init.hoc will make NEURON load all your ses and hoc files automatically.
my.hoc is disorganized. Program development and debugging will be easiest if you use
a modular programming style. Try to keep these separate from each other:
--specification of biological properties
--specification of user interface and "instrumentation" ("instrumentation" includes
stimulators and anything that displays or reports the values of variables during a
simulation)
--specification of simulation control
Here is an example of a properly structured my.hoc:
Code: Select all
/* this is part of specification of biological properties */
Area = 100 // um2
// argument should be desired area in um2
proc setarea() {
L = Area/diam/PI
DDINa[0].Nsingle = 60 * Area
ddhhkp[0].Nsingle = 18 * Area
}
setarea()
/* this is part of specification of user interface and "instrumentation" */
{
xpanel("ok", 0)
xvalue("Area (um2)","Area", 1,"setarea()", 0, 1 )
xpanel(431,392)
}
opensum=0
proc findopen {
opensum+=DDINa[0].O
print opensum
}
/* this is part of specification of simulation control */
// use an FInitializeHandler to force opensum to 0 at initialization
objref fih
fih = new FInitializeHandler("opensum=0")
// custom advance()
proc advance() {
fadvance()
findopen()
}