Catalyst.jl icon indicating copy to clipboard operation
Catalyst.jl copied to clipboard

Check for balance of equations

Open freemin7 opened this issue 4 years ago • 2 comments

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.

freemin7 avatar Jan 29 '21 12:01 freemin7

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?

TorkelE avatar Jan 29 '21 14:01 TorkelE

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

yewalenikhil65 avatar Jan 29 '21 15:01 yewalenikhil65

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.

isaacsas avatar Sep 02 '23 01:09 isaacsas