NEURON BOOK Chapter 11 (rig.hoc)

The basics of how to develop, test, and use models.
Post Reply
nianwosuh
Posts: 39
Joined: Tue Jul 27, 2010 11:00 pm

NEURON BOOK Chapter 11 (rig.hoc)

Post 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
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: NEURON BOOK Chapter 11 (rig.hoc)

Post 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")
pascal
Posts: 106
Joined: Thu Apr 26, 2012 11:51 am

Re: NEURON BOOK Chapter 11 (rig.hoc)

Post 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.
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: NEURON BOOK Chapter 11 (rig.hoc)

Post 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.
pascal
Posts: 106
Joined: Thu Apr 26, 2012 11:51 am

Re: NEURON BOOK Chapter 11 (rig.hoc)

Post by pascal »

That makes sense. Thanks!
Post Reply