The reaction path for the ultrafast deactivation of 6-aminopyrimidine (6AP) has been investigated by means of ab initio surface-hopping dynamics. The electronic vertical excitation spectrum, excited-state Si minima, and minima on the crossing seam of 6AP resemble well those found for adenine. The deactivation from the Si to the So state takes place at the ultrafast time scale of 400 fs and involves the out-of-plane ring deformation of the C4 atom, a position that is sterically restricted in adenine by the imidazole ring. Mechanical restrictions have been used to simulate in a simple way the role of the imidazole group in adenine. As a result, deactivation via out-of-plane ring deformation of the C2 and N3 atoms are observed in good agreement with predictions for adenine. These dynamics results show that the previously suggested ring puckering deactivation paths really exist at a time scale, which is compatible with experimentally observed life times. The electronic structure of the crossing seam has been shown to have the same nature as those of simple biradicaloid systems, a feature which seems to be valid for any cyclic system.