  Recently, we have shown how a colored-noise Langevin equation can be used in
the context of molecular dynamics as a tool to obtain dynamical trajectories
whose properties are tailored to display desired sampling features. In the
present paper, after having reviewed some analytical results for the stochastic
differential equations forming the basis of our approach, we describe in detail
the implementation of the generalized Langevin equation thermostat and the
fitting procedure used to obtain optimal parameters. We discuss in detail the
simulation of nuclear quantum effects, and demonstrate that, by carefully
choosing parameters, one can successfully model strongly anharmonic solids such
as neon. For the reader's convenience, a library of thermostat parameters and
some demonstrative code can be downloaded from an on-line repository.
