Adding an intracellular calcium concentration

NMODL and the Channel Builder.
Post Reply
tsa
Posts: 31
Joined: Mon Mar 26, 2007 12:44 pm

Adding an intracellular calcium concentration

Post by tsa »

I'm having difficulty adding a calcium-activated potassium current to a model of a hypoglossal motorneuron. The model has 3 calcium currents: T-type N-type and P-type which are selective for ca 2 in channel builder and should make up the total Ica.

I want to model calcium dynamics simply:
d[Ca2+]/dt = k1*Ica - k2*[Ca2+] where k1 and k2 are scaling factors

So that I can model a calcium-dependent potassium current which incorporates [Ca2+].

Here is my code for intracellular calcium accumulation which I cannot figure out how to make work properlly. I don't believe I understand how to input the calcium current from the T-, N-, and P-type currents.

NEURON {
SUFFIX cai
USEION ca READ cai, ica WRITE cai
RANGE ica0
}
UNITS {
(mM) = (milli/liter)
(mA) = (milliamp)
(molar) = (1/liter)
}
PARAMETER {
cai0 = 0.0000604 (mM)
k1 = -0.005 (molar/mA/ms)
k2 = 0.04 (1/ms)
}
ASSIGNED {
ica (mA/cm2)
}
STATE {
cai (mM)
}
BREAKPOINT{
SOLVE state METHOD euler
}
INITIAL {
cai = cai0
}
DERIVATIVE state {
cai' = (k1*ica) - (k2*cai)
}

Thanks for your input!
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Forget about the NMODL code for a moment. The conceptual model itself is flawed.
I want to model calcium dynamics simply:
d[Ca2+]/dt = k1*Ica - k2*[Ca2+] where k1 and k2 are scaling factors
According to this equation, the "set point" for cai is 0. That is, if ica is 0, calcium
concentration will approach zero asymptotically.

Furthermore, k1 and k2 are completely arbitrary--they have no specified relationship to
surface area or volume. So this formulation of a calcium accumulation mechanism is
unsuitable for models that have compartments with different lengths and diameters.

Instead of starting from scratch, it is generally better to start with code that already
works, and make minor modifications. If you're using MSWin, look in
c:\nrnxx\examples\nrniv\nmodl where you will find several examples of calcium
accumulation mechanisms. If you are using UNIX/Linux/OS X, you will find these
examples in nrn-x.x/share/examples/nrniv/nmodl/
where nrn-x.x is the root of the directory tree that is spawned by expanding the gzipped
tar source code.
I don't believe I understand how to input the calcium current from the T-, N-, and P-type currents.
Just make sure your calcium channel mechanisms all USEION ca . . . WRITE ica,
and have an assignment statement in the BREAKPOINT block that sets the value of ica.
NEURON will then know to add up all of these ica values into the total ica.
Then if your ca accumulation mechanism has a
USEION ca READ ica WRITE cai
statement, the ica that it READs will be the net ica that NEURON calculates for you.

One last comment: never use euler for anything. See
https://www.neuron.yale.edu/phpBB2/viewtopic.php?t=592
tsa
Posts: 31
Joined: Mon Mar 26, 2007 12:44 pm

Post by tsa »

The model I'm recreating is a single compartment model from a J. Neurophysiol paper which states K1 is an accumulation scaling factor and K2 is a decay rate constant representing calcium uptake and diffusion.

Conceptually it seems the calcium accumulation function would suit this simple model so long as no cellular compartmentalization or geometry is desired.

Thanks for the euler tip. One last question on ica. I'm using the gui ChannelBuilder to create my 3 calcium currents and have them set to use new ion Ca 2. What I'm unclear about is how to state that Ica is equal to the sum of those three currents within hoc code. I assume it is not correct to simply state Ica = In +It+ Ip in the BREAKPOINT block.

Thank for all your help.
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

