Chemical templates that assemble the metal superhydrides

The recent discoveries of many metal superhydrides provide a new route to room-temperature superconductors. However, their stability and structure trends and the large chemical driving force needed to dissociate H2 molecules and form H covalent network cannot be explained by direct metal-hydrogen bonds and volume effect. Here, we demonstrate that the understanding of superhydrides formation needs a perspective beyond traditional chemical bond theory. Using high-throughput calculations, we show that, after removing H atoms, the remaining metal lattices exhibit large electron localization at the interstitial regions, which matches excellently to the H lattice like a template. Furthermore, H lattices consist of 3D aromatic building units that are greatly stabilized by chemical templates of metals close to s-d border. The chemical template theory can naturally explain the stability and structure trends of superhydrides and help to predict new materials such as two-metal superhydrides.

Among many remarkable physical and chemical properties of hydrogen, its capability of achieving superconducting state at or above room temperature has received intensive attention in condensed matter studies for many decades. [1][2][3] However, hydrogen is very resistive to metallization and polymerization that is an essential step toward superconductivity, and large driving forces are needed to overcome it. As predicted theoretically, a tremendous high pressure of 550 GPa is needed to drive the transformation of hydrogen to atomic phases. 1,4,5 Therefore, the chemical forces that can "pre-compress" the hydrogen became an attractive approach of superconductive hydrogen under moderate pressure 2 and have led to the predictions and syntheses of numerous hydrogen-rich compounds that brought us ever close to room temperature superconductivity. 6,7 These compounds can be roughly categorized into metal hydrides and non-metal hydrides. As the second type of hydrides, H3S showed a Tc of 203 K near 150 GPa, 8 which is the first to break the 25-year Tc record of cuperates. More profoundly, a ternary C-S-H system has just been demonstrated to become superconducting at about 15 °C and 267 GPa. 9 All H atoms in these compounds bond with p-block elements that are in hypervalent states. 10 In contrast, many metals close to the s-d border such as Ca, Sc, Y, La, Ce, Th incline to form superhydrides with exceedingly high H compositions in which all H atoms form extended lattices (Fig. 1a-c). [11][12][13][14][15][16][17][18] The H lattices in these compounds feature strong covalent H-H bonding, high electron density and strong electronphonon coupling, giving rise to superconductivity at very high temperatures. [19][20][21] A large chemical driving force is needed to explain the formation of metal superhydrides. The available assumptions focus either at the volume effect or charge transfer between metals and hydrogen, 7,11 which can be examined by splitting the enthalpy changes into the changes of internal energy and the PV term ( Fig. 1d-f and Supplementary Fig. 1). Generally, metallic hydrogen phases such as Cs-IV 22,23 show significant volume reduction while comparing with molecular phases such as C2/c 24,25 , but their internal energies are much higher at lower pressures. The volume reductions are even more significant for many superhydrides. However, for most of the superhydrides, DPV increases with pressure. The volume of H (as defined in methods section) in LaH10 becomes higher than Cs-IV H at about 170 GPa and even higher than molecular C2/c phase at about 330 GPa (Fig.  1f). Therefore, it cannot be a consistent driving force for the formation of superhydrides. The volume reduction of superhydrides at lower pressures is more of a result of strong chemical interactions with high symmetry constrains. In contrast to PV, the relative internal energies of superhydrides decrease steadily while comparing with molecular and atomic hydrogen phases ( Fig. 1e and Supplementary Fig. 1), indicating strong chemical interactions between H and metals. Electron doping theory attributes this chemical interaction to the charge doping from metals to H, which seemingly explains the destabilization of H2 molecules because the extra electrons will occupy their anti-bonding states. However, calculations show that the excess charges also destabilize extended H lattices and the overall effect to H polymerization is insignificant (Fig. 1g). The energy of Cs-IV phase of metallic H actually goes up comparing with H2 C2/c phase while adding electrons (Fig. 1g). Furthermore, the charge doping from metal to hydrogen in superhydrides decreases with increasing pressure, distinctly opposing the trend of internal energy. Besides charge doping, the strong covalent bonding between metals and hydrogen seems to be another candidate of the driving force. However, both integrated Crystalline Orbital Hamiltonian Population (ICOHP) 26 (Fig. 1h) and Electron Localization Function (ELF) 27 (Fig. 1i) reveal that the M-H bond strengths are significantly weaker than H-H bonds and therefore can hardly cause the formation of extended H lattice. Especially, the very small ICOHP values between the 5d/4f orbitals of La and H 1s show that these orbitals do not play major roles in forming metal superhydrides.
A new set of questions emerged after putting together all the recently predicted and synthesized metal superhydrides. Several different structures are often found for superhydrides with same H compositions and their energy order strongly depends on metals. Although, the hydrogen lattices in these structures show intricate geometry, the metal atoms usually form simple lattices such as face-centered cubic (FCC), hexagonal close pack (HCP), simple hexagonal etc., or lattices slightly deformed from them. For example, most of the MH9 except PrH9 and PaH9, adopt hexagonal structures in which the metal atoms form HCP or SH lattices. Also, the MH12 structure with highest symmetry ( 3 $ ) consists of FCC metal lattice and H cubo-octahedra locating at the octahedral sites. However, BaH12 in this structure is significantly higher in energy than a distorted structure with P21 symmetry, although the Ba lattice in the latter structure forms a slightly distorted FCC lattice. 28 The stability trend of these structures is hard to be explained by the direct chemical interactions between metals and H.
In the following sections, we will show that instead of directly bonding with H, the presence of the metals significantly enhances the stability of the extended hydrogen lattices in superhydrides through a chemical template effect. The new theory can explain the formation of the superhydrides, the trend of metals that can form superhydrides across the periodic table, the preferences of superhydride structures for different metals, etc. It can also help to search new superhydrides, especially those with higher H compositions and with mixed metals.

