{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

exercise_6 - Molecular Dynamics Simulations 2011 Exercise 6...

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

View Full Document Right Arrow Icon
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 -axis we see that there is noise in the higher part of the simulated distribution.
Background image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}