Building a cell without the cell reader

Chapter 14 of the BoG develops the script tutorial3.g to add Hodgkin-Huxley Na and K channels to the single soma compartment that was created in tutorial2.g. The newer version newtutorial3.g is similar, but uses the preferred tabchannel object.

In either case, the channel is created by calling a function in an included file, as described later in the "Building a cell the easy way" tutorial. However, instead of using the cell reader to put the channels in the right place in the element hierarchy and to connect them to the soma, the scripts use statements like:

// Create two channels, "/cell/soma/Na_squid_hh" and "/cell/soma/K_squid_hh"
pushe /cell/soma
make_Na_hh_tchan
make_K_hh_tchan
pope

// The soma needs to know the value of the channel conductance
// and equilibrium potential in order to calculate the current
// through the channel.  The channel calculates its conductance
// using the current value of the soma membrane potential.

addmsg /cell/soma/Na_hh_tchan /cell/soma CHANNEL Gk Ek
addmsg /cell/soma /cell/soma/Na_hh_tchan VOLTAGE Vm
addmsg /cell/soma/K_hh_tchan /cell/soma CHANNEL Gk Ek
addmsg /cell/soma /cell/soma/K_hh_tchan VOLTAGE Vm

In tutorial4.g, developed in BoG Chapter 15, a dendrite compartment is created, and then connected to the soma with statements like:

addmsg /cell/dend /cell/soma RAXIAL Ra previous_state
addmsg /cell/soma /cell/dend AXIAL  previous_state

In the first message, the dendrite compartment is linked to the soma with a message of the type RAXIAL, and a message link is established whereby two value fields, Ra and previous_state, will be sent from the dendrite to the soma at each simulation step. This allows the soma to calculate the current entering from the dendrite compartment. The previous_state field gives the value of the membrane potential at the previous integration step. We use this field rather than Vm because we want each compartment to update its data fields using data from the previous simulation step.

This establishes the information flow from the dendrite to the soma. In the reverse direction, the dendrite needs to receive the value of the soma's previous membrane potential in order to update its own state. (The dendrite already knows its own axial resistance to the soma, so the AXIAL message need not include information regarding axial resistance.)

The section of this tutorial on Making synaptic connections describes the spike generator that the cell reader adds to the soma. In tutorial4.g, this is accomplished with the statements:

// add a spike generator to the soma
create spikegen /cell/soma/spike
setfield /cell/soma/spike  thresh 0  abs_refract 0.010  output_amp 1
/* use the soma membrane potential to drive the spike generator */
addmsg  /cell/soma  {path}/soma/spike  INPUT Vm

The use of the spikegen object is described in the Reference Manual section on Synaptic Connections and in the documentation for the spikegen object.