Results and discussions
The electron localizations in metal lattices. The first step toward the mechanism of superhydrides formation is noticing that the electron localizations are ubiquitous in metals including the metal sub-lattices of superhydrides. In high-pressure electrides (HPE) such as hP4 Na, electrons occupy the local quantum orbitals at the interstitial site and play the role of anions of ionic compounds. 29,30 This view can be extrapolated to many low-pressure structures of metals in which electrons only partially occupy the interstitial orbitals, rendering them in metallic states. For example, the La atoms in LaH10 at 300 GPa correspond to a face-centered cubic (FCC) lattice at 12.4 GPa. Its ELF exhibits maxima with considerable values of 0.62 and 0.45 at the centers of octahedral (E O ) and tetrahedral (E T ) sites, suggesting some crystal orbitals have large distributions at these areas (Fig. 2a). As a matter of fact, the three highest occupied crystal orbitals (CO) at the G point that are 2.96 (HOMO-2), 2.38 (HOMO-1) and 2.33 (HOMO) eV below EF, show maxima and large contributions at E O sites, both E O and E T sites, and E T sites, respectively ( Fig. 2b-d). On the other hand, the charge distribution of FCC La shows no maxima at E O and E T sites; therefore, it is not an HPE. Similar localizations also happen to other metal lattices, for example, Sc BCC lattice in ScH6 (Fig. 2e) and Y HCP lattice in YH9 (Fig. 2f).
The strengths and the sites of the electron localizations strongly depend on the metal atoms and the geometry, and they evolve systematically with the size of the metal lattices. While lattice constant reduces, the general trend of the electron localization is from sites with less to sites with more surrounding atoms ( Fig. 2g-h). For example, while the unit length of an FCC Ca lattice reduces, the electron localization shifts from sites between two atoms (bond center), to E T sites, and then to E O sites ( Fig. 2i-j). For metals in the same period, the electron localization decreases with increasing atomic number. They are the strongest for s-block metals and early transition metals and become much weaker for late transition and p-block metals such as Al (Fig. 2k-n). Interestingly, the localizations for early transition metals such as Y, La, and Hf etc. are strong on both E O and E T sites, an important feature that will stabilize MH10 superhydrides. It is important to notice the difference between the electron localizations and electron distributions at the interstitial sites. Metals like Al cannot stabilize H lattice and form superhydrides, although they have very high electron densities at the interstitial sites. The ELF of Sc BCC lattice in ScH6 at 100 GPa. f. The ELF of Y HCP lattice in YH9 at 300 GPa. g. ELF values at interstitial sites in Ca FCC as functions of unit length. The shaded area shows the unit lengths of Ca lattice in a conceived CaH10 at pressures from 100 to 300 GPa. h. ELF values at interstitial sites in Ca BCC as functions of unit length. The shaded area shows the unit lengths of Ca lattice in CaH6 at pressures from 100 to 300 GPa. i. ELF of Ca FCC lattice with a unit length of 6.5 Å. At this length, FCC Ca show large electron localizations at E T sites. j. ELF of Ca FCC lattice with a unit length of 4.7 Å. This length corresponds to Ca FCC lattice in a conceived CaH10 under 300 GPa. k. ELF values at interstitial sites in Al FCC as functions of unit length. The shaded area shows the unit lengths of Al lattice in a conceived AlH10 at pressures from 100 to 300 GPa. l. ELF values at interstitial sites in Al BCC as functions of unit length. The shaded area shows the unit lengths of Al lattice in a conceived AlH6 at pressures from 100 to 300 GPa. m. ELF of Al FCC lattice under ambient pressure. n. ELF of Al BCC lattice under ambient pressure. Both ELFs show that electrons in Al lattices localize mainly around Al atoms due to the occupation of Al orbitals.

