C C There are a total of 9 entries in the algebraic variable array. C There are a total of 3 entries in each of the rate and state variable arrays. C There are a total of 8 entries in the constant variable array. C C C VOI is time in component model (minute). C STATES(1) is NFATP_cyt in component model (molecule). C STATES(2) is NFAT_cyt in component model (molecule). C STATES(3) is NFAT_nuc in component model (molecule). C ALGBRC(1) is NFAT_tot in component model (molecule). C CONSTS(1) is k1_unstim in component model (per_minute). C CONSTS(2) is k1_stim in component model (per_minute). C ALGBRC(3) is k1 in component model (per_minute). C CONSTS(3) is k2 in component model (per_minute). C CONSTS(4) is k3 in component model (per_minute). C CONSTS(5) is k4 in component model (per_minute). C CONSTS(6) is stim_wavelength in component model (minute). C CONSTS(7) is stim_duration in component model (minute). C ALGBRC(2) is stim_on in component model (dimensionless). C CONSTS(8) is time_before_stim in component model (minute). C ALGBRC(7) is Jdephosphorylation in component model (molecules_per_minute). C ALGBRC(8) is Jtranslocate in component model (molecules_per_minute). C ALGBRC(9) is Jexport in component model (molecules_per_minute). C ALGBRC(4) is percentage_NFAT_cyt in component model (dimensionless). C ALGBRC(5) is percentage_NFATP_cyt in component model (dimensionless). C ALGBRC(6) is percentage_NFAT_nuc in component model (dimensionless). C RATES(1) is d/dt NFATP_cyt in component model (molecule). C RATES(2) is d/dt NFAT_cyt in component model (molecule). C RATES(3) is d/dt NFAT_nuc in component model (molecule). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 5000 STATES(2) = 0 STATES(3) = 0 CONSTS(1) = 0 CONSTS(2) = 0.359 CONSTS(3) = 0.147 CONSTS(4) = 0.06 CONSTS(5) = 0.035 CONSTS(6) = 3 CONSTS(7) = 0.5 CONSTS(8) = 1 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(2) = TERNRY(VOI.GE.CONSTS(8).AND. INT(MOD(VOI - CONSTS(8), CONSTS(6))).LE.CONSTS(7), 1.00000, 0.00000) ALGBRC(3) = TERNRY(ALGBRC(2).EQ.1.00000, CONSTS(2), CONSTS(1)) ALGBRC(7) = ALGBRC(3)*STATES(1) - CONSTS(3)*STATES(2) ALGBRC(8) = CONSTS(4)*STATES(2) RATES(2) = ALGBRC(7) - ALGBRC(8) ALGBRC(9) = CONSTS(5)*STATES(3) RATES(1) = ALGBRC(9) - ALGBRC(7) RATES(3) = ALGBRC(8) - ALGBRC(9) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(2) = TERNRY(VOI.GE.CONSTS(8).AND. INT(MOD(VOI - CONSTS(8), CONSTS(6))).LE.CONSTS(7), 1.00000, 0.00000) ALGBRC(3) = TERNRY(ALGBRC(2).EQ.1.00000, CONSTS(2), CONSTS(1)) ALGBRC(7) = ALGBRC(3)*STATES(1) - CONSTS(3)*STATES(2) ALGBRC(8) = CONSTS(4)*STATES(2) ALGBRC(9) = CONSTS(5)*STATES(3) ALGBRC(1) = STATES(1)+STATES(2)+STATES(3) ALGBRC(4) = ( STATES(2)*100.000)/ALGBRC(1) ALGBRC(5) = ( STATES(1)*100.000)/ALGBRC(1) ALGBRC(6) = ( STATES(3)*100.000)/ALGBRC(1) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END