Oks
|
Probability that IKs channels are in the open state. |
Iks
|
Current through IKs channels. |
Ik
|
Sum of potassium currents. |
INa
|
Sum of sodium currents. |
ICa
|
Sum of calcium currents. |
V |
Potential across the membrane. |
C |
Membrane capacitance. |
M |
The number of time steps required to reach the steady-state condition (usually equivalent to a few seconds). |
a1Func
|
Transition rate to open state as a function of V. |
b1Func
|
Transition rate from open state as a function of V. |
C10, |
|
C20, |
Initial probability of IKs subunit states. |
C30, |
|
Oks0
|
|
QMatrix
|
The transition rate matrix for subunit states: |
|
1 R = 1/(1-Oks0)*[C10C20C30]T
|
|
2 U = [1 0 0]T
|
|
3 Oks = Oks0
|
|
4 S = 0 |
|
5 F(1) = −α1*(1-Oks0)*R[1] ^ 4 + β1*Oks0
|
|
6 for i = 1 to number of timesteps |
|
7 Oks = Oks-F(i)*dt
|
|
8 Ik = Ikr + Iks + Ik1 + … |
|
9 Ik = Ikr + Iks
|
|
10 Iion = INa + ICa + Ik
|
|
11 V = V-1/C *Iion* dt
|
|
12 Q = QMatrix(V) |
|
13 a1 = a1Func(V) |
|
14 b1 = b1Func(V) |
|
15 R = R + Q*R*dt
|
|
16 U = [[U + Q*U*dt], [1 0 0]T] |
|
17 Ftemp = 0 |
|
18 for k = 1 to Min{i,M} |
|
19 Ftemp = F(k)*(a1*U(1,k) ^ 4 + b1)*dt
|
|
20 end |
|
21 Ftemp = −a1*(1-Oks + S)*R(1) ^ 4 + b1*(Oks-S) − Ftemp
|
|
22 F(i + 1) = Ftemp/(1 + dt*(a1 + b1)) |
|
23 if i > = M
|
|
24 S = S + F(1)*dt
|
|
25 F = F(2:M + 1) |
|
26 U = U(:,2:M + 1) |
|
27 end |
|
28 end |