Rectifying Gap Junctions without using Linear Circuit Builder?

NMODL and the Channel Builder.
Post Reply
Posts: 1
Joined: Thu Jan 11, 2018 4:22 am

Rectifying Gap Junctions without using Linear Circuit Builder?

Post by varmaalok22 » Sun Jan 14, 2018 11:59 pm


I am relatively new to NEURON and am trying to use NEURON to model mixed synapses (i.e. both gap junctions and chemical synapses at the same site). The experimental model I’m using is the Mauthner neuron of the zebrafish, for which a model exists in ModelDB ( ... del=232813).

I have been running simulations (a parameter sweep, essentially) with gap junctions as defined in the NEURON book (using point processes and pointers). However, to be more accurate, I need to revise my model to make the connection a rectifying gap junction. I have tried the Linear Circuit Builder example from the 2008 NEURON course, which works on my computer. But when I tried to take the rgap.mod file and compile it in order to make a “gap” section in my code as done in the LCB2 example, the “insert rgap” statement throws an error. I tried exporting the gap section from the LCB2 Cell Builder as hoc code which I copied into my own code. That threw the same error. I tried adding the SUFFIX rgap statement to the mod file, just to test if it was a nomenclature issue, and that didn’t help either.

I have also spent a couple of hours trying to write (read hack) a point process and pointers based code for a rectifying gap junction, using the equation I = g_el * G_rect * (v_pre – v_post), where G_rect is an approximation of the step function (G_rect = 1/(1+exp(v_post – v_pre)). Since my model only has 2 neurons, I thought I could define two classes – one for pre and the other for post, and set the equations appropriately, so that charge is conserved. I could give you more details about what I did, but suffice to say for now that it did not work.

Is there an easy way to import my hoc code with the neurons and circuits I have defined already into Cell Builder, so that I can follow exactly the same process as the LCB2 example to set up the system and then run my parameter sweep on the system? Or rather, is there a way I can just change the gap junction bit in the code I’ve already written so that I can run the same simulation, except with a rectifying gap junction instead of a non-rectifying one?

I’m not sure if I phrased this clearly enough, so please feel free to clarify. I can also share my code, to get your feedback on how to set this up better. In case I didn't post this in the right section of the forum, please let me know how to shift it to another section and I shall do so.

Thank you in advance. Eagerly awaiting a reply.


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

Re: Rectifying Gap Junctions without using Linear Circuit Builder?

Post by ted » Tue Jan 23, 2018 2:47 pm

A few days after I sent you an NMODL-based implementation of a rectifying gap junction, I decided that a few changes would improve the code. First, the name of the mod file should be
which agrees with the name of the point process class implemented by the NMODL code.
Second, it makes much more sense, and cleaner code, to move the error trapping into the FUNCTION that calculates the gap junction conductance.

The only required changes are to the mod file, which I have now uploaded as part of this archive: ...
The other files in this zip file are a hoc file and a session file that demonstrate usage and provide a nice user interface for running some test simulations.

As before, be sure to
1. use the isanode parameter to specify which HalfGap is on the "anode" side of the junction, and which one is on the "cathode" side
2. link each HalfGap's POINTER variable vgap to the membrane potential of the segment that is on the "opposite" side of the junction.

Ignore the discussion of "negative current" and "positive current" in Gutierrez et al.. Clarity is best served if one thinks in terms of classical current, i.e. as if it is carried by the movement of positive charge, so that positive current from some point A to another point B means movement of positive charge from A to B. That will also seem most familiar to those users who have a background in electrical engineering or physics, and it will present the least impediment to others.

Post Reply