Hi,
I have two questions about CB:
- I create a channel and everything works fine with it: I can insert it into my compartment and it behaves as expected. But then, if I close the CB window, how can I edit the channel model again? If I call the CB, another session is started as if I'm creating a new channel. Am I doing something wrong?
- Is it possible to export a channel definition made in CB into a NMODL .mod file? What about viceversa?
Thanks
two questions about channel builder
-
- Site Admin
- Posts: 6395
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: two questions about channel builder
These are good questions.
properties of specific instances of one or more classes (to see which ones, save the
ChannelBuilder to a session file and then examine the contents of that session file).
"Closing" a ChannelBuilder throws away that interface, so you can no longer adjust
the channel's properties or save it to a session file for future use. The objects that it
managed may still exist; if so, you may be able to start a new ChannelBuilder and use
its "Copy gates from" function to configure this new ChannelBuilder's objects to have
the same properties. However, the new ChannelBuilder will have no effect on the
objects left over from the first, now destroyed, ChannelBuilder.
If you simply want to reclaim space on your computer screen, use the ChannelBuilder's
"Hide" button, which will not destory it; you will be able to map it to the screen again by
clicking on NEURON Main Menu / Window, then selecting its name from the list of
windows (the hidden ones are those that do not have a red check next to them).
execute faster than compiled NMODL code. Instead of fiddling around with mod
files that you have to recompile every time there's a new version of NEURON,
save each of your configured ChannelBuilders to its own ses file, and use load_file()
to retrieve them as needed.
You are doing something wrong. A ChannelBuilder is a graphical tool for managing the- I create a channel and everything works fine with it: I can insert it into my compartment and it behaves as expected. But then, if I close the CB window, how can I edit the channel model again? If I call the CB, another session is started as if I'm creating a new channel. Am I doing something wrong?
properties of specific instances of one or more classes (to see which ones, save the
ChannelBuilder to a session file and then examine the contents of that session file).
"Closing" a ChannelBuilder throws away that interface, so you can no longer adjust
the channel's properties or save it to a session file for future use. The objects that it
managed may still exist; if so, you may be able to start a new ChannelBuilder and use
its "Copy gates from" function to configure this new ChannelBuilder's objects to have
the same properties. However, the new ChannelBuilder will have no effect on the
objects left over from the first, now destroyed, ChannelBuilder.
If you simply want to reclaim space on your computer screen, use the ChannelBuilder's
"Hide" button, which will not destory it; you will be able to map it to the screen again by
clicking on NEURON Main Menu / Window, then selecting its name from the list of
windows (the hidden ones are those that do not have a red check next to them).
No, but why would you want to? Mechanisms implemented with the ChannelBuilder- Is it possible to export a channel definition made in CB into a NMODL .mod file?
execute faster than compiled NMODL code. Instead of fiddling around with mod
files that you have to recompile every time there's a new version of NEURON,
save each of your configured ChannelBuilders to its own ses file, and use load_file()
to retrieve them as needed.
No.What about viceversa?
Hi ted,
I've been playing around with the channel builder and a model I want to build. (this is my first day of playing woth neuron doing my own things)
I found that selecting Neuron Main Menu > Build > Channel Builder > Import KSChan > my channel name, brings up a Channel Builder window with my channel properties without adding a new object (I did the "Copy Gates from" thing and it does create a new object). I appears that this is a way to edit the already existing Channel model, isn't it?
Indeed, what I actually did was:
- Create a channel model with CB (and play around with it)
- Save it as an .hoc file.
- Close neuron
- Open neuron again (clean session)
- read the .hoc file. No Channel Builder window opened but my channel object was available for inserting in a compartment.
- did the Neuron Main Menu > Build ...> my channel name thing, and there it was: the Channel Builder letting me edit an already existing model.
Did I (or you) miss something?
Regards.[/i]
I've been playing around with the channel builder and a model I want to build. (this is my first day of playing woth neuron doing my own things)
I found that selecting Neuron Main Menu > Build > Channel Builder > Import KSChan > my channel name, brings up a Channel Builder window with my channel properties without adding a new object (I did the "Copy Gates from" thing and it does create a new object). I appears that this is a way to edit the already existing Channel model, isn't it?
Indeed, what I actually did was:
- Create a channel model with CB (and play around with it)
- Save it as an .hoc file.
- Close neuron
- Open neuron again (clean session)
- read the .hoc file. No Channel Builder window opened but my channel object was available for inserting in a compartment.
- did the Neuron Main Menu > Build ...> my channel name thing, and there it was: the Channel Builder letting me edit an already existing model.
Did I (or you) miss something?
Regards.[/i]
-
- Site Admin
- Posts: 6395
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
I learn something new every day.
NEURON Main Menu / Build / Channel Builder / Import KSChan
does indeed offer a list of "uncontrolled" KSChans (i.e. KSChans that are
not already managed by a ChannelBuilder GUI tool.
But I wonder if there are any side-effects to be concerned about.
To find out, I saved a mechanism called foo to a hoc file (using a ChannelBuilder's
Properties / Clone channel type / Hoc file for KSChan
), then exited NEURON and restarted it, loading that hoc file.
allobjects()
returned a list that included the following:
KSChan[0] with 1 refs
KSGate[0] with 1 refs
KSGate[1] with 1 refs
KSState[0] with 1 refs
KSState[1] with 1 refs
KSTrans[0] with 1 refs
KSTrans[1] with 1 refs
Then I imported foo into a new Channel Builder using
NEURON Main Menu / Build / Channel Builder / Import KSChan
Now
allobjects()
returned a list that includes
KSChan[0] with 3 refs
KSGate[2] with 2 refs
KSGate[3] with 2 refs
KSState[2] with 2 refs
KSState[3] with 2 refs
KSTrans[2] with 4 refs
KSTrans[3] with 4 refs
and a lot of other objects that apparently are related to the ChannelBuilder GUI itself.
Notice that only the original KSChan object persists; the KSGate, KSState, and KSTrans
objects are all new, and the original ones are gone. Those are all "helper" classes for
the KSChan class, and they can be destroyed and recreated by the latter.
So sure enough, there are side-effects. Specifically, if you're dealing with hoc code
that contains statements that reference any of the helper objects of an "uncontrolled"
KSChan, it will break if you import that KSChan into a ChannelBuilder. This isn't likely
to cause a problem for 99.999% of NEURON users, but as sure as you're born,
somebody ace hoc programmer is going to cook up a model implementation that
founders on exactly these shoals.
NEURON Main Menu / Build / Channel Builder / Import KSChan
does indeed offer a list of "uncontrolled" KSChans (i.e. KSChans that are
not already managed by a ChannelBuilder GUI tool.
But I wonder if there are any side-effects to be concerned about.
To find out, I saved a mechanism called foo to a hoc file (using a ChannelBuilder's
Properties / Clone channel type / Hoc file for KSChan
), then exited NEURON and restarted it, loading that hoc file.
allobjects()
returned a list that included the following:
KSChan[0] with 1 refs
KSGate[0] with 1 refs
KSGate[1] with 1 refs
KSState[0] with 1 refs
KSState[1] with 1 refs
KSTrans[0] with 1 refs
KSTrans[1] with 1 refs
Then I imported foo into a new Channel Builder using
NEURON Main Menu / Build / Channel Builder / Import KSChan
Now
allobjects()
returned a list that includes
KSChan[0] with 3 refs
KSGate[2] with 2 refs
KSGate[3] with 2 refs
KSState[2] with 2 refs
KSState[3] with 2 refs
KSTrans[2] with 4 refs
KSTrans[3] with 4 refs
and a lot of other objects that apparently are related to the ChannelBuilder GUI itself.
Notice that only the original KSChan object persists; the KSGate, KSState, and KSTrans
objects are all new, and the original ones are gone. Those are all "helper" classes for
the KSChan class, and they can be destroyed and recreated by the latter.
So sure enough, there are side-effects. Specifically, if you're dealing with hoc code
that contains statements that reference any of the helper objects of an "uncontrolled"
KSChan, it will break if you import that KSChan into a ChannelBuilder. This isn't likely
to cause a problem for 99.999% of NEURON users, but as sure as you're born,
somebody ace hoc programmer is going to cook up a model implementation that
founders on exactly these shoals.