C C There are a total of 16 entries in the algebraic variable array. C There are a total of 6 entries in each of the rate and state variable arrays. C There are a total of 23 entries in the constant variable array. C C C VOI is time in component environment (second). C ALGBRC(1) is q_L_B1_init in component environment (fmol). C CONSTS(1) is q_R_B1_init in component environment (fmol). C CONSTS(2) is q_Gs_init in component environment (fmol). C CONSTS(3) is q_LR_B1_init in component environment (fmol). C CONSTS(4) is q_R_B1Gs_init in component environment (fmol). C CONSTS(5) is q_LR_B1Gs_init in component environment (fmol). C CONSTS(6) is stimSt in component environment (second). C CONSTS(7) is stimDur in component environment (second). C CONSTS(8) is tR in component environment (second). C CONSTS(9) is stimMag in component environment (fmol). C CONSTS(10) is stimHolding in component environment (fmol). C CONSTS(23) is m in component environment (fmol_per_sec). C ALGBRC(2) is q_L_B1 in component environment (fmol). C ALGBRC(3) is q_R_B1 in component environment (fmol). C ALGBRC(4) is q_Gs in component environment (fmol). C ALGBRC(5) is q_LR_B1 in component environment (fmol). C ALGBRC(6) is q_R_B1Gs in component environment (fmol). C ALGBRC(7) is q_LR_B1Gs in component environment (fmol). C STATES(1) is q_L_B1 in component LRGbinding_B1AR (fmol). C STATES(2) is q_R_B1 in component LRGbinding_B1AR (fmol). C STATES(3) is q_Gs in component LRGbinding_B1AR (fmol). C STATES(4) is q_LR_B1 in component LRGbinding_B1AR (fmol). C STATES(5) is q_R_B1Gs in component LRGbinding_B1AR (fmol). C STATES(6) is q_LR_B1Gs in component LRGbinding_B1AR (fmol). C CONSTS(11) is kappa_R_C_B1 in component LRGbinding_B1AR_parameters (fmol_per_sec). C CONSTS(12) is kappa_R_R_B1 in component LRGbinding_B1AR_parameters (fmol_per_sec). C CONSTS(13) is kappa_R_L_B1 in component LRGbinding_B1AR_parameters (fmol_per_sec). C CONSTS(14) is K_L_B1 in component LRGbinding_B1AR_parameters (per_fmol). C CONSTS(15) is K_R_B1 in component LRGbinding_B1AR_parameters (per_fmol). C CONSTS(16) is K_Gs in component LRGbinding_B1AR_parameters (per_fmol). C CONSTS(17) is K_LR_B1 in component LRGbinding_B1AR_parameters (per_fmol). C CONSTS(18) is K_R_B1Gs in component LRGbinding_B1AR_parameters (per_fmol). C CONSTS(19) is K_LR_B1Gs in component LRGbinding_B1AR_parameters (per_fmol). C CONSTS(20) is R in component constants (J_per_K_per_mol). C CONSTS(21) is T in component constants (kelvin). C ALGBRC(8) is mu_L_B1 in component LRGbinding_B1AR (J_per_mol). C ALGBRC(9) is mu_R_B1 in component LRGbinding_B1AR (J_per_mol). C ALGBRC(10) is mu_Gs in component LRGbinding_B1AR (J_per_mol). C ALGBRC(11) is mu_LR_B1 in component LRGbinding_B1AR (J_per_mol). C ALGBRC(12) is mu_R_B1Gs in component LRGbinding_B1AR (J_per_mol). C ALGBRC(13) is mu_LR_B1Gs in component LRGbinding_B1AR (J_per_mol). C ALGBRC(14) is v_R_C_B1 in component LRGbinding_B1AR (fmol_per_sec). C ALGBRC(15) is v_R_R_B1 in component LRGbinding_B1AR (fmol_per_sec). C ALGBRC(16) is v_R_L_B1 in component LRGbinding_B1AR (fmol_per_sec). C CONSTS(22) is F in component constants (C_per_mol). C RATES(1) is d/dt q_L_B1 in component LRGbinding_B1AR (fmol). C RATES(2) is d/dt q_R_B1 in component LRGbinding_B1AR (fmol). C RATES(3) is d/dt q_Gs in component LRGbinding_B1AR (fmol). C RATES(4) is d/dt q_LR_B1 in component LRGbinding_B1AR (fmol). C RATES(5) is d/dt q_R_B1Gs in component LRGbinding_B1AR (fmol). C RATES(6) is d/dt q_LR_B1Gs in component LRGbinding_B1AR (fmol). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 0.0004579000 CONSTS(2) = 0.1455400000 CONSTS(3) = 0 CONSTS(4) = 0 CONSTS(5) = 0 CONSTS(6) = 3.1 CONSTS(7) = 0.5e1 CONSTS(8) = 0.3e1 CONSTS(9) = 1e-7 CONSTS(10) = 1e-8 STATES(1) = 1e-16 STATES(2) = 1e-16 STATES(3) = 1e-16 STATES(4) = 1e-16 STATES(5) = 1e-16 STATES(6) = 1e-16 CONSTS(11) = 5573.84 CONSTS(12) = 641.71 CONSTS(13) = 1143.57 CONSTS(14) = 0.885956 CONSTS(15) = 0.834078 CONSTS(16) = 0.18177 CONSTS(17) = 7.24472 CONSTS(18) = 172.108 CONSTS(19) = 2.80863 CONSTS(20) = 8.31 CONSTS(21) = 310 CONSTS(22) = 96485 CONSTS(23) = CONSTS(9)/CONSTS(8) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(3) = STATES(2)+CONSTS(1) ALGBRC(9) = CONSTS(20)*CONSTS(21)*log( CONSTS(15)*ALGBRC(3)) ALGBRC(4) = STATES(3)+CONSTS(2) ALGBRC(10) = CONSTS(20)*CONSTS(21)*log( CONSTS(16)*ALGBRC(4)) ALGBRC(6) = STATES(5)+CONSTS(4) ALGBRC(12) = CONSTS(20)*CONSTS(21)*log( CONSTS(18)*ALGBRC(6)) ALGBRC(14) = CONSTS(11)*EXP((ALGBRC(9)+ALGBRC(10))/( CONSTS(20)*CONSTS(21))) - EXP(ALGBRC(12)/( CONSTS(20)*CONSTS(21))) RATES(5) = ALGBRC(14) ALGBRC(5) = STATES(4)+CONSTS(3) ALGBRC(11) = CONSTS(20)*CONSTS(21)*log( CONSTS(17)*ALGBRC(5)) ALGBRC(7) = STATES(6)+CONSTS(5) ALGBRC(13) = CONSTS(20)*CONSTS(21)*log( CONSTS(19)*ALGBRC(7)) ALGBRC(15) = CONSTS(12)*EXP((ALGBRC(11)+ALGBRC(10))/( CONSTS(20)*CONSTS(21))) - EXP(ALGBRC(13)/( CONSTS(20)*CONSTS(21))) RATES(3) = - ALGBRC(14) - ALGBRC(15) RATES(6) = ALGBRC(15) ALGBRC(1) = TERNRY(VOI.LT.CONSTS(6).AND.VOI.GT.CONSTS(6) - CONSTS(8), CONSTS(10)+ CONSTS(23)*((VOI - CONSTS(6))+CONSTS(8)), TERNRY(VOI.GE.CONSTS(6).AND.VOI.LT.CONSTS(6)+CONSTS(7), CONSTS(9)+CONSTS(10), TERNRY(VOI.LT.CONSTS(6)+CONSTS(8)+CONSTS(7).AND.VOI.GE.CONSTS(6)+CONSTS(7), CONSTS(10)+ - CONSTS(23)*(((VOI - CONSTS(6)) - CONSTS(8)) - CONSTS(7)), CONSTS(10)) ALGBRC(2) = STATES(1)+ALGBRC(1) ALGBRC(8) = CONSTS(20)*CONSTS(21)*log( CONSTS(14)*ALGBRC(2)) ALGBRC(16) = CONSTS(13)*EXP((ALGBRC(9)+ALGBRC(8))/( CONSTS(20)*CONSTS(21))) - EXP(ALGBRC(11)/( CONSTS(20)*CONSTS(21))) RATES(1) = - ALGBRC(16) RATES(2) = - ALGBRC(14) - ALGBRC(16) RATES(4) = - ALGBRC(15)+ALGBRC(16) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(3) = STATES(2)+CONSTS(1) ALGBRC(9) = CONSTS(20)*CONSTS(21)*log( CONSTS(15)*ALGBRC(3)) ALGBRC(4) = STATES(3)+CONSTS(2) ALGBRC(10) = CONSTS(20)*CONSTS(21)*log( CONSTS(16)*ALGBRC(4)) ALGBRC(6) = STATES(5)+CONSTS(4) ALGBRC(12) = CONSTS(20)*CONSTS(21)*log( CONSTS(18)*ALGBRC(6)) ALGBRC(14) = CONSTS(11)*EXP((ALGBRC(9)+ALGBRC(10))/( CONSTS(20)*CONSTS(21))) - EXP(ALGBRC(12)/( CONSTS(20)*CONSTS(21))) ALGBRC(5) = STATES(4)+CONSTS(3) ALGBRC(11) = CONSTS(20)*CONSTS(21)*log( CONSTS(17)*ALGBRC(5)) ALGBRC(7) = STATES(6)+CONSTS(5) ALGBRC(13) = CONSTS(20)*CONSTS(21)*log( CONSTS(19)*ALGBRC(7)) ALGBRC(15) = CONSTS(12)*EXP((ALGBRC(11)+ALGBRC(10))/( CONSTS(20)*CONSTS(21))) - EXP(ALGBRC(13)/( CONSTS(20)*CONSTS(21))) ALGBRC(1) = TERNRY(VOI.LT.CONSTS(6).AND.VOI.GT.CONSTS(6) - CONSTS(8), CONSTS(10)+ CONSTS(23)*((VOI - CONSTS(6))+CONSTS(8)), TERNRY(VOI.GE.CONSTS(6).AND.VOI.LT.CONSTS(6)+CONSTS(7), CONSTS(9)+CONSTS(10), TERNRY(VOI.LT.CONSTS(6)+CONSTS(8)+CONSTS(7).AND.VOI.GE.CONSTS(6)+CONSTS(7), CONSTS(10)+ - CONSTS(23)*(((VOI - CONSTS(6)) - CONSTS(8)) - CONSTS(7)), CONSTS(10)) ALGBRC(2) = STATES(1)+ALGBRC(1) ALGBRC(8) = CONSTS(20)*CONSTS(21)*log( CONSTS(14)*ALGBRC(2)) ALGBRC(16) = CONSTS(13)*EXP((ALGBRC(9)+ALGBRC(8))/( CONSTS(20)*CONSTS(21))) - EXP(ALGBRC(11)/( CONSTS(20)*CONSTS(21))) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END