Chemical Thermodynamics of Materials