Partition function and equilibria in solution