QBI NEURON Tutorial

An introductory NEURON tutorial for neuroscientists

A Simple Model

We start with the most basic model possible so we can focus on introducing you to the core components of the NEURON application and navigating the graphical user interface (GUI).

Part A: “Ball and Stick” model

To introduce the sequence of events involved in setting up a model, we will create an extremely simple neuron consisting solely of a soma and a dendrite called a “Ball and Stick” model.

STEP A1: Launch CellBuilder

CellBuilder is a graphical interface used to generate the basic morphology and biophysics of a neuron.
From the Build menu on the Main Menu window, select CellBuilder and read the descriptions provided.

cellbuilder

STEP A2: Create morphology with CellBuilder

First we will specify the two components of our “ball and stick” model: a soma and a dendrite.

  1. First, let’s click on Topology
  2. The components will be displayed graphically in the white canvas region - a soma is created automatically
  3. Create the dendrite component by clicking anywhere on the canvas once
  4. This generates a dend section as specified by Basename which is set by default to dend (Hint: click the button to change)

topol

STEP A3: Specify morphological dimensions

The dimensions of the components we created can now be defined in the Geometry window.

NEURON refers to each component as a section. Each section is divided into one or more segments. A segment is the core fundamental unit consisting of a cylinder of uniform electrotonic characteristics based on cable theory.

The soma and dendrite are each cylindrical sections of uniform dimensions. We can now specify exactly what dimensions we would like them to have.

Section Ref Length (µm) Diameter (µm)
Soma soma 20 20
Dendrite dend 1000 5
  1. Click on Geometry
  2. all should be selected by default - if not, select all in the side panel
  3. Ensure Specify Strategy is ticked.
  4. Select length L, diameter diam from Distinct values over subset
  5. Select d_lambda from Spatial grid (This parameter ensures segments are dynamically distributed - see ref 1).

geo

What is Spatial Grid?

The Spatial Grid here refers to your model and is a computational issue rather than a biological one. A section is divided into one or more segments of uniform conductance properties. A finer Spatial Grid will therefore produce a more accurate result but this will also increase computational time.

The Spatial Grid can be defined three ways:

  1. The nseg button sets the number of segments. More info...
  2. The d_X parameter specifies the spacing of segments by physical length, in µm
  3. The d_lambda parameter specifies the spacing of segments by electrotonic length, expressed as a fraction of the AC length constant at 100 Hz for a cylindrical cable with the same diameter, Ra, and cm. This is often the best choice to use.

It is best practice to make the number of segments equal an odd number with nseg. Why? This will ensure there is always a segment at the centre of the section (0.5).

nsegsection centre
10.5
20.33, 0.66
30.25, 0.5, 0.75

If your code calls for a segment that doesn't exist, then NEURON will round to the nearest segment - this may impact the accuracy of your results.

Now, we need to specify our lengths and diameters:

  1. Unselect Specify Strategy
  2. d-lambda is by default set to 0.1 which is suitable for most models
  3. In the number box next to soma.L (um), enter 20 as per our table above
  4. In the number box next to dend.L (um), enter 1000 as per our table above
  5. In the number box next to soma.diam (um), enter 20 as per our table above
  6. In the number box next to dend.diam (um), enter 5 as per our table above
  7. so that the final result looks like:

geo_done

Ball and Stick

We have now created a neuron with a soma that is a cylinder 20µm long, 20µm wide, with one dendrite protruding out 1000µm long, 5µm wide. Certainly lives up to the name "Ball and Stick"!

STEP A4: Specify biophysical characteristics

The next part of defining the neuron is to specify the biophysical characteristics such as the electrical resistance within the cytoplasm (Ra), the capacitance of the plasma membrane (cm), membrane ion channels, buffers and pumps. NEURON specifies ion channel density by setting the maximum combined conductance (in Siemens) of those channels in that particular segment.

  1. Click on Biophysics
  2. Ensure Specify Strategy is selected.
  3. Ra and cm are uniform in this particular model, so we select the all subset and then click on the Ra and cm checkboxes.
  4. We will add a Hodgkin-Huxley (hh) conductance to soma and dend by selecting each then click on hh

biophys

Now we will add our values:

  1. Now deselect Specify Strategy
  2. Select Ra under all and enter 160
  3. The default for cm is 1 µF/cm^2 which is fine

biophys_all

Inserting ionic conductances

The generic hh conductance is actually composed of three conductances:

  • voltage-gated Na+ channel component
  • voltage-gated K+ channel component
  • the combined passive leak conductance

Note: If you have no hh you will need to add the passive leak conductance by selecting pas in specify strategy.

We will now insert HH into the soma and dendrite.

For the dendrite, we will enter a reduced hh which means altering the standard HH conductances to be 10% of their initial values.

  1. Select hh under dend and enter 10% of the Na+ (gnabar_hh) and K+ (gnakbar_hh) conductance values
  2. No change to leak current of HH (gl_hh)
  3. For the equilibrium potential (el_hh), change this to -64mV

biophys_reducedhh

Save Me

You can save this to a file called bs_cell.ses.

