-
Notifications
You must be signed in to change notification settings - Fork 1
/
ccanl.mod
88 lines (77 loc) · 1.7 KB
/
ccanl.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
COMMENT
calcium accumulation into a volume of area*depth next to the
membrane with a decay (time constant tau) to resting level
given by the global calcium variable cai0_ca_ion
ENDCOMMENT
NEURON {
SUFFIX ccanl
USEION nca READ ncai, inca, enca WRITE enca, ncai VALENCE 2
USEION lca READ lcai, ilca, elca WRITE elca, lcai VALENCE 2
USEION tca READ tcai, itca, etca WRITE etca, tcai VALENCE 2
RANGE caiinf, catau, cai, ncai, lcai,tcai, eca, elca, enca, etca
}
UNITS {
(mV) = (millivolt)
(molar) = (1/liter)
(mM) = (milli/liter)
(mA) = (milliamp)
FARADAY = 96520 (coul)
R = 8.3134 (joule/degC)
}
INDEPENDENT {t FROM 0 TO 100 WITH 100 (ms)}
PARAMETER {
celsius = 6.3 (degC)
depth = 200 (nm) : assume volume = area*depth
catau = 9 (ms)
caiinf = 50.e-6 (mM) : takes precedence over cai0_ca_ion
: Do not forget to initialize in hoc if different
: from this default.
cao = 2 (mM)
ica (mA/cm2)
inca (mA/cm2)
ilca (mA/cm2)
itca (mA/cm2)
cai= 50.e-6 (mM)
}
ASSIGNED {
enca (mV)
elca (mV)
etca (mV)
eca (mV)
}
STATE {
ncai (mM)
lcai (mM)
tcai (mM)
}
INITIAL {
VERBATIM
ncai = _ion_ncai;
lcai = _ion_lcai;
tcai = _ion_tcai;
ENDVERBATIM
ncai=caiinf/3
lcai=caiinf/3
tcai=caiinf/3
cai = caiinf
eca = ktf() * log(cao/caiinf)
enca = eca
elca = eca
etca = eca
}
BREAKPOINT {
SOLVE integrate METHOD derivimplicit
cai = ncai+lcai+tcai
eca = ktf() * log(cao/cai)
enca = eca
elca = eca
etca = eca
}
DERIVATIVE integrate {
ncai' = -(inca)/depth/FARADAY * (1e7) + (caiinf/3 - ncai)/catau
lcai' = -(ilca)/depth/FARADAY * (1e7) + (caiinf/3 - lcai)/catau
tcai' = -(itca)/depth/FARADAY * (1e7) + (caiinf/3 - tcai)/catau
}
FUNCTION ktf() (mV) {
ktf = (1000)*R*(celsius +273.15)/(2*FARADAY)
}