How to set non-uniform v_init

Managing anatomically complex model cells with the CellBuilder. Importing morphometric data with NEURON's Import3D tool or Robert Cannon's CVAPP. Where to find detailed morphometric data.
Post Reply
Keivan
Posts: 127
Joined: Sat Apr 22, 2006 4:28 am

How to set non-uniform v_init

Post by Keivan » Sat Mar 12, 2011 10:16 am

I'm trying to build a model with nonuniform v_init. I mean dendrites of model should have 2 mV higher resting membrane potential than the soma. Is it possible to do this?

ted
Site Admin
Posts: 5623
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to set non-uniform v_init

Post by ted » Sun Mar 13, 2011 11:48 am

Keivan wrote:I'm trying to build a model with nonuniform v_init. I mean dendrites of model should have 2 mV higher resting membrane potential than the soma. Is it possible to do this?
Yes. But if you want to know how, you must first be very precise about what you are asking for.
I'm trying to build a model with nonuniform v_init. I mean dendrites of model should have 2 mV higher resting membrane potential than the soma.
Please tell me if I understand. You want the following to be true:
at rest, if soma membrane potential is vsoma, the membrane potential in the dendrites should be vsoma + 2.

Keivan
Posts: 127
Joined: Sat Apr 22, 2006 4:28 am

Re: How to set non-uniform v_init

Post by Keivan » Sun Mar 13, 2011 4:54 pm

yes. This is a question about initialization of the model. Density of hyperpolarization activated channels in dendrites are larger than soma. This may cause distal dendrites have a higher resting membrane potential (RMP). At the moment, it takes 200ms to reach asteady state. I'm looking for a way to initialize the model so each region have its own RMP from the begining.

actually I want to use a sigmoid function to have a nonuniform RMP. and I'm using multirun fitter to find the correct RMP(begin) and RMP(end).

ted
Site Admin
Posts: 5623
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

How to initialize to steady state

Post by ted » Sun Mar 13, 2011 9:43 pm

Keivan wrote:At the moment, it takes 200ms to reach asteady state. I'm looking for a way to initialize the model so each region have its own RMP from the begining.
So you have a model with nonuniform membrane properties, and you want to initialize it to steady state--that is, you want the model to be at steady state when t = 0.

We call this "initialization to steady state." Here's how to do it.

1. Put the following code into a file called custominit.hoc

Code: Select all

INITDUR = 200 // # ms to reach steady state

proc init() { local temp
  finitialize(v_init)
  t = -2*INITDUR // jump to a time "before" 0
  temp = cvode.active()
  if (temp != 0) { // if cvode is on, turn it off
    cvode.active(0)
    dt = 0.025
  }
  while (t < -INITDUR) {
    fadvance()
  }
  if (temp != 0) { cvode.active(1) } // turn cvode back on if necessary
  t = 0
  if (cvode.active()) {
    cvode.re_init()
  } else {
    fcurrent()
  }
  frecord_init()
}
2. In your own program, insert the following line
load_file("custominit.hoc")
AFTER your load_file("nrngui.hoc") statement.

When you run a simulation, your model will automatically be in steady state starting at t = 0.

Keivan
Posts: 127
Joined: Sat Apr 22, 2006 4:28 am

Re: How to set non-uniform v_init

Post by Keivan » Mon Mar 14, 2011 3:02 am

Thank you Ted. Your code is actually helpful. But, I'm curious about a way to deal with membrane voltage like other range variables. I want to know how I can assign a value for membrane voltage for each region of the membrane (before start of the simulation). Also, I want a fast method; because I work with multirun fitter. Consider I change parameters during fitting process which alter the steady state. Actually, I want RMP to be one of my parameters I can change during fitting process.

ted
Site Admin
Posts: 5623
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to set non-uniform v_init

Post by ted » Mon Mar 14, 2011 9:33 am

You're asking for the impossible. Any change of channel densities or the voltage-dependence of gating variables will also change resting potential. In a model that has nonuniform membrane properties, any change of length or diameter will also change resting potential. Furthermore, in any model that has nonuniform membrane potential, axial current (current between adjacent compartments) will be nonzero at at least one location in the model. In any of these cases there is only one way to determine the membrane potential at which the net ionic current cancels out the axial current from adjacent sections, and that is to run a simulation and wait while the system approaches a new steady state--assuming that the model even has a steady state, and is not spontaneously active.

Keivan
Posts: 127
Joined: Sat Apr 22, 2006 4:28 am

Re: How to set non-uniform v_init

Post by Keivan » Mon Mar 14, 2011 4:24 pm

I agree with what you said and your answer really helped me in some of my experiments. But still, I'm asking myself: maybe you do not understand my question? please let me explain more. consider the model is in the steady state and has a nonuniform RMP. I just want to save these values of RMP and load them next time I load the model. I want to save that 200 ms it takes to reach a steady state. (and maybe it do not work as I expect because there are many other parameters should be initialized as well). I just want to know how to do this and try it. at least in the computational world we are free to try things and play with them.

ted
Site Admin
Posts: 5623
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to set non-uniform v_init

Post by ted » Mon Mar 14, 2011 5:29 pm

I suppose that, once your model has reached its steady state, you could build a Vector that contains all of the membrane potentials

Code: Select all

objref allvm
allvm = new Vector()
forall for (x,0) allvm.append(v(x))
then write this vector to a file for future use. When you want to restore all the membrane potentials to these values, you could use an FInitializeHandler to call a proc like this:

Code: Select all

proc vrestore() { local ii
  ii = 0
  forall for (x,0) {
    v(x) = allvm.x[ii]
    ii+=1
  }
  finitialize()
  fcurrent()
}
But if any of the model parameters were changed, the cell will not be in its steady state.

Keivan
Posts: 127
Joined: Sat Apr 22, 2006 4:28 am

Re: How to set non-uniform v_init

Post by Keivan » Tue Mar 15, 2011 5:19 am

Thank you very much ted. :)

Post Reply