User Tools

Site Tools


events:2018_summer_school:converging_cutoff

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
Last revisionBoth sides next revision
exercises:2018_uol_school:converging_cutoff [2018/05/31 09:53] – [Running the system] mwatkinsevents:2018_summer_school:converging_cutoff [2018/06/11 09:54] – ↷ Page moved from exercises:2018_uol_school:converging_cutoff to events:2018_summer_school:converging_cutoff ibethune
Line 1: Line 1:
 ======Converging the cutoff for a more difficult problem====== ======Converging the cutoff for a more difficult problem======
  
-====Input files====+=====Input files=====
  
 <note important>The complete set of files for this exercise can be found {{exercises:2018_uol_school:32H2O-cutoff.tar|here}}.</note> <note important>The complete set of files for this exercise can be found {{exercises:2018_uol_school:32H2O-cutoff.tar|here}}.</note>
Line 7: Line 7:
 This exercise is similar to the previous one, but uses a setup and system more typical of CP2K usage. We will use a system of 32 H<sub>2</sub>O water molecules within a periodic box. Here is the input template: This exercise is similar to the previous one, but uses a setup and system more typical of CP2K usage. We will use a system of 32 H<sub>2</sub>O water molecules within a periodic box. Here is the input template:
  
-<code>+<code cp2k input_template.inp>
 &GLOBAL &GLOBAL
   PRINT_LEVEL MEDIUM   PRINT_LEVEL MEDIUM
Line 91: Line 91:
 Compared to the Si example, this is a larger system, we are using the OT optimizer in a good setup for a small to medium insulating system: Compared to the Si example, this is a larger system, we are using the OT optimizer in a good setup for a small to medium insulating system:
  
-<code>+<code cp2k>
     &SCF     &SCF
       SCF_GUESS RESTART       SCF_GUESS RESTART
Line 109: Line 109:
 and we are also saving the forces on the atoms and we are also saving the forces on the atoms
  
-<code>+<code cp2k>
   &PRINT   &PRINT
     &FORCES     &FORCES
Line 117: Line 117:
  
 We save the forces as for many purposes (MD) converging the forces reasonably is more important than the total energy of the system. We save the forces as for many purposes (MD) converging the forces reasonably is more important than the total energy of the system.
 +
 +=====Running the system=====
  
 The runcutoff file is a shell script as before to generate the different input files: The runcutoff file is a shell script as before to generate the different input files:
Line 144: Line 146:
  
 <note tip>remember to make it executable</note> <note tip>remember to make it executable</note>
- 
-====Running the system==== 
  
 When you run the shell script you should get a series of directories, cutoff_${cutoff}Ry. Run the input files in each directory (you may want to setup a script to do this). When you run the shell script you should get a series of directories, cutoff_${cutoff}Ry. Run the input files in each directory (you may want to setup a script to do this).
Line 153: Line 153:
 <note>**TASK** <note>**TASK**
   - Extract and plot the total energy of the system as a function of cutoff   - Extract and plot the total energy of the system as a function of cutoff
-  - Extract and plot the force on a chosen atom from the system as a function of cutoff +  - Extract and plot the total force on the system as a function of cutoff (search for 'SUM OF ATOMIC FORCES') 
-  - Extract and plot the total force on the system as a function of cutoff+  - Extract and plot the force on some chosen atoms from the system as a function of cutoff
 </note> </note>
  
 +=====Analysis=====
 +
 +What is converged?
 +
 +Compare the convergence of forces to the default convergence criteria for geometry optimization.
 +
 +What sets the required cutoff? It is the basis set (which is dictated by the pseudopotentials). You will need to be able to represent the Gaussian with largest exponent well on the realspace grids. Oxygen, being very electronegative (on the right of the period table with many protons) has very contracted 2s states. You can see in the output 
 +
 +<code>
 +       Normalised Cartesian orbitals:
 +
 +                        Set   Shell   Orbital            Exponent    Coefficient
 +
 +                          1          2s               10.389228       0.396646
 +                                                         3.849621       0.208811
 +                                                         1.388401      -0.301641
 +                                                         0.496955      -0.274061
 +                                                         0.162492      -0.033677
 +</code>
 +
 +That there is a Gaussian with an exponent of 10.4 Bohr<sup>-2</sup>. If we compare to the basis set for Silicon
 +
 +<code>
 + Si DZVP-MOLOPT-GTH DZVP-MOLOPT-GTH-q4
 + 1
 + 2 0 2 6 2 2 1
 +      2.693604434572  0.015333179500 -0.073325401200 -0.005800105400  0.023996406700  0.043919650100
 +      1.359613855428 -0.283798205000  0.484815594600 -0.059172026000  0.055459199900  0.134639409600
 +      0.513245176029 -0.228939692700 -0.276015880000  0.121487149900 -0.269559268100  0.517732111300
 +      0.326563011394  0.728834000900 -0.228394679700  0.423382421100 -0.259506329000  0.282311245100
 +      0.139986977410  0.446205299300 -0.018311553000  0.474592116300  0.310318217600  0.281350794600
 +      0.068212286977  0.122025292800  0.365245476200  0.250129397700  0.647414251100  0.139066843800
 +</code>
 +
 +we see that the largest exponent is only 2.7 Bohr<sup>-2</sup>, so can be represented on a much coarser grid.
 +
 +<note>**Task**
 +If you like, have a look at the BASIS_MOLOPT file (in the data directory, or online [[https://sourceforge.net/p/cp2k/code/HEAD/tree/trunk/cp2k/data/BASIS_MOLOPT|here]]) and see how the exponents change across the periodic table
 +</note>
 +
 +The convergence is largely dominated by the calculation of the gradient terms in a GGA functional (compare a simulation with LDA to the PBE used here). The evaluation of these terms on the grids are demanding, and very dependent on the functional.
 +
 +<code>
 +    &XC
 +      &XC_FUNCTIONAL PBE
 +      &END XC_FUNCTIONAL
 +      &XC_GRID
 +        ! defaults
 +        XC_SMOOTH_RHO NONE
 +        XC_DERIV PW
 +      &END XC_GRID
 +    &END XC
 +</code>
 +
 +For BLYP functional some smoothing needs to be applied. The smoothing may also converge forces more rapidly than the default settings, but at the expense of modifying the functional slightly.
 +
 +<note>**TASKS**
 +
 +compare to the previous calculation, but using a smoothing section in the XC section.
 +
 +<code>
 +    &XC
 +      &XC_FUNCTIONAL PBE
 +      &END XC_FUNCTIONAL
 +      &XC_GRID
 +        XC_SMOOTH_RHO NN50
 +        XC_DERIV NN50_SMOOTH
 +      &END
 +    &END XC
 +</code>
 +  
 +compare the convergence of LDA and BLYP to PBE.
 +
 +<code>
 +&XC_FUNCTIONAL PADE # or BLYP
 +&END XC_FUNCTIONAL
 +</code>
 +</note>
 +
 +<note tip>
 +Also change the psuedo potential to the appropriate functional.
 +<code>
 +    &KIND O
 +      BASIS_SET DZVP-MOLOPT-SR-GTH-q6
 +      POTENTIAL GTH-PADE-q6
 +    &END KIND
 +</code>
 +PADE is a synonym for LDA.
 +</note>
  
events/2018_summer_school/converging_cutoff.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1