  During star formation, the dense gas undergoes significant chemical evolution
leading to the emergence of a rich variety of molecules associated with hot
cores and hot corinos. The physical and chemical conditions are poorly
constrained; the early phases of emerging hot cores in particular represent an
unexplored territory. We provide here a full molecular inventory of a massive
protostellar core that is proposed to be a precursor of a hot core. We
performed an unbiased spectral survey towards the hot core precursor associated
with clump G328.2551-0.5321 between 159GHz and 374GHz. To identify the spectral
lines, we used rotational diagrams and radiative transfer modelling assuming
LTE. We detected 39 species and 26 isotopologues, and were able to distinguish
a warm and compact inner region, a colder more extended envelope, and the
kinematic signatures of the accretion shocks that have previously been observed
with ALMA. We associate most of the emission of the small molecules with the
cold gas, while the molecular emission of the warm gas is enriched by complex
organic molecules (COMs). We find a high abundance of S-bearing molecules in
the cold gas phase suggesting a low sulphur depletion, with a factor of > 1%.
We identify nine COMs in the warm gas, four in the cold gas, and four towards
the accretion shocks. The high abundances of S-bearing species originating from
the undisturbed gas may suggest a contribution from shocked gas at the outflow
cavity walls. The molecular composition of the warm gas is similar to that of
both hot cores and hot corinos, but the molecular abundances are closer to the
values found towards hot corinos than to values found towards hot cores.
Considering the compactness of the warm region and its moderate temperature, we
suggest that thermal desorption has not been completed towards this object yet,
representing an early phase of the emergence of hot cores.
