Where to find squid.hoc associated with hh.mod

NMODL and the Channel Builder.
Post Reply
pascal
Posts: 62
Joined: Thu Apr 26, 2012 11:51 am

Where to find squid.hoc associated with hh.mod

Post by pascal » Tue Oct 09, 2018 12:13 pm

I am learning to write my own MOD files, and I'm starting with hh.mod as a learning tool. The comment section in hh.mod says to see squid.hoc as an example of the hh mechanism's implementation...but I cannot find squid.hoc anywhere. It's not in my installation of NEURON, and I can't find it anywhere online. A pointer in the right direction would be appreciated. Thanks.

pascal
Posts: 62
Joined: Thu Apr 26, 2012 11:51 am

Re: Where to find squid.hoc associated with hh.mod

Post by pascal » Tue Oct 09, 2018 5:43 pm

Okay, I believe I found it here: https://github.com/neurodroid/neurodroi ... /squid.hoc

Here is the code:

Code: Select all

/* Squid giant axon ap */

load_file("stdrun.hoc")

/* Print v at every time step */
proc advance() {
    fadvance()
    print "ND ", v
}

create axon
access axon
insert hh

gnabar_hh = gna
gkbar_hh = gk

objref ic
ic = new IClamp(0)
ic.dur = 0.5 /* ms */
ic.amp = 50  /* nA */

print "ND dt ", dt 
run()
But this raises a new question: hh.mod includes the lines USEION na READ ena WRITE ina and USEION k READ ek WRITE ik. Where are 'ena' and 'ek' initialized? It doesn't happen in hh.mod, nor does it happen in squid.hoc. In reading the documentation on ion_style(), it seems that the initialization of these reversal potentials is done somewhere under the hood.

Are there standard values for intracellular/extracellular concentrations of these ions that are used to initialize the reversal potentials? And what would be the best way to use my own custom values for these reversal potentials?

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

Re: Where to find squid.hoc associated with hh.mod

Post by ted » Tue Oct 09, 2018 10:56 pm

Okay, I believe I found it here:
Nope. The COMMENT block at the start of hh.mod was apparently written by Stuart Jaslove in 1992, a time at which NEURON was known only to a small circle of people. Stuart was at Duke then, where he interacted with Michael Hines and John Moore. That was well before the time of Christoph Schmidt-Hieber, who set up the github archive you discovered.
Are there standard values for intracellular/extracellular concentrations of these ions that are used to initialize the reversal potentials? And what would be the best way to use my own custom values for these reversal potentials?
Good questions. The answers are in chapters 8 and 9 of The NEURON Book. Chapter 9 is a deep introduction to NMODL. Chapter 8 discusses initialization in detail. If you don't have the book, get these preprints of those chapters:
https://www.neuron.yale.edu/ftp/ted/boo ... xedref.pdf
https://www.neuron.yale.edu/ftp/ted/boo ... xedref.pdf

It'll take some time to read that material. You may find it faster to start by reading
https://www.neuron.yale.edu/neuron/stat ... modl2.html
especially the stuff about USEION
and
https://www.neuron.yale.edu/neuron/stat ... /ions.html

Basically, NEURON knows nothing about any ions or their equilibrium potentials unless your model has at least one mechanism with a USEION statement that names the ion. The ion names na and k are special, in that NEURON "knows" default values of initial values for their intra- and extracellular concentrations and their equilibrium potentials--but those default values are appropriate only for squid axon at 6.3 degC.

If your model knows about some ion foo but doesn't have an ion accumulation mechanism for foo (that is, it doesn't have a mechanism that WRITEs the intra- and/or extracellular concentration of foo), then foo's equilibrium potential efoo is simply a constant parameter, and you can give efoo whatever value you like with a simple assignment statement as in these examples:

// hoc example
efoo = -80

# Python example
h.efoo = -80

If your model DOES have a mechanism that WRITEs fooi and/or fooo (intracellular and extracellular concentrations of foo, respectively), then by default efoo will be calculated from the Nernst equation at every fadvance().

You might wonder how to initialize ionic concentrations to desired values. The appropriate answer depends on exactly what you are trying to achieve; you'll find chapter 8 to be very informative about this.

pascal
Posts: 62
Joined: Thu Apr 26, 2012 11:51 am

Re: Where to find squid.hoc associated with hh.mod

Post by pascal » Wed Oct 10, 2018 11:04 am

Thanks for the resources, Ted. I'll read through them and get back to you if I have any more questions.

Post Reply