Milestone 06

Author

Lars Pastewka

Milestone 6

Lennard-Jones potential with a cutoff

Learning goals

The student will… * …learn how to work with neighbor lists.

Introduction

In this milestone, we will start working with neighbor lists that are useful for computing short ranged potential. These types of data structures are sometimes also called Verlet lists. We will provide an implementation of the neighbor search for you, but you are also welcome to implement your own neighbor search. Should you decide on your own implementation, please point this out to us in your written report and add a brief description of the algorithm.

Lennard-Jones potential with a cutoff

Copy your Lennard-Jones implementation (to a file lj.h and lj.cpp or similar) and modify it to use the neighbor list. Note that you need a new parameter, the cutoff distance. Make sure what you shift the energy to zero at the cutoff distance as discussed in the lecture material.

Computational complexity

Rerun the equilibration steps from Milestone 5 and measure the execution time as a function of the number of atoms in the system. Compare these results to those of Milestone 5. Discuss what you see and why.

Task summary

This milestone requires the following tasks:

  • Modify your Lennard-Jones implementation to use neighbor lists
  • Measure the simulation time as a function of the number of atoms in your system

Optional:

  • Implement your own neighbor list search

We ask you to provide and discuss the following figures in your final report:

  • Plot of the simulation time as a function of the size (number of atoms) of your atomic system

We provide the following files for you: