python script to calculate masses for a chemical reaction by their equivalents relative to a base molecule