- Group Name: Yellow Lobster
- Group participants names: Michel Breyer, Carlo Del Don, Florian Frei, Fabian Thüring
- Project Title: MD Simulation
Molecular Dynamics project for the course How to Write Fast Numerical Code (263-2300).
The molecular dynamics simulation consists of the numerical, step-by-step, solution of the classical equations of motion, which for a simple atomic system may be written as:
For this purpose we need to be able to compute the forces for each particle in the system. The force can be derived by the negative gradient of a potential field .
In general, this kind of problems are computationally expensive for large number of particles. The naive algorithm would require the computation of interactions, where is the number of particles in the system.
Note, that the asymptotic complexity of such a problem is quadratic in the number of particles .
Introducing a cut-off radius will drastically reduce the computational complexity of the problem as particles which lie far away from each other are treated as if there was no interactions between them. A particle only interacts with the particles whose distance is at most .
In order to exploit the short-range nature of the particle-particle interaction, a spatial subdivision structure is introduced. This allows performing fast neighbor queries to find out which particles interact with each other.
Below is a small animation which shows the difference between the naive algorithm and the celllist based algorithm:
A very small demo of one simulation performed with molec. In the video only particles are shown, note that with molec it is possible to compute the interaction for thousands of particles.
A configuration file can be passed to the executable in order to set some default simulation parameters. The configuration file has to have the following structure:
# time step
dt = 0.005
# mass of each particle
mass = 1
# cutoff radius
Rcut = 2.5
# Lennard-Jones parameters
epsLJ = 1
sigLJ = 1
# particles initial disturbance (in [0,1) )
scaling = 0.05
The flow of molec is shown in the following image: