# Rice et al. (2008) cardiac myofilament model, as crossbridge.Rice2008 implements it # (Rice, Wang, Bers, de Tombe, Biophys J 95:2368-2390, # https://doi.org/10.1529/biophysj.107.119487). Loaded through Rice2008.ODE_FILE; # tests/test_ode_files.py pins it to the class. # # Units: s, uM, um; Ta, Tp and Ka are the paper's normalized forces times Ta_max (Ka per unit # Lambda = SL / SL0). Crossbridge strain is measured in sarcomere length and advances with dSL. # # The contract: the component `inputs` holds Ca, SL and dSL. Standalone they are # parameters, set before each step (zero-order hold, like advance_step). Subtracting # the component turns them into missing variables, the seam to an EP or tissue model. # The outputs are the intermediates Ta, Ka, bound_ca and Tp. # # Where the paper and the CellML disagree: kn_p = 500, kp_n = 50 /s (CellML), SLrest = 1.9 um # (paper), TmpC = 22.5 degC (paper's Table 3); see the class docstring. Written without a # division by a state, which gotranx's singularity removal could rewrite (CLAUDE.md): Tropreg # enters Eq. 10 as Tropreg^n / (Tropreg^n + perm50^n), and the strain coefficients of Eqs. # 29-30 are written with the duty fractions multiplied out. parameters("inputs", Ca = ScalarParam(0.09, unit="uM", description="cytosolic calcium"), SL = ScalarParam(1.9, unit="um", description="sarcomere length"), dSL = ScalarParam(0.0, unit="um/s", description="sarcomere length rate") ) parameters("conditions", SL0 = ScalarParam(1.9, unit="um"), TmpC = ScalarParam(22.5, unit="degC"), Ta_max = 1.0 ) parameters("geometry", len_thick = ScalarParam(1.65, unit="um"), len_hbare = ScalarParam(0.1, unit="um"), len_thin = ScalarParam(1.2, unit="um") ) parameters("troponin", kon = ScalarParam(50.0, unit="1/(uM*s)"), koffL = ScalarParam(250.0, unit="1/s"), koffH = ScalarParam(25.0, unit="1/s"), koffmod = 1.0, perm50 = 0.5, nperm = 15.0, kn_p = ScalarParam(500.0, unit="1/s"), kp_n = ScalarParam(50.0, unit="1/s"), Qkon = 1.5, Qkoff = 1.3, Qkn_p = 1.6, Qkp_n = 1.6 ) parameters("crossbridges", fapp = ScalarParam(500.0, unit="1/s"), gapp = ScalarParam(70.0, unit="1/s"), gslmod = 6.0, hf = ScalarParam(2000.0, unit="1/s"), hfmdc = 5.0, hb = ScalarParam(400.0, unit="1/s"), gxb = ScalarParam(70.0, unit="1/s"), sigmap = 8.0, sigman = 1.0, xbmodsp = 1.0, Qfapp = 6.25, Qgapp = 2.5, Qhf = 6.25, Qhb = 6.25, Qgxb = 6.25, x_0 = ScalarParam(0.007, unit="um"), xPsi = 2.0 ) parameters("passive", SLrest = ScalarParam(1.9, unit="um"), PCon_t = 0.002, PExp_t = ScalarParam(10.0, unit="1/um"), SL_c = ScalarParam(2.25, unit="um"), PCon_c = 0.02, PExp_c = ScalarParam(70.0, unit="1/um") ) # Troponin starts at its force-free steady state for Ca0 = 0.09 uM at 22.5 degC: # kon_T Ca0 / (kon_T Ca0 + koff_T), kon_T = kon Qkon^-1.45, koff_T = koff koffmod Qkoff^-1.45 # (koffH for TRPNCaH, koffL for TRPNCaL). states("troponin", TRPNCaH = 0.12760590132414704, TRPNCaL = 0.014416226105738636) states("regulatory_units", N_NoXB = 1.0, P_NoXB = 0.0, N = 1.0) states("crossbridges", XBprer = 0.0, XBpostr = 0.0) # xXBpostr starts at the powerstroke x_0 (its default). states("strain", xXBprer = 0.0, xXBpostr = 0.007) expressions("overlap") sovr_ze = Min(len_thick / 2.0, SL / 2.0) sovr_cle = Max(len_thin - SL / 2.0, len_hbare / 2.0) L_ov = Max(sovr_ze - sovr_cle, 0.0) SOVFthick = 2.0 * L_ov / (len_thick - len_hbare) SOVFthin = L_ov / len_thin expressions("rates") konT = kon * Qkon ** ((TmpC - 37.0) / 10.0) koffHT = koffH * koffmod * Qkoff ** ((TmpC - 37.0) / 10.0) koffLT = koffL * koffmod * Qkoff ** ((TmpC - 37.0) / 10.0) kn_pbase = kn_p * Qkn_p ** ((TmpC - 37.0) / 10.0) kp_nbase = kp_n * Qkp_n ** ((TmpC - 37.0) / 10.0) fappT = fapp * xbmodsp * Qfapp ** ((TmpC - 37.0) / 10.0) gapp_base = gapp * xbmodsp * Qgapp ** ((TmpC - 37.0) / 10.0) hf_base = hf * xbmodsp * Qhf ** ((TmpC - 37.0) / 10.0) hbT = hb * xbmodsp * Qhb ** ((TmpC - 37.0) / 10.0) gxb_base = gxb * xbmodsp * Qgxb ** ((TmpC - 37.0) / 10.0) expressions("troponin") Ca_safe = Max(Ca, 0.0) dTRPNCaH_dt = konT * Ca_safe * (1.0 - TRPNCaH) - koffHT * TRPNCaH dTRPNCaL_dt = konT * Ca_safe * (1.0 - TRPNCaL) - koffLT * TRPNCaL Tropreg = (1.0 - SOVFthin) * TRPNCaL + SOVFthin * TRPNCaH expressions("regulatory_units") Tropreg_n = Max(Tropreg, 0.0) ** nperm permtot = sqrt(Tropreg_n / (Tropreg_n + perm50 ** nperm)) kn_pT = kn_pbase * permtot kp_nT = kp_nbase / Max(permtot, 0.01) P = 1.0 - N - XBprer - XBpostr dN_NoXB_dt = -kn_pT * N_NoXB + kp_nT * P_NoXB dP_NoXB_dt = kn_pT * N_NoXB - kp_nT * P_NoXB dN_dt = -kn_pT * N + kp_nT * P expressions("crossbridge_rates") # The exponent arguments are capped at 20 (Rice2008._EXP_ARG_MAX), so that the class's # expm_batch does not overscale the slow blocks of its system; the cap binds only in fast # lengthening, where it changes the outputs by at most 1.1e-8 of their peaks (class docstring). gappT = gapp_base * (1.0 + (1.0 - SOVFthick) * gslmod) hfT = hf_base * exp(Min(-hfmdc * xXBprer * Abs(xXBprer) / (x_0 * x_0), 20.0)) sigma = Conditional(Lt(xXBpostr, x_0), sigmap, sigman) gxbT = gxb_base * exp(Min(sigma * ((xXBpostr - x_0) / x_0) ** 2, 20.0)) D = fappT * gxbT + gappT * hbT + fappT * hbT + gappT * gxbT + fappT * hfT + gxbT * hfT expressions("crossbridges") dXBprer_dt = fappT * P - (gappT + hfT) * XBprer + hbT * XBpostr dXBpostr_dt = hfT * XBprer - (hbT + gxbT) * XBpostr expressions("strain") # Eqs. 29-30 with the duty fractions of Eqs. 31-32 multiplied out: # xPsi / dutyprer = xPsi D / (fappT (hbT + gxbT)) and xPsi hfT / dutypostr = xPsi D / fappT. a_prer = xPsi * D / (fappT * (hbT + gxbT)) a_postr = xPsi * D / fappT dxXBprer_dt = 0.5 * dSL + a_prer * (-fappT * xXBprer + hbT * (xXBpostr - x_0 - xXBprer)) dxXBpostr_dt = 0.5 * dSL + a_postr * (xXBprer + x_0 - xXBpostr) expressions("force") # The post-rotated occupancy at the base rates (Eqs. 33-34). D0 = fapp * gxb + gapp * hb + fapp * hb + gapp * gxb + fapp * hf + gxb * hf XBprer_max = (fapp * hb + fapp * gxb) / D0 XBpostr_max = fapp * hf / D0 Ta = Ta_max * SOVFthick * (XBprer * xXBprer + XBpostr * xXBpostr) / (x_0 * XBpostr_max) Ka = Ta_max * SL0 * SOVFthick * (XBprer + XBpostr) / (2.0 * x_0 * XBpostr_max) FrSBXB = (XBprer + XBpostr) / (XBprer_max + XBpostr_max) bound_ca = (1.0 - SOVFthin) * TRPNCaL + SOVFthin * (FrSBXB * TRPNCaH + (1.0 - FrSBXB) * TRPNCaL) expressions("passive") titin = Conditional(Ge(SL, SLrest), PCon_t * (exp(PExp_t * (SL - SLrest)) - 1.0), -PCon_t * (exp(PExp_t * (SLrest - SL)) - 1.0)) collagen = Conditional(Gt(SL, SL_c), PCon_c * (exp(PExp_c * (SL - SL_c)) - 1.0), 0.0) Tp = Ta_max * (titin + collagen)