Thermodynamics and the free energy of chemical substances