  We present molecular line observations of the high-mass molecular clump IRAS
16562$-$3959 taken at 3 mm using the Atacama Large Millimeter/submillimeter
Array (ALMA) at 1.$\!\!^{\prime\prime}$7 angular resolution ($0.014$ pc spatial
resolution). This clump hosts the actively accreting high-mass young stellar
object (HMYSO) G345.4938+01.4677, associated with a hypercompact HII region. We
identify and analyze emission lines from 22 molecular species (encompassing 34
isomers) and classify them into two groups, depending on their spatial
distribution within the clump. One of these groups gathers shock tracers (e.g.,
SiO, SO, HNCO) and species formed in dust grains like methanol (CH$_3$OH),
ethenone or ketene (H$_2$CCO), and acetaldehyde (CH$_3$CHO). The second group
collects species resembling the dust continuum emission morphology and which
are formed mainly in the gas-phase, like hydrocarbons (CCH, c-C$_3$H$_2$,
CH$_3$CCH), cyanopolyynes (HC$_3$N and HC$_5$N) and cyanides (HCN and
CH$_3$C$_3$N). Emission from complex organic molecules (COMs) like CH$_3$OH,
propanenitrile (CH$_3$CH$_2$CN), and methoxymethane (CH$_3$OCH$_3$) arise from
gas in the vicinity of a hot molecular core ($T\gtrsim100$ K) associated with
the HMYSO. Other COMs such as propyne (CH$_3$CCH), acrylonitrile (CH$_2$CHCN),
and acetaldehyde seem to better trace warm ($T\lesssim80$ K) dense gas. In
addition, deuterated ammonia (NH$_2$D) is detected mostly in the outskirts of
IRAS 16562$-$3959, associated with near-infrared dark globules, probably
gaseous remnants of the clump's prestellar phase. The spatial distribution of
molecules in IRAS 16562$-$3959 supports the view that in protostellar clumps,
chemical tracers associated with different evolutionary stages --- starless to
hot cores/HII regions --- exist coevally.
