We have developed further the technique of time-dependent modelling of magnetohydrodynamic shock waves, with a view to interpreting the molecular line emission from outflow sources. The extensively observed source L1157 B1 was chosen as an exemplar of the application of this technique. The dynamical age of the shock wave model was varied in the range 500 ≤t≤ 5000 yr, with the best fit to the observed line intensities being obtained for t= 1000 yr; this is of the same order as the dynamical age derived by Gueth, Guilloteau & Bachiller from their observations of L1157 B1. The emission line spectra of H2, CO, SiO, ortho- and para-H2O, ortho- and para-NH3, and A- and E-type CH3OH were calculated in parallel with the dynamical and chemical parameters of the model, using the ‘large velocity gradient’ (LVG) approximation to the line transfer problem. We compared the predictions of the models with the observed intensities of emission lines of H2, CO, SiO, ortho-H2O, ortho-NH3 and CH3OH, which include recent Herschel satellite measurements. In the case of SiO, we show (in Appendix A) that extrapolations of the collisional rate coefficients beyond the range of kinetic temperature for which they were originally calculated lead to spurious rotational line intensities and profiles. The computed emission-line spectra of SiO, NH3 and CH3OH are shown to depend on the assumed initial composition of the grain mantles, from whence they are released, by sputtering in the shock wave, into the gas phase. The dependence of the model predictions on the adopted form of the grain-size distribution is investigated in Appendix B; the corresponding integral line intensities are given in tabular form, for a range of C-type shock speeds, in the online Supporting Information.