A generalized multipole expansion of intermolecular interactions