Conrotatory and disrotatory
An electrocyclic reaction can either be classified as conrotatory or disrotatory based on the rotation at each end of the molecule. In conrotatory mode, both atomic orbitals of the end groups turn in the same direction (such as both atomic orbitals rotating clockwise or counter-clockwise). In disrotatory mode, the atomic orbitals of the end groups turn in opposite directions (one atomic orbital turns clockwise and the other counter-clockwise). The cis/trans geometry of the final product is directly decided by the difference between conrotation and disrotation. Determining whether a particular reaction is conrotatory or disrotatory can be accomplished by examining the molecular orbitals of each molecule and through a set of rules. Only two pieces of information are required to determine conrotation or disrotation using the set of rules: how many electrons are in the pi-system and whether the reaction is induced by heat or by light. This set of rules can also be derived from an analysis of the molecular orbitals for predicting the stereochemistry of electrocyclic reactions. Example of a photochemical reaction
Analysis of a photochemical electrocyclic reaction involves the HOMO, the LUMO, and correlations diagrams. An electron is promoted into the LUMO changing the frontier molecular orbital involved in the reaction. Example of a thermal reaction
Suppose that trans-cis-trans-2,4,6-octatriene is converted to  under thermal conditions. Since the substrate octatriene is a "4n + 2" molecule, the Woodward–Hoffmann rules predict that the reaction happens in a disrotatory mechanism. Since thermal electrocyclic reactions occur in the HOMO, it is first necessary to draw the appropriate molecular orbitals. Next, the new carbon-carbon bond is formed by taking two of the p-orbitals and rotating them 90 degrees (see diagram). Since the new bond requires constructive overlap, the orbitals must be rotated in a certain way. Performing a disrotation will cause the two black lobes to overlap, forming a new bond. Therefore, the reaction with octatriene happens through a disrotatory mechanism. In contrast, if a conrotation had been performed then one white lobe would overlap with one black lobe. This would have caused destructive interference and no new carbon-carbon bond would have been formed. In addition, the cis/trans geometry of the product can also be determined. When the p-orbitals were rotated inwards it also caused the two methyl groups to rotate upwards. Since both methyls are pointing "up", then the product is . References
 Carey, Francis A.; Sundberg, Richard J.; (1984). Advanced Organic Chemistry Part A Structure and Mechanisms (2nd ed.). New York N.Y.: Plenum Press. . March Jerry; (1985). Advanced Organic Chemistry reactions, mechanisms and structure (3rd ed.). New York: John Wiley & Sons, inc. Physical organic chemistry