Question about initialization in Bartos' 2002 network model

Where are they and what do they have?

Moderator: tom_morse

Post Reply
breakwave922

Question about initialization in Bartos' 2002 network model

Post by breakwave922 »

Hi,

I've been very confused on how to initialize of cells' resting potential at the beginning of the simulation.
In Batros' 2002 network model (modelDB link http://senselab.med.yale.edu/modeldb/Sh ... odel=21329), it was realized by only setting cell.soma.v =rdv.repick() (rdv.repick() is for picking up any voltage value from (-64.99,-65)mV), and it works; 200 cells have different soma voltages at the start time of the simulation run.
But when I used this approach in my network, or even in the single cell, it didn't work at all. Whatever value I set to cell.soma.v, the soma voltage at beginning is always -65mV.
Is there some part I missed in Bartos' code?
According to Neuron Book chapter 8, initialization couldn't be so straightforward as only setting cell.soma.v in the initial part of the code, right? But it works in Bartos' model. So I'm totally lost.

Many thanks in advance.
ted
Site Admin
Posts: 6354
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Question about initialization in Bartos' 2002 network mo

Post by ted »

You're probably calling finitialize(-65). Called with no argument, finitialize() does an "infinitely long voltage clamp" initialization of each compartment at whatever membrane potential it had previously; with a numerical argument, membrane potential is set to the same value everywhere.
breakwave922

Re: Question about initialization in Bartos' 2002 network mo

Post by breakwave922 »

Hi, Ted,

Here is what I did, set cell.soma.v(0.5)=-70, and then call finitialize(). Then when I check soma voltage, it's always -65mV.
ted
Site Admin
Posts: 6354
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Question about initialization in Bartos' 2002 network mo

Post by ted »

Start NEURON, then at the oc> prompt manually execute the following sequence of commands and see if you get the same results:

Code: Select all

oc>create soma
oc>soma.v = -70
oc>finitialize()
	1 
oc>soma.v
	-70 
oc>soma.v = -100
oc>finitialize()
	1 
oc>soma.v
	-100 
oc>soma insert hh
oc>finitialize()
	1 
oc>soma.v
	-100 
If you got different results, there's a bug in the version of NEURON that is installed on your computer. If you got the same results when executing this simple sequence, but when you "set cell.soma.v(0.5)=-70, then call finitialize(), and then check soma voltage, it's always -65mV" perhaps your code is revealing an obscure bug in NEURON. Can you send me code that will replicate what you see?
breakwave922

Re: Question about initialization in Bartos' 2002 network mo

Post by breakwave922 »

Hi, Ted,

Thank you so much for you reply and patience. Yes, I executed the simple sequence that you suggested, and got different results.

Here is my code:

Code: Select all

load_file("nrngui.hoc")
//cvode_active(1)
load_file("stdgui.hoc")
load_file("LAcell_template_New.hoc") // Change the template file according to cell-type needed
//load_file("Main.hoc")
//load_file("BgGen.hoc")
//load_file("function_ToneGen.hoc")



///// pyramidal graphs scale ////
xmin_Pyr = 0
xmax_Pyr = 2000
ymin_Pyr = -80
ymax_Pyr = 40

///// simulation control ////
secondorder = 2
dt = 0.02	// (ms)
tstop = 1000//80500	// (ms)

/////////////////////////
// Cells Specification //
/////////////////////////

objref cell_3
cell_3 = new Cell_CNE()

/////////////////////
// Instrumentation //
/////////////////////
///// pyramidal current clamp ////
delay_Pyr = 100		//(ms)
duration_Pyr = 600//(ms)
amplitude_Pyr = 400	//(pA)


///// current clamp ////
objref  ccl, cclA, cclB, cclC, cclI

cell_3.soma cclA = new currentclamp(0.5)
cclA.del = delay_Pyr		// (ms)
cclA.dur = duration_Pyr		// (ms)
cclA.amp = amplitude_Pyr*1e-3	// (nA)

celsius = 31
//v_init = -50//-70
cell_3.soma.v(0.5)=-70
finitialize()

access cell_3.soma
nseg_soma = 1
R_S = ri(1/(nseg_soma*2))
R_S_2 = ri(1)
for (x) print x, area(x), ri(x)
access cell_3.dend
nseg_api = 1
R_api = ri(1/(nseg_api*2))
for (x) print x, area(x), ri(x)
access cell_3.p_dend
nseg_basal = 1
R_b = ri(1/(nseg_basal*2))
for (x) print x, area(x), ri(x)

/////////////////////////////////////////////////////////////
/////////////////////   Synapse model   ////////////////////
/////////////////////////////////////////////////////////////




///////////////////////////////////////////////////////////////////////////////
SubVBoxNum = 4
objref MainHBoxObj,SubVBoxObj[SubVBoxNum]

