md, a Python code which carries out a molecular dynamics simulation.
The computation involves following the paths of particles which exert a distance-dependent force on each other. The particles are not constrained by any walls; if particles meet, they simply pass through each other.
The problem is treated as a coupled set of differential equations. The system of differential equation is discretized by choosing a discrete time step. Given the position and velocity of each particle at one time step, the algorithm estimates these values at the next time step.To compute the next position of each particle requires the evaluation of the right hand side of its corresponding differential equation. Since each of these calculations is independent, there is a potential speedup if the program can take advantage of parallel computing.
This version of the program is intended as a starting point; students are asked to examine the program and add the appropriate modifications to run it in parallel.
md ( nd, np, step_num, dt )where
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
md is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.
hello_mpi, a Python code which prints out "Hello, world!" using the MPI parallel programming environment, under MPI4PY.
prime_mpi, a Python code which counts the number of primes between 1 and N, using MPI for parallel execution.
quad_mpi, a Python code which approximates an integral using a quadrature rule, and carries out the computation in parallel using MPI.
search_mpi, a Python code which searches integers between A and B for a value J such that F(J) = C, using MPI and MPI4PY for parallel execution.