Repository navigation
Modelseed thermo - #63
Open
freiburgermsu wants to merge 3 commits into
Open
freiburgermsu wants to merge 3 commits into
freiburgermsu wants to merge 3 commits into
Conversation
symbol_sum built sympy expressions, but optlang uses symengine when it is installed, so deepcopy of a model (copy(), relax_dgo) and JSON export failed. It now uses optlang.symbolics.add. Also: obj_to_dict read the objective's constant term as if it were a variable coefficient; relax_dgo concatenated a model name of None; and print_info read cobra's removed description attribute. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
pytfa.thermo.modelseed reads a local ModelSEEDDatabase clone and returns a thermo_data dict, so ModelSEED models can be converted without the bundled Alberty database. modelseedpy, if installed, only locates the database: its biochemistry loader drops the per-source thermodynamics and pkas fields that this needs. The energies are the group contribution estimates, which are in the convention pytfa's pH transform expects, unlike the eQuilibrator and dGPredictor values, which are already transformed. Each is paired with the protonation state the model uses, shifted along the compound's (acidic) pKas so that its transformed energy is unchanged; using the group contribution species directly made prepare() add protons to 376 reactions of a ModelSEED E. coli model. The database has no structural cues, so two changes were needed in the core: reaction errors combine the compound errors in quadrature, and multi-compartment reactions are balanced with the c0 proton in ModelSEED models. Building from the bundled database is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A community model has one cytosol per member, 'c1', 'c2', ..., and no 'c' or 'c0' to balance a transport reaction with. prepare() now leaves the transport compartment unset for such a model, and each reaction is assigned the one compartment left once the extracellular ones are set aside: its own member's cytosol. Its protons are then that member's, and its membrane potential and pH are read from that member's compartment. Models with a single cytosol are unaffected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.