Mg 2+ storage and mobility in anatase TiO 2 : the role of frustrated coordination †

Anatase TiO 2 is a candidate high-power electrode material in Li-ion and Na-ion batteries and has been explored as a Mg battery cathode material, although Mg capacity in undoped anatase is limited. Here we use hybrid-exchange density functional theory calculations to investigate the underlying factors a ﬀ ecting Mg intercalation and mobility in anatase. We ﬁ nd that at the dilute limit, Mg ions have 5-fold coordinated insertion sites, and activation barriers for migration are a surprisingly low 537 meV. As the concentration of Mg inserted into the structure is increased, a cooperative distortion of the lattice occurs, contracting the c lattice parameter. The distortion results in stable orderings of Mg ions in sites which are 6-fold coordinated, but also results in migration barriers that exceed 1500 meV in Mg 0.5 TiO 2 due to a collective relaxation of the host lattice. The total increase in barrier is predominantly a result of the stabilisation of the insertion sites, as opposed to a destabilisation of the activated sites along the migration pathway. The insertion sites in the dilute limit can be described as frustrated, and it is this unfavourable insertion geometry under dilute conditions that allows the Mg ions to migrate with low activation barriers. The limited performance for Mg 2+ storage can therefore be attributed to the loss of frustrated coordination at high Mg concentration, which restricts Mg mobility and therefore capacity. Strategies to enhance the capacity of Mg in anatase should therefore aim to inhibit the c lattice parameter contraction or otherwise destabilise stable orderings of Mg in Mg 0.5 TiO 2 to retain the frustrated coordination of Mg ions at high Mg concentrations.


