Chemical Reaction Networks Explain Gas Evolution Mechanisms in Mg-Ion Batteries

Out-of-equilibrium electrochemical reaction mechanisms are notoriously difficult to characterize. However, such reactions are critical for a range of technological applications. For instance, in metal-ion batteries, spontaneous electrolyte degradation controls electrode passivation and battery cycle life. Here, to improve our ability to elucidate electrochemical reactivity, we for the first time combine computational chemical reaction network (CRN) analysis based on density functional theory (DFT) and differential electrochemical mass spectroscopy (DEMS) to study gas evolution from a model Mg-ion battery electrolyte—magnesium bistriflimide (Mg(TFSI)2) dissolved in diglyme (G2). Automated CRN analysis allows for the facile interpretation of DEMS data, revealing H2O, C2H4, and CH3OH as major products of G2 decomposition. These findings are further explained by identifying elementary mechanisms using DFT. While TFSI– is reactive at Mg electrodes, we find that it does not meaningfully contribute to gas evolution. The combined theoretical–experimental approach developed here provides a means to effectively predict electrolyte decomposition products and pathways when initially unknown.


■ INTRODUCTION
Electrochemistry is increasingly applied to drive sustainable chemical and materials synthesis, 1,2 efficiently process wastewater, 3 and store renewable energy on the personal and the grid scale. 4,5 The design of electrochemical technologies in these and other areas requires a deep understanding of reactivity at electrified interfaces. Unfortunately, such an understanding is notoriously elusive, particularly due to the essential role of complex, spontaneous cascade processes. There has been recent interest in applying high-throughput experimentation and machine learning to discover electrochemical reactions and predict reaction outcomes, 6,7 yet the identification of electrochemical reaction pathways and products remains challenging. 8 Electrochemical reaction mechanisms likewise cannot be easily analyzed by experiment, 9 in part because they are frequently driven by short-lived radical and ionic intermediates. 10 Electrolyte degradation in metal-ion batteries is an example of a technologically important and highly complex electrochemical reaction cascade. In lithium-ion batteries (LIBs), electrolytes decompose upon reduction to form solid electrolyte interphase (SEI) layers, 11,12 which enable reversible lithium transport to and from the electrode while limiting or eliminating further electron transport to the electrolyte.
In order to meet growing global demand for energy storage while mitigating resource scarcity as well as geopolitical supply chain risk, 13,14 alternative battery technologies are needed. Magnesium-ion batteries (MIBs) present one such possible beyond-Li-ion technology, alleviating some of the inherent limitations of current LIBs. However, the potential of MIBs is presently unrealized because of comparatively poor cycling behavior and unfavorable electrode passivation. Most electrolytes decompose at Mg negative electrodes during MIB charging. However, rather than forming effective SEI layers as in LIBs, many MIB electrolytes degrade to produce ionically insulating films, which prevent reversible Mg plating and stripping. 15, 16 In fact, it was once widely believed that all electrolyte decomposition at Mg electrodes would lead to electrochemically inert films, 17 and the first instances of electrolytes decomposing to produce protective non-ionically insulating SEI films on Mg were only discovered in the past ten years. 18−20 Previous studies have provided relatively little detail regarding either the reaction mechanisms or decomposition products involved in MIB electrolyte decomposition and interphase formation. In most cases where MIB interphases have been characterized, 18−24 the techniques used have identified simple inorganic components (e.g., MgO, MgS, or MgCO 3 ) or bonding motifs (e.g., C�O or C�O groups), unable to provide specific insight into organic speciation. Theoretical studies using density functional theory (DFT) and ab initio molecular dynamics (AIMD) can provide more detailed insight into electrolyte reactivity. However, previous DFT studies have primarily or exclusively considered the initial steps of electrolyte decomposition, 25−27 while AIMD is generally limited to extremely short time scales (∼10 ps) at idealized interfaces. 21,28 In this work, we conduct a combined theoretical− experimental analysis to probe electrolyte degradation and gas evolution in a model MIB electrolyte�magnesium bistriflimide (Mg(TFSI) 2 ) dissolved in diglyme (G2). We perform online electrochemical mass spectroscopy (OEMS), a kind of differential electrochemical mass spectroscopy (DEMS), to detect gaseous byproducts of MIB electrolyte decomposition in situ. DEMS is a useful tool for instantaneous and quantitative detection of gaseous species evolved from solution during electrochemical testing, 29,30 and it has previously been used to quantitatively diagnose the gaseous species generated during LIB cycling. 31−33 However, DEMS has not been extensively applied to study gas evolution in MIBs. Due to the limited understanding of electrolyte decomposition in MIBs, spectroscopic interpretation for MIBs is more challenging than that for LIBs.
Computational modeling can aid in the interpretation of the experimental spectra. In particular, chemical reaction networks (CRNs) are natural tools for combined theoretical−experimental studies, as they can be applied to identify important species in a reactive system and even study reactive dynamics. 34 We recently developed a general CRN methodology 35 to automatically predict CRN products, as well as reaction pathways to form those products. Here, for the first time, we combine this platform with experimental characterization techniques to understand reactivity in batteries. We construct the first ever CRN describing MIB electrolyte decomposition and SEI formation at the Mg plating potential. By screening the predicted products of this CRN by their calculated liquid−gas solubility, we are able to identify possible evolved gases and from these positively identify the gases observed experimentally in OEMS. Analyzing elementary reaction mechanisms for the formation of these possible gases, we explain why some gases form while others do not. Our approach of combining CRN analysis with experimental spectroscopy provides a path forward for the in-depth analysis of chemical transformations in next-generation electrochemical systems with minimal prior knowledge. ■ COMPUTATIONAL METHODS Species and Molecular Property Data Set. A data set of species relevant to Mg(TFSI) 2 /G2 electrolyte decomposition and interphase formation, the MAgnesium Dataset of Electrolyte and Interphase ReAgents (MADEIRA), was constructed using highthroughput DFT. The approach taken for the construction of this data set was similar to that used to develop the lithium-ion battery electrolyte (LIBE) data set reported previously. 36 Electrolyte species (including G2, TFSI − , and related complexes with Mg ions) and known or suspected products were broken down into a set of fragment molecules. Due to limited experimental characterization, the products included were only inorganic species (e.g., MgSO 3 ) and small molecule gases (e.g., H 2 ). For each fragment, we obtained an optimized geometry, Gibbs free energy, and other properties (including atomic partial charges and atomic partial spin) using DFT with the ωB97X-V density functional, 37 def2-TZVPPD basis set, 38 and solvent model with density (SMD) 39 with solvent parameters for G2. 40 We denote this level of theory as ωB97X-V/ def2-TZVPPD/SMD(G2). Additional species were included based on selective recombination of the fragments. All calculations were conducted using the Q-Chem electronic structure code, version 5, 41 and calculations were conducted in high throughput using the atomate 42 and custodian 43,44 libraries.
The complete data set obtained using this procedure is available on Figshare. 45 We note that, because few products�and essentially no organic or polymeric products�of Mg(TFSI) 2 /G2 electrolyte decomposition have been positively identified, we were not able to use knowledge of such products to improve the coverage of the data set. As a result, the set of species obtained by this fragmentation− recombination procedure is almost certainly incomplete, with key species relevant to electrolyte decomposition and SEI formation likely missing. Work to expand this data set is ongoing. We also note that we intend to describe this data set in further detail in a future publication.
■ CRN GENERATION Solvation Correction. While implicit solvation methods such as SMD are suitable for solution-phase calculations involving neutral and charged organic species, they severely underestimate the stabilizing effect of solvent on metal ions. 35 To correct the (free) energies of species with undercoordinated Mg ions in our reaction network, we calculated the average effect of each coordinate bond on the Mg 2+ and Mg 1+ ions. We optimized Mg 2+ (G 2 ) n and Mg 1+ (G 2 ) n clusters using DFT in Q-Chem, with n ∈ {0, 1, 2}. To lower the cost of these calculations, we optimized the clusters at the ωB97X-D/ def2-SVPD/PCM 38,46,47 (ε = 7.23) level of theory, with singlepoint energy corrections performed at the ωB97X-V/def2-TZVPPD/SMD(G2) level of theory as described above. We found (Supporting Information Figure S13) that each Mg−O coordinate bond stabilized Mg 2+ by 1.37 eV, while Mg 1+ was stabilized by 0.49 eV for each coordinate bond. In network construction, these values were modified slightly to 1.49 and 0.56 eV, respectively, in order to make the expected coordination reactions slightly exergonic.
If any Mg ions are undercoordinated, then the free energy is lowered by the correction factors for each "missing" coordinate bond. We use partial charges obtained from Natural Bonding Orbital (NBO) version 5.0 48 analysis to determine the charge state of each Mg ion in order to apply the appropriate correction. When determining the number of "missing coordinate bonds", we assume that Mg 2+ generally prefers a 6-fold coordination and Mg 1+ prefers a 5-fold coordination.
As in our previous study, 35 when calculating reaction free energies for oxidation or reduction reactions, we used an uncorrected free energy. This is especially important for reduction reactions involving Mg due to the different preferred coordination environments of Mg 2+ and Mg 1+ . In addition, we do not apply a solvation correction when calculating the energy barriers. The assumptions implicit in performing a correction for metal-ion solvation, namely, that the ion is always in an equilibrium solvation structure, break down when considering transition states, which are inherently nonequilibrium structures.
Species Filtering. We used the high-performance reaction generation (HiPRGen) method 35 to automatically construct CRNs from an initial set of species and their properties. HiPRGen is designed for cases where potential energy surface (PES) exploration techniques (stochastic surface walking, 49 AIMD, etc.) are too expensive to thoroughly capture the reactivity of a system and for which reaction patterns are not sufficiently well understood to allow the use of prescriptive reaction templates. HiPRGen has previously been used to construct and analyze CRNs relevant to electrolyte degradation and SEI formation in LIBs 35,50 but has not previously been applied to study MIBs.
Instead of using PES exploration or templates, HiPRGen constructs CRNs by using extensible filters. For this work, the following types of species were excluded: • Molecules containing neutral or negative metal ions, where the charges are calculating by applying NBO to a single-point energy calculation at the ωB97X-V/def2-TZVPPD/SMD(G2) level of theory • Molecules composed of two or more disconnected fragments • Metal-centric complexes, where two or more nonmetal fragments are connected only by coordinate bonds to Mg ions • Molecules with a charge less than −2 or greater than 2 In addition to these filters, we ensure that there are no redundant species. That is, if multiple molecules exist with the same charge, spin multiplicity, and structure (neglecting coordinate bonds with metal ions), then we include only the molecule with the lowest solvation-corrected free energy. Using these filters, an initial set of 11,502 species was reduced to 6,469 species.
Reaction Filtering. After the species have been filtered, HiPRGen enumerates all possible stoichiometrically valid unimolecular or bimolecular reactions between these species. Because we are interested in electrochemical processes, where the electrolyte system is open to electrons, these stoichiometrically valid reactions conserve mass but do not necessarily conserve charge. Then, the stoichiometrically valid reactions are filtered in much the same way as the species are filtered. For this work, we used the same set of reaction filters that we previously reported. 35 As some examples, we remove: • Endergonic reactions with ΔG > 0 eV • Reduction or oxidation reactions involving more than one electron (|Δq| > 1) • Reactions involving spectators that do not directly participate • Reactions involving more than two covalent bonds changing simultaneously In total, we obtained 92,812,997 unique reactions using this filtering procedure.
Identification of CRN Products. We employed the Gillespie algorithm, 51,52 a stochastic method, to sample the reactive space defined by the HiPRGen-generated CRN. In order to explore as many diverse reaction pathways as possible, we conducted simulations with various initial states: The choice to include 30 of each initial species is arbitrary and was determined empirically. Simulations involving too few molecules in the initial state will not allow many reactions to be sampled, while simulations involving many molecules will complete more slowly. For each initial state, 50,000 trajectories of at most 250 steps were conducted. For each of the five sets of simulations, we obtained stepwise average trajectories. The smoothing of the average trajectories (Supporting Information Figures S8−S12) indicates convergence to the exact expected behavior and confirms that we have sampled sufficiently. All simulations were conducted at the equilibrium potential of Mg (0 V vs Mg/Mg 2+ ).
Using the average trajectories, we automatically identified the CRN products. These CRN products are not necessarily the products of the corresponding real chemical system, but we have previously found 35 significant overlap between CRN products and experimentally observed products in battery electrolyte systems. CRN products are defined using three heuristics previously described by Barter, Spotte-Smith, et al. 35 Specifically, a CRN product has a formation:consumption ratio of at least 1.5 (the species must be formed three times as a product of a reaction for every two times it is consumed as a reactant), has an average amount of at least 0.1 in the final state (at least one of the species remains at the end of every ten trajectories), and can be formed via a pathway with a cost lower than 10, where the cost of a reaction is Φ = exp(ΔG/ k B T) + 1 and the cost of a pathway is the sum of the costs of the elementary steps involved. We further remove CRN products that are open-shell, as we generally believe that radical species should be short-lived. The CRN products vary depending on the initial conditions. A description of all predicted CRN products can be found in the Supporting Information (see Figures S14−S16).

