Page **2** of **2**

### Re: single resistor as gap junction and connecting cells

Posted: **Wed Apr 01, 2015 6:17 am**

by **shailesh**

Taking the above post a few steps further... I am trying to model two cells (for now, later more) such that their extracellular spaces are connected (ephaptic):

I plan to implement the extracellular link (Rlink) between two extracellular nodes in different sections using LinearMechanism. Also, I wish to have Ra = Re = Rlink.

If I assign Ra = 100 Ohm.cm, can I assign the rest as follows (such that Ra = Re = Rlink)?

>> xraxial[0] = Ra/(PI*r*r) // r: radius in cm

Units of xraxial[0] : MOhm.cm

>> 'gmat' elements = (+/-) 1 / { Ra * (L/nseg) / (PI*r*r) * area(0.9) }

Units of gmat: S/cm2

I am not too sure of gmat, but my thinking goes like this:

Ra * (L/nseg) / (PI*r*r) -> Resistance in Ohms. From there I followed the previous post to convert to S/cm2.

Have I faltered here?

### Re: single resistor as gap junction and connecting cells

Posted: **Wed Apr 08, 2015 2:22 am**

by **shailesh**

Any thoughts on the above?

Note: I plan to connect the last and first internal nodes of adjacent sections (not the terminal nodes) and hence requiring 'gmat' in S/cm2 and not uS.

### Re: single resistor as gap junction and connecting cells

Posted: **Wed Apr 08, 2015 11:08 am**

by **ted**

You'll probably find something relevant (including reusable code) in ModelDB entry 3676

https://senselab.med.yale.edu/ModelDB/S ... model=3676
especially in ephap.hoc.

That is a NEURON implementation of ephaptic interactions between two cells that uses LinearMechanism to set up the coupling.

The documentation of the LinearMechanism class

http://www.neuron.yale.edu/neuron/stati ... rMechanism
discusses the units used by the elements of the c and g matrix arguments that are used when creating an instance of LinearMechanism.

### Re: single resistor as gap junction and connecting cells

Posted: **Wed Apr 08, 2015 12:26 pm**

by **hines**

It is true that the LinearMechanism is confusing. Some of this can be avoided by using the NEURONMainMenu/Build/LinearCircuit

to constuct a class that implements your ephaptic connection. You can then use it as is, or examine and copy its code fragments for

your own purpose. You should drag two instances of the bottom cell icons that have extracellualar connection ports and connect

with a resistor. Name one of the extracellular ports A and the other B and your resistor R. Then in the Parameters panel, save as a class in

rlink.hoc. Then look at the class implementation and change the class name (if you desire) and also read the comments about how to use.

In particular it has a few lines in the implementation that demonstrate how to scale the resistance by the node area.

### Re: single resistor as gap junction and connecting cells

Posted: **Sat Apr 11, 2015 7:28 am**

by **shailesh**

Thanks Michael, Ted for guiding me towards the solution! Using the LCB to generate the class really helped matters.

I will elaborate a bit for the benefit of any future readers:

On using the LCB to create the class (as described above), we get a HOC file having a procedure named 'refill()' which basically handles the task of assigning appropriate values to matrix g (gmat in original post). The relevant statements are something as follows:

Code: Select all

```
a = area(_xloc.x[i])
if (a == 0) { a = 100 }
_afac.x[i] = -100./a
_g.x[0][0] = (-1.0/R)*_afac.x[0]
```

where R is in MOhm and area is in um2. The factor 100 is merely for converting to S/cm2.

To summarize, to set Ra = Rlink (in the original query):

Step 1: ohm.cm to ohm

r = (diam/2) * 1e-4 //cm

seglength = (L/nseg) * 1e-4 //cm

Rohm = Ra * seglength / (PI*r*r) //ohm

Step 2: ohm to S/cm2

g / gmat elements = (+/-) 1 / { Rohm * area(0.9) * 1e-8 }

Feels good to know my earlier conversion wasn't off the mark (except for leaving L, area() in um).