ABSTRACT
The structure of the title compound, C9H8N4, comprises non-planar molecules that associate via pyrimidine N--H...N dimer R2(2)(8) hydrogen-bonding associations [N...N 3.1870 (17) A] and form linear hydrogen-bonded chains via a pyrimidine N--H...N(pyridyl) interaction [N...N 3.0295 (19) A]. The dihedral angle between the two rings is 24.57 (5) degrees. The structure of the 1:1 adduct with 4-aminobenzoic acid, C9H8N4*C7H7NO2, exhibits a hydrogen-bonding network involving COOH...N(pyridyl) [O...N 2.6406 (17) A], pyrimidine N--H...N [N...N 3.0737 (19) and 3.1755 (18) A] and acid N--H...O interactions [N...O 3.0609 (17) and 2.981 (2) A]. The dihedral angle between the two linked rings of the base is 38.49 (6) degrees and the carboxylic acid group binds to the stronger base group in contrast to the (less basic) complementary hydrogen-bonding site.