The interactions between the electrons and nuclei of the QM subsystem and the atoms in the MM subsystem that are farther away than the short-range cutoff distance are approximated using a multipole expansion of the electrostatic potential due to the QM charge density. With this approximation, the long-range electrostatic QM-MM interaction energy can be written as