Ab initio and density functional theory study of the diazene isomerization