mass.thermo.conc_sampling
This module contains the Hit-and-Run concentration samplers.
Key components in the thermo.conc_sampling module are the following:
The
sample_concentrations()function, a function to call one of the concentration sampler methods and valid concentration distributions from the :associatedmassmodel of theConcSolver. Currently provides two sampling methods:
'optgp'to utilize theConcOptGPSampler
'achr'to utilize theConcACHRSamplerThe
ConcOptGPSampleris parallel optimized sampler with fast convergence and parallel execution based on [MHM14], with its implementation similar to the Pythoncobrapackage. See theconc_optgpdocumentation for more information.The
ConcACHRSampleris a sampler that utilizes an Artifial Centering Hit-and-Run (ACHR) sampler for a low memory footprint and good convergence based on [KS98], with its implementation similar to the Pythoncobrapackage. See theconc_achrdocumentation for more information.The
ConcHRSampleris the base class for the samplers. All current samplers are derived from this class and all new samplers should be derived from this class to provide a unified interface for concentration sampling. See theconc_hr_samplerdocumentation for more information.
To properly use the concentration samplers and associated functions, note the following:
It is required that a model has been loaded into a
ConcSolverinstance and that the solver has been setup for concentraiton sampling via theConcSolver.setup_sampling_problem()method.All numerical values to be utilized by the solver must be defined. This includes:
Metabolite concentrations for all included metabolites, accessed via
MassMetabolite.initial_condition.Reaction equilibrium constants for all included reactions, accessed via
MassReaction.equilibrium_constant.Reaction steady state fluxes for all included reactions, accessed
MassReaction.steady_state_flux.In order to perform the sampling, all numerical values are transformed from linear space into logarithmic space before the solver is populated. Therefore, all variables and constraints in the solver will exist in logspace.
However, all numerical solution values are transformed from logspace back into a linear space before being returned, unless otherwise specified.