///////////////////////// /* model specification */ ///////////////////////// /////// topology //////// create soma, apical, basilar, axon connect apical(0), soma(1) connect basilar(0), soma(0) connect axon(0), soma(0) access soma /////// geometry //////// //To calculate number of segments use formula: (pg. 29, Chapter 5 of the NEURON book): //forall {nseg = int((L/(0.1*lambda_f(100))+0.9)/2)*2 + 1} //forall {print nseg} //This makes use of the function included in standard NEURON library (stdlib.hoc) //func lambda_f() { // currently accessed section, $1 == frequency //return 1e5*sqrt(diam/(4*PI*$1*Ra*cm)) //} soma { L = 30 diam = 30 nseg = 1 } apical { L = 600 diam = 1 nseg = 23 } basilar { L = 200 diam = 2 nseg = 5 } axon { L = 1000 diam = 1 nseg = 3 } /////// biophysics ////// forall { Ra = 100 cm = 1 } soma { insert hh } apical { insert pas g_pas = 0.0002 e_pas = -65 } basilar { insert pas g_pas = 0.0002 e_pas = -65 } axon { insert hh } func conductance() { return 0.12 - 0.12*$1 } forsec "axon" { for (x) gnabar_hh(x) = conductance(x) for (x) print "pos = ", x, "condunctance = ", gnabar_hh(x) } // alternative listing: //access axon //for (x) gnabar_hh(x) = conductance(x) //for (x) print "pos = ", x, "condunctance = ", axon.gnabar_hh(x)