Schematic structure of QM/MM-NN for a system containing N atoms in the QM subsystem. Here rQM and rMM are respectively the Cartesian coordinates of the atoms in the QM and MM subsystem, {} is the symmetry function that depends on rQM, i denotes the QM atoms, k denotes different radial and angular functions with different hyperparameters, and {} is the external electrostatic potential at QM grids close to atom i as a function of rQM and rMM. After semiempirical QM/MM calculations with rQM and rMM, the total potential energy and the corresponding forces on all QM and MM atoms at the low level are known. Then the energy difference between two levels as ΔE is predicted with QM/MM-NN, and the derivative of ΔE with respect to rQM and rMM is calculated analytically. Finally, the total potential energy and the corresponding forces on all QM and MM atoms at the high level is obtained. The differences on the input variables of NN compared to our previous work42 are highlighted in red.