{load_file("nrngui.hoc")}
objectvar save_window_, rvp_
objectvar scene_vector_[9]
objectvar ocbox_, ocbox_list_, scene_, scene_list_
{ocbox_list_ = new List()  scene_list_ = new List()}
{pwman_place(0,0,0)}

//Begin CellBuild[0]
{
load_file("celbild.hoc", "CellBuild")
}
{ocbox_ = new CellBuild(1)}
{object_push(ocbox_)}
{
version(5.7)
continuous = 1
}
{object_push(topol)}
{
first = 0
slist.remove_all()
sname = "dend"
objref tobj
}
{
tobj = new CellBuildSection("dend",0, 0, tobj, 0) slist.append(tobj)
  tobj.position(-156.275,17.5169,-105,-30) tobj.lx=-130.637 tobj.ly=-6.24155 tobj.i3d=0
tobj = new CellBuildSection("dend",1, 0, tobj, 1) slist.append(tobj)
tobj.parent=slist.object(0)
  tobj.position(-105,-30,45,-30) tobj.lx=-30 tobj.ly=-30 tobj.i3d=0
tobj = new CellBuildSection("dend",2, 0, tobj, 1) slist.append(tobj)
tobj.parent=slist.object(1)
  tobj.position(45,-30,105,15) tobj.lx=75 tobj.ly=-7.5 tobj.i3d=0
all_init()
}
for i=0, slist.count-1 {slist.object(i).rdses()}
{object_pop()}
{
}
{object_push(subsets)}
{first = 0}
{ tobj = snlist.object(0)}
{consist()}
{object_pop()}
{
}
{object_push(geom)}
{
first = 0
tobj = new GeoSpec(3)
tobj.value = 1
bild.subsets.snlist.object(0).geo.append(tobj)
tobj = new GeoSpec(7)
tobj.value = 0.1
bild.subsets.snlist.object(0).geo.append(tobj)
tobj = new GeoSpec(0, bild.subsets.snlist.object(0))
for i=0, 2 {tobj.snlist.list.object(i).ldiaminfo.x[0] = fscan()}}
100
1
100
{
bild.subsets.snlist.object(0).geo.append(tobj)
set_default()
}
{object_pop()}
{
}
{object_push(memb)}
{first=0}
{
tobj = new FakeMechStan(0)
tobj.value = 35.4
tobj.set_default()
tobj = new MStanWrap(tobj, 0)
bild.subsets.snlist.object(0).ml.append(tobj)
}
{
tobj = new FakeMechStan(1)
tobj.value = 1
tobj.set_default()
tobj = new MStanWrap(tobj, 0)
bild.subsets.snlist.object(0).ml.append(tobj)
}
{
tobj = new MechanismStandard("pas")
tobj.set("g_pas", 0.001, 0)
tobj.set("e_pas", -70, 0)
tobj = new MStanWrap(tobj, 1)
bild.subsets.snlist.object(0).ml.append(tobj)
}
{
tobj = new MechanismStandard("hh")
tobj.set("gnabar_hh", 0.12, 0)
tobj.set("gkbar_hh", 0.036, 0)
tobj.set("gl_hh", 0.0003, 0)
tobj.set("el_hh", -54.3, 0)
tobj = new MStanWrap(tobj, 1)
bild.subsets.snlist.object(0).ml.append(tobj)
}
{
tobj = new MechanismStandard("extracellular")
tobj.set("xraxial", 1e+09, 0)
tobj.set("xraxial", 1e+09, 1)
tobj.set("xg", 0, 0)
tobj.set("xg", 1e+09, 1)
tobj.set("xc", 0, 0)
tobj.set("xc", 0, 1)
tobj.set("e_extracellular", 0, 0)
tobj = new MStanWrap(tobj, 1)
bild.topol.slist.object(1).ml.append(tobj)
}
{object_pop()}
{
}
{object_push(manage)}
{
first = 0
classname = "Cell"
etop=1 esub=1 egeom=1 emem=1
itop=1 isub=0 igeom=0 imem=0
bild.topol.names_off = 0
bild.topol.circles_off = 0
output_index = 0  output_x = 1
thresh = 10
}
{object_pop()}
{
cexport()
}
{object_pop()}
{
save_window_=ocbox_.gtopol
save_window_.size(-200,200,-150,150)
scene_vector_[2] = save_window_
ocbox_.gtopol = save_window_
save_window_.save_name("ocbox_.gtopol")
}
{
ocbox_.map("CellBuild[0]", 0, 840, 723.6, 477.9)
}
objref ocbox_
//End CellBuild[0]


//Begin PointProcessManager
{
load_file("pointman.hoc")
}
{
dend[0] ocbox_ = new PointProcessManager(0)
}
{object_push(ocbox_)}
{
mt.select("IClamp") i = mt.selected()
ms[i] = new MechanismStandard("IClamp")
ms[i].set("del", 10, 0)
ms[i].set("dur", 100, 0)
ms[i].set("amp", 0.55, 0)
mt.select("Ifluct1") i = mt.selected()
ms[i] = new MechanismStandard("Ifluct1")
ms[i].set("m", 0.15, 0)
ms[i].set("s", 0.011, 0)
ms[i].set("tau", 2, 0)
mt.select("Ifluct1") i = mt.selected() maction(i)
hoc_ac_ = 0
sec.sec move() d1.flip_to(0)
}
{object_pop() doNotify()}
{
ocbox_ = ocbox_.v1
ocbox_.map("PointProcessManager", 384, 840, 236.7, 449.1)
}
objref ocbox_
//End PointProcessManager


