md-ex02 - σ = 1 and μ = 0 Then make a histogram of their...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Molecular Dynamics Simulations 2011. Exercise 2: Random num- bers, visualization. Return by Tue 20.9. at 12:15, exercise session Thu 22.9. at 12:15. 1. (6 p) Modify your program of exercise 1 (or the oFcial solution on the course web page) to construct a hexagonal close-packed (HCP) structure. Do this using an orthorhombic unit cell, i.e. a cell of which all three lattice vectors are orthogonal to each other. In the ±gure below, a schematic tip for how to construct the orthorhombic unit cell from the non-orthorhombic one is depicted. Then, using a visualization program, demonstrate the (small) di²erence be- tween the ³CC and HCP lattices, i.e. the di²erent stacking order of (111) crystal planes. 2. (7 p) Write subroutines for creating random numbers with an even and a Gaussian distribution. ³or the algorithm, see e.g. the Monte Carlo Simulations lecture notes, slides 21–28 (http://beam.acclab.helsinki.±/ djurabek/mc/mc 3-2x2.pdf). Generate 1 million Gaussian-distributed random numbers with
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: σ = 1 and μ = 0. Then, make a histogram of their distribution with a bin width of 0.01 and the area normalized to unity. Plot the result. Additionally, create the same Gaussian distribution f ( x ) = [2 π ]-1 / 2 e-x 2 / 2 (1) analytically and plot it in the same ±gure as the distribution created with random numbers. ³or exercises 1 and 2, return the ±gures in any rational format as well as the source code. Remember, codes that don’t compile give 0 p. 3. (7 p) The equipartition theorem states the following: Every degree of freedom of a body that contributes a square term of a coordinate or momentum to the total energy has a mean energy of k B T/ 2 in that degree of freedom. Based on this, explain why the temperature drops by a factor of 2 in the beginning of an unthermalized MD simulation (see lectures). Would you expect the factor to be 2 even at very high temperatures?...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online