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 15 entries in the algebraic variable array.
C There are a total of 10 entries in each of the rate and state variable arrays.
C There are a total of 38 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is ATP_cyt in component ATP_cyt (micromolar).
C ALGBRC(10) is J_hyd in component J_hyd (flux).
C ALGBRC(2) is J_CKMM in component J_CKMM (flux).
C ALGBRC(13) is J_diff_ATP in component J_diff_ATP (flux).
C CONSTS(1) is V_cyt in component fractional_volumes (dimensionless).
C STATES(2) is ADP_cyt in component ADP_cyt (micromolar).
C ALGBRC(14) is J_diff_ADP in component J_diff_ADP (flux).
C STATES(3) is PCr_cyt in component PCr_cyt (micromolar).
C ALGBRC(6) is J_diff_PCr in component J_diff_PCr (flux).
C STATES(4) is Cr_cyt in component Cr_cyt (micromolar).
C ALGBRC(7) is J_diff_Cr in component J_diff_Cr (flux).
C STATES(5) is Pi_cyt in component Pi_cyt (micromolar).
C ALGBRC(15) is J_diff_Pi in component J_diff_Pi (flux).
C STATES(6) is ATP_ims in component ATP_ims (micromolar).
C ALGBRC(4) is J_CKMi in component J_CKMi (flux).
C ALGBRC(12) is J_syn in component J_syn (flux).
C CONSTS(2) is V_ims in component fractional_volumes (dimensionless).
C STATES(7) is ADP_ims in component ADP_ims (micromolar).
C STATES(8) is PCr_ims in component PCr_ims (micromolar).
C STATES(9) is Cr_ims in component Cr_ims (micromolar).
C STATES(10) is Pi_ims in component Pi_ims (micromolar).
C ALGBRC(1) is Den_MMCK in component J_CKMM (dimensionless).
C CONSTS(3) is Kia in component J_CKMM (micromolar).
C CONSTS(4) is Kb in component J_CKMM (micromolar).
C CONSTS(5) is Kib in component J_CKMM (micromolar).
C CONSTS(32) is KIb in component J_CKMM (micromolar).
C CONSTS(33) is Kc in component J_CKMM (micromolar).
C CONSTS(6) is Kic in component J_CKMM (micromolar).
C CONSTS(7) is Kd in component J_CKMM (micromolar).
C CONSTS(8) is Kid in component J_CKMM (micromolar).
C CONSTS(9) is Vmax_MM_f in component J_CKMM (flux).
C CONSTS(10) is Vmax_MM_b in component J_CKMM (flux).
C ALGBRC(3) is Den_MiCK in component J_CKMi (dimensionless).
C CONSTS(11) is Kia in component J_CKMi (micromolar).
C CONSTS(12) is Kb in component J_CKMi (micromolar).
C CONSTS(13) is Kib in component J_CKMi (micromolar).
C CONSTS(34) is KIb in component J_CKMi (micromolar).
C CONSTS(35) is Kc in component J_CKMi (micromolar).
C CONSTS(14) is Kic in component J_CKMi (micromolar).
C CONSTS(15) is Kd in component J_CKMi (micromolar).
C CONSTS(16) is Kid in component J_CKMi (micromolar).
C CONSTS(17) is Vmax_Mi_f in component J_CKMi (flux).
C CONSTS(18) is Vmax_Mi_b in component J_CKMi (flux).
C ALGBRC(9) is H_ATPmax in component J_hyd (flux).
C CONSTS(19) is J_hyd_basis_1 in component J_hyd (flux).
C CONSTS(20) is J_hyd_basis_2 in component J_hyd (flux).
C CONSTS(21) is freq_1 in component J_hyd (dimensionless).
C CONSTS(22) is freq_2 in component J_hyd (dimensionless).
C CONSTS(36) is t_cycle_1 in component J_hyd (second).
C CONSTS(37) is t_cycle_2 in component J_hyd (second).
C ALGBRC(8) is t_cycle in component J_hyd (second).
C CONSTS(23) is nb_of_cycles_1 in component J_hyd (dimensionless).
C CONSTS(38) is duration_1 in component J_hyd (second).
C ALGBRC(5) is ltime in component J_hyd (second).
C ALGBRC(11) is Den_syn in component J_syn (dimensionless).
C CONSTS(24) is KPi in component J_syn (micromolar).
C CONSTS(25) is KADP in component J_syn (micromolar).
C CONSTS(26) is V_max_syn in component J_syn (flux).
C CONSTS(27) is PS_tot_ATP in component J_diff_ATP (first_order_rate_constant).
C CONSTS(28) is PS_tot_ADP in component J_diff_ADP (first_order_rate_constant).
C CONSTS(29) is PS_tot_PCr in component J_diff_PCr (first_order_rate_constant).
C CONSTS(30) is PS_tot_Cr in component J_diff_Cr (first_order_rate_constant).
C CONSTS(31) is PS_tot_Pi in component J_diff_Pi (first_order_rate_constant).
C RATES(1) is d/dt ATP_cyt in component ATP_cyt (micromolar).
C RATES(2) is d/dt ADP_cyt in component ADP_cyt (micromolar).
C RATES(3) is d/dt PCr_cyt in component PCr_cyt (micromolar).
C RATES(4) is d/dt Cr_cyt in component Cr_cyt (micromolar).
C RATES(5) is d/dt Pi_cyt in component Pi_cyt (micromolar).
C RATES(6) is d/dt ATP_ims in component ATP_ims (micromolar).
C RATES(7) is d/dt ADP_ims in component ADP_ims (micromolar).
C RATES(8) is d/dt PCr_ims in component PCr_ims (micromolar).
C RATES(9) is d/dt Cr_ims in component Cr_ims (micromolar).
C RATES(10) is d/dt Pi_ims in component Pi_ims (micromolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 5912.77
      CONSTS(1) = 0.75
      STATES(2) = 64
      STATES(3) = 5000
      STATES(4) = 10500
      STATES(5) = 913
      STATES(6) = 5912.77
      CONSTS(2) = 0.0625
      STATES(7) = 39
      STATES(8) = 5000
      STATES(9) = 10500
      STATES(10) = 910
      CONSTS(3) = 9.0E2
      CONSTS(4) = 1.55E4
      CONSTS(5) = 3.49E4
      CONSTS(6) = 2.224E2
      CONSTS(7) = 1.67E3
      CONSTS(8) = 4.73E3
      CONSTS(9) = 1.144E4
      CONSTS(10) = 4.804E4
      CONSTS(11) = 7.5E2
      CONSTS(12) = 5.2E3
      CONSTS(13) = 2.88E4
      CONSTS(14) = 2.048E2
      CONSTS(15) = 5.0E2
      CONSTS(16) = 1.6E3
      CONSTS(17) = 8.82E2
      CONSTS(18) = 3.704E3
      CONSTS(19) = 4.865e2
      CONSTS(20) = 6.276e2
      CONSTS(21) = 135
      CONSTS(22) = 220
      CONSTS(23) = 5
      CONSTS(24) = 8E2
      CONSTS(25) = 25
      CONSTS(26) = 1.504E4
      CONSTS(27) = 13.3
      CONSTS(28) = 13.3
      CONSTS(29) = 155.0
      CONSTS(30) = 155.0
      CONSTS(31) = 194.0
      CONSTS(32) = CONSTS(5)
      CONSTS(33) = ( CONSTS(6)*CONSTS(7))/CONSTS(8)
      CONSTS(34) = CONSTS(13)
      CONSTS(35) = ( CONSTS(14)*CONSTS(15))/CONSTS(16)
      CONSTS(36) = 60.0000/CONSTS(21)
      CONSTS(37) = 60.0000/CONSTS(22)
      CONSTS(38) =  CONSTS(23)*CONSTS(36)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = 1.00000+STATES(4)/CONSTS(5)+STATES(3)/CONSTS(8)+ STATES(1)*(1.00000/CONSTS(3)+STATES(4)/( CONSTS(3)*CONSTS(4)))+ STATES(2)*(1.00000/CONSTS(6)+STATES(3)/( CONSTS(8)*CONSTS(33))+STATES(4)/( CONSTS(6)*CONSTS(32)))
      ALGBRC(2) = ( CONSTS(9)*(( STATES(1)*STATES(4))/( CONSTS(3)*CONSTS(4))) -  CONSTS(10)*(( STATES(2)*STATES(3))/( CONSTS(6)*CONSTS(7))))/ALGBRC(1)
      ALGBRC(6) =  CONSTS(29)*(STATES(8) - STATES(3))
      RATES(3) = (ALGBRC(6)+ALGBRC(2))/CONSTS(1)
      ALGBRC(7) =  CONSTS(30)*(STATES(9) - STATES(4))
      RATES(4) = (ALGBRC(7) - ALGBRC(2))/CONSTS(1)
      ALGBRC(3) = 1.00000+STATES(9)/CONSTS(13)+STATES(8)/CONSTS(16)+ STATES(6)*(1.00000/CONSTS(11)+STATES(9)/( CONSTS(11)*CONSTS(12)))+ STATES(7)*(1.00000/CONSTS(14)+STATES(8)/( CONSTS(16)*CONSTS(35))+STATES(9)/( CONSTS(14)*CONSTS(34)))
      ALGBRC(4) = ( CONSTS(17)*(( STATES(6)*STATES(9))/( CONSTS(11)*CONSTS(12))) -  CONSTS(18)*(( STATES(7)*STATES(8))/( CONSTS(14)*CONSTS(15))))/ALGBRC(3)
      RATES(8) = (ALGBRC(4) - ALGBRC(6))/CONSTS(2)
      RATES(9) = - (ALGBRC(4)+ALGBRC(7))/CONSTS(2)
      ALGBRC(9) = TERNRY(VOI.LE.CONSTS(38),  6.00000*CONSTS(19),  6.00000*CONSTS(20))
      ALGBRC(8) = TERNRY(VOI.LE.CONSTS(38), CONSTS(36), CONSTS(37))
      ALGBRC(5) = TERNRY(VOI.LE.CONSTS(38), VOI -  CONSTS(36)*INT(VOI/CONSTS(36)), (VOI - CONSTS(38)) -  CONSTS(37)*INT((VOI - CONSTS(38))/CONSTS(37)))
      ALGBRC(10) = TERNRY(ALGBRC(5).GE.0.00000.AND.ALGBRC(5).LT. (1.00000/6.00000)*ALGBRC(8),  (( ALGBRC(9)*ALGBRC(5))/ALGBRC(8))*6.00000, TERNRY(ALGBRC(5).GE. (1.00000/6.00000)*ALGBRC(8).AND.ALGBRC(5).LT. (1.00000/3.00000)*ALGBRC(8),  ALGBRC(9)*(1.00000 -  6.00000*(ALGBRC(5)/ALGBRC(8) - 1.00000/6.00000)), TERNRY(ALGBRC(5).GE. (1.00000/3.00000)*ALGBRC(8).AND.ALGBRC(5).LT.ALGBRC(8), 0.00000, 0.0/0.0)
      ALGBRC(13) =  CONSTS(27)*(STATES(6) - STATES(1))
      RATES(1) = (ALGBRC(13) - (ALGBRC(10)+ALGBRC(2)))/CONSTS(1)
      ALGBRC(14) =  CONSTS(28)*(STATES(7) - STATES(2))
      RATES(2) = (ALGBRC(14)+ALGBRC(10)+ALGBRC(2))/CONSTS(1)
      ALGBRC(15) =  CONSTS(31)*(STATES(10) - STATES(5))
      RATES(5) = (ALGBRC(15)+ALGBRC(10))/CONSTS(1)
      ALGBRC(11) = 1.00000+STATES(7)/CONSTS(25)+STATES(10)/CONSTS(24)+( STATES(7)*STATES(10))/( CONSTS(25)*CONSTS(24))
      ALGBRC(12) =  CONSTS(26)*(( STATES(7)*STATES(10))/( CONSTS(24)*CONSTS(25)*ALGBRC(11)))
      RATES(6) = (ALGBRC(12) - (ALGBRC(13)+ALGBRC(4)))/CONSTS(2)
      RATES(7) = (ALGBRC(4) - (ALGBRC(12)+ALGBRC(14)))/CONSTS(2)
      RATES(10) = - (ALGBRC(12)+ALGBRC(15))/CONSTS(2)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = 1.00000+STATES(4)/CONSTS(5)+STATES(3)/CONSTS(8)+ STATES(1)*(1.00000/CONSTS(3)+STATES(4)/( CONSTS(3)*CONSTS(4)))+ STATES(2)*(1.00000/CONSTS(6)+STATES(3)/( CONSTS(8)*CONSTS(33))+STATES(4)/( CONSTS(6)*CONSTS(32)))
      ALGBRC(2) = ( CONSTS(9)*(( STATES(1)*STATES(4))/( CONSTS(3)*CONSTS(4))) -  CONSTS(10)*(( STATES(2)*STATES(3))/( CONSTS(6)*CONSTS(7))))/ALGBRC(1)
      ALGBRC(6) =  CONSTS(29)*(STATES(8) - STATES(3))
      ALGBRC(7) =  CONSTS(30)*(STATES(9) - STATES(4))
      ALGBRC(3) = 1.00000+STATES(9)/CONSTS(13)+STATES(8)/CONSTS(16)+ STATES(6)*(1.00000/CONSTS(11)+STATES(9)/( CONSTS(11)*CONSTS(12)))+ STATES(7)*(1.00000/CONSTS(14)+STATES(8)/( CONSTS(16)*CONSTS(35))+STATES(9)/( CONSTS(14)*CONSTS(34)))
      ALGBRC(4) = ( CONSTS(17)*(( STATES(6)*STATES(9))/( CONSTS(11)*CONSTS(12))) -  CONSTS(18)*(( STATES(7)*STATES(8))/( CONSTS(14)*CONSTS(15))))/ALGBRC(3)
      ALGBRC(9) = TERNRY(VOI.LE.CONSTS(38),  6.00000*CONSTS(19),  6.00000*CONSTS(20))
      ALGBRC(8) = TERNRY(VOI.LE.CONSTS(38), CONSTS(36), CONSTS(37))
      ALGBRC(5) = TERNRY(VOI.LE.CONSTS(38), VOI -  CONSTS(36)*INT(VOI/CONSTS(36)), (VOI - CONSTS(38)) -  CONSTS(37)*INT((VOI - CONSTS(38))/CONSTS(37)))
      ALGBRC(10) = TERNRY(ALGBRC(5).GE.0.00000.AND.ALGBRC(5).LT. (1.00000/6.00000)*ALGBRC(8),  (( ALGBRC(9)*ALGBRC(5))/ALGBRC(8))*6.00000, TERNRY(ALGBRC(5).GE. (1.00000/6.00000)*ALGBRC(8).AND.ALGBRC(5).LT. (1.00000/3.00000)*ALGBRC(8),  ALGBRC(9)*(1.00000 -  6.00000*(ALGBRC(5)/ALGBRC(8) - 1.00000/6.00000)), TERNRY(ALGBRC(5).GE. (1.00000/3.00000)*ALGBRC(8).AND.ALGBRC(5).LT.ALGBRC(8), 0.00000, 0.0/0.0)
      ALGBRC(13) =  CONSTS(27)*(STATES(6) - STATES(1))
      ALGBRC(14) =  CONSTS(28)*(STATES(7) - STATES(2))
      ALGBRC(15) =  CONSTS(31)*(STATES(10) - STATES(5))
      ALGBRC(11) = 1.00000+STATES(7)/CONSTS(25)+STATES(10)/CONSTS(24)+( STATES(7)*STATES(10))/( CONSTS(25)*CONSTS(24))
      ALGBRC(12) =  CONSTS(26)*(( STATES(7)*STATES(10))/( CONSTS(24)*CONSTS(25)*ALGBRC(11)))
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END