Molar-mass is an utility that calculates molar mass (aka molecular mass or molecular weight) of a given molecule.
After installing the package (or copying it to your load-path), add this to your init file:
(require 'molar-mass)
It works interactively (entering your formula at the minibuffer) and also with region.
M-x molar-mass
goes to the minibuffer. Enter formula (Ex. KMnO4):
It returns:
It also accepts parentheses at the formula. By example:
Fe(OH)2
“Molar mass of Fe(OH)2 : 89.860 g/mol (uma)”
You can use it with region. Select a region with your formula and call
M-x molar-mass
:
It returns: