using stochastic channel in hoc

NMODL and the Channel Builder.
Post Reply
Amberuk

using stochastic channel in hoc

Post by Amberuk »

Hi

I have created a stochastic channel using the channel builder tutorial. I have it saved as a session file. I tried loading the session file at the beggining of my code and then trying to insert the channel, which I believe I should treat as a point process, like I would an IClamp, but get a syntax error. The tutorial only shows how to insert channels using the point process manager in the interface, but I have over 1000 sections in which I need the channels, so would only be possible using hoc. Can you please let me know how I can insert these channels using hoc.

Many Thanks
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: using stochastic channel in hoc

Post by ted »

Each segment of every section that has the stochastic mechanism must have its own instance of the point process. That's easy to do. If every section in your model is supposed to have the stochastic mechanism, then

Code: Select all

objref smlist // will be a List that contains all instances of the stochastic mechanism
smlist = new List()
// change SMechName to the name of your stochastic mechanism
forall for (x,0) smlist.append(new SMechName(x))
You must also make sure that each instance gets the "correct" number of channels. The correct number will be the product
segment_area * channel_density
If channel_density is in (number of channels/square micron) then you can just do

Code: Select all

ii = 0
forall for (x,0) {
  smlist.o(ii).Nsingle = area(x)*channel_density
  ii += 1
}
If only a subset of sections is supposed to have the stochastic mechanism, then the first step is to create a SectionList and append all the appropriate sections to it. Then instead of forall, which iterates over all sections in your model, substitute
forsec slname
where slname is the name of your SectionList.

Be sure to read the Programmer's Reference entries about forall, for (x,0), area(), List, and SectionList.
Amberuk

Re: using stochastic channel in hoc

Post by Amberuk »

Thanks
It wasn't working when I tried to add the point process before connecting the sections but seemed to work afterwards.
Post Reply