taking the Legendre transform of this expression, he defined the concepts of enthalpy, H and Gibbs free energy, G. This compares to the expression for Helmholtz free energy, A. When the Gibbs free energy for a chemical reaction is negative the reaction will proceed spontaneously. When a chemical system is at equilibrium, the change in Gibbs free energy is zero. An equilibrium constant is simply related to the free energy change when the reactants are in their standard states. Chemical potential is usually defined as partial molar Gibbs free energy. Gibbs also obtained what later came to be known as the "Gibbs–Duhem equation". In an electrochemical reaction characterized by an electromotive force ℰ and an amount of transferred charge Q, Gibbs's starting equation becomes . The publication of the paper "On the Equilibrium of Heterogeneous Substances" (1874–78) is now regarded as a landmark in the development of chemistry. In it, Gibbs developed a rigorous mathematical theory for various transport phenomena, including adsorption, electrochemistry, and the Marangoni effect in fluid mixtures. He also formulated the phase rule for the number F of variables that may be independently controlled in an equilibrium mixture of C components existing in P phases. Phase rule is very useful in diverse areas, such as metallurgy, mineralogy, and petrology. It can also be applied to various research problems in physical chemistry. Statistical mechanics Together with James Clerk Maxwell and Ludwig Boltzmann, Gibbs founded "statistical mechanics", a term that he coined to identify the branch of theoretical physics that accounts for the observed thermodynamic properties of systems in terms of the statistics of ensembles of all possible physical states of a system composed of many particles. He introduced the concept of "phase of a mechanical system". He used the concept to define the microcanonical, canonical, and grand canonical ensembles; all related to the Gibbs measure, thus obtaining a more general formulation of the statistical properties of many-particle systems than Maxwell and Boltzmann had achieved before him. Gibbs generalized Boltzmann's statistical interpretation of entropy by defining the entropy of an arbitrary ensemble as , where is the Boltzmann constant, while the sum is over all possible microstates , with the corresponding probability of the microstate (see Gibbs entropy formula). This same formula would later play a central role in Claude Shannon's information theory and is therefore often seen as the basis of the modern information-theoretical interpretation of thermodynamics. According