Introduction

Metallic hydrogen1 is believed to be the most common condensed phase of matter in the universe, comprising the cores of gas-giant planets2,3,4 and giving rise to their enormous magnetic fields. However, it is exceptionally challenging to make metallic hydrogen on Earth5,6,7,8. Consequently, most of our understanding of this material comes from theory9,10. Most elements become metallic at sufficiently high pressures and, in general, metallic liquids will mix, lowering the melt point. Here, we investigate the solubility of other light elements in a metallic hydrogen environment.

The chemical bonding in these systems can be described in detail using electronic structure calculations, however the coexistence of localised and delocalized electrons means that descriptions used in conventional chemistry must either be discarded or extended. In this analysis, “covalent” bonds will be defined in terms of Crystal Orbital Hamilton Population (COHP) analysis.

Planetary models depict layers separated by the weight of elements, e.g. gas giants feature an outer molecular hydrogen and helium envelope and a core of metallic hydrogen depleted of helium4,11,12,13 which is predicted to be insoluble below its own metallization conditions14,15,16,17,18,19,20,21. Understanding material properties allows us to infer the composition and structure of exoplanets from their mass-radius relation2,3,14,22,23,24,25,26.

Chemical bonding is different at high pressure. For example, on Earth, the major components of the mantle exhibit sixfold coordinated silicon27,28,29,30,31, in contrast to the fourfold sp3 bonding found in normal conditions. The unconventional formation of sixfold coordinated silicates are well described by density functional theory calculations as being enabled by the electrons donated from positive ions, and lower mantle minerals are stabilised at pressure thanks to the increased density32,33,34,35,36,37,38. If chemistry can change so radically just few thousand kilometres beneath our feet, how different might it be elsewhere in the solar system? Network formation and fourfold-sixfold coordination change in carbon has been subject to much discussion based on experimental and theoretical work39,40,41,42,43,44,45,46.

While helium in hydrogen, and hydrogen-rich metals are very well studied at high-pressure, particularly with potential applications to superconductivity, less attention has been paid to the issue of solubility of heavier elements in metallic hydrogen, and the implications for different chemical bonding within giant planets21,47,48,49.

Theoretical study of metallic hydrogen began in 1935, when Wigner and Huntington1 used free electron theory to estimate the density of metallic hydrogen, obtaining a value remarkably close to current estimates. This implied that hydrogen molecules would transform into atomic metallic hydrogen when subjected to sufficiently high pressure - unfortunately, their estimate of 25 GPa was an order of magnitude too low. In 1968, Ashcroft made a remarkable prediction that metallic hydrogen would be a room-temperature superconductor although currently, theory indicates that at low temperature hydrogen remains molecular to about 500 GPa9,50,51,52,53,54,55. Predictions of the crystal structure of metallic hydrogen came even later9,50,56,57, through ab initio random-structure searches. Surprisingly, the atomic and metallic crystal phase is now believed to be a complex, open structure, rather than the dense-packed structures assumed by Wigner, Huntingdon and Ashcroft. This type of open structure is typical of the high-pressure Group I electride materials, having I41/amd symmetry, isostructural with cesium IV58,59,60,61. This I41/amd structure persists until 2.5 TPa, beyond which more densely packed structures are favoured50,62. Fluid metallic hydrogen is expected to exist at much lower pressures, because the covalent bond is broken not only by pressure but also by higher temperatures24,63,64,65,66. Indeed, since fluid atomic hydrogen is supercritical, this phase may extend to the ultra-low pressure of the interstellar medium67.

In experiments68, synthesis of solid metallic hydrogen has been claimed at pressures exceeding 420 GPa using infrared absorption measurements5,6, and at an even higher pressure of 495 GPa as evidenced by reflectivity measurements7. Liquid metallic hydrogen has indeed been reported at much lower pressures in both dynamic and static experiments8,69,70

