The approach enables objective and automatic determination of the quantum-mechanical region based on electronic-state changes, addressing a long-standing challenge in multiscale molecular simulations.