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 17 entries in the algebraic variable array. C There are a total of 5 entries in each of the rate and state variable arrays. C There are a total of 32 entries in the constant variable array. C C C STATES(1) is s in component synaptic_input (dimensionless). C ALGBRC(16) is sum_g_syn_e_s in component synaptic_coupling (nanoS). C ALGBRC(1) is V_public in component synaptic_input (millivolt). C VOI is time in component environment (millisecond). C STATES(2) is V in component membrane (millivolt). C CONSTS(1) is C in component membrane (picoF). C CONSTS(2) is i_app in component membrane (picoA). C ALGBRC(13) is i_NaP in component persistent_sodium_current (picoA). C ALGBRC(7) is i_Na in component fast_sodium_current (picoA). C ALGBRC(11) is i_K in component potassium_current (picoA). C ALGBRC(14) is i_L in component leakage_current (picoA). C ALGBRC(15) is i_tonic_e in component tonic_current (picoA). C ALGBRC(17) is i_syn_e in component synaptic_input (picoA). C CONSTS(3) is E_Na in component fast_sodium_current (millivolt). C CONSTS(4) is g_Na in component fast_sodium_current (nanoS). C ALGBRC(2) is m_infinity in component fast_sodium_current_m_gate (dimensionless). C STATES(3) is n in component fast_sodium_current_n_gate (dimensionless). C CONSTS(5) is theta_m in component fast_sodium_current_m_gate (millivolt). C CONSTS(6) is sigma_m in component fast_sodium_current_m_gate (millivolt). C ALGBRC(3) is n_infinity in component fast_sodium_current_n_gate (dimensionless). C ALGBRC(8) is tau_n in component fast_sodium_current_n_gate (millisecond). C CONSTS(7) is tau_n_max in component fast_sodium_current_n_gate (millisecond). C CONSTS(8) is theta_n in component fast_sodium_current_n_gate (millivolt). C CONSTS(9) is sigma_n in component fast_sodium_current_n_gate (millivolt). C CONSTS(10) is g_K in component potassium_current (nanoS). C CONSTS(11) is E_K in component potassium_current (millivolt). C STATES(4) is n in component potassium_current_n_gate (dimensionless). C ALGBRC(4) is n_infinity in component potassium_current_n_gate (dimensionless). C ALGBRC(9) is tau_n in component potassium_current_n_gate (millisecond). C CONSTS(12) is tau_n_max in component potassium_current_n_gate (millisecond). C CONSTS(13) is theta_n in component potassium_current_n_gate (millivolt). C CONSTS(14) is sigma_n in component potassium_current_n_gate (millivolt). C CONSTS(15) is g_NaP in component persistent_sodium_current (nanoS). C ALGBRC(12) is m_infinity in component persistent_sodium_current_m_gate (dimensionless). C STATES(5) is h in component persistent_sodium_current_h_gate (dimensionless). C CONSTS(16) is theta_m in component persistent_sodium_current_m_gate (millivolt). C CONSTS(17) is sigma_m in component persistent_sodium_current_m_gate (millivolt). C ALGBRC(5) is h_infinity in component persistent_sodium_current_h_gate (dimensionless). C ALGBRC(10) is tau_h in component persistent_sodium_current_h_gate (millisecond). C CONSTS(18) is tau_h_max in component persistent_sodium_current_h_gate (millisecond). C CONSTS(19) is theta_h in component persistent_sodium_current_h_gate (millivolt). C CONSTS(20) is sigma_h in component persistent_sodium_current_h_gate (millivolt). C CONSTS(21) is g_L in component leakage_current (nanoS). C CONSTS(22) is E_L in component leakage_current (millivolt). C CONSTS(23) is E_syn_e in component tonic_current (millivolt). C CONSTS(24) is g_tonic_e in component tonic_current (nanoS). C ALGBRC(6) is s_infinity in component synaptic_input (dimensionless). C CONSTS(25) is kr in component synaptic_input (dimensionless). C CONSTS(26) is tau_s in component synaptic_input (millisecond). C CONSTS(27) is sigma_s in component synaptic_input (millivolt). C CONSTS(28) is theta_s in component synaptic_input (millivolt). C CONSTS(29) is g_syn_e_1_2 in component synaptic_coupling (nanoS). C CONSTS(30) is g_syn_e_1_3 in component synaptic_coupling (nanoS). C CONSTS(31) is g_syn_e_1_4 in component synaptic_coupling (nanoS). C CONSTS(32) is g_syn_e_1_5 in component synaptic_coupling (nanoS). C RATES(2) is d/dt V in component membrane (millivolt). C RATES(3) is d/dt n in component fast_sodium_current_n_gate (dimensionless). C RATES(4) is d/dt n in component potassium_current_n_gate (dimensionless). C RATES(5) is d/dt h in component persistent_sodium_current_h_gate (dimensionless). C RATES(1) is d/dt s in component synaptic_input (dimensionless). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 1 STATES(2) = -50.0 CONSTS(1) = 21.0 CONSTS(2) = 0.0 CONSTS(3) = 50.0 CONSTS(4) = 28.0 STATES(3) = 0.01 CONSTS(5) = -34.0 CONSTS(6) = -5.0 CONSTS(7) = 10.0 CONSTS(8) = -29.0 CONSTS(9) = -4.0 CONSTS(10) = 11.2 CONSTS(11) = -85.0 STATES(4) = 0.01 CONSTS(12) = 10.0 CONSTS(13) = -29.0 CONSTS(14) = -4.0 CONSTS(15) = 2.8 STATES(5) = 0.46 CONSTS(16) = -40.0 CONSTS(17) = -6.0 CONSTS(18) = 10000.0 CONSTS(19) = -48.0 CONSTS(20) = 6.0 CONSTS(21) = 2.8 CONSTS(22) = -57.5 CONSTS(23) = 0.0 CONSTS(24) = 0.0 CONSTS(25) = 1.0 CONSTS(26) = 5.0 CONSTS(27) = -5.0 CONSTS(28) = -10.0 CONSTS(29) = 0.10 CONSTS(30) = 0.10 CONSTS(31) = 0.10 CONSTS(32) = 0.10 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(2) - CONSTS(28))/CONSTS(27))) RATES(1) = ( (1.00000 - STATES(1))*ALGBRC(6) - - ( CONSTS(25)*STATES(1)))/CONSTS(26) ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(2) - CONSTS(8))/CONSTS(9))) ALGBRC(8) = CONSTS(7)/cosh((STATES(2) - CONSTS(8))/( 2.00000*CONSTS(9))) RATES(3) = (ALGBRC(3) - STATES(3))/ALGBRC(8) ALGBRC(4) = 1.00000/(1.00000+EXP((STATES(2) - CONSTS(13))/CONSTS(14))) ALGBRC(9) = CONSTS(12)/cosh((STATES(2) - CONSTS(13))/( 2.00000*CONSTS(14))) RATES(4) = (ALGBRC(4) - STATES(4))/ALGBRC(9) ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(2) - CONSTS(19))/CONSTS(20))) ALGBRC(10) = CONSTS(18)/cosh((STATES(2) - CONSTS(19))/( 2.00000*CONSTS(20))) RATES(5) = (ALGBRC(5) - STATES(5))/ALGBRC(10) ALGBRC(12) = 1.00000/(1.00000+EXP((STATES(2) - CONSTS(16))/CONSTS(17))) ALGBRC(13) = CONSTS(15)*ALGBRC(12)*STATES(5)*(STATES(2) - CONSTS(3)) ALGBRC(2) = 1.00000/(1.00000+EXP((STATES(2) - CONSTS(5))/CONSTS(6))) ALGBRC(7) = CONSTS(4)*ALGBRC(2) ** 3.00000*(1.00000 - STATES(3))*(STATES(2) - CONSTS(3)) ALGBRC(11) = CONSTS(10)*STATES(4) ** 4.00000*(STATES(2) - CONSTS(11)) ALGBRC(14) = CONSTS(21)*(STATES(2) - CONSTS(22)) ALGBRC(15) = CONSTS(24)*(STATES(2) - CONSTS(23)) ALGBRC(16) = CONSTS(29)*STATES(1)+ CONSTS(30)*STATES(1)+ CONSTS(31)*STATES(1)+ CONSTS(32)*STATES(1) ALGBRC(17) = ALGBRC(16)*(STATES(2) - CONSTS(23)) RATES(2) = (- (ALGBRC(13)+ALGBRC(7)+ALGBRC(11)+ALGBRC(14)+ALGBRC(15)+ALGBRC(17))+CONSTS(2))/CONSTS(1) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(6) = 1.00000/(1.00000+EXP((STATES(2) - CONSTS(28))/CONSTS(27))) ALGBRC(3) = 1.00000/(1.00000+EXP((STATES(2) - CONSTS(8))/CONSTS(9))) ALGBRC(8) = CONSTS(7)/cosh((STATES(2) - CONSTS(8))/( 2.00000*CONSTS(9))) ALGBRC(4) = 1.00000/(1.00000+EXP((STATES(2) - CONSTS(13))/CONSTS(14))) ALGBRC(9) = CONSTS(12)/cosh((STATES(2) - CONSTS(13))/( 2.00000*CONSTS(14))) ALGBRC(5) = 1.00000/(1.00000+EXP((STATES(2) - CONSTS(19))/CONSTS(20))) ALGBRC(10) = CONSTS(18)/cosh((STATES(2) - CONSTS(19))/( 2.00000*CONSTS(20))) ALGBRC(12) = 1.00000/(1.00000+EXP((STATES(2) - CONSTS(16))/CONSTS(17))) ALGBRC(13) = CONSTS(15)*ALGBRC(12)*STATES(5)*(STATES(2) - CONSTS(3)) ALGBRC(2) = 1.00000/(1.00000+EXP((STATES(2) - CONSTS(5))/CONSTS(6))) ALGBRC(7) = CONSTS(4)*ALGBRC(2) ** 3.00000*(1.00000 - STATES(3))*(STATES(2) - CONSTS(3)) ALGBRC(11) = CONSTS(10)*STATES(4) ** 4.00000*(STATES(2) - CONSTS(11)) ALGBRC(14) = CONSTS(21)*(STATES(2) - CONSTS(22)) ALGBRC(15) = CONSTS(24)*(STATES(2) - CONSTS(23)) ALGBRC(16) = CONSTS(29)*STATES(1)+ CONSTS(30)*STATES(1)+ CONSTS(31)*STATES(1)+ CONSTS(32)*STATES(1) ALGBRC(17) = ALGBRC(16)*(STATES(2) - CONSTS(23)) ALGBRC(1) = STATES(2) RETURN END