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

Ngang = 4

create Ssoma[Ngang], Sax[Ngang]

Ssomadiam = 20
SsomaL = 20
Saxdiam = 7
SaxL = 6000
seglen = 5
for i = 1,Ngang-1 { 
Ssoma[i]	{
	diam = Ssomadiam
	L = SsomaL
	nseg = 1
	insert hh2
	Ra = 100
	}

Sax[i]	{
	diam = Saxdiam
	L = SaxL
	nseg = L/seglen
	insert hh2
	Ra = 100
	}

connect Ssoma[i](1), Sax[i](0.5)

if (i>=2) connect Sax[i](0), Sax[i-1](1)
}
celsius = 12
global_ra = 100
access Ssoma[1]


//Begin PointProcessGroupManager
{
load_file("pointgrp.hoc")
}
{
ocbox_ = new PointProcessGroupManager(0)
}
{object_push(ocbox_)}
{
ms = new MechanismStandard("AlphaSynapse")
ms.set("onset", 0, 0)
ms.set("tau", 0.1, 0)
ms.set("gmax", 0.3, 0)
ms.set("e", 0, 0)
mnews("AlphaSynapse", ms)
select(0)
execute("Ssoma[2] ocbox_.move(0)")
ms = new MechanismStandard("AlphaSynapse")
ms.set("onset", 15, 0)
ms.set("tau", 0.1, 0)
ms.set("gmax", 0.15, 0)
ms.set("e", 0, 0)
mnews("AlphaSynapse", ms)
select(1)
execute("Ssoma[1] ocbox_.move(0.5)")
ms = new MechanismStandard("AlphaSynapse")
ms.set("onset", 14, 0)
ms.set("tau", 0.1, 0)
ms.set("gmax", 0.15, 0)
ms.set("e", 0, 0)
mnews("AlphaSynapse", ms)
select(2)
execute("Ssoma[3] ocbox_.move(0)")
}
{object_pop() doNotify()}
{
ocbox_ = ocbox_.v1
ocbox_.map("PointProcessGroupManager", 358, 340, 545.4, 292.5)
}
objref ocbox_
//End PointProcessGroupManager

{
xpanel("RunControl", 0)
v_init = -63
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 = 1
xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 )
xbutton("Single Step","steprun()")
t = 30.975
xvalue("t","t", 2 )
tstop = 50
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 )
xcheckbox("Quiet",&stdrun_quiet,"")
realtime = 38
xvalue("Real Time","realtime", 0,"", 0, 1 )
xpanel(3,105)
}
{
save_window_ = new Graph(0)
save_window_.size(0,50,-80,40)
scene_vector_[3] = save_window_
{save_window_.view(0, -80, 50, 120, 366, 0, 627.3, 200.8)}
graphList[0].append(save_window_)
save_window_.save_name("graphList[0].")
save_window_.addvar("Ssoma[1].v( 0.5 )", 3, 1, 0.798565, 1.02998, 2)
save_window_.addvar("Ssoma[2].v( 0.5 )", 2, 1, 0.798565, 0.855179, 2)
save_window_.addvar("Ssoma[3].v( 0.5 )", 6, 1, 0.801435, 0.832769, 2)
}
objectvar scene_vector_[1]
{doNotify()}