Effects of spinal cord stimulation on WDR dorsal horn network (Zhang et al 2014)

 Download zip file   Auto-launch 
Help downloading and running models
Accession:168414
" ... To study the mechanisms underlying SCS (Spinal cord stimulation), we constructed a biophysically-based network model of the dorsal horn circuit consisting of interconnected dorsal horn interneurons and a wide dynamic range (WDR) projection neuron and representations of both local and surround receptive field inhibition. We validated the network model by reproducing cellular and network responses relevant to pain processing including wind-up, A-fiber mediated inhibition, and surround receptive field inhibition. ..." See paper for more.
Reference:
1 . Zhang TC, Janik JJ, Grill WM (2014) Modeling effects of spinal cord stimulation on wide-dynamic range dorsal horn neurons: influence of stimulation frequency and GABAergic inhibition. J Neurophysiol 112:552-67 [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism:
Cell Type(s): Wide dynamic range neuron;
Channel(s):
Gap Junctions:
Receptor(s): GabaA; AMPA; NMDA; Glutamate; Glycine;
Gene(s):
Transmitter(s):
Simulation Environment: NEURON;
Model Concept(s):
Implementer(s): Zhang, Tianhe [tz5@duke.edu];
Search NeuronDB for information about:  GabaA; AMPA; NMDA; Glutamate; Glycine;
/
ZhangEtAl2014
A Fiber Inhibition
Analyzer.m
CellTemplates.hoc
CellTemplates_OneEX_Multiconn_ERev_TenthKCA.txt
CellTempList.dat *
CellTypeVector.txt *
CellVector.txt *
ClusterDemo.q
Connectivities_Surround_ERev_70.xls
Coordinates_Trial.xlsx *
DelayVector.txt *
EX_Cell_filenames.dat *
EX_Cell_filenamesH.dat *
EX_Cell_filenamesM.dat *
ExpParams_Prefinal.xls
Fig5_Spikes.mat
Fig5_Spikes_Grouped.mat
FromVector.txt *
IN_Cell_SynapseID.dat
IN_Cell_Synapses_OneEX_Zone2_SCS.txt *
interneuron.hoc *
MakeNetwork.hoc
nrnmech.dll *
RunSim_EP.hoc
RunSim_NoEP.hoc
S_NetStim_SynapseID.dat *
SG_Cell_filenames.dat *
SG_Cell_filenamesH.dat *
SG_Cell_filenamesM.dat *
SG_Cell_SynapseID.dat *
SG_Cell_Synapses_OneEX_Zone2_SCS.txt *
SGSCS_Cell_filenames.dat *
SGSCS_Cell_filenamesH.dat *
SGSCS_Cell_filenamesM.dat *
SGSCS_Cell_SynapseID.dat *
SGSCS_Cell_Synapses_OneEX_Zone2_SCS.txt *
Shell.hoc
Shell_NoEP.hoc
SpikeStatsVector.txt
SpikeTimesVector.txt
SynapseVector.txt *
T_Cell_filenames.dat *
T_Cell_filenamesH.dat *
T_Cell_filenamesM.dat *
T_Cell_SynapseID.dat *
T_Cell_Synapses_OneEX_Zone2_SCS.txt *
ThresholdVector.txt *
ToVector.txt *
WeightVector.txt
XVector.txt *
YVector.txt *
ZVector.txt *
                            
load_file("nrngui.hoc")
//load_file("MakeNetMATLAB.hoc")

objref netcon, vec, spikes, nil, graster

objref SpikeStatsFile, numspikes


proc TempInit(){
	celsius = 36 //According to Aguiar
	dt = 0.0125 // Smaller than default 0.025ms dt.
}

TempInit()


proc SynapseInit(){ //Initializes synapses by specifying the number of synapses and importing spike times.  Also sets tstop.
	numspikes = new Vector()
	SpikeStatsFile = new File()
	SpikeStatsFile.ropen("SpikeStatsVector.txt")
	numsources = SpikeStatsFile.scanvar()
	numspikes.scanf(SpikeStatsFile, numsources)
	tstop = SpikeStatsFile.scanvar()
	SpikeStatsFile.close()

}

SynapseInit()

objref SpikeVectorFile, SpikeVector[numspikes.size()]

proc SynapseLoad(){ local k //Loads synapse event times into vectors, which will be themselves inserted into the appropriate synapse using the netcon.event command.

	SpikeVectorFile = new File()
	SpikeVectorFile.ropen("SpikeTimesVector.txt")
	for k=0, numspikes.size()-1{
		SpikeVector[k] = new Vector(numspikes.x[k], 0)
		SpikeVector[k].scantil(SpikeVectorFile, -1e15)
	}
	SpikeVectorFile.close()
}

SynapseLoad()

objref fih

fih = new FInitializeHandler("loadqueue()")

proc loadqueue() { local j
	for k = 0, numspikes.size()-1 {
		for j=0, numspikes.x[k]-1{
			nclist.object(k).event(SpikeVector[k].x[j])
		}
	}
}

	
proc run() {
	stdinit()
	continuerun(tstop)
}

proc init() { //Taken from Ch. 11 of Neuron book.  Mostly just initializes the raster plot.
	finitialize(v_init)
	if (cvode.active()) {
		cvode.re_init()
	} else {
		fcurrent()
	} frecord_init()
}


objref OutputVectorsSG, OutputVectorsSGM, OutputVectorsSGH, OutputTimesSG, netconSG, nil
objref OutputVectorsZ2, OutputTimesZ2, netconZ2
objref OutputVectorsT, OutputVectorsTM, OutputVectorsTH, OutputTimesT, netconT
objref OutputVectorsEX, OutputVectorsEXM, OutputVectorsEXH, OutputTimesEX, netconEX


proc OutputData(){ local i

	//OutputVectorsSG = new Vector() //needs to be modified to accomodate multiple cells.
	//OutputVectorsSGM = new Vector()
	//OutputVectorsSGH = new Vector()
	//OutputVectorsSG.record(&MelnickSG[0].soma.v(0.5))
	//OutputVectorsSGM.record(&MelnickSG[0].soma.m_hh(0.5))
	//OutputVectorsSGH.record(&MelnickSG[0].soma.h_hh(0.5))
	OutputTimesSG = new Vector()
	MelnickSG[0].soma netconSG = new NetCon(&v(0.5), nil)
	netconSG.threshold = -30 //-30 mV AP threshold.
	netconSG.record(OutputTimesSG)
	objref netconSG

	//OutputVectorsZ2 = new Vector() //needs to be modified to accomodate multiple cells.
	//OutputVectorsZ2.record(&MelnickSG[1].soma.v(0.5))
	OutputTimesZ2 = new Vector()
	MelnickSG[1].soma netconZ2 = new NetCon(&v(0.5), nil)
	netconZ2.threshold = -30 //-30 mV AP threshold.
	netconZ2.record(OutputTimesZ2)
	objref netconZ2	

	//OutputVectorsT = new Vector() //needs to be modified to accomodate multiple cells.
	//OutputVectorsTM = new Vector()
	//OutputVectorsTH = new Vector()
	//OutputVectorsT.record(&AguiarWDR[0].soma.v(0.5))
	//OutputVectorsTM.record(&AguiarWDR[0].soma.m_hh(0.5))
	//OutputVectorsTH.record(&AguiarWDR[0].soma.h_hh(0.5))
	OutputTimesT = new Vector()
	AguiarWDR[0].soma netconT = new NetCon(&v(0.5), nil)
	netconT.threshold = -30 //-30 mv AP threshold.
	netconT.record(OutputTimesT)
	objref netconT

	//OutputVectorsEX = new Vector() //needs to be modified to accomodate multiple cells.
	//OutputVectorsEX.record(&AguiarIN[0].soma.v(0.5))
	OutputTimesEX = new Vector()
	AguiarIN[0].soma netconEX = new NetCon(&v(0.5), nil)
	netconEX.threshold = -30 //-30 mv AP threshold.
	netconEX.record(OutputTimesEX)
	objref netconEX


init()
run()
}


proc Step(){ //Use something like this to probe internal variables, except replace "print" command with record command of some sort.
	index = 1
	finitialize(v_init)
	while (t<tstop) {
	print MelnickSG[1].soma.v(0.5)
	fadvance()
	}
}


//DEBUG NOTICE: Files containing time vectors are for now manually entered into VarWriter, as this makes debugging easier.  Later versions of this code will read appropriate filenames from a .dat template file in the style of "ReadFileXX" lines as shown below.

objref DestFileSG, TimeFileSG, ReadFileSG, ReadTimeFileSG, TempVectorSG //ADDITION: Time File for recording of spike times out of different SG Cells.
strdef SaveToMeSG

proc saveSG(){ local k
	DestFileSG = new File()
	ReadFileSG = new File()
	TimeFileSG = new File() // File for AP Time vector storage.
	//TempVectorSG = new Vector()
	//ReadFileSG.ropen("SG_Cell_filenames.dat") //MAKE SURE THIS NAME MATCHES THAT GENERATED USING 		FilenameGenerator.m 
	
	//for k=0, 2 { Only save 3 motor neurons.
		//TempVectorSG = OutputVectorsSG
		//ReadFileSG.scanstr(SaveToMeSG)
		//DestFileSG.wopen(SaveToMeSG)
		//TempVectorSG.fwrite(DestFileSG)
		//DestFileSG.close()
		strdef timefileSG
		timefileSG = "SG_Cell_1_Times.dat"
		TimeFileSG.wopen(timefileSG)
		OutputTimesSG.fwrite(TimeFileSG)
		TimeFileSG.close()
	//}
	ReadFileSG.close()
	objref TempVectorSG
	print "SG Done"
}


objref DestFileZ2, TimeFileZ2, ReadFileZ2, ReadTimeFileZ2, TempVectorZ2 //ADDITION: Time File for recording of spike times out of different SG Cells.
strdef SaveToMeZ2

proc saveZ2(){ local k
	DestFileZ2 = new File()
	ReadFileZ2 = new File()
	TimeFileZ2 = new File() // File for AP Time vector storage.
	//TempVectorZ2 = new Vector()
	//ReadFileZ2.ropen("SGSCS_Cell_filenames.dat") //MAKE SURE THIS NAME MATCHES THAT GENERATED USING 	FilenameGenerator.m 
	
	//for k=0, 2 { Only save 3 motor neurons.
		//TempVectorZ2 = OutputVectorsZ2
		//ReadFileZ2.scanstr(SaveToMeZ2)
		//DestFileZ2.wopen(SaveToMeZ2)
		//TempVectorZ2.fwrite(DestFileZ2)
		//DestFileZ2.close()
		strdef timefileZ2
		timefileZ2 = "SGSCS_Cell_1_Times.dat"
		TimeFileZ2.wopen(timefileZ2)
		OutputTimesZ2.fwrite(TimeFileZ2)
		TimeFileZ2.close()
	//}
	ReadFileZ2.close()
	objref TempVectorZ2
	print "Z2 Done"
}


objref DestFileT, TimeFileT, ReadFileT, TempVectorT //ADDITION: Time File for recording of spike times out of different T Cells.
strdef SaveToMeT

proc saveT(){ local k
	DestFileT = new File()
	ReadFileT = new File()
	TimeFileT = new File() // File for AP Time vector storage.
	//TempVectorT = new Vector()
	//ReadFileT.ropen("T_Cell_filenames.dat") //MAKE SURE THIS NAME MATCHES THAT GENERATED USING FilenameGenerator.m
	//for k=0, 2 {  Only save 3 motor neurons.
		//TempVectorT = OutputVectorsT
		//ReadFileT.scanstr(SaveToMeT)
		//DestFileT.wopen(SaveToMeT)
		//TempVectorT.fwrite(DestFileT)
		//DestFileT.close()
		strdef timefileT
		timefileT = "T_Cell_1_Times.dat"
		TimeFileT.wopen(timefileT)
		OutputTimesT.fwrite(TimeFileT)
		TimeFileT.close()
	//}
	ReadFileT.close()
	objref TempVectorT
	print "T Done"
}


objref DestFileEX, TimeFileEX, ReadFileEX, TempVectorEX //ADDITION: Time File for recording of spike times out of different T Cells.
strdef SaveToMeEX

proc saveEX(){ local k
	DestFileEX = new File()
	ReadFileEX = new File()
	TimeFileEX = new File() // File for AP Time vector storage.
	//TempVectorEX = new Vector()
	//ReadFileEX.ropen("EX_Cell_filenames.dat") //MAKE SURE THIS NAME MATCHES THAT GENERATED USING FilenameGenerator.m
	//for k=0, 2 {  Only save 3 motor neurons.
		//TempVectorEX = OutputVectorsEX
		//ReadFileEX.scanstr(SaveToMeEX)
		//DestFileEX.wopen(SaveToMeEX)
		//TempVectorEX.fwrite(DestFileEX)
		//DestFileEX.close()
		strdef timefileEX
		timefileEX = "EX_Cell_1_Times.dat"
		TimeFileEX.wopen(timefileEX)
		OutputTimesEX.fwrite(TimeFileEX)
		TimeFileEX.close()
	//}
	ReadFileEX.close()
	objref TempVectorEX
	print "EX Done"
}