Liquid state quantum chemistry : A cavity model