In this course, we are concerned with systems of many particles. Such a system models a chunk of matter, and the particles are its constituents. Statistical mechanics allows us predict the macroscopic properties and behavior of matter when conceptualized as collections of many ( 10) particles, and it is the central theme of this course. As we will see, the formalism of statistical mechanics allows straightforward analytical treatment of only a few simple systems. The primary motivation behind molecular simulation is to apply the framework of statistical mechanics in the prediction of macroscopic behavior for relatively “complicated” systems. The two major branches of molecular simulation we will consider are (1) Monte Carlo (MC) and (2) molecular dynamics (MD).
Statistical mechanics is a broad subject, and we will restrict ourselves in this course to stat mech at the introductory level. The lessons of elementary stat mech will be reinforced time and time again throughout the course as we explore aspects of molecular simulation techniques. Stat mech is not normally taught to engineering students outside a general course on physical chemistry. (Undergraduates in physics or chemistry might get a one or two course series on statistical mechanics.)
A second component of this course is programming. Most engineering students take a programming course, so some exposure to computer programming is expected as a prerequisite. It will be necessary to discuss certain simulation algorithms using “pseudo-code” examples, or even examples written in C or FORTRAN or Python. The level of code presented in this course will generally be sufficiently basic such that novices can understand it line by line. For example, see if you can predict what the following C program does:
#include <stdio.h> int main () { int i; for (i=0;i<100;i++) printf("Hello, I am number %i\n",i); }
Maybe you'd like it better in Python:
for i in range(100): print('Hello, I am number',i)
If it looks somewhat mysterious to you, don't worry. Part of this course will be explaining how code works. By the end of the course, you would be able to write the above program had I told you to write a program to output the numbers 0 - 99. It must be emphasized at this point that I do not intend to turn you all into expert coders (though there are worse things to aim for). This is a survey course from which I hope you gain an accurate picture of the field of molecular simulation from which you can begin your own exploration. In order to achieve this goal, it is necessary to do some minor work with actual code.
A closely related aspect of this component is the practical matter of how one works with simulation code. My preference, and therefore the manner in which I teach the course, is to use a command-line environment, as opposed to a graphical user environment. It should be emphasized that the concepts and ideas that form the backbone of this course are not operating system-specific. However, the implementation of those ideas and concepts, as I hope you will see, is straightforward once you know how to compile and run simple programs at the command-line. Again, this will be at a basic level; this is not a programming course. All of the production MD codes we consider later in the course are exclusively used in a command-line environment. For writing and editing code, I recommend VSCode.
Much of this course is based on the book Understanding Molecular Simulation by Daan Frenkel and Berend Smit, [1] two chemical engineers from Amsterdam. There are several other books which I have used on occasion, the most useful of which was Computer Simulation of Liquids by Allen and Tildesly. [2].
cfa22@drexel.edu