The Use of the Partition Function in Metal-Ligand and Macromolecule-Ligand Equilibria.