Carbon is particularly important, being the fourth most abundant element, and the building block of organic chemistry. Determining the properties of these materials is essential for understanding the interior of giant planets, such as Neptune and Uranus71,72,73,74, and Jupiter and Saturn75,76,77. Hydrocarbons have recently been studied at planetary interior conditions, i.e. high pressure and high temperature49,71,72,73,74,75,78,79,80,81,82,83,84,85,86,87. Some molecular compounds, such as CH4(H2)282,83, C2H6 and C4H1074, can be formed under these extreme conditions. In addition, there were a number of theoretical studies on helium, methane and various metals in the metallic hydrogen environment49,75,88. Studies on giant planets suggest that hydrocarbons may exist within their non-metallic middle layers73,74,86. Methane (CH4) has been identified as the most abundant hydrocarbon at pressures of up to several hundred GPa and forms hydrogen-rich compounds with H2 up to 160 GPa82,89. At higher pressures and temperatures, simulations and experiments have suggested that methane decomposes into hydrogen and diamond49,73,86,90. Due to its density, the latter subsequently gravitationally sinks deeper into the planet in a phenomenon known as diamond rain73,86,91,92,93,94,95,96,97,98,99. This predicted demixing contrasts with the observation of high-pressure reaction between diamond and hydrogen100 - an issue which has caused significant practical challenges to synthesizing metallic hydrogen in diamond anvil cells68.

One challenge for theory is the richness of hydrocarbon chemistry. The demonstration that methane is unstable to decomposition does not preclude other stable hydrocarbons. Moreover, given the high temperatures and excess of hydrogen over carbon in gas giant planets, even a low solubility limit could result in much of the carbon remaining in solution in the metallic hydrogen layers.

Here, we use density functional theory calculations to consider what form of carbon will exist in a metallic hydrogen environment. We start by examining the free energy of solid solution carbon in crystalline I41/amd metallic hydrogen with the well-characterized quasiharmonic method. Then we demonstrate the equivalence of the molecular dynamics (MD) approach as an equally reliable estimator of thermodynamic properties, and apply MD to investigate the planetary-relevant fluid metallic hydrogen.

Our result is that we predict the existence of a chemistry, based around a basic sixfold coordination of carbon, fourfold coordination of nitrogen and threefold coordination of oxygen. For example we observe CH6, C2H8, C3H10, OH3 and CH4OH and NH4. These hypermolecules become stable over methane, water and ammonia in conditions of high pressure and modest temperatures, in both solid and liquid metallic hydrogen.

It is worth noting that sixfold coordinated carbon has previously been synthesized101,102 in \({{{\rm{C}}}}_{6}{({{{\rm{CH}}}}_{3})}_{6}^{2+}\) and in the nitrogenase iron-molybdenum cofactor103. The 2+ ions are described as non-classical carbocations, with multicentred covalent bonds. However, our hypermolecules only exist in a metallic environment, and we will show that the molecules are stabilised by the high electron density rather than the pressure per se.

Results

Solid solubility of carbon in I41/amd metallic hydrogen

The solid solubility of carbon in metallic hydrogen can be calculated using the Gibbs free energies (Eq. (1)). Hydrogen exhibits strong nuclear quantum effects66,104, so our calculation includes the zero-point energy of the system as well as the enthalpy, configurational entropy, and vibrational entropy.

$$G(P,T)=H(P,T)+{U}_{ZPE}+T{S}_{con}+T{S}_{vib}$$
(1)

Initially, we consider a single carbon solute in hydrogen (Supplementary Fig. 1). This is more complicated than the standard solid solubility calculation105,106,107 because carbon is significantly larger than hydrogen, so substituting one carbon atom for a single hydrogen is not the most stable arrangement. We tried removing clusters of up to eight hydrogens and found that the most stable arrangement involves removing five hydrogens (Table 1, Fig. 1). If more than five hydrogens are removed from the starting configuration, a vacancy defect is created which diffuses through the lattice in MD.

Fig. 1: Enthalpy and Gibbs free energy differences, electronic density of states, and electron localised function (ELF) of carbon in solid, metallic hydrogen.
figure 1

a Enthalpy of solution (eV/atom) as a function of number of removed hydrogens from static relaxation (blue) and NPT-ensemble MD (orange). b Electronic density of states from a typical BOMD snapshot, showing the characteristic free electron form with a pseudogap at the Fermi Energy. c Phonon density of states from DFPT of a structure from a relaxed CH124 MD snapshot (blue), compared with pure I41/amd hydrogen (orange). d Visualization of eigenvectors of the characteristic symmetric stretch mode of CH6 as shown in the sharp peak above 3000 cm−1 in part (c). eg Electron Localization Function (ELF) surrounding a single carbon atom, including cross-sections of planes A and B. The high ELF values suggest the presence of covalent-type bonds, rather than the metallic bonding elsewhere. The zero value for ELF on the carbon atom is an artefact arising from the 1s electron being described by the pseudopotential.

