Structural, Electronic and Vibrational Properties of B24N24 Nanocapsules: Novel Anodes for Magnesium Batteries

We report on DFT-TDDFT studies of the structural, electronic and vibrational properties of B24N24 nanocapsules and the effect of encapsulation of homonuclear diatomic halogens (Cl2, Br2 and I2) and chalcogens (S2 and Se2) on the interaction of the B24N24 nanocapsules with the divalent magnesium cation. In particular, to foretell whether these BN nanostructures could be proper negative electrodes for magnesium-ion batteries, the structural, vibrational and electronic properties, as well as the interaction energy and the cell voltage, which is important for applications, have been computed for each system, highlighting their differences and similarities. The encapsulation of halogen and chalcogen diatomic molecules increases the cell voltage, with an effect enhanced down groups 16 and 17 of the periodic table, leading to better performing anodes and fulfilling a remarkable cell voltage of 3.61 V for the iodine-encapsulated system.


Introduction
Materials are key components in the sphere of energy production, transformation and storage, and first-principle calculations play a critical role in designing and optimizing new advanced energy materials able to meet the high performance requirements of an efficient and sustainable use of electrical energy [1].The growing electrified world has been dominated by lithium-ion battery (LIB) technology since the 1990s, when LIBs became the backbone of portable electronics, enabling the convenient storage and utilization of energy [2][3][4].However, market concerns are rising over lithium resource depletion, which will cause the price of lithium to skyrocket with the escalating implementation of LIBs in the automotive industry and the risk of limiting the wide-scale adoption of electric vehicles [5][6][7][8].Therefore, over the years, numerous earth-abundant metals have been investigated in order to replace lithium in batteries, and the consensus prevailing in the scientific community affirms that the trajectory of rechargeable batteries hinges significantly on the exploration and advancement of alternative battery chemistries.The technologies proposed include sodium, potassium, magnesium, calcium, aluminum and zinc as the active material, and among all these elements, magnesium is one of the most promising materials for the replacement of lithium [9][10][11][12][13][14][15][16][17][18].
Magnesium ranks among the decadal elements as the most prevalent element in the Earth's crust.It is non-toxic and is characterized by non-monopolized extraction processes, complete recyclability, an elevated theoretical specific capacity, substantial volumetric energy density and a low redox potential.This underscores magnesium's growing significance as both a supplemental and alternate element in the evolution of the next generation of power sources [19][20][21][22][23][24].In addition to the better energy capacities, magnesium-ion batteries (MIBs), which share the same working principle as LIBs, have numerous other advantages over them [25][26][27].First of all, magnesium is safer than lithium; it does not form toxic compounds, and thus manufacturing MIBs would be more efficient and environmentally friendly.Despite the extensive research over the last decade, MIB technology has yet to be in the initial phase, and this is primarily attributable to the evidence that the active materials conventionally suitable for LIBs are deemed merely satisfactory for MIBs [28][29][30].Overcoming these challenges requires multidisciplinary efforts to develop novel electrodes and electrolytes that can efficiently store and release magnesium ions during charging and discharging cycles [31][32][33].The successful adoption of this technology could revolutionize the energy storage landscape, offering superior energy density, augmented safety and a diminished environmental impact [34].
The optimal anode materials for MIBs should exhibit several key characteristics.These include the reversible retention of significant quantities of Mg 2+ ions, environmental friendliness, cost-effectiveness and high electronic as well as ionic conductivity.Additionally, they should refrain from undergoing chemical reactions or dissolution in the electrolyte.Nanomaterials play a pivotal role in advancing ion battery technologies due to their proven efficacy as electrode candidates, offering superior ionic and electronic conductivity when compared with their bulk counterparts [35][36][37][38][39][40][41][42][43][44][45][46][47][48][49].The synergy between materials science and high-performance computing (HPC) has opened exciting opportunities for accelerating the discovery of novel electrode nanomaterials.In fact, by leveraging HPC capabilities, researchers can employ sophisticated quantum mechanical calculations (e.g., DFT calculations) and molecular dynamics simulations to explore the properties of thousands of potential nanoelectrodes and tackle complex material design challenges [50][51][52].This computational approach not only accelerates the research and development process but also significantly reduces the costs associated with experimental synthesis and testing, guiding experimental efforts toward the most promising candidates and thus accelerating the overall material discovery timeline.
Among nanomaterials, BN nanostructures (including nanosheets, nanotubes and nanocages, etc.) have sprung up as promising electrode materials thanks to their unique characteristics, exhibiting chemical and structural stability (suitable for use in corrosive environments), low toxicity, high thermal conductivity and excellent mechanical properties (ideal for better control of charge transport within the energy storage system) [53][54][55][56][57].The characteristics of diverse nanostructured BN systems vary, contingent upon factors such as the synthesis technique, size, diameter and material shape.Notably, the mixed covalentionic B-N bond exerts a substantial influence on the structure of BN allotropes, affording the capability to form sp 2 or sp 3 linkage structures.Generally, BN is unsuitable for deployment as an anode electrode in rechargeable batteries due to its wide band gap energy range of 4-6 eV, rendering it an insulator.Additionally, the B-N π bond exhibits limited movement, given the low degree of electron pair delocalization, leading to a scarcity of free electrons in BN [58][59][60].Nevertheless, a diverse array of methodologies and approaches, encompassing vacancy creation, doping, defect engineering, composite formation, and judicious chemical functionalization, may be employed to proficiently modulate the bandgap (facilitating conductivity) and enhance both electron conductivity and cation-π interaction on the BN surface.The latter is particularly critical for bolstering the alkali-ion storage capacity in a material [61][62][63][64].
Specifically, BN fullerene-like nanostructures have garnered attention since the fullerene's discovery [65].The smallest nanocage, B 12 N 12 , featuring tetragonal BN rings isolated by hexagonal BN rings, has become noteworthy following its synthesis by Oku et al. [66][67][68][69][70][71][72][73].The potential application of B 12 N 12 nanocages as anode materials has been suggested for lithium-ion [74], sodium-ion [75] and magnesium-ion batteries [76,77].Given the intriguing physical and chemical properties of B 12 N 12 , the preparation and characterization of fullerene dimers, such as B 24 N 24 , have garnered substantial attention both experimentally and theoretically.Wu et al. [78] identified the tubular form of B 24 N 24 as the most stable structure, resulting from the connection of two six-membered rings of B 12 N 12 .In this article, systematic calculations in the DFT framework are used to explore B 24 N 24 nanocapsules and the interaction of magnesium and magnesium ions with B 24 N 24 endonanocapsules (Endon), particularly nanocapsules encapsulating homonuclear diatomic halogen and chalcogen molecules, to uncover if these systems are promising anodes for MIBs.This paper is organized as follows.In Section 2, we pose the computational methods and theoretical approaches employed to characterize these anodes.The formation energies, the interaction energies, the Raman and optical absorption spectra as well as the cell voltages are reported and examined in detail in Section 3 for the endonanocapsules.Lastly, our conclusions are gathered in Section 4.

