Journal of Physical Chemistry B, Vol.115, No.18, 5278-5288, 2011
Generation of Random Numbers on Graphics Processors: Forced Indentation In Silico of the Bacteriophage HK97
The use of graphics processing units (GPUs) in simulation applications offers a significant speed gain as compared to computations on central processing units (CPUs). Many simulation methods require a large number of independent random variables generated at each step. We present two approaches for implementation of random number generators (RNGs) on a CPU. In the one-RNG-per-thread approach, one RNG produces a stream of random numbers in each thread of execution, whereas the one-RNG-for-all-threads method builds on the ability of different threads to communicate, thus, sharing random seeds across an entire GPU device. We used these approaches to implement Ran2, Hybrid Taus, and Lagged Fibonacci algorithms on a GPU. We profiled the performance of these generators in terms of the computational time, memory usage, and the speedup factor (CPU time/CPU time). These generators have been incorporated into the program for Langevin simulations of biomolecules fully implemented on the GPU. The similar to 250-fold computational speedup on the CPU allowed us to carry out single-molecule dynamic force measurements in silica to explore the mechanical properties of the bacteriophage HK97 in the experimental subsecond time scale. We found that the nanomechanical response of HK97 depends on the conditions of force application, including the rate of change and geometry of the mechanical perturbation. Hence, using the CPU-based implementation of RNGs, presented here, in conjunction with Langevin simulations, makes it possible to directly compare the results of dynamic force measurements in vitro and in silica.