Page 1 of 1

non-uniform distribution of ion channel

Posted: Wed Jul 26, 2023 11:09 am
by cavarretta
Hello,
How do I describe a non uniform distribution of conductance density over a section for a ion channel?
In other words, given a section divided in multiple segment, I assign a specific value of conductance density to each segment.

Re: non-uniform distribution of ion channel

Posted: Wed Jul 26, 2023 9:10 pm
by ted
Exactly the same way you'd access any range variable.

In hoc
secname paramname(x) = somevalue
where
secname is the name of a section
paramname is the name of the range variable you want to access
x is normalized distance from the 0 end of the section to any point inside the segment of interest
and somevalue could even be a function of x, as in
secname for (x,0) paramname(x) = somevalue(x)
(note that this omits the nodes at 0 and 1; do you know why?)

In Python
section(x).paramname = somevalue
or
segment.paramname = somevalue
The latter form is typically used when one iterates over all segments in a section, e.g.

Code: Select all

for seg in secname:
  seg.paramname = somevalue
and of course this omits the nodes at 0 and 1.
If somevalue is a function of range, this would look like

Code: Select all

for seg in secname:
  seg.paramname = somevalue(seg.x)