Benjamin G. Levine, John E. Stone, and Axel Kohlmeyer.
Fast analysis of molecular dynamics trajectories with graphics
processing units-radial distribution function histogramming.
Journal of Computational Physics, 230:3556-3569, 2011.
(PMC: PMC3085256)
LEVI2011-JS
The calculation of radial distribution functions (RDFs) from molecular dynamics trajectory
data is a common and computationally expensive analysis task. The rate limiting step in
the calculation of the RDF is building a histogram of the distance between atom pairs in
each trajectory frame. Here we present an implementation of this histogramming scheme
for multiple graphics processing units (GPUs). The algorithm features a tiling scheme to
maximize the reuse of data at the fastest levels of the GPU's memory hierarchy and
dynamic load balancing to allow high performance on heterogeneous configurations of
GPUs. Several versions of the RDF algorithm are presented, utilizing the specific hardware
features found on different generations of GPUs. We take advantage of larger shared
memory and atomic memory operations available on state-of-the-art GPUs to accelerate
the code significantly. The use of atomic memory operations allows the fast, limited-
capacity on-chip memory to be used much more efficiently, resulting in a fivefold increase
in performance compared to the version of the algorithm without atomic operations. The
ultimate version of the algorithm running in parallel on four NVIDIA GeForce
GTX480 (Fermi) GPUs was found to be 92 times faster than a multithreaded
implementation running on an Intel Xeon5550 CPU. On this multi-GPU hardware,
the RDF between two selections of 1,000,000 atoms each can be calculated in 26.9
seconds per frame. The multi-GPU RDF algorithms described here are implemented in
VMD, a widely used and freely available software package for molecular dynamics
visualization and analysis.