// ---< classe cellule load_file("nrngui.hoc") dt=0.1 begintemplate my_cell public soma, axon, dend, dend_syn, dend_syn1, soma_syn, plug_it, plug_it1 create soma,axon,dend objref dend_syn objref dend_syn1 objref soma_syn objref netcon objref netcon1 proc init() { soma { nseg = 1 diam = 18.8 L = 18.8 Ra = 123.0 insert hh gnabar_hh=0.12 gkbar_hh=0.036 gl_hh = .0001666 el_hh = -60.0 } dend { nseg = 10 diam = 3.18 L = 701.9 Ra = 123 insert pas g_pas = .0001666 e_pas = -60.0 dend_syn=new ExpSyn(1) dend_syn1=new ExpSyn(1) } axon { nseg = 100 diam = 2.0 L = 549.1 Ra = 123 insert hh gnabar_hh=0.12 gkbar_hh=0.036 gl_hh = .0001666 el_hh = -60.0 } //---< Connect things together connect dend(0), soma(0) connect axon(0), soma(1) } // ---< ajouter la cellule de destination proc plug_it(){ axon netcon=new NetCon(&v(0.995),$o1.dend_syn,-40,0,0.025) } proc plug_it1(){ axon netcon1=new NetCon(&v(0.995),$o1.dend_syn1,-40,0,0.025) } endtemplate my_cell // ---< preparation du reseau nmy_cells = 3 objectvar my_cells[nmy_cells] for i = 0, nmy_cells-1 { my_cells[i] = new my_cell() } my_cells[0].plug_it(my_cells[2]) my_cells[1].plug_it(my_cells[0]) my_cells[2].plug_it(my_cells[1]) my_cells[2].plug_it1(my_cells[0]) // ---< construction des stimulateurs objref stim[3] my_cells[0].soma { stim[0] = new IClamp(0.5) } my_cells[1].soma { stim[1] = new IClamp(0.5) } my_cells[2].soma { stim[2] = new IClamp(0.5) } objref g1,g2,g3 proc update(){ tstop=fin t=0 my_cells[0].dend_syn.e=e_d_0 my_cells[0].dend_syn.tau=tau_d_0 my_cells[1].dend_syn.e=e_d_1 my_cells[1].dend_syn.tau=tau_d_1 my_cells[2].dend_syn.e=e_d_2 my_cells[2].dend_syn.tau=tau_d_2 my_cells[0].dend_syn1.e=e_d_2 my_cells[0].dend_syn1.tau=tau_d_2 NetCon[0].weight=w_0 NetCon[1].weight=w_1*10 NetCon[2].weight=w_2 NetCon[3].weight=w_0 NetCon[0].delay=del_0 NetCon[1].delay=del_1 NetCon[2].delay=del_2 NetCon[3].delay=del_0 stim[0].del = ddel_0 stim[0].dur = ddur_0 stim[0].amp = amp_0 stim[1].del = ddel_1 stim[1].dur = ddur_1 stim[1].amp = amp_1 stim[2].del = ddel_2 stim[2].dur = ddur_2 stim[2].amp = amp_2 g1.size(0,tstop,-80,40) g2.size(0,tstop,-80,40) g3.size(0,tstop,-80,40) aa=0.12 bb=0.036 if (ttx==1) aa=0 if (tea==1) bb=0 for (i=0;i