-
Notifications
You must be signed in to change notification settings - Fork 1
/
ch_KCaS.mod
94 lines (76 loc) · 1.75 KB
/
ch_KCaS.mod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
TITLE calcium-activated potassium channel (non-voltage-dependent)
COMMENT
Ca2+ activated K+ channel (not voltage dependent)
From: original said for granule cells, but used in all the cell types
Updates:
2014 December (Marianne Bezaire): documented
ENDCOMMENT
VERBATIM
#include <stdlib.h> /* Include this library so that the following
(innocuous) warning does not appear:
In function '_thread_cleanup':
warning: incompatible implicit declaration of
built-in function 'free' */
ENDVERBATIM
UNITS {
(molar) = (1/liter)
(mM) = (millimolar)
(mA) = (milliamp)
(mV) = (millivolt)
}
NEURON {
SUFFIX ch_KCaS
USEION k READ ek WRITE ik VALENCE 1
USEION ca READ cai VALENCE 2
RANGE g, gmax, qinf, qtau, ik
RANGE myi
THREADSAFE
}
INDEPENDENT {t FROM 0 TO 1 WITH 1 (ms)}
PARAMETER {
celsius (degC) : temperature - set in hoc; default is 6.3
v (mV)
dt (ms)
gmax (mho/cm2)
ek (mV)
cai (mM)
}
STATE { q }
ASSIGNED {
ik (mA/cm2)
g (mho/cm2)
qinf
qtau (ms)
qexp
myi (mA/cm2)
}
BREAKPOINT { :Computes i=g*q^2*(v-ek)
SOLVE state
g = gmax * q*q
ik = g * (v-ek)
myi = ik
}
UNITSOFF
: verbatim blocks are not thread safe (perhaps related, this mechanism cannot be used with cvode)
INITIAL {
q=qinf
rate(cai)
}
PROCEDURE state() { :Computes state variable q at current v and dt.
:cai = ncai + lcai + tcai
rate(cai)
q = q + (qinf-q) * qexp
}
LOCAL q10
PROCEDURE rate(cai) { :Computes rate and other constants at current v.
LOCAL alpha, beta, tinc
q10 = 3^((celsius - 34)/10) : set to 1 for the cutsuridis model?
:"q" activation system
alpha = 1.25e1 * cai * cai
beta = 0.00025
qtau = 1 /(alpha + beta)/q10
qinf = alpha * qtau
tinc = -dt
qexp = 1 - exp(tinc/qtau)
}
UNITSON