Abstract

The influence of external magnetic fields on excited-state molecular dynamics remains largely unexplored despite its fundamental importance in photochemical and photophysical processes. To address this challenge, we develop a finite-magnetic-field ab initio nonadiabatic molecular dynamics framework based on Ehrenfest dynamics and gauge-including atomic orbitals. Analytical energy gradients in the presence of external magnetic fields are derived and implemented within a two-spinor formalism, enabling a unified treatment of orbital and spin angular momentum together with coupled electron–nuclear dynamics. The methodology is applied to the internal rotation of methyliminium cation (CH₂NH₂⁺) and the dissociation of H₂ in an external magnetic field. Analysis of the nuclear forces reveals that these effects arise primarily from the magnetic-field-induced orbital Zeeman effect, while the direct Lorentz force contributes only minimally to the CH₂NH₂⁺ isomerization dynamics. For H₂ dissociation, the two-spinor formalism captures both spin-coherence generation and magnetic-field-induced Larmor precession. These results establish a general framework for simulating magnetic-field-controlled nonadiabatic dynamics and provide new insights into the manipulation of photochemical and spin-dependent processes through external magnetic fields.