Thermodynamic reason for delamination of molecular mixtures under pressure and detonation synthesis of diamond