I am currently working on a project (turns out: a bigger project, than originally thought...) with all hypothetically "thinkable" products for a reaction with two given educts. These educts are Entity["Chemical", "AmmoniumPerchlorate"]
and Entity["Chemical", "Aluminum"]
. Yes, these are the main ingredients of a common solid rocket composite propellant, used in the Space Shuttle booster, for instance.
I gathered all compounds with Al, Cl, H, N, O as involved elements, together with Cl, H, N and O, I have 35 products in total. In a first approach, I restrict myself for a product combination of up to five products, yielding in 384,132 subsets. Further plausibility checks gave approx. 168,000 of such hypothetical reactions.
While I tried some preliminary tests (balancing with the built-in ReactionBalance
as well as some basic linear algebra and Nullspace
computations on the composition matrix) I saw, Mathematica is unable to declare specific reactions in the first place. Consider the (hypothetical, more precisely: impossible, due to "unbalanceability") reaction:
ChemicalReaction[<|Entity["Chemical", "AmmoniumPerchlorate"] -> 1, Entity["Chemical", "Aluminum"] -> 1|> -> <|Entity["Chemical", "AluminumChloride"] -> 1, Entity["Chemical", "AluminumNitrate"] -> 1, Entity["Chemical", "Diazine"] -> 1|>]
The output:
My first suspect was, Entity["Chemical", "Diazine"]
has no Hill formula or Hill formula string, but it has. However: EntityProperty["Chemical", "Formula"] -> Missing["NotAvailable"]
and EntityProperty["Chemical", "FormulaString"] -> Missing["NotAvailable"]
(part of a PropertyAssociation
request). So, I had to add this entity value manually, which sounds easier than it is:
Entity["Chemical", "Diazine"][EntityProperty["Chemical", "Formula"]] = "N2H2"
does not work:
And even if there's a workaround for adding own content to built-in entities, my concern is, that ReactionBalance
would fail in any case, due to possible side effects.
How can I use ReactionBalance
on chemicals which do not have "Formula"
in their corresponding Entity
?
(Side note to Jason B.: fantastic work in the chemistry department! Brilliant, and a big step for mathematical chemistry with Mathematica. Makes me feel small...)