Setting the coupling conductances

Anything that doesn't fit elsewhere.
Post Reply
WWybo
Posts: 7
Joined: Fri Jul 13, 2018 5:39 am

Setting the coupling conductances

Post by WWybo »

Dear all,

I'm looking for a way to implement simplified compartmental models in Neuron. In short, I would like to set coupling conductances between compartments explicitly, without using an actual geometry and axial resistivity (a compartment here would correspond to a single voltage variable, so I presume that could for instance be implemented with a section consisting of a single segment).

The simplest example would be a two-compartment model:
c_1 dv_1/dt = g_L1 (E_L - v_1) + g_c (v_2 - v_1)
c_2 dv_2/dt = g_L2 (E_L - v_2) + g_c (v_1 - v_2)

where c_1 and c_2 are the capacitances of the respective compartments, g_L1 and g_L2 the leak conductances and g_c the coupling conductance. Ideally, a would like to be able to set c_1, c_2 resp g_L1, g_L2 as capacitances resp. conductance, opposed to capacitance resp. conductance densities. I would also like to set g_c explicitly as a conductance.

I wonder if there is a way in Neuron to do that. Alternatively, I could define a fake geometry that yields the parameters I want. This seems easy enough for most variables except the coupling conductances, as it is simply rescaling the sections' surface. To simultaneously have the correct coupling conductance is a bit more involved, but I'll inquire more if simply setting it explicitly is not possible.

Thanks and best regards,
Willem
ted
Site Admin
Posts: 5795
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Setting the coupling conductances

Post by ted »

The usual question is "X published a model in which all parameters are specified in 'absolute' rather than 'density' units. How can I implement this in NEURON?"

A reasonable strategy is to use one section for each compartment in the original model, and connect them into a topology that matches the original. The 0 end of each child section should be attached to the 1 end of its parent or to the 0 end of the root section (the section that has no parent). Leave the discretization parameters (nseg) set to 1. Assume an empirically-based value for specific membrane capacitance (usually 1 uf/cm2, but may be different for certain types of cells), and use that to determine the sections' surface areas.

If accumulation mechanisms are not involved, volumes don't matter, so each section's L and diam can be chosen as needed to give the desired axial resistances between adjacent internal nodes (the "internal terminals" of the capacitances of adjacent sections). In calculating the values for L and diam, use the value of Ra (cytoplasmic resistivity, units are ohm-cm) specified in the original model, or choose an empirically reasonable value like 100 ohm-cm. Note that NEURON uses the central difference approximation to the second spatial derivative, so that half of each compartment's axial resistance lies between its internal node and its nodes at the 0 and 1 ends. This means that the path between two adjacent capacitances belongs partly to one section and partly to another. Start by setting L and diam of the root section, then recursively traverse the tree, choosing L and diam for each section to give appropriate path resistances to the parent's capacitance.
WWybo
Posts: 7
Joined: Fri Jul 13, 2018 5:39 am

Re: Setting the coupling conductances

Post by WWybo »

Hi Ted,

thanks a lot for your answer. Does this mean that the effective coupling conductance between two sections in Neuron (with nseg set to 1 for both) is given by

g_c = (PI * a_1^2) / (r_a * L_1/2) + (PI * a_2^2) / (r_a * L_2/2) ?

Here a_1, a_2 are the radii of both sections, L_1, L_2 their lengths and r_a the axial resistance (same for both).

I'm using this relation to determine an effective geometry (while fixing the surfaces of all sections such that I get the correct capacitances and conductances) but I'm not getting the model to match with the original model. Are the soma and leafs special cases or should it the same?

Best regards,
Willem
ted
Site Admin
Posts: 5795
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Setting the coupling conductances

Post by ted »

