Recently, Dammak and coworkers (H. Dammak, Y. Chalopin, M. Laroche, M. Hayoun, and J.J. Greffet. Quantumthermal bath for molecular dynamics simulation. Phys. Rev. Lett., 103:190601, 2009.) proposed that the quantum statistics of vibrations in condensed systems at low temperature could be simulated by running molecular dynamics simulations in the presence of a colored noise with an appropriate power spectral density. In the present contribution, we show how this method can be implemented in a flexible manner and at a low computational cost by synthesizing the corresponding noise on the fly. The proposed algorithm is tested for a simple harmonic chain as well as for a more realistic model of aluminium crystal. The energy and Debye-Waller factor are shown to be in good agreement with those obtained from harmonic approximations based on the phonon spectrum of the systems. The limitations of the method associated with anharmonic effects are also briefly discussed. Some perspectives for disordered materials and heat transfer are considered.