{'fraction_non_alphanumeric': 0.03359647512392142, 'fraction_numerical': 0.026574261061134568, 'mean_word_length': 4.785714285714286, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Unusual chemistry of the C-H-N-O system under pressure and implications for giant planets

C-H-N-O system is central for organic chemistry and biochemistry, and plays a major role in planetary science (dominating the composition of"ice giants"Uranus and Neptune). The inexhaustible chemical diversity of this system at normal conditions explains it as the basis of all known life, but the chemistry of this system at high pressures and temperatures of planetary interiors is poorly known. Using ab initio evolutionary algorithm USPEX, we performed an extensive study of the phase diagram of the C-H-N-O system at pressures of 50, 200, and 400 GPa and temperatures up to 3000 K. Eight novel thermodynamically stable phases were predicted, including quaternary polymeric crystal C2H2N2O2 and several new N-O and H-N-O compounds. We describe the main patterns of changes in the chemistry of the C-H-N-O system under pressure and confirm that diamond should be formed at conditions of the middle-ice layers of Uranus and Neptune. We also provide the detailed CH4-NH3-H2O phase diagrams at high pressures, which are important for a further improvement of the models of ice giants - and point out that current models are clearly deficient. In particular, in existing models Uranus and Neptune are presented to have identical composition, nearly identical pressure-temperature profiles, and a single convecting middle layer ("mantle") made of a mixture H2O : CH4 : NH3 = 56.5 : 32.5 : 11. Here we provide new insights shedding light into the difference of heat flows from Uranus and Neptune, which require them to have different compositions, pressure-temperature conditions, and a more complex internal structure.


Introduction
The behavior of the C-H-N-O system is essential for processes in the interiors of giant planets such as Neptune and Uranus. Present-day models of these planets suggest a three-layer structure: an inner rocky core, a single massive middle "ice" layer, and outer H-He atmosphere. The middle layer is believed to contain water H2O, methane CH4, and ammonia NH3 1 -but (except for the outermost layers 2 ) not in the form of intact molecules, but rather products of their transformations. These transformation products are not well known. In the deep middle layer, the pressure and temperature are thought to vary from 20 to 600 GPa and from 2000 to 7000 K depending on the depth, 1 and chemistry is expected to be very different from the simple mixture H2O:CH4:NH3. A long-standing puzzle is that Neptune (but not Uranus) radiates 2.61 times more energy than it receives from the Sun, and the origin of this excess heat is unknown. 3 One of the proposed explanations is the formation of diamond at high pressures, which is denser than other substances of the middle layer and gravitationally sinks inside the liquid planet and this sinking in strong gravitational field heats the planet (it is usually ignored, but light hydrogen, released in this process, may simultaneously go up, additionally releasing heat). This fascinating hypothesis was first proposed by Ross in 1981 4 and then supported experimentally: in laser-heated diamond anvil cells, methane decomposes to produce diamond and hydrogen at temperatures of 2,000-4,000 K and pressures up to 80 GPa. [5][6][7] In addition, during dynamic compression of polystyrene at high temperatures and ~150 GPa, carbon-hydrogen separation occurs with the formation of diamond. 8 Several theoretical studies of hydrocarbons [9][10][11][12] show that at high pressures methane becomes thermodynamically unstable and finally dissociates into diamond and hydrogen at ~300 GPa and zero temperature 9,10 or at > 300 GPa and above 4000 K, 12 which is consistent with the proposed hypothesis.
The described hypothesis of diamond formation in the interior of Neptune raises many questions. First, the process of diamond formation from hydrocarbons is driven both by pressure (due to high density of diamond) and temperature (due to high entropy of pure hydrogen). This means that the heat, produced as a result of diamond formation and sinking, will accelerate (rather than buffer) the process of diamond formation. Such self-accelerating process should have very quickly run itself to completion, very early in the history of Neptune. If so, all heat released by Neptune now is relict, produced shortly after the formation of the planet and still spent by it. Second, the same process should occur in Uranus (a planet thought to be very similar to Neptune in terms of size, mass, chemical composition, and pressure-temperature conditions) and one must expect similarly large excess of heat flow. However, Uranus irradiates only ~1.06 times more energy than it receives from the Sun. Thirdly, recent planetary studies give quite a different picture of Neptune's and Uranus' evolution and luminosity. There is an increasing evidence 13 that the currently used adiabatic models of ice giants cannot correctly describe the current luminosity of both Neptune and especially Uranus. According to the models, Neptune's and Uranus' current states could be achieved within the lifetime of the Solar system only if their initial temperatures were much lower than predicted by traditional models of their formation. 14 The possible explanation of low heat flow on Uranus is the existence of a thermal boundary layer within its middle layer, separating very hot inner region from a much colder outer region. This would imply separate convection of these layers, with effectively only the outer region contributing to the heat flow -thus explaining Uranus' low luminosity and hotter interior. [15][16][17] Yet another obscure issue is the unusual non-axisymmetric Uranian and Neptunian magnetic fields, which are assumed to be related to the unique internal structure. Magnetic fields of these planets are thought to originate from convection of their electrically conducting middle layers, the conductivity coming from ionic diffusion (at moderate pressures) or even electronic (metallic) conductivity in the very bottom of the middle layer. [18][19][20] It has been suggested that conductivity may arise from nearly complete ionization of water, the most abundant component of the layer. 21,22 Clearly, the chemistry of the middle layer is very different from just a mixture of H2O, CH4 and NH3 molecules, and the ion carriers responsible for the unusual magnetic fields of Uranus and Neptune are yet to be found. Water and ammonia have been predicted to metallize deep inside the ice layer at 7000 and 5500 K, respectively, and 300 GPa, 20 which adds a contribution of the electronic conductivity to the generation of the magnetic field.
To shed light on these problems we performed an extensive study of the C-H-N-O system and stable compounds formed at high pressures. Due to very large number of possible stoichiometries, any 4-component system is extremely difficult for theoretical or experimental mapping of all stable compounds. There have been several studies of unary, binary, and ternary subsystems of C-H-N-O at high pressures, including the C-O, 23 C-H, 10,11 N-H, 24,25 C-N-O, 26 and H-N-O 27-32 systems, and works of our group on the phase diagrams of C-H, 9,10 C-H-O, 33 N-O, 34 C-N, 35,36 and O-H 37 systems. The full quaternary and some ternary systems have not been studied at high pressures. Besides, there are doubts about the completeness of the published data on the stable compounds due to complexity and structural diversity of such systems. In this work, we revise and summarize all known information and, taking advantage of the latest methodological developments in the USPEX code, perform an unprecedented, complex and computationally expensive, investigation of the thermodynamically stable phases in the quaternary C-H-N-O system and its ternary and binary subsystems at high pressures.

Methods
To predict thermodynamically stable compounds and structures, we used the evolutionary ab initio global optimization algorithm implemented in the USPEX code, 38,39 and performed calculations at pressures of 50, 200, and 400 GPa. To make predictions for the quaternary system more comprehensive, we started with three independent USPEX runs for each of six binary and four ternary subsystems at every target pressure. Initially each system was calculated from scratch (with 4-16 atoms for binary and 8-32 atoms in the primitive cell for ternary systems), and then we did runs for the same systems with the inclusion of all previously found structures as seeds. New structures were also produced by a recently developed random topological crystal structure generator. 40 After that, three USPEX runs for the quaternary C-H-N-O system were performed with 8-36 atoms per unit cell at each target pressure. The total number of structural relaxations in all USPEX calculations was ~1,800,000, which required significant supercomputer resources.
The total energy calculations and structure relaxations were performed using the PBE functional in the framework of the PAW method, with the plane wave kinetic energy cutoff of 850 eV and a uniform Г-centered grid with 2 × 0.056 Å -1 spacing for the reciprocal space sampling, using the VASP code. 41 For the thermodynamically stable structures, we used the finite displacement method, as implemented in the PHONOPY code, to calculate the phonon dispersion curves, phonon density of states, and phonon contribution to the free energy. The dynamic stability of novel compounds was ascertained by the absence of imaginary frequencies in their phonon dispersion curves. Large ~10×10×10 Å supercells, hard potentials and an increased plane-wave kinetic energy cutoff of 1000 eV were adopted to avoid artificial imaginary frequencies. High-temperature calculations were done in the harmonic approximation, resulting in phase diagrams at each pressure and temperatures up to 3000 K, which can be found in Supporting Information, Section S2.

Results and Discussion
The resulting compositional phase diagrams of the C-H-N-O system at 50, 200, and 400 GPa and 0 K are shown in Figure 1. The phase diagrams without the zero-point energy correction and at 1000, 2000 and 3000 K were also calculated and are given in (Supporting Information, Section S1). A phase diagram of the quaternary system can be presented as a tetrahedron, with faces corresponding to ternary phase diagrams, and edges -to binary ones. Compared with previous studies, novel stable compounds were found in the N-O, H-N-O, and C-H-N-O systems. In total, we found 10 new structures, including eight thermodynamically stable ones and two compounds lying slightly above the convex hull ( Figure 2). Below, we briefly describe the already known thermodynamically stable compounds and give a more detailed description of the new substances found in this work.  # m and P41212). In the C-N-O and C-H-N systems, only a few compounds are thermodynamically stable. Cmc21-C2N2O is known to exist at pressures from 20 to 100 GPa. 26 Two compounds, F2dd-CN2H2 and Cm-C2N3H, are shown to be stable throughout the studied pressure range. Despite the fact that these structures had been known before, 43 a comprehensive variablecomposition search showing the absence of other thermodynamically stable compounds has not been performed until now. The N-O system has a rich chemistry of low-enthalpy metastable compounds, while only two compounds are thermodynamically stable. The calculations show that at 50 GPa, only P21/m-N2O5 and P21/c-NO2 are stable, which is consistent with previously reported results; 34 at 200 and 400 GPa, NO2 is unstable, but P21/m-NO and N2O5 are present on the phase diagram. A new composition, N7O, was found to be thermodynamically stable at 400 GPa, adopting space group Cm or P21/m (Figure 2a,b) and consisting of 5-and 10-member N cycles that resemble a honeycomb structure with an oxygen atom inside the 10-member ones. These two structures are energetically very close, with an energy difference of about 3 meV/atom (P21/m is slightly more preferable).
Several compositions from the previous study 27 become unstable according to our calculations. C2/m-H10N2O and R3 # m-H8N4O, which have been found to be thermodynamically stable at 50 GPa, and P21/m-H6N2O (at 200 GPa) are not on the phase diagram anymore: our results showed that these phases lie about 6, 17, and 9 meV/atom above the convex hull, respectively.
The new unusual compound P1 # -H4NO (Figure 2c) exists only at pressures about 400 GPa and is the salt of the positively charged dimer of ammonia and hydroxide anions, connected between each other into the infinite polymeric chain with symmetrical hydrogen bonding, which is seen in its charge density plot. This composition has been reported to adopt space group C2/m, forming a similar hydroxyl polymeric pattern, but our findings suggest the new P1 # phase to be ~28 meV/atom more stable. 28 We found two new phases, R3 and C21, of H3NO4 (Figure 2d,e), which exist at 50 and 400 GPa, respectively. The calculations have shown this previously known compound to adopt space group Pna21 and be thermodynamically unstable at normal pressure. 44 At 50 GPa, this structure is ~10 meV/atom less stable than phase R3 discovered in this work.
Another cocrystal of ammonium hydroxide and a hydrogen molecule NH4OH•H2 appears on the phase diagram at about 200 GPa, adopts space group P1 # (Figure 2f), and contains a hydroxyl polymeric chain similar to that of H4NO. After the transition into the nonpolymeric Cc phase (Figure 2g), it remains stable up to at least 400 GPa.
In the C-H-N-O system calculations, we found one thermodynamically stable polymeric compound, C2H2N2O2, which adopts space group Pn (Figure 2i) and is stable at 50 GPa and T > 600 K, while at 200 GPa it is stable in the entire studied temperature range, and at 400 GPa at T > 1300 K. Another discovered quaternary compound is a cocrystal of methane, molecular hydrogen, and ammonium oxide CH4•(NH4)2O•H2 (Figure 2j). At 50-200 GPa, it lies slightly above the convex hull by ~17 -22 meV/atom, adopts space group Cm, and is dynamically stable (i.e. has no imaginary phonon frequencies). Several C-H-N-O molecular cocrystals lying slightly above the convex hull were also found in our calculations.
Summarizing the above, the C-H-N-O system is found to possess remarkable chemical diversity under pressure. Several patterns are important. Polymeric states are stabilized under pressure: water molecules and even hydroxyl ion polymerize with symmetric hydrogen bond formation: high-pressure forms of ice have structures with 3D bond connectivity, and hydroxyl ion under pressure is a linear chain! Methane CH4 polymerizes too -forming longer and longer hydrocarbons on increasing pressure, and eventually diamond. Hydronitrogens tend to form ionic structures with NH4 + , N2H5 + and exotic N2H7 + and N2H6 2+ cations and NH2 -anions, sometimes with symmetric hydrogen bonds as in N2H14 compound. Also, co-crystals which contain hydrogen molecule are likely to form (e.g. NH4OH•H2, CH4•(NH4)2O•H2).
Determination of the complete phase diagram of the C-H-N-O system at high pressure is of great interest for study of matter in the interiors of planets. Using the obtained phase diagrams, stable chemical compounds can be established for any given total composition. One of the recent models of Uranus' and Neptune's middle ice layer composition based on the Voyager mission data 45 postulates that the mass ratio of water, methane, and ammonia is 56.5:32.5:11. We found that at 50 GPa and zero temperature, Neptune's middle ice layer composition is a mixture of P43-NH4OH, water, and methane; at 200 GPa -R3 # m-NH7, water, ethane and butane; at 400 GPa -the new compound Cc-NH4OH•H2, water, hydrogen, and crystalline diamond, which begins to form at pressures between 200 and 400 GPa. At temperatures of about 1000 K these mixtures do not change significantly. Although water, hydrogen, and the discovered H-N-O compounds become fluid at higher temperatures corresponding to the middle layer conditions of Neptune, this study of the well-defined crystalline matter gives important insights into their rich chemistry. Most probably, the predicted crystals melt, the hydrogen molecules of the found cocrystals evaporate into the atmosphere, the density of the middle ice layer increases (this is important for further refinements of models of Uranus and Neptune), and a molecular-ionic liquid is formed. At conditions of the middle layer this liquid will be a good ionic conductor containing at least the OHand NH4 + ions (i.e. the environment is alkaline), which is consistent with previously reported observations. 20 If the real composition is different, also H + , NO3 -, CO3 2-, HCO3 -, N2H6 2+ , O 2-and several other ions could occur. Convection of such an electrically conducting liquid will generate a magnetic field.
Our study confirms M. Ross's suggestion about the diamond formation inside the ice giants and its sinking to the core, accompanied by the heat production. 4,46 However, as mentioned in the introduction, some important issues remain to be resolved -for example, the low luminosity of Uranus. At the same time, at least two different layers exist in the mantle of ice giants: outer layer containing a large concentration of hydrocarbons and inner layer strongly depleted in hydrocarbons. These layers will inevitably have very different properties (density, viscosity, thermal expansivity, etc.) and may convect separately -in which case there will be a thermal boundary layer across which heat is transferred only by (very inefficient) thermal conduction. This will reduce the amount of heat emitted by the planet and keep its deep interiors much hotter than one would expect from the adiabatic formula. In order to study the internal structure of the ice giants in more detail and explore the possible differences between Neptune and Uranus, we plot the CH4-NH3-H2O slices of the quaternary C-N-H-O phase diagrams. Figure 3 shows these diagrams at 50, 200, and 400 GPa and 0, 1000, 2000, and 3000 K; the diagrams at all temperatures with the step of 100 K with the dissociation products are given in Supporting Information, Section S3. The compositional areas containing diamond among the decomposition products are shown in blue, while diamond-free areas are colored green. In a nutshell, as pressure and temperature increase, diamond is more likely to be formed. At 50 GPa and 0 -1700 K any mixture of methane, ammonia and water decomposes into diamond-free products, while at temperatures higher than 1700 K diamond is present in dissociation products also for any composition. At 400 GPa diamond is among dissociation products for any composition and temperature. The case of 200 GPa is the most interesting one: at 0 K the area of the phase diagram with diamond in its decomposition products occupies only a part of the entire diagram. As temperature rises, the area of this region increases and eventually occupies the entire diagram at T > 2000 K.
At 200 GPa and in the temperature range of ~1000-2000 K, the estimated composition of Uranus and Neptune lies very close to the boundary between diamond-bearing and diamond-free fields. If we assume only a small difference in the pressure-temperature conditions and/or composition of these planets, such that they fall one into a diamond-bearing and the other into diamond-free field, the planets would display quite different evolution. Note, however, that in very deep parts of the middle layer, both planets will again display the same processes. However, if these parts are shielded by a thermal barrier layer, heat produced there will be conserved in the deep interiors of Uranus and the observed luminosity will display no anomalies -as is the case. One should also keep in mind that although Neptune is slightly smaller than Uranus, it has a larger mass and a significantly (29 %) greater density than Uranus, and one might imagine that the amount of diamond (and heat) produced in Neptune is simply larger than that in Uranus, and it takes longer to spend it out. Greater density is also consistent with more hydrogen having escaped from the interiors as a product of diamond formation.
However, the real situation in the ice layers might be more complicated, because phase composition and pressure-temperature profile inside Uranus' and Neptune's ice layers are known very approximately. In particular, the temperature is quite high and the substance is most likely a liquid or is in so called superionic state, which is characterized by diffusive protons in solid lattices of heavy nuclei. 20,47 But hypotheses based on solid state calculations proposed in our study may remain valid.

Conclusions
We studied the C-H-N-O system in a wide pressure range (50-400 GPa) and its highly diverse chemistry. Among the novel compounds we found Cm-and P21/m-N7O, cocrystal Cc-NH4OH•H2, an exotic NH4O structure that can be described as P1 # -N2H6(OH)2, two new polymeric phases R3-and C21-H3NO4, and quaternary polymer Pc-C2H2N2O2. All these structures are both thermodynamically and dynamically stable. We also found a peculiar metastable cocrystal Cm-CH4•(NH4)2O•H2. Knowledge of the thermodynamically stable C-H-N-O compounds at high pressures allowed the construction of its phase diagram for the first time. CH4 -NH3 -H2O slices are of particular interest for improving the models of middle ice layers of Neptune and Uranus, since they are assumed to consist of methane, ammonia and water. Our results confirm the hypothesis of diamond formation and its role in producing excessive heat in Neptune and shed light into the hitherto mysterious differences in heat production on Uranus and Neptune and their unusual magnetic fields.