// 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 Cl--Concentration Cl_Steps = 11 // Number of Different [Cl-]i // Write Vektor with Cl- Values objref Cl_List Cl_List = new Vector(Cl_Steps) Cl_List.x[0] = 2 Cl_List.x[1] = 5 Cl_List.x[2] = 10 Cl_List.x[3] = 15 Cl_List.x[4] = 20 Cl_List.x[5] = 25 Cl_List.x[6] = 30 Cl_List.x[7] = 35 Cl_List.x[8] = 40 Cl_List.x[9] = 45 Cl_List.x[10] = 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 //0.000305 //Value from Lombardi et al 2018 E_AMPA = 0 // Reversal Potential of Exp2Syn DECAY_AMPA = 11 //Value from Lombardi et al 2018 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 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, 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] } //-- No Inner Loop Variation of g-AMPA -------------------------------------------------------------- // Assign Value to Synapse dend { synpulsegaba = new NetCon(stimGABApuls, gabasyn, 0, 0, G_GABA) synpulseampa = new NetCon(stimAMPApuls, ampasyn, 0, 0, G_AMPA) } printf("Faktor = %g of %g ", Cl_Step+1, 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*Cl_Steps) 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("- g_AMPA = %g pS - [Cl-]i = %g mM => Delta[Cl-]i = %g mM, Em = %g mV \n", G_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] = Cl_Step shortvoltvec.x[0] = Cl_Step Outmatrix.setcol(Cl_Step+1, shortclivec) Outmatrix.setcol(Cl_Steps + Cl_Step+1, shortvoltvec) Analysismatrix.x[0][Cl_Step] = Cl_List.x[Cl_Step] Analysismatrix.x[1][Cl_Step] = G_AMPA Analysismatrix.x[2][Cl_Step] = clivec[SynPos].max() Analysismatrix.x[3][Cl_Step] = clivec[SynPos].min() Analysismatrix.x[4][Cl_Step] = voltvec[SynPos].max() Analysismatrix.x[5][Cl_Step] = voltvec[SynPos].min() // Goto next Cl- Concentration Cl_Step+=1 } // ---------- End of outer loop (Cl_Step-Loop) ---------------------- // Save the Data -------------------------------------------------------------------- OutFile = new File() sprint(OutFileName, "Result_BS_Div-Cli_NO-gAMPA.asc") OutFile.wopen(OutFileName) Outmatrix.fprint(OutFile, "\t%g") OutFile.close // Save the Analysismatrix -------------------------------------------------------------------- OutFile = new File() sprint(OutFileName, "Analysis_BS_Var-Cli_NO-gAMPA.asc") OutFile.wopen(OutFileName) Analysismatrix.fprint(OutFile, "\t%g") OutFile.close