Channel Builder Ion Permeability Ratios

NMODL and the Channel Builder.
Post Reply
RBJ
Posts: 62
Joined: Sun Aug 02, 2015 4:28 am
Location: UK
Contact:

Channel Builder Ion Permeability Ratios

Post by RBJ »

Hello, I have been getting on pretty well with the channel builder for stoichiometric ion channel behaviour. I was finding this far more intuitive (easier!) than my previous *.mod schemas. Works well with the tutorial HH channels and my own simple Ca channel I built as a test.
However, our work these days focusses largely on TRP channels which have various mixed permeabilities to cations. Is there a way of using the GUI Channel Builder to read a mixed permeability channel.
I've exported the various channels to SES and HOC files and can re-import these, but they seem to like either na, k, ca or leak. Is there a way to deal with this and still use channel builder? If the coupling of 2 or more (different) channel openings could be coupled, of course you could do it by simply having a single TRP channel modelled as a ca, na and k channel opening together. . . but the might even be a more difficult way to approach the issue.
Kindest Regards
Richard
(I just moved this over from the GUI Theme, this seems a more appropriate spot)
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Channel Builder Ion Permeability Ratios

Post by ted »

RBJ wrote:Is there a way of using the GUI Channel Builder to read a mixed permeability channel.
Read? You mean "implement" rather than "read"?
they seem to like either na, k, ca or leak. Is there a way to deal with this and still use channel builder?
Properties / Selective for ion...
It pays to poke around the tool a bit and see what else it offers.

If you need a mechanism that is permeable to more than one species, do one first, then clone it and change the clone's selectivity.
RBJ
Posts: 62
Joined: Sun Aug 02, 2015 4:28 am
Location: UK
Contact:

Re: Channel Builder Ion Permeability Ratios

Post by RBJ »

Thank you for the speed of your reply Ted.
Yes indeed, I am aiming to "implement" a stoichiometric single channel in the channel builder with a mixed permeability for Na, K and Ca. Permeability ratio, for example 1:1:6. Naturally I have I have poked around quite a lot, including thing this: If I clone and change properties within the GUI, I get a channel cloned in transition rates etc, but behaving independently of the original channel. So the Ca bit opens at one instant and the na at another. (A non "allow single channel" mechanism, with permeability to more than one ion is no problem of course.)
I had also tried cloning to a HOC and trying to alter that. The string ks.ion however, only seems to read one ion and even if it read two ions I am not sure how to code a permeability ratio?

Regards
Richard
Last edited by RBJ on Mon Aug 29, 2016 8:30 am, edited 1 time in total.
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Channel Builder Ion Permeability Ratios

Post by ted »

Is there direct experimental evidence that the channel in question has a nonlinear current-voltage relationship, i.e. genuinely requires the GHK formulation? If no, then I'd be tempted to call it "linear", and that would allow the whole thing to be represented by a single Channel Builder selective for ionic species eq with valence 1 that has conductance (8/6)*gca and reversal potential eeq = (ena + ek +6*eca)/8.

Since you need stochastic gating, this mechanism will be a point process, and you'll need to create a separate instance of this mechanism to each compartment (segment) that needs it

Usage:

Organize your code so that the channel builder's ses file is loaded _before_ you start attaching this point process to the desired segments.
You may find it most convenient to scale the peak conductance of each instance (i.e. make it proportional to compartment surface area) right after you attach it to its respective segment.
This would also be a good point at which to specify the value of eeq(x) (equivalent equilibrium potential).

Example: suppose soma has 3 segments, and you want each segment to have an instance of this mechanism. For this example, I have given the mechanism the ugly name Eqchan. It is assumed that the soma has already been created and its nseg value set, and that the channel's ses file has been read.

Code: Select all

objref eqlist // will hold all instances of Eqchan
objref tobj
eqlist = new List()
soma for (x,0) {
  tobj = new Eqchan(x)
  tobj.gmax = up_to_you
  eqlist.append(tobj)
  eeq(x) = whatever_you_decide
}
objref tobj // so it no longer points to an Eqchan instance
Let me know if this is a satisfactory way for you to proceed, or if you really must have a mechanism best described in terms of permeability.
RBJ
Posts: 62
Joined: Sun Aug 02, 2015 4:28 am
Location: UK
Contact:

Re: Channel Builder Ion Permeability Ratios

Post by RBJ »

Thank you very much for that Ted. . . I'll investigate this approach. I think that probably the IV relationship is surprisingly linear, as you suggested (I have data on this at my office). I do need to track ca movement though. I will experiment some more.
Thanks again
Richard
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Channel Builder Ion Permeability Ratios

Post by ted »

RBJ wrote:I do need to track ca movement though.
It may be possible to do that by using a custom NMODL-specified mechanism that uses a pointer to track the current generated by the Channel Builder-specified mechanism, calculates what the ca current should be and WRITEs it. That takes care of ca balance, but disturbs charge conservation. However, conservation of charge can be restored by having the same mechanism generate a NONSPECIFIC current of equal amplitude but opposite sign. My only concern is whether this would introduce a 1 time step delay between a change of the channel's ica and its echoing by the NMODL-specified mechanism, and if so whether it would be possible to prevent that. I'll look into it.
RBJ
Posts: 62
Joined: Sun Aug 02, 2015 4:28 am
Location: UK
Contact:

