cobrapy_model
Cobrapy Model method overrides and enhancements.
This module patches cobra Model methods to: - Add performance-optimised add_reactions_slim() that skips solver updates - Provide populate_solver_from_model() to retroactively populate solver
(critical for models created without initial solver)
Ensure models work with any solver, not just the initial one
Key enhancements: - add_reactions_slim: Skip solver population during bulk add (performance) - populate_solver_from_model: Populate solver for reactions not yet in solver - Works with any cobra-compatible solver (Gurobi, CPLEX, GLPK, etc.)
Use case: When creating large models for performance (no solver initially), use populate_solver_from_model() before optimisation to ensure solver is ready.
Author: Jelle Bonthuis (MaCSBio)
Functions
|
Generated: validation needed |
Generated: validation needed |