Abstract:
Langevin Dynamics, Monte Carlo, and all-atom Molecular Dynamics simulations in implicit solvent require a reliable source of pseudorandom numbers generated at each step of calculation. We present the two main approaches for implementation of pseudorandom number generators on a GPU. In the first approach, inherent in CPU-based calculations, one PRNG produces a stream of pseudorandom numbers in each thread of execution, whereas the second approach builds on the ability of different threads to communicate, thus, sharing random seeds across the entire device. We exemplify the use of these approaches through the development of Ran2, Hybrid Taus, and Lagged Fibonacci algorithms. As an application-based test of randomness, we carry out LD simulations of N independent harmonic oscillators coupled to a stochastic thermostat. This model allows us to assess statistical quality of pseudorandom numbers. We also profile performance of these generators in terms of the computational time, memory usage, and the speedup factor (CPU/GPU time).