Analytical expressions for the first and second derivatives of the Hartree-Fock energy have been derived in case of a solvated system simulated by a multipolar charge distribution embedded in a cavity of arbitrary shape and a solvent represented by a dielectric continuum. A computer code has been written on these bases. It allows geometry optimizations and more generally the determination of the critical points of the potential energy surface for a molecular system interacting with a solvent as easily as in the case of an isolated molecule. The use of this code is illustrated by the computation of the main features of the reaction path of a Menshutkin-type reaction in various solvents. The results compare pretty well with those obtained by a full Monte Carlo simulation of the solvent by Gao. This agreement supports the idea that solvents, including water, can be safely modeled by a continuum. The advantage of such models rests in the fact that they allow refined computations on the solute at a minimum computational expense. © 1996 American Institute of Physics.