Nucleation and stabilization of carbon