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 6 entries in each of the rate and state variable arrays.
C There are a total of 11 entries in the constant variable array.
C
C
C VOI is t in component environment (ms).
C STATES(1) is V_m in component membrane (mV).
C ALGBRC(1) is i_Stim in component membrane (mA_per_cm2).
C CONSTS(1) is stim_amplitude in component membrane (mA_per_cm2).
C CONSTS(2) is stim_duration in component membrane (ms).
C ALGBRC(7) is i_Naf in component fast_sodium_channel (mA_per_cm2).
C ALGBRC(13) is i_Nap in component persistent_sodium_channel (mA_per_cm2).
C ALGBRC(14) is i_Ks in component slow_potassium_channel (mA_per_cm2).
C ALGBRC(15) is i_Kf in component juxtaparanodal_fast_potassium_channel (mA_per_cm2).
C ALGBRC(16) is i_Lk in component leakage_channel (mA_per_cm2).
C CONSTS(3) is C_n in component membrane (mF_per_cm2).
C CONSTS(4) is E_Na in component membrane (mV).
C CONSTS(5) is E_K in component membrane (mV).
C CONSTS(6) is E_Lk in component membrane (mV).
C CONSTS(7) is g_Naf in component fast_sodium_channel (S_per_cm2).
C STATES(2) is m in component fast_sodium_channel_m_gate (dimensionless).
C STATES(3) is h in component fast_sodium_channel_h_gate (dimensionless).
C ALGBRC(2) is alpha_m in component fast_sodium_channel_m_gate (per_ms).
C ALGBRC(8) is beta_m in component fast_sodium_channel_m_gate (per_ms).
C ALGBRC(3) is alpha_h in component fast_sodium_channel_h_gate (per_ms).
C ALGBRC(9) is beta_h in component fast_sodium_channel_h_gate (per_ms).
C CONSTS(8) is g_Nap in component persistent_sodium_channel (S_per_cm2).
C STATES(4) is p in component persistent_sodium_channel_p_gate (dimensionless).
C ALGBRC(4) is alpha_p in component persistent_sodium_channel_p_gate (per_ms).
C ALGBRC(10) is beta_p in component persistent_sodium_channel_p_gate (per_ms).
C CONSTS(9) is g_Ks in component slow_potassium_channel (S_per_cm2).
C STATES(5) is s in component slow_potassium_channel_s_gate (dimensionless).
C ALGBRC(5) is alpha_s in component slow_potassium_channel_s_gate (per_ms).
C ALGBRC(11) is beta_s in component slow_potassium_channel_s_gate (per_ms).
C CONSTS(10) is g_Kf in component juxtaparanodal_fast_potassium_channel (S_per_cm2).
C STATES(6) is n in component juxtaparanodal_fast_potassium_channel_n_gate (dimensionless).
C ALGBRC(6) is alpha_n in component juxtaparanodal_fast_potassium_channel_n_gate (per_ms).
C ALGBRC(12) is beta_n in component juxtaparanodal_fast_potassium_channel_n_gate (per_ms).
C CONSTS(11) is g_Lk in component leakage_channel (S_per_cm2).
C RATES(1) is d/dt V_m in component membrane (mV).
C RATES(2) is d/dt m in component fast_sodium_channel_m_gate (dimensionless).
C RATES(3) is d/dt h in component fast_sodium_channel_h_gate (dimensionless).
C RATES(4) is d/dt p in component persistent_sodium_channel_p_gate (dimensionless).
C RATES(5) is d/dt s in component slow_potassium_channel_s_gate (dimensionless).
C RATES(6) is d/dt n in component juxtaparanodal_fast_potassium_channel_n_gate (dimensionless).
C
SUBROUTINE initConsts(CONSTS, RATES, STATES)
REAL CONSTS(*), RATES(*), STATES(*)
STATES(1) = -88.5901439103062
CONSTS(1) = 0.05
CONSTS(2) = 0.5
CONSTS(3) = 0.002
CONSTS(4) = 50
CONSTS(5) = -90
CONSTS(6) = -90
CONSTS(7) = 3
STATES(2) = 0.0302964457761589
STATES(3) = 0.841520865130776
CONSTS(8) = 0.01
STATES(4) = 0.0969864645712442
CONSTS(9) = 0.08
STATES(5) = 0.00997371545602793
CONSTS(10) = 0
STATES(6) = 0.000886041197111556
CONSTS(11) = 0.007
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(2) = ( 6.57000*(STATES(1)+20.4000))/(1.00000 - EXP(- (STATES(1)+20.4000)/10.3000))
ALGBRC(8) = ( - 0.304000*(STATES(1)+25.7000))/(1.00000 - EXP((STATES(1)+25.7000)/9.16000))
RATES(2) = ALGBRC(2)*(1.00000 - STATES(2)) - ALGBRC(8)*STATES(2)
ALGBRC(3) = ( - 0.340000*(STATES(1)+114.000))/(1.00000 - EXP((STATES(1)+114.000)/11.0000))
ALGBRC(9) = 12.6000/(1.00000+EXP(- (STATES(1)+31.8000)/13.4000))
RATES(3) = ALGBRC(3)*(1.00000 - STATES(3)) - ALGBRC(9)*STATES(3)
ALGBRC(4) = ( 0.0353000*(STATES(1)+27.0000))/(1.00000 - EXP(- (STATES(1)+27.0000)/10.2000))
ALGBRC(10) = ( - 0.000883000*(STATES(1)+34.0000))/(1.00000 - EXP((STATES(1)+34.0000)/10.0000))
RATES(4) = ALGBRC(4)*(1.00000 - STATES(4)) - ALGBRC(10)*STATES(4)
ALGBRC(5) = 0.300000/(1.00000+EXP(- (STATES(1)+53.0000)/5.00000))
ALGBRC(11) = 0.0300000/(1.00000+EXP(- (STATES(1)+90.0000)/1.00000))
RATES(5) = ALGBRC(5)*(1.00000 - STATES(5)) - ALGBRC(11)*STATES(5)
ALGBRC(6) = ( 0.0462000*(STATES(1)+83.2000))/(1.00000 - EXP(- (STATES(1)+83.2000)/1.10000))
ALGBRC(12) = ( - 0.0824000*(STATES(1)+66.0000))/(1.00000 - EXP((STATES(1)+66.0000)/10.5000))
RATES(6) = ALGBRC(6)*(1.00000 - STATES(6)) - ALGBRC(12)*STATES(6)
ALGBRC(1) = TERNRY(VOI.GE.10.0000.AND.VOI.LE.10.0000+CONSTS(2), CONSTS(1), 0.00000)
ALGBRC(7) = CONSTS(7)*STATES(2) ** 3.00000*STATES(3)*(STATES(1) - CONSTS(4))
ALGBRC(13) = CONSTS(8)*STATES(4) ** 3.00000*(STATES(1) - CONSTS(4))
ALGBRC(14) = CONSTS(9)*STATES(5)*(STATES(1) - CONSTS(5))
ALGBRC(15) = CONSTS(10)*STATES(6) ** 4.00000*(STATES(1) - CONSTS(5))
ALGBRC(16) = CONSTS(11)*(STATES(1) - CONSTS(6))
RATES(1) = - (- ALGBRC(1)+ALGBRC(7)+ALGBRC(13)+ALGBRC(14)+ALGBRC(15)+ALGBRC(16))/CONSTS(3)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(2) = ( 6.57000*(STATES(1)+20.4000))/(1.00000 - EXP(- (STATES(1)+20.4000)/10.3000))
ALGBRC(8) = ( - 0.304000*(STATES(1)+25.7000))/(1.00000 - EXP((STATES(1)+25.7000)/9.16000))
ALGBRC(3) = ( - 0.340000*(STATES(1)+114.000))/(1.00000 - EXP((STATES(1)+114.000)/11.0000))
ALGBRC(9) = 12.6000/(1.00000+EXP(- (STATES(1)+31.8000)/13.4000))
ALGBRC(4) = ( 0.0353000*(STATES(1)+27.0000))/(1.00000 - EXP(- (STATES(1)+27.0000)/10.2000))
ALGBRC(10) = ( - 0.000883000*(STATES(1)+34.0000))/(1.00000 - EXP((STATES(1)+34.0000)/10.0000))
ALGBRC(5) = 0.300000/(1.00000+EXP(- (STATES(1)+53.0000)/5.00000))
ALGBRC(11) = 0.0300000/(1.00000+EXP(- (STATES(1)+90.0000)/1.00000))
ALGBRC(6) = ( 0.0462000*(STATES(1)+83.2000))/(1.00000 - EXP(- (STATES(1)+83.2000)/1.10000))
ALGBRC(12) = ( - 0.0824000*(STATES(1)+66.0000))/(1.00000 - EXP((STATES(1)+66.0000)/10.5000))
ALGBRC(1) = TERNRY(VOI.GE.10.0000.AND.VOI.LE.10.0000+CONSTS(2), CONSTS(1), 0.00000)
ALGBRC(7) = CONSTS(7)*STATES(2) ** 3.00000*STATES(3)*(STATES(1) - CONSTS(4))
ALGBRC(13) = CONSTS(8)*STATES(4) ** 3.00000*(STATES(1) - CONSTS(4))
ALGBRC(14) = CONSTS(9)*STATES(5)*(STATES(1) - CONSTS(5))
ALGBRC(15) = CONSTS(10)*STATES(6) ** 4.00000*(STATES(1) - CONSTS(5))
ALGBRC(16) = CONSTS(11)*(STATES(1) - CONSTS(6))
RETURN
END
REAL FUNCTION TERNRY(TEST, VALA, VALB)
LOGICAL TEST
REAL VALA, VALB
IF (TEST) THEN
TERNRY = VALA
ELSE
TERNRY = VALB
ENDIF
RETURN
END
