A density functional theory study on the electrocyclization of 1,2,4,6-heptatetraene analogues: converting a pericyclic to a pseudopericyclic reaction.