Generated Code
The following is c code generated by the CellML API from this CellML file. (Back to language selection)
The raw code is available.
/* There are a total of 35 entries in the algebraic variable array. There are a total of 29 entries in each of the rate and state variable arrays. There are a total of 45 entries in the constant variable array. */ /* * VOI is time in component environment (minute). * STATES[0] is BMK1 in component BMK1 (micromolar). * ALGEBRAIC[9] is v10a in component v10 (flux). * ALGEBRAIC[10] is v10b in component v10 (flux). * STATES[1] is MRNA in component MRNA (micromolar). * ALGEBRAIC[28] is v18 in component v18 (flux). * ALGEBRAIC[30] is v19 in component v19 (flux). * STATES[2] is NFATc in component NFATc (micromolar). * ALGEBRAIC[0] is v1 in component v1 (flux). * ALGEBRAIC[31] is v14 in component v14 (flux). * ALGEBRAIC[34] is v15 in component v15 (flux). * STATES[3] is NFATn in component NFATn (micromolar). * ALGEBRAIC[19] is v16 in component v16 (flux). * ALGEBRAIC[25] is v17 in component v17 (flux). * STATES[4] is NFATpc in component NFATpc (micromolar). * ALGEBRAIC[1] is v2 in component v2 (flux). * ALGEBRAIC[8] is v9 in component v9 (flux). * STATES[5] is NFATpn in component NFATpn (micromolar). * STATES[6] is GSK3betac in component GSK3betac (micromolar). * ALGEBRAIC[2] is v3 in component v3 (flux). * ALGEBRAIC[16] is v12a in component v12 (flux). * ALGEBRAIC[18] is v12b in component v12 (flux). * ALGEBRAIC[32] is v15a in component v15 (flux). * ALGEBRAIC[33] is v15b in component v15 (flux). * STATES[7] is GSK3betan in component GSK3betan (micromolar). * ALGEBRAIC[21] is v17a in component v17 (flux). * ALGEBRAIC[23] is v17b in component v17 (flux). * STATES[8] is CaNc in component CaNc (micromolar). * ALGEBRAIC[5] is v6 in component v6 (flux). * STATES[9] is CaNc_star in component CaNc_star (micromolar). * ALGEBRAIC[3] is v4 in component v4 (flux). * ALGEBRAIC[6] is v7 in component v7 (flux). * ALGEBRAIC[12] is v11a in component v11 (flux). * ALGEBRAIC[13] is v11b in component v11 (flux). * ALGEBRAIC[22] is v13a in component v13 (flux). * ALGEBRAIC[24] is v13b in component v13 (flux). * ALGEBRAIC[26] is v14a in component v14 (flux). * ALGEBRAIC[29] is v14b in component v14 (flux). * STATES[10] is CaNn_star in component CaNn_star (micromolar). * ALGEBRAIC[15] is v16a in component v16 (flux). * ALGEBRAIC[17] is v16b in component v16 (flux). * STATES[11] is CaNn in component CaNn (micromolar). * STATES[12] is CaM in component CaM (micromolar). * ALGEBRAIC[4] is v5 in component v5 (flux). * STATES[13] is CaMCa in component CaMCa (micromolar). * STATES[14] is MCIP in component MCIP (micromolar). * ALGEBRAIC[11] is v10 in component v10 (flux). * ALGEBRAIC[14] is v11 in component v11 (flux). * STATES[15] is MCIPp in component MCIPp (micromolar). * ALGEBRAIC[20] is v12 in component v12 (flux). * ALGEBRAIC[27] is v13 in component v13 (flux). * STATES[16] is MCIPpp in component MCIPpp (micromolar). * ALGEBRAIC[7] is v8 in component v8 (flux). * STATES[17] is Comp1 in component Comp1 (micromolar). * STATES[18] is Comp2 in component Comp2 (micromolar). * STATES[19] is Comp3 in component Comp3 (micromolar). * STATES[20] is P1433 in component P1433 (micromolar). * STATES[21] is MCIP_BMK1 in component MCIP_BMK1 (micromolar). * STATES[22] is MCIPp_CaNc_star in component MCIPp_CaNc_star (micromolar). * STATES[23] is MCIPp_GSK3betac in component MCIPp_GSK3betac (micromolar). * STATES[24] is MCIPpp_CaNc_star in component MCIPpp_CaNc_star (micromolar). * STATES[25] is NFATpc_CaNc_star in component NFATpc_CaNc_star (micromolar). * STATES[26] is NFATc_GSK3betac in component NFATc_GSK3betac (micromolar). * STATES[27] is NFATpn_CaNn_star in component NFATpn_CaNn_star (micromolar). * STATES[28] is NFATn_GSK3betan in component NFATn_GSK3betan (micromolar). * CONSTANTS[0] is k29 in component model_parameters (first_order_rate_constant). * CONSTANTS[1] is k30 in component model_parameters (first_order_rate_constant). * CONSTANTS[2] is k31 in component model_parameters (first_order_rate_constant). * CONSTANTS[3] is k32 in component model_parameters (first_order_rate_constant). * CONSTANTS[4] is k33 in component model_parameters (first_order_rate_constant). * CONSTANTS[5] is k34 in component model_parameters (first_order_rate_constant). * CONSTANTS[6] is Ca in component model_parameters (micromolar). * CONSTANTS[7] is k1 in component model_parameters (fifth_order_rate_constant). * CONSTANTS[8] is k2 in component model_parameters (first_order_rate_constant). * CONSTANTS[9] is k3 in component model_parameters (second_order_rate_constant). * CONSTANTS[10] is k4 in component model_parameters (first_order_rate_constant). * CONSTANTS[11] is k5 in component model_parameters (second_order_rate_constant). * CONSTANTS[12] is k6 in component model_parameters (first_order_rate_constant). * CONSTANTS[13] is k19 in component model_parameters (second_order_rate_constant). * CONSTANTS[14] is k20 in component model_parameters (first_order_rate_constant). * CONSTANTS[15] is k27 in component model_parameters (second_order_rate_constant). * CONSTANTS[16] is k28 in component model_parameters (first_order_rate_constant). * CONSTANTS[17] is k7 in component model_parameters (second_order_rate_constant). * CONSTANTS[18] is k8 in component model_parameters (first_order_rate_constant). * CONSTANTS[19] is k9 in component model_parameters (first_order_rate_constant). * CONSTANTS[20] is k10 in component model_parameters (second_order_rate_constant). * CONSTANTS[21] is k11 in component model_parameters (first_order_rate_constant). * CONSTANTS[22] is k12 in component model_parameters (first_order_rate_constant). * CONSTANTS[23] is k13 in component model_parameters (second_order_rate_constant). * CONSTANTS[24] is k14 in component model_parameters (first_order_rate_constant). * CONSTANTS[25] is k15 in component model_parameters (first_order_rate_constant). * CONSTANTS[26] is k16 in component model_parameters (second_order_rate_constant). * CONSTANTS[27] is k17 in component model_parameters (first_order_rate_constant). * CONSTANTS[28] is k18 in component model_parameters (first_order_rate_constant). * CONSTANTS[29] is k21 in component model_parameters (second_order_rate_constant). * CONSTANTS[30] is k22 in component model_parameters (first_order_rate_constant). * CONSTANTS[31] is k23 in component model_parameters (first_order_rate_constant). * CONSTANTS[32] is k24 in component model_parameters (second_order_rate_constant). * CONSTANTS[33] is k25 in component model_parameters (first_order_rate_constant). * CONSTANTS[34] is k26 in component model_parameters (first_order_rate_constant). * CONSTANTS[35] is k35 in component model_parameters (second_order_rate_constant). * CONSTANTS[36] is k36 in component model_parameters (first_order_rate_constant). * CONSTANTS[37] is k37 in component model_parameters (first_order_rate_constant). * CONSTANTS[38] is k38 in component model_parameters (second_order_rate_constant). * CONSTANTS[39] is k39 in component model_parameters (first_order_rate_constant). * CONSTANTS[40] is k40 in component model_parameters (first_order_rate_constant). * CONSTANTS[41] is k41 in component model_parameters (first_order_rate_constant). * CONSTANTS[42] is k42 in component model_parameters (first_order_rate_constant). * CONSTANTS[43] is t_half in component model_parameters (minute). * CONSTANTS[44] is k43 in component model_parameters (first_order_rate_constant). * RATES[0] is d/dt BMK1 in component BMK1 (micromolar). * RATES[1] is d/dt MRNA in component MRNA (micromolar). * RATES[2] is d/dt NFATc in component NFATc (micromolar). * RATES[3] is d/dt NFATn in component NFATn (micromolar). * RATES[4] is d/dt NFATpc in component NFATpc (micromolar). * RATES[5] is d/dt NFATpn in component NFATpn (micromolar). * RATES[6] is d/dt GSK3betac in component GSK3betac (micromolar). * RATES[7] is d/dt GSK3betan in component GSK3betan (micromolar). * RATES[8] is d/dt CaNc in component CaNc (micromolar). * RATES[9] is d/dt CaNc_star in component CaNc_star (micromolar). * RATES[10] is d/dt CaNn_star in component CaNn_star (micromolar). * RATES[11] is d/dt CaNn in component CaNn (micromolar). * RATES[12] is d/dt CaM in component CaM (micromolar). * RATES[13] is d/dt CaMCa in component CaMCa (micromolar). * RATES[14] is d/dt MCIP in component MCIP (micromolar). * RATES[15] is d/dt MCIPp in component MCIPp (micromolar). * RATES[16] is d/dt MCIPpp in component MCIPpp (micromolar). * RATES[17] is d/dt Comp1 in component Comp1 (micromolar). * RATES[18] is d/dt Comp2 in component Comp2 (micromolar). * RATES[19] is d/dt Comp3 in component Comp3 (micromolar). * RATES[20] is d/dt P1433 in component P1433 (micromolar). * RATES[21] is d/dt MCIP_BMK1 in component MCIP_BMK1 (micromolar). * RATES[22] is d/dt MCIPp_CaNc_star in component MCIPp_CaNc_star (micromolar). * RATES[23] is d/dt MCIPp_GSK3betac in component MCIPp_GSK3betac (micromolar). * RATES[24] is d/dt MCIPpp_CaNc_star in component MCIPpp_CaNc_star (micromolar). * RATES[25] is d/dt NFATpc_CaNc_star in component NFATpc_CaNc_star (micromolar). * RATES[26] is d/dt NFATc_GSK3betac in component NFATc_GSK3betac (micromolar). * RATES[27] is d/dt NFATpn_CaNn_star in component NFATpn_CaNn_star (micromolar). * RATES[28] is d/dt NFATn_GSK3betan in component NFATn_GSK3betan (micromolar). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 0.012; STATES[1] = 3.33E-4; STATES[2] = 2E-5; STATES[3] = 4.99E-4; STATES[4] = 4.94E-3; STATES[5] = 8.01E-5; STATES[6] = 0.17; STATES[7] = 0.339; STATES[8] = 0.91; STATES[9] = 0.0275; STATES[10] = 0.0568; STATES[11] = 0.0057; STATES[12] = 25.2; STATES[13] = 7.88E-7; STATES[14] = 2.15E-4; STATES[15] = 7.76E-3; STATES[16] = 0.0798; STATES[17] = 5.21E-3; STATES[18] = 0.283; STATES[19] = 0.014; STATES[20] = 0.708; STATES[21] = 2.14E-5; STATES[22] = 1.07E-4; STATES[23] = 1.1E-3; STATES[24] = 1.1E-3; STATES[25] = 8.15E-5; STATES[26] = 1.36E-6; STATES[27] = 2.27E-6; STATES[28] = 8.46E-5; CONSTANTS[0] = 0.4; CONSTANTS[1] = 0.1; CONSTANTS[2] = 0.1; CONSTANTS[3] = 0.05; CONSTANTS[4] = 0.114; CONSTANTS[5] = 0.0552; CONSTANTS[6] = 0.2; CONSTANTS[7] = 5; CONSTANTS[8] = 100; CONSTANTS[9] = 2760; CONSTANTS[10] = 0.072; CONSTANTS[11] = 50; CONSTANTS[12] = 0.0567; CONSTANTS[13] = 0.5; CONSTANTS[14] = 0.1; CONSTANTS[15] = 0.4; CONSTANTS[16] = 0.1; CONSTANTS[17] = 5; CONSTANTS[18] = 0.1; CONSTANTS[19] = 0.5; CONSTANTS[20] = 0.1; CONSTANTS[21] = 0.1; CONSTANTS[22] = 0.1; CONSTANTS[23] = 0.5; CONSTANTS[24] = 0.5; CONSTANTS[25] = 0.1; CONSTANTS[26] = 0.1; CONSTANTS[27] = 0.1; CONSTANTS[28] = 0.1; CONSTANTS[29] = 0.15; CONSTANTS[30] = 0.15; CONSTANTS[31] = 0.15; CONSTANTS[32] = 0.1; CONSTANTS[33] = 0.15; CONSTANTS[34] = 0.1; CONSTANTS[35] = 0.15; CONSTANTS[36] = 0.1; CONSTANTS[37] = 0.2; CONSTANTS[38] = 0.1; CONSTANTS[39] = 0.1; CONSTANTS[40] = 0.1; CONSTANTS[41] = 0.02; CONSTANTS[42] = 0.03; CONSTANTS[43] = 15; CONSTANTS[44] = 0.03; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[4] = CONSTANTS[7]*STATES[12]*pow(CONSTANTS[6], 4.00000) - CONSTANTS[8]*STATES[13]; RATES[12] = - ALGEBRAIC[4]; ALGEBRAIC[5] = CONSTANTS[9]*STATES[13]*STATES[8] - CONSTANTS[10]*STATES[9]; RATES[8] = - ALGEBRAIC[5]; RATES[11] = - ALGEBRAIC[5]; RATES[13] = ALGEBRAIC[4] - ALGEBRAIC[5]; ALGEBRAIC[6] = CONSTANTS[11]*STATES[9]*STATES[14] - CONSTANTS[12]*STATES[17]; RATES[17] = ALGEBRAIC[6]; ALGEBRAIC[7] = CONSTANTS[13]*STATES[20]*STATES[16] - CONSTANTS[14]*STATES[18]; RATES[18] = ALGEBRAIC[7]; ALGEBRAIC[8] = CONSTANTS[15]*STATES[4]*STATES[20] - CONSTANTS[16]*STATES[19]; RATES[19] = ALGEBRAIC[8]; RATES[20] = - (ALGEBRAIC[7]+ALGEBRAIC[8]); ALGEBRAIC[9] = CONSTANTS[17]*STATES[14]*STATES[0] - CONSTANTS[18]*STATES[21]; ALGEBRAIC[10] = CONSTANTS[19]*STATES[21]; RATES[0] = ALGEBRAIC[10] - ALGEBRAIC[9]; RATES[21] = ALGEBRAIC[9] - ALGEBRAIC[10]; ALGEBRAIC[12] = CONSTANTS[20]*STATES[15]*STATES[9] - CONSTANTS[21]*STATES[22]; ALGEBRAIC[13] = CONSTANTS[22]*STATES[22]; RATES[22] = ALGEBRAIC[12] - ALGEBRAIC[13]; ALGEBRAIC[3] = CONSTANTS[4]*STATES[9] - CONSTANTS[5]*STATES[10]; ALGEBRAIC[15] = CONSTANTS[35]*STATES[5]*STATES[10] - CONSTANTS[36]*STATES[27]; ALGEBRAIC[17] = CONSTANTS[37]*STATES[27]; RATES[10] = (ALGEBRAIC[3]+ALGEBRAIC[17]) - ALGEBRAIC[15]; ALGEBRAIC[16] = CONSTANTS[23]*STATES[15]*STATES[6] - CONSTANTS[24]*STATES[23]; ALGEBRAIC[18] = CONSTANTS[25]*STATES[23]; RATES[23] = ALGEBRAIC[16] - ALGEBRAIC[18]; RATES[27] = ALGEBRAIC[15] - ALGEBRAIC[17]; ALGEBRAIC[2] = CONSTANTS[2]*STATES[6] - CONSTANTS[3]*STATES[7]; ALGEBRAIC[21] = CONSTANTS[38]*STATES[3]*STATES[7] - CONSTANTS[39]*STATES[28]; ALGEBRAIC[23] = CONSTANTS[40]*STATES[28]; RATES[7] = (ALGEBRAIC[2]+ALGEBRAIC[23]) - ALGEBRAIC[21]; ALGEBRAIC[22] = CONSTANTS[26]*STATES[16]*STATES[9] - CONSTANTS[27]*STATES[24]; ALGEBRAIC[24] = CONSTANTS[28]*STATES[24]; RATES[24] = ALGEBRAIC[22] - ALGEBRAIC[24]; RATES[28] = ALGEBRAIC[21] - ALGEBRAIC[23]; ALGEBRAIC[19] = ALGEBRAIC[15]+ALGEBRAIC[17]; ALGEBRAIC[25] = ALGEBRAIC[21]+ALGEBRAIC[23]; ALGEBRAIC[1] = CONSTANTS[1]*STATES[5]; RATES[5] = ALGEBRAIC[25] - (ALGEBRAIC[1]+ALGEBRAIC[19]); ALGEBRAIC[11] = ALGEBRAIC[9]+ALGEBRAIC[10]; ALGEBRAIC[14] = ALGEBRAIC[12]+ALGEBRAIC[13]; ALGEBRAIC[20] = ALGEBRAIC[16]+ALGEBRAIC[18]; ALGEBRAIC[27] = ALGEBRAIC[22]+ALGEBRAIC[24]; RATES[15] = (ALGEBRAIC[11]+ALGEBRAIC[27]) - (ALGEBRAIC[14]+ALGEBRAIC[20]); RATES[16] = ALGEBRAIC[20] - (ALGEBRAIC[7]+ALGEBRAIC[27]); ALGEBRAIC[28] = CONSTANTS[41]*STATES[3] - CONSTANTS[42]*STATES[1]; ALGEBRAIC[0] = CONSTANTS[0]*STATES[2]; RATES[3] = (ALGEBRAIC[0]+ALGEBRAIC[19]) - (ALGEBRAIC[25]+ALGEBRAIC[28]); ALGEBRAIC[26] = CONSTANTS[29]*STATES[4]*STATES[9] - CONSTANTS[30]*STATES[25]; ALGEBRAIC[29] = CONSTANTS[31]*STATES[25]; RATES[9] = (ALGEBRAIC[5]+ALGEBRAIC[13]+ALGEBRAIC[24]+ALGEBRAIC[29]) - (ALGEBRAIC[3]+ALGEBRAIC[6]+ALGEBRAIC[12]+ALGEBRAIC[22]+ALGEBRAIC[26]); RATES[25] = ALGEBRAIC[26] - ALGEBRAIC[29]; ALGEBRAIC[30] = CONSTANTS[44]*STATES[1] - (log(2.00000)/CONSTANTS[43])*STATES[14]; RATES[1] = ALGEBRAIC[30] - ALGEBRAIC[28]; RATES[14] = ALGEBRAIC[14] - (ALGEBRAIC[6]+ALGEBRAIC[11]+ALGEBRAIC[30]); ALGEBRAIC[32] = CONSTANTS[32]*STATES[2]*STATES[6] - CONSTANTS[33]*STATES[26]; ALGEBRAIC[33] = CONSTANTS[34]*STATES[26]; RATES[6] = (ALGEBRAIC[18]+ALGEBRAIC[33]) - (ALGEBRAIC[2]+ALGEBRAIC[16]+ALGEBRAIC[32]); RATES[26] = ALGEBRAIC[32] - ALGEBRAIC[33]; ALGEBRAIC[31] = ALGEBRAIC[26]+ALGEBRAIC[29]; ALGEBRAIC[34] = ALGEBRAIC[32]+ALGEBRAIC[33]; RATES[2] = ALGEBRAIC[31] - (ALGEBRAIC[0]+ALGEBRAIC[34]); RATES[4] = (ALGEBRAIC[1]+ALGEBRAIC[34]) - (ALGEBRAIC[8]+ALGEBRAIC[31]); } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[4] = CONSTANTS[7]*STATES[12]*pow(CONSTANTS[6], 4.00000) - CONSTANTS[8]*STATES[13]; ALGEBRAIC[5] = CONSTANTS[9]*STATES[13]*STATES[8] - CONSTANTS[10]*STATES[9]; ALGEBRAIC[6] = CONSTANTS[11]*STATES[9]*STATES[14] - CONSTANTS[12]*STATES[17]; ALGEBRAIC[7] = CONSTANTS[13]*STATES[20]*STATES[16] - CONSTANTS[14]*STATES[18]; ALGEBRAIC[8] = CONSTANTS[15]*STATES[4]*STATES[20] - CONSTANTS[16]*STATES[19]; ALGEBRAIC[9] = CONSTANTS[17]*STATES[14]*STATES[0] - CONSTANTS[18]*STATES[21]; ALGEBRAIC[10] = CONSTANTS[19]*STATES[21]; ALGEBRAIC[12] = CONSTANTS[20]*STATES[15]*STATES[9] - CONSTANTS[21]*STATES[22]; ALGEBRAIC[13] = CONSTANTS[22]*STATES[22]; ALGEBRAIC[3] = CONSTANTS[4]*STATES[9] - CONSTANTS[5]*STATES[10]; ALGEBRAIC[15] = CONSTANTS[35]*STATES[5]*STATES[10] - CONSTANTS[36]*STATES[27]; ALGEBRAIC[17] = CONSTANTS[37]*STATES[27]; ALGEBRAIC[16] = CONSTANTS[23]*STATES[15]*STATES[6] - CONSTANTS[24]*STATES[23]; ALGEBRAIC[18] = CONSTANTS[25]*STATES[23]; ALGEBRAIC[2] = CONSTANTS[2]*STATES[6] - CONSTANTS[3]*STATES[7]; ALGEBRAIC[21] = CONSTANTS[38]*STATES[3]*STATES[7] - CONSTANTS[39]*STATES[28]; ALGEBRAIC[23] = CONSTANTS[40]*STATES[28]; ALGEBRAIC[22] = CONSTANTS[26]*STATES[16]*STATES[9] - CONSTANTS[27]*STATES[24]; ALGEBRAIC[24] = CONSTANTS[28]*STATES[24]; ALGEBRAIC[19] = ALGEBRAIC[15]+ALGEBRAIC[17]; ALGEBRAIC[25] = ALGEBRAIC[21]+ALGEBRAIC[23]; ALGEBRAIC[1] = CONSTANTS[1]*STATES[5]; ALGEBRAIC[11] = ALGEBRAIC[9]+ALGEBRAIC[10]; ALGEBRAIC[14] = ALGEBRAIC[12]+ALGEBRAIC[13]; ALGEBRAIC[20] = ALGEBRAIC[16]+ALGEBRAIC[18]; ALGEBRAIC[27] = ALGEBRAIC[22]+ALGEBRAIC[24]; ALGEBRAIC[28] = CONSTANTS[41]*STATES[3] - CONSTANTS[42]*STATES[1]; ALGEBRAIC[0] = CONSTANTS[0]*STATES[2]; ALGEBRAIC[26] = CONSTANTS[29]*STATES[4]*STATES[9] - CONSTANTS[30]*STATES[25]; ALGEBRAIC[29] = CONSTANTS[31]*STATES[25]; ALGEBRAIC[30] = CONSTANTS[44]*STATES[1] - (log(2.00000)/CONSTANTS[43])*STATES[14]; ALGEBRAIC[32] = CONSTANTS[32]*STATES[2]*STATES[6] - CONSTANTS[33]*STATES[26]; ALGEBRAIC[33] = CONSTANTS[34]*STATES[26]; ALGEBRAIC[31] = ALGEBRAIC[26]+ALGEBRAIC[29]; ALGEBRAIC[34] = ALGEBRAIC[32]+ALGEBRAIC[33]; }