Open blakeaw opened 1 week ago
This is partially addressed by PR https://github.com/Borealis-BioModeling/pysb-units/pull/4, which adds the new SimulationUnits
class and the set_molecule_volume
function that can be used to enforce automatic conversion of parameters with molar concentrations to molecular counts as part of the model definition.
However, the functionality of something like a Model.to_molecules
function has yet to be fully implemented. This is a bit more difficult since the units for expressions that include a concentration must be reconstructed after applying the appropriate conversion to parameters and observables.
Suggested by James Pino:
Something like a units.Model.to_molecules(vol=...) converter that can take a model in concentration units and quickly yield its molecular counts. This would be useful for stochastic simulations.