smenjas / chemistry-explorer

A chemistry app built with vanilla JavaScript
https://smenjas.github.io/chemistry-explorer/
ISC License
1 stars 2 forks source link

Convert condensed formulas to molecular formulas #37

Closed smenjas closed 1 year ago

smenjas commented 1 year ago

Provide a function/method to automatically convert a condensed chemical formula, like Mg(OH)2, to a molecular formula, like MgH2O2 for example.

smenjas commented 1 year ago

I did this manually in 5a992920a90b1fc10c3de43d5034f85fe65c90d4, but I still want an automated algorithm.