Geometries and Energies
In the present contribution, outcomes derived from first-principles calculations within the density functional theory framework are found using the DMOL3 package [79][80][81] within Materials Studio [82].The calculations incorporated the generalized gradient approximation with Perdew-Burke-Ernzerhof exchange-correlation functional [83][84][85] and Grimme's DFT-D dispersion correction to account for van der Waals interactions [86][87][88].Electronic wavefunctions were expanded using atom-centered basis functions defined on a dense numerical grid.The chosen basis set, double numerical plus polarization (DNP), was subject to a global cut-off radius of 4.5 Å.This cut-off value ensured atomic energies with an accuracy of 0.1 eV/atom, allowing for calculations without a significant loss of precision.Geometry optimizations were carried out by employing a scheme based on delocalized internal coordinates, and the convergence thresholds for the energy change, maximum force and maximum displacement during geometry optimization were set to 10 −5 Hartree, 0.002 Hartree/Å and 0.001 Å, respectively.

Electrochemical Reactions and Thermodynamics
The estimation of the interaction energy between Mg and Mg 2+ with the designated endonanocapsule was conducted to assess the comparative efficacy of adsorption.This evaluation was performed using the following equation: where E Endon@Mg 0/2+ are the total energies of the endonanocapsules with Mg or with Mg 2+ ; E Endon is the energy of the geometry-optimized isolated endonanocapsule and E Mg 0/2+ is the total energy of the magnesium or magnesium ion.Considering the application of B 24 N 24 endonanocapsules as anodes in magnesium-ion batteries, the electrochemical reactions at the anode and cathode can be simplified as follows: Therefore, the global reaction in the magnesium-ion battery cell will be where ∆G cell is the Gibbs free energy change of the cell's total reaction.For the theoretical assessment of the average open circuit intercalation potential (V cell ) in this cell, the Nernst equation was employed: where F is the Faraday constant (96,500 C/mol) and z = +2 represents the charge of the divalent magnesium ion, which acts as a working cation in the electrolyte.The ∆G cell term was assessed initially while neglecting volume and entropy variations and solely taking into account the variation ∆E of the total energy, where ∆G cell ≈ ∆E.Therefore, the V cell of the reaction considered above can be derived from the computed total energies as follows: As deducible from the aforementioned equation, a heightened voltage (V cell ) is anticipated for B 24 N 24 endonanocapsules, in which the interaction with the magnesium ion surpasses that with magnesium.Such systems may potentially serve as high-performance anode materials for magnesium-ion batteries.Afterward, to account for entropy effects, the Gibbs free energy change of the cell reaction, as described by Equation ( 3), was computed based on the outcomes derived from frequency analysis at 298.15 K and 1 atm of pressure: where G is the zero-point energy-corrected Gibbs free energy of the investigated system [89].
The voltage V cell was then calculated using the Nernst equation (Equation ( 4)).The formation energy for the B 24 N 24 nanocage and that for the endonanocapsules are each defined as follows: where E B 24 N 24 and E Endon are the total energies of the primeval nanocage and of each endonanocapsule, respectively, whereas ε B(s) , ε N 2 (g) and ε X 2 are the total energies per atom of the trigonal solid boron, N 2 molecule and the halogen or chalcogen atom, respectively.The sign and value of the formation energies indicate a measure of the stability or instability for each system.

