All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Optional
volume
keyword argumnet to thecore.SimulationUnits
object that allows spcefication of the volume unit to use for autoconversions. This included some additional logic in theSimulationUnits.__init__
and theSimulationUnits.convert_units
functions, as well as an update to theSimulationUnits.__repr__
to account for the volume units. Feature addition for Issue #7
- Potential issue with installation of subpackages/modules inside
pysb.units
, which included updated theinclude
option in the pyproject.toml file. - Issue in the
core.Expression._compose_units
function where it was causing an error if the result of plugging in units gave aunit_string
that was a unitless ratio (e.g., '1/2').
- New units context manager function
core.units
that allows users to load unit-based functionality and then run checks using contextfrom pysb.units import units; with units():
. The context manager applies theunitize
andcheck
functions automatically so users don't need to do it manually. - Optional
unit
argument forParameter
that allows unit specification when initializing a new model parameter:Parameter(...,..., unit="...")
which is equivalent toUnit(Parameter(..,..) "unit"))
. - New
examples
sub-package with:- unit-ed version of
bngwiki_simple
model - adpated frompysb.examples.bngwiki_simple
. - unit-ed version of the
jnk3_no_ask1
model - adpated from theJARM/model_analysis/jnk3_no_ask1.py
model.
- unit-ed version of
- Problem converting composite units with molar concentrations to their equivalent with number of molecules and updating the associated parameter. Updated the
ParameterUnit.convert
function to account for this. - Problem in the string repr for Parameters with units set to
None
, as well as the processing in ParameterUnit that now skips the conversion related toSimulationUnits
settings when the input unit isNone
.
core.SimulationUnits
class that allows users to define global model units for concentration and time with auto conversion of parameters defined with relevant units. This included some additional logic in theParameterUnit.__init__
to check for an instance ofSimulationUnits
in the model and convert the units automatically as needed. Also a check in theunits.Observable
that auto assigns a unit based onSimulationUnits
.convert
function toParameterUnit
.core.molar_to_molecules
function that can convert a unit with a molar concentration to one with the number of molecules.core.Unit
can acceptNone
as an input in place of a unit string to explicity specify a unitless (i.e., dimensionless) quantity.core.Expression.compose_units
function.- Custom equivalency in
unitdefs
for M to molecules with the__init__.set_molecule_volume
andunitdefs.set_molecule_volume
functions to allow the container volume used in the conversion to be updated by users. Thecore.SimulationUnits
class can now handle auto conversions from molar concentrations to number of molecules for stochastic simulations.
- Updated the Documentation and Usage section of the README to streamline it a bit and add in the new
SimulationUnits
object.
- Error related to the definition of the cellular reaction rate physical type in
unitdefs
. - Bug in a unit comparison in
core.check
when comparing units of the same physical type.
- Initial development version of the package.
N/A