Efficient and Accurate Spatial Mixing of Machine Learned Interatomic Potentials for Materials Science Fraser Birks, Thomas D Swinburne, James R Kermode Abstract Machine-learned interatomic potentials offer near first-principles accuracy but are computationally expensive, limiting their application in large-scale molecular dynamics simulations. Inspired by quantum mechanics/molecular mechanics methods, we present ML-MIX, an efficient and flexible LAMMPS package for accelerating simulations by spatially mixing interatomic potentials of different complexities. Through constrained linear fitting, we show it is possible to generate a ‘cheap’ approximate model which closely matches an ‘expensive’ reference in relevant regions of configuration space. We demonstrate the capability of ML-MIX through case-studies in Si, Fe, and W–He systems, achieving up to an 11× speedup on ∼ \sim 8,000 atom systems without sacrificing accuracy on static and dynamic quantities, including calculation of minimum energy paths and dynamical simulations of defect diffusion. For larger domain sizes, we show that the achievable speedup of ML-MIX simulations is limited only by the relative speed of the cheap potential over the expensive potential. The ease of use and flexible nature of this method will extend the practical reach of MLIPs throughout computational materials science, enabling parsimonious application to large spatial and temporal domains. 1 Introduction Atomistic simulations face two central challenges: accuracy in the model for atomic energies and forces and capturing physical processes at large length- and time-scales. Addressing each challenge under fixed computational budget leads to cost-accuracy trade-offs which have driven the development of many methods that approximate the underlying quantum-mechanical ground truth. The most important (and most successful) approximation for atomic interactions is density functional theory (DFT) — which pushed the size of simulations from one or two small atoms to hundreds or even thousands on modern machines — a meteoric development recognised with the 1998 Nobel Prize Burke 2012 ; Jones 2015 . A further level of approximation is to do away with electrons completely; instead making predictions about atomic behavior purely from the positions of atomic nuclei and chemical species. For a many years, the most accurate models in this category were fit-by-hand interatomic potentials with simple functional forms designed to match experimental quantities of interest Daw and Baskes 1984 ; Lennard-Jones 1931 ; Stillinger and Weber 1985 ; Tersoff 1988 or DFT derived properties Ercolessi and Adams 1994 ; Brommer and Gähler 2007 . Many such ‘empirical’ potentials still see considerable use today Martin H. Müser and Pastewka 2023 . In the last three decades a new class of interatomic potentials has emerged, which have complex functional forms and parameters fit to DFT data, with an aim to reproduce large swathes of the potential energy surface Behler and Parrinello 2007 ; Bartók et al. 2010 ; Shapeev 2016 ; Drautz 2019 ; Deringer et al. 2021 ; Batatia et al. 2022 . These machine learned interatomic potentials (MLIPs) have consistently achieved remarkable accuracy over a range of applications across materials science and chemistry Bartók et al. 2018 ; Kovács et al. 2023 ; Qamar et al. 2023 ; Batatia et al. 2024 . Whilst the evaluation costs of empirical potentials and MLIPs both scale linearly with the number of atoms in a system, the flexible functional forms of MLIPs result in much larger scaling pre-factors. Generally, MLIPs are approximately 2-3 orders of magnitude slower in evaluation than their simple empirical counterparts Lysogorskiy et al. 2021 ; Xie et al. 2023 . This cost has led to the uptake of MLIPs being slow in fields where simulation domains are prohibitively large and simulation timescales are long, for example investigations requiring molecular dynamics (MD) simulations of millions of atoms for billions of timesteps. These simulations can be split into two categories, those in which the entire domain is chemically complex, with atoms involved in bond-making/breaking processes throughout (e.g, amorphous materials Qian et al. 2023 ; Grießer et al. 2023 , liquids Al-Awad et al. 2023 ; Tian et al. 2023 , high entropy alloys Byggmästar et al. 2021 ; Shiotani et al. 2023 ), and those where the domain contains only isolated regions of complexity surrounded by atoms in simple environments (e.g, materials defects Gleizer et al. 2014 , biochemical simulations Cui et al. 2021 , catalysis Bramley et al. 2023 ). In the second case, simulation cost can in principle be reduced by using cheap, approximate models away from the chemically ‘important’ regions of high complexity. This idea has been extensively explored in the context of quantum mechanical/ molecular mechanics modeling (QM/MM), a method which couples an expensive first-principles method (typically DFT) with a linear scaling potential for the complex (QM) and simple (MM) regions of a simulation domain respectively Warshel and Levitt 1976 ; Chen and Ortner 2016 ; Chen and Ortner 2017 ; Swinburne and Kermode 2017 ; Bernstein et al. 2009 ; Kermode et al. 2008 ; Molani and Cho 2024 ; Grigorev et al. 2023 ; Wagih and Schuh 2022 . This paper details a method that is conceptually similar to QM/MM, but where the ‘QM’ and ‘MM’ regions are replaced with linear-scaling MLIPs of different complexities (ML/ML). The key difference is that ML/ML simulations aim to run for millions of timesteps, compared to only hundreds or thousands in QM/MM, with each timestep taking 3-6 orders of magnitude less wall time. ML/ML therefore incurs different software challenges: to minimise overhead, operations that take place each timestep must be embedded directly into the MD code. Whilst some studies have explored similar ‘ML/MM’ ideas Hofstetter et al. 2022 ; Böselt et al. 2021 ; Immel et al. 2024 , no generic, computationally parallel, simple to use implementation of ML/ML exists. In this paper we present ML-MIX, a package created to enable the whole workflow of accelerating a simulation within the popular open-source MD software LAMMPS Thompson et al. 2022 ; Gissinger et al. 2024 . We show that if one starts with an ‘expensive’ MLIP, it is possible to generate a ‘cheap’ MLIP that locally approximates the potential energy surface, and this can be spatially mixed with the expensive MLIP to run accurate simulations at a fraction of the cost. The process is schematically depicted in Fig. 1 . The package is designed to be user-friendly; provided that a user has access to an expensive potential, our aim is that it should be straightforward to generate a cheap potential and attain a reasonable simulation speedup with minimal effort. To ensure the cheap potential locally matches the expensive potential, we generate the cheap potential through constrained linear fitting. The constraints we apply can be divided into two types depending on the strength of regularization they impose on the fit; ‘soft’ and ‘hard’. Soft constraint data covers the whole region of potential energy space that the cheap potential should approximate. Hard constraint data covers important properties which should match closely between potentials. The fit is constrained to a subspace in which predictions on the hard constraint data match near-exactly between the cheap and expensive potentials. The constrained fitting procedure is described in detail in section 4.1 . We first present results of four ML/ML case-studies, targeting one static and three dynamic quantities of interest in Si, Fe and W, demonstrating that ML-MIX results agree with those from fully expensive simulations at a fraction of the cost. The quantities of interest are selected primarily to demonstrate distinct aspects of ML-MIX package rather than for their intrinsic scientific interest. For each quantity, the total atomistic domain remained small ( \sim 8000 atoms), to ensure validation measurements are viable. However, this limited the attainable speed-up (to \sim 10\times , depending on the cheap potential). In appendix 6 we show that speedups approaching the theoretical limiting value (of > 30 \times in this case) are possible with larger domains (up to \sim 10^{6} atoms). Figure 1: A schematic overview of the simulation acceleration workflow. Left hand side: the constrained potential fitting process, whereby an accurate expensive potential (orange) is approximated in local regions of potential energy space by a simpler cheap potential (blue). Right hand side: schematic showing how simulation is accelerated; cheap potential is used to evaluate force components on atoms in ‘bulk-like’ environments. 2 Results 2.1 Potential fitting The starting point for our study are three ‘expensive’ linear atomic cluster expansion (ACE) potentials, each of which was fit to expansive and publically available DFT datasets (Si Bartók et al. 2018 , Fe Zhang et al. 2023 , W–He Nutter et al. 2024 ) using the linear ACEpotentials.jl package Witt et al. 2023 . The Fe and W–He potentials were of correlation order 3 and maximum total polynomial degree 20, whilst the Si potential had a larger basis set, with correlation order 4 and maximum total polynomial degree 20. The Si potential cutoff was 6.0 Å, the Fe potential cutoff was 5.5 Å, and the W–He potential cutoff was 5.0 Å. For the Si potential, the potential parameters and dataset match those described in Witt et al. 2023 . For the Fe and W–He potentials, full sets of fitting parameters are given in appendix 5 . These expensive potentials were used to generate ‘synthetic’ training data focused around a suitable local region of potential energy space. In each case, soft constraint data was a bulk-crystal high temperature MD trajectory, and hard constraint data was a set of zero-temperature homogeneous lattice deformations. Energy and force evaluations were performed using the ML-PACE package Lysogorskiy et al. 2021 . As the energy of weak, homogeneously deformed lattice structures are described fully by the elastic constants Grigorev et al. 2023 , the selected hard constraint enforced elastic constant matching between potentials. Additional details on the fitting of these potentials is presented in section 4.1.2 . Table 1: RMSE table for both expensive and cheap potentials on the full DFT datasets used for the creation of the expensive potentials and the small synthetic MD datasets used for the creation of the cheap potentials. For the W-He potential, only configurations containing W are used (as the cheap UF3 potential cannot describe He interactions). Note that the synthetic data is generated by the expensive potential, hence the lack of RMSE values in the lower left quadrant. Expensive potentials Cheap potentials Energy (meV) Force (eV/Å) Energy (meV) Force (eV/Å) Full DFT data Si 2.14 0.075 2022.68 0.79 Fe 2.32 0.083 152.15 0.30 W 2.15 0.070 11938.00 157.54 Synthetic MD data Si - - 0.21 0.045 Fe - - 0.81 0.090 W - - 1.02 0.053 Cheap potential models : For Si and Fe, the cheap potentials were small ACE potentials, with correlation orders of 2 and maximum total polynomial degrees of 10, with potential cutoffs matching those of the reference models. For the W-He simulation, the cheap potential was a pure W ultra-fast (UF3) potential Xie et al. 2023 with a two-body cutoff of 6.0 Å and a 3 body cutoff of 3.5 Å. The energy and force root mean squared error (RMSE) values for all potentials evaluated on both the expensive potential DFT datasets and cheap potential synthetic datasets are displayed in Table. 1 . The cheap potentials perform very badly compared to the expensive potential when tested across the whole potential energy surface, but exhibit excellent performance when evaluated in their target domain. A plot for the relative speedups of each cheap potential over the expensive potentials on different numbers of processors are shown in Fig. 2 . Data is shown for a small domain ( \sim 8k atoms) and a large domain ( \sim 250k atoms), with the speedup curves being approximately the same for both. The serial speedup for the Si potential is \sim 19x, but this increases up to \sim 30x in parallel. Similar behaviour is seen for the W–He potentials, the relative speedup is \sim 59x in serial, but in parallel increases up to \sim 75x. In contrast, the Fe cheap potential remains \sim 8x faster in both serial and parallel. It is unclear exactly why the W–He and Si cheap potentials show this additional parallel speedup, and is likely due to the implementation of the ML-PACE package Lysogorskiy et al. 2021 . Figure 2: Speedup of simulations using only the expensive potential relative to the same simulations using only the cheap potential on 8k and 250k atoms with an increasing number of MPI parallel domains. Trendlines are given by a Gaussian process fit to all the datapoints in each group. It can be seen that the W–He and Si cheap potentials exhibit a greater speedup over the expensive potentials in parallel than serial. Error bars on each data point represent the standard deviation in the measured speedups over three repeats. Table 2 shows the impact of the hard constraint on the elastic constants and lattice parameters predicted by the cheap potentials. The elastic constants were computed using the matscipy package Grigorev et al. 2024 . The unconstrained fit (fitting to MD data only) produced potentials with mismatched elastic constants and lattice parameters relative to the expensive potential reference. In the case of the Si and Fe ACE potentials, adding the hard constraint data led to near perfect matching of the reference elastic constants. For the pure W UF3 potential the fitting was less successful; it was determined the UF3 functional form was insufficiently flexible to match the hard constraint data and simultaneously give a low RMSE on the MD data. Under the constraint, the \mathrm{C}_{11} and \mathrm{C}_{44} elastic constants got closer to the underlying reference, but \mathrm{C}_{12} became worse. In all cases, the equilibrium lattice parameter of the model became more accurate under constrained fitting. The RMSE in the predicted energies and forces on the MD data for both the constrained and unconstrained fits are shown in table 3 . Forcing the fit to lie in the constraint subspace always increases the RMSE. Table 2: Table of elastic constants and lattice parameters of according to each potential (expensive, cheap unconstrained, cheap constrained) for Si, Fe and W–He. Elastic constants are fit to stress-strain data using Bayesian linear regression, with the error \sigma in each value found from the maximum likelihood estimate. For Si and Fe, the addition of the hard constraints to the cheap potential fitting produces elastic constants which match the expensive within 1\sigma . For the W–He potential, the constrained fitting improves C_{11} (matching within 1\sigma ) and C_{44} (matching within 2\sigma ), but leads to a significantly worse C_{12} than the unconstrained case. In all cases, the constraint dramatically improves the lattice parameter. C_{11} (GPa) C_{12} (GPa) C_{44} (GPa) a (Å) Si Expensive (reference) 150.8 \pm 1.0 56 \pm 2 70.5 \pm 0.4 5.461 Cheap (unconstrained) 139 \pm 3 81.29 \pm 0.12 52.2 \pm 1.9 5.661 Cheap (constrained) 148 \pm 2 55 \pm 3 69.8 \pm 0.3 5.461 Fe Expensive (reference) 283 \pm 12 154 \pm 6 105 \pm 6 2.834 Cheap (unconstrained) 426 \pm 16 364 \pm 2 239.0 \pm 1.9 3.360 Cheap (constrained) 284 \pm 11 154 \pm 7 106 \pm 3 2.834 W—He Expensive (reference) 520 \pm 14 199 \pm 5 143 \pm 5 3.181 Cheap (unconstrained) 604 \pm 12 209 \pm 12 180 \pm 6 3.136 Cheap (constrained) 527 \pm 11 157 \pm 4 157 \pm 3 3.180 Table 3: RMSE table for the constrained and unconstrained cheap potentials on the synthetic MD dataset. The RMSEs get slightly worse when the fit is constrained. Unconstrained fit Constrained fit Energy (meV) Force (eV/Å) Energy (meV) Force (eV/Å) Si 0.15 0.038 0.21 0.045 Fe 0.14 0.083 0.81 0.090 W–He 0.12 0.053 1.02 0.053 2.2 Energy barrier for Si vacancy migration Figure 3: The energy barrier associated with vacancy migration in Si, obtained through all-expensive (blue curve) and ML/ML (orange curve) nudged elastic band simulations. For the ML/ML simulation, the final energies were obtained through one-shot energy evaluations of the relaxed structures with the expensive potential. The all-expensive energy barrier (0.0543 eV) agrees with the ML/ML energy barrier (0.0548 eV) within 1 meV. The tangent lines arise from the projected forces. A simple zero temperature (static) quantity of interest for a materials defect is the energy barrier for migration. Here, we aimed to show that it is possible to attain a near identical energy barrier for vacancy migration in a 10\times 10\times 10 (8000 atom) block of Si for both a fully-expensive simulation and an ML/ML simulation where the expensive potential is only localised around the vacancy. For both simulations, the minimum energy pathway was found using the nudged elastic band (NEB) method Henkelman et al. 2000 , as implemented in LAMMPS, with further analysis in ASE Hjorth Larsen et al. 2017 . For the ML/ML NEB, the combined relaxation was performed using ML-MIX, with the final energies obtained through one-shot energy evaluations of the relaxed structures with the expensive potential. Fig. 3 shows the results from this investigation. The energy barrier obtained through the ML/ML simulation (0.0548 eV) agrees with the all-expensive reference energy barrier (0.0543 eV) to within 1 meV. The NEB relaxation ran \sim 5 \times faster, close to the theoretical ‘zero-overhead’ value of 5.90\times expected from the fraction of expensive atoms in the ML/ML simulation. 2.3 Stretched bond in silicon Figure 4: Average force on stretched bond in silicon over 100 ps at 300 K for different expensive potential radii r_{\mathrm{core}} and thermostat damping strength. Error bars represent the standard deviation in bond force measured over this time. For R_{\mathrm{core}}=0 , which corresponds to using the cheap potential everywhere, the average bond force measured does not match the all-expensive NVE reference. Once the expensive potential is introduced at and around the stretched bond, this difference vanishes and agreement between the mixed simulation and the NVE reference is within statistical error. The weaker the thermostat, the better the agreement with the NVE reference. Turning to a dynamical example, we investigated the quantity of interest proposed as a test for the quality of different QM/MM techniques by Bernstein et al Bernstein et al. 2009 — the average force on a single stretched and rigidly fixed Si bond in a block of bulk Si at 300 K. In a 10\times 10\times 10 (8000 atom) supercell of bulk Si, a bond was stretched an additional 0.1 Å along its length and fixed. The average force on this stretched bond recorded over 100 ps was then found, both for all-expensive reference and a number of ML/ML simulations. In the ML/ML simulations, the impact of changing the radius of the expensive potential region around the stretched bond atoms r_{\mathrm{core}} on the measured average force was investigated. The first simulation, at r_{\mathrm{core}}=0 corresponded to an all-cheap simulation. Further simulations were conducted for r_{\mathrm{core}}=4 , r_{\mathrm{core}}=6 , r_{\mathrm{core}}=8 and r_{\mathrm{core}}=10 . The results for these simulations are presented in Fig. 4 . It can be seen that as the expensive potential replaces the cheap potential in the core ( r_{\mathrm{core}}>0 ), the forces jump to closely matching the NVE reference. Images of the simulation domain highlighting the atoms treated expensively around the fixed bond are shown on the insets in Fig. 4 . The theoretical and measured speedups are shown in table 4 . It can be seen that in serial, the measured speedups match the theoretical, whilst in parallel the values are lower due to imperfect load balancing and parallel overheads. As r_{\mathrm{core}} increases, the number of expensive atoms in the simulation increases, and the overall speedup decreases. The load balancing strategy employed in this study, as well the effectiveness of load balancing for ML/ML simulations across different regimes is discussed in appendix 6 . Table 4: Speedup table for mixed simulations in Si. Simulation Theoretical Speedup Serial Speedup Parallel Speedup Si: r_{\mathrm{core}}=4 12.93 12.89 8.89 Si: r_{\mathrm{core}}=6 10.79 10.73 10.10 Si: r_{\mathrm{core}}=8 8.55 8.55 8.89 Si: r_{\mathrm{core}}=10 6.72 6.72 6.88 2.4 Diffusion coefficients A key property of point defects in materials are diffusion coefficients, and estimating these is a common use-case for MD simulations. Here, we consider the diffusion of a dumbbell self-interstitial in Fe and an interstitial He impurity in W, both of which have been extensively studied Wang et al. 2012 ; Hammond et al. 2018 ; Willaime et al. 2005 ; Marinica et al. 2011 . For both target defects, reference simulations were carried out using the expensive ACE potentials. These were followed by ML/ML simulations where the expensive potentials were limited to a small region around the diffusing defect, which was tracked as it moved, with the rest of the simulation domain treated using the Fe or W cheap potentials. Fig. 5 presents the results from these investigations side-by-side. For the Fe system, measurements of the diffusion coefficient as a function of temperature were taken with only the cheap potential, only the expensive potential and using the ML/ML approach. For W-He, only the ML/ML and expensive only simulation results are presented as as the UF3 potential was fit only for pure W and could not model W-He interactions. For both quantities of interest, the ML/ML simulations agreed well with the all-expensive reference calculations at multiple temperatures, despite the inaccuracy of the all-cheap simulation in the Fe case. Further details on the simulation setup are given in section 4.6 . The theoretical and measured speedups of the mixed simulations over the reference for both simulation types are shown in table 5 . The measured serial speedups again closely agree with the theoretical values whilst the parallel speedups are lower. Figure 5: Diffusion coefficient as a function of temperature for the diffusion of the iron interstitial dumbbell defect through bulk iron and for helium in bulk tungsten. Left: The diffusion coefficient of the iron dumbbell for three cases: expensive reference potential only (blue), cheap potential only (orange) and mixed simulation (green). The mixed simulation leads to results which are well matched with the reference. Each point is the average of 5 diffusion coefficients measured in independent runs of 1 ns each. The error-bars on each point reflect the standard deviation of these values. Right: The diffusion coefficient for He in W using a helium-tungsten ACE (blue) and a mixed simulation with both a helium-tungsten ACE and a UF3 tungsten potential. Again, agreement is good. Note that there is no ’cheap-only’ reference in this case because the UF3 potential cannot be used to model tungsten-helium interactions. Each point is the average of 25 diffusion coefficients measured in independent runs of 60 ps each. The error-bars on each point reflect the standard deviation of these values. Table 5: Speedup table for mixed simulations of diffusion coefficients in Fe and W–He. Simulation Theoretical Speedup Serial Speedup Parallel Speedup Fe 3.79 3.80 2.23 W–He 10.55 10.46 7.39 3 Discussion We have presented a hybrid simulation scheme which aims to break existing cost-accuracy tradeoffs in simulations by localizing accuracy requirements, enabling a 10\times speed-up on small (8000 atom) domains with minimal loss in accuracy on quantities of interest. A central innovation is the use of a constrained fitting procedure to automatically generate cheap models which locally approximate the potential energy surface of a reference expensive model. We show that even for very lightweight ACE potentials, imposing hard constraints can lead to exact matching of elastic constants. For UF3 potentials, we show that under hard constraints, elastic constants will improve up to some limit, beyond which any further improvements are limited by the inflexibility, or misspecification, of the functional form. We stress that whilst we have specifically discussed constrained fitting in the context of generating one MLIP that locally approximates another, it would be easy to apply this methodology to constrain the fitting of a large, flexible MLIP to DFT data directly, extending recent retraining approaches Grigorev et al. 2023 . Constrained fitting is important for this process; without it, errors are far more pronounced at small strains. This can lead to erroneous Eshelby-inclusion Eshelby and Peierls 1957 like strain fields in the vicinity of the ML/ML potential boundary under small deformations. This is explored in more detail in appendix 7 . The first case-study we present in this paper was a nudged elastic band energy barrier calculation for the migration of an Si vacancy. We showed that, using an ML/ML simulation, a value for the migration barrier can be attained which is within 1 meV of the all-expensive reference at a fifth of the computational cost. This speedup, whilst already considerable, is not as great as what is seen for ML/ML MD simulations on the same 8000 atom domain – this is because a larger fixed set of expensive atoms is necessary for a NEB to converge. It is important to point out that total energies are undefined in ML-MIX ML/ML simulations; the final energies were computed by performing one-shot energy evaluations of the relaxed structures using only the expensive potential. In principle, one could take this a step further and perform a small number of additional relaxation steps using only the expensive potential. If the domain was so large or the expensive potential so expensive that even the final single-point energy calculations became intractable, a further option to approximate energy barriers is to directly integrate the ML/ML forces on the final NEB image states using the virtual work method introduced by Swinburne and Kermode Swinburne and Kermode 2017 , originally devised for QM/MM simulations. Next, we presented an investigation into the average force on a stretched and rigidly fixed bond in an Si bulk structure. This was selected to mirror previous tests performed in QM/MM studies Bernstein et al. 2009 . It should be noted that for an r_{\mathrm{core}} of 0.0 (cheap potential only) the average force measured on the stretched bond is within 5% of the correct value, which is a significantly smaller error than one typically sees in QM/MM simulations. Adding even a small amount of expensive potential region around the stretched bond led to an immediate jump in the measured average bond force, leading to a value which was within 1 standard deviation ( \sigma ) of the NVE reference value. This behavior persisted for larger r_{\mathrm{core}} values. The measured serial speed-up closely matched theoretical predictions, showing that our implementation incurs minimal overhead due to the mixing process. However, in parallel testing (on 48 cores) the measured speedup is below theoretical predictions, in particular for the r_{\mathrm{core}}=4 case. We attribute this performance to the limited strong scalability of the expensive interatomic potential at low atom count, leading to significant load balancing issues in LAMMPS when there are few expensive atoms. The limited speed-up is thus a property of the expensive interatomic potential rather than our load balancing protocol- near-theoretical parallel speed-ups are achievable on larger systems with simple load balancing requirements. For a demonstration of this, please see appendix 6 . We also presented case studies on more challenging quantities of interest; defect diffusion coefficients in Fe and W. The measured diffusion coefficients consistently agreed with the all-expensive reference simulations within statistical error, and were attained for a fraction of the cost of the full expensive simulations. The close matching of the measured diffusion coefficients with the reference values suggest that one only requires spatially local accuracy to attain correct defect diffusion dynamics in materials; corroborating findings from earlier QM/MM studies Csányi et al. 2004 . Through these studies, we have demonstrated the flexibility and efficiency of the ML-MIX package to reliably and automatically track defects both in simple cases where the same atoms are always involved in the defects (i.e, for He in W) and for more complex cases where different atoms are involved as the defects move (i.e, for Fe dumbbell interstitial in Fe). Whilst the presented results only concern ACE and UF3 potentials, the general method is extendable to many other interatomic potentials implemented as LAMMPS pair styles. A full list of those compatible can be found on the ML-MIX GitHub repository Birks, F. et al. 2025 . It is crucial however to point out a key limitation in ML/ML (and indeed, QM/MM) simulations — if a force mixing method is used to combine potentials (as it is here), Newton’s third law is broken at the internal ML/ML boundary. This directly results in simulations not conserving energy, meaning thermostats are required to keep simulations from heating up as they progress. The energy drift in well-matched ML/ML simulations is relatively small, meaning thermostats can be weak enough to not impact dynamics — but this should always be checked . Force mixing is discussed further in section 4.3.1 , and a full investigation into the factors affecting energy conservation in ML/ML simulations is presented in appendix 8 . In summary, the ML-MIX approach presented here provides a largely automated and robust scheme to reduce the cost of any machine learned potential with minimal loss in accuracy. We anticipate the approach will find application in a broad range of atomic simulations of heterogeneous systems, including the calculation of defect free energy barriers Swinburne and Marinica 2018 , interface migration Rogal 2021 or nucleation phenomena Bonati et al. 2021 . 4 Methods 4.1 Constrained potential fitting The constrained potential fitting process is shown schematically in Fig 6 . By fitting a cheap potential to highly localized regions of the potential energy surface of the expensive potential, it is possible to attain high accuracy in local regions whilst maintaining a low complexity (and thus low evaluation cost). Figure 6: A schematic representation of the constrained fitting of a cheap potential to an expensive one. Top: A representation of the local potential energy surface of the expensive reference model (orange curve). Data has been sampled from this potential energy surface (crosses). Bottom: The cheap model, fit to this data in order to locally match the expensive model. It approximately matches the ‘soft’ constraint data (pink crosses) and exactly matches the ‘hard’ constraint data (green crosses). 4.1.1 Selecting constraints The requirements of the cheap potential are split into two types: soft constraints (loose matching), and hard constraints (tight matching). Archetypal hard constraints are the elastic constants, to ensure seamless matching of the long range elastic stress fields between the cheap and expensive potentials in a solid state simulation Bernstein et al. 2009 . Writing the design matrices for the hard and soft constraints as \mathbf{A}_{\mathrm{H}}\in\mathbb{R}^{N_{\mathrm{H}}\times N_{\mathrm{D}}} and \mathbf{A}_{\mathrm{S}}\in\mathbb{R}^{N_{\mathrm{S}}\times N_{\mathrm{D}}} , and the fitting data as \mathbf{y}_{\mathrm{H}}\in\mathbb{R}^{N_{\mathrm{H}}} and \mathbf{y}_{\mathrm{S}}\in\mathbb{R}^{N_{\mathrm{S}}} , we can express the potential parameters \mathbf{c}\in\mathbb{R}^{N_{\mathrm{D}}} as a solution to the constrained optimization problem \min_{\mathbf{c},||\mathbf{A}_{\mathrm{H}}\mathbf{c}-\mathbf{y}_{\mathrm{H}}||^{2}<\alpha}\left(||\mathbf{y}_{\mathrm{S}}-\mathbf{A}_{\mathrm{S}}\mathbf{c}||^{2}\right) (1) where regularization terms have been excluded for simplicity. The hard constraint is imposed by constraining the fit to the subspace ||\mathbf{A}_{\mathrm{H}}\mathbf{c}-\mathbf{y}_{\mathrm{H}}||^{2}<\alpha , where \alpha is the maximum allowed error for the model on the hard constraint data. Expressing this constraint through a Lagrange multiplier argument gives us the augmented Lagrangian \mathcal{L}(\mathbf{c},\lambda)=||\mathbf{y}_{\mathrm{S}}-\mathbf{A}_{\mathrm{S}}\mathbf{c}||^{2}+\lambda(||\mathbf{y}_{\mathrm{H}}-\mathbf{A}_{\mathrm{H}}\mathbf{c}||^{2}-\alpha). (2) By requiring that \nabla_{\mathbf{c}}\mathcal{L}(\mathbf{c},\lambda)=0 , we can express optimal constrained model parameters \mathbf{c} at fixed \lambda as a solution to the unconstrained problem \min_{\mathbf{c}}(||\mathbf{y}_{\mathrm{S}}-\mathbf{A}_{\mathrm{S}}\mathbf{c}||^{2}+\lambda||\mathbf{y}_{\mathrm{H}}-\mathbf{A}_{\mathrm{H}}\mathbf{c}||^{2}). (3) From this expression, it is clear that the quadratic constraint is equivalent to adding the hard constraint configurations to the fit with weights scaled by \lambda . Obtaining a solution to the full constrained problem therefore requires finding the minimum \lambda such that the solution to ( 3 ) lies on the surface of the constraint subspace ||\mathbf{A}_{\mathrm{H}}\mathbf{c}-\mathbf{y}_{\mathrm{H}}||^{2}=\alpha . Scripts to perform constrained linear fitting for ACE and UF3 potentials are provided in the accompanying code Birks, F. et al. 2025 . To perform the \lambda hyperparameter search, the linear problem is solved repeatedly. Initially, \lambda is increased logarithmically until ||\mathbf{A}_{\mathrm{H}}\mathbf{c}-\mathbf{y}_{\mathrm{H}}||^{2}<\alpha . Interval bisection is then used to find \lambda such that ||\mathbf{A}_{\mathrm{H}}\mathbf{c}-\mathbf{y}_{\mathrm{H}}||^{2}-\alpha<\mathrm{tol} , where \mathrm{tol} is set by default as \alpha/10 . \mathbf{A}_{\mathrm{H}} and \mathbf{A}_{\mathrm{S}} only need to be assembled once, and as the cheap potentials are small (often \lesssim 100 parameters), the whole constrained fitting process takes approximately 5 minutes on a single CPU core. 4.1.2 Cheap potential data In each of the three case-studies, regions far from the defect cores in each domain resembled near-bulk high temperature MD. Soft constraint data was generated to match this. For Si a 4096-atom diamond structure bulk cell was simulated at 500 K for 10 ps, with snapshots saved every 0.5 ps. For W and Fe, 2000-atom body centered cubic (BCC) bulk cells were simulated at 1200 K, with snapshots saved every 0.1 ps. The soft constraints consisted of the total energy and forces from each snapshot. For the hard constraints, following Grigorev et al. 2023 , data was generated by applying multiple shear and expansion deformations to 5\times 5\times 5 bulk supercell of Si, Fe and W lattices and saving the resulting energies. 17 configurations were generated between \pm 0.5\% strain for all of the following strain states: hydrostatic, uniaxial [100], uniaxial [111], shear ([100], (010)), shear ([110], (001)) and shear ([110], (1 \bar{1} 2)). For the Si and Fe ACE potentials, an \alpha value was selected that corresponded to an enforced energy error of less than 10^{-7} eV/atom on the hard constraint data. For Si, the corresponding \lambda value was 3.25\times 10^{9} . For Fe, \lambda was found to be 5.5\times 10^{9} . For the W potential the constrained fitting process failed due to the UF3 potential not being capable of simultaneously fitting the hard constraint data and maintain a low RMSE on the soft constraints. By searching the space of \lambda values, it was found that above approximately \lambda = 4.3\times 10^{5} , ||\mathbf{A}_{\mathrm{H}}\mathbf{c}-\mathbf{y}_{\mathrm{H}}||^{2} stopped decreasing. \lambda was therefore set to 4.3\times 10^{5} . 4.2 Region tracking Figure 7: Region construction schematic. From left to right: Starting with a cell containing an initial defect, it is identified either using a user-specified LAMMPS group or by the output vector from a user-defined LAMMPS fix. The defect atoms are then iterated over, with atoms that sit less than one core radius out from any defect atom being added to the core region. This construction process is then repeated for the atoms in the blended region. When running an ML/ML simulation, it is crucial that process of tracking defects and building the expensive potential region(s) is: (i) Accurate — if the cheap potential is erroneously used in a region that requires the expensive potential, it could impact on the accuracy of the simulation. (ii) Flexible — any defect type should be trackable. (iii) Fast — region building should not add considerable overhead to a simulation. In order to satisfy all three of these simultaneously, the region building and tracking were implemented directly in LAMMPS through a fix. By re-using the same neighbour lists that are built for the pair style evaluation step, this fix can quickly rebuild regions. Additionally, the fix is MPI local; whilst a limited amount of communication between neighbouring processes is necessary, no expensive global communication is required. The fix builds regions in two distinct stages: (i) Identify the ‘seed’ atoms through user-defined criteria. (ii) Construct the regions around these atoms. 4.2.1 Seed atom identification Seed atoms are identified in one of two ways; through a LAMMPS group or through querying the output vector of a separately defined LAMMPS fix. Tracking through a predefined LAMMPS group is for situations where seed atoms are unchanging, and are known at the start of the simulation, as is the case with He atoms in W. Tracking through the output vector of a user-supplied fix is useful for tracking defects which are not tied to any one particular set of atoms, for example a vacancy, dislocation or the Fe dumbbell interstitial described in the previous section. Seed atom identification is schematically represented in the first two panels of Fig. 7 . 4.2.2 Region construction Once the seed atoms are identified, regions are constructed around these seed atoms, using a method that is schematically identified in the last two panels of Fig. 7 . During region construction two arrays are populated, i2_potential and d2_eval . Both arrays are of size number of potentials \times number of atoms. The i2_potential array holds integers and is used to determine which atoms are to be evaluated with each potential; i2_potential[1][10] = 1 indicates that atom 10 should be evaluated with potential 1, whilst i2_potential[1][10] = 0 indicates that it should not be. d2_eval holds double-precision real numbers and describes how much each potential contributes to forces on atoms. By allowing d2_eval to hold fractional values, it is possible to introduce a blending region in which atoms move under a mixture of the forces from the two separate potentials; d2_eval[0][10] = 0.4 and d2_eval[1][10] = 0.6 indicates that atom 10 should get 40% of its’ forces from potential 0 and 60% from potential 1. Three regions are built in the region construction process, the core region , in which the force on all the atoms is given entirely by the expensive potential, the blending region , in which the forces are a mixture between the cheap and expensive potentials and the buffer region , which is crucial for the accuracy force-mixing scheme, and is discussed in the next section. The size of each region is specified by user controlled parameters: r_core , r_blend and r_buffer which are passed to the fix. Algorithms 1 , 2 and 3 describe how these arrays are populated in the region construction process for one of the two potentials (potential 0). Note that in algorithm 2 , a linear blending function to mix together potentials in the blending region is used. This is not mandatory and in principle could be replaced by any blending function. So long as there are only two potentials, it is trivial to populate i2_potential and d2_eval for the other potential once the regions have been constructed around the seed atoms. Currently, ML-MIX is limited to two potentials only. Algorithm 1 Build core region 1: Initialise i2_potential to 0 2: Initialise d2_eval to 0.0 3: for i \leftarrow seed atoms do 4: i2_potential[i][0] = 1 5: d2_eval[i][0] = 1.0 6: for j \leftarrow neighbours of atom i do 7: if ||\mathrm{pos(i)}-\mathrm{pos(j)}|| < r_core then 8: i2_potential[j][0] = 1 9: d2_eval[j][0] = 1.0 10: end if 11: end for 12: end for 13: Communicate() Algorithm 2 Build blended region 1: for i \leftarrow core atoms do 2: for j \leftarrow neighbours of atom i do 3: if ||\mathrm{pos(i)}-\mathrm{pos(j)}|| < r_blend then 4: i2_potential[j][0] = 1 5: r = ||\mathrm{pos(i)}-\mathrm{pos(j)}|| 6: v = max(d2_eval[j][0], 1.0-(r/r_blend)) 7: d2_eval[j][0] = v 8: end if 9: end for 10: end for 11: Communicate() Algorithm 3 Build buffer region 1: for i \leftarrow blended atoms do 2: for j \leftarrow neighbours of atom i do 3: if ||\mathrm{pos(i)}-\mathrm{pos(j)}|| < r_buffer then 4: i2_potential[j][0] = 1 5: end if 6: end for 7: end for 8: Communicate() 4.3 Spatial potential mixing The mixing scheme implemented in ML-MIX is force-mixing, which is a scheme commonly used in QM/MM. For in-depth reviews of force-mixing in the QM/MM context, please see Bernstein et al Bernstein et al. 2009 . Here we briefly review the force-mixing method, and discuss simplifications that can be made when using two local potentials. 4.3.1 Force mixing Figure 8: An illustration of force-mixing with interatomic potentials. A mixed domain is split into two non-interacting subdomains, which are composed of all the atoms in the core and blending regions for each potential (solid line), plus an extra buffer region containing atoms up to the potential cutoff radius out (dotted line). Partial force vectors \mathbf{F}_{\mathrm{c}} and \mathbf{F}_{\mathrm{e}} are obtained by evaluating the cheap and expensive subdomains respectively. These partial vectors are then combined into the full force vector on the system \mathbf{F} . In this process, forces on buffer atoms are discarded and forces on blending atoms are mixed between potentials. The process of force mixing is schematically shown in Fig. 8 . To obtain the forces, the domain is split into separate segments where an additional buffer region is included to stop individual regions seeing an artificial surface. The forces on these regions are then evaluated to create separate parts of the overall force vector. The full force vector is constructed as a combination of these separate vectors. In QM/MM, as DFT is a non-local method, the size of the buffer region around the QM domain is a crucial convergence parameter - one needs to balance the error due to the separation of the region of interest from the artificial surface against additional cost incurred as atoms are added. Local potentials simplify this. Consider a set of atoms \Lambda_{k} , which is a subset within a larger domain \Lambda_{k}\subseteq\Lambda . We want to attain correct forces on atoms in \Lambda_{k} with a local potential \Phi_{k} that has a defined cutoff radius r_{\mathrm{cutoff}} . The force on atom i\in\Lambda_{k} can be written in terms of local energies as F_{i}=\frac{\partial E}{\partial\mathbf{x}_{i}}=\sum_{j}^{j\in\mathrm{neigh}(i)}{\frac{\partial E^{k}_{j}}{\partial\mathbf{x}_{i}}} (4) where E^{k}_{j} represents the local energy of atom j as evaluated by \Phi_{k} . Due to the local nature of the potential, we only need to evaluate E^{k}_{j} for atoms that lie within r_{\mathrm{cutoff}} of atom i . For an atom that lies on the edge of \Lambda_{k} , it is clear that attaining the correct force requires evaluation of atoms up to r_{\mathrm{cutoff}} outside \Lambda_{k} . Defining the distance between two atoms i,j as d(i,j) , the buffer region \Lambda_{k\text{-buffer}} is given by \begin{split}\Lambda_{k\text{-buffer}}=\bigcup\Big\{i\in\Lambda\setminus\Lambda_{k}\,\Big|\,\exists j\in\Lambda_{k},\\ \text{ such that }d(i,j)\leq r_{\mathrm{cutoff}}\Big\}.\end{split} (5) Note that through the dependence of local energies on local atomic positions, there is an implicit dependence on atomic positions up to two cutoff radii out. Hence, r_buffer need not be any greater than the potential cutoff. Force mixing is implemented in ML-MIX through a wrapper pair_style which evaluates multiple sub- pair_styles in turn. Algorithm 4 demonstrates this process. Algorithm 4 Force mixing 1: Initialise forces to 0 2: for i \leftarrow potentials do 3: for j \leftarrow atoms do 4: if i2_potential[i][j] == 0 then 5: Remove j from neighbour list 6: end if 7: end for 8: temp_forces = potentials(i) \rightarrow compute() 9: temp_forces = temp_forces * d2_eval[i][:] 10: forces = forces + temp_forces 11: Restore neighbour list 12: end for 4.4 Si vacancy migration To generate the vacancy structure, a 10 \times 10 \times 10 (8000) atom Si super-cell was generated, and the atom nearest the centre was removed. Initial guesses for the minimum energy pathway were formed by linearly interpolating the migration of a neighbouring atom into this vacancy. Including the start and end states, 9 images were generated along this pathway, which were then relaxed using the LAMMPS NEB package. For the ML/ML simulation, the seed atoms for the expensive potential region were a union of all atoms immediately surrounding the vacancy in the final and end states. These neighbours were identified using coordination analysis with a cutoff of 4.0 Å, with all atoms that have 15 neighbours being selected. An additional 4.0 Å of core region was added around these atoms, as well as 4.0 Å of blending region. 6.0 Å of buffer region was then included, which matches the cutoff of the cheap and expensive potentials. Region rebuilding was switched off, this is because dynamically changing the expensive potential region during a relaxation will often prevent convergence. For both the all-expensive and ML/ML NEB simulations, no energy tolerance was set (as total energies are not present in the ML/ML simulation) and the force tolerance was set such that \|\mathbf{F}\|_{\infty}<0.0005 eV/Å. Tighter tolerances than this would frequently fail to converge for the ML/ML simulation. If tighter tolerances are necessary, then we recommend switching to the all-expensive regime for the last steps of a relaxation. 4.5 Si stretched bond To generate the structure, a 10\times 10\times 10 (8000 atom) periodic supercell of bulk Si was constructed and a bond in the centre of the structure was stretched an additional 0.1 Å along its length and fixed using the rigid package in LAMMPS Kamberaj et al. 2005 . This block was then pre-thermalised to 300 K in a 2 ps simulation with a Langevin thermostat using only the expensive potential. This thermalised initial structure was used as the starting point for all subsequent comparison simulations, in which the average force on this bond was recorded over 100 ps. For the all-expensive simulations, an NVE ensemble was used. For the ML/ML simulations, the seed atoms were selected to be the atoms involved in the stretched bond, no blending region was used (abrupt force mixing), as well as a weak thermostat of time constant 1.0 ps. For all simulations a buffer region size of 6.0 Å was used (which matches the cutoff of both potentials). The size of the core region was varied between simulations, as described in section. 2.3 . The expensive potential region was rebuilt about this seed atom every timestep. 4.6 Diffusion coefficients To calculate the diffusion coefficients, individual defects were placed into periodic cells of size 16 \times 16 \times 16 unit cells ( \sim 8000 atoms). Cells were heated to the target simulation temperature over 2 ps with a Langevin thermostat. For the Fe simulation, diffusion coefficients were measured at 800 K, 900 K, 1000 K and 1100 K. For W–He, diffusion coefficients were measured at 400 K, 600 K and 800 K. The reference simulations were then switched to NVE, whilst the ML/ML cells were switched to ’psuedo NVE’ with a weak Langevin thermostat (damping parameter - 2.0 ps) applied only to the cheap potential region. For the Fe simulation, each data point consisted of the average of five diffusion coefficients derived from the mean square displacements from non-overlapping time-lags of 5\times 1 ns simulations. For the W–He simulations, each point was the average of twenty-five diffusion coefficients derived from the mean square displacements from non-overlapping time-lags from 25\times 60 ps simulations. In all cases, the error was estimated from the standard deviation in the averaged diffusion coefficients. For the W–He ML/ML simulation, the seed atom was selected to be the single He present in the simulation, and regions were rebuilt around this seed atom every timestep. For the Fe ML/ML simulation, seed atoms were selected by finding the most highly coordinated atoms (on average) in the simulation every 100 timesteps. For this, measurements of atomic coordination Z (with a cutoff of 2.0 Å) were taken every 10 timesteps, and these were averaged using fix ave/atom . New seed atoms were selected according to the criteria that \langle Z\rangle>0.4 . Regions were rebuilt around these seed atoms every timestep. For the first 100 timesteps in the Fe ML/ML simulation, only the expensive potential was used. Both simulations used a core potential region of 6.0 Å around the defect atoms, as well as a blending region of 4.0 Å. For the Fe potential, a buffer width of 5.5 Å was used, whilst for the W–He potential, a width of 6.0 Å was used, matching the UF3 potential cutoff. Data availability All the data generated and analysed in the current study is available in the v0.1 version of the ML-MIX repository released on Zenodo Birks et al. 2025 . Code availability All underlying code for this study is available in the ML-MIX GitHub repository Birks, F. et al. 2025 . Competing interests All authors declare no financial or non-financial competing interests. Contribution statement FB, TDS and JRK designed the research. FB developed the software, generated the data and performed the analyses. TDS and JRK provided supervision, guidance, and feedback throughout. FB wrote the paper, with input from TDS and JRK at all stages. All authors revised the paper and approved its final version. 5 Expensive potential fitting parameters Here we present the full set of potential fitting parameters for the Fe and W-He ACE potentials used in the study. The main fitting parameters are presented in table 6 . Weights by config type for the Fe potential are shown in table 7 . For the W–He ACE, we derive energy weights for configurations following the method suggested in Witt et al. 2023 in which the energy weight on configuration R is generated by w_{R{}}=\frac{1000}{\sqrt{N_{R}}} (6) where N_{R} is the number of atoms in configuration R . For each configuration, the force weights were set to 10.0 and the virial weights were set to 0.0. Virials were not used in the fitting in order to avoid any errors introduced from underconverged (insufficient K -point density) DFT, as suggested by the dataset author Nutter et al. 2024 . The exception to this were the single W atom configurations, which had an energy weight of 4000.0, a force weight of 100.0 and a virial weight of 200.0. Table 6: Fe and W–He ACE potential parameters. Fe ACE W–He ACE Cutoff 5.5 5.0 Corr. order 3 3 Max. poly. deg. 20 20 Solver BLR BLR Smoothness prior strength 4 - Table 7: Fe ACE configuration weighting. Config type Energy weight Force weight Virial weight default 30.0 1.0 1.0 slice_sample 80.0 0.1 1.0 prim_random 80.0 0.1 1.0 6 Speedup and load balancing of mixed simulations This section provides an investigation into the speedups for load balanced and non-load balanced ML-MIX simulations in silicon with a fixed expensive potential region size for (a) a fixed number of atoms and an increasing number of processors and (b) a fixed number of processors and an increasing number of atoms. It is shown that load balancing is most important when considering small domains ( < 30,000 atoms) and fewer MPI parallel processors ( < 15). It is shown that for small domains, the speedup variability between different numbers of processors is lessened by load balancing. 6.1 Method MD simulations were conducted with Si domains at 0 K (frozen atoms). Two sets of simulations were run, set (a) where the number of atoms were fixed and the number of processors were increased between 1 and 48, and set (b) where the number of processors was fixed and the number of atoms were increased between 8\times 10^{3} and 10^{6} . For each separate simulation domain, timing measurements were carried out with (i) only the 2_10 ACE Si cheap potential, (ii) only the 4_20 ACE Si expensive potential, (iii) load-balanced and (iv) non-load balanced ML/ML simulations containing both the expensive and cheap potentials. Within each simulation domain, the same number of timesteps was used for each timing measurement (i-iv), with the number selected such that the wall-time of the longest (the all-expensive) simulation was approximately 45 minutes. To build the expensive domain in each ML/ML simulation, single seed atoms were selected at the center of each cell, around which 6 Å core regions and 6 Å buffer regions were constructed. This meant that the number of expensive potential atoms was fixed across all ML/ML simulations, regardless of overall domain size. For set (a), two atomistic domain sizes were chosen; a ‘small’ domain of 8000 atoms, and a ‘large’ domain of 262,144 atoms. For set (b), the number of processors was set at 27 for all domain sizes used. For each simulation domain investigated, the ‘upper-limit’ speedup S_{\mathrm{UL}} was computed with S_{\mathrm{UL}}=\frac{NS_{\mathrm{C/E}}}{N_{\mathrm{E}}S_{\mathrm{C/E}}+N_{\mathrm{C}}}, (7) where N is the total number of atoms in a simulation domain, N_{\mathrm{E}} and N_{\mathrm{C}} are the number of expensive and cheap atoms (including those in both buffer regions), and S_{\mathrm{C/E}} is the measured speedup of the all-cheap simulation over the all-expensive simulation in the domain of interest. Simulations were carried out on Dell PowerEdge C6420 compute nodes each with 2 x Intel Xeon Platinum 826 (Cascade Lake) 2.9 GHz 24-core processors; 48 cores per node; 192 GB DDR4-2933 RAM per node; 4 GB RAM per core. 6.2 Load balancing strategies Load-balancing is performed via the fix balance command in LAMMPS . If the time keyword is specified LAMMPS attempts to dynamically decompose the overall domain into subdomains of equal computational cost. LAMMPS has two strategies to decompose domains - ‘brick’ and ‘tiled’. With the ‘brick’ strategy, each individual sub-domain is cuboidal, and is constrained to be joined at the corners. With the ‘tiled’ strategy, each domain is also cuboidal, but not necessarily constrained to connect at corners. For more details, please refer to the comm_style page of the LAMMPS documentation Berger and Kohlmeyer 2019 . Within the fix balance command, two algorithms are available; the shift algorithm, compatible with both the ‘brick’ and ‘tiled’ decomposition strategies, and the rcb algorithm, compatible with just the ‘tiled’ decomposition strategy. For more detail on these algorithms, please refer to the fix balance page of the LAMMPS documentation Berger et al. 2019 . Each load balancing strategy was investigated, and it was found for a simple domain with one central expensive region, the shift algorithm performed marginally better when domains were small and the rcb algorithm performed marginally better when domains were large. Throughout this paper, the shift algorithm is used with the brick domain decomposition strategy. We recommend users test each load-balancing strategy to determine which works best for their system. 6.3 Results and discussion 6.3.1 Fixed atoms, increasing processors Figure 9: Speedup of ML/ML simulations over all-expensive reference simulations on an increasing number of processors for two domain sizes. In each case, the upper bound speedup (green line) is determined from equation 7 . Left: Speedup on a small (8000 atom) domain. For this domain size, one can only attain near-upper bound speedups for small numbers of processors if a load-balancing strategy is used. The effect of load balancing is very pronounced, as without it all expensive atoms frequently end up on one sub-domain, creating simulation bottle-necks. Right: Speedup on a large (262,144 atom) domain. At this domain size, one attains a near upper-bound speedup for any number of MPI parallel domains, and load balancing has a relatively minor effect. All trend-lines are fitted with Gaussian process regression. The results for simulation set (a) are displayed in Fig. 9 . For the smaller (8000 atom) domain, it can be seen that with load balancing, a near-upper-bound speedup can be attained for a number of processors below \sim 15. Above this, the load balanced simulation falls significantly below the upper-bound due to communication overheads taking up a significant fraction of the runtime. Without load balancing, the performance is on average significantly worse, but varies greatly between the number of processors chosen. Particularly poor performances are due to all of the expensive atoms landing on a single parallel domain. For the larger (262,144 atom) domain, it can be seen that near-upper bound speedup is approximately attained for any processor number, regardless of load-balancing. This arises due to every individual subdomain always being far larger than the expensive potential region. 6.3.2 Fixed processors, increasing atoms Figure 10: The measured speedup of the mixed simulation over the all expensive simulation on 27 processors, for increasing numbers of atoms. The green line indicates the maximum possible speedup (with no overheads), computed from equation 7 . It can be seen that for small numbers of atoms ( < 30,000) load balancing is important, and for large number of atoms ( \sim 10^{6} ) the speedup tends toward the upper bound. Trend lines have been fitted with Gaussian process regression. Results for simulation set (b) in which the simulation domain size is increased at a fixed number of processors (27) is shown in Fig. 10 . For smaller atomic domains ( < 30,000 atoms), it can be seen that load balancing is important, providing a considerable speedup. As the size of the domain gets larger, load-balancing becomes less important, and the overall speedup tends toward the overhead-free upper limit. 7 Impact of constrained fitting In this paper, the cheap potentials have been constrained to enforce elastic constant matching. In this section, we show that matching the elastic constants between our potentials leads to reduced errors in ML-MIX relaxed structures for less than 3% strain deviations from the bulk. 7.1 Methods A periodic 10\times 10\times 10 (8000 atom) bulk Si structure was constructed and sheared in the xy to directions to strains between 0 and 7%. For each structure, a joint ML/ML relaxation was performed using ML-MIX. The central atom and the surrounding 6 Å were modeled expensively, with the remainder of the atoms were with the constrained or unconstrained Si 2_10 cheap potentials in two separate investigations. For the relaxation, a blending region of 6.0 Å was used, as well as a relatively loose tolerance of \|\mathbf{F}\|_{2}<10^{-3} eV/Å. Smaller tolerances than this would frequently fail to converge. The strain error Du was then found for each structure as Du=\|\nabla u-\nabla u_{\mathrm{ref}}\|_{2} (8) where u is the displacement field from the ML/ML relaxed structure and u_{\mathrm{ref}} is the displacement field from the relaxed all-expensive reference. 7.2 Results and discussion Figure 11: The strain error norm Du measured for sheared and relaxed bulk Si using an ML/ML simulation compared to the all-expensive simulation for different applied shear strain. The ML/ML simulation contains a central 6 Å sphere of the expensive potential surrounded by the cheap potential. Du is far greater for small strains when using the unconstrained cheap potential, as the mismatched elastic constants to the expensive lead to Eshelby-inclusion type strain fields. Fig. 11 shows the strain error in the ML/ML relaxed structures. The spatial distribution of the error in the strain fields matches that expected from an Eshelby inclusion, and it can be seen that for very small strains \epsilon_{xy}<0.005 , the constrained potential exhibits very little error in the strain whilst the constrained potential error increases immediately. The constrained potential continues to have lower strain error up until \epsilon_{xy}=0.03 . 8 Energy conservation A fundamental limitation of force mixing is a lack of energy conservation. Whilst this has been noted in previously Bernstein et al. 2009 , the features in a force-mixed simulation that may worsen or improve energy conservation are unclear. Here we present a brief investigation where we test the impact on energy conservation of (i) having a larger interface region between potentials, (ii) having a more flexible cheap potential and (iii) introducing a larger blending region between potentials. Whilst findings presented here are derived from ML/ML simulations using ML-MIX, the findings are applicable to force-mixing simulations more generally, including QM/MM simulations. 8.1 Methods A periodic cube of Si was constructed which matches that described in section 2.3 . The spherical central region of the domain (around the fixed stretched bond) was simulated expensively, with the remainder of the domain modeled cheaply. The expensive potential was the same Si ACE used in section 2.3 . Three different cheap ACE potentials were used, fit according to the constrained fitting procedure outlined in section 4.1 . The key parameters of these potentials are displayed in table 8 . To investigate energy drift in the simulation set-up, a 50 ps, 300 K ML-MIX LAMMPS MD simulation was performed with a timestep of 1 fs. As the total energy of a force-mixed simulation is not defined, the energy was measured through evaluating snapshots output every ps with just the expensive potential. Table 8: Si cheap potential parameters. 2_10 2_15 3_15 Cutoff 6.0 6.0 6.0 Corr. order 2 2 3 Max. poly. deg. 10 15 15 Two separate investigations were conducted for each cheap potential. (a) For a set-up with no blending region (abrupt force-mixing) the size of the spherical expensive potential region was varied between 4 and 10 Å, and (b) for a fixed 10 Å core + blending region, the amount of blending region is varied between 4 and 6 Å. 8.2 Results and discussion 8.2.1 Size of potential-potential interface Figure 12: Energy drift over time for an abruptly mixed ML/ML simulation of bulk Si, using the 2_10 cheap potential. The size of the expensive region is varied between 4 and 10 Å. Left - the raw energy change for each simulation, showing that a larger expensive potential region causes a greater rate of energy increase. Right - energy change normalised by spherical interfacial contact area between potentials, showing that for a given two potentials in abrupt contact the rate of energy change per unit of contact area (energy flux) is constant. The energy over time for the abruptly force-mixed ML/ML simulations are shown on the left of Fig. 12 . Two facts are discernible from these plots: the energy drifts are approximately linear, and larger expensive potential regions lead to greater energy gain. The right hand side of Fig. 12 shows the energy gains normalised by the (approximately spherical) surface interface area between potentials. Under this normalisation, the curves collapse onto a single straight line, giving us the result that for two given potentials and a given blending regime the rate of energy increase per unit surface contact area is approximately constant. The gradient of this line can be thought of as the energy flux from the force mixing contact surface into the material caused by the local violation of Newton’s 3rd law. 8.2.2 Flexibility of cheap potential Figure 13: Left - energy flux for abruptly mixed ML/ML simulations with different cheap potentials of increasing complexity. More complex cheap potentials lead to orders of magnitude lower energy drift. Right - energy flux for ML/ML simulations with the 2_10 potential with different blending widths. The blue bar corresponds to abrupt mixing, whilst the other bars correspond to increasing amounts of blending. Increasing the blending width decreases the energy flux from the potential contact surface. Energy fluxes from ML/ML simulations of three different cheap potentials are shown on the left-hand side of Fig. 13 . Note that as the cheap potential complexity increases, the energy flux from the internal potential/potential contact surface decreases by orders of magnitude. The rationale for this is straightforward; more complex cheap potentials with greater numbers of basis functions have the flexibility to better approximate the local potential energy surface of the expensive potential, causing the violations of Newton’s 3rd law to be lesser in magnitude. 8.2.3 Width of blending region The right-hand side of Fig 13 shows how adding a blending region in the ML-MIX simulation can decrease the energy flux. The blue bar corresponds to abrupt mixing, and it can be seen that as core region is swapped out for blending region the amount of energy drift in the simulation decreases.