M19 (MRBO02) exercises and additional material
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Exercise Week 2: MD

Molecular dynamics of liquid H2O and calculations with MD integrators

The exercise of the second week contains two parts. In the first part, we will run three different classical MD simulations for liquid H2O, using:

  • The parameters reported by Praprotnik et al.

  • The fitted force field parameters we constructed in the last exercise after performing force matching

  • And finally, the fitted force field parameters at a higher temperature, i.e. at 400K

After this, we will compute radial distribution functions (RDFs) from all three MD trajectories.

The last part will be to compute the orbit of the Earth around the Sun using a Jupyter Notebook.

The required iput files can be obtained from here.

Some information regarding the input files

  • The directory 2.1-NH2O-MD contains the input file md.in for the classical MD simulation.

  • The directory 2.2-NH2O-GOFR contains the file goo_exp.ALS which has the experimental RDF data and multiplot_comp.agr which has the RDF data computed with another force field.

  • The directory 2.3-MD_integrators contains the file exercise_lecture3_MD.ipynb which you can open with Jupyter Notebook.

2.1. Classical MD simulation for liquid H2O

waterbox

The directory 2.1-NH2O-MD contains the input file md.in. The force field parameters given by Praprotnik et al. are already used here. Copy the directory again and now replace the bond lengths, angles and charges with the fitted parameters we calculated from the last exercise after performing force matching. Start running these simulations one by one.

Each of the simulations will take approximately 15 minutes. You can work on your other tasks in the meantime. 🙂

We ran these two simulations at 300K. In order to see the effects of temperature, repeat the MD simulation with the fitted parameters using an inital temperature of 400K.

  1. Check if the MD is energy conserving and well-behaved using the file run-NH2O-MD-T300-1.ener. (2 Points)

  2. What are the final average temperatures in each of the simulations? (2 Points)

2.2. Calculation of radial distribution functions

Next, analyze the trajectories (run-NH2O-MD-T300.xyz) in order to calculate the radial distribution function (rdf, g(r)) as a function of temperature. Do this for all of the three MD trajectories you obtained.

VMD comes with an extension for exactly this purpose: In the VMD Main window, open Extensions → Analysis and then click on Radial Pair Distribution function g(r). In the appearing window, first select the molecule and then use Utilities → Set unit cell dimensions to let VMD know the simulation box you used. After that use Selection 1 and 2 to define the atomic types that you want to calculate the rdf for, for example element O. In order to be able to compare with the experimental data, set delta r (bin width) to 0.01.

After plotting the RDF, you can save the plot by clicking File → Export to Xmgrace. After this, you can plot all the RDFs in the same graph using Matplotlib or gnuplot.

  1. Give a short definition of the radial distribution function. (2 Points)

  2. Plot gO−O(r) for all three simulations into the same graph. (3 Points).

  3. What does this say about the structure of the liquid and is this expected? (2 Points)

  4. Compare to the experimental data goo_exp.ALS and computational data multiplot_comp.agr taken at 300 K. Which one is in a better agreement with experiment, the RDF you calculated or the one given with the file name multiplot_comp.agr? (2 Points)

  5. The computational data multiplot_comp.agr was computed with a different force field, which was SPC/Fw. Discuss how the choice of force field affects the structural properties. For more information on SCP/Fw, please have a look at here. (2 Points)

In the future, we will also compute IR spectrum from these MD simulations!

2.3. Calculating the orbit of the Earth around the Sun using the Verlet method

Our final exercise for the MD topic will be to calculate the orbit of the Earth around the Sun using the Verlet method. This is a programming exercise, hence you will use Jupyter Notebook.

Go to the directory 2.3-MD_integrators and open the file exercise_lecture3_MD.ipynb with Jupyter Notebook. For further information, please follow the instructions there.

References

For more MD exercises with CP2K, please look at here.