PyOMES: an open Python toolkit to make biochemical process modelling easier
This paper introduces PyOMES, an open-source Python package for simulating biochemical and chemical processes. The goal is to make it easier to build models that describe how chemical and biological systems change over time, including steady-state situations. The authors present the software design, show example uses, and compare its results to existing benchmark software to check that it behaves sensibly.
The team built PyOMES as an installable Python package with an object-oriented structure. Key objects include Simulation, ControlVolume, Phase, Species, and Reaction. The ControlVolume idea breaks a system into physical compartments. The Phase object holds thermodynamic state. Species describe the chemicals or biological components. Reaction objects describe both chemical reactions and mass-exchange events. The package also includes shortcut functions for common rate laws, thermodynamic data, and solver options so that users with different backgrounds can get started faster.
A central design choice is modularity. PyOMES separates conceptual parts of a model (for example chemistry versus transport) and spatial parts (different compartments). It uses a Protocol-based approach so default behaviors can be swapped for custom code. Thermodynamic assumptions are handled by a dedicated ThermoFramework object that can be changed across a model. Mass transport is decomposed along three axes — physiochemical (chemical change versus physical movement), spatial (within a compartment versus between compartments), and temporal (fast, treated as instantaneous, versus slow, treated with time-dependent equations).
The software also separates solvers into two levels. A StepSolver handles the time integration of physics inside a single ControlVolume. A SystemSolver handles the coupling between multiple ControlVolumes and can manage more complex problems such as differential-algebraic equations that arise when fast equilibria and slow kinetics coexist. The authors note PyOMES can use standard numerical tools such as SciPy for parts of this work.