User Tools

Site Tools


exercises:2016_uzh_cmest:electronic_structure_dft

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:2016_uzh_cmest:electronic_structure_dft [2016/10/06 14:02] tmuellerexercises:2016_uzh_cmest:electronic_structure_dft [2020/08/21 10:15] (current) – external edit 127.0.0.1
Line 4: Line 4:
  
  
-===== 1. Step: Changing the method in the configuration file =====+===== 1. Step: Running a DFT calculation =====
  
 Create a new directory for this exercise and create an input input file using the following content: Create a new directory for this exercise and create an input input file using the following content:
Line 19: Line 19:
   &DFT   &DFT
     BASIS_SET_FILE_NAME  BASIS_SET     BASIS_SET_FILE_NAME  BASIS_SET
-    POTENTIAL_FILE_NAME  GTH_POTENTIALS+    POTENTIAL_FILE_NAME  POTENTIAL
  
     &POISSON                    ! Solver requested for non periodic calculations     &POISSON                    ! Solver requested for non periodic calculations
Line 83: Line 83:
 $ cd $CP2K_DATA_DIR $ cd $CP2K_DATA_DIR
 $ less BASIS_SET $ less BASIS_SET
-$ less GTH_POTENTIALS+$ less POTENTIAL
 </code> </code>
  
Line 111: Line 111:
 </code> </code>
  
 +Now return to the previous (exercise) directory (''$ cd -'' brings you back to the previous directory) and run the simulation.
 +Compare the energy calculated using DFT-LDA (''$ grep 'ENERGY|' ethene_LDA.out'') to the one calculated in the last exercise using Hartree-Fock. What do you observe? What does that mean?
 +
 +===== 2. Step: Selecting different functionals =====
 +
 +LDA is fast, but seldom very accurate. This is why there are improved functionals and one class are the Generalized Gradient Approximation (**GGA**) functionals.
 +
 +Two prominent implementations of GGA functionals are:
 +
 +  * Perdew-Burke-Ernzerhof (**PBE**)
 +  * Becke-Lee-Yang-Parr (**BLYP**)
 +
 +When changing the functional, one usually also has to change the pseudopotential to one optimized for the usage with this functional, while the right basis set is selected based on the selected pseudopotential.
 +
 +Change the input file given above for LDA to run the same calculation once using PBE and once using BLYP:
 +
 +  - Change the parameter for the ''XC_FUNCTIONAL'' section to either PBE or BLYP
 +  - Update the ''POTENTIAL'' to ''GTH-PBE-q?'' or ''GTH-BLYP-q?'' for each ''KIND''
 +  - Set the ''BASIS_SET'' to ''DZVP-MOLOPT-GTH'' for each ''KIND'' (the same for PBE and BLYP)
 +  - Since the so-called //MOLOPT// basis sets are in a separate file, you also have to set the value for the ''BASIS_SET_FILE_NAME'' to ''BASIS_MOLOPT''
 +
 +Using the following command you can measure the total time for a simulation in //minutes:seconds//:
 +
 +<code>
 +$ TIME=%E time cp2k.sopt -i ethene_LDA.inp -o ethene_LDA.out
 +0:09.34
 +</code>
 +
 +Measure the time and the energy for LDA, PBE and BLYP. How do they compare?
 +
 +
 +===== 3. Step: Convergence with regard to the basis set =====
 +
 +As has been said in the lectures, the methods we are employing here are in principal exact. But to make calculations feasible we have to truncate the number of basis functions. This is why when you make calculations which should give accurate numbers you will have to prove that you have employed a basis set large enough such that the result does not change anymore when going to a larger basis.
 +
 +Update the input file from the previous for PBE to run the simulation and collect the timings once for the following basis sets (for both kinds):
 +
 +  * SZV-MOLOPT-GTH
 +  * DZVP-MOLOPT-GTH
 +  * TZVP-MOLOPT-GTH
 +  * TZV2P-MOLOPT-GTH
 +  * TZV2PX-MOLOPT-GTH
 +
 +For each output, look for the ''Number of independent orbital functions'' entry (besides the energy) in the output file.
 +
 +Create two plots:
 +
 +  * total energy vs number of independent orbital functions
 +  * time in seconds vs number of independent orbital functions
exercises/2016_uzh_cmest/electronic_structure_dft.1475762547.txt.gz · Last modified: 2020/08/21 10:15 (external edit)