The building units of H lattices.
The second key feature of superhydrides is that the H lattices consist of unique and intrinsic building units (Fig. 3a) that are positioned right at the active regions of the metal templates. They can be identified by the geometry, symmetry and the crystal orbitals of H lattices (Fig. 3b, c). Some units are straightforward to identify by their appearance in the lattice, such as H6 hexagons and H4 squares in MH6, and H8 cubes and H5 tetrahedrons in MH10; whereas some others are quite unexpected. For example, the H units in MH9 are not H5 and H6 rings, but rather a H6 corona and a H8 bipyramid (Fig. 3a). These two units share most of the symmetries of MH9, and many occupied crystal states localize on them (Fig. 3c). The ways that H lattices are divided into building units are also corroborated by their energies that are calculated by use of a He-matrix model (see Methods). Among the 6 building units in MH6, MH9 and MH10, the H6 hexagon, the H8 cube and the H6 corona are significantly lower in energy. Also, their energies decrease for about 0.5 eV/atom while pressure increases from 100 GPa to 300 GPa (Fig.  3d).
The remarkable stability of H6 hexagon, H8 cube and H6 corona originates from an important feature of H-H bond. Due to the quantum resonance, these bonds are conjugated and delocalized in the same way as the C-C 2p p bonds in organic molecules of which the stability is ruled by the aromaticity. 31,32 Because of the topology of the p bonds, the aromatic molecules need to assume a planar geometry and their electron counting needs to satisfy 4n+2 rule, which ensures a gap between the fully occupied and unoccupied orbitals. However, in contrast to C p bonds, the conjugation of H-H bonds is not constrained inside the same plane. The corresponding threedimensional aromaticity depends on the symmetry and the number of H in the cluster, and the above three H clusters are all aromatic. The energy levels of H6 hexagon resemble the energy levels of the benzene ring, 31 and the highest occupied (HOMO) and the lowest unoccupied molecular orbitals (LUMO) are doubly degenerate (Fig. 3e). In contrast, the HOMO and LUMO of H8 cube are triply degenerate (Fig. 3f)  The assembly of H covalent network on metal templates. While the ELF and the COs of metal sublattices in superhydrides are overlaid on the corresponding H lattices, a striking feature of the superhydrides emerges unexpectedly. The H lattice matches excellently with the ELFs (Fig. 4a-c) and relative COs (Fig. 4d) of the metal lattices that include no information of H atoms at all. The H10 lattice in LaH10 consists of two types of H, H 1 that forms H8 cubes locating at the E O sites, and H 2 locating at E T sites. Furthermore, some COs of the H10 lattice also consist of orbitals locating at E O and E T sites. At G point, the lowest unoccupied CO (Fig. 4e) consists of orbitals locating at both E O and E T . Therefore, while the La and the H10 lattices are interposed together, the occupation of E O and E T orbitals in La valence bands will naturally dope H10 by occupying its conduction band states. Indeed, the highest occupied state of LaH10 at the G point consists of orbitals at E O and E T (Fig. 4f). Therefore, instead of direct charge transfer from La atoms to H atoms, large part of the electron density of La lattice already localizes around the consisting motifs of H lattices, forming a chemical template awaiting and assisting the assembly of the H lattice. These sub-lattices are not necessary the stable structures of metals. Especially, for non-cubic superhydrides, the stresses of the metal lattices are usually not hydrostatic (Supplementary Table  3). For example, the normal stresses of the Ce lattice in CeH9 at 300 GPa are s1=s2=1.1 GPa, s3=15.1 GPa. Nevertheless, all metal lattices show large electron distributions in the interstitial regions that match nicely with the locations and patterns of the H lattices in superhydrides, even if many superhydrides are in low symmetry structures, such as R3 $ m SrH6 and Immm Ti2H13 and the corresponding ELF and H lattices exhibit complicated geometry features. On the other hand, the strength of the template effect that can be estimated by the ELF values at the interstitial sites strongly depends on metals. While they are the strongest for metals at the s-d border, they decline quickly for metals away from that region and become insignificant for late transition metals ( Supplementary Fig. 2). For example, in an FCC Ir lattice of a conceived IrH10 compounds, the maxima of ELF are no longer at the interstitial sites but in the regions between neighboring Ir atoms.
The presence of the metal sub-lattices greatly improves the stability of H building units due to the chemical template effects and the strength of template as measured by ELF intensities strongly depend on the metal ( Fig. 4g-i) as well as the pressure (unit length). We employ high throughput calculations using the He matrix model that allows comparing energies of H clusters with H2 molecules in the same chemical environment (see Methods). The results show that the presence of the metal atoms can lower the energies of H units relative to H2 for about 0.5 to 3 eV, including non-aromatic ones such as H4 squares and H5 tetrahedrons ( Fig. 4j and Supplementary Fig. 3). This template effect strongly depends on metals. The most profound changes happen to the elements around the s-d border and decline with increasing number of d electrons, which is consistent with the trend of ELF (Fig. 4g-i and Supplementary Fig. 2). Among row 6 elements, those sit at the s-d border such as Ba and La can lower the energies of all H units except H5 below H2 at 300 GPa; whereas late transition metals such as Pt and Au show much weaker effect. Very few elements, including Ba, La and Th etc, could bring the energy of H8 cube below H2.
Pressure is essential to the stability of H lattice, by virtue of directly lowering the energies of H units and influencing the effect of metal templates. The distances between metal atoms are larger under lower pressure, reducing the electron density in the interstitial region and weakening the chemical driving force from the templates. The expansion of the metal lattices and the reduction of the template effect will also happen while more H atoms are packed into them, therefore placing limits to H compositions of superhydrides.
The chemical template theory. The conventional theory of chemical bonds in molecules and solid compounds take free atoms as the initial states. 33 The charge transfer and the bond energies are obtained by referring to free atoms and their quantum orbitals. While describing superhydrides MHn, it is advantageous to take the sub-lattices, including metal and anion (Hn) lattices respectively, as the starting points. The Hamiltonian of compounds consisting of metals and anions can be written as = " + # , in which " and # are the Hamiltonians of the metal and the anion sublattices. For ionic and largely polarized compounds, the valence states that are important for binding energy are more significantly determined by # , giving ground for treating the effects of metal lattices as a perturbation. Indeed, in highly ionic compounds, the valence states $ mainly consist of the local orbitals around the anions.
While using stationary perturbation theory and treating " as the perturbation, the energy change of the valence state $ due to the presence of the metal sublattice is (1) Assuming " % are the crystal orbitals of the metal sublattice, " can be expressed as and consequently, If we assume only one crystal orbital of the metal sublattice " ' ⟩ will lower ∆ and the valence state energy, and therefore will stabilizes the compound. Therefore, the presence of the chemical template could significantly stabilize the compounds because it optimizes the electron distribution in both anion and cation sublattices.
The concept of chemical template provides a very different view to chemical bonds in solid compounds. The strong chemical interactions due to the template effect do not associate with large electron relocations, in contrast to both ionic and covalent bonds. The electron distributions in superhydrides are optimal not only to the whole compound but also to its consisting metal and H sub-lattices, which maximize the stability. Taking LaH10 as an example, the summation of the density distributions of the sub-lattices r(La+H10) = r[La lattice] + r[H10] resemble very nicely r(LaH10) ( Supplementary Fig. 4a), which can be seen more clearly by the fact that Dr = r(LaH10) -r(La+H10) is quite small. As a matter of fact, the integrated transferred charge calculated from Dr is about -0.15e for La ( Supplementary Fig. 4b), which is about 10 times smaller than the Bader charge calculated from r(LaH10) (Supplementary Fig. 4c). The negative value indicates an electron transfer to La, which can be misinterpreted as the presence of anionic La, 34 while it is actually the transfer of a small portion of charges around E O and E T back to La.
Chemical templates in single-metal superhydrides. Chemical template theory not only can explain the formation of superhydrides but also can explain the energy order of different structures and guide the search of new superhydrides. After intense search of new superhydride compounds and structures in the past several years, it becomes clear that almost every MHn composition corresponds to several structures with very different space groups. There is lack of a convincing and all-embracing theory explaining why different metals prefer certain structures. Many intricate structure preferences of superhydrides can be understood in the framework of chemical template theory. For example, between the two MH9 structures 13,18,35 , 6 ! / (CeH9) and 4 $ 3 (PrH9), most metals prefer the former except PrH9 and PaH9 that are found in 4 $ 3 structure (Fig. 5a). In contrast to metals like Cs and Ba that show no significant electron localizations at E O sites and to metals like Y and La that show strong localizations bridging E T -E T pairs (Fig. 5b), both features can lower the energy of 6 ! / structure by relaxation in (111) direction, Pr and Pa show strong location at E O site but no strong pair-bridging (Fig. 5c). i. The ELF of Na sublattice in NaH6 in the 3 $ structure (LaB6). j. Partial convex hall of Sr-H superhydrides. SrH6 is assumed to be stable throughout the pressure range. k. Structure preferences of MH6 of selected metals.
In another example, the structure of BaH12 has been thoroughly studied by DFT based structure search method in conjunction with an experimental work. Among the predicted cubic structures that matches the X-ray diffraction pattern, the 3 $ BaH12 consists of highly symmetric H cubooctahedra that occupy the E O sites of FCC Ba. However, the energy of this structure is significantly higher than the distorted cubic structures such as the P21 and the Cmc21 structures 28 (Fig. 5d). The cause of this symmetry reduction is due to the less significant and yet considerable electron localization at the E T sites that can be utilized to stabilize the H lattice in the structures with reduced symmetry (Fig. 5e). On the other hand, the HCP Ba lattice contains paired E T sites and allow lower symmetry of the polyhedrons. The search of BaH12 superhydride structures by adding H atoms in the Ba HCP lattice found a 6 ! / BaH12 structure (Fig. 5f) that is only 25 and 16 meV higher in energy than P21 BaH12 at 100 and 200 GPa, respectively. In case of several other metals, such as K and Cs, 6 ! / is the most stable one among all known MH12 structures.
LaH16 is another promising structure with high H composition. La forms SH lattice in this structure and its ELF shows large electron localization at the prism interstitial sites (Fig. 5h). However, the ELFs of many other metals are distinctly different to La. Especially, there is lack of electron localization close to the metal hexagonal planes that are necessary to stabilize the LaH16 structure. We performed a crystal structure search for BaH16 and ScH16 by adding H atoms to Ba and Sc SH and SC lattices. Two MH16 structures are found including a new Pbam structure containing an SH metal lattice, and a 4 $ 2 structure containing a slightly deformed SC metal lattice. The latter structure has been found in a structure prediction study of AcHn compounds under high pressure. 36 Although the identified Pbam structure is lowest in energy for BaH16, it is slightly above convex hull at pressures below 300 GPa, mainly due to the exceedingly stable BaH12 compound. However, after examining all other metals with strong template effect, we found that SrH16 in the same structure become stable at pressures above 186 GPa (Fig. 5j). HfH16 is also stable, but only at pressures below 110 GPa.
A large-scale structure search based on chemical templates might help us find more stable superhydrides. For example, the strong electron localization at the body center of the simple cubic lattice formed by alkali metals and Ba suggests possible superhydrides in LaB6 structure. As a matter of fact, the MH6 superhydrides of most alkali metals and Ba are more stable in LaB6 structure than CaH6 structure (Fig. 5k). However, in most of the cases except NaH6, their energies are slightly higher than BaH6 Imm2 structure 37 . Among all the known structures, NaH6 is most stable in LaB6 structure (Fig. 5i). While constructing the convex hull of Na-H binary compounds, NaH6 is found to be 22 meV above the convex hull at 200 GPa.
Chemical templates in mixed-metal superhydrides. While almost all possible binary superhydrides have been tried out, the hope of achieving higher Tc at lower pressure rely on the search of novel ternary superhydrides composed of two different metals. 12,38-41 Constructing a complete phase diagram of ternary superhydrides based on full-scale DFT calculations is extremely difficult, and the search of optimal compounds across the entire periodic table as we have done for binary superhydrides is an impossible task. To date, the diagrams of very few ternary superhydrides such as Li-Mg-H have been thoroughly searched, which predicted a metastable superhydride, Li2MgH16, that shows a Tc of ~473K at 250 GPa. 38 The template theory allows us to assess the formation of mixed-metal superhydrides by studying only the metal lattices. Highthroughput calculations show strong correlation between the enhancements of the template strength while mixing metals and the energy of formation of mixed metal superhydrides. High throughput calculations based on the chemical template theory reveal two mechanisms of combining two metals to generate stable ternary superhydrides. In the first case, the combination of the two "template-active" metals might strengthen the effect. The ELF of two-metal lattices adapted from metal structures in MH6, MH10, and MH9 at 100 GPa by partially replacing metal atoms (Fig. 6a-e and Supplementary Fig. 5) show the mixture with later transition metals greatly lowers the ELF values at the interstitial sites. In contrast, if both metals are close to s-d border such as Sr, Y and Zr (Fig. 6b-d), the resulting electron localization might be enhanced, which can be measured by (Fig. 6f). More importantly, ΔELF shows strong correlation with the stability of the ternary superhydrides that is calculated as the reaction enthalpies (Fig. 6g). For example, while mixing Sr and Y, the average ELF increases (Fig. 6b) and the SrYH12 is stable against the decomposition into SrH6 and YH6 (Fig. 6g). In contrast, the mixture of Y and Zr leads to lower average ELF (Fig. 6c) and correspondingly YZrH12 is not stable (Fig. 6g). Similar trend can be found for MH9 and MH10 related two-metal superhydrides ( Supplementary Fig. 6). A rough estimation of Tc using the ratio of the density of hydrogen related states versus the total density of states 42 at the Fermi level show that the mixing metals in superhydrides can potentially improve Tc (Supplementary Fig. 7).
In the second case, an active metal such as Li, Na and Mg etc. is mixed with a metal at the s-d border and enhance their template effect by doping electrons. For example, Sc3Mg in 6 ! / structure show strong enhancement of the Sc template by adding Mg. The ELFs of the metal lattice with and without Mg show the same topology, but the values are significantly higher while adding Mg (Fig. 6h-i), which is caused by the electron transfer from Mg to Sc crystal orbitals. We thus conducted a structure search by adding H atoms into the Sc3Mg metal lattice, which leads to the discovery of a superhydride Sc3MgH24 also in 6 ! / space group (Fig. 6j-k). This compound is stable against the decomposition into ScH6, MgH4 and H2, with -0.54 meV/atom reaction enthalpy at 200 GPa. It shows considerable DOS at the Fermi level and might be a candidate superconductor under pressure (Fig. 6l). The results show that a large-scale study of the mixed metal lattices adapted from known intermetallic compounds and the change of their ELF is a promising and affordable approach to predicting mixed metal superhydrides in a massive scale. The mixed metal lattices adapted from MH6, MH10 and MH9 in this work are also structures of known intermetallic compounds; and the Li-Mg lattice in Li2MgH16 is isostructural to Laves phase MgCu12. 38

