Chapter 11 Modeling Networks 'The NEURON Book'
Posted: Sun Nov 22, 2009 7:17 am
As the subject field suggests I am trying to work through the tutorial in Chapter 11 modeling networks in The NEURON Book.
I am using version NEURON version 7.0 on Hardy Heron Ubuntu Linux.
When I try running my init file from the interpreter I get the following errors:
oc>load_file("init.hoc")
1
1
/opt/nrn/i686/bin/nrniv: syntax error
in makenet.hoc near line 3
for i=0, ncell-1
^
xopen("makenet.hoc")
execute1("{xopen("makenet.hoc")}")
load_file("makenet.hoc")
xopen("init.hoc")
and others
0
/opt/nrn/i686/bin/nrniv: position : can't push that type onto stack
in makenet.hoc near line 6
}
^
cell_append(..., 4, 0, 0)
xopen("init.hoc")
execute1("{xopen("init.hoc")}")
load_file("init.hoc")
oc_restore_code tobj_count=1 should be 0
0
initcode failed with 1 left
/opt/nrn/i686/bin/nrniv: syntax error
in makenet.hoc near line 8
for i=0, ncell-1 for j=0, ncell-1 if (i! = j)
The file that is being called from init and causing all the problems is makenet.hoc
It looks like ncell is expected to be declared.
The code inside makenet.hoc is on page 329 of the book.
I have checked all of the code really carefully and I can't figure out the problem.
Also when I generated hoc code from the GUI I noticed some differences in code for the file prototype.hoc
On the file that I generated the first few lines were:
'// Artificial cells no longer need a default section.
//Network cell templates
//Artificial cells
// IF_IntervalFire'
I made another file which I have called netdef.hoc, that is an exact copy of the example in the book (page 325) of the .hoc code generated from the GUI.
I was wondering if any one knows what is probably wrong with my makenet.hoc file (below)? Also I was wondering if the changes I have noticed between the book and NEURON 7 are significant, or if there is anything I should be aware of?
I can see the possibility that this is a silly mistake of my own.
Sorry if this is not the best place in the forum to post this question.
Thanks.
Russell.
for i=0, ncell-1 {
cell_append(new IF_IntervalFire(), i, 0, 0)
}
for i=0, ncell-1 for j=0, ncell-1 if (i! = j) {
nc_append(i,j,-1,0,1)
}
proc createnet() {
local i, j
ncell = $1
for i=0,$1-1{
cell_append(new IF_IntervalFire(), i, 0, 0)
}
for i=0, $1-1 for j=0, $1-1 if (i !=j ){
nc_append(i,j,-1,0,1)
}
}
I am using version NEURON version 7.0 on Hardy Heron Ubuntu Linux.
When I try running my init file from the interpreter I get the following errors:
oc>load_file("init.hoc")
1
1
/opt/nrn/i686/bin/nrniv: syntax error
in makenet.hoc near line 3
for i=0, ncell-1
^
xopen("makenet.hoc")
execute1("{xopen("makenet.hoc")}")
load_file("makenet.hoc")
xopen("init.hoc")
and others
0
/opt/nrn/i686/bin/nrniv: position : can't push that type onto stack
in makenet.hoc near line 6
}
^
cell_append(..., 4, 0, 0)
xopen("init.hoc")
execute1("{xopen("init.hoc")}")
load_file("init.hoc")
oc_restore_code tobj_count=1 should be 0
0
initcode failed with 1 left
/opt/nrn/i686/bin/nrniv: syntax error
in makenet.hoc near line 8
for i=0, ncell-1 for j=0, ncell-1 if (i! = j)
The file that is being called from init and causing all the problems is makenet.hoc
It looks like ncell is expected to be declared.
The code inside makenet.hoc is on page 329 of the book.
I have checked all of the code really carefully and I can't figure out the problem.
Also when I generated hoc code from the GUI I noticed some differences in code for the file prototype.hoc
On the file that I generated the first few lines were:
'// Artificial cells no longer need a default section.
//Network cell templates
//Artificial cells
// IF_IntervalFire'
I made another file which I have called netdef.hoc, that is an exact copy of the example in the book (page 325) of the .hoc code generated from the GUI.
I was wondering if any one knows what is probably wrong with my makenet.hoc file (below)? Also I was wondering if the changes I have noticed between the book and NEURON 7 are significant, or if there is anything I should be aware of?
I can see the possibility that this is a silly mistake of my own.
Sorry if this is not the best place in the forum to post this question.
Thanks.
Russell.
for i=0, ncell-1 {
cell_append(new IF_IntervalFire(), i, 0, 0)
}
for i=0, ncell-1 for j=0, ncell-1 if (i! = j) {
nc_append(i,j,-1,0,1)
}
proc createnet() {
local i, j
ncell = $1
for i=0,$1-1{
cell_append(new IF_IntervalFire(), i, 0, 0)
}
for i=0, $1-1 for j=0, $1-1 if (i !=j ){
nc_append(i,j,-1,0,1)
}
}