Computer simulation of physical systems I

PHYS-403

Task II: NVE molecular dynamics simulation

This page is part of the content downloaded from Task II: NVE molecular dynamics simulation on Wednesday, 25 December 2024, 21:51. Note that some content and any files larger than 50 MB are not downloaded.

Description

Task2: MD-NVE simulation of a LJ liquid

Page content

Here you can find all the material needed for our first exercise on molecular dynamics of a Lennard-Jones liquid. The code is the same for Tasks II and Task III and is contained in MD.py.

Molecular dynamics simulation of liquid Ar in the NVE ensemble:
  1. starting up the calculations (choice of the parameters, check on the energy conservation, ...) (Part1)
  2. sampling of static properties of the system (pair correlation and structure factor). (Part2)
  3. sampling of a dynamical property of the system (diffusion coefficient). (Part3)
Recommended: These links (Part I, Part II, Part III) will open the Jupyter notebook for this task on EPFL's Noto server.


Alternatively, download the archive with the code, instructions and input files, unpack it (unzip -x Task2.zip) and start your exercise following this outline.

An additional note: the function run_NVE(...) outputs a VACF that is NOT normalised. This is because that quantity is used in step III to compute the diffusion coefficient that is a dimensional quantity. If you want to plot the correct VACF you can normalise the array containing it by dividing it by its first entry (something like vacf_normalised = output['vacf']/output['vacf'][0] ).