We used the quasiharmonic approximation, and as a check, particularly of anharmonic effects, we also calculated the free energy from the phonon density of states derived from the velocity autocorrelation function of an MD calculation. The results agree very well for carbon and reasonably well for hydrogen: this is expected from the different anharmonicity in the two systems which is better captured by the MD.

From both MD and static enthalpy, it shows that the classical enthalpy prefers pure substances to the mixture with positive values ΔHMD and ΔHStatic. On the other hand, the entropy and zero-point energy108,109,110, favour the mixture, with negative values in both  − TΔS and ΔUZPE (see Table 1 and Fig. 1a). For the most favourable arrangement, the free energy has an impurity formation energy of Δg = 0.39 ± 0.17 eV. We always observe an octahedral arrangement of six neighbouring hydrogens, forming CH6.

Table 1 Thermodynamic properties for the solid solution at 300 K and 500 GPa

The overall electronic density of states (Fig. 1) is uninformative, being dominated by characteristic free-electron form, with the hydrogen atoms arranged in a way to produce a pseudogap at the Fermi energy, similar to isostructural Cs-IV59,111. However, the electron localization function (ELF)112 around the carbon (Fig. 1d–f) shows that electrons are localized between the hydrogens and carbon in CH6, but not between hydrogen pairs (Supplementary Fig. 2). This suggests that carbon has reacted to form a CH6 molecule with six covalent CH bonds, which we call hypermethane (Supplementary Fig. 3 and Supplementary Table 2).

The phonon calculations show that pure hydrogen exhibits the expected two-peaked acoustic and optical branches of I41/amd. The CH124 supercell retains smeared-out versions of these modes, and the heavier carbon reduces the frequency of the acoustic modes in the supercell. The CH6 molecule has a well-defined symmetric stretch mode, at a frequency higher than anything in the pure metallic hydrogen. (Fig. 1c, d), We compute this mode at the Γ point for four optimized structures from four different snapshots. We found that all of our calculations show the distinctive peak at 3161 ± 2 cm−1. Other modes involving asymmetric CH stretches are mixed with the highest frequency I41/amd modes.

The solid solution gives us an indication that, like silicon on Earth, carbon will go from fourfold to sixfold coordination in giant planets. However, the positive heat of solution suggests that temperatures well above the melting point would be needed for significant solubility. We investigate this further in the next section.

Hypermethane in liquid metallic hydrogen

To further investigate this hypermethane, we simulate a CH6+H118 supercell in the NPT ensemble at 500 GPa. The radial distribution function (RDF), (Fig. 2a), indicates that at 300 K, we have well-defined H-H peaks representing the I41/amd crystal. In the 600 K and 900 K cases, the structure melted as expected10, indicated by the smoothness of the RDFs (Fig. 2a). The mean square displacement (MSD) confirms the melting transition, with a stable MSD at 300 K and a linear increase at 600 K and 900 K (Fig. 2b).

Fig. 2: Radial function distribution, mean square displacement, and cumulative number of bonds per carbon from BOMD in NPT ensemble.
figure 2

a The radial distribution function of hydrogen atom in the CH6+H118 BOMD simulations under the NPT ensemble at varying temperatures, and 500 GPa. The blue solid line denotes the presence of structural peaks in CH6+H118, while the orange and green solid lines signify the disappearance of these peaks due to system melting. b Mean square displacement (MSD) of CH6+H118 is examined, with the MSD depicting the crystal structure of CH6+H118 with a finite MSD at 300 K, represented by the blue solid line. Conversely, cases of melting at 600 K and 900K exhibit increased MSD. c The angle distribution of CH6 in solid metallic hydrogen at 300  K between pairs of hydrogen atoms with respect to carbon for each step of MD within the radius cutoff of 1.30 Å where the average number of coordination is about 6 hydrogen atoms. Two significant peaks at 90 and 180 degrees demonstrate that the molecule is a octahedron, illustrated by four snapshots of the hypermolecule. d The radial distribution function illustrates the distribution of carbon-hydrogen pairs. The first peak of the CH-pair radial distribution function lies between 1.0 Å and 1.3 Å. e Cumulative number of bonds (CH bonds per carbon), indicating the count of hydrogens surrounding each carbon atom: the plateau at 6 confirms the hypermolecule. f As part (c) at 600 K: the angle distribution of CH6.

