  Atomistic simulations hold significant value in clarifying crucial phenomena
such as phase transitions and energy transport in materials science. Their
success stems from the presence of potential energy functions capable of
accurately depicting the relationship between system energy and lattice
changes. In magnetic materials, two atomic scale degrees of freedom come into
play: the lattice and the spin. However, accurately tracing the simultaneous
evolution of both lattice and spin in magnetic materials at an atomic scale is
a substantial challenge. This is largely due to the complexity involved in
depicting the interaction energy precisely, and its influence on lattice and
spin-driving forces, such as atomic force and magnetic torque, which continues
to be a daunting task in computational science. Addressing this deficit, we
present DeepSPIN, a versatile approach that generates high-precision predictive
models of energy, atomic forces, and magnetic torque in magnetic systems. This
is achieved by integrating first-principles calculations of magnetic excited
states with deep learning techniques via active learning. We thoroughly explore
the methodology, accuracy, and scalability of our proposed model in this paper.
Our technique adeptly connects first-principles computations and atomic-scale
simulations of magnetic materials. This synergy presents opportunities to
utilize these calculations in devising and tackling theoretical and practical
obstacles concerning magnetic materials.
