  The accumulation and circulation of carbon-hydrogen dictate the chemical
evolution of ice giant planets. Species separation and diamond precipitation
have been reported in carbon-hydrogen systems, verified by static and
shock-compression experiments. Nevertheless, the dynamic formation processes
for the above-mentioned phenomena are still insufficiently understood. Here,
combing deep learning model, we demonstrate that diamonds form through a
three-step process involving decomposition, species separation and nucleation
procedures. Under shock condition of 125 GPa and 4590 K, hydrocarbons are
decomposed to give hydrogen and low-molecular-weight alkanes (CH4 and C2H6),
which escape from the carbon chains resulting in C/H species separation. The
remaining carbon atoms without C-H bonds accumulate and nucleate to form
diamond crystals. The process of diamond growth is found to associated with a
critical nucleus size where dynamic energy barrier plays a key role. These
dynamic processes for diamonds formation are insightful in establishing the
model for ice giant planet evolution.
