Comets are expected to be the most primitive objects in the Solar System. The chemical composition of these objects is frequently assumed to be directly provided by the observations of the abundances of volatile molecules in the coma. The present work aims to determine the relationship between the chemical composition of the coma, the outgassing profile of volatile molecules and the internal chemical composition, and water ice structure of the nucleus, and physical assumptions on comets. To do this, we have developed a quasi 3D model of a cometary nucleus which takes into account all phase changes and water ice structures (amorphous, crystalline, clathrate, and a mixture of them); we have applied this model to the Comet 67P/Churyumov-Gerasimenko, the target of the Rosetta mission. We find that the outgassing profile of volatile molecules is a strong indicator of the physical and thermal properties (water ice structure, thermal inertia, abundances, distribution, physical differentiation) of the solid nucleus. Day/night variations of the rate of production of species helps to distinguish the clathrate structure from other water ice structures in nuclei, implying different thermodynamic conditions of cometary ice formation in the protoplanetary disc. The relative abundance (to H2O) of volatile molecules released from the nucleus interior varies by some orders of magnitude as a function of the distance to the Sun, the volatility of species, their abundance and distribution between the ”trapped” and ”condensed” states, the structure of water ice, and the thermal inertia and other physical assumptions (dust mantle, …) on the nucleus. For the less volatile molecules such as CO2 and H2S, the relative (to H2O) abundance of species in coma remain similar to the primitive composition of the nucleus (relative deviation less than 25%) only around the perihelion passage (in the range −3 to −2 to +2–3AU), whatever is the water ice structure and chemical composition, and under the conditions that the nucleus is not fully covered by a dust mantle. The relative (to H2O) abundance of highly volatile molecules such as CO and CH4 in the coma remain approximately equal to the primitive nucleus composition only for nuclei made of clathrates. The nucleus releases systematically lower relative abundances of highly volatile species (up to one order of magnitude) around perihelion (in the range −3 to −2 to +2–3AU) in the cases of the crystalline and amorphous water ice structures in the nuclei. The rate of production, the outgassing profile and the relative abundances (to H2O) of volatile molecules are the key parameters allowing one to retrieve the chemical composition and thermodynamic conditions of cometary ice formation in the early Solar System. The coming observations of the coma and nucleus by the Rosetta mission instruments (VIRTIS, MIRO, …) should provide the necessary constraints to the model to allow it to infer the primordial ice structure and composition of the comet.