The NEURON Book: errata and discussion

News about new releases of NEURON, bug fixes, development threads, courses/conferences/workshops, meetings of the NEURON Users' Group etc.
Eric Thomson
Posts: 15
Joined: Thu Mar 02, 2006 11:18 am
Contact:

Figure 11.12

Post by Eric Thomson »

Minor problem: working through Chapter 11 using the GUI to build a net, what I see when I press the weights button is different from what is shown on Figure 11.12.

Namely, on the left-hand-side of the windo, I get a list of numbers that I've entered into the weights numeric field. That is, I get -0.1 // 1 // 2 //0, not the 'IF0->IF1 0' type stuff.

It's all working fine, just a little discrepancy.
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Figure 11.12

Post by ted »

Eric Thomson wrote:Minor problem: working through Chapter 11 using the GUI to build a net, what I see when I press the weights button is different from what is shown on Figure 11.12.
Yep. Just one of many changes--some obvious, but most buried deep in source code--that have occurred since the book was written. Even so, NEURON has not yet attained complete perfection in all aspects. For example, the current version of the "weights" tool is an advance over its original implementation, but could stand further refinement. Suggestions for improvement of anything and everything are welcome.
Eric Thomson
Posts: 15
Joined: Thu Mar 02, 2006 11:18 am
Contact:

Figure 11.17

Post by Eric Thomson »

Thanks Ted you are a machine the way you respond.

Figure 11.17 : I can't reproduce it.

In the Details window from the Variable Time Step GUI, when I click on 'local step' it doesn't put a check mark there.

If 'use variable dt' is already selected in the main VariableTimeStep GUI, then clicking 'local step' does nothing. If 'use variable dt' is not selected (i.e., I was previously in a fixed dt mode), the red check moves from 'C-N Fixed' down to 'Cvode'. But no check mark with 'local step' in either case.
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Figure 11.17

Post by ted »

Eric Thomson wrote:Figure 11.17 : I can't reproduce it.

In the Details window from the Variable Time Step GUI, when I click on 'local step' it doesn't put a check mark there.

If 'use variable dt' is already selected in the main VariableTimeStep GUI, then clicking 'local step' does nothing. If 'use variable dt' is not selected (i.e., I was previously in a fixed dt mode), the red check moves from 'C-N Fixed' down to 'Cvode'. But no check mark with 'local step' in either case.
Works for me. I wonder if you have uncovered a bug. What version of NEURON are you using, and with what OS? If you send me your source code that reproduces this problem as a zip file (not an rar file)--just the hoc, mod, and ses files --no need for any dll, .c, or .o files--and email it to
ted dot carnevale at yale dot edu
I'll try to find out what the cause of the problem may be.
Eric Thomson
Posts: 15
Joined: Thu Mar 02, 2006 11:18 am
Contact:

Re: Figure 11.17

Post by Eric Thomson »

OK, will do when I get home (at lab presently), and will get that information to you. Thanks.
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Figure 11.17

Post by ted »

Now I see what's going on.

When artificial spiking cells were first added to NEURON, they were implemented as point processes, and like any other point process, they had to be attached to a "dummy" or "host" section (nseg = 1, no membrane properties other than cm). The Network Builder tools would automatically create this host section, and hoc code exported from the Netword Builder would include a statement that created the host section (notice the "create acell_home_" statement at the start of Listing 11.2 on page 325). That's how things worked when Chapter 11 was written.

However, since that time a new NMODL keyword for artificial spiking cells was added, called ARTIFICIAL_CELL. By definition, the state variables of an ARTIFICIAL_CELL are described by equations that have analytical solutions, so that, given their present values, their future trajectories are known. In other words, their activity can be calculated algebraically, without having to perform numerical integration. Also, an ARTIFICIAL_CELL does _not_ need to be attached to a host section.

So for at least a couple of years now, if you use the Network Builder to set up a net that involves nothing but ARTIFICIAL_CELLs, the Network Builder does not automatically create a host section, nor does it export a hoc file that contains a create statement.

"Fine. What's that got to do with local variable timestep integration?"

If you have a network model that consists entirely of artificial spiking cells, there are no differential equations that have to be integrated, so there is nothing to be gained by using the local variable timestep method. Remember that in NEURON each artificial spiking cell imposes a computational burden (its states are updated) only when it receives an event, so time steps as such are irrelevant to them.

