Intermolecular forces and the structure of uniform and nonuniform fluids