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 18 entries in the algebraic variable array. C There are a total of 8 entries in each of the rate and state variable arrays. C There are a total of 10 entries in the constant variable array. C C C VOI is time in component environment (ms). C STATES(1) is V in component membrane (mV). C CONSTS(1) is C in component membrane (uF_per_mm2). C ALGBRC(1) is i_Na in component sodium_current (uA_per_mm2). C ALGBRC(15) is i_s in component slow_inward_current (uA_per_mm2). C ALGBRC(16) is i_x1 in component time_dependent_outward_current (uA_per_mm2). C ALGBRC(17) is i_K1 in component time_independent_outward_current (uA_per_mm2). C ALGBRC(18) is Istim in component stimulus_protocol (uA_per_mm2). C CONSTS(2) is g_Na in component sodium_current (mS_per_mm2). C CONSTS(3) is E_Na in component sodium_current (mV). C CONSTS(4) is g_Nac in component sodium_current (mS_per_mm2). C STATES(2) is m in component sodium_current_m_gate (dimensionless). C STATES(3) is h in component sodium_current_h_gate (dimensionless). C STATES(4) is j in component sodium_current_j_gate (dimensionless). C ALGBRC(2) is alpha_m in component sodium_current_m_gate (per_ms). C ALGBRC(9) is beta_m in component sodium_current_m_gate (per_ms). C ALGBRC(3) is alpha_h in component sodium_current_h_gate (per_ms). C ALGBRC(10) is beta_h in component sodium_current_h_gate (per_ms). C ALGBRC(4) is alpha_j in component sodium_current_j_gate (per_ms). C ALGBRC(11) is beta_j in component sodium_current_j_gate (per_ms). C CONSTS(5) is g_s in component slow_inward_current (mS_per_mm2). C ALGBRC(8) is E_s in component slow_inward_current (mV). C STATES(5) is Cai in component slow_inward_current (concentration_units). C STATES(6) is d in component slow_inward_current_d_gate (dimensionless). C STATES(7) is f in component slow_inward_current_f_gate (dimensionless). C ALGBRC(5) is alpha_d in component slow_inward_current_d_gate (per_ms). C ALGBRC(12) is beta_d in component slow_inward_current_d_gate (per_ms). C ALGBRC(6) is alpha_f in component slow_inward_current_f_gate (per_ms). C ALGBRC(13) is beta_f in component slow_inward_current_f_gate (per_ms). C STATES(8) is x1 in component time_dependent_outward_current_x1_gate (dimensionless). C ALGBRC(7) is alpha_x1 in component time_dependent_outward_current_x1_gate (per_ms). C ALGBRC(14) is beta_x1 in component time_dependent_outward_current_x1_gate (per_ms). C CONSTS(6) is IstimStart in component stimulus_protocol (ms). C CONSTS(7) is IstimEnd in component stimulus_protocol (ms). C CONSTS(8) is IstimAmplitude in component stimulus_protocol (uA_per_mm2). C CONSTS(9) is IstimPeriod in component stimulus_protocol (ms). C CONSTS(10) is IstimPulseDuration in component stimulus_protocol (ms). C RATES(1) is d/dt V in component membrane (mV). C RATES(2) is d/dt m in component sodium_current_m_gate (dimensionless). C RATES(3) is d/dt h in component sodium_current_h_gate (dimensionless). C RATES(4) is d/dt j in component sodium_current_j_gate (dimensionless). C RATES(5) is d/dt Cai in component slow_inward_current (concentration_units). C RATES(6) is d/dt d in component slow_inward_current_d_gate (dimensionless). C RATES(7) is d/dt f in component slow_inward_current_f_gate (dimensionless). C RATES(8) is d/dt x1 in component time_dependent_outward_current_x1_gate (dimensionless). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = -84.624 CONSTS(1) = 0.01 CONSTS(2) = 4e-2 CONSTS(3) = 50 CONSTS(4) = 3e-5 STATES(2) = 0.011 STATES(3) = 0.988 STATES(4) = 0.975 CONSTS(5) = 9e-4 STATES(5) = 1e-4 STATES(6) = 0.003 STATES(7) = 0.994 STATES(8) = 0.0001 CONSTS(6) = 10 CONSTS(7) = 50000 CONSTS(8) = 0.5 CONSTS(9) = 1000 CONSTS(10) = 1 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(2) = ( - 1.00000*(STATES(1)+47.0000))/(EXP( - 0.100000*(STATES(1)+47.0000)) - 1.00000) ALGBRC(9) = 40.0000*EXP( - 0.0560000*(STATES(1)+72.0000)) RATES(2) = ALGBRC(2)*(1.00000 - STATES(2)) - ALGBRC(9)*STATES(2) ALGBRC(3) = 0.126000*EXP( - 0.250000*(STATES(1)+77.0000)) ALGBRC(10) = 1.70000/(EXP( - 0.0820000*(STATES(1)+22.5000))+1.00000) RATES(3) = ALGBRC(3)*(1.00000 - STATES(3)) - ALGBRC(10)*STATES(3) ALGBRC(4) = ( 0.0550000*EXP( - 0.250000*(STATES(1)+78.0000)))/(EXP( - 0.200000*(STATES(1)+78.0000))+1.00000) ALGBRC(11) = 0.300000/(EXP( - 0.100000*(STATES(1)+32.0000))+1.00000) RATES(4) = ALGBRC(4)*(1.00000 - STATES(4)) - ALGBRC(11)*STATES(4) ALGBRC(5) = ( 0.0950000*EXP(- (STATES(1) - 5.00000)/100.000))/(1.00000+EXP(- (STATES(1) - 5.00000)/13.8900)) ALGBRC(12) = ( 0.0700000*EXP(- (STATES(1)+44.0000)/59.0000))/(1.00000+EXP((STATES(1)+44.0000)/20.0000)) RATES(6) = ALGBRC(5)*(1.00000 - STATES(6)) - ALGBRC(12)*STATES(6) ALGBRC(6) = ( 0.0120000*EXP(- (STATES(1)+28.0000)/125.000))/(1.00000+EXP((STATES(1)+28.0000)/6.67000)) ALGBRC(13) = ( 0.00650000*EXP(- (STATES(1)+30.0000)/50.0000))/(1.00000+EXP(- (STATES(1)+30.0000)/5.00000)) RATES(7) = ALGBRC(6)*(1.00000 - STATES(7)) - ALGBRC(13)*STATES(7) ALGBRC(7) = ( 0.000500000*EXP((STATES(1)+50.0000)/12.1000))/(1.00000+EXP((STATES(1)+50.0000)/17.5000)) ALGBRC(14) = ( 0.00130000*EXP(- (STATES(1)+20.0000)/16.6700))/(1.00000+EXP(- (STATES(1)+20.0000)/25.0000)) RATES(8) = ALGBRC(7)*(1.00000 - STATES(8)) - ALGBRC(14)*STATES(8) ALGBRC(8) = - 82.3000 - 13.0287*log( STATES(5)*0.00100000) ALGBRC(15) = CONSTS(5)*STATES(6)*STATES(7)*(STATES(1) - ALGBRC(8)) RATES(5) = ( - 0.0100000*ALGBRC(15))/1.00000+ 0.0700000*(0.000100000 - STATES(5)) ALGBRC(1) = ( CONSTS(2)*STATES(2) ** 3.00000*STATES(3)*STATES(4)+CONSTS(4))*(STATES(1) - CONSTS(3)) ALGBRC(16) = ( STATES(8)*0.00800000*(EXP( 0.0400000*(STATES(1)+77.0000)) - 1.00000))/EXP( 0.0400000*(STATES(1)+35.0000)) ALGBRC(17) = 0.00350000*(( 4.00000*(EXP( 0.0400000*(STATES(1)+85.0000)) - 1.00000))/(EXP( 0.0800000*(STATES(1)+53.0000))+EXP( 0.0400000*(STATES(1)+53.0000)))+( 0.200000*(STATES(1)+23.0000))/(1.00000 - EXP( - 0.0400000*(STATES(1)+23.0000)))) ALGBRC(18) = TERNRY(VOI.GE.CONSTS(6).AND.VOI.LE.CONSTS(7).AND.(VOI - CONSTS(6)) - INT((VOI - CONSTS(6))/CONSTS(9))*CONSTS(9).LE.CONSTS(10), CONSTS(8), 0.00000) RATES(1) = (ALGBRC(18) - (ALGBRC(1)+ALGBRC(15)+ALGBRC(16)+ALGBRC(17)))/CONSTS(1) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(2) = ( - 1.00000*(STATES(1)+47.0000))/(EXP( - 0.100000*(STATES(1)+47.0000)) - 1.00000) ALGBRC(9) = 40.0000*EXP( - 0.0560000*(STATES(1)+72.0000)) ALGBRC(3) = 0.126000*EXP( - 0.250000*(STATES(1)+77.0000)) ALGBRC(10) = 1.70000/(EXP( - 0.0820000*(STATES(1)+22.5000))+1.00000) ALGBRC(4) = ( 0.0550000*EXP( - 0.250000*(STATES(1)+78.0000)))/(EXP( - 0.200000*(STATES(1)+78.0000))+1.00000) ALGBRC(11) = 0.300000/(EXP( - 0.100000*(STATES(1)+32.0000))+1.00000) ALGBRC(5) = ( 0.0950000*EXP(- (STATES(1) - 5.00000)/100.000))/(1.00000+EXP(- (STATES(1) - 5.00000)/13.8900)) ALGBRC(12) = ( 0.0700000*EXP(- (STATES(1)+44.0000)/59.0000))/(1.00000+EXP((STATES(1)+44.0000)/20.0000)) ALGBRC(6) = ( 0.0120000*EXP(- (STATES(1)+28.0000)/125.000))/(1.00000+EXP((STATES(1)+28.0000)/6.67000)) ALGBRC(13) = ( 0.00650000*EXP(- (STATES(1)+30.0000)/50.0000))/(1.00000+EXP(- (STATES(1)+30.0000)/5.00000)) ALGBRC(7) = ( 0.000500000*EXP((STATES(1)+50.0000)/12.1000))/(1.00000+EXP((STATES(1)+50.0000)/17.5000)) ALGBRC(14) = ( 0.00130000*EXP(- (STATES(1)+20.0000)/16.6700))/(1.00000+EXP(- (STATES(1)+20.0000)/25.0000)) ALGBRC(8) = - 82.3000 - 13.0287*log( STATES(5)*0.00100000) ALGBRC(15) = CONSTS(5)*STATES(6)*STATES(7)*(STATES(1) - ALGBRC(8)) ALGBRC(1) = ( CONSTS(2)*STATES(2) ** 3.00000*STATES(3)*STATES(4)+CONSTS(4))*(STATES(1) - CONSTS(3)) ALGBRC(16) = ( STATES(8)*0.00800000*(EXP( 0.0400000*(STATES(1)+77.0000)) - 1.00000))/EXP( 0.0400000*(STATES(1)+35.0000)) ALGBRC(17) = 0.00350000*(( 4.00000*(EXP( 0.0400000*(STATES(1)+85.0000)) - 1.00000))/(EXP( 0.0800000*(STATES(1)+53.0000))+EXP( 0.0400000*(STATES(1)+53.0000)))+( 0.200000*(STATES(1)+23.0000))/(1.00000 - EXP( - 0.0400000*(STATES(1)+23.0000)))) ALGBRC(18) = TERNRY(VOI.GE.CONSTS(6).AND.VOI.LE.CONSTS(7).AND.(VOI - CONSTS(6)) - INT((VOI - CONSTS(6))/CONSTS(9))*CONSTS(9).LE.CONSTS(10), CONSTS(8), 0.00000) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END