savesession

  1. Set your working directory using the File -> working dir command from the Main Menu window
  2. Enter the file path in the window or double-click on folders as they appear. The ../ will return you to the parent directory.
  3. Select Move To which sets you up in the correct directory.
  4. Under the File -> Save session command, enter the name of the file in the top window (the bottom window is used as a filter only)

STEP A5: Running a simple simulation

We are now ready to load the specifications of our model into the NEURON simulator. We will use the Continuous Create method which is very useful when initially testing a model as it updates parameters in real time.

  1. Click Continuous Create in the CellBuilder window
  2. We will need to create a stimulus which is known as a Point Process so from the Main Menu window, select Tools -> Point Processes -> Managers -> Point Manager
  3. In the PointProcessManager window, click on SelectPointProcess then select IClamp
  4. We will accept the default of soma(0.5) which means the stimulus has been placed in the middle of the soma
  5. We will insert a 0.6nA current of 1ms pulse width starting at del=5ms (a delay allows for initialization of any conductances with dependencies) so enter the values as shown.

pointprocess

  1. Now from the Main Menu window, select Tools->RunControl. This is our stimulus parameter window and is where the simulation is launched.

Run control window parameters

    The following options can be set:
  • Init(mV) : determines the voltage we start at (generally keep this at the resting membrane potential you will expect from your ion channels you have placed in – the further away it is from that, the longer your cell will take to reach an equilibrium at the start
  • Tstop : controls the duration of our experiment, and
  • dt and Points plotted/ms : controls our temporal resolution of the experiments.

runcontrol

  1. We will accept the default values, except for the time, so enter 20 for Tstop(ms).
  2. To see an output of the simulation, from the Main Menu, select Graph -> Voltage axis
  3. Now in the RunControl window, click Init & Run

ap1

Have a look in the graph and you should see your neuron respond to the current.

Now we will rerun the simulator to see the effect of increasing the current injection amplitude.

  1. In the PointProcess window, change 0.6 to 1.0 in the amp(nA)
  2. Now rerun in the RunControl window, by clicking Init & Run and we get a lovely AP.

ap2

STEP A6 Save Me

You can save this to a file called bs_iclamprig.ses. (Saving to a new file separates our simulation from our cell.)

Part B: Simple neuron model

We have covered the basics of creating a simple model and simulation. We can now turn our “Ball and Stick” model into a “Simple neuron” by replacing our single dendrite with a tree of branching apical dendrites with the following characteristics:

Section Ref Length (µm) Diameter (µm) Biophysics
Apical dendrite ap 400 2 reduced hh
Apical dendrite branch ap[1] 300 1 reduced hh
Apical dendrite branch ap[2] 300 1 reduced hh

STEP B1: Reloading sessions

A saved session can now be reloaded with all the parameters and windows already set.

  1. Close down the NEURON application via File -> Quit
  2. Restart with nrngui
  3. You may need to return to your working directory with File -> recent dir
  4. Under File -> Load session, select the bs_cell.ses session created above

STEP B2: Modifying neurons

We will now modify the topology of the “ball and stick” neuron.

simpleneuron

  1. From the CellBuilder, select Topology
  2. Select Delete Section then click on dend to remove this

basename

  1. Click on Basename and type in ap and Accept
  2. Click on Make Section
  3. Create two apical dendrite components by clicking anywhere on the canvas (twice!)
  4. Add a third dendrite as a branch by click and hold from the joint of the first two dendrites, then drag and release. Errors can be rectified by selecting the commands as required.
  5. This generates ap (root), ap[1] and ap[2]

canvas

STEP B3: Creating subsets

  1. As they share common properties, we will group the dendrite components so click on Subsets
  2. Click on Select Subtree
  3. Click on the ap segment (root of the subtree)
  4. Click on New Section List
  5. In the popup window, enter apicals and Accept
  6. This new list should appear in the sets.

subsets

STEP B4: Modifying parameters - Geometry

We will need to specify the morphological characteristics of the new dendrites

  1. Click on Geometry
  2. Ensure Specify Strategy is unticked
  3. Enter the lengths and diameters of the ap sections as per the table

strategy_done

STEP B5: Modifying parameters - Biophysics

For all the dendrites, we need to enter a reduced HH which means altering the standard HH conductances to be 10% of their initial values.

  1. Click on Biophysics
  2. Ensure Specify Strategy is ticked
  3. Select apicals then tick hh

biophys2

  1. Now untick Specify Strategy
  2. Select hh under apicals and enter 10% of the Na+ (gnabar_hh) and K+ (gnakbar_hh) conductance values
  3. No change to leak current of HH (gl_hh)
  4. For the equilibrium potential (el_hh), change this to -64mV

biophys_reducedhh2

STEP B6: Save Me

You can save this to a file called simple_cell.ses.


B. EXPERIMENTS

Now it’s time for you to complete the simple neuron. To check you’ve got the hang of it, go back to the CellBuilder and add a basal dendrite and an axon with the following characteristics:

Section Ref Length (µm) Diameter (µm) Biophysics
Basal dendrite bas 200 3 pas (e_pas =-65mV)
Axon axon 800 1 hh

Don’t forget to save your changes to simple_cell.ses

SimpleNeuron_complete

Resources

Using the CellBuilder

Units in NEURON

Back | Lesson 2 | Next