load_file("nrngui.hoc") load_file("BLcells_template_LFP_segconsider_all_Iinject_recordingimembrane.hoc") load_file("interneuron_template_gj_LFP_Iinject_recordingimembrane.hoc") load_file("function_NetStimOR.hoc") load_file("function_LoadMatrix.hoc") upscale=27 ////define cell numbers and morphology parameters NCELL = 1000*upscale TotalCellNum = 1000*upscale CellNum_p=900*upscale CellNum_interneuron = 100*upscale ///p_cell morphology/// adend_L_p=270 //um nseg_adend_p=8 //num of seg pdend_L_p=555 //um nseg_pdend_p=7 nseg_soma_p=1 diam_soma_p = 25 //um diam_soma_p1 = 24.75 //um diam_adend_p = 3 diam_pdend_p = 5 nseg_all_p=nseg_adend_p+nseg_pdend_p+nseg_soma_p modelcompartment_num=nseg_all_p ////I_cell morphology//// dend_L_I=150 ///um nseg_dend_I=1 ///num of seg nseg_soma_I=1 diam_soma_I = 15 ////um diam_dend_I = 10 ////um nseg_all_I=nseg_dend_I+nseg_soma_I modelcompartment_num_ITN=nseg_all_I diam_shank = 25 //20-50um extralimit = 50 objref pc,cells,cell[TotalCellNum],nc,nil//,r pc = new ParallelContext() cells = new List() CellNum = 1000*upscale celsius = 31.0 objref Sim_length_file objref Sim_length_rec Sim_length_file = new File() Sim_length_file.ropen("./input/sim_length") ////simulation length Sim_length_rec = new Vector() Sim_length_rec.scanf(Sim_length_file) tstop = Sim_length_rec.x[0] {load_file("function_TimeMonitor.hoc")} dt = 0.05 steps_per_ms= 20 v_init = -70 //t0 = startsw() //////////////////////// Choose the cell type ///////////////////// //// Read Cell_type.txt //// objref Cell_type_file objref Cell_type_rec Cell_type_file = new File() Cell_type_file.ropen("./input/Cell_type.txt") Cell_type_rec = new Vector() Cell_type_rec.scanf(Cell_type_file) //// Read NM.txt //// Randomly choosen number to decide whether cell has DA and NE or not objref NM_file objref NM_rec NM_file = new File() NM_file.ropen("./input/NM.txt") NM_rec = new Vector() NM_rec.scanf(NM_file) ////Read 3D-Location information(soma)//// objref Location Location = new Matrix() strdef locationstr locationstr="./input/location.txt" Location = LoadMatrix(locationstr,TotalCellNum,3) for(i=pc.id;i