Random initial voltages

Anything that doesn't fit elsewhere.
Post Reply
Ken

Random initial voltages

Post by Ken »

Hi!
I'm new to Neuron and I have a quick question whose answer I couldn't find in the forum.

I just want to initialize each cell in my network to a random voltage potential. I tried different procedures but whatever I do they all start at the same initial voltage.
Any suggestions?

Thanks for your help,
Ken
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Random initial voltages

Post by ted »

Are these biophysical model cells or artificial spiking cells? If the former, are they single compartment or multicompartment models?
Ken

Re: Random initial voltages

Post by Ken »

Sorry I should have been more specific.

These are single compartment biophysical model cells, but I plan to develop multicompartment models in the future.
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Random initial voltages

Post by ted »

Ken wrote:Sorry I should have been more specific.
No need to apologize. I'm just trying to help you formulate your question in such a way that you can discover the best answer for what you really want to do.

So, what kind of initialization do you really want?

NEURON's default initialization is a "steady state homogeneous voltage clamp initialization": imagine each compartment being clamped to the same potential until all other states (such as channel gating states or ionic concentrations) have settled to their steady state values appropriate for that potential, then at t=0 the clamps are turned off. This can be customized in many ways. One variant is "steady state inhomogeneous voltage clamp" in which each compartment is initialized to a different potential. Another variant is to follow the voltage clamp initialization with an abrupt perturbation of membrane potential--this would leave the states in each compartment at their steady state values appropriate for whatever the compartment's clamp initialization potential was, but the actual membrane potential at t=0 would be something else.

Voltage clamp initializations may not be the most appropriate way to deal with models that do not have a steady state, e.g. models cells or networks that receive "spontaneous synaptic input" or generate spontaneous activity. For such models it may be better to "initialize to a saved state", i.e. a state that was captured after the model has gone through a "warmup" run. Experimentalists do something analogous to this every time they allow an experimental preparation to "incubate" or "rest" before starting to stimulate and record.

So which of these alternatives best fits your needs?
A. Steady state homogeneous voltage clamp
B. Steady state inhomogeneous voltage clamp
C. A or B followed by perturbation of membrane potential
D. Initialization to a saved state
Ken

Re: Random initial voltages

Post by Ken »

Thanks for your reply, these are very good points.

I had in mind your situation B, followed by a perturbation of membrane potential.
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Random initial voltages

Post by ted »

Then let me point you to this discussion thread
Initial conditions
viewtopic.php?f=12&t=1427

My post from
Fri Oct 31, 2008 11:54 am
shows how to do almost what you want.

You should first implement a "type B" initialization and make sure that it works, before adding the perturbation of membrane potential. The first steps are
1. Ensure that each cell class template has a SectionList called "all" whose elements will be all the sections in the cell.
2. Define a func f() that returns the values you will use to initialize each compartment.

You should already have a List to which you append each of the cells in your network during model setup. If you like, you can substitute the name of that List for "needcustominit" in proc custominit().

Since you want to initialize each compartment's states to a different membrane potential, you will want to change proc custominit() to

Code: Select all

proc custominit() { local i
  for i = 0, needcustominit.count()-1 {
    forsec needcustominit.o(i).all { // iterate over all sections of this cell
      for (x,0) { // iterate over internal nodes
        v = f() // f() returns the desired initial potential
      }
    }
  }
  finitialize()
}
To save some CPU time during initialization, you can comment out proc init()'s
finitialize(v_init)

At this point you should verify that you're getting a "type B" initialization. Try this on a small net with not more than two or three cells. Verify that initialization forces the voltage-gated states to the steady state values appropriate for their compartment's membrane potential.

Now you're ready to introduce the perturbation of membrane potential. This merely involves inserting another loop into proc custominit(), right after the call to finitialize()--

Code: Select all

  for i = 0, needcustominit.count()-1 {
    forsec needcustominit.o(i).all { // iterate over all sections of this cell
      for (x,0) { // iterate over internal nodes
        v = f() // f() returns the desired initial potential
      }
    }
  }
Finally you must verify that you're getting what you expect to get.
Ken

Re: Random initial voltages

Post by Ken »

Many thanks for our help!
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Random initial voltages

Post by ted »

Thank you for using NEURON in your research. Please be sure to cite NEURON in any publications that result from using it (see How to cite NEURON viewtopic.php?f=22&t=73), and also let me know so I can add your paper(s) to the Bibliography page http://www.neuron.yale.edu/neuron/bib/usednrn.html
Post Reply