Discovery of Elementary Reaction Mechanisms.
We identified elementary reaction mechanisms using the AutoTS workflow, 53 which is powered by Jaguar's electronic structure code. 54 All initial transition state searches were conducted using the ωB97X-D density functional with the def2-SVPD(-f) basis set and the PCM implicit solvent model with water as a solvent. A single-point energy correction was then applied by using the ωB97M-V functional 55 with a larger def2-TZVPD basis set and the PCM implicit solvent model. We note that ωB97M-V is exceptionally accurate for calculations of the reaction energy barriers and reaction thermodynamics. 56 All transition states were validated by confirming that they connect the expected reaction end points. All energy barriers reported in this work are based on an infinite-separation approximation; that is, the free energies of reaction reactants and products are calculated from the free energies of individual isolated species rather than reaction entrance or exit complexes.
Calculation of Reduction Potentials. When constructing and analyzing CRNs, we intentionally remove clusters with multiple molecules bound to Mg ions (see Species Filtering above). In part, this is necessary in order to limit the size of the CRN. However, this means that essentially all Mg ions in our data set are undercoordinated. As we note (see Solvation Correction), for chemical reactions, we can account for this undercoordination via a simple linear correction to the free energy, but the same correction cannot easily be applied to reduction reactions, especially if Mg ions are being reduced.

