// Simulation and analysis of Spatiotemporal Component of Cl- Gradients in a isolated dendrite // Here simulation of different AMPA Synapses // Here application in a simple Ball and Stick Model // Define spatial properties of dendrite ANZAHL_NODES = 100 // Define number or Repetitions of the non-Cl-Parameter MAX_FAKTOR = 100 //Number of repetitions // Define Cl--Concentration Cl_Steps = 6 // Number of Different [Cl-]i objref Cl_List Cl_List = new Vector(Cl_Steps) Cl_List.x[0] = 5 //mM Cl_List.x[1] = 10 Cl_List.x[2] = 15 Cl_List.x[3] = 25 Cl_List.x[4] = 35 Cl_List.x[5] = 50 // Determination Parameters GABA ANZAHL_GABA = 1 //Anzahl der synaptischen Pulse G_GABA = 0.000789 //Value from Lombardi et al 2018 P_GABA = 0.18 DECAY_GABA = 37 //Value from Lombardi et al 2018 GABA_SYN_LOCATION = 0.5 // Position GABA Synapse for Pulses ONSET_GABA_PULSE = 10 // Determination Parameters AMPA ANZAHL_AMPA = 1 //Anzahl der synaptischen Pulse G_AMPA = 0.000305 * 1 //Value from Lombardi et al 2018 E_AMPA = 0 // Reversal Potential of Exp2Syn DECAY_AMPA = 11 //Value from Lombardi et al 2018 Decay_Ampa_0 = 0 AMPA_SYN_LOCATION = 0.5 // Position GABA Synapse for Pulses ONSET_AMPA_PULSE = 10 // Identification of the node with the GABA Synapse SynPos = ANZAHL_NODES*GABA_SYN_LOCATION //----- Define run parameters --------------------- tstop = 200 // Duration v_init = -60 // Initial voltage dt = 0.5 // Step Interval in ms lenghtoutputvec = 2000 // Number of Lines for output (< 32000 for Excel-Figures) //-- Initialize Graph for Display of [Cli]i in the right scale objectvar Cl_graph Cl_graph = new Graph(0) Cl_graph.size(0,210,10,50) Cl_graph.view(0, 10, 210, 40, 462, 636, 961.2, 200.8) graphList[0].append(Cl_graph) Cl_graph.addexpr("dend.cli( 0.5 )", 1, 1, 0.8, 0.9, 2) //----- Insert synapses ------------------------- // Determination of GABA Synapse objref gabasyn dend { // insert GABA synapse gabasyn = new gaba(GABA_SYN_LOCATION) gabasyn.tau1 = 0.1 gabasyn.tau2 = DECAY_GABA gabasyn.P = P_GABA } // Definition of synaptic Stimuli objref stimGABApuls //Pulssequenz GABA stimGABApuls = new NetStim(GABA_SYN_LOCATION) stimGABApuls.number = ANZAHL_GABA stimGABApuls.start = ONSET_GABA_PULSE // Linkage of synaptic Inputs objref synpulsegaba // Determination of AMPA Synapse objref ampasyn dend { // insert AMPA synapse ampasyn = new Exp2Syn(AMPA_SYN_LOCATION) ampasyn.tau1 = 0.1 ampasyn.tau2 = Decay_Ampa_0 ampasyn.e = E_AMPA } // Definition of synaptic Stimuli objref stimAMPApuls //Pulssequenz AMPA stimAMPApuls = new NetStim(AMPA_SYN_LOCATION) stimAMPApuls.number = ANZAHL_AMPA stimAMPApuls.start = ONSET_AMPA_PULSE // Linkage of synaptic Inputs objref synpulseampa // ------------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 // ---------Definition of Output Vectors and File Output -------------- // -------------------------------------------------------------------- //-- Define ------ objref timevec, shorttimevec objref voltvec[ANZAHL_NODES], shortvoltvec, voltvec_aver objref clivec[ANZAHL_NODES], shortclivec, clivec_aver objref Outmatrix //0=time, FAKTOR=Cl-, MAX_FAKTOR+FAKTOR = v objref Analysismatrix //0=[Cl-]-initial, 1=gAMPA, 2=[Cl-]max, 3=[Cl-]min, 4=vmax, 5=vmin strdef OutFileName // Name of File Output objref OutFile //--- Assign ------- timevec = new Vector() shorttimevec = new Vector() for i = 0, ANZAHL_NODES-1 { voltvec[i] = new Vector() clivec[i] = new Vector() } // not used in thie simulation clivec_aver = new Vector() // not used in thie simulation voltvec_aver = new Vector() shortclivec = new Vector() shortvoltvec = new Vector() Outmatrix = new Matrix() Analysismatrix = new Matrix(6, MAX_FAKTOR*Cl_Steps+1) //-- Link Output Vectors ---------------- timevec.record(&t) // Time vector for i = 0, ANZAHL_NODES-1 { // Generate Vektor for each node voltvec[i].record(&dend.v(i/ANZAHL_NODES)) clivec[i].record(&dend.cli(i/ANZAHL_NODES)) } // --- Simulation starts here ------------------------------------------------------------------------------ // --------------------------------------------------------------------------------------------------------- //-- Outer Loop Variation of [Cli] initial ------------------- Cl_Step = 0 while (Cl_Step < Cl_Steps){ // Update Cl- homeostasis in all compartments ---------------------------------------------- forsec all { cli0_cldif_CA3_NKCC1_HCO3 = Cl_List.x[Cl_Step] cli_Start_cldif_CA3_NKCC1_HCO3 = Cl_List.x[Cl_Step] cli_cldif_CA3_NKCC1_HCO3 = Cl_List.x[Cl_Step] } //-- Inner Loop Variation of g-AMPA -------------------------------------------------------------- FAKTOR_DECAY_AMPA = 0 DECAY_AMPA = Decay_Ampa_0 while (FAKTOR_DECAY_AMPA < MAX_FAKTOR) { // Assign Value to Synapse dend { synpulsegaba = new NetCon(stimGABApuls, gabasyn, 0, 0, G_GABA) ampasyn.tau2 = DECAY_AMPA if (DECAY_AMPA == 0){ ampasyn.tau2 = 11 synpulseampa = new NetCon(stimAMPApuls, ampasyn, 0, 0, 0) }else{ synpulseampa = new NetCon(stimAMPApuls, ampasyn, 0, 0, G_AMPA) } } printf("Faktor = %g of %g ", Cl_Step*MAX_FAKTOR+FAKTOR_DECAY_AMPA+1, MAX_FAKTOR*Cl_Steps) Cl_graph.size(0, tstop, Cl_List.x[Cl_Step]- 1, Cl_List.x[Cl_Step] + 1) // Run Simulation -------------------------------------------------------- run() // Put Data in Output Matrix -------------------------------------------- // ---- => shrink the parameters to output-size before --------------------- MakeShort(timevec, shorttimevec, lenghtoutputvec) Outmatrix.resize(shorttimevec.size(), 1 + 2 * MAX_FAKTOR) Outmatrix.setcol(0, shorttimevec) // Not used for this analysis // Calculate average [Cli] over all Nodes ------- // clivec_aver.resize(clivec[0].size()) // voltvec_aver.resize(voltvec[0].size()) // clivec_aver.mul(0) // empty vector // voltvec_aver.mul(0) // for i=0, ANZAHL_NODES-1 { // clivec_aver.add(clivec[i]) // voltvec_aver.add(voltvec[i]) // } // clivec_aver.div(ANZAHL_NODES) // voltvec_aver.div(ANZAHL_NODES) // determine delta CLi if (abs(clivec[SynPos].x[1]-clivec[SynPos].min()) > abs(clivec[SynPos].x[1]-clivec[SynPos].max())){ DeltaCl = clivec[SynPos].min()- clivec[SynPos].x[1] }else{ DeltaCl = clivec[SynPos].max() -clivec[SynPos].x[1] } printf("- dec_AMPA = %g ms - [Cl-]i = %g mM => Delta[Cl-]i = %g mM, Em = %g mV \n", DECAY_AMPA, Cl_List.x[Cl_Step], DeltaCl, voltvec[SynPos].max()) // Put Vectors in Outmatrix MakeShort(clivec[SynPos], shortclivec, lenghtoutputvec) MakeShort(voltvec[SynPos], shortvoltvec, lenghtoutputvec) shortclivec.x[0] = DECAY_AMPA shortvoltvec.x[0] = DECAY_AMPA Outmatrix.setcol(FAKTOR_DECAY_AMPA, shortclivec) Outmatrix.setcol(MAX_FAKTOR + FAKTOR_DECAY_AMPA, shortvoltvec) Analysismatrix.x[0][Cl_Step*MAX_FAKTOR+FAKTOR_DECAY_AMPA] = Cl_List.x[Cl_Step] Analysismatrix.x[1][Cl_Step*MAX_FAKTOR+FAKTOR_DECAY_AMPA] = DECAY_AMPA Analysismatrix.x[2][Cl_Step*MAX_FAKTOR+FAKTOR_DECAY_AMPA] = clivec[SynPos].max() Analysismatrix.x[3][Cl_Step*MAX_FAKTOR+FAKTOR_DECAY_AMPA] = clivec[SynPos].min() Analysismatrix.x[4][Cl_Step*MAX_FAKTOR+FAKTOR_DECAY_AMPA] = voltvec[SynPos].max() Analysismatrix.x[5][Cl_Step*MAX_FAKTOR+FAKTOR_DECAY_AMPA] = voltvec[SynPos].min() // Goto next FAKTOR_DECAY_AMPA FAKTOR_DECAY_AMPA+=1 DECAY_AMPA+= 1 } // ----- end of inner loop (FAKTOR_DECAY_AMPA-Loop) ------- // Save the Data -------------------------------------------------------------------- OutFile = new File() sprint(OutFileName, "Result_BS_Cli-%gmM_Var-tauAMPA_gAMPA.asc", Cl_List.x[Cl_Step]) OutFile.wopen(OutFileName) Outmatrix.fprint(OutFile, "\t%g") OutFile.close // Goto next Cl- Concentration Cl_Step+=1 DECAY_AMPA = Decay_Ampa_0 } // ---------- End of outer loop (Cl_Step-Loop) ---------------------- // Save the Analysismatrix -------------------------------------------------------------------- OutFile = new File() sprint(OutFileName, "Analysis_BS_Var-Cli_Var-tauAMPA_5u10mM_gAMPA.asc") OutFile.wopen(OutFileName) Analysismatrix.fprint(OutFile, "\t%g") OutFile.close