A question about units

The basics of how to develop, test, and use models.

A question about units

Postby MarkoF » Thu Dec 01, 2016 4:52 pm

Hello all,

I am interested in a model of striatal medium spiny neuron proposed in the paper by Gruber et al. 2003. I have found a NEURON implementation on ModelDB, but going through the files I've encountered a problem with how units of ion channel variables are implemented in the simulation. Since I would like to change ion channel parameters later on, I would like to understand what are the proper ranges for the units. Also, a disclaimer, I'm a total beginner in NEURON.

There are two main questions that are confusing me. The first is in the file kir2.mod, in the section BREAKPOINT:

Code: Select all
BREAKPOINT {
   SOLVE states METHOD cnexp
   g = mu*(0.001)*gbar*n
   ik = g*(v - ek)     
   i = (1000)*ik
}


Here, mu is unitless dopaminergic modulation, gbar is maximal conductance of the KIR channel in mS/cm2, n is the state variable (I believe also unitless), and v and ek are membrane voltage and channel reversal potential in milivolts, respectively.

What confuses me is why was g, which in ASSIGNED block is given the units in mho/cm2, not simply declared in mS/cm2 right from the start? Also, what was the purpose of introducing current ik, which is just i but in mA/cm2?


The second question concerns CaL channel. In the UNITS section, Faraday's constant is defined as
Code: Select all
FARADAY = (faraday) (kilocoulombs)

I've found on this page that Faraday's is taken as
Code: Select all
faraday \= 9.652+4 coul

Since Wikipedia sais that F=96485.33289(59) C mol−1, I was wondering is the mol-1 assumed in NEURON's definition of F? Because if I assume that it is, then calculation to get units of GHK equation written in the code correctly comes to coulomb/litre.

The good news is that during the very long time it took to write this post and double-check all the units, definitions, and conversions between the paper and the code, I actually found answers to most of the other problems that have been bothering me for a while now.

Best regards,
Marko
MarkoF
 
Posts: 2
Joined: Thu Nov 24, 2016 6:13 pm

Re: A question about units

Postby ted » Fri Dec 02, 2016 1:35 pm

Good questions.

Some reading that might be of interest:
1. a short list of the units used by NEURONhttps://www.neuron.yale.edu/neuron/static/docs/units/unitchart.html
2. a short tutorial https://www.neuron.yale.edu/neuron/static/docs/units/units.html
3. a discussion thread that contains an example of how to fix a mod file that has unit inconsistencies, and what to do if you want a variable or parameter that has different units https://www.neuron.yale.edu/phpBB/viewtopic.php?f=16&t=532

Now for your questions.
MarkoF wrote:I would like to change ion channel parameters
Most parameter changes can be accomplished by a simple numerical assignment statement in hoc or Python.
in the file kir2.mod, in the section BREAKPOINT:
Code: Select all
BREAKPOINT {
   SOLVE states METHOD cnexp
   g = mu*(0.001)*gbar*n
   ik = g*(v - ek)     
   i = (1000)*ik
}
. . . why was g, which in ASSIGNED block is given the units in mho/cm2, not simply declared in mS/cm2 right from the start?
I don't see the problem. The declaration of g's units is done exactly where it should be--in the block where NMODL is told that g is an ASSIGNED variable, that is, a user-declared variable to which a numerical value will be assigned.
what was the purpose of introducing current ik, which is just i but in mA/cm2?
This statement in kir2.mod's NEURON block
USEION k READ ek WRITE ik
tells NMODL that the kir2 mechanism calculates the value of a potassium current, and that this current should be included in the calculation of total potassium current for those compartments that have kir2. Therefore the BREAKPOINT block (which is where currents are calculated) must contain a statement that assigns a numerical value to a variable called ik that has appropriate units (mA/cm2 because this is a density mechanism). I suspect that the original model reported by Houk et al. (which did not use NEURON) employed uA/cm2 (or maybe just uA) for the kir current (if you want to verify that for yourself, read their article; it has been a while and I just don't recall that particular detail).

The second question concerns CaL channel.
In the UNITS section, Faraday's constant is defined as
Beats me. What value did Houk et al. use--did they even say in their paper? For that matter, what values are "built into" widely used libraries of physical constants? The "exact" value matters a lot in certain contexts, but it's hard to get excited about differences smaller than 1 part in 1000 when (1) there has been so much variation in the empirically-determined value of Faraday's constant over the years, (2) no matter how unsettling such variation might be to physicists, it is miniscule compared to the uncertainty about any parameter of any biological system, (3) the model by Houk et al. is predicated on many gross simplifications and approximations that dwarf a 1/1000 error in Faraday's constant, and (3) the behavior of their model would probably be robust in the face of at least +/- 10% variation in the value assumed for Faraday's constant.

BTW I'd cite NIST http://www.physics.nist.gov/cgi-bin/cuu/Value?f rather than Wikipedia.
ted
Site Admin
 
Posts: 4968
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine

Re: A question about units

Postby MarkoF » Fri Dec 02, 2016 7:25 pm

Thank you for your answer, and for the reading list! Some of these things I've already consulted, some are new to me and very interesting.

ted wrote:Most parameter changes can be accomplished by a simple numerical assignment statement in hoc or Python.

That's what I'm hoping for. I just want to make sure that the new numbers I'm entering are consistent unit-wise with what is already in the model, hence this whole line of questions.

I don't see the problem. The declaration of g's units is done exactly where it should be--in the block where NMODL is told that g is an ASSIGNED variable, that is, a user-declared variable to which a numerical value will be assigned.

There's no problem, just my curiosity. In the line
g = mu*(0.001)*gbar*n,
in order to bring in line units of g and gbar, there's a multiplication factor of 0.001. Since I've often seen (and made) errors in various codes resulting from such manual unit conversion, I was wondering why units of mS/cm2 were not kept for parameter g too.
But I see now from the link that you have attached above that NEURON takes units of S/cm2 as a default one, and since the original paper used mS/cm2 as units for all conductances such conversion does make sense.

tells NMODL that the kir2 mechanism calculates the value of a potassium current, and that this current should be included in the calculation of total potassium current for those compartments that have kir2. Therefore the BREAKPOINT block (which is where currents are calculated) must contain a statement that assigns a numerical value to a variable called ik that has appropriate units (mA/cm2 because this is a density mechanism). I suspect that the original model reported by Houk et al. (which did not use NEURON) employed uA/cm2 (or maybe just uA) for the kir current (if you want to verify that for yourself, read their article; it has been a while and I just don't recall that particular detail).

I see, so it's again the difference between what NEURON takes as default units in its calculations, and what was used in the paper (they indeed use uA/cm2).

Thank you again for the help, it cleared things out!
MarkoF
 
Posts: 2
Joined: Thu Nov 24, 2016 6:13 pm


Return to Getting started

Who is online

Users browsing this forum: No registered users and 1 guest