Page **3** of **3**

### for (var) stmt example

Posted: **Thu Sep 16, 2010 2:42 am**

by **neuromau**

What about this? P. 114, section 5.6.4: Working with range variables. It gives an example for iterating over each node including 0 and 1, and then a 'variant' that excludes 0 and 1, but the variant is the same as the original syntax:

Thanks,

Marianne

### Re: for (var) stmt example

Posted: **Thu Sep 16, 2010 11:50 am**

by **ted**

Another one! To exclude the nodes at 0 and 1, the statement should be

### Backslash is not a line continuation character in NMODL

Posted: **Sun Sep 26, 2010 11:12 am**

by **ted**

Several NMODL listings with statements that extend over more than one line contain backslash characters ("\").* This will generate an error message about an "illegal block" when compiled with mknrndll or nrnivmodl--because NMODL does not use backslash or any other character as a "line continuation character." Just omit the backslash and the code will compile properly.

Thanks to nianwosuh for pointing out this error!

*--examples include:

Listing 9.8 on page 249

and

examples of LONGITUDINAL_DIFFUSION usage page 253

the revised KINETIC block on page 259

the code excerpt on page 279

### model of continuous transmitter release--p. 269 and Fig. 10.

Posted: **Wed Sep 29, 2010 10:13 am**

by **ted**

It appears that the code used to generate Fig. 10.2 in The NEURON Book (time course of presynaptic cai and other variables in a model of graded transmitter release) employed different values for L and diam of the presynaptic terminal than what is described on page 269.

preterm (name of the section that is the presynaptic terminal) is described as "a 1 um diameter hemisphere" so

volume = 1/2 * 4/3 * PI *(1/2)^3 = PI/12 um3

area = 1/2 * 4*PI*(1/2)^2 = PI/2 um2 (curved surface only; ignore the area of the flat face which in this model is presumed to be free of ion channels)

A section with length L and diameter diam has

volume = PI*L*(diam/2)^2 = PI*L*diam^2 / 4

area = PI*L*diam

so

diam = 4*volume/area = 2/3 um

L = area/PI/diam = 3/4 um

and surface/volume ratio is 6/um

But looking at the source code used to generate the figure I see that somehow the actual values employed were

diam = 1/PI/2 = 0.1591549 . . . um

L = 1 um

so the surface area of the presynaptic terminal was actually 0.5 um2

and its volume was 0.01989436 . . . um3

so surface/volume ratio was much larger--more than 25.

This means that the computational model generated peak calcium concentrations that were too large--maybe more than 4 times too large.

This will be corrected in the second edition of The NEURON Book.

### Re: The NEURON Book: errata and discussion

Posted: **Tue Aug 16, 2011 11:14 pm**

by **ted**

Page 151 paragraph 2 line 2

Fig. 1.27

should be

Fig. 1.29

### Re: The NEURON Book: errata and discussion

Posted: **Wed Jul 10, 2013 1:07 pm**

by **oregoneuron**

In the code on page 279, there is a ) left off from the end of the last line of code, i.e. in the book the line is:

cell[20].axon ncl.append(new NetCon(&v(1), syn, threshold, delay, weight)

It should be:

cell[20].axon ncl.append(new NetCon(&v(1), syn, threshold, delay, weight))

### Accuracy in values in the lambda rule.

Posted: **Fri May 02, 2014 3:51 am**

by **Nin**

In page 122 of the NEURON book, the calculation of the length constant with the lamba_DC method for the following parameters:

Ra = 180 (Ohm*cm^2), diam = 1 ( um) and Cm =1 (in uF/cm^2) is expected to be approximately 225 um.

However, when implementing the calculation of the length constant as a function of the AC frequency (equation 5.2 of the book), the value is approximately 210

Code: Select all

```
//=========================================================================
// calculate the space constant in response to a AC current
// lamda_AC(f) = 1/2*sqrt(diam/PI*f*Ra*Cm)
//=========================================================================
func lambda_f() { local diam, Cm, Rm
diam = 1 // in um
Cm = 1 // in uF/cm^2
Ra = 180 // in Ohm*cm^2
return 1e5*sqrt( diam / (4*PI*$1*Ra*Cm)) // in um
}
```

The exact value for lambda_AC(100) returned is 210.2610

Similarly, the length constant calculated for a DC current for the following values:

Ra = 180 (Ohm*cm^2), diam = 1 ( um) and Cm =1 (in uF/cm^2), Rm = 16000 (in Ohm*cm)

was reported to be 500 um. The implementation of the formula to calculate the DC length constant

would give us a value of 417.4045 um.

Code: Select all

```
//=========================================================================
// calculate the space constant in response to a DC current
// lamda_DC() = 1/2*sqrt(diam*Rm/Ra)
//=========================================================================
func lambda_DC() { local diam, Rm, Ra
diam = 1e-4 // in cm
Ra = 180. // in Ohm*cm^2
Rm = 16000 // in Ohm*cm
return 1e4*sqrt( (diam*Rm)/(4*Ra) )// in um
}
```

Although the values are pretty similar, I was a little confused about these differences.

### Re: Accuracy in values in the lambda rule.

Posted: **Fri May 02, 2014 12:45 pm**

by **ted**

Nin wrote:Although the values are pretty similar, I was a little confused about these differences.

So am I, Jose. Thanks for discovering these errors. I think they're from a very early draft of that chapter, for a model that had different parameters than the one I finally settled on.