Raman and Optical Absorption Spectra
Raman spectroscopy exploits the Raman effect, involving the inelastic scattering of monochromatic light [90].This interaction with the vibrations results in a shift in the energy of incident photons.The ensuing spectra are instrumental in investigating vibrational, rotational and other low-frequency modes in a system.The energy shift is dictated by the vibrational frequency, while the fraction of light undergoing inelastic scattering is determined by the spatial derivatives of the macroscopic polarization.In DMOL3, the Raman intensities and activities are computed using the finite differentiation technique.Multiple gradient calculations are executed under varying electric fields to generate the polarizability tensor derivative, which fundamentally defines the Raman activity.At a given incident light frequency and temperature, assuming a plane-polarized incident laser beam, the first-order differential Raman cross-section (intensity) for the Stokes component of the ith eigenmode far from resonance (ν i ) [91] is calculated as follows: where êS and êL are the unit vectors of the electric-field polarization for the scattered and incident light, respectively, Q i is a normal-mode coordinate, ν S is the frequency of the scattered light, α is the polarizability tensor and n b i is the Bose-Einstein statistical factor.Given that the frequency of the scattered light ν S derives from the frequency of the incident light ν 0 , according to ν S = (ν 0 − ν i ), this enables the evaluation of Raman intensities under the experimental conditions T = 298.15K and λ = 514.5 nm (green laser).
The time-dependent density functional theory in the linear response regime is a extremely efficient method for determining excitation energies and optical spectra [92].Since the external field is small, it is treated as a time-dependent perturbation.Then, the linear response function (the frequency-dependent dynamic polarizability tensor) depends only on the ground state density, and it has poles at the excitation energies of the system, which can be computed by resolving the following eigenvalue problem [93,94]: where F I represents the multi-determinantal excited states, Ω I represents the excitation energies and Q ij,kl represents the matrix elements, with the labels ik describing the occupied orbitals and jl describing the unoccupied ones.Iterative diagonalization [95,96] is used to calculate the product of Q ij,kl operating on the trial excitation vector F.

