User Tools

Site Tools


exercises:2017_uzh_cp2k-tutorial:gapw

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:2017_uzh_cp2k-tutorial:gapw [2017/07/06 08:37] gtocciexercises:2017_uzh_cp2k-tutorial:gapw [2020/08/21 10:15] (current) – external edit 127.0.0.1
Line 78: Line 78:
 this tutorial we will just compute the XAS spectra of single snapshots for a small (1ps) trajectory this tutorial we will just compute the XAS spectra of single snapshots for a small (1ps) trajectory
 of bulk water (32 H2Os). To start, extract the directories {{ :exercises:2017_uzh_cp2k-tutorial:tutorial_gapw.tar.gz|}} of bulk water (32 H2Os). To start, extract the directories {{ :exercises:2017_uzh_cp2k-tutorial:tutorial_gapw.tar.gz|}}
-where you will be running the calculations. Also, besides the CP2K module you will need also gcc, +where you will be running the calculations. Also, load the CP2K module  
-which you can load as explained in [[exercises:2017_uzh_cp2k-tutorial:login|]].+as explained in [[exercises:2017_uzh_cp2k-tutorial:login|]].
  
 Go to the directory ''gapw_water_xas'', where there is Go to the directory ''gapw_water_xas'', where there is
Line 111: Line 111:
     &QS     &QS
       ! Task: insert METHOD keyword to use gaussian and augmented plane wave method       ! Task: insert METHOD keyword to use gaussian and augmented plane wave method
 +      !METHOD GAPW
       EXTRAPOLATION ASPC       EXTRAPOLATION ASPC
       EXTRAPOLATION_ORDER 3       EXTRAPOLATION_ORDER 3
Line 119: Line 119:
       QUADRATURE   GC_LOG       QUADRATURE   GC_LOG
       ! parameters needed for the GAPW method, look at the manual for more details       ! parameters needed for the GAPW method, look at the manual for more details
-      EPSFIT       1.E-4+      EPSFIT       1.E-4 ! precision to give the extension of a hard gaussian
       EPSISO       1.0E-12       EPSISO       1.0E-12
       EPSRHO0      1.E-8       EPSRHO0      1.E-8
       LMAXN0       4       LMAXN0       4
       LMAXN1       6       LMAXN1       6
-      ALPHA0_H     10+      ALPHA0_H     10 ! Exponent for hard compensation charge
     &END QS     &END QS
     &SCF     &SCF
Line 164: Line 164:
     &XAS     &XAS
       RESTART F       RESTART F
-      ! Task: specify below the method to use to compute the XAS spectra +      ! Task: specify below the METHOD to use to compute the XAS spectra 
-      ! half-core hole and the full core-hole are possible methods that can be used, choose half-core hole+      ! half-core hole and the full core-hole are possible methods, choose transition potential half hole 
 +      ! METHOD TP_HH
              
- 
       DIPOLE_FORM   VELOCITY       DIPOLE_FORM   VELOCITY
  
-      ! Task: include the STATE_TYPE tag to specify which states to compute the spectra from +      ! Task: include the STATE_TYPE keyword to specify the states to compute the spectra 
-      ! in NEXAFS experiments one looks at the excitation of the inner-core shell +      ! in NEXAFS experiments one looks at the excitation of the innermost-core shell 
-       +      ! STATE_TYPE 1s 
-      ! Task: include the ATOMS_LIST tag for the calculation of XAS+      ! Task: include the ATOMS_LIST keyword for the calculation of XAS
       ! you can look at the list of atoms to include in the .xyz file for the snapshot       ! you can look at the list of atoms to include in the .xyz file for the snapshot
       ! In order to include atoms from X to Y use the syntax X..Y       ! In order to include atoms from X to Y use the syntax X..Y
- +      ! ATOMS_LIST 1..32 
-      ! This tag indicates the number of virtual KS orbitals+      ! This keyword indicates the number of virtual KS orbitals
       ! to compute the XAS       ! to compute the XAS
       ADDED_MOS     60       ADDED_MOS     60
Line 228: Line 228:
     ! for both O and H we want to use the all-electron 6-31G* basis set     ! for both O and H we want to use the all-electron 6-31G* basis set
     &KIND H     &KIND H
- +      ! BASIS_SET 6-31G* 
 +      ! POTENTIAL ALL
       ! number of points for the angular part of the grid, needed for GAPW       ! number of points for the angular part of the grid, needed for GAPW
       LEBEDEV_GRID 80       LEBEDEV_GRID 80
Line 236: Line 236:
     &END KIND     &END KIND
     &KIND O     &KIND O
- +      ! BASIS_SET 6-31G* 
 +      ! POTENTIAL ALL
       LEBEDEV_GRID 80       LEBEDEV_GRID 80
       RADIAL_GRID 200       RADIAL_GRID 200
