I have found several examples for creating gap junctions using hoc; some form of:
Code: Select all
gap_ = new Gap(0.5)
Moderator: hines
Code: Select all
gap_ = new Gap(0.5)
Code: Select all
g = h.gap(0.5, sec = soma)
Put the mod file in the same directory as your model's hoc or python file(s), then compile it by running mknrndll or nrnivmodl on that directory; if you need help with that, look in NEURON's FAQ list (see link at http://www.neuron.yale.edu/neuron/docs) for how to compile mod files. The next time you run NEURON from that directory, NEURON will automatically load the compiled code for the new mechanism and it will be available for your python- or hoc-specified model.maxwellphenderson wrote:Also just to add a bit more: I have found that the file gap.mod exists and currently is in the directory
Code: Select all
modlunit gap.mod
Code: Select all
from neuron import *
from neuron import h as nrn
from numpy import *
from pylab import *
print h.dt
1. The command that compiles mod files under UNIX, Linux, and OS X, is nrnivmodl. modlunit checks a mod file for consistency of units.maxwellphenderson wrote:When I try to follow the commands for compiling gap.mod:
I receive the error:Code: Select all
modlunit gap.mod
modlunit: command not found
Code: Select all
g = h.gap()
print g
Code: Select all
a g.loc(0.9999)
setpointer g.vap, b.v(0.0001)
Code: Select all
#create sections
soma = h.Section()
soma1 = h.Section()
# Insert gap junction
gap_junction = h.gap(0.9999, sec=soma)
gap_junction.r = 1.0
# Connect gap junction to pre-synaptic cell
h.setpointer(gap_junction._ref_vgap, '_ref_v', soma1(0.0001)._ref_v)