// Simulation and analysis of Spatiotemporal Component of Cl- Gradients in a isolated dendrite // ------------Procedures and Functions ------------------------------- // -------------------------------------------------------------------- // Function MakeShort ---------------------------------------// // Inputs: $1 Objref to Inputvector // // $2 Objref to Outoutvector // // lenoutvec desired lendth of Outputvector // // // // Reduce Inputvec to Outputvev by averaging n elements // // n (reducing factor) = floor(Inputvec.size() / lenoutvec) // // ----------------------------------------------------------// obfunc MakeShort() {local i, n n = int($o1.size()/$3) $o2.resize($3) for i=0, $3-1 { $o2.x[i] = $o1.mean(i*n, (i+1)*n-1) } return $o2 } // End of function // Determining Cl- and HCO3- Properties ----------------------------------- Cl_conc = 10 forsec all { cli0_cldif_CA3_NKCC1_HCO3 = Cl_conc cli_Start_cldif_CA3_NKCC1_HCO3 = Cl_conc cli_cldif_CA3_NKCC1_HCO3 = Cl_conc hco3i0_cldif_CA3_NKCC1_HCO3 = 14.1 hco3i_Start_cldif_CA3_NKCC1_HCO3 = 14.1 hco3i_cldif_CA3_NKCC1_HCO3 = 14.1 } //----- Define run parameters --------------------- tstop = 10000 // Duration v_init = -60 // Initial voltage dt = 0.02 // Step Interval in ms steps_per_ms = 20 lenghtoutputvec = 3000 // Number of Lines for output (< 32000 for Excel-Figures) // Determination Parameters GABA ------- LEN_DENDR = 1000 // Dendrite has a length of 1000 µm ANZAHL_GABA = 1 //Anzahl der synaptischen Pulse G_GABA = 0.000789 * 2000 //This Value was pultiplished for the analysis P_GABA = 0.18 DECAY_GABA = 37 ONSET_GABA = 100 GABA_SYN_LOC_ORIGIN = 0.5 // defines the point where [Cl]i was measured GABA_SYN_LOC_INDEX = 4 // from 0 to 4 -> Position of GABA Synapses around recording site // Define the location of the synapses at symetrical distances around the "recording site" at "GABA_SYN_LOC_ORIGIN" // 5 different locations, must be selected manually before run in variable "GABA_SYN_LOC_INDEX" GABA_Locs = 5 objref GABA_Loc_List GABA_Loc_List = new Vector(GABA_Locs) // manually put desired Locations for synapses in List GABA_Loc_List.x[0] = 10/LEN_DENDR GABA_Loc_List.x[1] = 30/LEN_DENDR GABA_Loc_List.x[2] = 100/LEN_DENDR GABA_Loc_List.x[3] = 300/LEN_DENDR GABA_Loc_List.x[4] = 499/LEN_DENDR //----- Insert synapses ------------------------- // Determination of Synapses objref gabasyn1, gabasyn2 dend { // insert GABA synapse gabasyn1 = new gaba(GABA_SYN_LOC_ORIGIN + GABA_Loc_List.x[GABA_SYN_LOC_INDEX]) gabasyn1.tau1 = 0.1 gabasyn1.tau2 = DECAY_GABA gabasyn1.P = P_GABA gabasyn2 = new gaba(GABA_SYN_LOC_ORIGIN - GABA_Loc_List.x[GABA_SYN_LOC_INDEX]) gabasyn2.tau1 = 0.1 gabasyn2.tau2 = DECAY_GABA gabasyn2.P = P_GABA } // Definition of synaptic Stimuli objref stimGABApuls1, stimGABApuls2 stimGABApuls1 = new NetStim(GABA_SYN_LOC_ORIGIN + GABA_Loc_List.x[GABA_SYN_LOC_INDEX]) stimGABApuls1.number = ANZAHL_GABA stimGABApuls1.start = ONSET_GABA stimGABApuls2 = new NetStim(GABA_SYN_LOC_ORIGIN - GABA_Loc_List.x[GABA_SYN_LOC_INDEX]) stimGABApuls2.number = ANZAHL_GABA stimGABApuls2.start = ONSET_GABA // Linkage of synaptic Inputs objref synpulsegaba1, synpulsegaba2 synpulsegaba1 = new NetCon(stimGABApuls1, gabasyn1, 0, 0, G_GABA) synpulsegaba2 = new NetCon(stimGABApuls2, gabasyn2, 0, 0, G_GABA) // Definition of Cl- -Steps tauCli_Steps = 50 objref tauCli_List tauCli_List = new Vector(tauCli_Steps) // manually put desired tau_Values in List for i=0, tauCli_Steps-1{ tauCli_List.x[i] = exp(i/8.045) // exponential increase intau printf("%g - %g, ", i, tauCli_List.x[i]) } // ---------Definition of Output Vectors and File Output -------------- // -------------------------------------------------------------------- //-- Define ------ objref timevec, shorttimevec objref voltvec, shortvoltvec objref clivec, shortclivec objref voltOutmatrix objref cliOutmatrix strdef voltOutFileName, cliOutFileName // Name of File Output objref voltOutFile, cliOutFile //--- Assign ------- timevec = new Vector() shorttimevec = new Vector() voltvec = new Vector() shortvoltvec = new Vector() clivec = new Vector() shortclivec = new Vector() voltOutmatrix = new Matrix() cliOutmatrix = new Matrix() //-- Link Output Vectors ---------------- timevec.record(&t) // Time vector voltvec.record(&dend.v(GABA_SYN_LOC_ORIGIN)) clivec.record(&dend.cli(GABA_SYN_LOC_ORIGIN)) // --- Simulation starts here // Inner Loop Variation of tauCli -------------------------------------------------- tauCli_Step = 0 while (tauCli_Step < tauCli_Steps){ forsec all { tau_NKCC1_cldif_CA3_NKCC1_HCO3 = tauCli_List.x[tauCli_Step] tau_passive_cldif_CA3_NKCC1_HCO3 = tauCli_List.x[tauCli_Step] } printf("Sequence %g of %g; tauCli = %g, locGABA = %g, ", (tauCli_Step+1), (tauCli_Steps), tauCli_List.x[tauCli_Step], GABA_Loc_List.x[GABA_SYN_LOC_INDEX]) // Run Simulation -------------------------------------------------------- run() // Status of results printf("max [Cl-]i = %g at %g ms \n", clivec.max, timevec.x[clivec.max_ind]) // Put Data in Output Matrix -------------------------------------------- // ---- => shrink the parameters to output-size before --------------------- MakeShort(timevec, shorttimevec, lenghtoutputvec) voltOutmatrix.resize(shorttimevec.size(), 1 + tauCli_Steps) MakeShort(voltvec, shortvoltvec, lenghtoutputvec) voltOutmatrix.setcol(0, shorttimevec) shortvoltvec.x[0] = tauCli_List.x[tauCli_Step] shortvoltvec.x[1] = GABA_Loc_List.x[GABA_SYN_LOC_INDEX] voltOutmatrix.setcol(tauCli_Step+1, shortvoltvec) cliOutmatrix.resize(shorttimevec.size(), 1 + tauCli_Steps) cliOutmatrix.setcol(0, shorttimevec) MakeShort(clivec, shortclivec, lenghtoutputvec) shortclivec.x[0] = tauCli_List.x[tauCli_Step] shortclivec.x[1] = GABA_Loc_List.x[GABA_SYN_LOC_INDEX] cliOutmatrix.setcol(tauCli_Step+1, shortclivec) // Goto next tauCli_value tauCli_Step+=1 } // End loop --------------------------------- // Save the Data -------------------------------------------------------------------- voltOutFile = new File() sprint(voltOutFileName, "Result_Soma_Dendrite_spatial_sum_d-%gum_Var-tauCli_Volt.asc", GABA_Loc_List.x[GABA_SYN_LOC_INDEX]) voltOutFile.wopen(voltOutFileName) voltOutmatrix.fprint(voltOutFile, "\t%g") voltOutFile.close cliOutFile = new File() sprint(cliOutFileName, "Result_Soma_Dendrite_spatial_sum_d-%gum_Var-tauCli_Cli.asc", GABA_Loc_List.x[GABA_SYN_LOC_INDEX]) cliOutFile.wopen(cliOutFileName) cliOutmatrix.fprint(cliOutFile, "\t%g") cliOutFile.close