Line 256: Line 256:
 mpirun -n 4 cp2k.popt  -i water_xas_gapw.inp -o out.out & mpirun -n 4 cp2k.popt  -i water_xas_gapw.inp -o out.out &
 </code> </code>
-It should take about half an hour to run this job so while waiting for  +Check the output file as it's being written. You should notice that after the first SCF cycle, where the wavefunction is optimized, 
-this, let us calculate the XAS spectra for ice. At the end of the tutorial we+there are a number of SCF loops where CP2K is performing the XAS simulation, see for instance in the output 
 +''XAS_TP_SCF WAVEFUNCTION OPTIMIZATION''
 +It should take about half an hour to run this job so while waiting, 
 +let us calculate the XAS spectra for ice. At the end of the tutorial we
 will try to compare the water and ice spectra. will try to compare the water and ice spectra.
  
Line 263: Line 266:
  
 Go to the directory ''gapw_ice1h_xas'' Go to the directory ''gapw_ice1h_xas''
-Run the XAS simulation using only 2 cores (there is no need to edit the input file this time).+Run the XAS simulation using only 2 cores. There is no need to edit the input file this time.
  
 The spectrum calculation for ice should be quicker because there is no need to average it over The spectrum calculation for ice should be quicker because there is no need to average it over
-many different molecules. After finishing you should see several files called ''ice1h-xas_at*.spectrum'', which+many different molecules. After this calculation is finished you should see several files called ''ice1h-xas_at*.spectrum'', which
 contain the bare XAS spectra. In the first column there is the index of the virtual KS state, the second column is  contain the bare XAS spectra. In the first column there is the index of the virtual KS state, the second column is 
 the transition energy, the third, fourth and fifth column are the transition probabilities projected onto the transition energy, the third, fourth and fifth column are the transition probabilities projected onto
Line 284: Line 287:
 </code> </code>
  
-Now run the execute the following command to convolute the spectra of ice so we can compare it to +Now run the following command to convolute the spectrum so we can compare it to 
-previous calculations and NEXAFS experiments:+previously published calculations and NEXAFS experiments for ice 1h:
 <code> <code>
-../../LIB_TOOLS/get_average_spectrum.sh+../LIB_TOOLS/get_average_spectrum.sh
 </code> </code>
  
Line 294: Line 297:
 plot "./spectrum.inp" using 2:6 with l,  "./spectrum.out" using 1:5 with l plot "./spectrum.inp" using 2:6 with l,  "./spectrum.out" using 1:5 with l
 </code> </code>
 +
 +**Question:**
  
 How do your results for the convoluted spectrum compare with previous experiments and simulations? How do your results for the convoluted spectrum compare with previous experiments and simulations?
-Look for instance at the Bottom of Fig.2 of the papers [[doi>http://dx.doi.org/10.1063/1.2928842]] +Look for instance at the bottom of Fig.2 of the papers [[doi> 10.1063/1.2928842]] 
-or Fig 2 of [[doi>http://dx.doi.org/10.1063/1.1879752]].+or Fig 2 of [[doi> 10.1063/1.1879752]].
 There should be several things that do not match with our calculations. There should be several things that do not match with our calculations.
 Apart from a shift towards larger binding energies compared with the two papers, Apart from a shift towards larger binding energies compared with the two papers,
Line 321: Line 326:
 </code> </code>
  
-  * Compare the spectra between each other and with the paper [[doi>http://dx.doi.org/10.1063/1.2928842]] where the spectra for both ice 1h and single water snapshots have been calculated. +  * Compare the spectra between each other and with the paper [[doi>10.1063/1.2928842]] where the spectra for both ice 1h and single water snapshots have been calculated. 
- +  * Fig.5 of this review [[doi>10.1021/acs.chemrev.5b00672]] also shows a comparison between recent ice and liquid water spectra. Can you clearly identify the  pre-, main- and post-edge features in the bulk water spectra and in ice?
-  * Fig.5 of this review [[doi>10.1021/acs.chemrev.5b00672]] shows a comparison between recent ice and liquid water spectra. +
-  * Can you now clearly identify the  pre-, main- and post-edge features in the bulk water spectra and in ice?+
   * What is the main reason for the different shapes between water and ice?   * What is the main reason for the different shapes between water and ice?
   * If our results do not match well with previously published experimental or the simulation data, could you think of possible reasons for the discrepancy?   * If our results do not match well with previously published experimental or the simulation data, could you think of possible reasons for the discrepancy?
exercises/2017_uzh_cp2k-tutorial/gapw.1499330277.txt.gz · Last modified: 2020/08/21 10:15 (external edit)