Skip to content

thfabian/molec

Repository files navigation

## Molecular Dynamics Framework [![Build Status](https://travis-ci.org/thfabian/molec.svg?branch=master)](https://travis-ci.org/thfabian/molec) [![Build Status](https://ci.appveyor.com/api/projects/status/qw7cek485ppr003w?svg=true)](https://ci.appveyor.com/project/thfabian/molec/branch/master)
  • Group Name: Yellow Lobster
  • Group participants names: Michel Breyer, Carlo Del Don, Florian Frei, Fabian Thüring
  • Project Title: MD Simulation

Group Project

Molecular Dynamics project for the course How to Write Fast Numerical Code (263-2300).

Molecular Dynamics (MD)

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:

equation

For this purpose we need to be able to compute the forces equation for each particle in the system. The force can be derived by the negative gradient of a potential field equation.

In general, this kind of problems are computationally expensive for large number of particles. The naive algorithm would require the computation of equation interactions, where equation is the number of particles in the system.

Note, that the asymptotic complexity of such a problem is quadratic in the number of particles equation.

Introducing a cut-off radius equation 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 equation.

Celllist

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:

Molec in action

A very small demo of one simulation performed with molec. In the video only equation particles are shown, note that with molec it is possible to compute the interaction for thousands of particles.

Molec in action

Running the code

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:

References

  • [1] Gonnet paper
  • [2] Cell list implementation

About

Molecular Dynamics Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •