  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.