proc MainBox() { local i
		MainHBoxObj = new HBox()
		for i=0,SubVBoxNum-1 SubVBoxObj[i] = new VBox()
		SubVBoxObj[0].intercept(1)
			newPlotVoltage1()
			newPlotVoltage2()
			newPlotVoltage3()
		SubVBoxObj[0].intercept(0)
		SubVBoxObj[1].intercept(1)			
			newPlotCurrent() 
			newPlotCurrent2()
		SubVBoxObj[1].intercept(0)
		SubVBoxObj[2].intercept(1)
			access cell_3.soma
			nrnsecmenu(.5,1)
			access cell_3.dend
			nrnsecmenu(.5,1)	
			access cell_3.p_dend
			nrnsecmenu(.5,1)			
		SubVBoxObj[2].intercept(0)
		SubVBoxObj[3].intercept(1)
			nrncontrolmenu()
			xpanel(" ")
				xbutton("QUIT","quit()")
			xpanel(0)
			nrnpointmenu(cclA)
		SubVBoxObj[3].intercept(0)
		MainHBoxObj.intercept(1)
			for i=0,SubVBoxNum-1 SubVBoxObj[i].map()
		MainHBoxObj.intercept(0)
		MainHBoxObj.map("Re-Tune",10,25,800,600)
}

strdef tstr,tstr1

proc newPlotVoltage1() {
	newPlot(0,tstop,-100,50)
	graphItem.save_name("graphList[0].")
	graphList[0].append(graphItem)
	graphItem.addexpr("cell_3.soma.v(.5)")
	graphItem.label(.08,.925,"mV")
}
proc newPlotVoltage2() {
	newPlot(0,tstop,-100,50)
	graphItem.save_name("graphList[0].")
	graphList[0].append(graphItem)
	graphItem.addexpr("cell_3.dend.v(.5)")
	graphItem.label(.08,.925,"mV")
}
proc newPlotVoltage3() {
	newPlot(0,tstop,-100,50)
	graphItem.save_name("graphList[0].")
	graphList[0].append(graphItem)
	graphItem.addexpr("cell_3.p_dend.v(.5)")
	graphItem.label(.08,.925,"mV")
}
proc newPlotCurrent() {
	newPlot(0,tstop,-0.2,0.2)
	graphItem.save_name("graphList[2].")
	graphList[1].append(graphItem)
	graphItem.addexpr("(cell_3.dend.v(0.5)- cell_3.soma.v(0.5))/(R_S + R_api)",1,2)  // (0.016129))/(0.0382 + 12.16)",1,2)
	//graphItem.addexpr("cell_3.soma.ik",2,2)
	//tstr1 = units(&cell_3.soma.ina)
	//graphItem.label(.08,.925,tstr1)
}

proc newPlotCurrent2() {
	newPlot(0,tstop,-0.3,0.15)
	graphItem.save_name("graphList[2].")
	graphList[1].append(graphItem)
	graphItem.addexpr("(cell_3.p_dend.v(0.5) - cell_3.soma.v(0.5))/(R_S_2 + R_b)",1,2)
	//graphItem.addexpr("cell_3.dend.ik",2,2)
	//tstr1 = units(&cell_3.dend.ina)
	//graphItem.label(.08,.925,tstr1)
}

MainBox()
run()
breakwave922

Re: Question about initialization in Bartos' 2002 network mo

Post by breakwave922 »

Sorry, Ted, to mislead you. What I mean by "got different results", is I got the same results with what you showed, i.e. -70mV, -100mV, and -100mV respectively.
ted
Site Admin
Posts: 6354
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Question about initialization in Bartos' 2002 network mo

Post by ted »

The cause of your problem is now revealed: you're not doing what Bartos et al. did, after all. Your "custom initialization statements"
cell_3.soma.v(0.5)=-70
finitialize()
are buried in the middle of the model specification code (statements that specify the anatomical and biophysical properties of your model cell), and the effect they have is undone later when the program calls run(). Why? Examine nrn/lib/hoc/stdrun.hoc, and you'll see that proc run() calls proc stdinit() which in turn calls proc init(), where proc init() is

Code: Select all

proc init() {
  finitialize(v_init)
}
So it is no surprise that everything starts out at v_init, which by default is -65 mV.

Why didn't this happen to Bartos et al.? Their code didn't call run(); instead they used their own homebrew "initialize and run" code that didn't undo their custom initialization.

Better than what they did would be to adopt a strategy similar to the custom initializations described in chapter 8 of the NEURON Book: write your own proc init(), and put in it the stuff that accomplishes the specific perturbations you want. This will do the job:

Code: Select all

proc init() {
  finitialize(v_init) // ensures that everything is initialized to v_init
  cell_3.soma.v(0.5)=-70
  finitialize() // perturbs cell_3.soma.v(0.5) but leaves everything else at v_init 
}
Put it in your program _after_ the "model specification" code. When the hoc interpreter parses your program, your custom proc init() will replace the one that was loaded into NEURON when the
load_file("nrngui.hoc")
statement was executed, and every time you execute run(), your model will undergo the custom initialization that you wanted.
breakwave922

Re: Question about initialization in Bartos' 2002 network mo

Post by breakwave922 »

Ted,

Thank you very much for your help. I think I'm clear now.
Post Reply