Title: Thermodynamic theory of affinity