1 | [[tags:egg]] |
---|
2 | |
---|
3 | == nemo |
---|
4 | |
---|
5 | An implementation of a description language for computational models of ion channels. |
---|
6 | |
---|
7 | [[toc:]] |
---|
8 | |
---|
9 | == Usage |
---|
10 | |
---|
11 | nemo [options...] [input files ...] |
---|
12 | |
---|
13 | == Documentation |
---|
14 | |
---|
15 | |
---|
16 | {{NEMO}} is a program that reads an ion channel description and |
---|
17 | generates corresponding model simulation code in |
---|
18 | [[http://www.gnu.org/software/octave/|GNU Octave]] or the |
---|
19 | [[http://www.neuron.yale.edu/neuron/docs/help/neuron/nmodl/nmodl.html|NMODL]] |
---|
20 | language used by the [[http://www.neuron.yale.edu/neuron/|NEURON |
---|
21 | simulator]]. |
---|
22 | |
---|
23 | === Options |
---|
24 | |
---|
25 | ; {{-i FORMAT}} : specify input format (nemo, xml, sxml, s-exp) |
---|
26 | ; {{--xml[=FILE]}} : write XML output to file (default: <model-name>.xml) |
---|
27 | ; {{--sxml[=FILE]}} : write SXML output to file (default: <model-name>.sxml) |
---|
28 | ; {{--nmodl[=FILE]}} : write NMODL output to file (default: <model-name>.mod) |
---|
29 | ; {{--nmodl-method=METHOD}} : specify NMODL integration method (cnexp, derivimplicit, cvode) |
---|
30 | ; {{--nmodl-kinetic=[STATES]}} : use NMODL kinetic equations for the given reactions |
---|
31 | ; {{--nmodl-depend=VARS}} : specify DEPEND variables for NMODL interpolation tables |
---|
32 | ; {{--octave[=FILE]}} : write Octave output to file (default: <model-name>.m) |
---|
33 | ; {{--matlab[=FILE]}} : write Matlab output to file (default: <model-name>.m) |
---|
34 | ; {{--vclamp-octave[=FILE]}} : write Octave voltage clamp script to file (default: <model-name>_vclamp.m) |
---|
35 | ; {{--vclamp-hoc[=FILE]}} : write HOC voltage clamp script to file (default: <model-name>.ses) |
---|
36 | ; {{-t}} : use interpolation tables in generated code |
---|
37 | ; {{-h, --help}} : print help |
---|
38 | |
---|
39 | |
---|
40 | === Model description language |
---|
41 | |
---|
42 | |
---|
43 | The following constructs comprise the model description language: |
---|
44 | |
---|
45 | |
---|
46 | ; '''{{MODEL}}'''{{ ::= }} ( '''{{INPUT }}''' {''ID''}{{ | }}( {''ID''} ['''{{AS }}'''{''LOCAL-ID''}] ['''{{FROM }}'''{''NAMESPACE''}] ) ... ) : Declares one or several imported quantities. If the optional '''{{AS}}''' parameter is given, then the quantity is imported as {''LOCAL-ID''}. If the optional '''{{FROM}}''' parameter is given, then the quantity is imported from namespace {''NAMESPACE''}. |
---|
47 | ; {{ | }}( '''{{OUTPUT}}''' {''ID''} ) : Declares that an existing quantity be exported. |
---|
48 | ; {{ | }}( '''{{CONST}}''' {''ID''} = {''EXPR''} ) : Declares a constant quantity (its value will be computed at declaration time). |
---|
49 | ; {{ | }}( '''{{DEFUN}}''' {''ID''} ( {''ARG-ID''} ... ) {''EXPR''} ) : Declares a function (a parameterized expression with no free variables). |
---|
50 | ; {{ | }}( {''ID''} = {''EXPR''} ) : Declares an assigned quantity (an expression that can refer to other quantities in the system). |
---|
51 | ; {{ | }}( '''{{REACTION}}''' {''ID''} {''TRANSITIONS''} {''INITIAL-EXPR''} {''OPEN-ID''} ) : Declares a reaction quantity. See below for the syntax of state transition equations. {''INITIAL-EXPR''} is an expression that computes the initial value. {''OPEN-ID''} is the name of the open state. It must be one of the states defined by the transition equations. |
---|
52 | ; {{ | }}( '''{{COMPONENT}}''' ( '''{{TYPE}}''' {''ID''} ) ( '''{{NAME}}''' {''ID''} ) {''ELEMENTS''} ) : Declares a system component (a quantity that can contain other quantities). |
---|
53 | |
---|
54 | |
---|
55 | |
---|
56 | ==== Expressions |
---|
57 | |
---|
58 | |
---|
59 | Expressions in the model description language are defined as: |
---|
60 | |
---|
61 | |
---|
62 | ; '''{{EXPR}}'''{{ ::= }} {''NUM''} : A numeric constant. |
---|
63 | ; {{ | }}{''ID''} : A variable name. |
---|
64 | ; {{ | }}( {''ID''} ( {''EXPR''} ... ) ) : A function invocation. |
---|
65 | ; {{ | }}( {''EXPR''} {''OP''} {''EXPR''} ) : Arithmetic operator invocation. The following operators are supported: {{+ - / * > < <= >= ^}} |
---|
66 | ; {{ | }}( '''{{LET}}''' ( {''BINDINGS''} ) {''EXPR''} ) : Local variables declaration. Each element in {''BINDINGS''} is of the form: ( {''ID''} {''EXPR''} ) |
---|
67 | ; {{ | }}( '''{{IF}}''' {''CONDITION''} '''{{THEN}}''' {''EXPR''} '''{{ELSE}}''' {''EXPR''} ) : Conditional expression. The expression after '''{{IF}}''' must be a comparison expression. |
---|
68 | |
---|
69 | |
---|
70 | |
---|
71 | ==== State transition equations |
---|
72 | |
---|
73 | |
---|
74 | State transition equations in the model description language are defined as: |
---|
75 | |
---|
76 | |
---|
77 | ; '''{{TRANSITION}}'''{{ ::= }} ( '''{{->}}''' {''SRC-ID''} {''DEST-ID''} {''EXPR''} ) : Declares that a transition occurs from state {''SRC-ID''} to state {''DEST-ID''} at rate computed by {''EXPR''}. |
---|
78 | ; {{ | }}( '''{{<->}}''' {''SRC-ID''} {''DEST-ID''} {''EXPR-1''} {''EXPR-2''} ) : Declares that a transition occurs from state {''SRC-ID''} to state {''DEST-ID''} and vice versa, at rates computed by {''EXPR-1''} and {''EXPR-2''}. |
---|
79 | |
---|
80 | |
---|
81 | |
---|
82 | ==== Ion channel definitions |
---|
83 | |
---|
84 | |
---|
85 | Currently, the {{NMODL}} code generator recognizes and generates code for ion channel components that are defined as follows: |
---|
86 | |
---|
87 | |
---|
88 | ; '''({{COMPONENT (TYPE gate-complex) (NAME {NAME})}}''' ( '''{{COMPONENT}}''' ( '''{{TYPE}}''' gate ) ... ) : One or more gate definitions. Each component of type gate must export the reactions that characterize the gate dynamics. |
---|
89 | ; ( '''{{COMPONENT}}''' ( '''{{TYPE}}''' pore ) ... ) : Conductance law definition. This component must export a constant maximal conductance, or an assigned quantity whose equation represents the conductance law used. |
---|
90 | ; [( '''{{COMPONENT}}''' ( '''{{TYPE}}''' permeating-ion ) ... )] |
---|
91 | ; [( '''{{COMPONENT}}''' ( '''{{TYPE}}''' accumulating-substance ) ... )] |
---|
92 | ; ''')''' |
---|
93 | |
---|
94 | ==== Hodgkin-Huxley ionic conductance extension |
---|
95 | |
---|
96 | |
---|
97 | The Hodgkin-Huxley ionic conductance extension is a shortcut that declares a reaction corresponding to the Hodgkin-Huxley formulation of ion channel dynamics. |
---|
98 | |
---|
99 | |
---|
100 | ; '''({{HH-IONIC-GATE}}''' : ( {''ION-NAME''} : Ion name: exported variables will be of the form {{{ion}_{id}}}. |
---|
101 | ; ( '''{{M-POWER}}''' {''INTEGER''} ) : Power of state variable {{M}}. |
---|
102 | ; ( '''{{H-POWER}}''' {''INTEGER''} ) : Power of state variable {{H}}. If zero, the initial value and equations for this variable can be omitted. |
---|
103 | ; ( '''{{INITIAL-M}}''' {''EXPR''} ) : Expression that computes initial value for state variable {{M}}. |
---|
104 | ; ( '''{{INITIAL-H}}''' {''EXPR''} ) : Expression that computes initial value for state variable {{H}}. |
---|
105 | ; ( '''{{M-ALPHA}}''' {''EXPR''} ) : Closed state to open state rate expression for state variable {{M}}. |
---|
106 | ; ( '''{{M-BETA}}''' {''EXPR''} ) : Open state to closed state rate expression for state variable {{M}}. |
---|
107 | ; ( '''{{H-ALPHA}}''' {''EXPR''} ) : Closed state to open state rate expression for state variable {{H}}. |
---|
108 | ; ( '''{{H-BETA}}''' {''EXPR''} ) : Open state to closed state rate expression for state variable {{H}}. |
---|
109 | ; ( '''{{M-INF}}''' {''EXPR''} ) : Steady state expression for variable {{M}}. |
---|
110 | ; ( '''{{M-TAU}}''' {''EXPR''} ) : Time constant expression for variable {{M}}. |
---|
111 | ; ( '''{{H-INF}}''' {''EXPR''} ) : Steady state expression for variable {{H}}. |
---|
112 | ; ( '''{{H-TAU}}''' {''EXPR''} ) : Time constant expression for variable {{H}}. |
---|
113 | ; ) |
---|
114 | ; ) |
---|
115 | |
---|
116 | == Examples |
---|
117 | |
---|
118 | |
---|
119 | |
---|
120 | ;; Cerebellar Purkinje Cell: resurgent Na current and high frequency |
---|
121 | ;; firing (Khaliq et al 2003). |
---|
122 | |
---|
123 | (nemo-model Khaliq03 |
---|
124 | |
---|
125 | ((input v |
---|
126 | (cai from ion-pools) |
---|
127 | (ica from ion-currents)) |
---|
128 | |
---|
129 | (const ena = 60) |
---|
130 | (const ek = -88) |
---|
131 | (const ca0 = 1e-4) |
---|
132 | |
---|
133 | (component (type gate-complex) (name CaBK) |
---|
134 | ;: BK-type Purkinje calcium-activated potassium current |
---|
135 | |
---|
136 | (component (type gate) |
---|
137 | |
---|
138 | ;; constants |
---|
139 | (const CaBK_ztau = 1.0) |
---|
140 | |
---|
141 | |
---|
142 | ;; rate functions |
---|
143 | |
---|
144 | (CaBK_v = (v + 5)) |
---|
145 | |
---|
146 | (CaBK_minf = |
---|
147 | (let ((vh -28.9) |
---|
148 | (k 6.2)) |
---|
149 | (1.0 / (1.0 + exp (neg ((CaBK_v - vh) / k)))))) |
---|
150 | |
---|
151 | (CaBK_mtau = |
---|
152 | (let |
---|
153 | ((y0 0.000505) |
---|
154 | (vh1 -33.3) |
---|
155 | (k1 -10.0) |
---|
156 | (vh2 86.4) |
---|
157 | (k2 10.1)) |
---|
158 | ((1e3) * (y0 + 1 / (exp ((CaBK_v + vh1) / k1) + |
---|
159 | exp ((CaBK_v + vh2) / k2)))))) |
---|
160 | |
---|
161 | (CaBK_hinf = |
---|
162 | (let ((y0 0.085) |
---|
163 | (vh -32.0) |
---|
164 | (k 5.8)) |
---|
165 | (y0 + (1 - y0) / (1 + exp ((CaBK_v - vh) / k))))) |
---|
166 | |
---|
167 | |
---|
168 | (CaBK_htau = |
---|
169 | (let ((y0 0.0019) |
---|
170 | (vh1 -54.2) |
---|
171 | (k1 -12.9) |
---|
172 | (vh2 48.5) |
---|
173 | (k2 5.2)) |
---|
174 | ((1e3) * (y0 + 1 / (exp ((CaBK_v + vh1) / k1) + exp ((CaBK_v + vh2) / k2)))))) |
---|
175 | |
---|
176 | |
---|
177 | (CaBK_zinf = |
---|
178 | (let ((k 0.001)) |
---|
179 | (1 / (1 + (k / cai))))) |
---|
180 | |
---|
181 | (CaBK_z_alpha = (CaBK_zinf / CaBK_ztau)) |
---|
182 | (CaBK_z_beta = ((1 - CaBK_zinf) / CaBK_ztau)) |
---|
183 | |
---|
184 | (reaction |
---|
185 | (CaBK_z |
---|
186 | (transitions (<-> O C CaBK_z_alpha CaBK_z_beta)) |
---|
187 | (conserve (1 = (O + C))) |
---|
188 | (initial (let ((k 0.001)) |
---|
189 | (1 / (1 + k / ca0)))) |
---|
190 | (open O) (power 2))) |
---|
191 | |
---|
192 | (output CaBK_z ) |
---|
193 | |
---|
194 | |
---|
195 | (hh-ionic-gate |
---|
196 | (CaBK ;; ion name: exported variables will be of the form {ion}_{id} |
---|
197 | (initial-m (CaBK_minf)) |
---|
198 | (initial-h (CaBK_hinf)) |
---|
199 | (m-power 3) |
---|
200 | (h-power 1) |
---|
201 | (m-inf (CaBK_minf)) |
---|
202 | (m-tau (CaBK_mtau)) |
---|
203 | (h-inf (CaBK_hinf)) |
---|
204 | (h-tau (CaBK_htau)))) |
---|
205 | |
---|
206 | ) |
---|
207 | |
---|
208 | (component (type pore) |
---|
209 | (const gbar_CaBK = 0.007) |
---|
210 | (output gbar_CaBK )) |
---|
211 | |
---|
212 | (component (type permeating-ion) (name k) |
---|
213 | (const e_CaBK = ek) |
---|
214 | (output e_CaBK )) |
---|
215 | |
---|
216 | ) ;; end BK current |
---|
217 | |
---|
218 | |
---|
219 | (component (type gate-complex) (name CaP) |
---|
220 | ;; HH P-type Calcium current |
---|
221 | |
---|
222 | (component (type gate) |
---|
223 | |
---|
224 | |
---|
225 | ;; rate functions |
---|
226 | (CaP_inf = |
---|
227 | (let ((cv -19) (ck 5.5)) |
---|
228 | (1.0 / (1.0 + exp (neg ((v - cv) / ck)))))) |
---|
229 | |
---|
230 | (CaP_tau = |
---|
231 | ((1e3) * |
---|
232 | (if (v > -50) |
---|
233 | then (0.000191 + (0.00376 * exp (neg (((v + 41.9) / 27.8) ^ 2)))) |
---|
234 | else (0.00026367 + (0.1278 * exp (0.10327 * v)))))) |
---|
235 | |
---|
236 | |
---|
237 | (hh-ionic-gate |
---|
238 | (CaP ;; ion name: exported variables will be of the form {ion}_{id} |
---|
239 | (initial-m (CaP_inf)) |
---|
240 | (m-power 1) |
---|
241 | (h-power 0) |
---|
242 | (m-inf CaP_inf) |
---|
243 | (m-tau CaP_tau))) |
---|
244 | |
---|
245 | ) |
---|
246 | |
---|
247 | (component (type permeability) |
---|
248 | |
---|
249 | (defun ghk (v ci co) |
---|
250 | (let ((F 9.6485e4) |
---|
251 | (R 8.3145) |
---|
252 | (T (22 + 273.19)) |
---|
253 | (Z 2) |
---|
254 | (E ((1e-3) * v))) |
---|
255 | (let ((k0 ((Z * F * E) / (R * T)))) |
---|
256 | (let ((k1 (exp (neg(k0)))) |
---|
257 | (k2 (((Z ^ 2) * (E * (F ^ 2))) / (R * T)))) |
---|
258 | (1e-6) * (if (abs (1 - k1) < 1e-6) |
---|
259 | then (Z * F * (ci - (co * k1)) * (1 - k0)) |
---|
260 | else (k2 * (ci - (co * k1)) / (1 - k1))))))) |
---|
261 | |
---|
262 | (const pcabar_CaP = 0.00005) |
---|
263 | (const cao = 2.4) |
---|
264 | (pca_CaP = (pcabar_CaP * ghk (v cai cao))) |
---|
265 | (output pca_CaP )) |
---|
266 | |
---|
267 | (component (type permeating-ion) (name ca) ) |
---|
268 | |
---|
269 | |
---|
270 | ) ;; end CaP current |
---|
271 | |
---|
272 | (component (type gate-complex) (name K1) |
---|
273 | ;; HH TEA-sensitive Purkinje potassium current |
---|
274 | |
---|
275 | (component (type gate) |
---|
276 | |
---|
277 | ;; constants |
---|
278 | |
---|
279 | ;; rate functions |
---|
280 | |
---|
281 | (K1_v = (v + 11)) ;; account for junction potential |
---|
282 | |
---|
283 | (K1_minf = |
---|
284 | (let ((mivh -24) |
---|
285 | (mik 15.4)) |
---|
286 | (1 / (1 + exp (neg (K1_v - mivh) / mik))))) |
---|
287 | |
---|
288 | |
---|
289 | (K1_mtau = |
---|
290 | (let ((mty0 0.00012851) |
---|
291 | (mtvh1 100.7) |
---|
292 | (mtk1 12.9) |
---|
293 | (mtvh2 -56.0) |
---|
294 | (mtk2 -23.1)) |
---|
295 | (1e3 * (if (K1_v < -35) |
---|
296 | then (3.0 * (3.4225e-5 + 0.00498 * exp (neg (K1_v) / -28.29))) |
---|
297 | else (mty0 + 1.0 / (exp ((K1_v + mtvh1) / mtk1) + exp ((K1_v + mtvh2) / mtk2))) |
---|
298 | )))) |
---|
299 | |
---|
300 | (K1_hinf = |
---|
301 | (let ((hiy0 0.31) |
---|
302 | (hiA 0.78) |
---|
303 | (hivh -5.802) |
---|
304 | (hik 11.2)) |
---|
305 | (hiy0 + hiA / (1 + exp ((K1_v - hivh) / hik))))) |
---|
306 | |
---|
307 | |
---|
308 | (K1_htau = |
---|
309 | (1e3 * (if ( K1_v > 0 ) |
---|
310 | then (0.0012 + 0.0023 * exp (-0.141 * K1_v)) |
---|
311 | else (1.2202e-05 + 0.012 * exp (neg (((K1_v - (-56.3)) / 49.6) ^ 2)))))) |
---|
312 | |
---|
313 | (hh-ionic-gate |
---|
314 | (K1 ;; ion name: exported variables will be of the form {ion}_{id} |
---|
315 | (initial-m (K1_minf)) |
---|
316 | (initial-h (K1_hinf)) |
---|
317 | (m-power 3) |
---|
318 | (h-power 1) |
---|
319 | (m-inf (K1_minf)) |
---|
320 | (m-tau (K1_mtau)) |
---|
321 | (h-inf (K1_hinf)) |
---|
322 | (h-tau (K1_htau)))) |
---|
323 | |
---|
324 | ) |
---|
325 | |
---|
326 | (component (type pore) |
---|
327 | (const gbar_K1 = 0.004) |
---|
328 | (output gbar_K1 )) |
---|
329 | |
---|
330 | (component (type permeating-ion) (name k) |
---|
331 | (const e_K1 = ek) |
---|
332 | (output e_K1 )) |
---|
333 | |
---|
334 | ) ;; end K1 current |
---|
335 | |
---|
336 | (component (type gate-complex) (name K2) |
---|
337 | ;; HH Low TEA-sensitive Purkinje potassium current |
---|
338 | |
---|
339 | (component (type gate) |
---|
340 | |
---|
341 | ;; constants |
---|
342 | |
---|
343 | ;; rate functions |
---|
344 | |
---|
345 | (K2_v = (v + 11)) ;; account for junction potential |
---|
346 | |
---|
347 | (K2_minf = |
---|
348 | (let ((mivh -24) |
---|
349 | (mik 20.4)) |
---|
350 | (1 / (1 + exp ((neg(K2_v - mivh)) / mik))))) |
---|
351 | |
---|
352 | |
---|
353 | (K2_mtau = |
---|
354 | ((1e3) * (if (K2_v < -20) |
---|
355 | then (0.000688 + 1 / (exp ((K2_v + 64.2) / 6.5) + exp ((K2_v - 141.5) / -34.8))) |
---|
356 | else (0.00016 + 0.0008 * exp (-0.0267 * K2_v))))) |
---|
357 | |
---|
358 | |
---|
359 | (hh-ionic-gate |
---|
360 | (K2 ;; ion name: exported variables will be of the form {ion}_{id} |
---|
361 | (initial-m (K2_minf)) |
---|
362 | (m-power 4) |
---|
363 | (h-power 0) |
---|
364 | (m-inf (K2_minf)) |
---|
365 | (m-tau (K2_mtau)))) |
---|
366 | |
---|
367 | ) |
---|
368 | |
---|
369 | (component (type pore) |
---|
370 | (const gbar_K2 = 0.002) |
---|
371 | (output gbar_K2 )) |
---|
372 | |
---|
373 | (component (type permeating-ion) (name k) |
---|
374 | (const e_K2 = ek) |
---|
375 | (output e_K2 )) |
---|
376 | |
---|
377 | ) ;; end K2 current |
---|
378 | |
---|
379 | |
---|
380 | |
---|
381 | |
---|
382 | (component (type gate-complex) (name K3) |
---|
383 | ;; HH slow TEA-insensitive Purkinje potassium current |
---|
384 | |
---|
385 | (component (type gate) |
---|
386 | |
---|
387 | ;; constants |
---|
388 | |
---|
389 | ;; rate functions |
---|
390 | |
---|
391 | (K3_v = (v + 11)) ;; account for junction potential |
---|
392 | |
---|
393 | (K3_minf = |
---|
394 | (let ((mivh -16.5) |
---|
395 | (mik 18.4)) |
---|
396 | (1 / (1 + exp ((neg(K3_v - mivh)) / mik))))) |
---|
397 | |
---|
398 | |
---|
399 | (K3_mtau = |
---|
400 | ((1e3) * (0.000796 + 1.0 / (exp ((K3_v + 73.2) / 11.7) + exp ((K3_v - 306.7) / -74.2))))) |
---|
401 | |
---|
402 | (hh-ionic-gate |
---|
403 | (K3 ;; ion name: exported variables will be of the form {ion}_{id} |
---|
404 | (initial-m (K3_minf)) |
---|
405 | (m-power 4) |
---|
406 | (h-power 0) |
---|
407 | (m-inf (K3_minf)) |
---|
408 | (m-tau (K3_mtau)))) |
---|
409 | |
---|
410 | ) |
---|
411 | |
---|
412 | (component (type pore) |
---|
413 | (const gbar_K3 = 0.004) |
---|
414 | (output gbar_K3 )) |
---|
415 | |
---|
416 | (component (type permeating-ion) (name k) |
---|
417 | (const e_K3 = ek) |
---|
418 | (output e_K3 )) |
---|
419 | |
---|
420 | ) ;; end K3 current |
---|
421 | |
---|
422 | (component (type gate-complex) (name Narsg) |
---|
423 | |
---|
424 | ;; constants |
---|
425 | |
---|
426 | (component (type gate) |
---|
427 | |
---|
428 | (const Na_Con = 0.005) |
---|
429 | (const Na_Coff = 0.5) |
---|
430 | (const Na_Oon = 0.75) |
---|
431 | (const Na_Ooff = 0.005) |
---|
432 | |
---|
433 | |
---|
434 | (const Na_alfac = (pow ((Na_Oon / Na_Con) (1.0 / 4.0)))) |
---|
435 | (const Na_btfac = (pow ((Na_Ooff / Na_Coff) (1.0 / 4.0)))) |
---|
436 | |
---|
437 | (const Na_alpha = 150) |
---|
438 | (const Na_beta = 3) |
---|
439 | (const Na_gamma = 150) |
---|
440 | (const Na_delta = 40) |
---|
441 | (const Na_epsilon = 1.75) |
---|
442 | (const Na_zeta = 0.03) |
---|
443 | (const Na_x1 = 20) |
---|
444 | (const Na_x2 = -20) |
---|
445 | (const Na_x3 = 1e12) |
---|
446 | (const Na_x4 = -1e12) |
---|
447 | (const Na_x5 = 1e12) |
---|
448 | (const Na_x6 = -25) |
---|
449 | |
---|
450 | ;; rate functions |
---|
451 | |
---|
452 | (f01 = (4.0 * Na_alpha * exp (v / Na_x1))) |
---|
453 | (f02 = (3.0 * Na_alpha * exp (v / Na_x1))) |
---|
454 | (f03 = (2.0 * Na_alpha * exp (v / Na_x1))) |
---|
455 | (f04 = (Na_alpha * exp (v / Na_x1))) |
---|
456 | (f0O = (Na_gamma * exp (v / Na_x3))) |
---|
457 | (fip = (Na_epsilon * exp (v / Na_x5))) |
---|
458 | (f11 = (4.0 * Na_alpha * Na_alfac * exp (v / Na_x1))) |
---|
459 | (f12 = (3.0 * Na_alpha * Na_alfac * exp (v / Na_x1))) |
---|
460 | (f13 = (2.0 * Na_alpha * Na_alfac * exp (v / Na_x1))) |
---|
461 | (f14 = (Na_alpha * Na_alfac * exp (v / Na_x1))) |
---|
462 | (f1n = (Na_gamma * exp (v / Na_x3))) |
---|
463 | |
---|
464 | (fi1 = (Na_Con)) |
---|
465 | (fi2 = (Na_Con * Na_alfac)) |
---|
466 | (fi3 = (Na_Con * Na_alfac * Na_alfac)) |
---|
467 | (fi4 = (Na_Con * Na_alfac * Na_alfac * Na_alfac)) |
---|
468 | (fi5 = (Na_Con * Na_alfac * Na_alfac * Na_alfac * Na_alfac)) |
---|
469 | (fin = (Na_Oon)) |
---|
470 | |
---|
471 | (b01 = (Na_beta * exp (v / Na_x2))) |
---|
472 | (b02 = (2.0 * Na_beta * exp (v / Na_x2))) |
---|
473 | (b03 = (3.0 * Na_beta * exp (v / Na_x2))) |
---|
474 | (b04 = (4.0 * Na_beta * exp (v / Na_x2))) |
---|
475 | (b0O = (Na_delta * exp (v / Na_x4))) |
---|
476 | (bip = (Na_zeta * exp (v / Na_x6))) |
---|
477 | |
---|
478 | (b11 = (Na_beta * Na_btfac * exp (v / Na_x2))) |
---|
479 | (b12 = (2.0 * Na_beta * Na_btfac * exp (v / Na_x2))) |
---|
480 | (b13 = (3.0 * Na_beta * Na_btfac * exp (v / Na_x2))) |
---|
481 | (b14 = (4.0 * Na_beta * Na_btfac * exp (v / Na_x2))) |
---|
482 | (b1n = (Na_delta * exp (v / Na_x4))) |
---|
483 | |
---|
484 | (bi1 = (Na_Coff)) |
---|
485 | (bi2 = (Na_Coff * Na_btfac)) |
---|
486 | (bi3 = (Na_Coff * Na_btfac * Na_btfac)) |
---|
487 | (bi4 = (Na_Coff * Na_btfac * Na_btfac * Na_btfac)) |
---|
488 | (bi5 = (Na_Coff * Na_btfac * Na_btfac * Na_btfac * Na_btfac)) |
---|
489 | (bin = (Na_Ooff)) |
---|
490 | |
---|
491 | (reaction |
---|
492 | (Na_z |
---|
493 | (transitions |
---|
494 | (<-> C1 C2 f01 b01) |
---|
495 | (<-> C2 C3 f02 b02) |
---|
496 | (<-> C3 C4 f03 b03) |
---|
497 | (<-> C4 C5 f04 b04) |
---|
498 | (<-> C5 O f0O b0O) |
---|
499 | (<-> O B fip bip) |
---|
500 | (<-> O I6 fin bin) |
---|
501 | (<-> C1 I1 fi1 bi1) |
---|
502 | (<-> C2 I2 fi2 bi2) |
---|
503 | (<-> C3 I3 fi3 bi3) |
---|
504 | (<-> C4 I4 fi4 bi4) |
---|
505 | (<-> C5 I5 fi5 bi5) |
---|
506 | (<-> I1 I2 f11 b11) |
---|
507 | (<-> I2 I3 f12 b12) |
---|
508 | (<-> I3 I4 f13 b13) |
---|
509 | (<-> I4 I5 f14 b14) |
---|
510 | (<-> I5 I6 f1n b1n) |
---|
511 | ) |
---|
512 | |
---|
513 | (conserve (1 = (I1 + I2 + I3 + I4 + I5 + I6 + C1 + C2 + C3 + C4 + C5 + O + B))) |
---|
514 | |
---|
515 | (open O) (power 1))) |
---|
516 | |
---|
517 | (output Na_z ) |
---|
518 | |
---|
519 | ) |
---|
520 | |
---|
521 | (component (type pore) |
---|
522 | (const gbar = 0.015) |
---|
523 | (output gbar )) |
---|
524 | |
---|
525 | (component (type permeating-ion) (name na) |
---|
526 | (const e = ena) |
---|
527 | (output e )) |
---|
528 | |
---|
529 | ) ;; end Narsg component |
---|
530 | |
---|
531 | |
---|
532 | |
---|
533 | |
---|
534 | |
---|
535 | (component (type gate-complex) (name Ih) |
---|
536 | |
---|
537 | (component (type gate) |
---|
538 | |
---|
539 | ;; rate functions |
---|
540 | |
---|
541 | (Ih_inf = (1.0 /(1.0 + exp ((v + 90.1) / 9.9)))) |
---|
542 | |
---|
543 | (Ih_tau = ((1e3) * (0.19 + 0.72 * exp (neg(((v - (-81.5)) / 11.9) ^ 2))))) |
---|
544 | |
---|
545 | (hh-ionic-gate |
---|
546 | (Ih ;; ion name: exported variables will be of the form {ion}_{id} |
---|
547 | (initial-m (Ih_inf)) |
---|
548 | (m-power 1) |
---|
549 | (h-power 0) |
---|
550 | (m-inf (Ih_inf)) |
---|
551 | (m-tau (Ih_tau)) |
---|
552 | )) |
---|
553 | |
---|
554 | ) |
---|
555 | |
---|
556 | (component (type pore) |
---|
557 | (const gbar_Ih = 0.0001) |
---|
558 | (output gbar_Ih )) |
---|
559 | |
---|
560 | (component (type permeating-ion) (name non-specific) |
---|
561 | (const e_Ih = -30) |
---|
562 | (output e_Ih )) |
---|
563 | |
---|
564 | ) ;; end Ih current |
---|
565 | |
---|
566 | |
---|
567 | (component (type gate-complex) (name Leak) |
---|
568 | |
---|
569 | (component (type pore) |
---|
570 | (const gbar_Leak = 5e-5) |
---|
571 | (output gbar_Leak )) |
---|
572 | |
---|
573 | (component (type permeating-ion) (name non-specific) |
---|
574 | (const e_Leak = -60) |
---|
575 | (output e_Leak )) |
---|
576 | |
---|
577 | ) ;; end leak current |
---|
578 | |
---|
579 | |
---|
580 | (component (type decaying-pool) (name ca) |
---|
581 | (const F = 96485.0) |
---|
582 | (const ca_depth = 0.1) |
---|
583 | (const ca_beta = 1.0) |
---|
584 | |
---|
585 | (d (ca) = ((neg (ica) / (2 * ca0 * F * ca_depth)) - |
---|
586 | ((if (ca < ca0) then ca0 else ca) * ca_beta)) |
---|
587 | (initial ca0)) |
---|
588 | |
---|
589 | (cac = (if (ca < ca0) then ca0 else ca)) |
---|
590 | |
---|
591 | (output cac) |
---|
592 | ) |
---|
593 | |
---|
594 | |
---|
595 | (component (type membrane-capacitance) |
---|
596 | (const C_m = 1e-3) |
---|
597 | (output C_m)) |
---|
598 | |
---|
599 | )) |
---|
600 | |
---|
601 | |
---|
602 | == About this egg |
---|
603 | |
---|
604 | === Author |
---|
605 | |
---|
606 | [[/users/ivan-raikov|Ivan Raikov]] |
---|
607 | |
---|
608 | === Version history |
---|
609 | |
---|
610 | ; 4.4 : Voltage clamp script generation |
---|
611 | ; 4.3 : Renamed permeating-substance components to permeating-ion |
---|
612 | ; 4.2 : Using installation-chicken-home to install example files |
---|
613 | ; 4.1 : Documentation converted to wiki format |
---|
614 | ; 4.0 : Introducing the gate-complex element |
---|
615 | ; 3.4 : Documentation update |
---|
616 | ; 3.1-3.3 : Fixes to the examples |
---|
617 | ; 3.0 : Internal restructuring and new examples |
---|
618 | ; 2.5 : Bug fixes in option handling and NMODL backend |
---|
619 | ; 2.4 : Converted to using getopt-long |
---|
620 | ; 2.3 : Added eggdoc as a dependency |
---|
621 | ; 2.2 : Added stx-engine.scm to file manifest |
---|
622 | ; 2.1 : Ported to Chicken 4 |
---|
623 | ; 2.0 : Introduced functors |
---|
624 | ; 1.15 : Added nmodl-depend option |
---|
625 | ; 1.14 : Added support for exponential Euler integration |
---|
626 | ; 1.13 : Change in the integration method used for the AKP example |
---|
627 | ; 1.12 : Added support for binary conductances and conservation equations |
---|
628 | ; 1.11 : Bug fixes in the current equations part of NMODL code generator |
---|
629 | ; 1.10 : AKP06 example is now installed in CHICKEN-HOME/nemo/examples |
---|
630 | ; 1.9 : Documentation and example updates |
---|
631 | ; 1.8 : Bug fixes related to kinetic equation processing |
---|
632 | ; 1.6 : Added infix expression parser (nemo format) |
---|
633 | ; 1.0 : Initial release |
---|
634 | |
---|
635 | === License |
---|
636 | |
---|
637 | |
---|
638 | Copyright 2008-2011 Ivan Raikov and the Okinawa Institute of Science and Technology. |
---|
639 | |
---|
640 | This program is free software: you can redistribute it and/or modify |
---|
641 | it under the terms of the GNU General Public License as published by |
---|
642 | the Free Software Foundation, either version 3 of the License, or (at |
---|
643 | your option) any later version. |
---|
644 | |
---|
645 | This program is distributed in the hope that it will be useful, but |
---|
646 | WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
647 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
648 | General Public License for more details. |
---|
649 | |
---|
650 | A full copy of the GPL license can be found at |
---|
651 | <http://www.gnu.org/licenses/>. |
---|
652 | |
---|