Add emacutils as a dependency?
Some functions of the emacutils package may be useful here (e.g. get_molarmass, area_weighted_sum).
Adding a dependency would allow to directly import them, but requires the local installation of the package or the usage of the pa-emac environment maintained by @b309219.