Step 1. Create an "unoptimized" model

If this were a "real" problem, we'd have to convert our morphometric data to a form that NEURON can use (e.g. using NEURON's Import3D tool to import it into a CellBuilder). Then we'd use the CellBuilder to specify the discretization strategy and insert Ra, cm, and the pas mechanism (see the CellBuilder tutorial).

For your convenience, I have already

and saved the results to
This link will get you, which contains plus other files that are used in this exercise.

Step 2. Set up a current clamp experiment on this model

Remember that the charging transient was elicited by applying a 1 nA current pulse that started at 1 ms and lasted 0.5 ms, and the entire recording was 200 ms long. We need to construct a "virtual experimental rig" that applies the same current to the soma of our model.

So we start nrngui and use the NEURON Main Menu toolbar to load
Then we create

Now we run a simulation and find that somatic Vm is a far cry from the original experimental data.

Project management time!

Before going any further, we should use the Print & File Window Manager to save a session file that contains the "virtual experimental rig" (the RunControl panel, PointProcessManager, and graphs, but not the CellBuilder). This can be called anything we like (I called it "").

To make it easy for us to recreate our current clamp experiment, we next create a file called init_iclamprawmodel.hoc that contains these statements :

Using NEURON to execute init_iclamprawmodel.hoc loads our unoptimized model, and brings up our current clamp rig, ready to go.

What about input resistance?

Oops. Almost forgot this. We have to verify that RN of our model cell matches the experimentally measured value.

Let's take advantage of NEURON's Impedance class, which has an input() method that computes the input impedance at a specified location. Here's a bit of code that does the job :

  objref zz
  zz = new Impedance()

  func rn() { local rn
    init()  // make sure all changes to g, c, ri etc. have taken effect
    soma zz.loc(0.5)  // sets origin for impedance calculations to middle of soma
    zz.compute(0)  // DC input R
    soma { rn = zz.input(0.5) }  // rn is input R at middle of the soma
    return rn
Just cut and paste this into a file called rn.hoc

Finally, let's add these lines to the end of init_iclamprawmodel.hoc :


  print "DC input resistance of cell is ", rn(), "megohms"
Now when we use NEURON to execute init_iclamprawmodel.hoc , it automatically uses rn() to report RN of our model and then runs a simulation that shows the transient response.

Here's what the revised init_iclamprawmodel.hoc tells us:

  DC input resistance of cell is 5.6534218 megohms
Nowhere near the experimentally measured 153 megohms.


Next we will bring up a MultipleRunFitter and configure it to do a "run fitness" optimization.

[ Outline | Next ]

Copyright © 2004-2012 by N.T. Carnevale and M.L. Hines, All Rights Reserved.