// ¬¬ Initialisation ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
objref cvode, random
cvode = new CVode(0) // start with CVode inactive
a = startsw() //sert a generer la seed
random = new Random(a)
objref mit[nmitx][nmity], gran
objref m2gAMPAlist, GabaAGr_Gran2Mit
objref input_reg[nmitx][nmity], input_ipsc[nmitx][nmity], input_noi[nmitx][nmity], conduct
objref outfile
outfile = new File()
strdef filename
m2gAMPAlist = new List()
conduct = new Vector(20)
// Create cells --------------------------------------------------------
proc create_cells() { local i,j,ii,jj,k,p
quitmodel = 0
print nmitx
print nmity
if (nmitx==1) {
for i = 0, nmitx-1 {
for j = 0, nmity-1 {
mit[i][j] = new Mit(1)
}
}
}
if (nmitx==10) {
print "tatatat"
for i = 0, nmitx-2 {
conduct.x[i] = 0.5+i*0.2 //0.5+i*0.1
}
conduct.x[9] = 0.5 + 100*0.3
for i = 0, nmitx-1 {
for j = 0, nmity-1 {
mit[i][j] = new Mit(conduct.x[i])
//print conduct.x[i]
}
}
}
if (nmitx==20) {
for i = 0, nmitx-2 {
conduct.x[i] = 0.2 + i*0.1 //0.5+i*0.1
}
conduct.x[19] = 0.5 + 100*0.3
for i = 0, nmitx-1 {
for j = 0, nmity-1 {
mit[i][j] = new Mit(conduct.x[i])
//print conduct.x[i]
}
}
}
// Granule creation
if (ngranx=!0) {
gran = new Gran()
}
access mit[0][0].prim
}
proc connect_cell() {
// Connections Synapses a Spikes
edel = 0
mit[0][0].dend m2gAMPAlist.append( new NetCon(&v(0.5),gran.AMPArS,-35,edelay,AMPAweight) )
// Connections Graduees
GabaAGr_Gran2Mit = new GradGABAa() // create synapse
mit[0][0].dend GabaAGr_Gran2Mit.loc(0.5) // assign postsynaptic compartment
setpointer GabaAGr_Gran2Mit.PreActiv, gran.gemm.v(0.5) // direct pointer to presyn variable
GabaAGr_Gran2Mit.gmax = iGrweight //0.1 // (umho) maximum conductance (default 0.3 uS)
GabaAGr_Gran2Mit.tau = 5
GabaAGr_Gran2Mit.thres = -43
GabaAGr_Gran2Mit.slop = 0.3
}
// Add input currents --------------------------------------------------
proc insert_iclamps_reg() { local i,j // 2 args - del dur
for i = 0, nmitx-1 {
for j = 0, nmity-1 {
mit[i][j].glom input_reg[i][j] = new IClamp(0.5)
input_reg[i][j].dur = tstop
input_reg[i][j].del = 0
}
}
}
proc insert_iclamp_ipsc() { local i,j
for i = 0, nmitx-1 {
for j = 0, nmity-1 {
mit[i][j].dend input_ipsc[i][j] = new IClamp2(0.5)
input_ipsc[i][j].amp = 0
input_ipsc[i][j].dur = tstop
input_ipsc[i][j].del = 0
input_ipsc[i][j].tau = 5
}
}
}
// Randomise initial conditions ----------------------------------------
proc random_init() { local i,j,ii,jj,k
random.normal(-65,25)
for i = 0,nmitx-1 {
for j = 0, nmity-1 {
mit[i][j].soma.v(0.5) = 0 //random.repick()
mit[i][j].dend.v(0.5) = mit[i][j].soma.v(0.5)
mit[i][j].prim.v(0.5) = mit[i][j].soma.v(0.5)
mit[i][j].glom.v(0.5) = mit[i][j].soma.v(0.5)
}
}
}
// ¬¬ Create the model ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
create_cells()
// set synaptic properties
|