  The development of machine learning interatomic potentials has immensely
contributed to the accuracy of simulations of molecules and crystals. However,
creating interatomic potentials for magnetic systems that account for both
magnetic moments and structural degrees of freedom remains a challenge. This
work introduces SpinGNN, a spin-dependent interatomic potential approach that
employs the graph neural network (GNN) to describe magnetic systems. SpinGNN
consists of two types of edge GNNs: Heisenberg edge GNN (HEGNN) and
spin-distance edge GNN (SEGNN). HEGNN is tailored to capture Heisenberg-type
spin-lattice interactions, while SEGNN accurately models multi-body and
high-order spin-lattice coupling. The effectiveness of SpinGNN is demonstrated
by its exceptional precision in fitting a high-order spin Hamiltonian and two
complex spin-lattice Hamiltonians with great precision. Furthermore, it
successfully models the subtle spin-lattice coupling in BiFeO3 and performs
large-scale spin-lattice dynamics simulations, predicting its antiferromagnetic
ground state, magnetic phase transition, and domain wall energy landscape with
high accuracy. Our study broadens the scope of graph neural network potentials
to magnetic systems, serving as a foundation for carrying out large-scale
spin-lattice dynamic simulations of such systems.
