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