B 24 N 24 Nanocapsule
The B 24 N 24 nanocapsule was constructed by arranging 24 boron atoms and 24 nitrogen atoms in a specific pattern, resulting in an optimized hollow cage-like structure.At the GGA-PBE level of theory, the dimerization of B 12 N 12 is observed through the breaking of four BN 6−6 (hexagonal rings close to hexagonal rings) single bonds and the consequent formation of four B N bridges, all of which are 1.281 Å long.The stability of the dimers is confirmed by a negative formation energy E f = −0.48eV/atom (see Table 1).At the baseline, the adsorption of Mg and magnesium ions at various initial sites was investigated, and the total energy minimum was found for the Mg adsorption, preferentially on B (see Figure 1b), as well as that for the Mg 2+ adsorption on N (see Figure 1c).The distance between the B 24 N 24 nanocapsule and the elemental Mg was 2.805 Å, whereas a decrease was observed in this quantity to 2.045 Å in the case of the cation Mg 2+ .This tendency was reflected in the interaction energy value (see Table 1), which was negative (−6.50 eV) in the case of Mg 2+ adsorption and positive (+0.27 eV) in the case of Mg, and it was outlined by a bigger Lewis acid-base interaction regarding the ion.Also, in terms of electronic properties, the effect of the Mg and Mg 2+ adsorption was completely distinct, leading to an energy gap of 2.369 eV for the B 24 N 24 @Mg and 0.285 eV for the B 24 N 24 @Mg 2+ .When considering the B 24 N 24 nanocapsule as anode material for MIBs, the cell voltage calculated with Equation (4) was 3.38 V, which is much bigger than the 2.7 V found in the literature for the B 12 N 12 nanocage [76,77].From Equation (4), it is evident that a weaker Mg-B 24 N 24 interaction combined with a stronger Mg 2+ -B 24 N 24 interaction is conducive to an increased cell voltage, a quantity of fundamental importance for rechargeable batteries.Additionally, the hollow structure of the B 24 N 24 system provides an excellent environment for encapsulating other molecules or nanoparticles.This fact opens the possibility of encapsulating B 24 N 24 with homonuclear diatomic molecules (see Figure S1 in the Supplementary Materials) and examine whether a better Mg 2+ -B 24 N 24 interaction can be obtained in the case of endonanocapsules.

