Principles of chemical thermodynamics