Efficient pseudo-random number generators for biomolecular simulations on graphics processors

Langevin Dynamics, Monte Carlo, and all-atom Molecular Dynamics simulations in implicit solvent, widely used to access the microscopic transitions in biomolecules, require a reliable source of random numbers. Here we present the two main approaches for implementation of random number generators (RNGs) on a GPU, which enable one to generate random numbers on the fly. In the one-RNG-per-thread approach, inherent in CPU-based calculations, one RNG produces a stream of random numbers in each thread of execution, whereas the one-RNG-for-all-threads approach builds on the ability of different threads to communicate, thus, sharing random seeds across the entire GPU device. We exemplify the use of these approaches through the development of Ran2, Hybrid Taus, and Lagged Fibonacci algorithms fully implemented on the GPU. 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 random numbers by comparing the simulation output with the exact results that would be obtained with truly random numbers. We also profile the performance of these generators in terms of the computational time, memory usage, and the speedup factor (CPU/GPU time).

[1]  M. E. Muller,et al.  A Note on the Generation of Random Normal Deviates , 1958 .

[2]  T. A. Bray,et al.  A Convenient Method for Generating Normal Variables , 1964 .

[3]  R. Tausworthe Random Numbers Generated by Linear Recurrence Modulo Two , 1965 .

[4]  D. Ermak,et al.  Brownian dynamics with hydrodynamic interactions , 1978 .

[5]  M. Karplus,et al.  CHARMM: A program for macromolecular energy, minimization, and dynamics calculations , 1983 .

[6]  William H. Press,et al.  Numerical recipes in C. The art of scientific computing , 1987 .

[7]  S. Edwards,et al.  The Theory of Polymer Dynamics , 1986 .

[8]  Makoto Matsumoto,et al.  Twisted GFSR generators , 1992, TOMC.

[9]  William H. Press,et al.  The Art of Scientific Computing Second Edition , 1998 .

[10]  Richard P. Brent,et al.  Uniform random number generators for supercomputers , 1992 .

[11]  Alan M. Ferrenberg,et al.  Monte Carlo simulations: Hidden errors from "good" random number generators. , 1992, Physical review letters.

[12]  W. Selke,et al.  Cluster-flipping Monte Carlo algorithm and correlations in good' random number generators , 1993 .

[13]  Peter Grassberger,et al.  On correlations in “good” random number generators , 1993 .

[14]  Pierre L'Ecuyer,et al.  A search for good multiple recursive random number generators , 1993, TOMC.

[15]  Makoto Matsumoto,et al.  Twisted GFSR generators II , 1994, TOMC.

[16]  Pierre L'Ecuyer,et al.  Maximally equidistributed combined Tausworthe generators , 1996, Math. Comput..

[17]  D. Thirumalai,et al.  Protein folding kinetics: timescales, pathways and energy landscapes in terms of sequence-dependent properties. , 1996, Folding & design.

[18]  Takuji Nishimura,et al.  Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator , 1998, TOMC.

[19]  A. Rukhin,et al.  Statistical Testing of Random Number Generators , 1999 .

[20]  G. Marsaglia,et al.  The Ziggurat Method for Generating Random Variables , 2000 .

[21]  Michael Mascagni,et al.  SPRNG: A Scalable Library for Pseudorandom Number Generation , 1999, PP.

[22]  Tariq Aziz Correlations in e+e- , 2001 .

[23]  Gerhard Hummer,et al.  Kinetics from nonequilibrium single-molecule pulling experiments. , 2003, Biophysical journal.

[24]  Richard P. Brent,et al.  A fast algorithm for testing reducibility of trinomials mod~2 and some new primitive trinomials of degree 3021377 , 2003, Math. Comput..

[25]  Michael Mascagni,et al.  Parameterizing parallel multiplicative lagged-Fibonacci generators , 2004, Parallel Comput..

[26]  Valentina Tozzini,et al.  Coarse-grained models for proteins. , 2005, Current opinion in structural biology.

[27]  L. Barreira Poincaré recurrence:. old and new , 2006 .

[28]  Changbong Hyeon,et al.  Pathways and kinetic barriers in mechanical unfolding and refolding of RNA and proteins. , 2006, Structure.

[29]  Mapping the energy landscape of biomolecules using single molecule force correlation spectroscopy: theory and applications. , 2006, Biophysical journal.

[30]  Hubert Nguyen,et al.  GPU Gems 3 , 2007 .

[31]  Changbong Hyeon,et al.  Revealing the bifurcation in the unfolding pathways of GFP by using single-molecule experiments and simulations , 2007, Proceedings of the National Academy of Sciences.

[32]  Peter Schröder,et al.  Quantum Monte Carlo on graphical processing units , 2007, Comput. Phys. Commun..

[33]  Klaus Schulten,et al.  Accelerating Molecular Modeling Applications with GPU Computing , 2009 .

[34]  Pierre L'Ecuyer,et al.  TestU01: A C library for empirical testing of random number generators , 2006, TOMS.

[35]  Yunfei Chen,et al.  GPU accelerated molecular dynamics simulation of thermal conductivities , 2007, J. Comput. Phys..

[36]  R. Dima,et al.  Probing the origin of tubulin rigidity with molecular simulations , 2008, Proceedings of the National Academy of Sciences.

[37]  Urs Haberthür,et al.  FACTS: Fast analytical continuum treatment of solvation , 2008, J. Comput. Chem..

[38]  A. Arnold,et al.  Harvesting graphics power for MD simulations , 2007, 0709.3225.

[39]  Cecilia Clementi,et al.  Coarse-grained models of protein folding: toy models or predictive tools? , 2008, Current opinion in structural biology.

[40]  Joshua A. Anderson,et al.  General purpose molecular dynamics simulations fully implemented on graphics processing units , 2008, J. Comput. Phys..

[41]  Pradeep Dubey,et al.  Larrabee: A Many-Core x86 Architecture for Visual Computing , 2009, IEEE Micro.

[42]  Michela Taufer,et al.  Towards Large-Scale Molecular Dynamics Simulations on Graphics Processors , 2009, BICoB.

[43]  M J Harvey,et al.  An Implementation of the Smooth Particle Mesh Ewald Method on GPU Hardware. , 2009, Journal of chemical theory and computation.

[44]  Vijay S. Pande,et al.  Accelerating molecular dynamic simulation on graphics processing units , 2009, J. Comput. Chem..

[45]  Tom R. Halfhill NVIDIA's Next-Generation CUDA Compute and Graphics Architecture, Code-Named Fermi, Adds Muscle for Parallel Processing , 2009 .

[46]  S. Sharma,et al.  The Fokker-Planck Equation , 2010 .

[47]  V Barsegov,et al.  Sop‐GPU: Accelerating biomolecular simulations in the centisecond timescale using graphics processors , 2010, Proteins.