Re: Channel Builder Ion Permeability Ratios

Post by RBJ »

Thank you very much indeed.
A little more background in case other viewers are wondering what I am up to with single channel building/modelling.
We are recording and modelling TRP channel expressing neurones, and ultimately aim to include temperature, osmolarity and calcium feedback regulation, in addition to secondary calcium effects on neighbouring calcium activated potassium and chloride channels.
(1) We started with just a straightforward NMODL mechanism. Works OK (as far as we got), but I felt that I was loosing the very single channel resolution we spent so much time gathering in the lab. Also, neurone properties may not be all that different between deterministic/stoichiometric for lots of low conductance channels, but for relatively few - relatively large channels it might make a difference?
(2) I coded a single channel mechanism in NMODL, which intercepted dt and set a mono/divalent single channel as either open or closed. It was very slow with one channel, take it up do a dozen or so and if became VERY slow. I was also not confident it was working as intended.
(3) Spotted the Channel Builder. This seemed the way to go, beautifully simple, could get my students to use it. Since no obvious way to set permeability ratio, tried creating a channel with just Ca permeability; arguing the other (lower permeability) ions would have little effect on neuronal properties in the context of the much larger HH contributions. This seems to work, but I got bigger effects than I expected. I figure this is the anomalous behaviour one sees with heavily Ca permeable non-specific channels; you would think their reversal potential would be near ECa, but in fact they tend to reverse much nearer to the average of ENa/EK than ECa (the biophysics of this have been modelled a lot in the 1970s/80s). SO, I tried cloning the single Ca channel I made as a HOC and changing various things including the equilibrium/reversal potential. In fact it would seem this is over-ridden and if you tell the Channel Builder to use Ca. . . it uses ECa to calculate current not the customised “Vrev”.
(4) Following your suggestion Ted, I tried calling the channel non-specific, going with Ohmic IV and dropping in our experimental Vrev in place of VEq. Of course, this works nicely in terms of channel activity, but I have lost the very Ca changes I was looking to “use” in the first place.

We are basically using the popular CDP.mod to deal with intracellular Ca and WRITE Ca, so if there is a way for it to read the non-specific ChannelBuilder current and “turn it into” a calcium current, that sounds great. I wasn’t aware that would throw the charge balance, since I have always relied on the clever NEURON engine to sort that out for me. Perhaps wrongly!?
Thanks again
Richard
RBJ
Posts: 62
Joined: Sun Aug 02, 2015 4:28 am
Location: UK
Contact:

Re: Channel Builder Ion Permeability Ratios

Post by RBJ »

Small update; I have created the channel "tedeq" with permeability for eq valence 2, equilibrium potential +50mV. I've created a mechanism (NMODL) that is supposed to translate this to an ica in the first instance simply returning ica=ieq, then I was going to develop that later. Charge balance issues are obviously worrying, I was less worried about potential 1dt tme lag, under the circumstances I am not sure that would matter too much. It doesn't work yet, probably because I am making a stupid error. I'll browse the documentation and see if I can see why it is not as simple as reading one current and writing another.
On reflection; perhaps just setting ionstyle and defining ca reversal potential will solve my issues.
RBJ
Posts: 62
Joined: Sun Aug 02, 2015 4:28 am
Location: UK
Contact:

Re: Channel Builder Ion Permeability Ratios

Post by RBJ »

Hi All, I think I have solved this issue now. To avoid any charge balance issues and timestep delays (discussed above). I now created a non-specific ion kschannel with chosen TRP Vrev and gmax of zero. Now the simulated mixed permeability "trp" channel merrily gates according to the various transition rates but NEVER PASSES ANY CURRENT. Meanwhile, in an initialisation HOC file I've set-up a pointer connection to a custom mechanism that READS the kschannel.O parameter (number of channels open at any instant), and simply calculates the respective ca/k/and na currents from its repective (v-vtrp)*gmax*O in line with the channel permeability ratio.
I seem to now have stoichiometric behaviour of my TRP channels. If there is an obvious flaw, please warn me.
The basic kschannel is built with the GUI channel builder.
The NMODL mechanism [eqmod] to convert from that to a "real" trp channel (excerpt) is:

Code: Select all

NEURON {
  POINT_PROCESS eqmod
  USEION ca  WRITE ica
  USEION k WRITE ik
  USEION na WRITE ina
  RANGE ica, ik, ina, gmax, vtrp
  POINTER O
  }
...
BREAKPOINT {
  ica = (6/8)*gmax*(V-vtrp)*O
  ik  = gmax*(V-vtrp)*O
  ina = gmax*(V-vtrp)*O
}
and the HOC to match everything up (excerpt) [the channel is "tedeq"] :

Code: Select all

objref myeqmod
myeqmod= new eqmod(0.5)

