  \abridged 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. These models determine the thermal and
chemical balance of molecular gas that is exposed to X-rays and far-ultraviolet
radiation, as a function of depth. We present a grid of XDR and PDR models that
span ranges in density, irradiation and column density. We find that the
fine-structure line ratios of e.g. [SiII] 35mum/[CII] 158 mum are larger in
XDRs than in PDRs, for a given density, column and irradiation strength. 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. The HCN/HCO+ 1-0 ratio is <1
(>1) for XDRs (PDRs) if the density exceeds 10^5 cm^-3 and if the column
density is >10^23 cm^-2. For columns <10^ 22.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, n=10^4-10^5 cm^-3, and strong
radiation fields (>100 erg s^-1 cm^-2), HCN/HCO+ ratios can become larger in
XDRs than PDRs as well. 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 columns
>10^{23} cm^{-2} and densities <10^4 cm^-3. CO is typically warmer in XDRs than
in PDRs, for the same total energy input. This leads to higher CO J=N+1-N/CO
1-0, N>=1, line ratios in XDRs. Lines with N>=10, like CO(16-15) and CO(10-9)
observable with HIFI/Herschel, discriminate very well between XDRs and PDRs.
Column density ratios indicate that CH, CH+, NO, HOC+ and HCO are good PDR/XDR
discriminators.
