In the following, we will consider a system that is composed of two separable subsystems: a QM subsystem, where the electronic and nuclear interactions are described by Kohn-Sham density functional theory (KS-DFT), and an MM subsystem, in which atoms interact according to an MM force field. We use an electrostatic embedding QM/MM formalism in which the KS equations must be solved including the external field that is generated by the MM atoms. Typically, the electrostatic force field parameters consist of point charges but can also include higher-order multipoles. The electron density of the QM subsystem is thus directly polarized by the atoms in the MM subsystem. The nuclei in the QM domain are propagated as classical point particles by using either the Born-Oppenheimer (BO) or Car-Parrinello (CP) approach. The Hamiltonian for this system can be written as