This project derives a systematic solution for performance optimization and adaptive application mapping to obtain scalable performance on parallel and distributed systems consisting of tens of thousands of processing nodes. With expert domain scientists in molecular dynamics (MD) simulation, we expect to achieve performance levels on MD codes even better than what has been derived manually after years of development and many ports to a variety of architectures. The application components are viewed as dynamically adaptive algorithms for which there exist a set of variants and parameters that can be searched to develop an optimized implementation. A workflow is an instance of the application where nodes represent application components and dependences between the nodes represent execution ordering constraints. By encoding an application in this way, we capture a large set of possible application mappings with a very compact representation. The system layers explore the large space of possible implementations to derive the most appropriate solution. Because the space of mappings is prohibitively large, the system captures and utilizes domain knowledge from the domain scientists and designers of the compiler, run-time and performance models to prune most of the possible implementations. Knowledge representation and machine learning utilize this domain knowledge and past experience to navigate the search space efficiently. This multidisciplinary approach impacts the state-of-the-art in the sub-fields of compilers, run-time systems, machine learning, knowledge representation, and accelerates advances in MD simulation with far more productive software development and porting. More broadly, this research enables systematic performance optimization in other sciences.