In programming there may be dozens or hundreds of ways to accomplish any given
task. But in the context of any particular programming language, there is often one or
two ways that are most efficient and easiest to debug and maintain. These idioms are
what give each programming language its special advantages. NEURON and other
domain-specific simulation environments derive much of their power from such idioms,
and to abandon them is to lose much of that power.
The model I'm recreating is a single compartment model from a J. Neurophysiol paper
which was apparently not implemented with NEURON, so the authors did not use NEURON's
idioms. It is your choice whether to try to preserve every implementational detail of the original
computational implementation, or whether it makes more sense to recast the model in a way
that still accurately reflects the authors' conceptual model, but which takes advantage of
NEURON's particular strengths. The former may save you a bit of time now, especially
since published model descriptions often confound that which is conceptual and that which
is merely implementational. But the initial savings may be at the cost of extra effort later,
and the result will be a model specification that is not generalizable.
Conceptually it seems the calcium accumulation function would suit this simple model so long as no cellular compartmentalization or geometry is desired.
Compartmentalization and geometry are implicit in every model that involves ion
accumulation.
I'm using the gui ChannelBuilder to create my 3 calcium currents and have them set to use new ion Ca 2. What I'm unclear about is how to state that Ica is equal to the sum of those three currents within hoc code. I assume it is not correct to simply state Ica = In +It+ Ip in the BREAKPOINT block.
Take advantage of NEURON's style for dealing with ionic currents. You're using a
different ChannelBuilder for each current species, so specify that their ionic selectivity
is for ca. Their suffixes will allow you to distinguish their individual currents from each
other, for the sake of recording and plotting. And they will all be recognized and added
into the total ica that the calcium accumulation mechanism READs. So your NEURON
implementation will use the name cai instead of Ca2 for intracellular calcium
concentration. Or tell the ChannelBuilders that they are all selective for Ca2, and have
the accumulation mechanism READ iCA2, Ca2i, and WRITE Ca2i. But be consistent and
try to do what is natural in NEURON.
tsa
Posts: 31
Joined: Mon Mar 26, 2007 12:44 pm

Post by tsa »

By new ion Ca 2 I meant that I was using an ionic specification ca with charge 2, the provided default for creating a new ion. With this specification do I use READ ica2 ca2i Write ca2i or READ ica cai e WRITE cai?
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

In the ChannelBuilder,
Properties / Selective for Ion / Create new type
brings up a tool for specifying the name of the ionic species. The default is ca with a valence
of 2. Accept the default, and that channel will READ eca, cai, cao, and WRITE ica. All
ChannelBuilder-specified mechanisms that are selective for ca will do the same, and the
effect of their currents on cai (and/or cao) can be managed by an ion accumulation
mechanism that READs ica and cai (and/or cao) and WRITEs cai (and/or cao).
tsa
Posts: 31
Joined: Mon Mar 26, 2007 12:44 pm

Post by tsa »

Hi Ted,

I've taken your advice and am using a modified version of the calcium accumulation mechanism provided in the examples folder, it's much clearer to me now. I'm attempting to model an SK (voltage independant) calcium activated potassium current of which I have not been able to find any examples of in modelDB. The current code I'm using runs with no errors but merely settles to a steady state and is not perturbed by current pulses which activate the underlying calcium currents. Once again your help is greatly appreciated.

Code: Select all

TITLE Isk Calcium Dependant Voltage Independant Potassium Current

UNITS {
      (molar) = (1/liter)
      (mV) = (millivolts)
      (mA) = (milliamp)
      (mM) = (millimolar)
}

NEURON {
       SUFFIX isk
       USEION ca READ cai
       USEION k READ ek WRITE ik
       RANGE isk, gskbar, theta, ztau
       GLOBAL zinf
}

PARAMETER {
	  cai	(mM)
	  ek	(mV)
	  v	(mV)
	  gzkbar = 0.0003	(mho/cm2)
	  ztau = 1		(/ms)
	  isk   (mA/cm2)
}

ASSIGNED {
	 ik	 (mA/cm2)
	 zinf	 
}

STATE {z}

BREAKPOINT {
	   SOLVE state METHOD cnexp
	   isk = gzkbar*(z^2)*(v-ek)
	   ik = isk
}

DERIVATIVE state {
	   rate(cai) 
	   z' = (zinf-z)/ztau
}

INITIAL {
	rate(cai)
	z = 0
}

FUNCTION alp(ca (mM)) (/ms) {
	 alp = 1/(1+((0.003/ca)^2))
}

