Help in understanding the terms in a code

The basics of how to develop, test, and use models.
Post Reply
ram1712
Posts: 12
Joined: Thu Nov 07, 2013 8:25 am

Help in understanding the terms in a code

Post by ram1712 »

Hi,
I have this reference programme . The final section is a code which plots a voltage graph for soma,axon dendrite in a C-fibre

// 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
}


If possible can somebody please explain me this part of the code

i.e 1)what is the use of function addvar,size, addplot ??
2) what are the numbers (3,2), (2,2) used to plot soma and axon respectively??


The entire code for reference:-

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()
oren
Posts: 55
Joined: Fri Mar 22, 2013 1:03 am

Re: Help in understanding the terms in a code

Post by oren »

Hello ram,

g = new Graph() // create a new graph ( like figure in matlab)
addplot(g, 0) // add the graph to the graphList[0] so it will be updated each run.
g.size(0,tstop,-100,100) // sets the axis limits .size(xstart, xstop, ystart, ystop)

g.addvar("soma.v(x)",3,2) // (.., color_index, brush_index) test and see what colors you get as it says in the comments blue :-)


you can read more about graphs in here:
http://www.neuron.yale.edu/neuron/stati ... graph.html

and on other commands in here:
http://www.neuron.yale.edu/neuron/stati ... rence.html
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Help in understanding the terms in a code

Post by ted »

Thanks, oren! Right on target.
ram1712
Posts: 12
Joined: Thu Nov 07, 2013 8:25 am

Re: Help in understanding the terms in a code

Post by ram1712 »

Thanks Oren
Post Reply