Molecular Dynamics with C++. An Object-Oriented Approach
Matthias Müller · 1999
The complexity of parallel computing hardware calls for software that eases the development of numerical models for researchers that do not have a deep knowledge of the platforms' communication strategies and that do not have the time to write ecient code themselves. We show how "container" data structures can address the needs of many potential users of parallel machines that have so far been deterred by the complexity of parallelizing code. These example presented here is a molecular dynamics simulation. Our approach uses several ideas from the Standard Template Library (STL). Particles are stored in a Template Container that also distributes them among the processors in the parallel version. For the integration applicators are applied to the particles. The force calculation is done by a method "for each pair" similar to "for each" that takes an extended applicator as an argument. This extended applicator takes two particles as its arguments and is applied to every po...