Diatomic Halogen Endonanocapsules
Diatomic halogen encapsulation entails an enlargement of the B 24 N 24 nanocapsules, as visible in the relaxed structures in Figure S1 in the Supplementary Material, with an elongation of the B N bridges.Their lengths increased when going from chlorine to iodine and became 1.289 Å for Cl 2 /B 24 N 24 , 1.301 Å for Br 2 /B 24 N 24 and 1.311 Å for I 2 /B 24 N 24 .The same trend can be seen for the energy gap value (see Table 1), which was 1.473 eV for the system enclosing Cl 2 , 1.671 eV for the one with Br 2 and 2.184 eV for the one with I 2 .The minimum total energy for the adsorption of both magnesium and magnesium ion onto Cl 2 /B 24 N 24 (see Figure 2a), Br 2 /B 24 N 24 (see Figure 2b) and I 2 /B 24 N 24 (see Figure 2c) fell into its adsorption on N. The frontier molecular orbitals plotted for the three endonanocapsules show how the HOMO arose from the hybridization of p orbitals of N and B for Cl 2 /B 24 N 24 @Mg 2+ and Br 2 /B 24 N 24 @Mg 2+ , while for I 2 /B 24 N 24 @Mg 2+ , it arose from the hybridization of p orbitals of N, B and those of the encapsulated diatomic iodine, as confirmed by the pDOS in Figure 3a.The LUMO retained the spherical shape of the s orbital of Mg 2+ for all the three systems.The Mg distance from the endonanocapsules was 2.088 Å, 2.145 Å and 3.254 Å, while the Mg 2+ was located at 2.042 Å, 2.046 Å and 2.081 Å from the Cl 2 /B 24 N 24 @Mg 2+ , Br 2 /B 24 N 24 @Mg 2+ and I 2 /B 24 N 24 @Mg 2+ structures, respectively.
The increase in the distance between Mg 2+ and the halogen endonanocapsules was due to a more positive global Mulliken charge on the endonanocapsule, which was 1.007 for Cl 2 /B 24 N 24 @Mg 2+ , 1.017 for Br 2 /B 24 N 24 @Mg 2+ or 1.122 for I 2 /B 24 N 24 @Mg 2+ , with these values obtained with a progressively more negative Mulliken charge on the encapsulated diatomic halogens.Moreover, it was found that a more negative Mulliken charge on the enclosed molecule had two major effects: (1) boosting the interaction of the halogen endonanocapsule with Mg 2+ , as evident from the interaction energy values (see Table 1), which were −6.58 eV for Cl 2 /B 24 N 24 @Mg 2+ in comparison with −7.24 eV for I 2 /B 24 N 24 @Mg 2+ , and ( 2) diminishing the HOMO-LUMO energy gap at the PBE-GGA level to 0.289 eV for Cl 2 /B 24 N 24 @Mg 2+ and 0.136 eV for I 2 /B 24 N 24 @Mg 2+ .The insulator HOMO-LUMO gap of B 24 N 24 (4.261 eV) was thus reduced to improve conductivity.Optimized structures and visualizations of frontier molecular orbitals for (from top to bottom) Cl 2 /B 24 N 24 @Mg 2+ (a), Br 2 /B 24 N 24 @Mg 2+ (b), I 2 /B 24 N 24 @Mg 2+ (c), S 2 /B 24 N 24 @Mg 2+ (d) and Se 2 /B 24 N 24 @Mg 2+ (e).
To discern the nature of the chemical bonds and the subtleties in the atomic arrangements as well as predict the measurable features, Raman spectra were computed for B 24 N 24 (see Figure 4a), I 2 /B 24 N 24 (see Figure 4a) and I 2 /B 24 N 24 @Mg 2+ (see Figure 4b).Raman shifts reveal a wealth of information about the molecular vibrations, which rule the thermal and electrical conductivity, thermal expansion and mechanical properties.Breathing and deformation modes of the B-N π bonds appeared at 89.02 cm −1 , 95.46 cm −1 and 281.25 cm −1 for B 24 N 24 , and at 116.51 cm −1 , 162.52 cm −1 and 276.69 cm −1 for I 2 /B 24 N 24 (see Tables S1 and S2 in the Supplementary Materials), since these vibrations involved light atoms and strong bonds, while two librational modes at 43.64 cm −1 and 87.49cm −1 and one translational mode at 55.78 cm −1 of the encapsulated I 2 occurred at a lower Raman shift for I 2 /B 24 N 24 since these vibrations involved heavier atoms (see Figure 4a).Furthermore, with regard to I 2 /B 24 N 24 @Mg 2+ , the analysis of the intensities and positions of the Raman peaks unveiled rocking modes associated with the Mg 2+ adsorbed onto the endonanocapsule at 52.66 cm −1 , 59.31 cm −1 and 63.94 cm −1 , while two librations of I 2 occurred at 40.81 cm −1 and 79.69 cm −1 , and one translation was observed at 97.45 cm −1 (see Figure 4b).The Mg 2+ adsorption drastically changed the Raman spectrum for shifts above 80 cm −1 .The intense Raman peaks in the ranges of 80-190 cm −1 and 260-320 cm −1 still appeared in the spectrum of I 2 /B 24 N 24 @Mg 2+ (see Figure 4b), even though they were barely visible compared with the more pronounced peaks associated with the modes of the magnesium ion.The optical absorption spectra in TDDFT for B 24 N 24 and I 2 /B 24 N 24 at the ALDA-XC Kernel level of theory exhibited peaks above 4 eV and 2 eV, respectively (see Figure 5).The lowest energy peak arose from the weak HOMO-LUMO electronic excitation in I 2 /B 24 N 24 at 2.35 eV, while the same excitation in B 24 N 24 occurred at 4.29 eV.For B 24 N 24 , two rather intense peaks were observed, with one at 4.75 eV which corresponded to the excitation involving the p-states of N in the B-N π bonds (HOMO-3) and the LUMO and the other one, the highest energy peak, corresponding to the strong excitation between the p states of N (HOMO-6) and the p states of B (LUMO+1) in B 24 N 24 at 5.14 eV.For I 2 /B 24 N 24 , four relevant peaks are visible in Figure 5: one at 3.83 eV involving the HOMO and the p states of B (LUMO+5), one at 4.50 eV involving the p states of I 2 (HOMO-2) and the p states of B (LUMO+4), one at 5.06 eV corresponding to the electronic excitation between the p states of N (HOMO-20) and the p states of I 2 (LUMO) and the last at 5.14 eV corresponding to the excitation between the I 2 bond (HOMO-12) and the p states of B (LUMO+3).A detailed analysis of the positions of the absorption peaks in TDDFT and DFT is summarized in Tables S4 and S5 in the Supplementary Materials.In any case, the comparison of the absorption edges of B 24 N 24 and I 2 /B 24 N 24 shows that the absorption spectroscopy can be applied to discriminate the nanocapsules from the endonanocapsules.
The atom-and orbital-projected density of states of I 2 /B 24 N 24 (see Figure 3b) show that HOMO and LUMO were separated well, resulting in a band gap of 2.184 eV.On the other side, the pDOS for I 2 /B 24 N 24 @Mg 2+ (see Figure 3a) exhibited the frontier orbitals to be quite close in terms of energy, with the s orbital of the magnesium ion deeply contributing to the LUMO.Its spherical shape is visible in Figure 2a-e, from which the halogen and chalcogen molecules are independently encapsulated.Consequently, a further redshift of the absorption edge is expected after Mg 2+ adsorption.These facts suggest the idea, confirmed by the Mulliken population analysis, that diatomic halogen encapsulation leads to a cell voltage better than that of B 24 N 24 .In fact, calculations performed at 1 atm and 298.15K (see Equation ( 5)) for the I 2 endonanocapsule obtained a cell voltage of 3.61 V, exceeding the 3.38 V of the pristine nanocapsule (see Figure 6).