Introduction
Magnesium batteries are an alternative to those using lithiumion chemistry and are attractive for portable applications, potentially offering comparative or improved specic capacities to current Li-ion technology, and signicant advances in volumetric capacity. [1][2][3] Lithium metal anodes grow dendrites upon cycling, which ultimately lead to battery short circuiting. 4 To avoid this issue, graphite is used as an intercalation host at the anode for Li-ion batteries, but this limits the anode volumetric capacity to $800 mA h cm À3 . Magnesium metal anodes plate more uniformly upon cycling, 5 and thus the intercalation host can be avoided at the anode end, enabling a volumetric capacity of 3833 mA h cm À3 for Mg metal.
Mg is heavier and less electropositive than Li, but these decits are compensated by its divalency and the reduced weight of a battery design that avoids the anode intercalation host, meaning specic capacities of Mg battery systems can approach or exceed those of Li-ion batteries using a graphite anode. 2 Magnesium is also inherently safer than lithium in a battery system, and is far more abundant and cheaper than lithium, making it a more scalable technology for future energy storage solutions. Issues nding Mg battery electrolytes compatible with both electrodes remain, 3 however a key bottleneck in the development of Mg batteries is the search for a suitable cathode material. 2 Intercalation of divalent ions presents a number of challenges compared to monovalent ions. Multivalent cathode materials are more prone to conversion reactions, and this is a particular issue for Mg due to the high thermodynamic stability of MgO. 2 Divalent Mg ions also experience a stronger electrostatic interaction with the anionic framework of the cathode host than Li ions, so despite their similar size, Mg ions typically experience signicantly higher activation barriers for movement, leading to poor kinetics. 6 Suitable cathode materials are therefore limited.
The pioneering work of Aurbach rst demonstrated that Mg battery chemistry was possible, yet the Chevrel phase Mo 6 S 8 cathode used offered a limited voltage. 7 Since this work, extensive experimental and computational work has investigated materials that may be suitable for Mg intercalation cathodes, oen motivated by their known performance as Li-ion intercalation hosts. 2 One of the materials that has been the subject of numerous studies as Li intercalation host is TiO 2 . [8][9][10] Despite not offering high operating voltages, the anatase 11 and TiO 2 (B) 12 polymorphs of titania show good rate performance for Li intercalation, making them attractive for high power applications. Anatase TiO 2 has also been explored as a possible cathode material for Na-ion batteries. 13 As a Mg-battery cathode, intercalation to Mg 0.5 TiO 2 provides a high theoretical capacity of 294.5 mA h g À1 . Furthermore, anatase TiO 2 displays excellent stability, and the low toxicity and high abundance of titanium make TiO 2 an attractive sustainable battery material.
Comparatively, there has been little research on TiO 2 polymorphs as a Mg battery material. Early work by Sheha achieved only limited capacities using an anatase cathode and a Mg anode. 14 Su et al. used a LiBH 4 /Mg (BH 4 ) 2 /tetraglyme electrolyte and a Mg metal anode to achieve a reversible low rate (0.2C) capacity of 145 mA h g À1 , and 85 mA h g À1 at rates of 2C, with an anatase cathode demonstrating co-intercalation of Mg and Li. 15 A similar hybrid Li + /Mg 2+ electrochemical setup by the same group achieved pseudocapacitive storage of 115 mA h g À1 at 2C using a TiO 2 (B) cathode. 16 Meng et al. demonstrated a reversible capacity of 35 mA h g À1 in TiO 2 (B) nanoakes via a doublelayer capacitive process in a Mg only arrangement. In contrast, a Li + /Mg 2+ hybrid arrangement provided a capacity of 114 mA h g À1 at 1 A g À1 , but predominantly via Li intercalation and surface pseudocapacitive charge storage, rather than Mgintercalation. 17 Zhang et al. found that in a Mg only battery design, electrochemical insertion of Mg was only possible up to a stoichiometry of Mg 0.1 TiO 2 in commercially available anatase particles (<20 nm), giving a reversible capacity of 40 mA h g À1 aer 50 cycles. 18 Koketsu et al. reported that F À and OH À incorporation into anatase nanoparticles ($5 nm) could enhance voltage, rate performance and capacity for Mg 2+ insertion ($165 mA h g À1 at a rate of 20 mA g À1 ), and also allow the reversible insertion of Al 3+ ions. 19 The anatase was determined to have a high concentration ($22%) of Ti 4+ vacancies to charge balance substitution of F À into O 2À sites, and these sites were identied as the origin of the improved capacity, whilst also offering a vacancy-mediated diffusion mechanism, and increased insertion energies. 20 Li-insertion rates into this Ti-decient system were also shown to be enhanced in a separate work by the same group. 21 Recently, Sheng et al. demonstrated that V-doped anatase nanoparticles ($10 nm) could sustain a capacity of 121.9 mA h g À1 at 20 mA g À1 . The introduction of V was predicted by calculations to provide enhanced voltages compared to undoped TiO 2 . However the charge storage was predominantly of a faradaic pseudocapacitive type, rather than a diffusion-controlled intercalation mechanism. 22 The enhanced capacity reported by Koketsu et al. suggests that there may be doping strategies that can make anatase a viable Mg battery cathode material. Conveniently, doped anatase has been studied as a Li-ion battery electrode material in previous experimental literature, and with improvements and changes in performance noted for a range of dopants including Ni, 23 Nb, 24,25 Sn, 26 Fe, 27 and Mo, 28 providing an indication of routes to explore. However for doping strategies to be rationally designed, the origin of the limited performance for undoped anatase should be fully understood.
Here we employ hybrid density functional theory calculations to address this problem. We investigate the insertion geometry of Mg, voltage and ion mobility at dilute concentrations. We then assess how these properties change as further Mg is added to the structure. Finally, we discuss doping strategies that may be suitable to enhance the limited experimentally observed capacity.

