A new type of macrocycle containing 2-thio-4-aminopyrimidine and 6-methyluracil moieties has been studied by IR and UV spectroscopy. The vibrational spectra, conformations and amine–imine tautomerism of the aminopyrimidine fragments have been analysed within the framework of ab initio MO theory (HF/6-31G**, MP2/6-31G**) and density functional theory (B3LYP/6-31G**). According to experimental and theoretical results, the amino form is preferred in these compounds. Both intra- and intermolecular hydrogen bonds of the type NH⋯N are present in crystals, whereas in solutions, conformational equilibria with free NH groups are also obtained.