Heat of formation calculation