  We present a rigorous analysis of the Magnesium Aluminum Chloro Complex
(MACC) in tetrahydrofuran (THF), one of the few electrolytes that can
reversibly plate and strip Mg. We use \emph{ab initio} calculations and
classical molecular dynamics simulations to interrogate the MACC electrolyte
composition with the goal of addressing two urgent questions that have puzzled
battery researchers: \emph{i}) the functional species of the electrolyte, and
\emph{ii}) the complex equilibria regulating the MACC speciation after
prolonged electrochemical cycling, a process termed as conditioning, and after
prolonged inactivity, a process called aging. A general computational strategy
to untangle the complex structure of electrolytes, ionic liquids and other
liquid media is presented. The analysis of formation energies and
grand-potential phase diagrams of Mg-Al-Cl-THF suggests that the MACC
electrolyte bears a simple chemical structure with few simple constituents,
namely the electro-active species MgCl$^+$ and AlCl$_4^-$ in equilibrium with
MgCl$_2$ and AlCl$_3$. Knowledge of the stable species of the MACC electrolyte
allows us to determine the most important equilibria occurring during
electrochemical cycling. We observe that Al deposition is always preferred to
Mg deposition, explaining why freshly synthesized MACC cannot operate and needs
to undergo preparatory conditioning. Similarly, we suggest that aluminum
displacement and depletion from the solution upon electrolyte resting (along
with continuous MgCl$_2$ regeneration) represents one of the causes of
electrolyte aging. Finally, we compute the NMR shifts from shielding tensors of
selected molecules and ions providing fingerprints to guide future experimental
investigations.
