Topologically Correct Quantum Nonadiabatic Formalism for On-the-Fly Dynamics.