  We show that the Gaussian Approximation Potential machine learning framework
can describe complex magnetic potential energy surfaces, taking ferromagnetic
iron as a paradigmatic challenging case. The training database includes total
energies, forces, and stresses obtained from density-functional theory in the
generalized-gradient approximation, and comprises approximately 150,000 local
atomic environments, ranging from pristine and defected bulk configurations to
surfaces and generalized stacking faults with different crystallographic
orientations. We find the structural, vibrational and thermodynamic properties
of the GAP model to be in excellent agreement with those obtained directly from
first-principles electronic-structure calculations. There is good
transferability to quantities, such as Peierls energy barriers, which are
determined to a large extent by atomic configurations that were not part of the
training set. We observe the benefit and the need of using highly converged
electronic-structure calculations to sample a target potential energy surface.
The end result is a systematically improvable potential that can achieve the
same accuracy of density-functional theory calculations, but at a fraction of
the computational cost.
