Calculations of the intermolecular potential and surface energies of stearic acid