In principle, I'd think that local variable timestep is relevant only for networks that involve two or more biophysical model cells. However, apparently it is possible to select lvardt even if there is only one biophysical model cell. And the reason that I could select it on Feb. 18 was that the code I was executing was old and contained a statement that created a host cell. When I used the code that you sent me, and when I started from scratch and followed the instructions that you were following, I couldn't select local variable time steps either.

So--not a bug, but yet one more thing to be revised for any future edition of The NEURON Book. Thanks for bringing this to my attention!
Eric Thomson
Posts: 15
Joined: Thu Mar 02, 2006 11:18 am
Contact:

Re: Figure 11.17

Post by Eric Thomson »

ted wrote:[T]he reason that I could select it on Feb. 18 was that the code I was executing was old and contained a statement that created a host cell. When I used the code that you sent me, and when I started from scratch and followed the instructions that you were following, I couldn't select local variable time steps either. So--not a bug, but yet one more thing to be revised for any future edition of The NEURON Book.
Thanks, Ted, for taking a look. Despite the discrepancy, my results seemed perfectly sane, even when I made the neurons quite asynchronous. Thanks for explaining why!
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Page 259

Post by ted »

This is a minor revision of a code comment.

On page 259 in the block of NMODL code, in the comment

Code: Select all

: computed using the "old" value, i.e. ca_pmp_last
an "i" should be prepended to the term ca_pmp_last, so that the comment reads

Code: Select all

: computed using the "old" value, i.e. ica_pmp_last
tmwilliams

Re: The NEURON Book: errata and discussion

Post by tmwilliams »

I was just wondering if any official corrections to The NEURON Book have been published?
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: The NEURON Book: errata and discussion

Post by ted »

tmwilliams wrote:I was just wondering if any official corrections to The NEURON Book have been published?
This thread contains the list of reported errata and corrections. A 2nd edition is being prepared, but until it is published this thread is the authoritative site for reporting/finding errata and corrections.
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Gap junction example

Post by ted »

Several people have had difficulty getting the gap junction example on pages 271-272 to work, for various reasons. The most recent report, which is by tmwilliams and appears to be somewhat different than previous ones, led to the discovery that the example works with current versions of NEURON if the statement

Code: Select all

   g[i] = new Gap()
is changed to

Code: Select all

   g[i] = new Gap(0.5)
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Discussion of calcium pump on page 259

Post by ted »

In the discussion of the calcium pump example on page 259, last paragraph sentence 1 says
"This mechanism WRITEs ica in order to affect [Ca2+]i."

Not so. The mechanism WRITEs ica so that the pump can contribute to charge balance. If the pump were electrically neutral, the mechanism would not have to WRITE any current at all. It affects cai directly by WRITEing cai, which it calculates by integrating the fluxes specified by the three statements that describe the calcium fluxes into compartment 0
ca[0] + pump <-> pumpca
ca[0] << (-(ica = ica_pmp_last)*PI etc.
ca[0] <-> ca[1]
and then assigning the value of ca[0] to cai with the statement
cai = ca[0]

Thanks to Haroon for asking the questions that prompted the discovery of this error.
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Steady state initialization

Post by ted »

Note: the following was originally posted by me on Fri Apr 04, 2008 7:48 pm as a separate thread. I am now merging it with the other NEURON Book errata entries.

========================================================================

Yet another error introduced by the publisher.

On page 197 under
8.4.2 Initializing to steady state
the line

Code: Select all

if (temp! = 0) { cvode.active(1) }
should of course be

Code: Select all

if (temp != 0) { cvode.active(1) }
Memo to myself: the next time a publisher is provided the source files for a manuscript, but insists on retyping everything, cancel the contract. In fact, the contract should stipulate that "retyping anything, except at the request of, and with the consent of, the author(s), is a violation of this contract."
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Page 310: declaration of t0 in IntervalFire

Post by ted »

In the ASSIGNED block of the mod file that defines the IntervalFire artificial spiking cell

Code: Select all

t0(ms)
should be changed to

Code: Select all

t0 (ms)
The absence of the space between the 0 and the ( doesn't seem to cause a problem (NMODL is "smart" enough to treat this as a units declaration), but it is bad for readability and is potentially confusing to users.
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

value of R on page 231

Post by ted »

Marianne Case reported that in 9.6.2 The UNITS block on page 231, the value of R is incorrect. The value used by NEURON is 8.31441
Post Reply