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 21 entries in the algebraic variable array. C There are a total of 11 entries in each of the rate and state variable arrays. C There are a total of 19 entries in the constant variable array. C C C VOI is time in component environment (ms). C CONSTS(1) is R_gas_const in component parameters (millijoule_per_mole_kelvin). C CONSTS(2) is Temp in component parameters (kelvin). C CONSTS(3) is F in component parameters (coulomb_per_mole). C STATES(1) is R in component transmitter_release (dimensionless). C CONSTS(4) is kr_plus in component transmitter_release (per_uM_per_ms). C CONSTS(5) is kr_minus in component transmitter_release (per_ms). C ALGBRC(20) is Ca in component calcium_concentration (uM). C ALGBRC(1) is T in component transmitter_release (uM). C CONSTS(6) is T_bar in component transmitter_release (uM). C CONSTS(7) is Ca_ex in component calcium_concentration (uM). C ALGBRC(9) is Ca_open in component calcium_concentration (uM). C CONSTS(8) is Dc in component calcium_concentration (micrometre2_per_second). C CONSTS(9) is r in component calcium_concentration (nanometre). C ALGBRC(6) is sigma in component calcium_concentration (uM_per_ms). C ALGBRC(2) is i_V in component calcium_concentration (uA). C CONSTS(10) is g_Ca in component calcium_concentration (pS). C CONSTS(11) is P in component calcium_concentration (mV_per_uM). C STATES(2) is V_post in component membrane_post (mV). C ALGBRC(17) is O in component O (dimensionless). C ALGBRC(11) is alpha in component rate_constants (per_ms). C ALGBRC(13) is alpha_ in component rate_constants (per_ms). C ALGBRC(15) is beta in component rate_constants (per_ms). C ALGBRC(18) is beta_ in component rate_constants (per_ms). C ALGBRC(21) is kG_plus in component rate_constants (per_ms). C STATES(3) is b in component rate_constants (dimensionless). C CONSTS(12) is kb_plus in component rate_constants (per_uM_per_ms). C CONSTS(13) is kb_minus in component rate_constants (per_ms). C CONSTS(14) is kG_minus in component rate_constants (per_ms). C CONSTS(15) is kG2_minus in component rate_constants (per_ms). C CONSTS(16) is kG3_minus in component rate_constants (per_ms). C STATES(4) is C1 in component C1 (dimensionless). C STATES(5) is C2 in component C2 (dimensionless). C STATES(6) is C_G1 in component C_G1 (dimensionless). C STATES(7) is C3 in component C3 (dimensionless). C STATES(8) is C_G2 in component C_G2 (dimensionless). C STATES(9) is C4 in component C4 (dimensionless). C STATES(10) is C_G3 in component C_G3 (dimensionless). C ALGBRC(3) is C_G in component O (dimensionless). C CONSTS(17) is Cm in component membrane_post (uF_per_cm2). C ALGBRC(4) is i_syn in component synaptic_current (uA_per_cm2). C ALGBRC(16) is i_Na_post in component sodium_current_post (uA_per_cm2). C ALGBRC(19) is i_K_post in component potassium_current_post (uA_per_cm2). C ALGBRC(7) is i_leak_post in component leak_current_post (uA_per_cm2). C CONSTS(18) is g_syn in component synaptic_current (mS_per_cm2). C CONSTS(19) is V_syn in component synaptic_current (mV). C ALGBRC(14) is x_infinity in component sodium_current_post (dimensionless). C ALGBRC(10) is alpha_x in component sodium_current_post (dimensionless). C ALGBRC(12) is beta_x in component sodium_current_post (dimensionless). C STATES(11) is n_post in component potassium_current_n_gate_post (dimensionless). C ALGBRC(5) is alpha_n in component potassium_current_n_gate_post (per_ms). C ALGBRC(8) is beta_n in component potassium_current_n_gate_post (per_ms). C RATES(1) is d/dt R in component transmitter_release (dimensionless). C RATES(3) is d/dt b in component rate_constants (dimensionless). C RATES(4) is d/dt C1 in component C1 (dimensionless). C RATES(5) is d/dt C2 in component C2 (dimensionless). C RATES(7) is d/dt C3 in component C3 (dimensionless). C RATES(9) is d/dt C4 in component C4 (dimensionless). C RATES(6) is d/dt C_G1 in component C_G1 (dimensionless). C RATES(8) is d/dt C_G2 in component C_G2 (dimensionless). C RATES(10) is d/dt C_G3 in component C_G3 (dimensionless). C RATES(2) is d/dt V_post in component membrane_post (mV). C RATES(11) is d/dt n_post in component potassium_current_n_gate_post (dimensionless). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 8314.41 CONSTS(2) = 310 CONSTS(3) = 96485 STATES(1) = 0 CONSTS(4) = 0.15 CONSTS(5) = 2.5 CONSTS(6) = 4000.0 CONSTS(7) = 2000.0 CONSTS(8) = 220 CONSTS(9) = 10 CONSTS(10) = 1.2 CONSTS(11) = 0.006 STATES(2) = -65 STATES(3) = 0 CONSTS(12) = 2000.0 CONSTS(13) = 1.0 CONSTS(14) = 0.00025 CONSTS(15) = 0.016 CONSTS(16) = 1.024 STATES(4) = 1 STATES(5) = 0 STATES(6) = 0 STATES(7) = 0 STATES(8) = 0 STATES(9) = 0 STATES(10) = 0 CONSTS(17) = 1.0 CONSTS(18) = 0.2 CONSTS(19) = 0 STATES(11) = 0 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = CONSTS(6)*STATES(1) RATES(3) = CONSTS(12)*ALGBRC(1)*(1.00000 - STATES(3)) - CONSTS(13)*STATES(3) ALGBRC(5) = ( 0.0200000*(STATES(2)+55.0000))/(1.00000 - EXP(- (STATES(2)+55.0000)/10.0000)) ALGBRC(8) = 0.250000*EXP(- (STATES(2)+65.0000)/80.0000) RATES(11) = ALGBRC(5)*(1.00000 - STATES(11)) - ALGBRC(8)*STATES(11) ALGBRC(17) = ((((((1.00000 - STATES(4)) - STATES(5)) - STATES(7)) - STATES(9)) - STATES(6)) - STATES(8)) - STATES(10) ALGBRC(11) = 0.450000*EXP(STATES(2)/22.0000) ALGBRC(15) = 0.0150000*EXP(- STATES(2)/14.0000) RATES(9) = ( 2.00000*ALGBRC(11)*STATES(7)+ 4.00000*ALGBRC(15)*ALGBRC(17)) - STATES(9)*( 3.00000*ALGBRC(15)+ALGBRC(11)) ALGBRC(4) = CONSTS(18)*STATES(3)*(STATES(2) - CONSTS(19)) ALGBRC(10) = ( 0.200000*(STATES(2)+40.0000))/(1.00000 - 1.00000*EXP(- (STATES(2)+40.0000)/10.0000)) ALGBRC(12) = 8.00000*EXP(1.00000/- (STATES(2)+65.0000/18.0000)) ALGBRC(14) = ALGBRC(10)/(ALGBRC(10)+ALGBRC(12)) ALGBRC(16) = 120.000*ALGBRC(14) ** 3.00000*(1.00000 - STATES(11))*(STATES(2) - 120.000) ALGBRC(19) = 36.0000*STATES(11) ** 4.00000*(STATES(2)+77.0000) ALGBRC(7) = 0.300000*(STATES(2)+54.0000) RATES(2) = - (ALGBRC(16)+ALGBRC(19)+ALGBRC(7)+ALGBRC(4))/CONSTS(17) ALGBRC(2) = ( (( CONSTS(10)*CONSTS(11)*2.00000*CONSTS(3)*STATES(2))/( CONSTS(1)*CONSTS(2)))*CONSTS(7))/(1.00000 - EXP(( 2.00000*CONSTS(3)*STATES(2))/( CONSTS(1)*CONSTS(2)))) ALGBRC(6) = - 5.18200*ALGBRC(2) ALGBRC(9) = ALGBRC(6)/( 2.00000*CONSTS(8)*CONSTS(9)* 3.14159265358979) ALGBRC(20) = ALGBRC(17)*ALGBRC(9)+0.100000 RATES(1) = CONSTS(4)*ALGBRC(20)*(1.00000 - STATES(1)) - CONSTS(5)*STATES(1) ALGBRC(21) = ( 3.00000*STATES(3))/(680.000+ 320.000*STATES(3)) RATES(4) = ( ALGBRC(15)*STATES(5)+ CONSTS(14)*STATES(6)) - STATES(4)*( 4.00000*ALGBRC(11)+ALGBRC(21)) RATES(5) = ( 4.00000*ALGBRC(11)*STATES(4)+ 2.00000*ALGBRC(15)*STATES(7)+ CONSTS(15)*STATES(8)) - STATES(5)*(ALGBRC(15)+ 3.00000*ALGBRC(11)+ALGBRC(21)) RATES(7) = ( 3.00000*ALGBRC(11)*STATES(5)+ 3.00000*ALGBRC(15)*STATES(9)+ CONSTS(16)*STATES(10)) - STATES(7)*( 2.00000*ALGBRC(15)+ 2.00000*ALGBRC(11)+ALGBRC(21)) ALGBRC(13) = ALGBRC(11)/8.00000 ALGBRC(18) = ALGBRC(15)*8.00000 RATES(6) = ( ALGBRC(18)*STATES(8)+ ALGBRC(21)*STATES(4)) - STATES(6)*( 4.00000*ALGBRC(13)+CONSTS(14)) RATES(8) = ( 4.00000*ALGBRC(13)*STATES(6)+ 2.00000*ALGBRC(18)*STATES(10)+ ALGBRC(21)*STATES(5)) - STATES(8)*(ALGBRC(18)+ 3.00000*ALGBRC(13)+CONSTS(15)) RATES(10) = ( 3.00000*ALGBRC(13)*STATES(8)+ ALGBRC(21)*STATES(7)) - STATES(10)*( 2.00000*ALGBRC(18)+CONSTS(16)) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = CONSTS(6)*STATES(1) ALGBRC(5) = ( 0.0200000*(STATES(2)+55.0000))/(1.00000 - EXP(- (STATES(2)+55.0000)/10.0000)) ALGBRC(8) = 0.250000*EXP(- (STATES(2)+65.0000)/80.0000) ALGBRC(17) = ((((((1.00000 - STATES(4)) - STATES(5)) - STATES(7)) - STATES(9)) - STATES(6)) - STATES(8)) - STATES(10) ALGBRC(11) = 0.450000*EXP(STATES(2)/22.0000) ALGBRC(15) = 0.0150000*EXP(- STATES(2)/14.0000) ALGBRC(4) = CONSTS(18)*STATES(3)*(STATES(2) - CONSTS(19)) ALGBRC(10) = ( 0.200000*(STATES(2)+40.0000))/(1.00000 - 1.00000*EXP(- (STATES(2)+40.0000)/10.0000)) ALGBRC(12) = 8.00000*EXP(1.00000/- (STATES(2)+65.0000/18.0000)) ALGBRC(14) = ALGBRC(10)/(ALGBRC(10)+ALGBRC(12)) ALGBRC(16) = 120.000*ALGBRC(14) ** 3.00000*(1.00000 - STATES(11))*(STATES(2) - 120.000) ALGBRC(19) = 36.0000*STATES(11) ** 4.00000*(STATES(2)+77.0000) ALGBRC(7) = 0.300000*(STATES(2)+54.0000) ALGBRC(2) = ( (( CONSTS(10)*CONSTS(11)*2.00000*CONSTS(3)*STATES(2))/( CONSTS(1)*CONSTS(2)))*CONSTS(7))/(1.00000 - EXP(( 2.00000*CONSTS(3)*STATES(2))/( CONSTS(1)*CONSTS(2)))) ALGBRC(6) = - 5.18200*ALGBRC(2) ALGBRC(9) = ALGBRC(6)/( 2.00000*CONSTS(8)*CONSTS(9)* 3.14159265358979) ALGBRC(20) = ALGBRC(17)*ALGBRC(9)+0.100000 ALGBRC(21) = ( 3.00000*STATES(3))/(680.000+ 320.000*STATES(3)) ALGBRC(13) = ALGBRC(11)/8.00000 ALGBRC(18) = ALGBRC(15)*8.00000 ALGBRC(3) = STATES(6)+STATES(8)+STATES(10) RETURN END