ProtoMol: A Molecular Dynamics Research Framework for Algorithmic Development T. Matthey 1 , A. Ko 2 , and J.A. Izaguirre 2 1 Department of Informatics University of Bergen 5020 Bergen, Norway Thierry.Matthey@ii.uib.no 2 Department of Computer Science and Engineering University of Notre Dame Notre Dame, IN, USA 46556-0309 izaguirr@cse.nd.edu Abstract. This paper describes the design and evaluation of ProtoMol, a high performance object-oriented software framework for molecular dynamics (MD). The main objective of the framework is to provide an efficient implementation that is extensible and allows the prototyping of novel algorithms. This is achieved through a combination of generic and object-oriented programming techniques and a domain specific language. The program reuses design patterns without sacrificing performance. Parallelization using MPI is allowed in an incremental fashion. To show the flexibility of the design, several fast electrostatics (N -body) methods have been implemented and tested in ProtoMol. In particular, we show that an O(N ) multi-grid method for N -body problems is faster than particle- mesh Ewald (PME) for N> 8, 000. The method works in periodic and non- periodic boundary conditions. Good parallel efficiency of the multi-grid method is demonstrated on an IBM p690 Regatta Turbo with up to 20 processors for systems with N = 10 2 , 10 4 and 10 6 . Binaries and source code are available free of charge at http://www.nd.edu/˜lcls/protomol. 1 Introduction Molecular dynamics (MD) is an important tool in understanding properties and function of materials at the molecular level, including biological molecules such as proteins and DNA. The challenge of MD is related to the multiple length and time scales present in systems. For example, biological molecules have thousands of atoms and time scales that span 15 orders of magnitude. The MD research community continually develops multiscale integrators, fast N -body solvers, and parallel implementations that promise to bring the study of important systems within reach of computational scientists. Although there are many programs for MD, most are very complex and several are legacy codes. This makes it harder for algorithm developers to incorporate their algorithms and disseminate them. The complexity usually arises from parallelization and other optimizations. ProtoMol has been designed to facilitate the prototyping and testing of novel algorithms for MD. It provides a domain specific language that allows user prototyping of P.M.A. Sloot et al. (Eds.): ICCS 2003, LNCS 2659, pp. 50–59, 2003. c Springer-Verlag Berlin Heidelberg 2003