Source code for pta.constants

"""Constants used in tha PTA package.
"""

import math

from .commons import Q
from .distributions import LogNormalDistribution

# Physical and mathematical constants.
[docs]R = Q(8.31446261815324e-3, "kJ / mol / K")
"""The gas constant."""
[docs]F = Q(96.48533212, "kC / mol")
"""The Faraday constant."""
[docs]LOG10 = math.log(10)
"""The natural logarithm of 10.""" # Default parameters.
[docs]default_I = Q(0.2, "M")
"""Default ionic strength of a compartment."""
[docs]default_pH = Q(7.0)
"""Default pH of a compartment."""
[docs]default_pMg = Q(3)
"""Default pMg of a compartment."""
[docs]default_phi = Q(0, "V")
"""Default electrostatic potential of a compartment."""
[docs]default_T = Q(298.15, "K")
"""Default temperature of the system."""
[docs]default_rmse = Q(3000, "kJ/mol")
"""Default uncertainty to use for unknown compounds and chemical groups."""
[docs]default_min_eigenvalue_tds_basis = 1e-3
"""Default minimum eigenvalue for vector of the basis of the thermodynamic space."""
[docs]default_log_conc = LogNormalDistribution(-8.3371, 1.9885)
"""Default distribution of metabolite concentrations."""
[docs]default_flux_bound = 1000
"""Default magnitude of lower/upper bounds of fluxes.""" # PMO and TFS
[docs]default_confidence_level = 0.95
"""Default confidence level for PMO problems and TFS"""
[docs]default_min_drg = 0.1
"""Default minimum DrG magnitude for PMO problems and TFS"""
[docs]default_max_drg = 1000
"""Default maximum DrG magnitude for PMO problems and TFS""" # Thermodynamic assessment.
[docs]non_intracellular_compartment_ids = ["e", "p"]
"""Identifiers of non-intracellular compartments."""
[docs]default_theta_z = 1.0
"""Default threshold on the z-score to consider a predicted value an anomaly."""
[docs]default_theta_s = 0.1
"""Default threshold on the shadow price to consider a reaction a strong thermodynamic constrain."""
[docs]default_max_non_intracellular_conc_mM = 10
"""Default threshold on the concentration to consider a predicted concentration an anomaly.""" # Sampling.
[docs]default_min_chains = 4
"""Minimum number of chains to use by default. """
[docs]default_num_samples = 1000
"""Default number of samples to store. """
[docs]us_steps_multiplier = 64
"""Coefficient for the number of steps sampling a flux space. """
[docs]tfs_steps_multiplier = 100
"""Coefficient for the number of steps sampling a thermodynamic space. """
[docs]tfs_default_feasibility_cache_size = 10000
"""Size of the cache storing whether encountered orthants are feasible or not. """
[docs]tfs_default_min_rel_region_length = 1e-6
"""Minimum relative size for an orthant to be considered during Hit-and-Run. """
[docs]default_max_psrf = 1.1
"""Default treshold on the Potential Scale Reduction Factors (PSRFs). """
[docs]default_max_threads = 2 ** 10
[docs]min_samples_per_chain = 100
"""Minimum number of samples that must be drawn from each chain in order to obtain a meaningful PSRF score."""