摘要:Context.The chemical composition of high-mass protostars reflects the physical evolution associated with different stages of star formation. In addition, the spatial distribution and velocity structure of different molecular species provide valuable information on the physical structure of these embedded objects. Despite an increasing number of interferometric studies, there is still a high demand for high angular resolution data to study chemical compositions and velocity structures for these objects.Aims.The molecular inventory of the forming high-mass star AFGL 4176, located at a distance of ~3.7 kpc, is studied in detail at a high angular resolution of ~0.35′′, equivalent to ~1285 au at the distance of AFGL 4176. This high resolution makes it possible to separate the emission associated with the inner hot envelope and disc around the forming star from that of its cool outer envelope. The composition of AFGL 4176 is compared with other high- and low-mass sources, and placed in the broader context of star formation.Methods.Using the Atacama Large Millimeter/submillimeter Array (ALMA) the chemical inventory of AFGL 4176 has been characterised. The high sensitivity of ALMA made it possible to identify weak and optically thin lines and allowed for many isotopologues to be detected, providing a more complete and accurate inventory of the source. For the detected species, excitation temperatures in the range 120–320 K were determined and column densities were derived assuming local thermodynamic equilibrium and using optically thin lines. The spatial distribution of a number of species was studied.Results.A total of 23 different molecular species and their isotopologues are detected in the spectrum towards AFGL 4176. The most abundant species is methanol (CH3OH) with a column density of 5.5 × 1018cm−2in a beam of ~0.3′′, derived from its13C-isotopologue. The remaining species are present at levels between 0.003 and 15% with respect to methanol. Hints that N-bearing species peak slightly closer to the location of the peak continuum emission than the O-bearing species are seen. A single species, propyne (CH3C2H), displays a double-peaked distribution.Conclusions.AFGL 4176 comprises a rich chemical inventory including many complex species present on disc scales. On average, the derived column density ratios, with respect to methanol, of O-bearing species are higher than those derived for N-bearing species by a factor of three. This may indicate that AFGL 4176 is a relatively young source since nitrogen chemistry generally takes longer to evolve in the gas phase. Taking methanol as a reference, the composition of AFGL 4176 more closely resembles that of the low-mass protostar IRAS 16293–2422B than that of high-mass, star-forming regions located near the Galactic centre. This similarity hints that the chemical composition of complex species is already set in the cold cloud stage and implies that AFGL 4176 is a young source whose chemical composition has not yet been strongly processed by the central protostar.