Energetic condition for carbyne formation