Conclusions
By studying the mechanism of metal superhydrides formation, we revealed a significant driving force of forming solid compounds that is not known before, i.e. the chemical template effect. Different to the traditional chemical bond theory that compares the compounds with free atoms, we view the formation of superhydrides as the interposition of metal and H sub-lattices. Our calculations showed large electron localizations at the interstitial sites due to the occupation of the crystal orbitals of the metal sublattices, forming chemical templates. They assist the dissociation of H2 molecules and the formation of H covalent networks in superhydrides. Furthermore, the H sublattices consist of H building units that are aromatic despite that they are not planar. Calculations on a He-matrix model show that the presence of the metal sub-lattices can largely stabilize the building units of the H lattices. Furthermore, the chemical template theory explains the large structural variations and their energy orders for superhydrides with the same H composition. The potential of the chemical template mechanism in searching novel superhydrides especially with higher H compositions and mixed-metal are demonstrated. High-throughput calculations revealed a strong correlation between the strength of the chemical templates and the stability of the mixed metal superhydrides, indicating it can be used for a large-scale search of ternary and quaternary superhydrides. It will greatly enhance the efficiency of searching superhydride materials that might become superconducting at higher temperature and lower pressure.

Methods
Solid-state density functional calculations. The underlying first-principles density functional theory (DFT) calculations were carried out by using the plane-wave pseudopotential method as implemented in Vienna ab initio Simulation Package (VASP). 43,44 The electron-ion interactions were described by the projector augmented wave pseudopotentials 45,46 and the used valence electrons are listed in Table 1. Some calculations of late transition metals, such as the ELF trend of various lattices under compression are done using pseudopotentials without including the outercore p orbitals in the valence. Our test calculations show that the differences caused by this choice of psedupotentials is negligible. We used the generalized gradient approximation formulated by Perdew, Burke, and Ernzerhof 47 as exchange-correlation functional. A kinetic energy cutoff of 520 eV was adopted for wave-function expansion. The k-point meshes with interval smaller than 2π × 0.03 Å -1 for electronic Brillouin zone to ensure that all enthalpy calculations converged within 0.02 eV/atom. The high-throughput first-principles calculations were performed by using the Jilin Artificial-intelligence aided Materials-design Integrated Package (JAMIP), which is an opensource artificial-intelligence-aided data-driven infrastructure designed purposely for computational materials informatics. 48 Table 1. The valence configurations of the pseudopotentials used in our solid-state DFT calculations.

