calculate elemental analysis data for chemistry