Copyright (c) 2010-2021 Ing. Hubert HANGHOFER, Licensed under the GPL (see sources)
This is the lua version of https://github.com/brewbert/wxMol as used as lua-module on https://molcalc.com
Sources are available from the repositories at
MolCalc is a stoichiometric parser. It translates chemical element symbols to their corresponding atomic weights and enables simple arithmetic calculations. For example, to calculate the percentage of Aluminium in Aluminiumsulfate-Hexadecahydrate, you could enter:
Al2/(Al2(SO4)3+16H2O)%
The converted input is returned along with the result, so that you can check if the calculation was done according to your expectations. MolCalc checks for bracketing (parenthesis) and symbol errors but doesn't detect, if a chemical formula is valid or your computations make sense.
molcalc.lua is a module containing the parser function as used on https://molcalc.com in a WSAPI-fastcgi environment.
If you need a version for your desktop, you could try the python code or download the packages or windows binaries derived thereof from: http://hanghofer.net/~hubert/python/