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 7 entries in the algebraic variable array.
C There are a total of 3 entries in each of the rate and state variable arrays.
C There are a total of 17 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C ALGBRC(1) is Ca_Pr in component total_calcium (micromolar).
C CONSTS(1) is Ca_tot in component total_calcium (micromolar).
C CONSTS(2) is rho_ER in component ER_calcium (dimensionless).
C CONSTS(3) is beta_ER in component ER_calcium (dimensionless).
C CONSTS(4) is rho_m in component mitochondrial_calcium (dimensionless).
C CONSTS(5) is beta_m in component mitochondrial_calcium (dimensionless).
C STATES(1) is Ca_cyt in component cytosolic_calcium (micromolar).
C STATES(2) is Ca_ER in component ER_calcium (micromolar).
C STATES(3) is Ca_m in component mitochondrial_calcium (micromolar).
C ALGBRC(2) is Pr in component total_protein (micromolar).
C CONSTS(6) is Pr_tot in component total_protein (micromolar).
C CONSTS(7) is k_plus in component cytosolic_calcium (second_order_rate_constant).
C CONSTS(8) is k_minus in component cytosolic_calcium (first_order_rate_constant).
C ALGBRC(4) is J_ch in component Ca_efflux_from_the_ER (flux).
C ALGBRC(5) is J_leak in component Ca_leak_flux_from_the_ER (flux).
C ALGBRC(3) is J_pump in component ATP_dependent_Ca_uptake_into_the_ER (flux).
C ALGBRC(7) is J_out in component mitochondrial_Ca_release (flux).
C ALGBRC(6) is J_in in component mitochondrial_Ca_uptake (flux).
C CONSTS(9) is k_pump in component ATP_dependent_Ca_uptake_into_the_ER (first_order_rate_constant).
C CONSTS(10) is k_ch in component Ca_efflux_from_the_ER (first_order_rate_constant).
C CONSTS(11) is K1 in component Ca_efflux_from_the_ER (micromolar).
C CONSTS(12) is k_leak in component Ca_leak_flux_from_the_ER (first_order_rate_constant).
C CONSTS(13) is k_in in component mitochondrial_Ca_uptake (flux).
C CONSTS(14) is K2 in component mitochondrial_Ca_uptake (micromolar).
C CONSTS(15) is k_out in component mitochondrial_Ca_release (first_order_rate_constant).
C CONSTS(16) is k_m in component mitochondrial_Ca_release (first_order_rate_constant).
C CONSTS(17) is K3 in component mitochondrial_Ca_release (micromolar).
C RATES(1) is d/dt Ca_cyt in component cytosolic_calcium (micromolar).
C RATES(2) is d/dt Ca_ER in component ER_calcium (micromolar).
C RATES(3) is d/dt Ca_m in component mitochondrial_calcium (micromolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 90.0
      CONSTS(2) = 0.01
      CONSTS(3) = 0.0025
      CONSTS(4) = 0.01
      CONSTS(5) = 0.0025
      STATES(1) = 0.05
      STATES(2) = 1.0
      STATES(3) = 0.4
      CONSTS(6) = 120.0
      CONSTS(7) = 0.1
      CONSTS(8) = 0.01
      CONSTS(9) = 20.0
      CONSTS(10) = 4100.0
      CONSTS(11) = 5.0
      CONSTS(12) = 0.05
      CONSTS(13) = 300.0
      CONSTS(14) = 0.8
      CONSTS(15) = 125.0
      CONSTS(16) = 0.00625
      CONSTS(17) = 5.0
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(4) =  CONSTS(10)*(STATES(1) ** 2.00000/(CONSTS(11) ** 2.00000+STATES(1) ** 2.00000))*(STATES(2) - STATES(1))
      ALGBRC(5) =  CONSTS(12)*(STATES(2) - STATES(1))
      ALGBRC(3) =  CONSTS(9)*STATES(1)
      RATES(2) =  (CONSTS(3)/CONSTS(2))*(ALGBRC(3) - (ALGBRC(4)+ALGBRC(5)))
      ALGBRC(1) = CONSTS(1) - (STATES(1)+ (CONSTS(2)/CONSTS(3))*STATES(2)+ (CONSTS(4)/CONSTS(5))*STATES(3))
      ALGBRC(2) = CONSTS(6) - ALGBRC(1)
      ALGBRC(7) =  ( CONSTS(15)*(STATES(1) ** 2.00000/(CONSTS(17) ** 2.00000+STATES(1) ** 2.00000))+CONSTS(16))*STATES(3)
      ALGBRC(6) =  CONSTS(13)*(STATES(1) ** 8.00000/(CONSTS(14) ** 8.00000+STATES(1) ** 8.00000))
      RATES(1) = (ALGBRC(4)+ALGBRC(5)+ALGBRC(7)+ CONSTS(8)*ALGBRC(1)) - (ALGBRC(3)+ALGBRC(6)+ CONSTS(7)*STATES(1)*ALGBRC(2))
      RATES(3) =  (CONSTS(5)/CONSTS(4))*(ALGBRC(6) - ALGBRC(7))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(4) =  CONSTS(10)*(STATES(1) ** 2.00000/(CONSTS(11) ** 2.00000+STATES(1) ** 2.00000))*(STATES(2) - STATES(1))
      ALGBRC(5) =  CONSTS(12)*(STATES(2) - STATES(1))
      ALGBRC(3) =  CONSTS(9)*STATES(1)
      ALGBRC(1) = CONSTS(1) - (STATES(1)+ (CONSTS(2)/CONSTS(3))*STATES(2)+ (CONSTS(4)/CONSTS(5))*STATES(3))
      ALGBRC(2) = CONSTS(6) - ALGBRC(1)
      ALGBRC(7) =  ( CONSTS(15)*(STATES(1) ** 2.00000/(CONSTS(17) ** 2.00000+STATES(1) ** 2.00000))+CONSTS(16))*STATES(3)
      ALGBRC(6) =  CONSTS(13)*(STATES(1) ** 8.00000/(CONSTS(14) ** 8.00000+STATES(1) ** 8.00000))
      RETURN
      END