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 17 entries in the algebraic variable array.
C There are a total of 7 entries in each of the rate and state variable arrays.
C There are a total of 1 entries in the constant variable array.
C
C
C VOI is time in component environment (millisecond).
C STATES(1) is V in component membrane (millivolt).
C CONSTS(1) is Cm in component membrane (microF_per_cm2).
C ALGBRC(1) is i_Na in component sodium_channel (microA_per_cm2).
C ALGBRC(8) is i_K in component potassium_channel (microA_per_cm2).
C ALGBRC(15) is i_Leak in component leakage_current (microA_per_cm2).
C ALGBRC(16) is i_s in component calcium_channel (microA_per_cm2).
C ALGBRC(17) is i_h in component hyperpolarization_activated_channel (microA_per_cm2).
C STATES(2) is m in component sodium_channel_m_gate (dimensionless).
C STATES(3) is h in component sodium_channel_h_gate (dimensionless).
C ALGBRC(2) is alpha_m in component sodium_channel_m_gate (per_millisecond).
C ALGBRC(9) is beta_m in component sodium_channel_m_gate (per_millisecond).
C ALGBRC(3) is alpha_h in component sodium_channel_h_gate (per_millisecond).
C ALGBRC(10) is beta_h in component sodium_channel_h_gate (per_millisecond).
C STATES(4) is n in component potassium_channel_n_gate (dimensionless).
C ALGBRC(4) is alpha_n in component potassium_channel_n_gate (per_millisecond).
C ALGBRC(11) is beta_n in component potassium_channel_n_gate (per_millisecond).
C STATES(5) is d in component calcium_channel_d_gate (dimensionless).
C STATES(6) is f in component calcium_channel_f_gate (dimensionless).
C ALGBRC(5) is alpha_d in component calcium_channel_d_gate (per_millisecond).
C ALGBRC(12) is beta_d in component calcium_channel_d_gate (per_millisecond).
C ALGBRC(6) is alpha_f in component calcium_channel_f_gate (per_millisecond).
C ALGBRC(13) is beta_f in component calcium_channel_f_gate (per_millisecond).
C STATES(7) is q in component hyperpolarization_activated_channel_q_gate (dimensionless).
C ALGBRC(7) is alpha_q in component hyperpolarization_activated_channel_q_gate (per_millisecond).
C ALGBRC(14) is beta_q in component hyperpolarization_activated_channel_q_gate (per_millisecond).
C RATES(1) is d/dt V in component membrane (millivolt).
C RATES(2) is d/dt m in component sodium_channel_m_gate (dimensionless).
C RATES(3) is d/dt h in component sodium_channel_h_gate (dimensionless).
C RATES(4) is d/dt n in component potassium_channel_n_gate (dimensionless).
C RATES(5) is d/dt d in component calcium_channel_d_gate (dimensionless).
C RATES(6) is d/dt f in component calcium_channel_f_gate (dimensionless).
C RATES(7) is d/dt q in component hyperpolarization_activated_channel_q_gate (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -62.83
      CONSTS(1) = 1
      STATES(2) = 0.047938
      STATES(3) = 0.95994
      STATES(4) = 0.509494
      STATES(5) = 0.000032
      STATES(6) = 1
      STATES(7) = 0.010759
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) = ( 1.00000*(STATES(1)+37.0000))/(- EXP((STATES(1)+37.0000)/- 10.0000)+1.00000)
      ALGBRC(9) =  40.0000*EXP((STATES(1)+62.0000)/- 17.8000)
      RATES(2) =  ALGBRC(2)*(1.00000 - STATES(2)) -  ALGBRC(9)*STATES(2)
      ALGBRC(3) =  0.00120900*EXP((STATES(1)+20.0000)/- 6.53400)
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1)+30.0000)/- 10.0000))
      RATES(3) =  ALGBRC(3)*(1.00000 - STATES(3)) -  ALGBRC(10)*STATES(3)
      ALGBRC(4) = ( 0.00900000*1.00000)/(1.00000+EXP(- (STATES(1)+3.80000)/9.71000))+0.000600000
      ALGBRC(11) = ( - 0.000225000*(STATES(1)+40.0000))/(1.00000 - EXP((STATES(1)+40.0000)/13.3000))
      RATES(4) =  ALGBRC(4)*(1.00000 - STATES(4)) -  ALGBRC(11)*STATES(4)
      ALGBRC(5) = ( 0.0145000*(STATES(1)+35.0000))/(1.00000 - EXP(- (STATES(1)+35.0000)/2.50000))+( 0.0312500*STATES(1))/(1.00000 - EXP(- STATES(1)/4.80000))
      ALGBRC(12) = ( - 0.00421000*(STATES(1) - 5.00000))/(- EXP((STATES(1) - 5.00000)/2.50000)+1.00000)
      RATES(5) =  ALGBRC(5)*(1.00000 - STATES(5)) -  ALGBRC(12)*STATES(5)
      ALGBRC(6) = ( - 0.000355000*(STATES(1)+20.0000))/(- EXP((STATES(1)+20.0000)/5.63300)+1.00000)
      ALGBRC(13) = ( 0.000944000*(STATES(1)+60.0000))/(1.00000+EXP(- (STATES(1)+29.5000)/4.16000))
      RATES(6) =  ALGBRC(6)*(1.00000 - STATES(6)) -  ALGBRC(13)*STATES(6)
      ALGBRC(7) = ( 0.000340000*(STATES(1)+100.000))/(EXP((STATES(1)+100.000)/4.40000) - 1.00000)+4.95000e-05
      ALGBRC(14) = ( 0.000500000*(STATES(1)+40.0000))/(1.00000 - EXP(- (STATES(1)+40.0000)/6.00000))+8.45000e-05
      RATES(7) =  ALGBRC(7)*(1.00000 - STATES(7)) -  ALGBRC(14)*STATES(7)
      ALGBRC(1) =  0.500000*STATES(2) ** 3.00000*STATES(3)*(STATES(1) - 30.0000)
      ALGBRC(8) = ( 0.700000*STATES(4)*(EXP( 0.0277000*(STATES(1)+90.0000)) - 1.00000))/EXP( 0.0277000*(STATES(1)+40.0000))
      ALGBRC(15) =  0.800000*(1.00000 - EXP(- (STATES(1)+60.0000)/20.0000))
      ALGBRC(16) =  12.5000*( 0.950000*STATES(5)+0.0500000)*( 0.950000*STATES(6)+0.0500000)*(EXP((STATES(1) - 10.0000)/15.0000) - 1.00000)
      ALGBRC(17) =  0.400000*STATES(7)*(STATES(1)+45.0000)
      RATES(1) = - (ALGBRC(1)+ALGBRC(8)+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)+37.0000))/(- EXP((STATES(1)+37.0000)/- 10.0000)+1.00000)
      ALGBRC(9) =  40.0000*EXP((STATES(1)+62.0000)/- 17.8000)
      ALGBRC(3) =  0.00120900*EXP((STATES(1)+20.0000)/- 6.53400)
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1)+30.0000)/- 10.0000))
      ALGBRC(4) = ( 0.00900000*1.00000)/(1.00000+EXP(- (STATES(1)+3.80000)/9.71000))+0.000600000
      ALGBRC(11) = ( - 0.000225000*(STATES(1)+40.0000))/(1.00000 - EXP((STATES(1)+40.0000)/13.3000))
      ALGBRC(5) = ( 0.0145000*(STATES(1)+35.0000))/(1.00000 - EXP(- (STATES(1)+35.0000)/2.50000))+( 0.0312500*STATES(1))/(1.00000 - EXP(- STATES(1)/4.80000))
      ALGBRC(12) = ( - 0.00421000*(STATES(1) - 5.00000))/(- EXP((STATES(1) - 5.00000)/2.50000)+1.00000)
      ALGBRC(6) = ( - 0.000355000*(STATES(1)+20.0000))/(- EXP((STATES(1)+20.0000)/5.63300)+1.00000)
      ALGBRC(13) = ( 0.000944000*(STATES(1)+60.0000))/(1.00000+EXP(- (STATES(1)+29.5000)/4.16000))
      ALGBRC(7) = ( 0.000340000*(STATES(1)+100.000))/(EXP((STATES(1)+100.000)/4.40000) - 1.00000)+4.95000e-05
      ALGBRC(14) = ( 0.000500000*(STATES(1)+40.0000))/(1.00000 - EXP(- (STATES(1)+40.0000)/6.00000))+8.45000e-05
      ALGBRC(1) =  0.500000*STATES(2) ** 3.00000*STATES(3)*(STATES(1) - 30.0000)
      ALGBRC(8) = ( 0.700000*STATES(4)*(EXP( 0.0277000*(STATES(1)+90.0000)) - 1.00000))/EXP( 0.0277000*(STATES(1)+40.0000))
      ALGBRC(15) =  0.800000*(1.00000 - EXP(- (STATES(1)+60.0000)/20.0000))
      ALGBRC(16) =  12.5000*( 0.950000*STATES(5)+0.0500000)*( 0.950000*STATES(6)+0.0500000)*(EXP((STATES(1) - 10.0000)/15.0000) - 1.00000)
      ALGBRC(17) =  0.400000*STATES(7)*(STATES(1)+45.0000)
      RETURN
      END