Catalyst.jl
Catalyst.jl copied to clipboard
Check for balance of equations
Chemical compounds have a variety of attributes that are conserved in reactions, those might be:
- number atoms/electrons
- energy (Enthalpy + Entropy)
- mass
It might be worth getting expert input on the usefulness of checking that systems are balanced. For my obscure use case (explore the universe of hypothetical reaction networks which don't violate thermodynamics) it would be good if the network returns an autodiffable degree of violation. This might be useful for other optimization tasks but i'm not a domain expert.
Please also not that insisting on equalities might make using Catalyst more bothersome as energy is gained or lost during many reactions.
I have to admit I'm not fully sure exactly what you request, but then I'm not a chemist, which seems what this mainly targets?
I think question seems similar to finding conservation of species if any in the reactionSystem, and spitting out the conservation relationship among species. My simple attempt here.. https://github.com/SciML/Catalyst.jl/issues/280#issuecomment-804021518
As of 13.4 we've added basic reaction balancing (in terms of number of atoms). We can open new issues should further versions be needed / desired with more details on what should be calculated.