Chowdhury Rezaul, Beglov Dmitri, Moghadasi Mohammad, Paschalidis Ioannis Ch, Vakili Pirooz, Vajda Sandor, Bajaj Chandrajit, Kozakov Dima
Computer Science Department, Stony Brook University , Stony Brook, New York 11790, United States.
Department of Mechanical Engineering, Division of Systems Engineering, and Department of Electrical and Computer Engineering, Boston University , Boston, Massachusetts 02215, United States.
J Chem Theory Comput. 2014 Oct 14;10(10):4449-4454. doi: 10.1021/ct400474w. Epub 2014 Sep 5.
Molecular mechanics and dynamics simulations use distance based cutoff approximations for faster computation of pairwise van der Waals and electrostatic energy terms. These approximations traditionally use a precalculated and periodically updated list of interacting atom pairs, known as the "nonbonded neighborhood lists" or nblists, in order to reduce the overhead of finding atom pairs that are within distance cutoff. The size of nblists grows linearly with the number of atoms in the system and superlinearly with the distance cutoff, and as a result, they require significant amount of memory for large molecular systems. The high space usage leads to poor cache performance, which slows computation for large distance cutoffs. Also, the high cost of updates means that one cannot afford to keep the data structure always synchronized with the configuration of the molecules when efficiency is at stake. We propose a dynamic octree data structure for implicit maintenance of nblists using space linear in the number of atoms but independent of the distance cutoff. The list can be updated very efficiently as the coordinates of atoms change during the simulation. Unlike explicit nblists, a single octree works for all distance cutoffs. In addition, octree is a cache-friendly data structure, and hence, it is less prone to cache miss slowdowns on modern memory hierarchies than nblists. Octrees use almost 2 orders of magnitude less memory, which is crucial for simulation of large systems, and while they are comparable in performance to nblists when the distance cutoff is small, they outperform nblists for larger systems and large cutoffs. Our tests show that octree implementation is approximately 1.5 times faster in practical use case scenarios as compared to nblists.
分子力学和动力学模拟使用基于距离的截断近似法,以便更快地计算成对的范德华力和静电能项。传统上,这些近似法使用预先计算并定期更新的相互作用原子对列表,即“非键邻域列表”或nblist,以减少查找距离截断范围内原子对的开销。nblist的大小随系统中原子数量线性增长,并随距离截断超线性增长,因此,对于大型分子系统,它们需要大量内存。高空间使用率导致缓存性能不佳,这会减慢大距离截断情况下的计算速度。此外,更新成本高意味着当效率至关重要时,无法承担使数据结构始终与分子构型同步的代价。我们提出一种动态八叉树数据结构,用于隐式维护nblist,其使用的空间与原子数量成线性关系,但与距离截断无关。随着模拟过程中原子坐标的变化,该列表可以非常高效地更新。与显式nblist不同,单个八叉树适用于所有距离截断。此外,八叉树是一种缓存友好的数据结构,因此,与nblist相比,它在现代内存层次结构上更不容易出现缓存未命中导致的速度减慢。八叉树使用的内存几乎少两个数量级,这对于大型系统的模拟至关重要,并且当距离截断较小时,它们在性能上与nblist相当,但在大型系统和大距离截断情况下,它们的性能优于nblist。我们的测试表明,在实际用例场景中,八叉树实现的速度比nblist快约1.5倍。