Volume and units in KINETIC blocks with COMPARTMENT

NMODL and the Channel Builder.
Post Reply
tyrell_turing

Volume and units in KINETIC blocks with COMPARTMENT

Post by tyrell_turing »

Hello to all,

I am interested in building a model that incorporates ion diffusion. I have read the chapter on 'Expanding NEURON with NMODL'. I've also run the code examples from that chapter and played with them to work out how to build my own stuff, etc. Overall I found it very helpful and interesting. However, there is still one source of conceptual confusion for me that stems from examples 8 & 9, which describe calcium diffusion/pump models. I've taken the code from these models to build my own simple model that I can successfully run - with the expected results as well. :) But I haven't been able to work out exactly what's going on in it to my own intellectual satisfaction. I've tried looking at other posts currently here on the forum, but nothing really explained it for me. What I cannot get my head around is how the COMPARTMENT statement uses the volume expression. The text explains it by saying:
...the STATEs ca[ ] are intensive variables (concentration, or mass/volume),...(but) flux is the time derivative of an extensive variable. This disparity is corrected by specifying STATE volumes with the COMPARTMENT statement... The volume merely multiplies the dSTATE/dt left hand side of the equivalent differential equations, converting it to an extensive quantity and making it consistent with flux terms in units of absolute quantity per time.
Okay, that makes good sense to me. We've got some code that is going to specify time derivatives of Ca concentration, i.e. d(mol/L)/dt which is insensitive to volume, but our flux tells us about the rate of Ca entry or exit (mol/s), which will have different effects on concentration based on the volume. So, we've got to multiply the concentrations by a volume to make the units work out. Got it. However, the example code totally confuses the issue for me. Here is the code from example 8:

Code: Select all

COMPARTMENT i, diam*diam*vrat[i] {ca CaBuffer Buffer}
...
~ca[i] <-> ca[i+1] (DCa*frat[i+1], DCa*frat[i+1])
...
Now, the variables vrat and frat are unitless, diam is in um, and DCa is in units of um2/ms. As such, the volume expression in the COMPARTMENT statement is actually in units of um2, i.e. an area, not a volume! Moreover, as I understand it, the kinetic expression here specifies a derivative for ca that would work out to DCa*frat[i+1]*(ca[i+1] - ca), which gives us units of (um2/s)*(mol/L) = (1e-9)/(m*s). So, the left-hand side has to be multiplied with an area, and not a volume?!? Thus, I can see that the code "works", e.g. the units are internally consistent, but I do not see how this makes sense anymore. Our derivative specifies a change in mol per m*s, but what is that m there? The length? The diameter? I would sum up my conceptual problem with these two questions:

1. Don't we want an extensive variable to be calculated? Why do we still want another 1/m kicking around in our derivatives?
2. What is actually getting calculated by neuron in the kinetic statement? I thought we were going to calculate the total mols flowing in or out of the compartment per second, but we seem to be calculating something different.

I'm sure my confusion stems from my lack of familiarity with concentration dynamics and kinetic models. But, I would really appreciate some explanation as to what is going on here, as the text seems to contradict the code and I've hit an intellectual brick wall.

Thanks very much,

Blake
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Volume and units in KINETIC blocks with COMPARTMENT

Post by ted »

Excellent question.

First, as an aside, let me note a small change that will be made to line 7 in paragraph 2 on page 247 of The NEURON Book: "mass/time" should be "(amount of material)/time"
(already posted on this Forum at http://www.neuron.yale.edu/phpBB/viewto ... =316#p2290).

Now to answer your question.
the volume expression in the COMPARTMENT statement is actually in units of um2, i.e. an area, not a volume!
True. It is volume per unit length.

The way to think about this is to first realize that the length of each compartment is L/nseg. If user-written code were required to explicitly state shell volumes and surface areas in units of volume and area respectively, L/nseg would have to be included wherever a volume or area was needed. But NEURON knows L and nseg, so it can automatically factor in compartment lengths without users having to. This is why volumes and surface areas in user-written NMODL code are expressed in units of "volume/length" and "area/length", respectively.

An alternative explanation is given in the last two sentences of the last paragraph of page 247 of The NEURON Book:
"The equations that describe the radial movement of Ca2+ are independent of segment length. Therefore it is convenient to express shell volumes and surface areas in units of [um2] (volume/length) and [um] (area/length), respectively."
tyrell_turing

Re: Volume and units in KINETIC blocks with COMPARTMENT

Post by tyrell_turing »

Ah, I see, that makes sense. So, to make sure I understand, does that also explain the line in the same example following the LONGITUDINAL_DIFFUSION statement? Specifically, the PI*diam in this bit of code:

Code: Select all

~ ca[0] << (-ica*PI*diam/(2*FARADAY)) : ica is Ca efflux
That is, we've got a current that is in units of mA/um2 (i.e. current per area of membrane), and to get a measurement in mA (which will be divided by the FARADAY constant) we're multiplying it with what looks like the circumference rather than the area because surface areas are expressed as area/length. Correct?

Thanks for replying!

Blake
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Volume and units in KINETIC blocks with COMPARTMENT

Post by ted »

You've got the idea: volumes and areas that are distributed along the length of each segment should be expressed in units of (volume/length) and (area/length).
thierrynieus
Posts: 2
Joined: Wed Jul 06, 2011 5:15 am

Re: Volume and units in KINETIC blocks with COMPARTMENT

Post by thierrynieus »

Hi, it is a long time I do not post any message on this forum (hope I am doing it right). I am working on diffusion of chloride in dendrites and I came back to the mechanism explained for calcium (with the appropriate changes of course). To avoid the accumulation of cli I want to buffer the excess of chloride by an additional term in eq:
~ cl[0] << (icl*PI*diam/(1*FARADAY))

Of course I could do that by working on the ~ cl + Buffer eqs. but to check whether I am interpreting correctly the volume/length conversion I wonder if the following equation sounds correct:

~ cl[0] << (icl*PI*diam/(1*FARADAY)-(cl[0]-cli0*PI*diam*diam*vrat[0])/tau_pump)

cli0 is the initial concentration, cl[0] is the total mass, tau_pump is the time constant of relaxation
PI*diam*diam*vrat[0] is shell's zero volume.

Is that correct? Thanks for any help
thierrynieus
Posts: 2
Joined: Wed Jul 06, 2011 5:15 am

Re: Volume and units in KINETIC blocks with COMPARTMENT

Post by thierrynieus »

Hi all,

I finally solved the question by myself, to the benefit of everyone here is the solution to my previous question:

~ cl[0] << (icl*PI*diam/(1*FARADAY)-(cl[0]-cli0)*diam*diam*vol[0]/tau_pump)

diam*diam*vol[0] multiplies both cl[0] and cli0 (there was a mistake in my previous post).

I have tested it by starting the simulations with cl[0]=cli0 and without stimulation cli stays at that value. Then by perturbing the system cli returns to the basal level.

Understanding implementation of diffusion in Neuron is not an easy task at the beginning but after a while I feel it is quite convenient and not that difficult. Good job!

Thierry
Post Reply