/************************************************************
Christina Weaver
August 2011
insert channels from Vetter et al (2001) into Jennie's
PFC and Visual Cortex neurons. Includes Mainen's
synthetic axon (from the 1995 Mainen et al. paper).
************************************************************/
load_file("nrngui.hoc")
// now load morph
load_file("Jul16IR3f_fromSWCthenManual_Nov22-11.hoc")
load_file("aux_procs.hoc")
xopen("electro_procs.hoc")
V1_effective_ApicalSpineDensity = 0.67322181 // total of 1153 spines, divided by total apical length
V1_effective_BasalSpineDensity = 0.4886992 // total of 874 spines, divided by total basal length
applySubtreeConstantSpineDensity(apical, SurfaceAreaOneApicalSpine, V1_effective_ApicalSpineDensity)
applySubtreeConstantSpineDensity(basal, SurfaceAreaOneBasalSpine, V1_effective_BasalSpineDensity)
geom_nseg(100,0.1)
// Using SEClamp, as recommended on the NEURON User Forum. See init_PFC.hoc for details.
INITDUR = 80 //50
steps_per_ms = 40
dt = 0.025
xopen("PFC-V1_AddSynapses.hoc")
distance()
objref synBranches, synLoc
/*** new parameter settings as of 23 Jan 2012 ***/
VO = -50
V0 = -50 //avoid ambiguity of "Capital O" vs "zero 0"
forall v_init = -50
set_epasNG(72)
scale_gpas(4.8e-5)
scaleNa(25,1e3)
scaleKV(65,16.6667)
forall { if( ismembrane("na") ) vshift_na=-10.5 }
// soma of V1 cell is smaller than dlPFC soma.
soma.L *= 0.66667
soma.diam *= 0.66667
geom_nseg(100,.1)
distance()
/****
set up a Voltage Clamp
****/
objref seClamp
soma seClamp = new SEClamp(0.5)
seClamp.dur1 = 1e9
seClamp.amp1 = -50 // For IPSCs, neurons are held here to increase driving force.
seClamp.dur2 = 0
forall { v_init = -50 }
/***** end voltage clamp ****/
/********************** copied from synTweak.hoc in ~/LuebkeAmatrudo_forCluster *********/
strdef synFilename
objref synFout, tv, iv
/**********************
Written originally in main_PFC_simEPSC_all.hoc; now copied here.
$1 number of synapses
$2 value of tau1
$3 value of tau2
$4 value of gAMPA
$s5 file basename
**********************/
proc synITweak() { local i, vecsz, btyp
adjust_Itau1($2,$1)
adjust_Itau2($3,$1)
adjust_gGABA($4,$1)
sprint(synFilename,"%s_INtR%.4f_tF%.2f_gGAB%.5f.Ibin",$s5,$2,$3,$4)
synFout = new File()
synFout.wopen(synFilename)
tv = new Vector()
tv.record(&t)
iv = new Vector()
iv.record(&seClamp.i)
init()
run()
vecsz = tv.size()
synFout.vwrite(&vecsz)
tv.fwrite(synFout)
iv.fwrite(synFout)
synFout.close()
sprint(synFilename,"%s_INtR%.4f_tF%.2f_gGAB%.5f_dist.txt",$s5,$2,$3,$4)
synFout = new File()
synFout.wopen(synFilename)
i = 0
forsec synBranches {
btyp = 0
ifsec apical { btyp = 1 }
ifsec basal { btyp = 2 }
synFout.printf("%d\t%g\t%g\t%d\n",i,distance(synLoc.x[i]),distance(synLoc.x[i])-soma.diam,btyp)
i+=1
}
synFout.close()
}
/********************** end from synTweak.hoc in ~/LuebkeAmatrudo_forCluster *********/
xopen("plot_seClamp_IPSC.ses")
/************* now add inhibitory synapses, and activate them one at a time. ********/
geom_nseg(100,.1)
distance()
nBr = 0
bDen = 0.004
sDen = 0.00142
dDen = 0.00284
pCut = 156
if( doSynType == 0 ) {
// activate apical synapses, same gGABA as the dlPFC model
nSynapse = AddInhSynapses_ProxDist_byDensityAB(bDen,pCut,200,200,synBranches,synLoc,nBr,sDen,dDen, 0)
endSyn = 200 + (nSynapse + 2)*200
distance()
cnt = 0
tstop=endSyn
synITweak(nSynapse,2.5,7.5,0.00115,"fig12_V1sameGABA_apic")
}
if( doSynType == 1 ) {
// activate basal synapses, same gGABA as the dlPFC model
nSynapse = AddInhSynapses_ProxDist_byDensityAB(bDen,pCut,200,200,synBranches,synLoc,nBr,sDen,dDen, 1)
endSyn = 200 + (nSynapse + 2)*200
distance()
cnt = 0
tstop=endSyn
synITweak(nSynapse,2.5,7.5,0.00115,"fig12_V1sameGABA_bas")
}
if( doSynType == 2 ) {
// activate apical synapses, lower gGABA
nSynapse = AddInhSynapses_ProxDist_byDensityAB(bDen,pCut,200,200,synBranches,synLoc,nBr,sDen,dDen, 0)
endSyn = 200 + (nSynapse + 2)*200
distance()
cnt = 0
tstop=endSyn
synITweak(nSynapse,2.5,7.5,0.00067,"fig12_V1lowGABA_apic")
}
if( doSynType == 3 ) {
// activate basal synapses, lower gGABA
nSynapse = AddInhSynapses_ProxDist_byDensityAB(bDen,pCut,200,200,synBranches,synLoc,nBr,sDen,dDen, 1)
endSyn = 200 + (nSynapse + 2)*200
distance()
cnt = 0
tstop=endSyn
synITweak(nSynapse,2.5,7.5,0.00067,"fig12_V1lowGABA_bas")
}
{
printf("\n\n**************************\n\n")
printf("Output has been written to a file ending in .Ibin, a customized binary file format.\n")
printf("These files can be read with MATLAB. See the .m files contained in this directory.\n")
printf("MATLAB's Statistics Toolbox is required to analyze IPSC shapes.\n")
printf("\tSample usage: read_IPSCsims_mdb('fig12_V1sameGABA_apic',0.00115)\n")
printf("\n\n**************************\n\n")
}