10.1.6.1.4. freeflux.utils.utils¶
Define the Calculator class.
10.1.6.1.4.1. Attributes¶
10.1.6.1.4.2. Classes¶
10.1.6.1.4.3. Module Contents¶
- class freeflux.utils.utils.Calculator(model)[source]¶
- Parameters:
model (Model) – Freeflux Model.
- _calculate_substrate_MDV_derivatives_p(kind, extra_subs=None)[source]¶
- Parameters:
kind ({"ss", "inst"}) –
“ss” if isotopic steady state.
”inst” if isotopically nonstationary state.
extra_subs (list or None)
- _calculate_measured_fluxes_derivative_p(kind)[source]¶
- Parameters:
kind ({"ss", "inst"}) –
“ss” if isotopic steady state.
”inst” if isotopically nonstationary state.
- static _calculate_matrix_A_and_B_derivatives_v(EAM, fluxids)[source]¶
- Parameters:
EAMstr (df) – EMU adjacency matrix of some size.
fluxids (list) – Total fluxes IDs.
- Returns:
matrix_A_der, matrix_B_der – Derivatives of A(B) w.r.t. total fluxes in shape of (len(total fluxes), A(B).shape[0], A(B).shape[1]).
- Return type:
3-D array
- _calculate_matrix_As_and_Bs_derivatives_u(n_jobs)[source]¶
- Parameters:
n_jobs (int) – # of jobs to run in parallel.
- Returns:
matrix_A_der (3-D array) – Derivatives of A(B) w.r.t. free fluxes in shape of (len(free fluxes), A(B).shape[0], A(B).shape[1]).
matrix_B_der (3-D array) – Derivatives of A(B) w.r.t. free fluxes in shape of (len(free fluxes), A(B).shape[0], A(B).shape[1]).
- _calculate_matrix_As_and_Bs_derivatives_c()[source]¶
- Returns:
matrix_A_der (3-D array) – Derivatives of A(B) w.r.t. total fluxes in shape of (len(concs), A(B).shape[0], A(B).shape[1]).
matrix_B_der (3-D array) – Derivatives of A(B) w.r.t. total fluxes in shape of (len(concs), A(B).shape[0], A(B).shape[1]).
- _calculate_matrix_As_and_Bs_derivatives_p(kind, n_jobs)[source]¶
- Parameters:
kind ({"ss", "inst"}) –
“ss” if isotopic steady state.
”inst” if isotopically nonstationary state.
n_jobs (int) – # of jobs to run in parallel.
- _calculate_MDVs()[source]¶
This method simulate MDVs at isotopically steady state.
- Returns:
simMDVs – EMU ID => MDV (in array).
- Return type:
- _calculate_MDVs_and_derivatives_p()[source]¶
This method simulate MDVs and their derivatives at isotopically steady state.
- Returns:
simMDVs (dict) – EMU ID => MDV (in array).
simMDVsDer (dict) – EMU ID => 2-D array in shape of (len(MDV), len(u)).
- _calculate_inst_MDVs()[source]¶
This method simulate MDVs at isotopically nonstationary state.
- Returns:
simInstMDVs – EMU ID => {t => MDV (in array)} (starting from t1).
- Return type:
- _calculate_inst_MDVs_and_derivatives_p()[source]¶
This method simulate MDVs and their derivatives at isotopically nonstationary state.
- Returns:
simInstMDVs (dict) – EMU ID => {t => MDV (in array)} (starting from t1).
simInstMDVsDer (dict) – EMU ID => {t => 2-D array in shape of (len(MDV), len(u)+len(c))} (starting from t1).