Computational methods
First-principles calculations were performed using the periodic density functional theory (DFT) code CRYSTAL17. 29,30 Electronic exchange and correlation were approximated using the hybridexchange functional B3LYP, which is known to give accurate estimates of the band structure of metal oxide systems with highly correlated electrons, 31 and is efficiently implemented in the CRYSTAL code. Furthermore, hybrid functionals have been shown to give improved accuracy over semilocal DFT for the calculation of migration barriers for Mg ions in metal oxides. 32 All-electron atom-centered Gaussian basis sets were used for all atoms, available from the CRYSTAL online database (www.crystal.unito.it), indicated by the following labels online: Ti (Ti_86-411(d31)G_darco), O (O_8-411d1_cora_2005), Mg (Mg_8-511d1G_valenzano_2006). The Coulomb and exchange series were truncated with thresholds of 10 À7 , 10 À7 , 10 À7 , 10 À7 and 10 À14 . Reciprocal space was sampled using a Pack-Monkhorst net, 33 with a shrinking factor of IS ¼ 8 along each periodic direction. The self-consistent eld (SCF) procedure was performed up to a convergence threshold of DE ¼ 10 À8 Hartree per unit cell. Full geometry optimisations (lattice parameters and atomic positions) were performed using the default convergence criteria in CRYSTAL17. Grimme's semi-empirical D3 scheme [34][35][36] to account for the effects of dispersion was used to give an improved structural description of anatase (Table S1 †). The average insertion energy per Mg (E ins ) was determined with reference to metallic Mg according to: [E(Mg x TiO 2 ) À E(TiO 2 ) À xE(Mg (s) )][x] À1 . The intercalation voltage (V) was calculated according to: À[E ins ][2e] À1 , where e is the electronic charge. The calculation of metallic Mg is unsuited for hybrid functionals. To evaluate the energy of metallic Mg, we calculated the energy of a single Mg 2+ ion, and added the experimentally determined energy of sublimation and the rst and second ionisation energies: E(Mg (s) ) ¼ E(Mg 2+ ) + E sub (Mg (s) ) + E i(1) (Mg) + E i(2) (Mg). Activation barriers for ion migration were determined by performing a set of constrained geometry optimisations, with full details of these described in the ESI. † All calculations presented in the main text are spin-polarised, with a ferromagnetic ordering of Ti 3+ ions where applicable. A discussion of this approximation, its validity and additional calculations to support these results are included in the ESI. †

Structure of anatase TiO 2
Anatase TiO 2 adopts a tetragonal crystal structure, space group I4 1 /amd, (no. 141) with crystallographic unit cell lattice parameters a ¼ b ¼ 3.7845Å, c ¼ 9.5143Å. The structure is reproduced to an excellent degree of accuracy by the B3LYP-D3 calculations, with lattice parameters of a ¼ b ¼ 3.7663Å, c ¼ 9.5733Å and an error on the unit cell volume of À0.3% relative to experiment.
Anatase consists of distorted TiO 6 octahedra, in which opposite equatorial Ti-O bonds are displaced off their plane in the same AEz direction (Fig. 1). Each TiO 6 octahedron shares two pairs of edges in the [103] and [013] planes, and four corners with neighbouring octahedra in the x and y directions. This framework results in interstitial sites that have an octahedral environment of O-ions surrounding them (Fig. 2a). These octahedral interstitial sites are linked by tunnels in the x and y directions, and by percolating pathways in the z direction.