A section has internal nodes and external nodes. The number of internal nodes is specified by the section's discretization parameter nseg. Internal nodes are located at the centers of segments. Membrane potential is calculated at internal nodes by numerical integration; at each internal node, membrane potential equals (the amount of charge stored on the corresponding segment's membrane capacitance)/(the segment's membrane capacitance).

A section has two external nodes, one at each end.

The axial resistance (i.e. path resistance) between an external node and its adjacent internal node is simply the path resistance between the external node and the center of the segment that contains the internal node. If a section's geometry is specified by the stylized method, i.e. specifying L and diam, then its segments are cylindrical. Example:

Code: Select all

create dend
dend diam = 1
dend L = 100
dend for (x) print x, ri(x)
returns

Code: Select all

0 1e+30 
0.5 22.53634 
1 22.53634 
The function ri(x) returns the axial resistance, in megohms, between the center of the segment that contains location x on the currently accessed section and that node's parent node. In this case, dend is not the child of any other section, so the axial resistance between its node at 0 and the parent node of that node is infinitely large (well, 1e30 is approximately infinitely large). I think you will find that the axial resistance of a cylinder 50 um long x 1 um in diameter that contains an electrolyte with resistivity of 35.4 ohm cm is 22.53... megohms ( Ra*50/(PI*0.5^2), and toss in a factor to convert um to cm)

If you connect the 0 end of one section (the child section) to the 1 end of another section (the parent section), and nseg is 1 for both sections, the path resistance between the internal nodes of the parent and the child equals the path resistance between the parent's internal node and its external node at 1 added to the path resistance between the 0 end of the child and its internal node (which is at 0.5).

If a section's geometry is specified with the pt3d method, it is possible to specify tapering of diameter. In this case, axial resistance and surface area along each segment are computed using formulas that take tapering into account. For example,

Code: Select all

create axon
axon pt3dclear()
axon pt3dadd(0,0,0,1)
axon pt3dadd(100,0,0,10)
specifies that axon will be a frusta with length 100 um and diameters of 1 and 10 at its 0 and 1 ends, respectively, and that in between 0 and 1 diameter varies linearly with position. Now observe that axial resistance is much larger over the first half of axon's length than it is over the second half. In fact, almost 90 percent of the resistance along the entire length of axon is due to resistance between its nodes at 0 and 0.5.

Code: Select all

axon for (x) print x, ri(x)
0 1e+30 
0.5 4.0975164 
1 0.40975164 
WWybo
Posts: 7
Joined: Fri Jul 13, 2018 5:39 am

Re: Setting the coupling conductances

Post by WWybo »

Dear Ted,

many thanks for your reply. I actually made a silly mistake and added conductances instead of resistances, the formula in my previous answer should be

1 / g_c = (r_a * L_1/2) / (PI * a_1^2) + (r_a * L_2/2) / (PI * a_2^2).

For a simple linear dendrite, I now get the correct results and the models agree perfectly.

I still have a problem with bifurcations though. Suppose I have the following tree structure (printed with h.topology()):

Code: Select all

|-|       1(0-1)
   `|       2(0-1)
     `|       3(0-1)
     `|       4(0-1)
where 1, 2, 3 and 4 are the indices of four compartments. Hence, I would only like to have coupling conductances between 1-2, 2-3 and 2-4. I'm fixing the geometries to yield the right axial resistances within each section (the values returned h.ri() give the correct values for each node that, when added up, yield the right coupling conductances). However, when I measure the transfer resistances between the compartments (the x=0.5 locations in each section) I find a larger transfer resistance between 3-4 than between 2-3 or between 2-4, indicating that 3 and 4 are closer electrically than 2-3 and 2-4. In the compartmental model, this is of course not the case as 3 and 4 are not directly connected, and thus there will be a lower transfer resistance between 3-4 than between 2-3 and 2-4. Is there somehow a direct coupling term I am missing and, if so, how should I implement this configuration then?
ted
Site Admin
Posts: 5795
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Setting the coupling conductances

Post by ted »

this is of course not the case as 3 and 4 are not directly connected
Neither are 2&3 or 2&4. All three are connected at a common node, i.e. where the 0 nodes of 3 and 4 attach to the 1 node of 2. Local topology alone is insufficient for any inferences about transfer resistances between the nodes at the centers of 2, 3, and 4.
Is there somehow a direct coupling term I am missing
What, in the equivalent circuit of the compartmentalized model cell? All interactions are local, i.e. nearest neighbor. The equivalent circuit is simple. Render the following in a fixed space typeface such as Courier

Code: Select all

      3
      |
1-o-2-o
      |
      4
Each number represents the node at the center of a compartment (resistance to ground that represents the compartment's membrane conductance is omitted for clarity),
each o is the node at the 0 or 1 end of a compartment,
and each horizontal or vertical line is the resistance of the cytoplasm between a compartment center and the 0 or 1 end of that compartment.
WWybo
Posts: 7
Joined: Fri Jul 13, 2018 5:39 am

Re: Setting the coupling conductances

Post by WWybo »

Thanks for the quick reply!

I'll explain the problem I'm having in more detail with this example:

Code: Select all

      3
      |
1-o-2-o
      |
      4
So in the reduced model, the system of equations I want to implement would be (leaving out the terms for node 1 for simplicity):

c_2 dv_2/dt = - g_L2 v_2 + g_23 (v_3 - v_2) + g_24 (v_4 - v_2)
c_3 dv_3/dt = - g_L3 v_3 + g_23 (v_2 - v_3)
c_4 dv_4/dt = - g_L4 v_4 + g_24 (v_2 - v_4)

where c_i (i=2,3,4) are the capacitances of the compartments, g_Li the leak conductances, v_i the voltages and g_ij the coupling conductances.

To implement this in Neuron, I'm assuming that

g_23 = 1 / (r_2o + r_o3)
g_24 = 1 / (r_2o + r_o4)

where r_2o would the axial resistance between node 2 and o (the bifurcation) and r_o3 resp. r_o4 the axial resistance between node o and node 3 resp. 4. Is this correct?

The reason I'm doubting my implementation in Neuron is that, when I inject a current in say node 4, I measure a larger voltage deviation in node 3 than in node 2, whereas in the reduced model this would not be the case.
ted
Site Admin
Posts: 5795
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Setting the coupling conductances

Post by ted »

Not quite. Here's the diagram of a model that omits compartment 1.

Code: Select all

      3
      |
    2-o
      |
      4
Notice the symmetry of the situation. Everything is symmetric around the unlabeled node (the "floating node" at the location marked by the letter o). The topology of the circuit is independent of which node is labeled 2, 3, or 4. Inference: each ODE should have the same form as every other ODE.

I like compact notations so
vn where n = 2, 3, or 4 is the membrane potential of compartment n
vc is the potential at the common node marked by o (yes, there is a potential at that node, and it is an essential part of proper formulation of the system equations!)
cn and gn are the membrane capacitance and conductance of compartment n
rn is the cytoplasmic resistance between compartment n and the common node c.

For each numbered node, the ODE is
cn vn' = -gn vn + (vc - vn)/rn
That takes care of the 3 ODEs.

Next realize that the potential at node c is the "weighted average" of the potentials at 2, 3, and 4, where the weights are the conductances between o and those nodes.
vc = (v2/r2 + v3/r3 + v4/r4)/(1/r2 + 1/r3 + 1/r4)

That's it. Symmetry. A set of ODEs of the same form.
WWybo
Posts: 7
Joined: Fri Jul 13, 2018 5:39 am

Re: Setting the coupling conductances

Post by WWybo »

Dear Ted,

thanks for the clarification. I think I now managed to figure out an (approximate) way to implement the systems of equations that I need. In the example, taking the limit of r2 -> 0 reduces the system of equations you describe to the system of equations that I need.

This can be implemented by specifying the geometry of a section as two cylinders (joined by a truncated cone in the middle), which I did by using h.pt3dadd(). The first cylinder has a small radius to approximately implement the full coupling conductance between the section and its parent, the second cylinder has a large radius so that the axial resistance over the second half is almost zero. nseg is set to 1 and the radii of both cylinders are scaled such that the total surface (sum of the surfaces of the cylinders + the surface of the truncated cone) is the desired surface for the compartment. The math is somewhat easier if the length of the truncated cone is chosen very small, so that its surface is effectively that of a disk with a hole in the middle.

There might be some accuracy issues in that the computation of vc requires the division of 2 quite large numbers, but I chose r2 to be about a factor of 10^-6 smaller than the other resistances and so far have not encountered issues.

Best regards and many thanks,
Willem
ted
Site Admin
Posts: 5795
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Setting the coupling conductances

Post by ted »

I don't quite follow your proposed solution, but here's a simple strategy that is easy to implement and requires no deviations at all from your conceptual model:
Connect every child section to the node at the middle of its parent.
Then the coupling resistance between the membrane capacitances of the parent and child is entirely attributable to the axial resistance between the child's 0.5 and 0 node. You are free to use any L and diam you like for any section--make them all the same if you like. Just tweak each section's Ra so that the resistance between its 0 and 0.5 node is the value that you want to sit between its capacitance and the capacitance of its parent. Easy to calculate, and easily verified by checking the section's ri(0.5).

This idea should have occurred to me well before this, but in typical usage one would only attach the 0 end of a child section to the 1 end of its parent. The only exception would be sections used to represent necks of dendritic spines, which would be placed at locations along the length of a section, not just at branch points of the dendritic tree.
WWybo
Posts: 7
Joined: Fri Jul 13, 2018 5:39 am

Re: Setting the coupling conductances

Post by WWybo »

Ah yes, thanks a lot. That is indeed a much simpler solution!

Best regards,
Willem
Post Reply