PROCEDURE rate(ca (mM)) {
	  zinf = alp(ca)
}
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

There's a units typo (ztau (/ms) should be ztau (ms)), and an incorrect initialization
(the INITIAL block sets z to 0, but should set it to zinf). If you put this mechanism in a
model with a ca accumulation mechanism and a ca source, it does work.
The current code I'm using runs with no errors but merely settles to a steady state and is not perturbed by current pulses which activate the underlying calcium currents.
So if you only fix the INITIAL block, it will initialize to steady state and lie there like a dead dog.
Have you examined cai to verify that the ca currents are indeed perturbing it? Maybe they
need to be bigger, or perhaps your ca accumulation mechanism is sweeping away the
excess ca too efficiently.

A comment: it's good that you are using an intermediate variable (isk) so that you can
identify that part of potassium current that is generated by this mechanism. I have only
one suggestion for the sake of style: isk_isk and gskbar_sk are redundant. These
hiccups would vanish if you change the SUFFIX to sk, and rename RANGE isk & gskbar
to i & gbar. Then the hoc level variables would be i_sk and gbar_sk.
tsa
Posts: 31
Joined: Mon Mar 26, 2007 12:44 pm

Post by tsa »

Thanks Ted.

I now see noticeable fluctuation in Isk with a 1 ms /1 nA current pulse. However the magnitude of the peak is much lower 0.04 mA compared to 1 mA in the paper I'm working from. The calcium current also peak at a lower magnitude than expected (~ -1mA compared to -2.5 mA)

I believe this is due to my calcium accumulation mechanism which is directly based off of the cacum.mod file included in the examples folder which accompanied NEURON. Eca has a baseline of approximately -5 compared to the 40-50 mV which I would expect but I am unclear how to modify the mechanism being relatively new to ion accumulation processes in NEURON.
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Sounds like you need to implement a ca accumulation mechanism that is more like the one
described in the paper. If you point me to the paper, I may be able to suggest an appropriate
strategy.
tsa
Posts: 31
Joined: Mon Mar 26, 2007 12:44 pm

Post by tsa »

The paper is: Purvis, L. Butera, R. Ionic Current Model of a Hypoglossal Motoneuron. J Neurophysiol 93. 723-733, 2005.

Their calcium accumulation mechanism is similar to that I originally posted on in this thread.
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Got the paper. Too complex for a simple "here's what to do" statement. In order to advise
you properly, I'll have to be able to reproduce your observations from your files. Can you zip
up the relevant hoc, ses, and mod files and send them to me
ted dot carnevale at yale dot edu
?
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

tsa wrote:I now see noticeable fluctuation in Isk with a 1 ms /1 nA current pulse. However the magnitude of the peak is much lower 0.04 mA compared to 1 mA in the paper I'm working from. The calcium current also peak at a lower magnitude than expected (~ -1mA compared to -2.5 mA)
The authors assumed eca is constant at 40 mV, yet their model requires cai to vary with
time. Mutually contradictory assumptions--how did that ever get past the authors, let alone
the reviewers? I should mention that other investigators have published models that
contain similar contradictions in reputable journals.

NEURON, however, "knows" that cai is a STATE and by default will calculate eca from the
Nernst equation. However, you can force NEURON to follow the authors' intent of allowing
cai to vary while keeping eca fixed, by using the hoc function ion_style()
http://www.neuron.yale.edu/neuron/stati ... #ion_style
For this particular case, you want
ion_style("ca_ion", 3, 1, 0, 0, 0)
which allows cai and cao to be STATEs, treats eca as a PARAMETER, does not initialize
eca from the Nernst equation or recompute eca at every fadvance(), and ignores the
hoc-level global initial concentration cai0_ca_ion and cao0_ca_ion. This statement can be
inserted in your main hoc file that pulls the other bits (ses files etc.) together, just as long
as it comes after the model's properties have been defined (otherwise there won't be a
ca_ion mechanism and you'll get an error msg), and before any run() statement.

The model implementation would benefit from a custom initialization so that you don't
have to allow 120 ms of settling time before making "measurements that count".
Post Reply