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 16 entries in the algebraic variable array. C There are a total of 5 entries in each of the rate and state variable arrays. C There are a total of 16 entries in the constant variable array. C C C CONSTS(1) is T in component parameters (kelvin). C CONSTS(2) is K in component parameters_propagation (per_ms). C CONSTS(3) is V_initial in component initial_conditions (mV). C VOI is time in component time (ms). C ALGBRC(7) is INa in component INa (uA_per_cmsq). C ALGBRC(12) is IK in component IK (uA_per_cmsq). C ALGBRC(14) is Ileak in component Ileak (uA_per_cmsq). C ALGBRC(15) is Ii in component propagated_AP (uA_per_cmsq). C ALGBRC(1) is Im in component propagated_AP (uA_per_cmsq). C ALGBRC(16) is I in component propagated_AP (uA_per_cmsq). C ALGBRC(13) is g in component propagated_AP (mS_per_cmsq). C ALGBRC(11) is gK in component IK (mS_per_cmsq). C ALGBRC(2) is gNa in component INa (mS_per_cmsq). C STATES(1) is V in component propagated_AP (mV). C ALGBRC(3) is minus_V in component propagated_AP (mV). C STATES(3) is X in component hh_gating_variable (dimensionless). C STATES(4) is X in component hh_gating_variable (dimensionless). C STATES(5) is X in component hh_gating_variable (dimensionless). C CONSTS(4) is n_initial in component initial_conditions (dimensionless). C CONSTS(5) is m_initial in component initial_conditions (dimensionless). C CONSTS(6) is h_initial in component initial_conditions (dimensionless). C CONSTS(7) is VNa in component parameters (mV). C CONSTS(8) is VK in component parameters (mV). C CONSTS(9) is Vleak in component parameters (mV). C CONSTS(10) is gNa_max in component parameters (mS_per_cmsq). C CONSTS(11) is gK_max in component parameters (mS_per_cmsq). C CONSTS(12) is gleak_max in component parameters (mS_per_cmsq). C CONSTS(13) is Cm in component parameters (uF_per_cmsq). C CONSTS(14) is V_initial in component initial_conditions (mV). C ALGBRC(4) is alpha in component alpha_m (per_ms). C CONSTS(15) is phi in component temperature_factor (dimensionless). C ALGBRC(8) is beta in component beta_m (per_ms). C ALGBRC(5) is alpha in component alpha_h (per_ms). C ALGBRC(9) is beta in component beta_h (per_ms). C ALGBRC(6) is alpha in component alpha_n (per_ms). C CONSTS(16) is phi in component temperature_factor (dimensionless). C ALGBRC(10) is beta in component beta_n (per_ms). C STATES(2) is d/dt V in component propagated_AP (mV). C RATES(2) is d^2/dtV in component propagated_AP (mV). C RATES(4) is d/dt X in component hh_gating_variable (dimensionless). C RATES(3) is d/dt X in component hh_gating_variable (dimensionless). C RATES(5) is d/dt X in component hh_gating_variable (dimensionless). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 18.5 CONSTS(2) = 10.47 CONSTS(3) = 0 STATES(2) = 0.0 CONSTS(4) = 0.315 CONSTS(5) = 0.042 CONSTS(6) = 0.608 CONSTS(7) = -115.0 CONSTS(8) = 12.0 CONSTS(9) = -10.613 CONSTS(10) = 120.0 CONSTS(11) = 36.0 CONSTS(12) = 0.3 CONSTS(13) = 1.0 CONSTS(14) = 0.0 CONSTS(15) = 3.00000 ** (CONSTS(1) - 6.30000)/10.0000 CONSTS(16) = 3.00000 ** (CONSTS(1) - 6.30000)/10.0000 STATES(1) = CONSTS(3) STATES(3) = CONSTS(6) STATES(4) = CONSTS(5) STATES(5) = CONSTS(4) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(4) = (( 0.100000*(STATES(1)+25.0000))/(EXP((STATES(1)+25.0000)/10.0000) - 1.00000))*CONSTS(15) ALGBRC(8) = 4.00000*EXP(STATES(1)/18.0000)*CONSTS(15) RATES(4) = ALGBRC(4)*(1.00000 - STATES(4)) - ALGBRC(8)*STATES(4) ALGBRC(5) = 0.0700000*EXP(STATES(1)/20.0000)*CONSTS(15) ALGBRC(9) = (1.00000/(EXP((STATES(1)+30.0000)/10.0000)+1.00000))*CONSTS(15) RATES(3) = ALGBRC(5)*(1.00000 - STATES(3)) - ALGBRC(9)*STATES(3) ALGBRC(6) = (( 0.0100000*(STATES(1)+10.0000))/(EXP((STATES(1)+10.0000)/10.0000) - 1.00000))*CONSTS(16) ALGBRC(10) = 0.125000*EXP(STATES(1)/80.0000)*CONSTS(16) RATES(5) = ALGBRC(6)*(1.00000 - STATES(5)) - ALGBRC(10)*STATES(5) ALGBRC(2) = CONSTS(10)*STATES(4) ** 3.00000*STATES(3) ALGBRC(7) = ALGBRC(2)*(STATES(1) - CONSTS(7)) ALGBRC(11) = CONSTS(11)*STATES(5) ** 4.00000 ALGBRC(12) = ALGBRC(11)*(STATES(1) - CONSTS(8)) ALGBRC(14) = CONSTS(12)*(STATES(1) - CONSTS(9)) ALGBRC(15) = ALGBRC(7)+ALGBRC(12)+ALGBRC(14) RATES(2) = CONSTS(2)*(STATES(2)+ (1.00000/CONSTS(13))*ALGBRC(15)) RATES(1) = STATES(2) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(4) = (( 0.100000*(STATES(1)+25.0000))/(EXP((STATES(1)+25.0000)/10.0000) - 1.00000))*CONSTS(15) ALGBRC(8) = 4.00000*EXP(STATES(1)/18.0000)*CONSTS(15) ALGBRC(5) = 0.0700000*EXP(STATES(1)/20.0000)*CONSTS(15) ALGBRC(9) = (1.00000/(EXP((STATES(1)+30.0000)/10.0000)+1.00000))*CONSTS(15) ALGBRC(6) = (( 0.0100000*(STATES(1)+10.0000))/(EXP((STATES(1)+10.0000)/10.0000) - 1.00000))*CONSTS(16) ALGBRC(10) = 0.125000*EXP(STATES(1)/80.0000)*CONSTS(16) ALGBRC(2) = CONSTS(10)*STATES(4) ** 3.00000*STATES(3) ALGBRC(7) = ALGBRC(2)*(STATES(1) - CONSTS(7)) ALGBRC(11) = CONSTS(11)*STATES(5) ** 4.00000 ALGBRC(12) = ALGBRC(11)*(STATES(1) - CONSTS(8)) ALGBRC(14) = CONSTS(12)*(STATES(1) - CONSTS(9)) ALGBRC(15) = ALGBRC(7)+ALGBRC(12)+ALGBRC(14) ALGBRC(1) = - CONSTS(13)*STATES(2) ALGBRC(3) = - STATES(1) ALGBRC(13) = ALGBRC(11)+ALGBRC(2)+CONSTS(12) ALGBRC(16) = (CONSTS(13)/CONSTS(2))*RATES(2) RETURN END