Energy analysis of H in superhydrides.
In order to compare the energy terms, including the enthalpies, the internal energies and the PV terms, of the hydrogen in superhydrides directly with pristine hydrogen phases under pressure, we deduct the corresponding energies of the metal hydrides with typical composition, and refer it to those of C2/c molecular H2 phase.  26 and integrated differential charge density (see below), etc.
Integrated differential electron density. First, for a given metal superhydride (MHn), three electron densities are calculated, including that of MHn, of the metal lattice (MHn after removing all H), and of the H lattice (MHn after removing all metals). The differential electron density is then calculated as Dr = r(MHn) -r[metal lattice] -r[Hn lattice]. This differential density distribution is separated into regions by the surface(s) of Dr=0. Especially, all the metal atoms are surrounded by a surface of Dr=0 that is roughly spherical. In all the cases, Dr>0 inside the surface, indicating that electrons transfer toward metal atoms while interposing the metal and the H lattices. The total charge transfers to metals are calculated by integrating the differential electron density inside the Dr=0 surface. The charges shown in Supplementary Fig. 4c are negative because the electron charge is negative.

Quantum chemistry calculations on H clusters.
The geometry parameters of all H clusters are adapted from the superhydrides optimized by solid-state DFT calculations at the studied pressures (100 and 300 GPa). Their molecular orbitals and the energy levels are calculated by using Gaussian 09 package. 50 The restricted open-shell B3LYP 51-53 and Hartree-Fock 54 methods are used for exchange and correlation functional for H cluster with even and odd number of H atoms respectively, respectively. The 6-31G(d) basis set is adopted for all the single-point calculations.
He matrix model. We build He matrix models to study the energies of various H clusters that are the building units of H lattices in superhydrides and compare them with H2 molecules in the same chemical environment. Taking LaH10 as an example, we first optimize its structure to a selected pressure, for example 300 GPa. A supercell is constructed by triple the units in all three directions. After that, we replace all the H atoms with He atoms. By keeping or removing La metal atoms, we constructed two models, He320 and La32He320. The H clusters are created in these models by replacing corresponding He atoms with H atoms. For example, while modeling H8 cubes, we replace 8 He atoms in a cube with H atoms. For comparison with H2 molecules, we replace four pairs of He atoms in H320 and La32He320 by four pairs of H atoms. In order to compare the energies of H cluster with H2 molecules at the same chemical environment, each H2 molecule is placed at the sites that are part of H cluster. Also, the H2 molecules are positioned to maximize their distances so to minimize the factitious H2-H2 interactions in the model. The H coordinates in H2 models are relaxed in order to maintain the lowest energy of H2 molecules inside the He matrix. The relaxed H-H bond lengths in these models are close to that of H2 molecules at ambient condition. The H atoms in the models of H clusters are not relaxed so that the H-H distances in these clusters are kept the same as in the H lattice of LaH10 at the studied pressure. Similarly, the supercell He-matrix models, including He96 and Y16H96, are constructed for YH6, and the energies of H4 square and H6 hexagon are studied using these models. The supercell He-matrix models, including He144 and Ce16He144, are constructed for CeH9, and the energies of H6 corona and H8 bipyramid are studied using them. In high-throughput calculations, metals in superhydrides vary, and the corresponding He-matrix model are created from the MHn lattice optimized at the studied pressure.

