THIS IS ONLY A HOBBY PROJECT. I CANNOT GUARANTEE THE EFFECTIVENESS OF CODE.
This Lua script can calculate the molecular mass by just typing in chemical formula. Here are some examples:
- CuSO4·5H2O ==> CuSO4(H2O)5
- Fe2(SO4)3 ==> Fe2(SO4)3
- KAl(SO4)2·12H2O ==> KAl(SO4)2(H2O)12
For more information, please visit my blog:
You can either use the file in release section, or just add a script manully, using the code on github.
As I have not learnt the compiler so far, the code might be nasty. Anyway, it works.
Also, this script supports at most three levels of brackets.