  Ab initio simulations of dislocations are essential to build quantitative
models of material strength, but the required system sizes are often at or
beyond the limit of existing methods. Many important structures are thus
missing in the training or validation of interatomic potentials, whilst studies
of dislocation-defect interactions must mitigate the effect of strong periodic
image interactions along the line direction. We show how these restrictions can
be lifted through the use of linear machine learning potentials in hybrid
simulations, where only a subset of atoms are governed by ab initio forces. The
linear form is exploited in a constrained retraining procedure, qualitatively
expanding the range of training structures for learning and giving precise
matching of dislocation core structures, such that lines can cross the
quantum/classical boundary. We apply our method to fully three dimensional
studies of impurity segregation to edge and screw dislocations in tungsten. Our
retrained potentials give systematically improved accuracy to QM/ML reference
data and the three dimensional geometry allows for long-range relaxations that
qualitatively change impurity-induced core reconstructions compared to
simulations using short periodic supercells. More generally, the ability to
treat arbitrary sub-regions of large scale simulations with ab initio accuracy
opens a vast range of previously inaccessible extended defects to quantitative
investigation.