Stability of mixed-metal superhydrides.
The stability of the mixed-metal superhydrides is assessed by comparing their enthalpies with their constituent binary superhydrides. The enthalpy differences per atoms as shown in Supplementary Fig. 7 are calculated by the following formulae for three types of superhydrides based on 3 $ MH6, 6 ! / MH9 and 3 $ MH10 superhydride structures. Specifically, the enthalpy differences are defined as:  Fig. 1: The extracted enthalpy (Δ ), internal energy (Δ ) and Δ term of hydrogen in superhydrides relative to pristine hydrogen in molecular phase as functions of pressure. The investigated superhydrides include: a, CaH6, ScH6, YH6 in 3 ) structure; b, CeH9, ScH9, YH9, ThH9, PrH9 in 6 % / structure; c, ThH10, YH10, LaH10 in 3 ) structure; d, SrH6 in 3 ) structure, ScH10 in 6 % / structure, PrH9 in 4 ) 3 structure, LaH10 in 3 ) structure, and e, BaH12 in 3 ) structure, LaH11 in 4 structure, LaH16 in 6/ structure, Ti2H13 in structure, YH13 in 3 ) structure. All quantities are relative to that of molecular H C2/c structure. The shaded areas show Δ , Δ , and Δ of metallic H in Cs-IV structure.  However, because the 1s orbital is spherical, the conjugation of the 1s-1s bonds does not require these bonds to be coplanar. This major difference between the H-H bonds and the C-C p bonds lifts the coplanar constraint of aromaticity. Thus, a 3D H cluster could still be aromatic, if the occupation of its energy levels satisfies the requirement of aromaticity, i.e. the lower energy orbitals are fully occupied and the higher energy orbitals are empty, forming a gap between the HOMO and the LUMO orbitals. Eventually, the aromaticity depends on the symmetry and the number of electrons of the cluster. Strikingly, we find that the H lattices of most of the superhydrides consist of building units that are aromatic. Especially, these units locate at the high value regions of ELF, often corresponding to maxima, and therefore are largely stabilized by the electrons localized in these regions. The following summarizes the most important building units found in the superhydrides that have been discovered so far. have large values and maxima at octahedral and tetrahedral interstitial sites. ELF is known to reveal the chemical structure of atoms, molecules and solids. For example, it can clearly reveal the shell structure and the orbitals of heavy atoms whereas the electron density decreases monotonically with increasing radial distance. Thus, the ELF maxima at the interstitial sites of FCC La indicate that some crystal orbitals have large contributions in these regions. In other words, these crystal orbitals consist of large compositions of the local orbitals of the quasi-atoms locating at these interstitial sites. As discussed in the text, we can identify the crystal orbitals that correspond to the occupation of quasiatom orbitals at the interstitial sites. Since the electrons do not localize completely at these interstitial sites, it is not a high-pressure electride (HPE).

H4 tetrahedrons
The large electron distributions at the interstitial sites act as an effective chemical template for the assembly of H lattice in LaH10 because they match nicely with the H10 lattice. As shown in Fig. 2a    Section VIII. The chemical templates and stability of mixed metal superhydrides    Supplementary Fig. 6. The color shows Tc (blue represents higher Tc), whereas the + and -signs show the sign of the reaction enthalpies that are presented in Supplementary Fig. 6, i.e. -signs indicate that the mixed metal superhydrides are stable against the decomposition into single metal superhydrides. These results show that mixing metals in superhydrides has the potential to improve Tc by increasing the density of hydrogen related states at the Fermi level.