Medium‐Dependent Intermolecular Potential for Liquids and Its Use in Obtaining Free Energy and Entropy