Abstract We have used a coupled dynamical and chemical model to examine the chemical changes caused by the passage of a density wave propagating into the protostellar cloud. This wave is induced by the thermal pressure of the outer warm envelope of the cloud heated by UV photons. We have found that gas-phase chemical reactions and catalytic reactions on grain surfaces, which produce simple molecules of the carbon, nitrogen, and oxygen families, are most active in this region. Formation of molecules is most effective in the inner part of the density wave while evaporation of icy dust mantles dominates in its outer part. The chemical coupling between gas and dust causes locally increased number densities of active ra dicals, such as C, N, O, NH, and OH, and hydrogen saturated molecules CH4, NH3 and H2O. We show that chemical evolution in the post-wave gas can account for the observed abundance of water and NH3 observed in interstellar clouds.