Diatomic Chalcogen Endonanocapsules
The geometrically optimized structures of diatomic chalcogens encapsulating B 24 N 24 (see Figure S1) display how the B N bonds lengthened with an increase in the atomic number of the chalcogen atom, changing from 1.289 Å for the S 2 /B 24 N 24 to 1.292 Å for the Se 2 /B 24 N 24 in comparison with 1.281 Å for the pristine B 24 N 24 .The trend of the energy gaps was the same as that observed for the halogen endonanocapsules, even though the values were significantly smaller (see Table 1), being 0.004 eV for the S 2 endonanocapsule and 0.037 eV for the Se 2 endonanocapsule.The total energy minima for Mg and Mg 2+ adsorption on S 2 /B 24 N 24 (see Figure 2d) and Se 2 /B 24 N 24 (see Figure 2e) correspond to a position near an N atom.The frontier molecular orbitals plotted for the two endonanocapsules show how the HOMO arose from the hybridization of the p orbitals of N, B and those of the encapsulated diatomic chalcogens for S 2 /B 24 N 24 @Mg 2+ and Se 2 /B 24 N 24 @Mg 2+ , highlighting the charge transfer from the encapsulated species to the B 24 N 24 surface.The LUMO retained the spherical shape of the s orbital of Mg 2+ for both systems.It can be observed that both the Mg and Mg 2+ distances were comparable with those found for the chalcogen endonanocapsule.In fact, Mg was located at 2.107 Å and 2.140 Å from S 2 /B 24 N 24 and Se 2 /B 24 N 24 , respectively, while Mg 2+ was within 2.087 Å from the nanocapsule enclosing S 2 and 2.107 Å from the one enclosing Se 2 .In the case of the chalcogen endonanocapsule, Mg 2+ was even more distant, in agreement with a global Mulliken charge on the enonancapsule, which was more positive than the cases seen above (1.111elementary charges for S 2 /B 24 N 24 and 1.154 for Se 2 /B 24 N 24 ).The local Mulliken charge on the chalcogen molecule was negative, and as stated above, it was related to an improvement in the interaction energy with Mg 2+ , which was −6.94 eV for S 2 encapsulation and −7.43 eV for Se 2 encapsulation, as well as a decrease in the PBE-GGA energy gap, which was 0.120 eV for S 2 /B 24 N 24 @Mg 2+ and 0.086 eV for Se 2 /B 24 N 24 @Mg 2+ (see Table 1).The cell voltage calculations carried out at 1 atm and 298.15K (see Equation ( 5)) returned 3.25 V and 3.50 V for the S 2 and Se 2 endonanocapsules, respectively.Despite the encapsulation, S 2 /B 24 N 24 was less efficient than the pristine nanocapsule as an anode for magnesium batteries.Instead, Se 2 /B 24 N 24 was undoubtedly capable of reaching a voltage higher than that of B 24 N 24 but still lower than that observed for I 2 /B 24 N 24 (see Figure 6).
The values of the open circuit potentials calculated in this DFT-TDDFT study for diatomic halogen and chalcogen B 24 N 24 endonanocapsules are indeed significant in com-parison with those obtained for other low-dimensional materials explored as anodes for MIBs via first principles calculations.In fact, earlier studies reported values for the open circuit potential such as ∼1.6 V for defective graphene [97], 0.89 V for a single layer of phosphorene [98] and 0.85 V for a single layer of WS 2 [99].

