Nucleation of allotropic carbon in an external electric field