  A potential function is presented for describing a system of flexible H$_2$O
molecules based on the single center multipole expansion (SCME) of the
electrostatic interaction. The model, referred to as SCME/f, includes the
variation of the molecular quadrupole moment as well as the dipole moment with
changes in bond length and angle so as to reproduce results of high level
electronic structure calculations. The multipole expansion also includes fixed
octupole and hexadecapole moments, as well as anisotropic dipole-dipole,
dipole-quadrupole and quadrupole-quadrupole polarizability tensors. The model
contains five adjustable parameters related to the repulsive interaction and
damping functions in the electrostatic and dispersion interactions. Their
values are adjusted to reproduce the lowest energy isomers of small clusters,
(H$_2$O)$_n$ with $n=2-6$, as well as measured properties of the ice Ih
crystal. Subsequent calculations of the energy difference between the various
isomer configurations of the clusters show that SCME/f gives good agreement
with results of electronic structure calculations and represents a significant
improvement over the previously presented rigid SCME potential function.
Analysis of the vibrational frequencies of the clusters and structural
properties of ice Ih crystal show the importance of accurately describing the
variation of the quadrupole moment with molecular structure.
