I am trying to resolve an issue using NEURON model gap junctions, in which spurious voltage changes occur in gap junction-connected sections.

The following Python code demonstrates the issue. There are three identical sections, each receiving an identical depolarizing current. The first two sections are connected to each other by a gap junction. I would expect all three sections to show the same change in voltage.

However, as can be seen in the voltage traces, the gap junction-connected sections show a smaller voltage change than the isolated section.

The two gap junction-connected sections have identical voltages throughout the simulation, so I would not expect a current to flow through the gap junction. Indeed, the values of gap_junction1._ref_i and gap_junction2._ref_i remain zero throughout.

I noticed that the issue depends on the step size h.dt. Decreasing the step size decreases the voltage difference.

I have also reproduced this issue using parallel transfer to model gap junctions.

Neuron version: VERSION 7.5 master (6b4c19f)

I hope someone can help.

Code: Select all

```
from neuron import h
import matplotlib.pyplot as plt
g = 10.
h.load_file("stdrun.hoc")
h.tstop = 100
section1 = h.Section()
stim1 = h.IClamp(section1(0.5))
stim1.delay = 0
stim1.amp = 1
stim1.dur = 100
v1 = h.Vector()
v1.record(section1(0.5)._ref_v)
section2 = h.Section()
stim2 = h.IClamp(section2(0.5))
stim2.delay = 0
stim2.amp = 1
stim2.dur = 100
v2 = h.Vector()
v2.record(section2(0.5)._ref_v)
gap_junction1 = h.gap_pointer(section1(0.5))
gap_junction2 = h.gap_pointer(section2(0.5))
h.setpointer(section2(0.5)._ref_v, 'vgap', gap_junction1)
h.setpointer(section1(0.5)._ref_v, 'vgap', gap_junction2)
gap_junction1.g = gap_junction2.g = g
i1 = h.Vector()
i1.record(gap_junction1._ref_i)
i2 = h.Vector()
i2.record(gap_junction2._ref_i)
section3 = h.Section()
stim3 = h.IClamp(section3(0.5))
stim3.delay = 0
stim3.amp = 1
stim3.dur = 100
v3 = h.Vector()
v3.record(section3(0.5)._ref_v)
t = h.Vector()
t.record(h._ref_t)
h.dt=2.5
h.finitialize(-60)
h.run()
plt.figure()
plt.plot(t, v1)
plt.plot(t, v2)
plt.plot(t, v3)
plt.figure()
plt.plot(t, i1)
plt.plot(t, i2)
```

Code: Select all

```
NEURON {
POINT_PROCESS gap_pointer
NONSPECIFIC_CURRENT i
RANGE g, i
POINTER vgap
}
PARAMETER {
g = 2e-3 (microsiemen)
}
ASSIGNED {
i (nanoamp)
vgap (millivolt)
v (millivolt)
}
BREAKPOINT {
i = (v - vgap)*g
}
```