In all cases, the carbon-hydrogen RDF (Fig. 2d), has a strong peak between 1.0 Å, and 1.3 Å. Even under melted conditions, we observe hydrocarbon CH6 hypermolecules (Fig. 2e) where the cumulative number of bonds in the first peak of the RDF is six. Moreover, the angle distributions (Fig. 2c, f) also indicate an octahedral arrangement of six neighbouring hydrogens in both solid and liquid metallic hydrogen. These results suggest the existence of the hypermethane CH6 molecule above the melting line of metallic hydrogen at 500 GPa.

Other hypermolecules: CH6, C2H8 C3H10, H3O, NH4 and CH4OH

We now investigate whether more complex molecules can form in liquid metallic hydrogen using NVT MD at around 500 GPa and 600 K. We investigated six cases, adding a single carbon, nitrogen, or oxygen atom, a C2 dimer, C3 trimer, and a CO molecule to liquid metallic hydrogen.

In each case, a spontaneous reaction took place with the metallic hydrogen to produce a well-defined, stable hypermolecule with  NH, OH and CH bondlengths oscillating in the range 1.0–1.30 Å. We identify these molecules as hypervalent113 because they are hydrogen rich: CH6 C2H8 C3H10, NH4, H3O and CH4OH. These correspond to sixfold coordination for carbon, fourfold for nitrogen and trivalent oxygen, with CC and CO double bonds (Fig. 3). We note that this mimics the high-pressure behaviour of the equivalent second row elements: hexavalent silicon32, tetravalent phosphorus, and trivalent sulphur114.

Fig. 3: Radial function distribution, cumulative number of bonds in the hypermolecules, and representative snapshots from liquid simulations.
figure 3

a Displays the RDF of the carbon-hydrogen pairs in metallic hydrogen with one carbon (blue line), two carbons (orange line), three carbons (green line), one oxygen and a CO pair (red line), indicating a smearing of the first peak from 1.0 Å to 1.30 Å. In the  ~102 atom simulations (main figure), structure extends throughout the supercell, however the  ~103 atom simulations (inset) indicates a suppression of these structural oscillations at greater distances. b Shows the CDF (number of CH neighbours per carbon) at 1.30 Å, revealing values of ~6, 4, 3.3, and 4, respectively. The short-range order is nearly identical in both system sizes (solid lines:  ~102 atoms, dashed lines  ~103 atoms) (See also in Supplementary Fig. S3 in the supplementary material) (c, d) equivalent RDF and CDF for OH and NH pairs, showing well-defined and long-lived bonding. These values suggest the formation of molecules, as depicted in (ei): Two snapshots from each MD showcasing novel chemical species in liquid metallic hydrogen where the radial cutoff is set at minimum of RDFs of Fig. (a) and (c), including e CH6, f C2H8, g C3H10, h CH4OH and i OH3 and j NH4, with schematic molecular bonding shown below.

Figure 3 shows the CH, NH and OH radial and cumulative distribution functions for the hypermolecules we investigated, with the sharp first peak in RDF defining the covalent bond, and the plateau in cumulative distribution function (CDF) showing the coordination. All hypermolecules remain stable throughout the 10ps simulation. The angular distribution of these molecules (Supplementary Fig. 4) also supports these findings, with peaks corresponding maximum-angle geometry such as octahedral CH6 molecules (Fig. 3i, j).

The ensemble-averaged enthalpic part of the solubility ΔH in the liquid compared to the separate elements (Table 2) is negative, unlike the solid. The very high absolute enthalpy values for O, N compounds are related to choosing the element as the reference state. This energetic stability, combined with dynamic stability in MD, suggests that C, O and N are fully soluble in metallic hydrogen.

