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 26 entries in the algebraic variable array.
C There are a total of 12 entries in each of the rate and state variable arrays.
C There are a total of 37 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is V_s in component soma_compartment (mV).
C CONSTS(1) is V_Na in component soma_compartment (mV).
C ALGBRC(26) is I_Na_s in component soma_compartment (uA_per_cm2).
C ALGBRC(1) is I_K_DR_s in component soma_compartment (uA_per_cm2).
C ALGBRC(11) is I_Ca_T in component soma_compartment (uA_per_cm2).
C ALGBRC(16) is I_K_Ca in component soma_compartment (uA_per_cm2).
C ALGBRC(18) is I_A in component soma_compartment (uA_per_cm2).
C ALGBRC(21) is I_h in component soma_compartment (uA_per_cm2).
C CONSTS(2) is g_Na_s in component soma_compartment (mS_per_cm2).
C CONSTS(3) is g_K_DR_s in component soma_compartment (mS_per_cm2).
C CONSTS(4) is g_Ca_T in component soma_compartment (mS_per_cm2).
C CONSTS(5) is g_K_Ca in component soma_compartment (mS_per_cm2).
C CONSTS(6) is g_A in component soma_compartment (mS_per_cm2).
C CONSTS(7) is g_h in component soma_compartment (mS_per_cm2).
C STATES(2) is Ca in component soma_compartment (mM).
C CONSTS(8) is k_Ca in component soma_compartment (per_second).
C CONSTS(9) is K_Ca in component soma_compartment (mM).
C CONSTS(10) is V_h in component soma_compartment (mV).
C CONSTS(11) is beta in component soma_compartment (mMcm2_per_uAs).
C CONSTS(12) is I_APP in component soma_compartment (uA_per_cm2).
C CONSTS(13) is V_Ca in component general_variables (mV).
C CONSTS(14) is V_K in component general_variables (mV).
C STATES(3) is n in component gating_variables (dimensionless).
C STATES(4) is h in component gating_variables (dimensionless).
C ALGBRC(23) is m_infinity in component gating_variables (dimensionless).
C CONSTS(15) is g_c in component general_variables (mS_per_cm2).
C CONSTS(16) is p in component general_variables (dimensionless).
C STATES(5) is V_D in component dendritic_compartment (mV).
C CONSTS(17) is C_m in component general_variables (uF_per_cm2).
C STATES(6) is m_T in component gating_variables (dimensionless).
C STATES(7) is h_T in component gating_variables (dimensionless).
C STATES(8) is a in component gating_variables (dimensionless).
C STATES(9) is b in component gating_variables (dimensionless).
C STATES(10) is m_h in component gating_variables (dimensionless).
C STATES(11) is Na in component dendritic_compartment (mM).
C CONSTS(18) is K_p in component dendritic_compartment (mM).
C ALGBRC(19) is I_L in component dendritic_compartment (uA_per_cm2).
C ALGBRC(17) is I_pump in component dendritic_compartment (uA_per_cm2).
C CONSTS(19) is R_pump in component dendritic_compartment (uA_per_cm2).
C CONSTS(20) is Na_eq in component dendritic_compartment (mM).
C ALGBRC(12) is phi_Na in component dendritic_compartment (dimensionless).
C CONSTS(32) is phi_Na_eq in component dendritic_compartment (dimensionless).
C CONSTS(21) is alpha in component dendritic_compartment (mMcm2_per_uAs).
C ALGBRC(22) is I_NMDA in component dendritic_compartment (uA_per_cm2).
C ALGBRC(20) is I_Na_NMDA in component dendritic_compartment (uA_per_cm2).
C CONSTS(22) is g_NMDA in component dendritic_compartment (mS_per_cm2).
C CONSTS(23) is g_Na_NMDA in component dendritic_compartment (mS_per_cm2).
C CONSTS(24) is g_L in component dendritic_compartment (mS_per_cm2).
C CONSTS(25) is Mg_o in component dendritic_compartment (mM).
C CONSTS(26) is K_Mg in component dendritic_compartment (mM).
C CONSTS(27) is q in component dendritic_compartment (mV).
C CONSTS(28) is V_NMDA in component dendritic_compartment (mV).
C CONSTS(29) is V_L in component dendritic_compartment (mV).
C ALGBRC(24) is I_D in component dendritic_compartment (uA_per_cm2).
C ALGBRC(25) is I_Ca_L in component dendritic_compartment (uA_per_cm2).
C CONSTS(30) is g_Ca_L in component dendritic_compartment (mS_per_cm2).
C CONSTS(31) is g_K_DR_D in component dendritic_compartment (mS_per_cm2).
C ALGBRC(2) is I_K_DR_D in component dendritic_compartment (uA_per_cm2).
C STATES(12) is m_L in component gating_variables (dimensionless).
C ALGBRC(3) is m_T_infinity in component gating_variables (dimensionless).
C ALGBRC(4) is h_T_infinity in component gating_variables (dimensionless).
C ALGBRC(5) is a_infinity in component gating_variables (dimensionless).
C ALGBRC(6) is b_infinity in component gating_variables (dimensionless).
C ALGBRC(7) is m_h_infinity in component gating_variables (dimensionless).
C ALGBRC(8) is m_L_infinity in component gating_variables (dimensionless).
C ALGBRC(9) is n_infinity in component gating_variables (dimensionless).
C ALGBRC(10) is h_infinity in component gating_variables (dimensionless).
C ALGBRC(13) is tau_h in component gating_variables (second).
C ALGBRC(14) is tau_n in component gating_variables (second).
C CONSTS(33) is tau_m_T in component gating_variables (second).
C CONSTS(34) is tau_h_T in component gating_variables (second).
C ALGBRC(15) is tau_m_L in component gating_variables (second).
C CONSTS(35) is tau_a in component gating_variables (second).
C CONSTS(36) is tau_b in component gating_variables (second).
C CONSTS(37) is tau_m_h in component gating_variables (second).
C RATES(1) is d/dt V_s in component soma_compartment (mV).
C RATES(2) is d/dt Ca in component soma_compartment (mM).
C RATES(5) is d/dt V_D in component dendritic_compartment (mV).
C RATES(11) is d/dt Na in component dendritic_compartment (mM).
C RATES(4) is d/dt h in component gating_variables (dimensionless).
C RATES(3) is d/dt n in component gating_variables (dimensionless).
C RATES(6) is d/dt m_T in component gating_variables (dimensionless).
C RATES(12) is d/dt m_L in component gating_variables (dimensionless).
C RATES(10) is d/dt m_h in component gating_variables (dimensionless).
C RATES(8) is d/dt a in component gating_variables (dimensionless).
C RATES(9) is d/dt b in component gating_variables (dimensionless).
C RATES(7) is d/dt h_T in component gating_variables (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = -64.0
      CONSTS(1) = 55
      CONSTS(2) = 3.2
      CONSTS(3) = 6.4
      CONSTS(4) = 1.5
      CONSTS(5) = 1.2
      CONSTS(6) = 2
      CONSTS(7) = 0.1
      STATES(2) = 0
      CONSTS(8) = 1
      CONSTS(9) = 0.0004
      CONSTS(10) = -30
      CONSTS(11) = 0.104
      CONSTS(12) = -6.7
      CONSTS(13) = 120
      CONSTS(14) = -85
      STATES(3) = 0.002
      STATES(4) = 1.0
      CONSTS(15) = 0.1
      CONSTS(16) = 0.5
      STATES(5) = -77.0
      CONSTS(17) = 1
      STATES(6) = 0.1
      STATES(7) = 0.1
      STATES(8) = 0.1
      STATES(9) = 0.1
      STATES(10) = 0.1
      STATES(11) = 5.09
      CONSTS(18) = 15
      CONSTS(19) = 18
      CONSTS(20) = 8
      CONSTS(21) = 0.173
      CONSTS(22) = 25
      CONSTS(23) = 5
      CONSTS(24) = 0.18
      CONSTS(25) = 1.4
      CONSTS(26) = 10
      CONSTS(27) = 12.5
      CONSTS(28) = 0
      CONSTS(29) = -50
      CONSTS(30) = 0.19
      CONSTS(31) = 0.14
      STATES(12) = 0.1
      CONSTS(32) = CONSTS(20) ** 3.00000/(CONSTS(20) ** 3.00000+CONSTS(18) ** 3.00000)
      CONSTS(33) = 1.00000
      CONSTS(34) = 10.0000
      CONSTS(35) = 0.500000
      CONSTS(36) = 10.0000
      CONSTS(37) = 190.000
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(3) = 1.00000/(1.00000+EXP(- (STATES(1)+55.0000)/7.00000))
      RATES(6) = (ALGBRC(3) - STATES(6))/CONSTS(33)
      ALGBRC(7) = 1.00000/(1.00000+EXP((STATES(1)+80.0000)/8.00000))
      RATES(10) = (ALGBRC(7) - STATES(10))/CONSTS(37)
      ALGBRC(5) = 1.00000/(1.00000+EXP(- (STATES(1)+60.0000)/10.0000))
      RATES(8) = (ALGBRC(5) - STATES(8))/CONSTS(35)
      ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(1)+70.0000)/5.70000))
      RATES(9) = (ALGBRC(6) - STATES(9))/CONSTS(36)
      ALGBRC(4) = 1.00000/(1.00000+EXP((STATES(1)+81.0000)/11.0000))
      RATES(7) = (ALGBRC(4) - STATES(7))/CONSTS(34)
      ALGBRC(11) =  CONSTS(4)*STATES(7)*(STATES(1) - CONSTS(13))*STATES(6) ** 2.00000
      RATES(2) = - ( CONSTS(11)*ALGBRC(11)+ CONSTS(8)*STATES(2))
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1)+30.0000)/8.30000))
      ALGBRC(13) =  0.400000*(1.00000+2.00000/(1.00000+EXP((STATES(1)+25.0000)/5.00000)))
      RATES(4) = (ALGBRC(10) - STATES(4))/ALGBRC(13)
      ALGBRC(9) = 1.00000/(1.00000+EXP(- (STATES(1)+31.0000)/5.30000))
      ALGBRC(14) = ( 0.800000*(1.00000+2.00000/(1.00000+EXP((STATES(1)+25.0000)/10.0000))))/(1.00000+EXP(- (STATES(1)+70.0000)/10.0000))
      RATES(3) = (ALGBRC(9) - STATES(3))/ALGBRC(14)
      ALGBRC(8) = 1.00000/(1.00000+EXP(- (STATES(5)+20.0000)/5.30000))
      ALGBRC(15) = 0.400000/( 5.00000*EXP(- (STATES(5)+11.0000)/8.30000)+(- (STATES(5)+11.0000)/8.30000)/(EXP(- (STATES(5)+11.0000)/8.30000) - 1.00000))
      RATES(12) = (ALGBRC(8) - STATES(12))/ALGBRC(15)
      ALGBRC(12) = STATES(11) ** 3.00000/(STATES(11) ** 3.00000+CONSTS(18) ** 3.00000)
      ALGBRC(17) =  CONSTS(19)*(ALGBRC(12) - CONSTS(32))
      ALGBRC(20) =  (CONSTS(23)/(1.00000+ (CONSTS(25)/CONSTS(26))*EXP(- STATES(5)/CONSTS(27))))*(STATES(5) - CONSTS(1))
      RATES(11) =  CONSTS(21)*(- ALGBRC(20) -  ALGBRC(17)*3.00000)
      ALGBRC(19) =  CONSTS(24)*(STATES(5) - CONSTS(29))
      ALGBRC(22) =  (CONSTS(22)/(1.00000+ (CONSTS(25)/CONSTS(26))*EXP(- STATES(5)/CONSTS(27))))*(STATES(5) - CONSTS(28))
      ALGBRC(25) =  CONSTS(30)*(STATES(5) - CONSTS(13))*STATES(12) ** 2.00000
      ALGBRC(2) =  CONSTS(31)*(STATES(5) - CONSTS(14))*STATES(3) ** 2.00000
      RATES(5) = - ( 1000.00*(ALGBRC(25)+ALGBRC(2)+ALGBRC(22)+ALGBRC(17)+ALGBRC(19)+ (CONSTS(15)/(1.00000 - CONSTS(16)))*(STATES(5) - STATES(1))))/CONSTS(17)
      ALGBRC(23) = 1.00000/(1.00000+EXP(- (STATES(1)+35.0000)/6.20000))
      ALGBRC(26) =  CONSTS(2)*STATES(4)*(STATES(1) - CONSTS(1))*ALGBRC(23) ** 3.00000
      ALGBRC(1) =  CONSTS(3)*(STATES(1) - CONSTS(14))*STATES(3) ** 2.00000
      ALGBRC(16) =  (( CONSTS(5)*STATES(2) ** 4.00000)/(STATES(2) ** 4.00000+CONSTS(9) ** 4.00000))*(STATES(1) - CONSTS(14))
      ALGBRC(18) =  CONSTS(6)*STATES(9)*(STATES(1) - CONSTS(14))*STATES(8) ** 4.00000
      ALGBRC(21) =  CONSTS(7)*STATES(10)*(STATES(1) - CONSTS(10))
      RATES(1) = ( 1000.00*(CONSTS(12) - (ALGBRC(26)+ALGBRC(11)+ALGBRC(1)+ALGBRC(16)+ALGBRC(18)+ALGBRC(21)+ (CONSTS(15)/CONSTS(16))*(STATES(1) - STATES(5)))))/CONSTS(17)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(3) = 1.00000/(1.00000+EXP(- (STATES(1)+55.0000)/7.00000))
      ALGBRC(7) = 1.00000/(1.00000+EXP((STATES(1)+80.0000)/8.00000))
      ALGBRC(5) = 1.00000/(1.00000+EXP(- (STATES(1)+60.0000)/10.0000))
      ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(1)+70.0000)/5.70000))
      ALGBRC(4) = 1.00000/(1.00000+EXP((STATES(1)+81.0000)/11.0000))
      ALGBRC(11) =  CONSTS(4)*STATES(7)*(STATES(1) - CONSTS(13))*STATES(6) ** 2.00000
      ALGBRC(10) = 1.00000/(1.00000+EXP((STATES(1)+30.0000)/8.30000))
      ALGBRC(13) =  0.400000*(1.00000+2.00000/(1.00000+EXP((STATES(1)+25.0000)/5.00000)))
      ALGBRC(9) = 1.00000/(1.00000+EXP(- (STATES(1)+31.0000)/5.30000))
      ALGBRC(14) = ( 0.800000*(1.00000+2.00000/(1.00000+EXP((STATES(1)+25.0000)/10.0000))))/(1.00000+EXP(- (STATES(1)+70.0000)/10.0000))
      ALGBRC(8) = 1.00000/(1.00000+EXP(- (STATES(5)+20.0000)/5.30000))
      ALGBRC(15) = 0.400000/( 5.00000*EXP(- (STATES(5)+11.0000)/8.30000)+(- (STATES(5)+11.0000)/8.30000)/(EXP(- (STATES(5)+11.0000)/8.30000) - 1.00000))
      ALGBRC(12) = STATES(11) ** 3.00000/(STATES(11) ** 3.00000+CONSTS(18) ** 3.00000)
      ALGBRC(17) =  CONSTS(19)*(ALGBRC(12) - CONSTS(32))
      ALGBRC(20) =  (CONSTS(23)/(1.00000+ (CONSTS(25)/CONSTS(26))*EXP(- STATES(5)/CONSTS(27))))*(STATES(5) - CONSTS(1))
      ALGBRC(19) =  CONSTS(24)*(STATES(5) - CONSTS(29))
      ALGBRC(22) =  (CONSTS(22)/(1.00000+ (CONSTS(25)/CONSTS(26))*EXP(- STATES(5)/CONSTS(27))))*(STATES(5) - CONSTS(28))
      ALGBRC(25) =  CONSTS(30)*(STATES(5) - CONSTS(13))*STATES(12) ** 2.00000
      ALGBRC(2) =  CONSTS(31)*(STATES(5) - CONSTS(14))*STATES(3) ** 2.00000
      ALGBRC(23) = 1.00000/(1.00000+EXP(- (STATES(1)+35.0000)/6.20000))
      ALGBRC(26) =  CONSTS(2)*STATES(4)*(STATES(1) - CONSTS(1))*ALGBRC(23) ** 3.00000
      ALGBRC(1) =  CONSTS(3)*(STATES(1) - CONSTS(14))*STATES(3) ** 2.00000
      ALGBRC(16) =  (( CONSTS(5)*STATES(2) ** 4.00000)/(STATES(2) ** 4.00000+CONSTS(9) ** 4.00000))*(STATES(1) - CONSTS(14))
      ALGBRC(18) =  CONSTS(6)*STATES(9)*(STATES(1) - CONSTS(14))*STATES(8) ** 4.00000
      ALGBRC(21) =  CONSTS(7)*STATES(10)*(STATES(1) - CONSTS(10))
      ALGBRC(24) = ALGBRC(22)+ALGBRC(17)+ALGBRC(19)
      RETURN
      END