The wettability of a surface by a liquid depends primarily on