Table 2 The table shows the enthalpy change (ΔH) (eV/atom) of molecular compounds in liquid metallic hydrogen, compared with reference states for carbon, oxygen, and nitrogen, at 500 GPa

Chemistry of hypermolecules

To investigate the bonding characteristics between the central carbon atom and its six surrounding hydrogen atoms, we conducted a Crystal Orbital Hamilton Population (COHP) analysis115 on the solids (Supplementary Figs. 57). The COHP projected onto the s and p orbitals for the hydrogen and carbon atoms shows a bonding character below the Fermi energy (valence electrons) and unoccupied anti-bonding states above. Notably, the results suggest orbital mixing ("hybridization”) between the s and p orbitals, which is similar to the typical hybridization observed in hydrocarbon molecules under ambient conditions. However, the analysis of whether the bonds are fractionally occupied is ambiguous because the bonding states are degenerate with free electron states.

To further investigate the meaning of COHP in this system, we also analysed the COHP between various other atomic pairs (see Supplementary Fig. S9 in the Supplementary Material). The results show a vanishing COHP between the hydrogen atoms in the first shell, indicating no bonding or antibonding characteristics. The COHP between hydrogen atoms in the first and second shells exhibits weak bonding character, with values comparable to those of the COHP between nearest-neighbour hydrogen pairs in the fourfold coordinated I41/amd hydrogen structure. Therefore, these results suggest that the C-H bonds exhibit significant bonding and antibonding characteristics, while other pairs are similar to metallic hydrogen bonding.

Any chemical interpretation requires associating electrons with bonds or localised orbitals116,117: density functional theory118 proves that physical ground state properties are independent of such definitions. Hypermolecules exist in a metallic background, making the already-arbitrary counting of electrons particularly challenging. Furthermore, Kohn–Sham eigenstates follow the symmetry of the molecule and so are intrinsically multicentred, even for methane (see SM). Nevertheless, calculations suggest that the hypermolecules are anions rather than cations, with extra electrons acquired from the free electron background.

Sixfold coordinated carbon, a so-called non-classical carbocation, has been observed101. It understood through counting electrons in multicentred bonds by analogy to boron119,120.

A simplified description of the hypermolecules within DFT comes from replacing the metallic hydrogen with a free-electron jellium121. This omits the effect of explicit pressure, focussing only on the electronic structure. Such calculations produce very distinctive electron densities of states with a broad free electron band and sharp localised modes on the hypermolecules (Supplementary Fig. 10 and Supplementary Table 3). This provides a quantitative insight into the electronic aspects of the hypermolecule stability, in the absence of pressure from surrounding H2 atoms, or complications of the H2 structure. With no excess electrons, the CH6 molecule is unstable and dissociates into CH4 and H2. As free electrons become available, two are captured into localised modes: octahedral symmetry means these extra electrons would have to partially fill a triplet state, which is degenerate with free electrons near the bottom of the conduction band. In jellium, this leads to a Jahn–Teller distortion: CH6 is then stable, but the CH4 and H2 combination still has lower energy until an electron density is equal to 40e/nm3, or 90e/nm3 if the Jahn–Teller distortion is suppressed.

To a first approximation the singlet and triplet molecular orbitals maintain a constant energy below the conduction band, but the additional localised electrons form states which always lie at the bottom of the conduction band, and their energy is reduced as the band broadens.

Finally, any charged particle in a metal will be screened, giving slowly decaying Friedel oscillations122,123 in the electrostatic potential. Fluid metallic hydrogen is a more complicated case because both protons and electrons play a role in the screening. Our large simulations with around 1000 atoms shows that there are Friedel oscillations in the proton density extending to seven distinctive peaks for CH6. Such long-range structure can best be explained by screening of a hypermolecular charge.

Discussion

In this study, we used density functional theory calculations to predict the existence of hypermolecules such as CH6, C2H8, C3H10, OH3, NH4 and CH4OH in metallic hydrogen. These hypermolecules exist only at high pressure in a metallic environment. They are stable both dynamically for the duration of our MD simulations, and energetically against decomposition into elements.

Calculations using jellium in place of metallic hydrogen allow us to determine that the high electron density, rather than the pressure per se, is the key to stabilising the hypermolecules. The hypermolecules can be interpreted as carbon/nitrogen/oxygen forming single bonds to H, and double bonds between heavier elements.

Solubility in the various layers of a planet is a crucial ingredient in planetary modelling.

The positive heat of solution for carbon has been taken to suggest that carbon will condense and fall as diamond rain86. However, under the conditions expected in gas giants with metallic hydrogen cores, our calculations suggest a solubility limit above the expected primordial carbon-hydrogen ratio. Therefore, we anticipate that in many gas giant planets a significant proportion of the carbon will be found in solution in metallic hydrogen. Oxygen and nitrogen, as well as other elements88, also have much higher solubilities in metallic hydrogen than in molecular hydrogen.

Although detailed planetary models are beyond the scope of this work, the consequence of negative enthalpy of mixing is that there may be no rocky cores of giant planets. Heavy elements may simply be mixed into the metallic hydrogen layer, forming an undifferentiated metallic region. The most recent data from the Juno mission124 probed the core by measuring gravitational and magnetic fields, which suggested that the core is more extended and dilute than expected from previous models based on solubility from the molecular region4,125,126. Various explanations of the “fuzzy-core” have been advanced based on the history and formation kinetics of giant planets126, but our work suggests that such a structure may simply follow from the equilibrium thermodynamics of solubility, acting in competition with gravitational forces to produce a concentration gradient of heavy elements in the core. The ongoing JUICE mission is focused on icy moons and the atmosphere and is not designed to provide much further information about the Jovian interior, although more detailed magnetosphere measurements and the tidal Q127 may help to determine the existence or otherwise of a rocky core128.

Experimental verification of these molecules on Earth is challenging but within the reach of current methodology. Liquid metallic hydrogen forms at lower pressures than its solid counterpart, and has been observed in both static and dynamic compression8,70,129,130. So, creation of hypermolecules is plausible, but detection of bonding in high pressure hydrogen is difficult131,132,133. Our CH6 calculation suggests that the molecules will have distinctive vibrational modes at higher frequency than the atomic hydrogen frequencies, but lower than, e.g. CH4.

Two “pathways” to metallic hydrogen134 exist: via high temperature or via high pressure. Thermodynamically, these lead to the same atomic fluid phase67, although at high temperature the higher entropy of atoms vs molecules dominates, whereas at pressure the denser metallic aspect is more important. A very recent paper49 has studied the complementary situation to this work: very high temperatures where they find CH4 in metallic hydrogen. The difference is readily understandable in terms of the much lower electron density along the “high-T” pathway, which disfavours CH6. It also appears that the CH4 solubility is primarily driven by entropy, whereas the hypermolecules are enthalpically favoured by metallicity.

Since all our simulations produce long-lived hypermolecules, it seems certain that more complex molecules will also be stable. Thus, it appears that the metallic hydrogen environment, the most common state of condensed matter in the universe, is capable of supporting its own rich molecular chemistry.

Methods

DFT computational details

Calculations were performed using density functional theory (DFT), Born-Oppenheimer molecular dynamics (BOMD), jellium and Mulliken charge (Supplementary Tables 410) calculations135,136 implemented in Quantum Espresso (QE)137,138, and CASTEP139. Crystal Orbital Hamilton Population (COHP) was implemented in the LOBSTER package140,141,142. The four-atom conventional I41/amd structure of atomic metallic hydrogen and diamond (for carbon) were fully optimized143,144,145 at 500 GPa, employing a force convergence criterion of 10−5 eV/ Å and a fine Monkhorst–Pack grid k-mesh. The exchange-correlation functional used was GGA-PBE146. For QE phonon analysis, we optimized a snapshot of CH124 and H128 using norm-conserving pseudopotentials147,148. The eigenvalues and eigenvectors were computed based on density functional perturbation theory (DFPT)149. For COHP analysis, we repeated the calculations using projector augmented wave (PAW) pseudopotentials150, as they are compatible with LOBSTER. No significant pseudopotential effects were observed. For the BOMD simulations, a time step of 0.5 fs was used with velocity-Verlet integration151. The isothermal-isobaric ensemble (NPT)152 was employed, utilizing the Parrinello-Rahman barostat153. Additionally, the temperature was controlled at 300 K using the Berendsen thermostat154. Solubility calculations, both static relaxation and NPT MD, were based on a 4 × 4 × 2 supercell (128 hydrogens) of the four-atom conventional I41/amd structure, with some hydrogens substituted by carbon (Supplementary Fig. 1).

For the liquid simulations, we use the NPT ensemble at density and system-sizes equivalent to the I41/amd containing various atomic compositions including CH124, CH276, C2H120, C2H276, C2H576, C3H276, C3H576, COH124, OH124, NH124, 8CH992, and 4C2H992. Here, 8CH992 and 4C2H992 represent eight mono-carbon atoms and four dimer carbon molecules in metallic hydrogen, respectively. In the case of C3H276, we found that the C3 chain dissociates, forming C2H8, and CH6. In contrast, for C3H576, no dissociation of the C3H10 molecule was observed. Our BOMD simulations were performed at various temperatures and 500 GPa with up to 20,000 steps (10.0 ps) and checked for convergence of potential energy. We also performed shorter, larger simulations of around 1000 atoms which previous work63 has shown sufficient to converge the RDF of metallic liquid hydrogen.

Analytical methods of DFT results

To analyse the results, we consider the Radial Distribution Function (RDF) which can be calculated using

$$g(r)=\frac{1}{N\rho }{\sum}_{i=1}^{N} {\sum}_{k\ne i}\left\langle \delta (r+{r}_{k}-{r}_{i})\right\rangle,$$
(2)

and mean squared displacement (MSD) as computed using the ensemble average given by

$${{\rm{MSD}}}(t)=\left\langle | {{\boldsymbol{x}}}(t)-{{\boldsymbol{x}}}(0){| }^{2}\right\rangle .$$
(3)

A flat MSD corresponds to a crystal structure with no diffusion. An MSD increasing linearly with time corresponds to brownian motion: typically this implies a liquid, but if the gradient is small it can also arise from a defect migrating in a solid: this in fact occurs when too many hydrogens are removed to inserted the carbon atom - a vacancy defect is created which migrates freely through the lattice.

We compute the phonon density of states (PhDOS) by performing a Fourier transformation of the velocity autocorrelation,108,109,110,155, from the trajectory of each atom in AIMD given by,

$${{\rm{D}}}(\omega )=\int{e}^{i\omega \tau }{{\rm{VAC}}}(\tau )d\tau,$$
(4)

where \(\tau=t-t{\prime}\), and the velocity autocorrelation (VAC) can be obtained by using

$${{\rm{VAC}}}(\tau )=\frac{{\sum }_{t{\prime} }\left\langle {{\boldsymbol{v}}}(t)\cdot {{\boldsymbol{v}}}(t{\prime} )\right\rangle }{{\sum }_{t{\prime} }\left\langle {{\boldsymbol{v}}}(t{\prime} )\cdot {{\boldsymbol{v}}}(t{\prime} )\right\rangle },$$
(5)

where the “initial velocity” \(t{\prime}\) allows for the time-averaging over the simulation to enhance the ensemble average. We also show the comparison between phonon density of states from this method and DFPT calculation (Supplementary Fig. 9).

We find the solubility limit by equating the Gibbs free energy in the mixture with that in the pure substances I41/amd hydrogen and diamond carbon at 500 GPa156 (see Supplementary Fig. S2 and the procedures in the supplementary).

$${G}_{xy}(P,T)+{{{\rm{k}}}}_{B}T\left[c\ln c+(1-c)\ln (1-c)\right]=x{G}_{H}(P,T)+y{G}_{C}(P,T),$$
(6)

where c = y/(x + y) is the carbon concentration and y = 1 − x is the atomic fraction of C.

Our initial analysis is based on partial RDFs of CH and OH separations (Fig. 3a). This shows that simulations of around one hundred or one thousand atoms gives the same hypermolecule formation, both number of bonds and bondlength (Fig. 3b). The geometry of these molecules is also confirmed (Fig. 3e–j) by the angle distribution as provided in the supplementary material. We observe liquid structure peaks that extend to the hundred atom unit cell size, however, within a thousand-atom simulation, this oscillating structure has decayed away exponentially (Fig. 3a) and (Supplementary Fig. 10). Therefore, we are confident that the results from our hundred-atom simulations give a good description of the hypermolecules.