;; Simoes de Souza FM and De Schutter E (2011) Robustness effect of ;; gap junctions between Golgi cells on cerebellar cortex ;; oscillations. Neural Systems & Circuits 1:7. (nemo-model Golgi ( (input v celsius) (const F = 96485.3) (const R = 8.31342) (component (type defaults) (const V_t = -35) (const celsius = 23) (output celsius V_t) ) (component (type membrane-capacitance) (const c = 1e-3) (output c )) (component (type decaying-pool) (name ca) (input (ica from ion-currents)) (const d = .2) (const cao = 2.) (const cai0 = 5e-5) (const beta = 1.3) (d (ca) = ((neg (ica) / (2 * F * d)) * 1e4 - (beta * (ca - cai0))) (initial cai0)) (output ca cao) ) (component (type decaying-pool) (name ca2) (input (ica2 from ion-currents)) (const valence = 2) (const d = .2) (const ca2o = 2.) (const ca2i0 = 5e-5) (const beta = 1.3) (d (ca2) = ((neg (ica2) / (2 * F * d)) * 1e4 - (beta * (ca2 - ca2i0))) (initial ca2i0)) (output ca2 ca2o valence) ) (component (type decaying-pool) (name na) (input (ina from ion-currents)) (const d = .2) (const nao0 = 140.) (const nai0 = 5.) (const beta = 0.075) (d (nai) = ((neg (ina) / (2 * F * d)) * 1e4 - (beta * (nai - nai0))) (initial nai0)) (d (nao) = ((ina / (2 * F * d)) * 1e4 - (beta * (nao - nao0))) (initial nao0)) (output nai nao) ) (component (type decaying-pool) (name k) (input (ik from ion-currents)) (const d = .2) (const ko0 = 5.) (const ki0 = 140.) (const beta = 0.075) (d (ki) = ((neg (ik) / (2 * F * d)) * 1e4 - (beta * (ki - ki0))) (initial ki0)) (d (ko) = ((ik / (2 * F * d)) * 1e4 - (beta * (ko - ko0))) (initial ko0)) (output ki ko) ) (input (ki from ion-pools) (ko from ion-pools) (nai from ion-pools) (nao from ion-pools) ) (ek = ((1e3) * (R * (celsius + 273.15)) / (F) * ln (ko / ki))) (ena = ((1e3) * (R * (celsius + 273.15)) / (F) * ln (nao / nai))) (component (type ionic-current) (name CaHVA ) (input (cai from ion-pools) (cao from ion-pools)) (component (type gate) ;; rate constants (Q10 = (pow (3 ((celsius - 20) / 10)))) (const Aalpha_s = 0.04944) (const Kalpha_s = 15.87301587302) (const V0alpha_s = -29.06) (const Abeta_s = 0.08298) (const Kbeta_s = -25.641) (const V0beta_s = -18.66) (const Aalpha_u = 0.0013) (const Kalpha_u = -18.183) (const V0alpha_u = -48) (const Abeta_u = 0.0013) (const Kbeta_u = 83.33) (const V0beta_u = -48) ;; rate functions (defun alpha_s (v Q10) (Q10 * Aalpha_s * exp((v - V0alpha_s) / Kalpha_s))) (defun beta_s (v Q10) (Q10 * Abeta_s * exp((v - V0beta_s) / Kbeta_s))) (defun alpha_u (v Q10) (Q10 * Aalpha_u * exp((v - V0alpha_u) / Kalpha_u))) (defun beta_u (v Q10) (Q10 * Abeta_u * exp((v - V0beta_u) / Kbeta_u))) (s_inf = ((alpha_s (v Q10))/(alpha_s (v Q10) + beta_s (v Q10)))) (tau_s = (1 / (alpha_s (v Q10) + beta_s (v Q10)) )) (u_inf = ((alpha_u (v Q10))/(alpha_u (v Q10) + beta_u (v Q10)) )) (tau_u = (1 / (alpha_u (v Q10) + beta_u (v Q10)) )) (hh-ionic-gate (CaHVA ;; ion name: exported variables will be of the form {ion}_{id} (initial-m s_inf) (initial-h u_inf) (m-power 2) (h-power 1) (m-inf s_inf) (m-tau tau_s) (h-inf u_inf) (h-tau tau_s) )) ) (component (type pore) (const gbar = 460e-6) (output gbar )) (component (type permeating-ion) (name ca) (e = ((1e3) * (R * (celsius + 273.15)) / (2 * F) * ln (cao / cai))) (output e) ) ) ;; end CaHVA current (component (type voltage-clamp) (name CaHVA) (const vchold = -71) (const vcbase = -69) (const vcinc = 10) (const vcsteps = 8) (const vchdur = 30) (const vcbdur = 100) (output vchold vcbase vcinc vcsteps vchdur vcbdur) ) (component (type ionic-current) (name CaLVA ) (input (ca2i from ion-pools) (ca2o from ion-pools)) (component (type gate) (const shift = 2) ; screening charge for Ca_o = 2 mM (const v0_m_inf = -50) (const v0_h_inf = -78) (const k_m_inf = -7.4) (const k_h_inf = 5.0) (const C_tau_m = 3) (const A_tau_m = 1.0) (const v0_tau_m1 = -25) (const v0_tau_m2 = -100) (const k_tau_m1 = 10) (const k_tau_m2 = -15) (const C_tau_h = 85) (const A_tau_h = 1.0) (const v0_tau_h1 = -46) (const v0_tau_h2 = -405) (const k_tau_h1 = 4) (const k_tau_h2 = -50) ;; rate functions (phi_m = (pow (5.0 ((celsius - 24) / 10)))) (phi_h = (pow (3.0 ((celsius - 24) / 10)))) (m_inf = (1.0 / ( 1 + exp ((v + shift - v0_m_inf) / k_m_inf)) )) (h_inf = (1.0 / ( 1 + exp ((v + shift - v0_h_inf) / k_h_inf)) )) (tau_m = ( (C_tau_m + A_tau_m / ( exp ((v + shift - v0_tau_m1) / k_tau_m1) + exp ((v + shift - v0_tau_m2) / k_tau_m2) ) ) / phi_m) ) (tau_h = ( (C_tau_h + A_tau_h / ( exp ((v + shift - v0_tau_h1 ) / k_tau_h1) + exp ((v + shift - v0_tau_h2) / k_tau_h2) ) ) / phi_h) ) (hh-ionic-gate (CaLVA ;; ion name: exported variables will be of the form {ion}_{id} (initial-m m_inf) (initial-h h_inf) (m-power 2) (h-power 1) (m-inf m_inf) (m-tau tau_m) (h-inf h_inf) (h-tau tau_h) )) ) (component (type pore) (const gbar = 2.5e-4) (output gbar )) (component (type permeating-ion) (name ca2) (const valence = 2) (e = ((1e3) * (R * (celsius + 273.15)) / (2 * F) * ln (ca2o / ca2i))) (output e valence)) ) ;; end CaLVA current (component (type voltage-clamp) (name CaLVA) (const vchold = -71) (const vcbase = -69) (const vcinc = 10) (const vcsteps = 8) (const vchdur = 200) (const vcbdur = 30) (output vchold vcbase vcinc vcsteps vchdur vcbdur) ) (component (type ionic-current) (name HCN1) (const Ehalf = -72.49) (const c = 0.11305) (const rA = 0.002096) (const rB = 0.97596) (defun r (potential) ((rA * potential) + rB)) (defun tau (potential t1 t2 t3) (exp (((t1 * potential) - t2) * t3))) (defun o_inf (potential Ehalf c) (1 / (1 + exp ((potential - Ehalf) * c)))) (component (type gate) ;; rate constants (const tCs = 0.01451) (const tDs = -4.056) (const tEs = 2.302585092) (o_slow_inf = ((1 - r (v)) * o_inf (v Ehalf c))) (tau_s = (tau (v tCs tDs tEs)) ) (d (o_slow) = ((o_slow_inf - o_slow) / tau_s) (initial o_slow_inf)) (output o_slow) ) (component (type gate) ;; rate constants (const tCf = 0.01371) (const tDf = -3.368) (const tEf = 2.302585092) (o_fast_inf = (r (v) * o_inf (v Ehalf c))) (tau_f = (tau (v tCf tDf tEf)) ) (d (o_fast) = ((o_fast_inf - o_fast) / tau_f) (initial o_fast_inf)) (output o_fast) ) (component (type pore) (const gbar = 5e-5) (output gbar)) (component (type permeating-ion) (name non-specific) (const e = -20) (output e )) ) ;; end HCN1 current (component (type voltage-clamp) (name HCN1) (const vchold = -71) (const vcbase = -69) (const vcinc = 10) (const vcsteps = 8) (const vchdur = 30) (const vcbdur = 100) (output vchold vcbase vcinc vcsteps vchdur vcbdur) ) (component (type ionic-current) (name HCN2) (const Ehalf = -81.95) (const c = 0.1661) ;; rate constants (const rA = -0.0227) (const rB = -1.4694) (defun r (potential r1 r2) (if (potential >= -64.70) then 0.0 else (if (potential <= -108.70) then 1.0 else (r1 * potential) + r2))) (defun o_inf (potential Ehalf c) (1 / (1 + exp((potential - Ehalf) * c)))) (component (type gate) ;; rate constants (const tCs = 0.0152) (const tDs = -5.2944) (const tEs = 2.3026) (defun tau_slow (potential t1 t2 t3) (exp (t3 * ((t1 * potential) - t2)))) (o_slow_inf = ((1 - r (v rA rB)) * o_inf (v Ehalf c))) (tau_s = (tau_slow(v tCs tDs tEs))) (d (o_slow) = ((o_slow_inf - o_slow) / tau_s) (initial o_slow_inf)) (output o_slow) ) (component (type gate) ;; rate constants (const tCf = 0.0269) (const tDf = -5.6111) (const tEf = 2.3026) (defun tau_fast (potential t1 t2 t3) (exp (t3 * ((t1 * potential) - t2)))) (o_fast_inf = (r (v rA rB) * o_inf (v Ehalf c))) (tau_f = (tau_fast(v tCf tDf tEf))) (d (o_fast) = ((o_fast_inf - o_fast) / tau_f) (initial o_fast_inf)) (output o_fast) ) (component (type pore) (const gbar = 8e-5) (output gbar)) (component (type permeating-ion) (name non-specific) (const e = -20) (output e )) ) ;; end HCN2 current (component (type voltage-clamp) (name HCN2) (const vchold = -71) (const vcbase = -69) (const vcinc = 10) (const vcsteps = 8) (const vchdur = 30) (const vcbdur = 100) (output vchold vcbase vcinc vcsteps vchdur vcbdur) ) (component (type ionic-current) (name KA ) (defun sigm (x y) (1 / (exp (x / y) + 1))) (component (type gate) ;; rate constants (Q10 = (pow (3 ((celsius - 25.5) / 10)))) (const Aalpha_a = 0.8147) (const Kalpha_a = -23.32708) (const V0alpha_a = -9.17203) (const Abeta_a = 0.1655) (const Kbeta_a = 19.47175) (const V0beta_a = -18.27914) (const Aalpha_b = 0.0368) (const Kalpha_b = 12.8433) (const V0alpha_b = -111.33209) (const Abeta_b = 0.0345) (const Kbeta_b = -8.90123) (const V0beta_b = -49.9537) (const V0_ainf = -38) (const K_ainf = -17) (const V0_binf = -78.8) (const K_binf = 8.4) ;; rate functions (defun alpha_a (v Q10) (Q10 * Aalpha_a * sigm((v - V0alpha_a) Kalpha_a))) (defun beta_a (v Q10) (Q10 * (Abeta_a / exp((v - V0beta_a) / Kbeta_a)))) (defun alpha_b (v Q10) (Q10 * Aalpha_b * sigm((v - V0alpha_b) Kalpha_b))) (defun beta_b (v Q10) (Q10 * Abeta_b * sigm((v - V0beta_b) Kbeta_b))) (a_inf = (1 / (1 + exp ((v - V0_ainf) / K_ainf)))) (tau_a = (1 / (alpha_a (v Q10) + beta_a (v Q10)) )) (b_inf = (1 / (1 + exp ((v - V0_binf) / K_binf)))) (tau_b = (1 / (alpha_b (v Q10) + beta_b (v Q10)) )) (hh-ionic-gate (KA ;; ion name: exported variables will be of the form {ion}_{id} (initial-m (a_inf)) (initial-h (b_inf)) (m-power 3) (h-power 1) (m-inf a_inf) (m-tau tau_a) (h-inf b_inf) (h-tau tau_b) )) ) (component (type pore) (const gbar = 0.008) (output gbar )) (component (type permeating-ion) (name k) (e = ek) (output e )) ) ;; end KA current (component (type voltage-clamp) (name KA) (const vchold = -71) (const vcbase = -69) (const vcinc = 10) (const vcsteps = 8) (const vchdur = 30) (const vcbdur = 100) (output vchold vcbase vcinc vcsteps vchdur vcbdur) ) (component (type ionic-current) (name KCa ) (input (cai from ion-pools)) (component (type gate) ;; rate constants (Q10 = (pow (3 ((celsius - 30) / 10)))) (const Aalpha_c = 7) (const Balpha_c = 1.5e-3) (const Kalpha_c = -11.765) (const Abeta_c = 1.) (const Bbeta_c = 0.15e-3) (const Kbeta_c = -11.765) ;; rate functions (defun alpha_c (v cai Q10) (Q10 * Aalpha_c / (1 + (Balpha_c * exp(v / Kalpha_c) / cai)))) (defun beta_c (v cai Q10) (Q10 * Abeta_c / (1 + (cai / (Bbeta_c * exp (v / Kbeta_c))) ))) (c_inf = ((alpha_c (v cai Q10)) / (alpha_c (v cai Q10) + beta_c (v cai Q10)) )) (tau_c = (1 / (alpha_c (v cai Q10) + beta_c (v cai Q10)) )) (hh-ionic-gate (KCa ;; ion name: exported variables will be of the form {ion}_{id} (initial-m c_inf) (m-power 1) (h-power 0) (m-inf c_inf) (m-tau tau_c) )) ) (component (type pore) (const gbar = 0.003) (output gbar )) (component (type permeating-ion) (name k) (e = ek) (output e )) (component (type modulating-ion) (name ca) ) ) ;; end KCa current (component (type voltage-clamp) (name KCa) (const vchold = -71) (const vcbase = -69) (const vcinc = 10) (const vcsteps = 8) (const vchdur = 30) (const vcbdur = 100) (output vchold vcbase vcinc vcsteps vchdur vcbdur) ) (component (type ionic-current) (name KM ) (component (type gate) ;; rate constants (const Aalpha_n = 0.0033) (const Kalpha_n = 40) (const V0alpha_n = -30) (const Abeta_n = 0.0033) (const Kbeta_n = -20) (const V0beta_n = -30) (const V0_ninf = -35) (const B_ninf = 6) (Q10 = (pow (3 ((celsius - 22) / 10)))) ;; rate equations (defun alpha_n (v Q10) (Q10 * Aalpha_n * exp((v - V0alpha_n) / Kalpha_n) )) (defun beta_n (v Q10) (Q10 * Abeta_n * exp((v - V0beta_n) / Kbeta_n) )) (hh-ionic-gate (KM ;; ion name: exported variables will be of the form {ion}_{id} (initial-m ((1 / (1 + exp((neg (v - V0_ninf)) / B_ninf))))) (m-power 1) (h-power 0) (m-tau ((1 / (alpha_n(v Q10) + beta_n (v Q10)) ))) (m-inf ((1 / (1 + exp((neg (v - V0_ninf)) / B_ninf))))) )) ) (component (type pore) (const gbar = 0.001) (output gbar )) (component (type permeating-ion) (name k) (const e = -84.69) (output e )) ) ;; end KM current (component (type voltage-clamp) (name KM) (const vchold = -71) (const vcbase = -69) (const vcinc = 10) (const vcsteps = 8) (const vchdur = 30) (const vcbdur = 100) (output vchold vcbase vcinc vcsteps vchdur vcbdur) ) (component (type ionic-current) (name KV ) (defun linoid (x y) (if ((abs (x / y)) < 1e-6) then (y * (1 - ((x / y) / 2))) else (x / (exp (x / y) - 1)) )) (component (type gate) ;; rate constants (const Aalpha_n = -0.01) (const Kalpha_n = -10) (const V0alpha_n = -26) (const Abeta_n = 0.125) (const Kbeta_n = -80) (const V0beta_n = -36) ;; rate functions (Q10 = (pow (3 ((celsius - 6.3) / 10)))) (defun alpha_n (v Q10) (Q10 * Aalpha_n * linoid ((v - V0alpha_n) Kalpha_n))) (defun beta_n (v Q10) (Q10 * Abeta_n * exp((v - V0beta_n) / Kbeta_n) )) (n_inf = ((alpha_n (v Q10)) / (alpha_n (v Q10) + beta_n (v Q10)) )) (tau_n = (1 / (alpha_n (v Q10) + beta_n (v Q10)) )) (hh-ionic-gate (KV ;; ion name: exported variables will be of the form {ion}_{id} (initial-m n_inf) (m-power 4) (h-power 0) (m-inf (n_inf)) (m-tau (tau_n)) )) ) (component (type pore) (const gbar = 0.032) (output gbar )) (component (type permeating-ion) (name k) (e = ek) (output e )) ) ;; end KV current (component (type voltage-clamp) (name KV) (const vchold = -71) (const vcbase = -69) (const vcinc = 10) (const vcsteps = 8) (const vchdur = 30) (const vcbdur = 100) (output vchold vcbase vcinc vcsteps vchdur vcbdur) ) (component (type ionic-current) (name SK2 ) (input (cai from ion-pools)) (component (type gate) (Q10 = (pow (3 ((celsius - 23) / 10)))) (const diff = 3) ;; Diffusion factor ;; rates ca-independent (const invc1 = 80e-3) (const invc2 = 80e-3) (const invc3 = 200e-3) (const invo1 = 1) (const invo2 = 100e-3) (const diro1 = 160e-3) (const diro2 = 1.2) ;; rates ca-dependent (const dirc2 = 200) (const dirc3 = 160) (const dirc4 = 80) (invc1_t = (invc1 * Q10 )) (invc2_t = (invc2 * Q10 )) (invc3_t = (invc3 * Q10 )) (invo1_t = (invo1 * Q10 )) (invo2_t = (invo2 * Q10 )) (diro1_t = (diro1 * Q10 )) (diro2_t = (diro2 * Q10 )) (dirc2_t = (dirc2 * Q10 )) (dirc3_t = (dirc3 * Q10 )) (dirc4_t = (dirc4 * Q10 )) (dirc2_t_ca = (dirc2_t * (cai / diff) )) (dirc3_t_ca = (dirc3_t * (cai / diff) )) (dirc4_t_ca = (dirc4_t * (cai / diff) )) (reaction (SK2_z (transitions (<-> c1 c2 dirc2_t_ca invc1_t) (<-> c2 c3 dirc3_t_ca invc2_t) (<-> c3 c4 dirc4_t_ca invc3_t) (<-> c3 o1 diro1_t invo1_t) (<-> c4 o2 diro2_t invo2_t) ) (conserve ((1 = (c1 + c2 + c3 + c4 + o2 + o1)))) (open o1 o2) (power 1))) (output SK2_z) ) (component (type pore) (const gbar = 0.038) (output gbar )) (component (type permeating-ion) (name k) (e = ek) (output e )) (component (type modulating-ion) (name ca) ) ) ;; end SK2 current (component (type voltage-clamp) (name SK2) (const vchold = -71) (const vcbase = -69) (const vcinc = 10) (const vcsteps = 8) (const vchdur = 30) (const vcbdur = 100) (output vchold vcbase vcinc vcsteps vchdur vcbdur) ) (component (type ionic-current) (name Na ) (defun linoid (x y) (if ((abs (x / y)) < 1e-6) then (y * (1 - ((x / y) / 2))) else (x / (1 - exp (x / y) )) )) (component (type gate) ;; rate constants (Q10 = (pow (3 ((celsius - 20) / 10)))) (const Aalpha_u = 0.3) (const Kalpha_u = -10) (const V0alpha_u = -25) (const Abeta_u = 12) (const Kbeta_u = -18.182) (const V0beta_u = -50) (const Aalpha_v = 0.21) (const Kalpha_v = -3.333) (const V0alpha_v = -50) (const Abeta_v = 3) (const Kbeta_v = -5) (const V0beta_v = -17) ;; rate functions (defun alpha_u (v Q10) (Q10 * Aalpha_u * linoid((v - V0alpha_u) Kalpha_u) )) (defun beta_u (v Q10) (Q10 * Abeta_u * exp((v - V0beta_u) / Kbeta_u) )) (defun alpha_v (v Q10) (Q10 * Aalpha_v * exp((v - V0alpha_v) / Kalpha_v) )) (defun beta_v (v Q10) (Q10 * Abeta_v / (1 + exp((v - V0beta_v) / Kbeta_v) ))) (u_inf = ((alpha_u (v Q10)) / (alpha_u (v Q10) + beta_u (v Q10)) )) (tau_u = (1 / (alpha_u (v Q10) + beta_u (v Q10)))) (v_inf = ((alpha_v (v Q10)) / (alpha_v (v Q10) + beta_v (v Q10)) )) (tau_v = (1 / (alpha_v (v Q10) + beta_v (v Q10)) )) (hh-ionic-gate (Na ;; ion name: exported variables will be of the form {ion}_{id} (initial-m (u_inf)) (initial-h (v_inf)) (m-power 3) (h-power 1) (m-inf (u_inf)) (m-tau (tau_u)) (h-inf (v_inf)) (h-tau (tau_v)) )) ) (component (type pore) (const gbar = 0.048) (output gbar )) (component (type permeating-ion) (name na) (e = ena) (output e )) ) ;; end Na current (component (type voltage-clamp) (name Na) (const vchold = -71) (const vcbase = -60) (const vcinc = 10) (const vcsteps = 9) (const vchdur = 30) (const vcbdur = 100) (output vchold vcbase vcinc vcsteps vchdur vcbdur)) (component (type ionic-current) (name NaP ) (defun linoid (x y) (if ((abs (x / y)) < 1e-6) then (y * (1 - ((x / y) / 2))) else (x / (exp (x / y) - 1)) )) (component (type gate) ;; rate constants ( Q10 = (pow (3 ((celsius - 30) / 10)))) (const Aalpha_m = -0.91) (const Kalpha_m = -5) (const V0alpha_m = -40) (const Abeta_m = 0.62) (const Kbeta_m = 5) (const V0beta_m = -40) (const V0_minf = -43) (const B_minf = 5) ;; rate functions (defun alpha_m (v Q10) (Q10 * Aalpha_m * linoid( ( v - V0alpha_m ) Kalpha_m) )) (defun beta_m (v Q10) (Q10 * Abeta_m * linoid( ( v - V0beta_m ) Kbeta_m ) )) (hh-ionic-gate (NaP ;; ion name: exported variables will be of the form {ion}_{id} (initial-m ((1 / (1 + exp ((neg (v - V0_minf)) / B_minf))))) (m-power 1) (h-power 0) (m-inf ((1 / (1 + exp ((neg (v - V0_minf)) / B_minf))))) (m-tau ((5 / (alpha_m (v Q10) + beta_m (v Q10)) ))) )) ) (component (type pore) (const gbar = 0.00019) (output gbar )) (component (type permeating-ion) (name na) (e = ena) (output e )) ) ;; end NaP current (component (type voltage-clamp) (name NaP) (const vchold = -71) (const vcbase = -60) (const vcinc = 10) (const vcsteps = 9) (const vchdur = 30) (const vcbdur = 100) (output vchold vcbase vcinc vcsteps vchdur vcbdur)) (component (type ionic-current) (name NaR ) (component (type gate) ;; rate constants (Q10 = (pow (3 ((celsius - 20) / 10)))) (const Aalpha_s = -0.00493) (const V0alpha_s = -4.48754) (const Kalpha_s = -6.81881) (const Shiftalpha_s = 0.00008) (const Abeta_s = 0.01558) (const V0beta_s = 43.97494) (const Kbeta_s = 0.10818) (const Shiftbeta_s = 0.04752) (const Aalpha_f = 0.31836) (const V0alpha_f = -80) (const Kalpha_f = -62.52621) (const Abeta_f = 0.01014) (const V0beta_f = -83.3332) (const Kbeta_f = 16.05379) ;; rate functions (defun alpha_s (v Q10) (Q10 * (Shiftalpha_s + ((Aalpha_s * ((v + V0alpha_s) )) / (exp ((v + V0alpha_s) / Kalpha_s) - 1))))) (defun beta_s (v Q10) (let ((x1 ((v + V0beta_s) / Kbeta_s))) (Q10 * (Shiftbeta_s + Abeta_s * ((v + V0beta_s) / (exp((if (x1 > 200) then 200 else x1)) - 1)))))) (defun alpha_f (v Q10) (Q10 * Aalpha_f * exp( ( v - V0alpha_f ) / Kalpha_f))) (defun beta_f (v Q10) (Q10 * Abeta_f * exp( ( v - V0beta_f ) / Kbeta_f ) )) (s_inf = ((alpha_s (v Q10)) / (alpha_s (v Q10) + beta_s (v Q10)) )) (tau_s = (1 / (alpha_s (v Q10) + beta_s (v Q10)) )) (f_inf = ((alpha_f (v Q10)) / (alpha_f (v Q10) + beta_f (v Q10)) )) (tau_f = (1 / (alpha_f (v Q10) + beta_f (v Q10)) )) (hh-ionic-gate (NaR ;; ion name: exported variables will be of the form {ion}_{id} (initial-m (s_inf)) (initial-h (f_inf)) (m-power 1) (h-power 1) (m-inf (s_inf)) (m-tau (tau_s)) (h-inf (f_inf)) (h-tau (tau_f)) )) ) (component (type pore) (const gbar = 0.0017) (output gbar )) (component (type permeating-ion) (name na) (e = ena) (output e )) ) ;; end Nar current (component (type voltage-clamp) (name NaR) (const vchold = -71) (const vcbase = -60) (const vcinc = 10) (const vcsteps = 9) (const vchdur = 30) (const vcbdur = 100) (output vchold vcbase vcinc vcsteps vchdur vcbdur)) (component (type ionic-current) (name Lkg) (component (type pore) (const gbar = (21e-6)) (output gbar)) (component (type permeating-ion) (name non-specific) (const e = -55) (output e )) ) ;; end leak current ) ;; Following are templates for various driver scripts used to run this model ( ("template.hoc" () #< Removing old automake cache ..." rm -rf autom4te.cache fi echo " -> Running aclocal ..." aclocal echo " -> Running libtoolize ..." if [ `uname -s` = Darwin ] ; then # libtoolize is glibtoolize on OSX LIBTOOLIZE=glibtoolize else LIBTOOLIZE=libtoolize fi libtool_major=`$LIBTOOLIZE --version | head -n1 | cut -d\) -f2 | cut -d\. -f1` $LIBTOOLIZE --force --copy --ltdl echo " -> Re-running aclocal ..." if test $libtool_major -le 2; then aclocal --force else aclocal --force -I $(pwd)/libltdl/m4 fi echo " -> Running autoconf ..." autoconf # autoheader must run before automake echo " -> Running autoheader ..." autoheader echo " -> Running automake ..." automake --foreign --add-missing --force-missing --copy echo "Done." EOF ) ("nestmodule_configure.ac" () #<_LTX_mod * * The dynamicloader can then load modulename and search for symbol "mod" in it. */ golginest::GolgiModule golgimodule_LTX_mod; // -- DynModule functions ------------------------------------------------------ golginest::GolgiModule::GolgiModule() { #ifdef LINKED_MODULE // register this module at the dynamic loader // this is needed to allow for linking in this module at compile time // all registered modules will be initialized by the main app's dynamic loader nest::DynamicLoaderModule::registerLinkedModule(this); #endif } golginest::GolgiModule::~GolgiModule() { } const std::string golginest::GolgiModule::name(void) const { return std::string("Golgi Module"); // Return name of the module } const std::string golginest::GolgiModule::commandstring(void) const { /* 1. Tell interpreter that we provide the C++ part of GolgiModule with the current revision number. 2. Instruct the interpreter to check that golgimodule-init.sli exists, provides at least version 1.0 of the SLI interface to GolgiModule, and to load it. */ return std::string( "/golgimodule /C++ ($Revision: 8512 $) provide-component " "/golgimodule /SLI (7165) require-component" ); } /* BeginDocumentation Name: StepPatternConnect - Connect sources and targets with a stepping pattern Synopsis: [sources] source_step [targets] target_step synmod StepPatternConnect -> n_connections Parameters: [sources] - Array containing GIDs of potential source neurons source_step - Make connection from every source_step'th neuron [targets] - Array containing GIDs of potential target neurons target_step - Make connection to every target_step'th neuron synmod - The synapse model to use (literal, must be key in synapsedict) n_connections - Number of connections made Description: This function subsamples the source and target arrays given with steps source_step and target_step, beginning with the first element in each array, and connects the selected nodes. Example: /first_src 0 /network_size get def /last_src /iaf_neuron 20 Create def % nodes 1 .. 20 /src [first_src last_src] Range def /last_tgt /iaf_neuron 10 Create def % nodes 21 .. 30 /tgt [last_src 1 add last_tgt] Range def src 6 tgt 4 /drop_odd_spike StepPatternConnect This connects nodes [1, 7, 13, 19] as sources to nodes [21, 25, 29] as targets using synapses of type drop_odd_spike, and returning 12 as the number of connections. The following command will print the connections (you must paste the SLI command as one long line): src { /s Set << /source s /synapse_type /static_synapse >> FindConnections { GetStatus /target get } Map dup length 0 gt { cout s <- ( -> ) <- exch <-- endl } if ; } forall 1 -> [21 25 29] 7 -> [21 25 29] 13 -> [21 25 29] 19 -> [21 25 29] Remark: This function is only provided as an example for how to write your own interface function. Author: Hans Ekkehard Plesser SeeAlso: Connect, ConvergentConnect, DivergentConnect */ void golginest::GolgiModule::StepPatternConnect_Vi_i_Vi_i_lFunction::execute(SLIInterpreter *i) const { // Check if we have (at least) five arguments on the stack. i->assert_stack_load(5); // Retrieve source, source step, target, target step from the stack const TokenArray sources = getValue (i->OStack.pick(4)); // bottom const long src_step = getValue (i->OStack.pick(3)); const TokenArray targets = getValue (i->OStack.pick(2)); const long tgt_step = getValue (i->OStack.pick(1)); const Name synmodel_name = getValue(i->OStack.pick(0)); // top // Obtain synapse model index const Token synmodel = nest::NestModule::get_network().get_synapsedict().lookup(synmodel_name); if ( synmodel.empty() ) throw nest::UnknownSynapseType(synmodel_name.toString()); const nest::index synmodel_id = static_cast(synmodel); // Build a list of targets with the given step TokenArray selected_targets; for ( size_t t = 0 ; t < targets.size() ; t += tgt_step ) selected_targets.push_back(targets[t]); // Now connect all appropriate sources to this list of targets size_t Nconn = 0; // counts connections for ( size_t s = 0 ; s < sources.size() ; s += src_step ) { // We must first obtain the GID of the source as integer const nest::long_t sgid = getValue(sources[s]); // nest::network::divergent_connect() requires weight and delay arrays. We want to use // default values from the synapse model, so we pass empty arrays. nest::NestModule::get_network().divergent_connect(sgid, selected_targets, TokenArray(), TokenArray(), synmodel_id); Nconn += selected_targets.size(); } // We get here only if none of the operations above throws and exception. // Now we can safely remove the arguments from the stack and push Nconn // as our result. i->OStack.pop(5); i->OStack.push(Nconn); // Finally, we pop the call to this functions from the execution stack. i->EStack.pop(); } //------------------------------------------------------------------------------------- void golginest::GolgiModule::init(SLIInterpreter *i, nest::Network*) { /* Register a neuron or device model. Give node type as template argument and the name as second argument. The first argument is always a reference to the network. Return value is a handle for later unregistration. */ //printf ("before register model\n"); nest::register_model(nest::NestModule::get_network(), "Golgi"); // printf ("after register model\n"); /* Register a synapse type. Give synapse type as template argument and the name as second argument. The first argument is always a reference to the network. */ nest::register_prototype_connection(nest::NestModule::get_network(), "drop_odd_synapse"); /* Register a SLI function. The first argument is the function name for SLI, the second a pointer to the function object. If you do not want to overload the function in SLI, you do not need to give the mangled name. If you give a mangled name, you should define a type trie in the golgimodule-init.sli file. */ i->createcommand("StepPatternConnect_Vi_i_Vi_i_l", &stepPatternConnect_Vi_i_Vi_i_lFunction); } // GolgiModule::init() EOF ) ("nestmodule.h" () #<> SetStatus /neuron /Golgi Create def /vlog /voltmeter Create def vlog neuron Connect /vlog_parameters << /to_file true /to_memory false >> def vlog vlog_parameters SetStatus 3000.0 Simulate EOF ) ))