Built in vs user compiled mechanisms
Posted: Mon Mar 08, 2010 10:42 pm
I'm learning to write my own mechanisms and while attempting to isolate a problem in one I found this apparent paradox. When using Exp2syn my test simulation runs as expected, but when using a self-compiled mechanism (testgaba) it doesn't. The self-compiled mechanism is Exp2syn copy and pasted, with just the the name of the mechanism changed (the POINT_PROCESS line of the NEURON block). No error occurs but the simulation runs as if the mechanism is not there. The test simulation also uses another self compiled mechanism (myleak) which works in both cases. I am running Neuron 7.1 on Mac OSX 10.6.2.
I don't understand why one would work and the other wouldn't. Is there some intrinsic difference between built in and user compiled mechanisms?
Thanks in advance.
This is the .hoc code I am using:
create soma
access soma
objref gaba,presyn,input
soma {
soma.nseg = 1
soma.diam = 100 // micrometer
soma.L = 100 // micrometer
soma.Ra = 120 // ohm-cm
soma.cm = .01 // uF/cm2
// toggle between testgaba and Exp2Syn
gaba = new testgaba(0.5)
//gaba = new Exp2Syn(0.5)
gaba.tau1 = 5.6
gaba.tau2 = 0.285
gaba.e = -95
insert myleak
e_myleak = -70
g_myleak = .000001
}
presyn = new NetStim(0.5)
presyn.interval = 10 // ms
presyn.number = 2
presyn.start = 20 // ms
presyn.noise = 0
access soma
input = new NetCon(presyn, gaba)
input.weight = 1000
input.threshold = 1
input.delay = 0
tstop= 300
// graphing code (taken from .ses file after using gui)
objectvar save_window_, rvp_
objectvar scene_vector_[3]
objectvar ocbox_, ocbox_list_, scene_, scene_list_
{ocbox_list_ = new List() scene_list_ = new List()}
{pwman_place(0,0,0)}
{
save_window_ = new Graph(0)
save_window_.size(0,300,-120,40)
scene_vector_[2] = save_window_
{save_window_.view(0, -120, 300, 120, 28, 135, 300, 200)}
graphList[0].append(save_window_)
save_window_.save_name("graphList[0].")
save_window_.addexpr("v(.5)", 1, 1, 0.8, 0.9, 2)
}
objectvar scene_vector_[1]
{doNotify()}
run()
I don't understand why one would work and the other wouldn't. Is there some intrinsic difference between built in and user compiled mechanisms?
Thanks in advance.
This is the .hoc code I am using:
create soma
access soma
objref gaba,presyn,input
soma {
soma.nseg = 1
soma.diam = 100 // micrometer
soma.L = 100 // micrometer
soma.Ra = 120 // ohm-cm
soma.cm = .01 // uF/cm2
// toggle between testgaba and Exp2Syn
gaba = new testgaba(0.5)
//gaba = new Exp2Syn(0.5)
gaba.tau1 = 5.6
gaba.tau2 = 0.285
gaba.e = -95
insert myleak
e_myleak = -70
g_myleak = .000001
}
presyn = new NetStim(0.5)
presyn.interval = 10 // ms
presyn.number = 2
presyn.start = 20 // ms
presyn.noise = 0
access soma
input = new NetCon(presyn, gaba)
input.weight = 1000
input.threshold = 1
input.delay = 0
tstop= 300
// graphing code (taken from .ses file after using gui)
objectvar save_window_, rvp_
objectvar scene_vector_[3]
objectvar ocbox_, ocbox_list_, scene_, scene_list_
{ocbox_list_ = new List() scene_list_ = new List()}
{pwman_place(0,0,0)}
{
save_window_ = new Graph(0)
save_window_.size(0,300,-120,40)
scene_vector_[2] = save_window_
{save_window_.view(0, -120, 300, 120, 28, 135, 300, 200)}
graphList[0].append(save_window_)
save_window_.save_name("graphList[0].")
save_window_.addexpr("v(.5)", 1, 1, 0.8, 0.9, 2)
}
objectvar scene_vector_[1]
{doNotify()}
run()