Page 1 of 1

NEURON BOOK Chapter 11 (rig.hoc)

Posted: Wed Oct 06, 2010 2:59 pm
by nianwosuh
Please could you check the hoc syntax for loading the RunControl and variable time step?

I'm working through chapter 11 of the NEURON book and following the instructions under section 11.5.2 "Exploiting the reusable code".

For the "rig.hoc" section that should be used for the interface for adjusting the model parameter etc, I wrote this code as it appears in the NEURON book:

"load_file ("runct1.ses") // RunControl and VaraiableTimeStep",
Neither the RunControl nor the Variable time step was displayed. rather I have this msg:

" Couldn't find: runct1.ses
in rig.hoc near line 1
load_file ("runct1.ses") // RunControl and VaraiableTimeStep
"

Or was I supposed to have created a sesion file that has these two items and saved it as "runct1.ses"?

Thank you
Irene

Re: NEURON BOOK Chapter 11 (rig.hoc)

Posted: Tue Oct 12, 2010 10:30 am
by ted
nianwosuh wrote:For the "rig.hoc" section that should be used for the interface for adjusting the model parameter etc, I wrote this code as it appears in the NEURON book:

"load_file ("runct1.ses") // RunControl and VaraiableTimeStep"
The "1" should be lower case L, i.e.
load_file ("runctl.ses")

Re: NEURON BOOK Chapter 11 (rig.hoc)

Posted: Fri Jun 08, 2012 11:01 am
by pascal
I am also working through chapter 11, but when I type load_file("runctl.ses"), I receive the error message

nrniv: Couldn't find: runctl.ses
in rig.hoc near line 1
load_file("runctl.ses")


(I made sure to use a lower-case "L" and not a "1.") Where is this file supposed to be found? A search of the entire nrn directory turned up nothing.

Re: NEURON BOOK Chapter 11 (rig.hoc)

Posted: Fri Jun 08, 2012 11:27 am
by ted
I see the cause of the problem. The next to last sentence on page 334 is ambiguous. One interpretation of it is that "there is already a file with this name." The other is that "this code example supposes that such a file exists." The latter is the correct interpretation. I should mention that such usage is not uncommon in technical writing.

The solution, of course, is to use the GUI to bring up a RunControl panel and a VariableTimeStep panel, configure them as described in the text, and save them to a session file called runctl.ses.

Re: NEURON BOOK Chapter 11 (rig.hoc)

Posted: Fri Jun 08, 2012 11:35 am
by pascal
That makes sense. Thanks!