Mg 2+ insertion at dilute concentrations
To understand the behaviour of Mg in anatase at the dilute limit, we initially investigated the introduction of a single Mg ion into an approximately cubic 32 cation unit cell of anatase TiO 2 , generated by a ð2 ffiffiffi 2 p Â 2 ffiffiffi 2 p Â 1Þ expansion of the crystallographic cell. This construction leaves a distance of $10Å between each Mg ion, and corresponds to a concentration of $Mg 0.03 TiO 2 . Insertion of Mg 2+ takes place preferentially into the octahedral hole sites, 37 similar to Li and Na ions. We nd that the Mg ion is displaced away from the symmetric centre of the site, by 0.5Å in the (AE)z direction. This displacement is consistent with previous investigations of Mg in anatase, 37 and similar observations for Li and Na ions in anatase. [38][39][40][41][42][43] The local geometry of the Mg ion is indicated in Fig. 2. Mg-O bond distances for Mg located in the geometric centre of the octahedral hole are 1.90Å in the xy plane and 2.75Å in the z direction. The displacement from the centre of the octahedral hole site results in a 5-fold distorted square pyramidal coordination, with Mg-O distances of 2.055Å to the peak of the pyramid, and four further bonds of 1.959Å and 1.953Å to ions we label O (a) , and 1.939Å and 1.935Å to O (b) . The Mg-O distance across the octahedral centre is 3.18Å.
The calculated intercalation energy for a single Mg ion is À1.13 eV. This is in reasonable agreement with Koketsu et al. who nd a value of À1.02 eV using GGA + U. 19 Legrain et al. nd the insertion energy to be À1.74 eV using GGA, which however misrepresents electronic localisation on reduced Ti 3+ . 37 The insertion of an Mg 2+ ion introduces two electrons for charge balance, which localise on two separate Ti ions ( Fig. S2 †), reducing them formally to Ti 3+ , according to the following equation (in Kröger-Vink notation): The Ti-O bond lengths of these reduced Ti ions are modied (Table S2 † Upon insertion of Mg to form Mg 0.03 TiO 2 , the lattice parameters of anatase change with an expansion of the a and b parameters by +1.4% and +0.4% respectively (where the a direction is along the Mg-O (a) bonds). The c parameter contracts by À0.8%.

Dening Mg 2+ mobility pathways in the dilute limit
The anatase structure has tunnels extending in the x and y directions, connecting octahedral insertion sites. Ions can migrate along these tunnels, hopping from site to site in a zigzag fashion, with a jump distance of 2.36Å between each site. The line drawn between adjacent sites follows the shared edge of two octahedral TiO 6 units, when the structure is viewed normal to the direction of motion (Fig. 3A). We denote these jumps as pathway 1. Under dilute conditions, ions migrating using this pathway can achieve only 1D mobility.
Tunnels extending in the x and y direction intersect at the octahedral insertion sites. However since Mg ions in these sites are displaced from the centre, this means that under dilute conditions they only occupy a single tunnel extending in one direction (x or y) at any moment. To move between tunnels, Mg ions must jump across the centre of the insertion site (Fig. 3B) which we denote as pathway 2. The hop distance for pathway 2 is 1.01Å, which corresponds to twice the distance that the Mg ions relax away from the centre of the site (Fig. 2). Moving between tunnels allow ions to migrate on a 2D [001] plane. Using an alternating combination of pathways 1 & 2, Mg ions  can achieve mobility in the z direction, and thus 3D mobility is possible. As we shall discuss later, structural changes reduce the length of pathway 2 to zero at high Mg 2+ concentrations, and 3D mobility can be achieved directly by hops between octahedral insertion sites, along what is effectively only pathway 1. The activation barrier for pathway 2 (221 meV) is lower than for pathway 1 (537 meV) under dilute Mg conditions, it is therefore not rate limiting and for these reasons we will not discuss pathway 2 further.

Mg 2+ activation barriers at dilute concentrations
The migration energy prole along pathway 1 is indicated in Fig. 4, as a function of path length (2.36Å). The prole shows a local maximum at 38% path length, which constitutes the activated site, followed by a slight decrease that appears as a plateau region. At 50% path length there is a metastable intermediate site. The second half of the migration prole is symmetric to the rst half. The activation barrier for the site at 38% path length is 537 meV, and the energy of the metastable site at 50% path length is 506 meV.
In the metastable intermediate site the Mg ion is 6-fold coordinated, in a distorted octahedral environment (Fig. S5 †). In the activated site the Mg ion has a similar coordination (Fig. S6 †), but with a non-linear O-Mg-O axial bond angle of 170 , and a closer proximity to the two O (a) ions it was initially coordinated to. The difference between the geometry of the two sites is relatively small however, resulting in the small energy difference (31 meV). If viewed normal to the direction of migration, the pathway the Mg ion takes in the structure is sinusoidal, rather than linear, and thus does not strictly follow the line of the shared octahedral edge. Initially the Mg ion moves towards the O-ion at the end of the Mg-O pyramid, in the c direction, compressing the Mg-O bond to 1.914Å (from 2.054 A), but retaining a ve-fold coordination with a bond of 2.06Å to the O (b) ion along the b axis opposite to the direction of motion. Crossing the activation barrier, the Mg ion moves in the b direction, breaking the bond to the more distant O (b) ion, but forming new bonds with two O (a) ions to achieve a 6-fold coordination. In the plateau region, the Mg ion has 6-fold coordination, and the second half of the pathway is a reection of the rst. The change in coordination number along the pathways at the dilute limit is therefore 5 / 6 / 5.
The barrier of 537 meV is relatively low for Mg-ion mobility in a cathode material, and is similar to that of Li mobility in anatase (500 meV) under dilute conditions. 44 Generally activation barriers predicted for the migration of multivalent ions are signicantly higher than for Li migration, due to the stronger electrostatic interactions between the multivalent ion and the anionic framework of the cathode. 2 The barrier of 537 meV corresponds to a diffusivity (D) of $4.5 Â 10 À12 cm 2 s À1 , assuming an Arrhenius-like activated process, D ¼ va 2 exp(ÀE m / kT), where v is the jump frequency (z10 12 s À1 ), a is the jump distance (2.36Å for anatase) and E m is the activation barrier. 6 We note that such an assumption neglects any contribution from Coulombic interactions between Mg ions and electrons localised upon Ti 3+ ions (small polarons), which are known to contribute to limited diffusion for Li-ion cathode materials 45 and may affect the mobility of Mg ions. 46,47 For comparison with anatase, the Mg diffusion barriers in the a and d polymorphs of V 2 O 5 , which is considered one of the most promising oxides for Mg ion battery cathodes 2 are $1100 and $600 meV respectively. 48,49 Similarly low barriers to that of anatase, of $600-800 meV have been identied in spinel-structured oxides. 50 Interestingly, the migration barrier we nd in anatase TiO 2 is similar in magnitude to the lowest barrier found for Mg mobility in layered a-MoO 3 (580 meV). This migration pathway in a-MoO 3 is not between the layers, but rather an intra-layer pathway that takes a similar route along the line of shared octahedral edges, between 5-coordinated stable sites. 51 It has been estimated by Rong et al. that for adequate battery operation, migration barriers for ion mobility must be below $525 meV for micronsized particles, and $650 meV for nanoparticles. 6 The barrier for Mg diffusion in anatase under dilute conditions falls below this limit for nano-size particles.

Mg insertion at higher concentrations
Despite the comparatively low activation barrier amongst Mgion oxide cathode materials, and thus relatively high Mg diffusivity that may be expected at a dilute concentration of Mg, experimental evidence indicates that insertion of Mg into undoped anatase is limited. 19,52 The limitation could be of a thermodynamic origin, whereby additional insertion of Mg beyond Mg 0.03 TiO 2 becomes thermodynamically unfavourable. We have therefore investigated the energetics of insertion of additional Mg into the structure. Geometry optimisations were performed on all symmetry inequivalent congurations of Mg in a (2 Â 1 Â 1) unit cell of Mg x TiO 2 between 0 < x < 0.5, generated using the CRYSTAL code, 53 and the insertion energies per Mg calculated. We nd that the addition of Mg remains energetically favourable (Fig. 5) up to Mg 0.5 TiO 2 . In fact as the concentration of Mg is increased in the structure, its intercalation energy becomes increasingly favourable. This will be discussed in greater detail later.
Since the thermodynamics allow additional Mg insertion, the limited capacity observed experimentally may therefore have a kinetic origin. In the anatase Li x TiO 2 system, insertion of Li leads to a stable ordering at Li 0.5 TiO 2 and a tetragonal to orthorhombic distortion with increasing Li content. 54 The orthorhombic distortion yields signicantly reduced Li mobility, 44 and insertion of Li into bulk anatase particles is oen limited to Li 0.5 TiO 2 -Li 0.6 TiO 2 , with phase segregation into Li-rich and Li-poor regions. 38,39,44 We therefore continue our investigation, considering whether similar structural changes occur in the Mg x TiO 2 system.  Of the structures, the most stable are those with the greatest value of a. The b lattice parameter also increases from $3.7Å to $4.0Å, but the lowest energy structures are those with the smallest value of b. This indicates that the structure is most stable with a high a/b ratio, i.e. when it undergoes a tetragonal to orthorhombic distortion. This can be conrmed by plotting the energy of each structure   against its a/b ratio at each composition (0.25 < x < 0.5) (Fig. S7-S9 †). The trends show that the most stable structures have the highest a/b ratio (i.e. have the greatest orthorhombic distortion). Mg x TiO 2 therefore undergoes a similar structural distortion to the Li x TiO 2 system. The distortion from TiO 2 to Mg 0.5 TiO 2 is illustrated in Fig. 7. The structure experiences a signicant c parameter contraction (>9%) with increasing x in Mg x TiO 2 . We now aim to understand how these structural distortions affect the mobility of Mg ions.  (Fig. S13b †). Each Mg ion is 6-fold octahedrally coordinated, with two 'axial' bonds of $2.15-2.26Å along the c axis, and two shorter ($2.00Å) and two longer ($2.04Å) equatorial bonds. This contrasts with the 5-fold coordination for Mg ions in Mg 0.03 TiO 2 (Fig. 2). The change from 5 to 6 fold coordination is due to the structural distortion that occurs as the concentration of Mg is increased.

Phase segregation
As noted earlier, not only does the structure undergo an orthorhombic distortion, but there is also a signicant contraction in the c lattice parameter by À10.7% (Table S3 † ion relaxes towards one O-ion and is thus 5-fold coordinated (Fig. 2). A cooperative effect at higher concentrations of Mg in the structure is required to contract the lattice along the c axis enough for each inserted Mg ion to be able to achieve 6-fold coordination.
As it has been noted earlier, and indicated in Fig. 5, the energy gained upon insertion of each Mg ion increases as the concentration of Mg is increased. We can therefore conclude that the 6-fold coordination of the Mg ions is more favourable than the 5-fold coordination at the dilute limit, and it is the structural distortion upon increasing Mg concentration that stabilises further the inserted Mg ions. Specically it is the contraction of the c parameter that allows the more stable 6-fold coordination to be achieved for each Mg ion.

Mg 2+ mobility in Mg 0.5 TiO 2
To understand mobility of Mg in the fully intercalated structure, we chose the lowest energy ordering (Fig. S13b †) as our initial structure, and considered a 32 Ti-cation ordered cell of Mg 0.5 TiO 2 , equivalent to the ð2 ffiffiffi 2 p Â 2 ffiffiffi 2 p Â 1Þ expansion of the unit cell used for the dilute limit insertion and mobility calculations. As the maximum capacity of Mg 0.5 TiO 2 requires only half the insertion sites to be lled, there are vacant sites into which Mg ions can move. From our starting geometry, there are therefore 3 possible symmetry inequivalent pathways that Mg ions can follow, two in the xz direction, and one in the yz direction, indicated in Fig. S14. † Fig. 9 indicates the activation barriers for each of these pathways, compared with the barrier for mobility at the dilute limit. The barriers in Mg 0.5 TiO 2 are 2120, 1710 and 1639 meV, for pathways (i), (ii) and (iii) respectively, the lowest of which corresponds to $17 orders of magnitude reduction in Mg diffusivity at room temperature, compared to Mg 0.03 TiO 2 (537 meV), if Arrhenius-like behaviour is assumed. These signicantly increased barriers are likely to be the origin of the low Mg capacities observed experimentally. We note that ions moving along pathway (i) hop to sites that are similar in energy to the initial Mg position (+51 meV), whereas Mg ions moving along pathways (ii) and (iii) reach sites that are 660 and 880 meV higher in energy respectively than their starting positions. This mean that Mg ions moving from less favourable sites to the Fig. 7 Structural changes between TiO 2 and Mg 0.5 TiO 2 , illustrated with a (2 Â 2 Â 1) unit cell. The Mg 0.5 TiO 2 ordering shown is the most stable calculated (Fig. S13b †). stable sites will have lower barriers to overcome ($980 meV and $650 meV for the reverse of pathways (ii) and (iii) respectively). This behaviour will tend to favour the formation of stable Mgrich ordered regions, whereby Mg ions will be pinned to stable lattice congurations and it will be difficult for Mg ions to be extracted from these regions. These observations complement the results of the formation energy calculations (Fig. 6a), which indicates a preference for phase segregation into TiO 2 and Mg 0.5 TiO 2 regions.

Origin of the increased barriers in Mg 0.5 TiO 2
The migration barrier in a material is dened by the difference in energy for the migrating ion in its stable and activated sites. Generally for Li and Mg ion cathode materials, activation barriers are higher in the full (i.e. fully discharged) lattice limit by 10's to a few 100's of meV over the empty (fully charged) lattice limit. 6,46,48,[55][56][57] The increases are usually attributed to a relative destabilisation of the activated sites in the full lattice limit due to structural distortions caused by intercalant incorporation. In anatase TiO 2 , the migration barrier increases for Mg (as also identied for Li by Belak et al. 44 ) from the empty to the full lattice limit by over 1 eV.
As indicated in Fig. 5, Mg ions become more stabilised (i.e. their insertion energies become more negative) as the concentration of Mg in the structure is increased, and this can be attributed to a more favourable 6 fold coordination for the Mg ions in Mg 0.5 TiO 2 . As the Mg ions become more stabilised, the energy difference between the insertion sites and the activated sites increases, and so does the activation barrier.
It is instructive to consider the energetics of the Mg ions relative to metallic Mg to provide a consistent scale of their stability (Fig. 9, right hand y axis). In this energy frame, the transition state energy in the Mg 0.03 TiO 2 and Mg 0.5 TiO 2 phases is similar. The change in activation barrier ($1100 meV) between pathway 1 in Mg 0.03 TiO 2 and pathways (ii) and (iii) in Mg 0.5 TiO 2 is due mainly to the Mg stabilisation in Mg 0.5 TiO 2 as measured by the increased insertion energy per ion ($900 meV) between these two concentrations. The energy of the activated site varies by only $250 meV. Thus, for pathways (ii) and (iii) it is the stabilisation of the insertion sites, rather than the destabilisation of the activated sites at high Mg concentrations that make the most substantial contribution to the increase in activation barriers.
We also note that pathways (ii) and (iii) connect intercalation sites of non-equal energy in Mg 0.5 TiO 2 , i.e. stable 6-coordinated sites and less stable 5-fold coordinated sites.
The existence of stabilised and destabilised sites adjacent to each other suggests that the distortions that result in stabilisation of certain sites are fairly localised. This result indicates that if cooperative distortions of the anatase lattice that yield 6fold coordinated sites can be prevented, migration barriers for Mg ions in the Mg 0.5 TiO 2 lattice could be reduced signicantly. This would result in higher Mg mobility at high Mg concentration in anatase and allow for greater capacity.
Whilst the stabilisation of Li insertion sites has not been explicitly addressed as the origin for the substantial increases in activation barriers for Li moving in Li x TiO 2 at high Li concentrations, 44 the displacement of Li ions from the centre of the octahedral insertion site, structural distortions and increase in insertion energy per Li between 0 < x < 0.5 follow the same trends as we describe here for Mg, 41,54 and we therefore suggest the behaviour is equivalent. It follows from this that strategies to improve Mg capacity in anatase may also be applicable for improving Li storage capacity.

Discussion: the role of frustration
The results presented above indicate that under dilute concentrations of Mg in anatase, the insertion sites for Mg are effectively 'frustrated'. The interstitial site is not a regular octahedron, instead it is tetragonally extended along the c direction and is too large for Mg ions to nd a favourable coordination. They therefore achieve a frustrated 5-fold coordination, and diffusion of Mg ions between frustrated sites leads to lower activation barriers. This ceases to be the case at higher concentrations of Mg as contraction of the c parameter reduces the tetragonal extension along the c direction.
The use of structures in which Mg ions have 'frustrated' or 'non-ideal' coordination has been proposed as a design principle for achieving high Mg ion mobility. 6 Frustrated coordination has to date predominantly been identied as a property of metastable polymorphs, 47 such as Mn 2 O 4 spinel. 50 A further example is the metastable tunnel bronze z-V 2 O 5 phase, which has been demonstrated as a viable Mg ion cathode material, 58 and is predicted by DFT calculations to have low activation barriers (620-860 meV) for Mg mobility. 46 In fact it has been suggested that insertion of multivalent ions into frustrated coordination sites 'almost certainly' requires a structure that is thermodynamically metastable. 6 Whilst metastable phases like the V 2 O 5 tunnel bronzes may be favourable for high ion mobility, if they are signicantly higher in energy than the ground state polymorphs (a-V 2 O 5 ), they may be prone to phase transitions under repeated electrochemical cycling, or conversion reactions. 2 The identication of frustrated coordination for Mg ions in anatase, and the indication of similar effect for Li-ions, thus indicates that frustration is not a property unique to materials that would generally be classed as metastable phases. Rutile is the ground state polymorph of TiO 2 under ambient conditions, but the energy difference between anatase and rutile is small. 59,60 Anatase TiO 2 has high thermal and chemical stability, does not readily undergo transformation to rutile, and is not generally considered 'metastable' in the same way as, for example, chemically de-intercalated tunnel bronze structures. 47 Anatase TiO 2 therefore provides a stable structure in which frustrated coordination of Mg (and Li-ions) occurs under dilute conditions and this leads to low migration barriers for the ions. The limitation of the anatase structure is therefore not its stability under cycling, but the loss of frustrated coordination at high Mg (or Li) concentrations.
Strategies to increase the electrochemical performance of anatase as a Mg (or Li) ion cathode material should therefore aim to retain the frustrated coordination of the Mg (Li) ions, by inhibiting the c parameter contraction that results in stable Mg (Li) orderings.
One route to achieve this effect could be via isovalent substitution of larger ions than Ti 4+ (i.e. Zr 4+ , r ¼ 0.72Å or Hf 4+ , r ¼ 0.71Å), which would expand the anatase lattice parameters. 61,62 Incorporation of Nb 5+ (r ¼ 0.64Å) is also known to cause expansion of the anatase lattice, 63 and improvements have been demonstrated for Li ion storage in Nb-doped anatase. 24,64 The isovalent substitution of V 4+ (r ¼ 0.58Å) for Ti 4+ by Sheng et al. was not found to improve intercalation capacity for Mg in anatase, but instead offered improved pseudocapacitive storage. 22 In light of the current discussion, we speculate that the smaller size of V 4+ compared to Ti 4+ does not cause lattice expansion, and is unlikely to inhibit the distortions discussed above.
An alternative strategy is the creation of Ti 4+ vacancies that can provide insertion sites for Mg. 19,20 By providing vacancies into which Mg can intercalate, the cation decient structure may be resistant against the structural distortions (i.e. c parameter contraction) that we have identied as stabilising Mg and thus limiting mobility and capacity. The distortion arises from Mg 2+ lling the interstitial sites, whereas insertion into Ti vacancy sites is not expected to create the same distortion. The authors report the creation of Ti vacancies, achieved by an anionic doping strategy, substituting F À and OH À into oxide ion sites. An alternative method proposed to create Ti vacancies in anatase is doping with Mo 6+ . 28,65 Higher-valent cation doping is a general strategy to induce structural cation vacancies, 66 and may be effective in anatase.
It is worth nothing however that the chemistry taking place during heterovalent substitutions (Nb 5+ , Mo 6+ into Ti 4+ sites) is not always well understood, with a complex interplay of charge compensating defects occurring in the lattice, with possible clustering of vacancies in various combinations which are oen challenging to probe experimentally or represent in models.
A rule of thumb to judge the effectiveness of doped anatase phases towards Mg intercalation is to quantify the c/a ratio, with high values expected to yield better resistance to loss of structure.

Conclusions
We have conducted a systematic investigation of the behaviour of Mg in anatase TiO 2 using hybrid-exchange density functional theory. The results indicate that under dilute conditions ($Mg 0.03 TiO 2 ), Mg ions adopt a frustrated 5-fold coordination, by displacement away from the centre of the octahedral insertion sites. Under these conditions, the migration barrier for mobility of Mg ions is relatively low. As more Mg is added, the structure is distorted from tetragonal to orthorhombic, and the c lattice parameter contracts by up to $10%. This causes a loss of the frustrated coordination and an increased stabilisation of the order of $1000 meV per Mg ion. The stabilisation is due to a more favourable 6-fold coordination, and the barriers for Mg ions to move out of these stabilised sites are substantially increased, by >1000 meV. The increased barriers due to stabilised Mg ions are likely to constitute the origin of the limited capacity for Mg in anatase. Results from previous theoretical investigations suggests that the increased activation barriers for Li in anatase occur via a similar mechanism. 41,44,54 Strategies to enhance Mg storage capacity should aim to inhibit the structural distortions that occur on Mg insertion, or otherwise destabilise Mg insertion sites at high Mg concentrations, to retain the frustrated coordination and facilitate high Mg mobility. Doping strategies that may achieve these aims are discussed, and expansion of the anatase lattice parameters with large dopant ions, or the creation of cation vacancies in the structure are promising routes.

Conflicts of interest
There are no conicts to declare.