Hope everything is fine with you.
I'm currently working using different morphological files (hoc files obtained form cell builder) from neurons to analyse the impact of morphology on cell firing.
Each file contains a detailed morphology with similar topology by different length or diameter. Channels are inserted by calling an hoc file (biophysic.hoc). See le init file for the cell1.
Code: Select all
load_file("nrngui.hoc")
objectvar g[20]
ngraph=0
proc addgraph() { local ii // define subroutine to add a new graph
// addgraph("variable", minvalue, maxvalue)
ngraph = ngraph+1
ii = ngraph-1
g[ii] = new Graph()
g[ii].size(0,tstop,$2,$3)
g[ii].xaxis()
g[ii].yaxis()
g[ii].addvar($s1,1,0)
g[ii].save_name("graphList[0].")
graphList[0].append(g[ii])
}
nrnmainmenu() // create main menu
nrncontrolmenu() // create control menu
/* Globals */
tstop=500
dt=0.01
celsius=32
v_init=-65
finitialize(v_init)
load_file("subiter.hoc")
load_file("cell1.hoc")
load_file("biophys.hoc")
load_file("fixnseg.hoc")
load_file("analysis.hoc")
proc celldef() {
topol()
subsets()
geom()
biophys()
geom_nseg()
}
celldef()
addgraph("soma.v(0.5)",-100,30)
run()
analysis ()
/* this proc analyses spiking and write data to a file */
I tried to put en index to the name of the file cell[1] but it did not work :
Code: Select all
for i=1 , 20 {
load_file("cell[i].hoc")
load_file("subiter.hoc")
load_file("biophys.hoc")
load_file("fixnseg.hoc")
load_file ("analysis.hoc")
proc celldef() {
topol()
subsets()
geom()
biophys()
geom_nseg()
}
celldef()
addgraph("soma.v(0.5)",-100,30)
run ()
analysis ()
Fabien