Hi,
Just started learning neuron a few days ago.I have this code of a c fibre. When i compiled the hoc file there was a syntax error on line no 17:
insert fvnag3e // Nav 1.7 channel: endings of pain-sensing nerves.
When i removed that channel the error moved to the next line.
Since i just started to learn i'm unable to understand this error.PLEASE can somebody help me with this problem????
The code is as follows:
load_file("nrngui.hoc")
idend = 1 // number of dendrites
create soma, dend[idend], axon
connect axon(0), soma(0) // connect the soma and axon
for i = 0,idend-1 {
connect dend(0), soma(1) // connect the soma and dendrite
}
// axon <=> soma <=> dendrite(s)
soma {
L = 30 // um
diam = 30 // um
nseg = 1
insert hh
// Ion Channels
insert fvnag3e // Nav 1.7 channel: endings of pain-sensing nerves
insert nav1p8 // Nav 1.8 channel: slow kinetics
insert nav1p9 // Nav 1.9 channel: preferentially expressed in pain fibers
insert ka // Ka channel: repetitive firing of neurons
insert km // Km channel: excitability of pain fibers
insert kdrs // Kdr channel: many specific K channels, slow
insert kdrf // Kdr channel: many specific K channels, fast
insert emdkna // KNa channel: slow After Hyperpolarization (AHP)
insert h // hyperpolarization-activated cationic channel
}
for i = 0,idend-1 dend {
// L = 100 um
diam = 1.5 // um
nseg = 23
insert pas
g_pas = 0.0002
e_pas = -65
}
axon {
nseg = 250
L = 12500 // um, 12.5cm
diam(0:0.8) = 1:1 // um
diam(0.8:0.84) = 1:0.25 // um
diam(0.84:1) = 0.25:0.25 // um
insert hh
// Ion Channels
insert fvnag3e // Nav 1.7 channel: endings of pain-sensing nerves
insert nav1p8 // Nav 1.8 channel: slow kinetics
insert nav1p9 // Nav 1.9 channel: preferentially expressed in pain fibers
insert ka // Ka channel: repetitive firing of neurons
insert km // Km channel: excitability of pain fibers
insert kdrs // Kdr channel: many specific K channels, slow
insert kdrf // Kdr channel: many specific K channels, fast
insert emdkna // KNa channel: slow After Hyperpolarization (AHP)
insert h // hyperpolarization-activated cationic channel
}
topology() // check branched architecture of model
forall psection() // generate a printoout of the gemoetry and biophysical properties of each section
// simulation control
dt = 0.025
tstop = 100
// stimulation electrode
objref stim
soma stim = new IClamp(0.5)
stim.amp = 10 // amplitude, nA
stim.del = 1 // delay, ms
stim.dur = 0.1 // duration, ms
// graph
x = 0.5
objref g
g = new Graph()
addplot(g, 0)
g.size(0,tstop,-100,100)
g.addvar("soma.v(x)",3,2) // blue
g.addvar("axon.v(x)",2,2) // red
for i = 0,idend-1 {
g.addvar("dend.v(x)",4+i,2) // green
}
run()
A syntax error.
Moderator: tom_morse
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: A syntax error.
First, this discussion area is for questions about models that have been shared by their authors. If your question pertains to a model obtained from some source, what model and what source please?
Also what version of NEURON were you using? (hoc prints that info on the first line when NEURON starts)
That's hard to do, since hoc is an interpreted language, not a compiled language. Was the error message printed by the hoc interpreter?ram1712 wrote:When i compiled the hoc file
Half a clue is better than none, but could you post the entire error message?there was a syntax error on line no 17
Also what version of NEURON were you using? (hoc prints that info on the first line when NEURON starts)
Re: A syntax error.
Sorry for posting in the wrong section.The error seems to be gone now.Like i said since i started learning NEURON a few days ago i might be making a lot of errors.
Anyways Thank you very much for your help
Anyways Thank you very much for your help
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: A syntax error.
Maybe the problem was that you hadn't compiled the mod files (easy to forget when you're first learning), then sometime later you ran mknrndll (or nrnivmodl if you're using Linux), and poof--no more error message.
Re: A syntax error.
YES. i compiled the mod files and the .dll file got created and then when i loaded the .hoc file it works.
Thank you!!!
Thank you!!!
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: A syntax error.
An FYI: if you install a new version of NEURON in the future, you should recompile your mod files because they're likely to be incompatible with the new version.