Generated Code
The following is f77 code generated by the CellML API from this CellML file. (Back to language selection)
The raw code is available.
C
C There are a total of 29 entries in the algebraic variable array.
C There are a total of 9 entries in each of the rate and state variable arrays.
C There are a total of 45 entries in the constant variable array.
C
C
C VOI is time in component environment (millisecond).
C CONSTS(1) is RT in component parameters (joule_per_mole).
C STATES(1) is V_m in component membrane (millivolt).
C CONSTS(2) is C_m in component membrane (picofarad).
C ALGBRC(17) is I_Na in component I_Na (picoampere).
C ALGBRC(19) is I_T in component I_T (picoampere).
C ALGBRC(21) is I_KCa in component I_KCa (picoampere).
C ALGBRC(26) is I_Ca in component I_Ca (picoampere).
C ALGBRC(27) is I_L in component I_L (picoampere).
C ALGBRC(29) is I_K in component I_K (picoampere).
C ALGBRC(14) is I_stim in component I_stim (picoampere).
C CONSTS(3) is I_mag in component I_stim (picoampere).
C CONSTS(4) is t_0 in component I_stim (millisecond).
C CONSTS(5) is t_1 in component I_stim (millisecond).
C ALGBRC(4) is H_0 in component I_stim (dimensionless).
C ALGBRC(10) is H_1 in component I_stim (dimensionless).
C CONSTS(6) is g_Na in component I_Na (nanosiemens).
C CONSTS(7) is E_Na in component I_Na (millivolt).
C STATES(2) is m in component m (dimensionless).
C STATES(3) is h in component h (dimensionless).
C CONSTS(8) is E_m in component m (millivolt).
C CONSTS(9) is V_alpha_m in component m (millivolt).
C CONSTS(10) is V_beta_m in component m (millivolt).
C ALGBRC(1) is alpha_m in component m (per_millisecond).
C ALGBRC(7) is beta_m in component m (per_millisecond).
C CONSTS(11) is alpha_m_max in component m (per_millivolt_per_millisecond).
C CONSTS(12) is beta_m_max in component m (per_millisecond).
C CONSTS(13) is E_h in component h (millivolt).
C CONSTS(14) is V_alpha_h in component h (millivolt).
C CONSTS(15) is V_beta_h in component h (millivolt).
C ALGBRC(2) is alpha_h in component h (per_millisecond).
C ALGBRC(8) is beta_h in component h (per_millisecond).
C CONSTS(16) is alpha_h_max in component h (per_millisecond).
C CONSTS(17) is beta_h_max in component h (per_millisecond).
C CONSTS(18) is R_s in component I_T (per_nanosiemens).
C CONSTS(19) is C_t in component I_T (picofarad).
C STATES(4) is V_T in component V_T (millivolt).
C CONSTS(20) is g_KCa in component I_KCa (nanosiemens).
C CONSTS(21) is E_K in component I_K (millivolt).
C STATES(5) is o in component o (dimensionless).
C ALGBRC(20) is w in component w (dimensionless).
C STATES(6) is c in component calcium_handling (dimensionless).
C ALGBRC(16) is o_oinf in component o (dimensionless).
C ALGBRC(3) is alpha_Vm in component o (per_millisecond).
C ALGBRC(9) is beta_Vm in component o (per_millisecond).
C ALGBRC(13) is tau_Vm in component o (millisecond).
C CONSTS(22) is d_1 in component o (dimensionless).
C CONSTS(23) is d_2 in component o (dimensionless).
C CONSTS(24) is k_1 in component o (dimensionless).
C CONSTS(25) is k_2 in component o (dimensionless).
C CONSTS(26) is a_bar in component o (per_millisecond).
C CONSTS(27) is b_bar in component o (per_millisecond).
C CONSTS(28) is kd in component w (dimensionless).
C STATES(7) is cer in component calcium_handling (dimensionless).
C ALGBRC(28) is j_mem in component calcium_handling (picoampere).
C ALGBRC(22) is j_leak in component calcium_handling (picoampere).
C ALGBRC(23) is j_serca in component calcium_handling (picoampere).
C ALGBRC(24) is j_er in component calcium_handling (picoampere).
C CONSTS(29) is alpha in component calcium_handling (dimensionless).
C CONSTS(30) is k_pmca in component calcium_handling (dimensionless).
C CONSTS(31) is k_serca in component calcium_handling (picoampere).
C CONSTS(32) is p_leak in component calcium_handling (picoampere).
C CONSTS(33) is f_er in component calcium_handling (per_picoampere_per_millisecond).
C CONSTS(34) is f_cyt in component calcium_handling (per_picoampere_per_millisecond).
C CONSTS(35) is v_cytver in component calcium_handling (dimensionless).
C STATES(8) is d in component d (dimensionless).
C ALGBRC(25) is g_Ca in component I_Ca (nanosiemens).
C CONSTS(36) is g_Ca0 in component I_Ca (nanosiemens_per_millivolt).
C CONSTS(37) is E_Ca in component I_Ca (millivolt).
C ALGBRC(15) is alpha_d in component d (per_millisecond).
C ALGBRC(18) is beta_d in component d (per_millisecond).
C ALGBRC(11) is tau_d in component d (millisecond).
C ALGBRC(5) is d_infinity in component d (dimensionless).
C CONSTS(38) is E_L in component I_L (millivolt).
C CONSTS(39) is g_Lmax in component I_L (nanosiemens).
C STATES(9) is n in component n (dimensionless).
C CONSTS(40) is g_K in component I_K (nanosiemens).
C CONSTS(41) is E_n in component n (millivolt).
C CONSTS(42) is V_alpha_n in component n (millivolt).
C CONSTS(43) is V_beta_n in component n (millivolt).
C ALGBRC(6) is alpha_n in component n (per_millisecond).
C ALGBRC(12) is beta_n in component n (per_millisecond).
C CONSTS(44) is alpha_n_max in component n (per_millivolt_per_millisecond).
C CONSTS(45) is beta_n_max in component n (per_millisecond).
C RATES(1) is d/dt V_m in component membrane (millivolt).
C RATES(2) is d/dt m in component m (dimensionless).
C RATES(3) is d/dt h in component h (dimensionless).
C RATES(4) is d/dt V_T in component V_T (millivolt).
C RATES(5) is d/dt o in component o (dimensionless).
C RATES(6) is d/dt c in component calcium_handling (dimensionless).
C RATES(7) is d/dt cer in component calcium_handling (dimensionless).
C RATES(8) is d/dt d in component d (dimensionless).
C RATES(9) is d/dt n in component n (dimensionless).
C
SUBROUTINE initConsts(CONSTS, RATES, STATES)
REAL CONSTS(*), RATES(*), STATES(*)
CONSTS(1) = 2577
STATES(1) = -75
CONSTS(2) = 0.009
CONSTS(3) = 2
CONSTS(4) = 5
CONSTS(5) = 6
CONSTS(6) = 0.45
CONSTS(7) = 50
STATES(2) = 0
STATES(3) = 1
CONSTS(8) = -42
CONSTS(9) = 10
CONSTS(10) = 18
CONSTS(11) = 0.208
CONSTS(12) = 2.081
CONSTS(13) = -41
CONSTS(14) = 14.7
CONSTS(15) = 7.6
CONSTS(16) = 0.0156
CONSTS(17) = 3.382
CONSTS(18) = 15
CONSTS(19) = 0.04
STATES(4) = -70
CONSTS(20) = 0.5
CONSTS(21) = -70
STATES(5) = 0.15
STATES(6) = 0.15
CONSTS(22) = 0.84
CONSTS(23) = 1
CONSTS(24) = 0.18
CONSTS(25) = 0.011
CONSTS(26) = 0.48
CONSTS(27) = 0.28
CONSTS(28) = 0.18
STATES(7) = 200
CONSTS(29) = 4.5e-6
CONSTS(30) = 0.2
CONSTS(31) = 0.4
CONSTS(32) = 0.0005
CONSTS(33) = 0.01
CONSTS(34) = 0.01
CONSTS(35) = 5
STATES(8) = 0
CONSTS(36) = 0.05
CONSTS(37) = 50
CONSTS(38) = -75
CONSTS(39) = 0.0024
STATES(9) = 0
CONSTS(40) = 0.415
CONSTS(41) = -40
CONSTS(42) = 7
CONSTS(43) = 40
CONSTS(44) = 0.0229
CONSTS(45) = 0.09616
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
RATES(4) = (STATES(1) - STATES(4))/( CONSTS(18)*CONSTS(19))
ALGBRC(1) = ( CONSTS(11)*(STATES(1) - CONSTS(8)))/(1.00000 - EXP((CONSTS(8) - STATES(1))/CONSTS(9)))
ALGBRC(7) = CONSTS(12)*EXP((CONSTS(8) - STATES(1))/CONSTS(10))
RATES(2) = ALGBRC(1)*(1.00000 - STATES(2)) - ALGBRC(7)*STATES(2)
ALGBRC(2) = CONSTS(16)*EXP((STATES(1) - CONSTS(13))/CONSTS(14))
ALGBRC(8) = CONSTS(17)/(1.00000+EXP((CONSTS(13) - STATES(1))/CONSTS(15)))
RATES(3) = ALGBRC(2)*(1.00000 - STATES(3)) - ALGBRC(8)*STATES(3)
ALGBRC(6) = ( CONSTS(44)*(STATES(1) - CONSTS(41)))/(1.00000 - EXP((CONSTS(41) - STATES(1))/CONSTS(42)))
ALGBRC(12) = CONSTS(45)*EXP((CONSTS(41) - STATES(1))/CONSTS(43))
RATES(9) = ALGBRC(6)*(1.00000 - STATES(9)) - ALGBRC(12)*STATES(9)
ALGBRC(3) = CONSTS(26)/(1.00000+ CONSTS(24)*EXP(( - 2.00000*CONSTS(22)*96.4850*STATES(1))/( CONSTS(1)*STATES(6))))
ALGBRC(9) = CONSTS(27)/(1.00000+STATES(6)/( CONSTS(25)*EXP(( - 2.00000*CONSTS(23)*96.4850*STATES(1))/CONSTS(1))))
ALGBRC(13) = 1.00000/(ALGBRC(3)+ALGBRC(9))
ALGBRC(16) = ALGBRC(3)*ALGBRC(13)
RATES(5) = (ALGBRC(16) - STATES(5))/ALGBRC(13)
ALGBRC(11) = ( 80.0000*1.00000)/cosh( - 0.0310000*(STATES(1)+37.1000))
ALGBRC(5) = 1.00000/(1.00000+EXP((- 24.6000 - STATES(1))/11.3000))
ALGBRC(15) = ALGBRC(5)/ALGBRC(11)
ALGBRC(18) = (1.00000 - ALGBRC(5))/ALGBRC(11)
RATES(8) = ALGBRC(15)*(1.00000 - STATES(8)) - ALGBRC(18)*STATES(8)
ALGBRC(22) = CONSTS(32)*(STATES(7) - STATES(6))
ALGBRC(23) = CONSTS(31)*STATES(6)
ALGBRC(24) = ALGBRC(22) - ALGBRC(23)
RATES(7) = - CONSTS(33)*CONSTS(35)*ALGBRC(24)
ALGBRC(25) = ( - CONSTS(36)*STATES(1))/(EXP( 0.117000*STATES(1)) - 1.00000)
ALGBRC(26) = ALGBRC(25)*STATES(8) ** 2.00000*(STATES(1) - CONSTS(37))
ALGBRC(28) = - CONSTS(29)*ALGBRC(26)*CONSTS(30)*STATES(6)
RATES(6) = CONSTS(34)*(ALGBRC(28)+ALGBRC(24))
ALGBRC(17) = CONSTS(6)*STATES(2) ** 3.00000*STATES(3)*(STATES(1) - CONSTS(7))
ALGBRC(19) = (STATES(1) - STATES(4))/CONSTS(18)
ALGBRC(20) = STATES(6) ** 5.00000/(STATES(6) ** 5.00000+CONSTS(28) ** 5.00000)
ALGBRC(21) = CONSTS(20)*STATES(5)*ALGBRC(20)*(STATES(1) - CONSTS(21))
ALGBRC(27) = CONSTS(39)*(STATES(1) - CONSTS(38))
ALGBRC(29) = CONSTS(40)*STATES(9) ** 4.00000*(STATES(1) - CONSTS(21))
ALGBRC(4) = TERNRY(VOI.LT.CONSTS(4), 0.00000, 1.00000)
ALGBRC(10) = TERNRY(VOI.LT.CONSTS(5), 0.00000, 1.00000)
ALGBRC(14) = CONSTS(3)*(ALGBRC(4) - ALGBRC(10))
RATES(1) = (ALGBRC(14) - (ALGBRC(17)+ALGBRC(26)+ALGBRC(29)+ALGBRC(27)+ALGBRC(19)+ALGBRC(21)))/CONSTS(2)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = ( CONSTS(11)*(STATES(1) - CONSTS(8)))/(1.00000 - EXP((CONSTS(8) - STATES(1))/CONSTS(9)))
ALGBRC(7) = CONSTS(12)*EXP((CONSTS(8) - STATES(1))/CONSTS(10))
ALGBRC(2) = CONSTS(16)*EXP((STATES(1) - CONSTS(13))/CONSTS(14))
ALGBRC(8) = CONSTS(17)/(1.00000+EXP((CONSTS(13) - STATES(1))/CONSTS(15)))
ALGBRC(6) = ( CONSTS(44)*(STATES(1) - CONSTS(41)))/(1.00000 - EXP((CONSTS(41) - STATES(1))/CONSTS(42)))
ALGBRC(12) = CONSTS(45)*EXP((CONSTS(41) - STATES(1))/CONSTS(43))
ALGBRC(3) = CONSTS(26)/(1.00000+ CONSTS(24)*EXP(( - 2.00000*CONSTS(22)*96.4850*STATES(1))/( CONSTS(1)*STATES(6))))
ALGBRC(9) = CONSTS(27)/(1.00000+STATES(6)/( CONSTS(25)*EXP(( - 2.00000*CONSTS(23)*96.4850*STATES(1))/CONSTS(1))))
ALGBRC(13) = 1.00000/(ALGBRC(3)+ALGBRC(9))
ALGBRC(16) = ALGBRC(3)*ALGBRC(13)
ALGBRC(11) = ( 80.0000*1.00000)/cosh( - 0.0310000*(STATES(1)+37.1000))
ALGBRC(5) = 1.00000/(1.00000+EXP((- 24.6000 - STATES(1))/11.3000))
ALGBRC(15) = ALGBRC(5)/ALGBRC(11)
ALGBRC(18) = (1.00000 - ALGBRC(5))/ALGBRC(11)
ALGBRC(22) = CONSTS(32)*(STATES(7) - STATES(6))
ALGBRC(23) = CONSTS(31)*STATES(6)
ALGBRC(24) = ALGBRC(22) - ALGBRC(23)
ALGBRC(25) = ( - CONSTS(36)*STATES(1))/(EXP( 0.117000*STATES(1)) - 1.00000)
ALGBRC(26) = ALGBRC(25)*STATES(8) ** 2.00000*(STATES(1) - CONSTS(37))
ALGBRC(28) = - CONSTS(29)*ALGBRC(26)*CONSTS(30)*STATES(6)
ALGBRC(17) = CONSTS(6)*STATES(2) ** 3.00000*STATES(3)*(STATES(1) - CONSTS(7))
ALGBRC(19) = (STATES(1) - STATES(4))/CONSTS(18)
ALGBRC(20) = STATES(6) ** 5.00000/(STATES(6) ** 5.00000+CONSTS(28) ** 5.00000)
ALGBRC(21) = CONSTS(20)*STATES(5)*ALGBRC(20)*(STATES(1) - CONSTS(21))
ALGBRC(27) = CONSTS(39)*(STATES(1) - CONSTS(38))
ALGBRC(29) = CONSTS(40)*STATES(9) ** 4.00000*(STATES(1) - CONSTS(21))
ALGBRC(4) = TERNRY(VOI.LT.CONSTS(4), 0.00000, 1.00000)
ALGBRC(10) = TERNRY(VOI.LT.CONSTS(5), 0.00000, 1.00000)
ALGBRC(14) = CONSTS(3)*(ALGBRC(4) - ALGBRC(10))
RETURN
END
REAL FUNCTION TERNRY(TEST, VALA, VALB)
LOGICAL TEST
REAL VALA, VALB
IF (TEST) THEN
TERNRY = VALA
ELSE
TERNRY = VALB
ENDIF
RETURN
END
