random alpha synapse
Posted: Tue Jun 03, 2008 7:54 pm
I have created a spiny model that I simulate with the following sesion file:
{load_file("nrngui.hoc")}
objectvar save_window_, rvp_
objectvar scene_vector_[5]
objectvar ocbox_, ocbox_list_, scene_, scene_list_
{ocbox_list_ = new List() scene_list_ = new List()}
//Begin PointProcessManager
{
load_file("pointman.hoc")
}
{
sp[591] ocbox_ = new PointProcessManager(0)
}
{object_push(ocbox_)}
{
mt.select("IClamp") i = mt.selected()
ms = new MechanismStandard("IClamp")
ms.set("del", 10, 0)
ms.set("dur", 250, 0)
ms.set("amp", -0.021, 0)
mt.select("AlphaSynapse") i = mt.selected()
ms = new MechanismStandard("AlphaSynapse")
ms.set("onset", 0, 0)
ms.set("tau", 0.1, 0)
ms.set("gmax", 0.01, 0)
ms.set("e", 0, 0)
mt.select("IClamp") i = mt.selected() maction(i)
hoc_ac_ = 1
sec.sec move() d1.flip_to(0)
}
{object_pop() doNotify()}
{
ocbox_ = ocbox_.v1
ocbox_.map("PointProcessManager", 310, 130, 229.5, 433.8)
}
objref ocbox_
//End PointProcessManager
{
save_window_ = new PlotShape(0)
save_window_.size(-122.487,132.487,-127.487,127.487)
save_window_.variable("v")
scene_vector_[2] = save_window_
{save_window_.view(-122.487, -127.487, 254.974, 254.974, 465, 159, 200.7, 200.8)}
fast_flush_list.append(save_window_)
save_window_.save_name("fast_flush_list.")
}
{
xpanel("RunControl", 0)
v_init = -70
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 = 300
xvalue("t","t", 2 )
tstop = 300
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 = 52.89
xvalue("Real Time","realtime", 0,"", 0, 1 )
xpanel(44,210)
}
{
save_window_ = new Graph(0)
save_window_.size(0,300,-79.3,-70)
scene_vector_[4] = save_window_
{save_window_.view(0, -79.3, 300, 9.3, 714, 186, 300.6, 200.8)}
graphList[0].append(save_window_)
save_window_.save_name("graphList[0].")
save_window_.addexpr("v(.5)", 2, 1, 0.8, 0.9, 2)
}
objectvar scene_vector_[1]
{doNotify()}
I would like to randomize spatially (at different section and section segments), temporally (at different times in a defined interval) and different maximum conductance for at least 500 hundred alpha synapse point processes. I understand I should use a handler to loop through simulations and that by generating dummy variables with the Random() command I could change the onset and gmax on the alpha synapse point process, but how can I randomly change the section or section segment?
{load_file("nrngui.hoc")}
objectvar save_window_, rvp_
objectvar scene_vector_[5]
objectvar ocbox_, ocbox_list_, scene_, scene_list_
{ocbox_list_ = new List() scene_list_ = new List()}
//Begin PointProcessManager
{
load_file("pointman.hoc")
}
{
sp[591] ocbox_ = new PointProcessManager(0)
}
{object_push(ocbox_)}
{
mt.select("IClamp") i = mt.selected()
ms = new MechanismStandard("IClamp")
ms.set("del", 10, 0)
ms.set("dur", 250, 0)
ms.set("amp", -0.021, 0)
mt.select("AlphaSynapse") i = mt.selected()
ms = new MechanismStandard("AlphaSynapse")
ms.set("onset", 0, 0)
ms.set("tau", 0.1, 0)
ms.set("gmax", 0.01, 0)
ms.set("e", 0, 0)
mt.select("IClamp") i = mt.selected() maction(i)
hoc_ac_ = 1
sec.sec move() d1.flip_to(0)
}
{object_pop() doNotify()}
{
ocbox_ = ocbox_.v1
ocbox_.map("PointProcessManager", 310, 130, 229.5, 433.8)
}
objref ocbox_
//End PointProcessManager
{
save_window_ = new PlotShape(0)
save_window_.size(-122.487,132.487,-127.487,127.487)
save_window_.variable("v")
scene_vector_[2] = save_window_
{save_window_.view(-122.487, -127.487, 254.974, 254.974, 465, 159, 200.7, 200.8)}
fast_flush_list.append(save_window_)
save_window_.save_name("fast_flush_list.")
}
{
xpanel("RunControl", 0)
v_init = -70
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 = 300
xvalue("t","t", 2 )
tstop = 300
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 = 52.89
xvalue("Real Time","realtime", 0,"", 0, 1 )
xpanel(44,210)
}
{
save_window_ = new Graph(0)
save_window_.size(0,300,-79.3,-70)
scene_vector_[4] = save_window_
{save_window_.view(0, -79.3, 300, 9.3, 714, 186, 300.6, 200.8)}
graphList[0].append(save_window_)
save_window_.save_name("graphList[0].")
save_window_.addexpr("v(.5)", 2, 1, 0.8, 0.9, 2)
}
objectvar scene_vector_[1]
{doNotify()}
I would like to randomize spatially (at different section and section segments), temporally (at different times in a defined interval) and different maximum conductance for at least 500 hundred alpha synapse point processes. I understand I should use a handler to loop through simulations and that by generating dummy variables with the Random() command I could change the onset and gmax on the alpha synapse point process, but how can I randomly change the section or section segment?