An ab initio formulation for calculating solvent effects for organic molecu
les is presented. The solvent effects are treated in two parts using differ
ent models for the solvent. For calculating the reaction field the solvent
is modeled as a continuum with the cavity determined ab initio as a surface
enclosing the solute molecule, which represents the minima of the interact
ion potential as a solvent molecule approaches a solute molecule at various
angles. The interaction potential is calculated using results of ab initio
diatomic calculations on various pairs of atoms with frozen asymptotic cha
rge densities. The reaction field contribution from the solvent is evaluate
d by using the apparent surface charge model with a dense grid of points on
the cavity, For the direct interaction we first construct the first shell
of solvent molecules around the solute molecule by bringing the solvent mol
ecules as discrete systems to the cavity surface. The corresponding energy
(consisting of both the solvent-solute and solvent-solvent interaction) is
minimized with respect to both the location of solvent molecules as well as
their orientation. The method is demonstrated by application to the p-nitr
oaniline in various solvents. The solvated excitation energies are calculat
ed and compared with experiment. We also compute the solvated polarizabilit
ies and second-order transition moments.