Implementing Nernst-Planck Eletrodiffusion Eqn for Gap Junct

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
Darshan
Posts: 36
Joined: Tue Jul 02, 2013 5:11 am

Implementing Nernst-Planck Eletrodiffusion Eqn for Gap Junct

Post by Darshan » Tue Dec 13, 2016 10:39 am

Hi,

Is it possible to implement Nernst-Planck Electrodiffusion equation (https://en.wikipedia.org/wiki/Nernst%E2 ... k_equation) using NEURON-Python or Rxd for communication between 2 cells via a gap junction?

I was looking ways to make gap junction current change both the membrane potential (via potential gradient) and intracellular ionic concentrations based on (diffusion). Tried out some options without any success.

For finding answers to this, I tried looking as to how longitudinal diffusion is implemented in NEURON. But was not able to find its source code. I went through one post (viewtopic.php?f=8&t=980) which said that the longitudinal diffusion in NEURON uses Fick's law to model diffusion. I would like to know how it was implemented. The post also says that potential gradients are shallow for longitudinal diffusion. This would not the be the case for gap junctions if one cell is generating an AP and other is at rest. If a potential gradient component is added to the implementation, it can do the job. Also, please do suggest if there are any other ways to achieve this type gap junction communication in NEURON.

Thanks,
Darshan

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

Re: Implementing Nernst-Planck Eletrodiffusion Eqn for Gap J

Post by ted » Tue Dec 13, 2016 10:11 pm

Get a gzipped tar file of source code for NEURON, expand it, and copy the file
nrn/share/examples/nrniv/nmodl/gap.mod
to a new file called xgap.mod that is located in the same directory as the hoc or Python code for your model. Edit xgap.mod to make the changes necessary to implement the permselectivity you require.

"What would those be?"

Example: gap is selective for K ions.
Change the NEURON block's contents to
POINT_PROCESS xgap
USEION k READ ek WRITE ik
RANGE r
POINTER vgap, ekgap

In the PARAMETER block insert the declaration
ekgap (millivolt)

In the ASSIGNED block change
i (nanoamp)
to
ik (nanoamp)

In the BREAKPOINT block change
i = (v - vgap)/r
to
ik = (v - vgap - ek + ekgap)/r

After compiling with mknrndll (nrnivmodl for Linux users), insert an instance of xgap into the two segments that are to be connected, then use setpointer statements as necessary. Example: assuming that the distal end of section a is to be connected to the proximal end of section b, execute these hoc statements
objref xg[2]
for i=0,1 xg = new xgap()
a xg[0].loc(0.999) /*a's distal segment*/
b xg[1].loc(0.001) /*b's proximal segment*/
setpointer g[0].vgap, b.v(0.001)
setpointer g[0].ekgap, b.ek(0.001)
setpointer g[1].vgap, a.v(0.999)
setpointer g[1].ekgap, a.ek(0.999)
Don't forget to specify the gap resistance values.

Left as an exercise to the reader: what would you do if the gap is 90% selective for k, 10% selective for na?

References:
Programmer's Reference entries about setpointer.
Documentation Page http://www.neuron.yale.edu/neuron/docs link to Scripting NEURON with Python for Python examples of how to deal with pointers.
Chapter 9 of the NEURON Book, or the preprint of

Hines, M.L. and Carnevale, N.T.
Expanding NEURON's repertoire of mechanisms with NMODL
Neural Computation 12:995-1007, 2000

which is available from a link at
http://www.neuron.yale.edu/neuron/nrnpubs

Darshan
Posts: 36
Joined: Tue Jul 02, 2013 5:11 am

Re: Implementing Nernst-Planck Eletrodiffusion Eqn for Gap J

Post by Darshan » Sat Dec 17, 2016 6:15 am

Thank You, Ted!

I was able to use the code bits you suggested in the gap junction model.

For the exercise you suggested, if we have 2 parameters s1 (for permselectivity of K+) and s2 (for permselectivity of Na+) such that,
s1=0.9, s2=0.1 (thus, s1+s2 =1), with following lines in the BREAKPOINT block

ik = s1 *(v - vgap - ek + ekgap)/r
ina = s2 *(v - vgap - ena + enagap)/r

might define the a gap which is 90% selective for K+, 10% selective for Na+.

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

Re: Implementing Nernst-Planck Eletrodiffusion Eqn for Gap J

Post by ted » Mon Dec 19, 2016 4:41 pm

Exactly.

Post Reply