//the TRP channel gmax
gmax=6e-5
vrev=32
objref tobj
tobj = new tedeq(0.5)
tobj.Nsingle=10 //kicking off with 10 channels, but can change this in the NEURON GUI later
setpointer myeqmod.O,tobj.O
myeqmod.gmax =gmax
myeqmod.vtrp=vrev
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Channel Builder Ion Permeability Ratios

Post by ted »

Outstanding! We both came up with the same strategy, and more or less at the same time. Here's to resourcefulness!

My initial stab at this was to start with a Channel Builder specified mechanism that actually passed current, but I was concerned about order-of-execution effects--it wasn't clear that I could be assured that the "dependent" NMODL specified ion channel mechanism would always receive the number of open channels from the Channel Builder instantiated mechanism during the current time step, or whether it would under some conditions be one time step behind. It wouldn't do for one current to be a step ahead of the others. That problem simply doesn't arise if the Channel Builder specified mechanism merely calculates the number of open channels but leaves calculation of all ionic currents to an NMODL specified mechanism.

I now have two examples: one in which the ion channels are treated as ohmic, and another in which they show GHK rectification (so that the channels are best described in terms of permeabilities, not conductances). I'll put these online in a zip file for interested readers.

The only tricks are the use of a POINTER so that the dependent NMODL-specified mechanism automatically gets the number of open channels, and remembering that one must specify the total number of channels in the Channel Builder specified mechanism, but the NMODL mechanism is where one sets the single channel conductances or permeabilities.
The NMODL mechanism [eqmod] to convert from that to a "real" trp channel (excerpt) is
Here it seems that our paths diverge. For ohmic ionic conductances, the USEION statements must READ the respective ionic equilibrium potentials, and the current calculations in the BREAKPOINT block should be
ica = (6/8)*gmax*(v-eca)*O
ik = (1/8)*gmax*(v-ek)*O
ina = (1/8)*gmax*(v-ena)*O
where v is lower case v and declared preferably in the ASSIGNED block and I'm assuming that gmax has the usual meaning of "maximum total conductance."

I assume that the units of gmax and the various currents are appropriate for POINT_PROCESSes (uS, nA, rather than density units).
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Channel Builder Ion Permeability Ratios

Post by ted »

Here are the files:
https://www.neuron.yale.edu/ftp/ted/neu ... _mixed.zip

One little thing that I should mention: the permeability-specified channel mechanism is temperature dependent. In NEURON temperature is specified by the global hoc parameter celsius, which has a default value of 6.3 degC, the temperature of the chilly ocean water in which the squid Loligo peali hang out. For any other experimental condition, you will probably want to specify a different temperature, e.g. with a hoc assignment statement such as
celsius = 37
I have inserted this statement into inittestpmixp.hoc in close proximity to the statement that attaches PMixp to the cell, along with a comment that PMix is temperature-sensitive, like this:

Code: Select all

soma pmixp = new PMixp(0.5)
celsius = 37 // PMixp is temperature-sensitive
RBJ
Posts: 62
Joined: Sun Aug 02, 2015 4:28 am
Location: UK
Contact:

Re: Channel Builder Ion Permeability Ratios

Post by RBJ »

Thank you so much for that Ted!
I am downloading now and will thoroughly examine these examples later in the week when I get time. The temperature aspect is indeed key. As for the actual ion movements; GHK approach vs Ohmic with "Vtrp" as the reversal potential, I probably need to think about the biophysics more, I think following this discussion the implementation is straightforward. In our previous version of this model we did use:

Code: Select all

ica = (6/8)*gmax*(v-eca)*O
ik = (1/8)*gmax*(v-ek)*O
ina = (1/8)*gmax*(v-ena)*O
(thanks also for spotting my arithmetic typo too). The reason I stepped back from that was I suddenly thought that if v was, say, zero; potassium and calcium would be moving in opposite directions through the same open channel at the same instant. That's probably naiive ignorring or the principles of equilibria on my part. I will think and read on this too. the actual channel reversal potential of a mixed conductanced channel which includes divalent permeability is pretty complex and I have good literature from the Jan and (separately) Lewis modelling of the 1970s/80s. Probably not appropriate to get into that here?
Thanks again
Richard
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Channel Builder Ion Permeability Ratios

Post by ted »

RBJ wrote:The reason I stepped back from that was I suddenly thought that if v was, say, zero; potassium and calcium would be moving in opposite directions through the same open channel at the same instant. That's probably naiive ignorring or the principles of equilibria on my part.
It is generally assumed that ion flux through a channel is driven by the electrochemical gradient. v-ex, where ex is the eqilibrium potential for ionic species x, is the electrochemical gradient. If the ionic fluxes were proportional to v-vtrp, where vtrp is some kind of "average" equilibrium potential, then one or more species could move against their electrochemical gradients. Is there experimental evidence for this happening in these or other ion channels?
RBJ
Posts: 62
Joined: Sun Aug 02, 2015 4:28 am
Location: UK
Contact:

Re: Channel Builder Ion Permeability Ratios

Post by RBJ »

Yes thank you. My "vtrp" comment/thought was a bit rash. Couldn't see the wood for the trees there. The Zip you uploaded works really well, has corrected this and a few other small errors I made and I am now adapting my code in line with these examples!
Thanks
R.
Post Reply