Thermodynamic treatment of some factors affecting the interaction between colloidal particles