  Molecular dipole moment in liquid water is an intriguing property, partly due
to the fact that there is no unique way to partition the total electron density
into individual molecular contributions. The prevailing method to circumvent
this problem is to use maximally localized Wannier functions, which perform a
unitary transformation of the occupied molecular orbitals by minimizing the
spread function of Boys. Here we revisit this problem using a data-driven
approach satisfying two physical constraints, namely: i) The displacement of
the atomic charges is proportional to the Berry phase polarization; ii) Each
water molecule has a formal charge of zero. It turns out that the distribution
of molecular dipole moments in liquid water inferred from latent variables is
surprisingly similar to that obtained from maximally localized Wannier
functions. Apart from putting a maximum-likelihood footnote to the established
method, this work highlights the importance of including physical constraints
in improving the interpretability of atomistic machine learning models.