//Begin PointProcessManager
{
load_file("pointman.hoc")
}
{
dend[0] ocbox_ = new PointProcessManager(0)
}
{object_push(ocbox_)}
{
mt.select("IClamp") i = mt.selected()
ms[i] = new MechanismStandard("IClamp")
ms[i].set("del", 0, 0)
ms[i].set("dur", 5, 0)
ms[i].set("amp", -0.2, 0)
mt.select("IClamp") i = mt.selected() maction(i)
hoc_ac_ = 0.5
sec.sec move() d1.flip_to(0)
}
{object_pop() doNotify()}
{
ocbox_ = ocbox_.v1
ocbox_.map("PointProcessManager", 192, 840, 236.7, 483.3)
}
objref ocbox_
//End PointProcessManager

{
save_window_ = new Graph(0)
save_window_.size(0,2000,-80,40)
scene_vector_[5] = save_window_
{save_window_.view(0, -80, 2000, 120, 384, 132, 617.4, 200.8)}
graphList[0].append(save_window_)
save_window_.save_name("graphList[0].")
save_window_.addexpr("dend[0].v( 0.5 )", 2, 1, 0.8, 0.9, 2)
save_window_.addexpr("dend[1].v( 0.5 )", 3, 1, 0.8, 0.9, 2)
save_window_.addexpr("dend[2].v( 0.5 )", 1, 1, 0.8, 0.9, 2)
}
{
xpanel("RunControl", 0)
v_init = -65
xvalue("Init","v_init", 1,"stdinit()", 1, 1 )
xbutton("Init & Run","run()")
xbutton("Stop","stoprun=1")
runStopAt = 5
xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 )
runStopIn = 1000
xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 )
xbutton("Single Step","steprun()")
t = 2000
xvalue("t","t", 2 )
tstop = 2000
xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 )
dt = 0.025
xvalue("dt","dt", 1,"setdt()", 0, 1 )
steps_per_ms = 40
xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 )
screen_update_invl = 0.05
xvalue("Scrn update invl","screen_update_invl", 1,"", 0, 1 )
realtime = 40.01
xvalue("Real Time","realtime", 0,"", 0, 1 )
xpanel(6,120)
}

//Begin LinearCircuit[0]
{
load_file("lincir.hoc", "LinearCircuit")
}
{
ocbox_ = new LinearCircuit(1)
}
{object_push(ocbox_)}
{mkelm(8, 40, 125, 1.5, -1.5708)}
{mklabel(0, "dend[1](0.5)", 8.9559, 25.17)}
{sel.extra_info.set("dend[1]", 0.5) sel.extra_info.name(sel)}
{mkelm(5, 80, 50, 2, 0)}
{mkelm(1, 80, 90, 2, 1.5708)}
5000
{mklabel(0, "Rseal", -16.8946, -7.1491)}
{mkelm(0, 80, 125, 1.5, -1.5708)}
{mkelm(1, 135, 110, 1.5, 0)}
1000
{mklabel(0, "Rsp", -3.467, -15.7445)}
{mklabel(2, "VV", 15, 15)}
{mkelm(2, 170, 110, 2, 0)}
0.021
{mklabel(0, "Ce", -9.575, -16.5049)}
{mklabel(2, "Vout", 57.1, 13.907)}
{mkelm(1, 230, 90, 2, -1.5708)}
1000
{mklabel(0, "R8", 10.721, -13.9919)}
{mkelm(5, 230, 50, 2, 0)}
{mkelm(2, 270, 90, 2, -1.5708)}
0.01
{mklabel(0, "C10", 14.819, -16.2728)}
{mkelm(5, 270, 50, 2, 0)}
{mkelm(0, 250, 110, 2, 0)}
{mkelm(1, 210, 110, 2, 0)}
1e-06
{mklabel(0, "Rm", -7.758, -14.2239)}
{mkelm(0, 100, 110, 2, 0)}
{mkelm(0, 60, 140, 2, 0)}
{mkelm(1, 40, 95, 1.5, 1.5708)}
0.0001
{mklabel(0, "R17", 15, 15)}
{mkelm(5, 40, 60, 2, 0)}
{parasitic_ = 0  noconsist_ = 0}
{graphlist.append(new LincirGraph(this, 1))}
1
Vout (mV)
1 1 0.8 0.9 2
0 2000 -21 9 // graph size
384 474 646.2 431.1 // box size
// end info
{g.exec_menu("Simulate")  tool(2)}
{sel = nil}
{object_pop()}
{
{
save_window_=ocbox_.g
save_window_.size(0,300,0,200)
scene_vector_[6] = save_window_
ocbox_.g = save_window_
save_window_.save_name("ocbox_.g")
save_window_.label(48.9559, 150.17, "dend[1](0.5)", 1, 1, 0.5, 0.5, 1)
save_window_.label(63.1054, 82.8509, "Rseal", 1, 1, 0.5, 0.5, 1)
save_window_.label(131.533, 94.2555, "Rsp", 1, 1, 0.5, 0.5, 1)
save_window_.label(165, 125, "VV", 1, 1, 0.5, 0.5, 1)
save_window_.label(160.425, 93.4951, "Ce", 1, 1, 0.5, 0.5, 1)
save_window_.label(247.1, 123.907, "Vout", 1, 1, 0.5, 0.5, 1)
save_window_.label(240.721, 76.0081, "R8", 1, 1, 0.5, 0.5, 1)
save_window_.label(284.819, 73.7272, "C10", 1, 1, 0.5, 0.5, 1)
save_window_.label(202.242, 95.7761, "Rm", 1, 1, 0.5, 0.5, 1)
save_window_.label(55, 110, "R17", 1, 1, 0.5, 0.5, 1)
}
ocbox_.map("LinearCircuit[0]", 476, -5, 440.1, 480.6)
}
objref ocbox_
//End LinearCircuit[0]

objectvar scene_vector_[1]
{doNotify()}