User Tools

Site Tools


exercises:2021_uzh_acpc2:ex01

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
exercises:2021_uzh_acpc2:ex01 [2021/04/26 07:23] – [Part II: Force Field Parameter] mrossmannekexercises:2021_uzh_acpc2:ex01 [2021/05/17 11:35] (current) – [Part III: Radial distribution function] Fix type mrossmannek
Line 278: Line 278:
  
 </note> </note>
-===== Part III:  Radial distribution functions  =====+===== Part III:  Radial distribution function  ===== 
 +In this section we analyze the dependence of the radial distribution function (rdf), $g(r)$, on the temperature of the system. To do so, you should plot $g(r)$ against various temperatures and examine the effects. 
 +You can use VMD (as explained below) or write your own program (Fortran, C, C++, Python etc.) to calculate the rdf.
  
-Use VMD or write your own program (Fortran, C, C++, Python etc.) to calculate radial distribution $g(r)$. Plot $g(r)$, and against various the temperatures to examine the effects. +VMD comes with an extension for exactly this purpose: In the VMD Main window open “Extensions → Analysis” click on “Radial Pair Distribution function $g(r)$. In the appearing window use “Utilities → Set unit cell dimensions” to tell VMD the size of 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 Ar”. In the plot window, use the "File" menu to save the plot data.
-VMD comes with an extension for exactly this purpose: In the VMD Main window open “Extensions → Analysis” click on “Radial Pair Distribution function $g(r)$. In the appearing window 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 Ar”. In the plot window, use "File", you can save the plot data.+
  
 <note>**TASK** <note>**TASK**
  
   * Plot $g(r)$ at 84, 300 and 400 K into the same graph.   * Plot $g(r)$ at 84, 300 and 400 K into the same graph.
-  * What are the differences in the height of the first peak, and why does temperature contribute to the differences? +  * What are the differences in the height of the first peak, and why/how does the temperature contribute to the differences? 
-  * Compared to experimental data ''exp_gr.dat'' taken at 84 Kwhat does this say about the structure of the liquid and is this expected+  * Compare your results to the experimental data taken at 84 K (given in ''exp_gr.dat'', below). What does this say about the structure of the liquid and did you expect this?
 </note> </note>
 <code - exp_gr.dat> <code - exp_gr.dat>
Line 441: Line 442:
 10.2150    1.1041                                               10.2150    1.1041                                              
 10.2831    1.0977                                               10.2831    1.0977                                              
-10.3512    1~0904                                              +10.3512    1.0904                                              
 10.4193    1.0835                                               10.4193    1.0835                                              
 10.4874    1.0774                                               10.4874    1.0774                                              
Line 454: Line 455:
 </code>                                            </code>                                           
  
-===== Part IV:  Ensembles  =====+===== Part IV: Other Ensembles  =====
  
-In previous section, you have already run NVE ensemble molecular dynamics for Ar liquid. In this section, we will focus on the NVTNPT ensembles.+In the previous sections, you have already run NVE ensemble molecular dynamics calculations for liquid Ar. In this section, we will focus on the NVT and NPT ensembles.
  
-Step up NVT calculation, change the setting in &MD section.  +To set up an NVT calculation, change the settings in the &MD section as shown below:
  
  
Line 475: Line 476:
      
      
-Step up NPT calculation, change the setting in &MD section.  +To set up an NPT calculation, change the settings in the &MD section as shown below:
  
   &FORCE_EVAL   &FORCE_EVAL
Line 502: Line 503:
 <note> <note>
 **TASK** **TASK**
-   *Run calculation using NVT at 300K, check the temperatureand energy of the whole system, and compare the result to NVE (300K)and rationalize the difference.  +   *Run calculation using the NVT ensemble at 300K. Check the temperature and energy of the whole system, and compare the result to an NVE ensemble (300K). Rationalize and discuss the difference. 
-   *Run calculation using NVT (300K) until the system is equilibrated then run NVE, check the temperatureand energy of the whole system, and  compare to previous NVE simulation. +   *Run calculation using the NVT ensemble (300K) until the system is equilibratedthen run an NVE ensemble calculation. Check the temperature and energy of the whole system, and compare to the previous NVE simulation. Discuss your observations
-   *Remove some atoms and run NPT simulation then check the size of the simulation box.+   *Remove some atoms and run an NPT ensemble simulation. Then, check the size of the simulation box. Discuss your observations. 
 +</note> 
 + 
 +<note tip> 
 +You have multiple options on how to restart a CP2K calculation off of a previous one. What all approaches have in common, is that you need to make use of the RESTART-files which are automatically written by CP2K (unless you explicitly disable them).
  
 +For the purposes of this example, you should see a file called ''ar108-1.restart'' (at least for Part 1 of this exercise). //Note:// there will also be multiple backup files (''.bak-#'' suffixes) which you do not need to care about.
 +These files are nothing but another input file. However, their parameters are set such that they continue a CP2K calculation from the last step of the simulation which generated the RESTART file.
  
 +Here are two options for how you can use these RESTART-files:
  
 +1. Directly using the RESTART as an input.
 +   - You can copy the RESTART file to a new input file: <code>cp ar108-1.restart argon_follow_up.inp</code>
 +   - Now you can change the input to your liking (e.g. change the ensemble, etc.)
 +   - And finally simply run CP2K with the new input file: <code>cp2k -i argon_followup.inp -o argon_followup.out</code>
  
 +2. You can also tell CP2K to load a specific RESTART-file.
 +   - Write a new input file as usual: <code>argon_followup.inp</code>
 +   - Add an [[https://manual.cp2k.org/trunk/CP2K_INPUT/EXT_RESTART.html|EXT_RESTART]] section:
 +      <code>
 +&EXT_RESTART
 +  RESTART_FILE_NAME ar108-1.restart
 +&END EXT_RESTART</code>
 +   - And now, again, simply run CP2K:  <code>cp2k -i argon_followup.inp -o argon_followup.out</code>
 </note> </note>
exercises/2021_uzh_acpc2/ex01.1619421817.txt.gz · Last modified: 2021/04/26 07:23 by mrossmannek