  Deuteration has been used as a tracer of the evolutionary phases of low- and
high-mass star formation. The APEX Telescope Large Area Survey (ATLASGAL)
provides an important repository for a detailed statistical study of massive
star-forming clumps in the inner Galactic disc at different evolutionary
phases. We study the amount of deuteration using NH2D in a representative
sample of high-mass clumps discovered by the ATLASGAL survey covering various
evolutionary phases of massive star formation. Unbiased spectral line surveys
at 3 mm were thus conducted towards ATLASGAL clumps between 85 and 93 GHz with
the Mopra telescope and from 84 to 115 GHz using the IRAM 30m telescope. A
subsample was followed up in the NH2D transition at 74 GHz with the IRAM 30m
telescope. We determined the deuterium fractionation from the column density
ratio of NH2D and NH3 and measured the NH2D excitation temperature for the
first time from the simultaneous modelling of the 74 and 110 GHz line using
MCWeeds. We find a large range of the NH2D to NH3 column density ratio up to
1.6+/-0.7 indicating a high degree of NH3 deuteration in a subsample of the
clumps. Our analysis yields a clear difference between NH3 and NH2D rotational
temperatures for a fraction of the sources. We therefore advocate observation
of the NH2D transitions at 74 and 110 GHz simultaneously to determine the NH2D
temperature directly. We determine a median ortho-to-para column density ratio
of 3.7+/-1.2. The high detection rate of NH2D confirms a high deuteration
previously found in massive star-forming clumps. Using the excitation
temperature of NH2D instead of NH3 is needed to avoid an overestimation of
deuteration. We measure a higher detection rate of NH2D in sources at early
evolutionary stages. The deuterium fractionation shows no correlation with
evolutionary tracers such as the NH3 (1,1) line width, or rotational
temperature.
