Exercise_6 - Molecular Dynamics Simulations 2011 Exercise 6 Suggested solutions Eero Holmstr¨ om 1 The code was modified to create and output the

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Molecular Dynamics Simulations 2011 Exercise 6: Suggested solutions Eero Holmstr¨ om October 19, 2011 1. The code was modified to create and output the distribution of velocities. The implementation in main.f90/c is such that after 15 ps of running, we start to create a histogram of velocities. The distribution is cumulatively updated at each time step after 15 ps until the run ends at 100 ps. Finally we output the collected distribution. To compare with the analytical distri- bution, we calculate the average temperature in the interval 15 ps to 100 ps. The analytical distribution can be created with an awk one liner such as this: awk ’BEGIN {m=1.0552067484e-25; k=1.38e-23; T=303.272; pi=3.1416; for(v=0.0; v<=1267; v=v+1.0) {print v, 4*pi*v^2*(m/(2*pi*k*T))^(3./2.)*exp(-1.0*m*v^2/(2*k*T))}}’ > mb_analytical.dat Results are plotted in Figs 1 and 2. It is seen that generally the simulated distribution follows the analytical one very nicely. However, from Fig. 2 with the logarithmic y...
View Full Document

This note was uploaded on 02/14/2012 for the course CSE 6590 taught by Professor Kotakoski during the Winter '12 term at York University.

Page1 / 6

Exercise_6 - Molecular Dynamics Simulations 2011 Exercise 6 Suggested solutions Eero Holmstr¨ om 1 The code was modified to create and output the

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online