Aims.The nuclei of active galaxies harbor massive young stars, an accreting central black hole, or both. In order to determine the physical conditions that pertain to molecular gas close to the sources of radiation, numerical models are constructed.Methods.These models iteratively determine the thermal and chemical balance of molecular gas that is exposed to X-rays (1–100 keV) and far-ultraviolet radiation (6–13.6 eV), as a function of depth.Results. We present a grid of XDR and PDR models that span ranges in density ( cm-3), irradiation ( and erg cm-2 s-1) and column density ( cm-2). Predictions are made for the most important atomic fine-structure lines, e.g., [CII], [OI], [CI], [SiII], and for molecular species like HCO+, HCN, HNC, CS and SiO up to , CO and 13CO up to , and column densities for CN, CH, CH+, HCO, HOC+, NO and N2H+. We find that surface temperatures are higher (lower) in PDRs compared to XDRs for densities >104 (<104) cm-3. For the atomic lines, we find that, largely due to the different XDR ionization balance, the fine-structure line ratios of [SiII] 35 μm/[CII] 158 μm, [OI] 63 μm/[CII] 158 μm, [FeII] 26 μm/[CII] 158 μm and [CI] 369 μm/[CI] 609 μm are larger in XDRs than in PDRs, for a given density, column and irradiation strength. Similarly, for the molecular lines, we find that the line ratios HCN/HCO+ and HNC/HCN, as well as the column density ratio CN/HCN, discriminate between PDRs and XDRs. In particular, the HCN/HCO+ 1–0 ratio is 1) for XDRs (PDRs) if the density exceeds 105 cm-3 and if the column density is larger than 1023 cm-2. For columns less than 1022.5 cm-2 the XDR HCN/HCO+ 1–0 ratio becomes larger than one, although the individual HCN 1–0 and HCO+ 1–0 line intensities are weaker. For modest densities, cm-3, and strong radiation fields (>100 erg s-1 cm-2), HCN/HCO+ ratios can become larger in XDRs than PDRs as well. Also, the HCN/CO 1–0 ratio is typically smaller in XDRs, and the HCN emission in XDRs is boosted with respect to CO only for high (column) density gas, with columns in excess of 1023 cm-2 and densities larger than 104 cm-3. Furthermore, CO is typically warmer in XDRs than in PDRs, for the same total energy input. This leads to higher CO /CO 1–0, , line ratios in XDRs. In particular, lines with , like CO(16–15) and CO(10–9) observable with HIFI/Herschel, discriminate very well between XDRs and PDRs. This is crucial since the XDR/AGN contribution will typically be of a much smaller (possibly beam diluted) angular scale and a 10–25% PDR contribution can already suppress XDR distinguishing features involving HCN/HCO+ and HNC/HCN. For possible future observations, column density ratios indicate that CH, CH+, NO, HOC+ and HCO are good PDR/XDR discriminators.