USEION mechanism

NMODL and the Channel Builder.
Post Reply
sabsan

USEION mechanism

Post by sabsan »

Hi all,
I am a brand new member of this forum, nice to meet all!
I have a problem with the USEION statement: I wrote a .mod file implementing the GHK model of the T-type calcium current and I used the existent calcium mechanism via the statement:

Code: Select all

USEION ca READ cai,cao WRITE ica
After that, as a test, I wrote the same file using a brand new mechanism (and, then, defining a new current):

Code: Select all

USEION xca READ xcai,xcao WRITE ixca VALENCE 2
Since the used parameters and valence are the same I supposed that the two currents (ica and ixca) had the same values. Instead it didn't happen. Do You know what is wrong?
The code of the two .mod files and a dummy hoc program to compare the two currents is available at: http://www.grace.ing.unisannio.it/home/ ... urrent.zip

I used this code both with Neuron 5.8 and 5.9, on Intel and AMD processors, with WinXP as OS. Thanks all. Bye.
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: USEION mechanism

Post by ted »

sabsan wrote:Since the used parameters and valence are the same I supposed that the two currents (ica and ixca) had the same values. Instead it didn't happen. Do You know what is wrong?
This is a very good question. When two supposedly identical models produce different
results, the cause is (almost?) always that the models are not identical. Either the system
equations are different, or the parameters are different. In this case, the problem is that
one key parameter is different: extracellular calcium concentration.

Create a graph that shows soma[0].cao(0.5) and soma[1].xcao(0.5), and you'll see that
the former is 2 mM but the latter is only 1 mM. This happens because ca (like na and k)
is already "known" to NEURON, and its default initial concentrations are cai == 50 nM
and cao == 2 mM. But xca is a "user defined ionic species," and the default initial
intra- and extracellular concentrations of a user defined ion are both 1 mM. Your hoc
and NMODL code override the default initial cai and xcai, but do nothing about initial
cao or xcao.

An aside: I should also mention that calcium equilibrium potential is different, and it's not
even what you think it is in either cell. To demonstrate this, comment out the "run()"
statement in dummy.hoc, and add the following bit of code to the end of that file:

Code: Select all

proc test() {
  soma[0] print secname(), " ", cai, cao, eca
  soma[1] print secname(), " ", xcai, xcao, exca
}

print "before initialization"
test()
stdinit()
print "after initialization"
test()
You'll see this:

Code: Select all

before initialization
soma[0] 0.00024 2 120
soma[1] 0.00024 2 120
after initialization
soma[0] 0.00024 2 117.90644
soma[1] 0.00024 1 108.8539
The problem here is that these cells have a mechanism that WRITEs intracellular
calcium concentration, so during a simulation NEURON automatically computes the
calcium equilibrium potential from the Nernst equation. So you might as well comment
out the "eca = 120" and "exca = 120" statements in dummy.hoc, because they're only
confusing--they're contrary to what actually happens.

Now let's return to the problem of the initial calcium concentratons.
cad, which is inserted into soma[0], WRITEs cai and has a parameter cainf that specifies
the initial value of cai (see cai = cainf in cadecay.mod's INITIAL block). dummy.hoc
takes advantage of this to override the default initial cai--

Code: Select all

soma[0] {
 . . .
  cainf_cad = 2.4e-4	
}
These statements

Code: Select all

  cai = 2.4e-4
  cao = 2
which appear in the same block of code, are ineffective and therefore misleading, and
should be commented out or deleted.
Similar remarks apply to cad1, which is inserted into soma[1]. Note that the ineffective
and misleading statements are

Code: Select all

  xcai = 2.4e-4
  xcao = 2
and that this is what really sets the initial xcai:

Code: Select all

  cainf_cad1 = 2.4e-4
So how can you ensure that cao and xcao have the desired values? Easy--specify
them from hoc. Insert

Code: Select all

  cao0_ca_ion = 2
just before this statement

Code: Select all

  cainf_cad = 2.4e-4
and insert

Code: Select all

  xcao0_xca_ion = 2
just before this statement

Code: Select all

  cainf_cad1 = 2.4e-4
Now test() will print out these results

Code: Select all

before initialization
soma[0] 5e-05 2 132.45793
soma[1] 1 1 0
after initialization
soma[0] 0.00024 2 117.90644
soma[1] 0.00024 2 117.90644
and if you type run() at the oc> prompt, you'll see that both cells produce give identical
results.

There are a few more items to mention--
0. To learn more about initializing ion concentrations and equilibrium potentials, see
pp. 190 et seq. in The NEURON Book. Also read about ion_style in the Programmer's
Reference
http://www.neuron.yale.edu/neuron/stati ... #ion_style
1. All of your mod files assert SOLVE . . . METHOD euler. Never use euler. These
should all be changed to SOLVE . . . METHOD cnexp
2. When I tried the original files under Linux, NEURON exited with this error msg:

Code: Select all

xca_ion ion valence must be defined in
the USEION statement of any model using this ion
The fix, of course, is to add VALENCE = 2 to the end of the USEION statement in
cadecay1.mod
3. What files to include in a zip file? Source code only. That is, just hoc, mod, and ses
files. dlls are OS- and NEURON version-specific, and .o and .c files are only
intermediate files that are created by compiling mod files.
Post Reply