// Determines VM-dependency of steady-state inactivation of IA
// cf. Figure 2(Aa) and Figure 2(Ac) in Whyment et al. 2011, Figure X in Pickering et al. 2013
// Created Linford Briant October 2013
load_file("Cell.hoc")
tstop=5000
steps_per_ms=1
dt=1
celcius=20
// Want spiking currents blocked for this protocol
access SPNcells[0].soma
SPNcells[0].soma.gbar_na3=0
SPNcells[0].axon.gbar_na3=0
objectvar stim
stim=new VClamp(0.5)
stim.amp[1]=-20
stim.dur[0]=3000
stim.dur[1]=2000
proc stimAMP() {
stim.amp[0]=$1
}
// Following sets up all recording vectors, the time vector, and the database matrices:
nstim=17
objectvar IArec[nstim], grec[nstim], vrec[nstim], EKrec[nstim]
for i=0, nstim-1 IArec[i]=new Vector()
for i=0, nstim-1 grec[i]=new Vector()
for i=0, nstim-1 vrec[i]=new Vector()
for i=0, nstim-1 EKrec[i]=new Vector()
stimAMP(-20)
grec[0].record(&SPNcells[0].soma.gka_borgka(0.5))
vrec[0].record(&SPNcells[0].soma.v(0.5))
run()
// Sets up vector which is the A-current rather than the A-conductance:
objectvar DataM, DataN, DataK, M, N, K
M=new Matrix(vrec[0].size(),18)
N=new Matrix(vrec[0].size(),18)
K=new Matrix(vrec[0].size(),18)
N.setcol(1,grec[0])
K.setcol(1,vrec[0])
EKrec[0]=vrec[0].sub(ek)
IArec[0]=grec[0].mul(EKrec[0])
M.setcol(1,IArec[0])
objectvar vdt
vdt = new Vector()
vdt.resize(vrec[0].size())
vdt.indgen(dt)
M.setcol(0,vdt)
N.setcol(0,vdt)
K.setcol(0,vdt)
// Now that matrices and protocol have been set up, we can run the main procudure:
for i=1, nstim-1 {
print i
stimAMP(-20-i*5)
// This will do 21 simulations, with stimAMP() between 0mV (the initial) and -100mV in 5mV increments.
grec[i].record(&SPNcells[0].soma.gka_borgka(0.5))
vrec[i].record(&SPNcells[0].soma.v(0.5))
run()
N.setcol(i+1,grec[i])
K.setcol(i+1,vrec[i])
// Need to set columns for these two matrices before IA else they get overwritten.
EKrec[i]=vrec[i].sub(ek)
IArec[i]=grec[i].mul(EKrec[i])
M.setcol(i+1,IArec[i])
}
DataN=new File()
DataN.wopen("InactivationProtocol_GKA.dat")
N.fprint(DataN, " %g")
DataN.close("InactivationProtocol_GKA.dat")
DataK=new File()
DataK.wopen("InactivationProtocol_V.dat")
K.fprint(DataK, " %g")
DataK.close("InactivationProtocol_V.dat")
DataM=new File()
DataM.wopen("InactivationProtocol_IA.dat")
M.fprint(DataM, " %g")
DataM.close("InactivationProtocol_IA.dat")