Conclusions
The atomic arrangement of the B 24 N 24 nanocapsule was highly symmetrical and stable, allowing it to retain its shape and structural integrity, which is essential for its potential applications in various fields, namely catalysis and energy storage inter alia.Moreover, its particular geometrical structure enables encapsulation with molecules, possibility being exploitable for enhancing the electrochemical properties of this nanomaterial.
Based on the DFT-TDDFT approach, this study investigated the effect of the encapsulation of homonuclear diatomic halogens and chalcogens and the interaction of the resulting endonanocapsules with the divalent magnesium cation.Indeed, we demonstrated that a stronger interaction with Mg 2+ leads to an increased cell voltage, with a positive impact on the performance of rechargeable magnesium batteries.
The Mulliken population analysis made clear that a more negative charge on the enclosed molecule has three important consequences: boosting the interaction of the halogen or chalcogen endonanocapsule with Mg 2+ , evident from the interaction energy values; diminishing the HOMO-LUMO energy gap at the PBE-GGA level of theory and obtaining a cell voltage better than that of the pristine B 24 N 24 .Given that I 2 /B 24 N 24 turned out to be capable of reaching the highest cell voltage among the studied systems, an indepth investigation of this endonanocapsule was performed, including the calculation of the Raman and optical adsorption spectra.
The Raman spectra were enabled to identify the main vibrations of the B-N π bonds, those of the encapsulated I 2 molecule and those of the adsorbed magnesium ion.In parallel, the optical absorption spectra highlighted the characteristic electronic excitations of I 2 /B 24 N 24 , making a comparison with those of B 24 N 24 .While the analysis of the vibrational and optical properties shed light upon the nature of chemical bonds and the subtleties in atomic arrangements on one hand, on the other hand, it could drive the experimental characterization of these nanomaterials with both in situ and operando spectroscopy.
At least thus far, our studies of the geometry, the adsorption site, the interaction strength and the resulting cell voltage of the magnesium ion adsorption on B 24 N 24 encapsulating a diatomic halogen or chalcogen molecule pave the way toward experimental preparation as anodes for magnesium-ion batteries.Moreover, the properties of these nanomaterials showed advanced performance, with a low environmental impact arising out of the natural abundance of Mg and I and the chemical inertness of BN.
In summary, our investigation of B 24 N 24 encaspulation with homonuclear diatomic halogens and chalcogens, as well as the interaction of the resulting endonanocapsules with Mg 2+ cations, clearly indicates that a stronger interaction with these ions leads to an increased cell voltage.Consequently, it enhances their performance as negative electrodes for rechargeable magnesium batteries.In the case of the iodine-encapsulated anode, a remarkable cell voltage of 3.61 V was reached.

Supplementary Materials:
The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/nano14030271/s1, Figure S1: Geometrically optimized structures and molecular orbitals plots for endonanocapsules; Figure S2: Geometrically optimized structures and molecular orbitals plots for endonanocapsules adsorbing Mg; Figure S3: Energy level diagram for diatomic iodine endonanocapsule; Table S1: Vibrational analysis of the BN nanocapsule; Table S2: Vibrational analysis of the diatomic iodine endonanocapsule; Table S3: Vibrational analysis of the diatomic iodine endonanocapsule adsorbing Mg-ion; Table S4: Optical absorption analysis of the BN nanocapsule; Table S5: Optical absorption analysis of the diatomic iodine endonanocapsule.

Figure 1 .
Figure 1.Optimized structures and visualization of frontier molecular orbitals for the B 24 N 24 nanocapsule (a), B 24 N 24 @Mg (b) and B 24 N 24 @Mg 2+ (c).Nitrogen atoms are denoted in blue, boron atoms in pink and magnesium atoms in green.Distances are in Å.

Figure 3 .
Figure 3. Details of the atom-and angular momentum-projected DOS for I 2 /B 24 N 24 @Mg 2+ (a) and the total density of states computed for I 2 /B 24 N 24 (b) at the GGA-PBE level of theory.The HOMO is taken to be zero for the energy scale.Dashed black lines indicate the HOMO and LUMO.

Figure 5 .
Figure 5. Optical absorption spectra of B 24 N 24 (red) and I 2 /B 24 N 24 (gray), calculated within TDDFT with the ALDA-XC kernel.Transitions related to relevant peaks are shown.

Figure 6 .
Figure 6.Voltage V cell trend at 298.15 K and 1 atm for the examined nanostructures.

Table 1 .
Interaction energies (E inter ), HOMO-LUMO energy gap (E ga p ), cell voltage at 298.15 K and 1 atm (V cell ), cell Gibbs free energy change (∆G cell ) and formation energies (E f ) for the nanostructures investigated.