Journal of the American Chemical Society pubs.acs.org/JACS Article
Here we report reduction potentials based on calculations in an implicit solvent at the ωB97X-D/def2-SVPD(-f)/PCM// ωB97M-V/def2-TZVPD/PCM level of theory. From the Gibbs free energies of the reduced and nonreduced species, the reduction potential is calculated as where the Gibbs free energies are reported in eV and the shift by 2.08 V is necessary in order to report potentials referenced to a Mg/Mg 2+ electrode. In the Supporting Information (Table  S1), we also calculate reduction potentials where Mg ions are fully solvated by an explicit solvent shell. Estimation of Solubility in Diglyme. We calculate the liquid−vapor solubility limits of CRN products in G2 where VP is the vapor pressure of the solute (in atmospheres or atm), P 0 is the pressure of a standard-state (1 M) ideal gas at room temperature (24.45 atm), R is the ideal gas constant (8.314 J mol −1 K −1 ), T is the absolute temperature (298.15 K for room temperature), and ΔG solv is the free energy of solvation. This equation assumes that the solutes of interest behave ideally in both the gas and solution phase. We also neglected the effect of the dissolved salt in G2 and treated the solvent as a pure organic liquid. We predict the vapor pressure of CRN products using the SIMPOL 57 group contribution method (as implemented in UManSysProp), 58 and we calculate the free energy of solvation using SMD (specifically, via DFT calculations at the ωB97X-V/def2-TZVPPD/SMD-(G2) level of theory). Because SIMPOL is specifically designed for multifunctional organic compounds, we instead provide experimental vapor pressures at room temperature for H 2 and H 2 O. We note that ab initio prediction of gas solubility limits is deeply challenging and an area of ongoing research. The method employed here was chosen for its ease and simplicity rather than for its accuracy. While we believe it is sufficiently accurate to distinguish between species that should or should not evolve as gases from an electrolyte, we do not expect quantitatively accurate predictions of solubility limits. ■ EXPERIMENTAL METHODS Electrolyte Preparation. All reagents and solvents were prepared using a Schlenk line or glovebox (with <1 ppm of O 2 and <1 ppm of H 2 O) under an argon atmosphere. Mg(TFSI) 2 (99.5%, Solvionic) was dried under a vacuum at 170°C for 24−48 h prior to use. G2 (anhydrous, 99%, Sigma-Aldrich) was distilled over calcium hydride and stored on 3 and 4 Å molecular sieves. The distilled G2 had a water content of <5 ppm of H 2 O as measured by a Karl Fischer Coulometer Titrator. Mg(TFSI) 2 /G2 solutions were prepared in a glovebox with a volumetric flask charged with the appropriate amount of predried Mg(TFSI) 2 powder dissolved in distilled G2 solvent.
Online Electrochemical Mass Spectrometry. Device Configuration. Online electrochemical mass spectrometry (OEMS), one category of the differential electrochemical mass spectrometry (DEMS), was used for the instaneous and quantitative analysis of the gaseous species generated during electrochemical experiments. A schematic of our OEMS experimental setup is provided in the Supporting Information ( Figure S1).
In our work, a modified capillary OEMS was used, which consisted of a supporting inert gas as a flow carrier (He) and a capillary inlet for Journal of the American Chemical Society pubs.acs.org/JACS Article mass spectroscopy. It has a moderate response time of 16 s, and the flow rate was controlled at ∼20 μL/min by a flow meter. Other features in our OEMS include (1) the ability to evacuate and flush the system with He after the DEMS cell was assembled inside the glovebox, (2) calibration to quantify the gaseous generation amount in real time, and (3) a flow system to enable detection of a small amount of gas production. An FMA-2600/FVL-2600 SERIES Mass and Volumetric instrument from OMEGA was used to control the flow rate of a He tank. The Hiden HPR-40 DEMS system was equipped with a quadrupole mass spectrometer and a QIC UF microflow capillary inlet (type 303452) with a flow rate of 12 μL/min. A PX409-015GUSBH (Pressure Sensor, 15 psi, Digital, Gauge, 1/16 in.) transducer was used to measure the real-time pressure in order to quantify gaseous species. A total of five manual Swagelok ball valves (SS-41GS1) were incorporated into the system to allow evacuation of the gas line and control of the flow rate/testing. An ECC-DEMS cell from El-cell was used.
Electrochemical Measurements. A two-electrode setup was used for the experiments, with polished Mg metal as the counter electrode (CE) and reference electrode (RE) and a gold disc (Φ = 8 mm, Au, Aldrich, 99.99%, 0.1 mm thick) as the working electrode (WE). We note that Au can alloy with Mg, but under typical electrochemical experimental conditions, the extent of alloying is minimal, with only nanoscale alloy regions. 59 We therefore expect that Au will not significantly affect the electrochemistry and reactivity of plated Mg.
OEMS Calibration. A calibration and conversion are required in order to report OEMS measured intensities in terms of either partial pressure or molar flow. The relative signal intensity of a species with mass-to-charge ratio M/Z (x M/Z ) is calculated as where S M/Z is a machine-specific sensitivity factor, B M/Z is the background intensity, I M/Z is the measured intensity at the mass-tocharge ratio of interest, and I total is the total measured intensity. Using the cell pressure P total , the relative signal intensity x M/Z can be converted to a partial pressure From there, the quantity of gas detected (in moles) can be obtained using the ideal gas law where R is the ideal gas constant, T is the absolute temperature in Kelvin, and V is the head space volume in the DEMS cell. X-ray Photoelectron Spectroscopy and Scanning Electron Microscopy. Mg cycling and deposition for ex situ analyses were performed on planar Pt(111) textured substrates in a custom-built Teflon cell containing a Mg rod CE, Mg wire RE, and a WE area of 0.2 cm 2 . These substrates were prepared by evaporation of the noble metal onto Ti-coated Si wafers and were cleaned prior to use with acetone, 3:1 H 2 SO 4 :H 2 O 2 (piranha solution), and deionized water, successively. Deposited Mg films were successively rinsed in G2 and 1,2-dimethoxyethane. Samples were transferred for X-ray photoelectron spectroscopy (XPS) using an inert transfer capsule. XPS was performed on a Kratos Axis Ultra spectrometer using a monochromatic Al Kα source. Analyses were performed on films after 10 s of Ar + sputtering, and quantification was performed using CasaXPS software. SEM was performed on an FEI Magellan microscope.
■ RESULTS AND DISCUSSION OEMS. A 0.5 M Mg(TFSI) 2 /G2 electrolyte was used to plate Mg onto Au at a cell voltage of −1.0 V for approximately 4 h in the OEMS system described above. The electrochemical and OEMS measurements are shown in Figure 1; cyclic voltammetry data are shown in Supporting Information Figure   S2. The current density during the potentiostatic hold ( Figure  1a) is initially high (−2.65 mA/cm 2 ) but gradually decreases in magnitude over time as a result of the increased resistance caused by electrode passivation. The dynamic resistance of the electrode interfaces is also evident from the sudden changes in current which occur at varying intervals.
The OEMS signal over the course of the experiment was integrated in order to identify the major peaks (Figure 1b; snapshot OEMS spectra are presented in Supporting Information Figures S3−S7). We ignore peaks at M/Z = 2, 4, 20, and 40, as these correspond to the carrier gas (He, M/Z = 2, 4) or Ar (M/Z = 20, 40) that was trapped in the Mg(TFSI) 2 /G2 electrolyte after the electrolyte was distilled and the DEMS cell was assembled in an Ar-filled glovebox. Other major peaks include those at M/Z = 18, 28, 32, 36, and 45.
From the time-resolved measurements (Figure 1c), we find that the signal at M/Z = 18 is relatively stable after an initial increase, while the signals at M/Z = 28, 32, and 36 all reach a maximum at ∼1 h and afterward gradually decrease. In contrast (Figure 1d), the M/Z = 45 flow rapidly decays to a near-zero signal in the first few minutes of the experiment.
This initial difference in signal over time suggests that the species detected at M/Z = 18, 28, 32, and 36 are products of ongoing reactivity, while the species detected at M/Z = 45 either is a decomposition product that can only form under highly specific conditions or is not indicative of a decomposition product at all. Given that this OEMS experiment was conducted in a constant-potential regime in which Mg is consistently plated (see Supporting Information Figure S2 for evidence of plating), we believe that the latter possibility is more likely. We suggest that the M/Z = 45 signal is likely indicative of G2 itself rather than a product of G2 decomposition formed at the Mg electrode. The initially high M/Z = 45 signal reflects evaporated G2 that built up in the DEMS cell during preparation; after this initial G2 is purged, evaporation continues slowly, resulting in a lower signal during the remainder of the experiment. We note that OEMS is typically not sufficiently specific to allow for positive identification of specific gases or molecular fragments. M/Z = 28, for instance, could indicate diatomic nitrogen (N 2 , M = 28 amu), carbon monoxide (CO, M = 28 amu), or ethylene (C 2 H 4 , M = 28 amu), among other possibilities.
Identification of Observed Gases. In order to determine the identity of the major observed species, we constructed a CRN containing species that could be relevant to the decomposition of Mg(TFSI) 2 /G2 electrolytes and the subsequent interphase formation. Using stochastic simulations under five different initial conditions (see Identification of CRN Products), we identified 85 of an initial 6,469 species as CRN products (see the Supporting Information for more discussion). We believe that most electrolyte decomposition products will either precipitate and contribute to an interphase layer or otherwise be soluble in the electrolyte. Therefore, we filtered the predicted CRN products by their predicted solubility in G2 (S G2 ), using eq 2. Expecting considerable error in the prediction of S G2 , we remove any predicted CRN product with a predicted solubility >5 M. We also remove ionic CRN products and CRN products containing Mg, as we expect such species to be considerably more stable in solution than in the gas phase.
With these criteria, we predict that 14 of the 85 CRN products could evolve out of the solution and be detected by This supports our previous suggestion that the M/Z = 45 signal does not correspond to a decomposition product but instead comes from another source, such as evaporated G2. We further suggest that the M/Z = 36 signal corresponds to an impurity species, rather than a decomposition product of either G2 or TFSI − . Considering that chloride (Cl − ) is an impurity in commercial Mg(TFSI) 2 , 60 we tentatively assign the M/Z = 36 peak to hydrogen chloride (HCl). This assignment is also consistent with the presence of a minor M/Z = 38 signal. The ratio of the integrated M/Z = 36 signal and the M/Z = 38 signal is 4.67, which is close to the ratio of the natural abundances of 35 Cl to 37 Cl (3.17). 61 Validating Predicted Major Products. To confirm that the peak assignments based on CRN products are reasonable, we identified formation pathways to several CRN products using the previously constructed CRNs and then used DFT to construct the elementary reaction mechanisms.
There are several plausible pathways that lead to the formation of C 2 H 4 ( Figure 3a). All identified pathways initialize with Mg 2+ being partially reduced in the presence of G2 (M 1 → M 2 ). It has previously been reported that the partial reduction of Mg 2+ ions to the highly reactive radical Mg 1+ can promote electrolyte decomposition. 25,27 We predict that this reduction can occur at 0.64 V vs Mg/Mg 2+ ; however, this and all other reported reduction potentials with Mg ions present depend on the solvation environment of the metal ion (see the Supporting Information). Seguin et al. 27 previously showed that the partially reduced complex M 2 can cleave either of the internal C−O bonds with ΔG ⧧ = 0.42 eV due to a bifurcation of the potential energy surface. If a methoxide ion (CH 3 O − , M 3 ) is eliminated, we find that the remaining Mg-  coordinated fragment (M 4 ) can subsequently reduce (E°= 3.51 V) and eliminate C 2 H 4 with a low barrier of ΔG ⧧ = 0.15 eV. Alternatively, a radical CH 3 OCH 2 CH 2 • (M 6 ) can be eliminated. CH 3 OCH 2 CH 2 • can then coordinate with an additional Mg 2+ and reduce (M 6 → M 8 , E°= 3.89 V), producing C 2 H 4 with another low barrier (ΔG ⧧ = 0.27 eV). Though this latter mechanism involving CH 3 OCH 2 CH 2 • is more difficult, we nonetheless believe that it could occur, given that M 3 + M 4 and M 5 + M 6 are essentially equally likely to form from the initial cleavage of the C−O bonds in G2.
If methoxide is present, for instance, because of the mechanisms reported in Figure 3a, then the formation of methanol is facile and straightforward (Figure 3b (Figure 2), we do not find evidence for significant methoxyethene evolution, perhaps because the deprotonation leading to M 12 is slower than that leading to M 13 . The decomposition of M 13 instead produces magnesium methoxide (M 13 → M 10 + M 15 , ΔG ⧧ = 0.26 eV), which could generate further methanol by the mechanism just described. This suggests that methanol formation in G2 electrolytes may be autocatalytic; once methoxide is initially formed, it can be continually reformed via chemical reactions with G2.
Hydroxide ions can react with Mg-coordinated G2 similarly to methoxide, abstracting a proton to form water (M 1 + M 16 → M 13 + M 17 , ΔG ⧧ = 0.23 eV). We note that this hydroxide could be free in the electrolyte solution (due to trace water) or could be present in the form of Mg(OH) 2 , which should be expected on Mg electrodes. Hydroxide could also potentially arise from the reduction and decomposition of CH 3 OH. The finding that G2, upon chelating Mg, can be deprotonated by hydroxide is in agreement with the prior work of Yu et al. 21 We note that the reduction potential of water is >1.5 V vs Mg/Mg 2+ ; 62 hence, we expect that, during charging of an MIB, water should quickly reform hydroxide, creating yet another potential autocatalytic loop.
Explaining Absent Gases. While several of the gases predicted to form via CRN analysis appear to be likely major products of G2 decomposition, namely, C 2 H 4 , CH 3 OH, and H 2 O, many of the predicted gaseous CRN products are not observed by OEMS. Just as we have used elementary reaction mechanism analysis to validate our spectroscopic peak assignment, indicating pathways that could reasonably lead to the identified gaseous CRN products, we can also suggest mechanistic explanations for why other gases are not evolved. Here, we consider three gases that were not observed experimentally in significant quantities: methane (CH 4 ), ethane (C 2 H 6 ), and dimethyl ether (CH 3 OCH 3 ).
Reaction mechanisms leading to CH 4 are shown in Figure  4a The formation of ethane (Figure 4b) is also kinetically limited. Like CH 4 , C 2 H 6 requires methyl radicals via the reaction M 2 → M 18 + M 19 . M 18 could directly attack either M 19 or M 1 , transferring another methyl group to form C 2 H 6 . However, these reactions suffer from extremely high barriers of ∼1.8 eV, and we therefore do not believe that they will occur under normal battery cycling conditions. If the methyl group reduces (E°= 0.91 V vs Mg/Mg 2+ ) to form a methanide anion (M 27 , CH 3 − ), a similar methyl transfer reaction can occur (M 27 + M 19 → M 25 + M 28 ); while this reaction is considerably more facile than those involving M 18 , it is still sluggish at room temperature, with ΔG ⧧ = 0.87 eV. DFT is known to exhibit deficiencies in the prediction of energy barriers for radical− radical reactions, which is why we did not consider the reaction CH 3 • + CH 3 • → C 2 H 6 (or M 18 + M 18 → M 25 ). Intuitively we believe that this reaction has a low barrier or is perhaps even barrierless. However, it would require two methyl radicals to form separately in close proximity, which seems unlikely considering that the decomposition of G2 to form CH 3 • is not preferred.
We find that dimethyl ether can form via methoxide ( Figure  4c). The methoxide ion can attack a Mg-coordinated G2 in a single step (M 1 + M 3 → M 19 + M 30 , ΔG ⧧ = 0.82 eV). Because the formation of methanol by proton abstraction (e.g., M 1 + M 3 → M 11 + M 13 ) is considerably more facile, dimethyl ether should not be expected to form, or should form only as a minority product.
The Role of TFSI − . Bistriflimide anions are known from both theoretical and experimental studies to be reductively unstable under MIB charging conditions. 22,23,25,63 It might therefore be expected that some fragments of TFSI − will be involved in gas evolution. Indeed, of the 14 potential gaseous   28 suggest that TFSI − might catastrophically decompose and even atomize at Mg interfaces, particularly if coordinated with Mg 2+ . The results of Agarwal, which are based on simulations in the presence of an idealized, completely clean Mg electrode surface (with highly undercoordinated and therefore reactive Mg), may not explain TFSI − reactivity in all cases, for instance, if a robust SEI layer or even thin oxide layer is present to shield the electrolyte from a Mg metal electrode. However, in our experiment, we continuously plate Mg metal, potentially exposing fresh interfaces that can react with the electrolyte. We suggest that TFSI − decomposes at this newly formed metal interface, forming primarily solid deposits rather than small molecules and gases.
Surface analysis provides further evidence that TFSI − forms solid deposits on the metallic Mg surface. We cycled a 0.3 M Mg(TFSI) 2 /G2 electrolyte between −0.6 and 3.0 V vs Mg/ Mg 2+ 10 times on a Pt WE (Figure 5a) to determine if accumulation of a reaction product occurs with Mg deposition. During cycling, we used XPS to analyze the elemental composition of the surface film on the electrode (Figure 5b). Before cycling, the surface film was primarily composed of carbon (84.5%), with some oxygen (12.7%) and Mg (2.7%), and essentially no fluorine or sulfur. These results suggest that, whereas G2 (containing C, O, and H, the latter of which cannot be detected by XPS) or G2 decomposition products from conditioning might be inherently unstable at a Pt surface, TFSI − (containing C, O, F, N, and S) is not inherently reactive. After the first cycle, some F (1.6%) and S (1.9%) are observed, indicating that TFSI − reacts electrochemically and that the products of TFSI − decomposition deposit on the electrode surface. The extent of TFSI − decomposition increases upon cycling, and by the 10th cycle, the surface film is 12.2% F and 6.5% S indicating accumulation of TFSI − reaction products. Notably, the atomic fraction of Mg in the surface film also increases with cycling, reflecting a degree of passivation-induced Mg stranding ( Figure S17) as well as a loss of Mg inventory and battery capacity during cycling.
In addition to precipitated solid species, there is some evidence that TFSI − decomposition could result in products that are soluble in G2. A recent study on the effect of impurities in MIBs with glyme solvents by Yang et al. 67 applied electrospray ionization mass spectroscopy (ESI-MS) to study electrolyte speciation. The authors observed several F-and Ncontaining species in the electrolyte; because these were seen only in the conditioned electrolytes, these species could come from only TFSI − decomposition.

■ CONCLUSION
In this work, we used OEMS, CRNs, and DFT to identify gaseous byproducts of electrolyte decomposition in MIBs. From a CRN of over 6,000 species, we identified 14 possible gaseous species that could form from Mg(TFSI) 2 /G2 electrolytes. Of these, three (C 2 H 4 ,CH 3 OH, and H 2 O) were consistent with major peaks in the observed OEMS spectra. We validated our peak assignments by identifying elementary reaction mechanisms for these three species, finding in all cases that the species could be easily formed via Mg-coordinated G2 (and, in the case of H 2 O, hydroxide ions). On the basis of reactive competition, we rationalized why other gases (CH 4 , C 2 H 6 , and CH 3 OCH 3 ) that were predicted to form may not actually emerge during MIB cycling. Although TFSI − decomposes at Mg metal electrodes and during Mg plating, we find that TFSI − does not itself form any gaseous species nor is it necessary to assist in the decomposition of G2. Rather, we suggest that TFSI − primarily forms solid deposits on the electrode and potentially forms some products that are soluble in G2.
The methodology described here enables facile in-depth analysis of in situ spectroscopy in electrochemical systems via powerful computational tools. While we have here focused on a model system in order to compare our results with previous experimental and theoretical findings, we believe that an approach mixing first-principles simulations, CRN exploration, and spectroscopy is especially well suited to allow for the characterization of completely novel electrolytes in which nothing is known regarding reactivity, decomposition products, and SEI formation. DEMS is a highly attractive point of comparison due to its high resolution, but CRN-assisted analysis of other spectroscopic measurements, such as infrared and nuclear magnetic resonance spectroscopies, should also be considered.

■ ASSOCIATED CONTENT Data Availability Statement
The computational data used in this study is publicly available in a Figshare repository (DOI: 10.6084/m9.figshare.22189810.v1). Two Javascript Object Notation (JSON) files are included in this repository. madeira.json includes the properties (including structural, electronic, bonding, vibrational, and thermodynamic properties) of the 11,502 species in the MADEIRA data set. pathway_data.json includes a more limited set of structural and thermodynamic properties calculated for all minima and transition states reported in this work, labeled as they are in Figures 3 and 4.
Schematic of the experimental setup; cyclic voltammetry data; snapshot OEMS spectra; discussion of solvent corrections to free energy; discussion of predicted reduction potentials with and in the absence of explicit solvent; further description of CRN products; average stochastic trajectories obtained during CRN analysis; SEM images (PDF) Journal of the American Chemical Society pubs.acs.org/JACS Article ■ AUTHOR INFORMATION