User Tools

Site Tools


exercises:2018_ethz_mmm:bf3

Differences

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

Link to this comparison view

Next revision
Previous revision
exercises:2018_ethz_mmm:bf3 [2018/03/16 11:17] – created dpasseroneexercises:2018_ethz_mmm:bf3 [2020/08/21 10:15] (current) – external edit 127.0.0.1
Line 7: Line 7:
  
 {{ :exercises:2018_ethz_mmm:screen_shot_2018-03-16_at_12.15.37.png |}} {{ :exercises:2018_ethz_mmm:screen_shot_2018-03-16_at_12.15.37.png |}}
-and this is the pictorial view in the gas phase: 
-{{ :exercises:2017_ethz_mmm:screen_shot_2017-04-27_at_18.50.10.png?nolink&600 |}} 
  
-In the supplementary material of the paper, which can be found [[http://www.rsc.org/suppdata/c6/ra/c6ra08509a/c6ra08509a1.pdf|here]], several calculation with different methods ranging from DFT to hybrid methods to high-level methods are described, together with the basis set dependence of the results.   
- 
- 
-We will compare our results with the published ones. 
  
 The input file structure is shown below: The input file structure is shown below:
  
 <code cp2k> <code cp2k>
 +&FORCE_EVAL                           ! This section defines method for calculating energy and forces
  
 +   METHOD Quickstep                   ! Electronic structure method (DFT,...)
    &DFT    &DFT
 +    &SCF
 +      SCF_GUESS RESTART
 +    &END
       &POISSON                        ! Solver requested for non periodic calculations       &POISSON                        ! Solver requested for non periodic calculations
          PERIODIC NONE          PERIODIC NONE
Line 25: Line 24:
       &END POISSON       &END POISSON
       &QS                             ! Parameters needed to set up the Quickstep framework       &QS                             ! Parameters needed to set up the Quickstep framework
-         METHOD GAPW                  ! Method: gaussian and augmented plane waves+         METHOD GAPW                  ! Method: gaussian and augmented plane waves 
       &END QS       &END QS
 +   
 # #
 # Include the exchange and correlation information # Include the exchange and correlation information
 # #
-@INCLUDE './pbe.inc'+@INCLUDE './hf.inc'
  
 +   &PRINT
 +      &E_DENSITY_CUBE
 +       FILENAME _SCALE_
 +      &END
 +      &MO_CUBES
 +           FILENAME _SCALE_
 +           NHOMO 5
 +           NLUMO 4
 +      &END MO_CUBES
 +   &END PRINT
    &END DFT    &END DFT
  
Line 39: Line 48:
       &CELL                           ! Unit cell set up       &CELL                           ! Unit cell set up
          PERIODIC NONE                ! Non periodic calculation          PERIODIC NONE                ! Non periodic calculation
-         ABC 10 10 10                 ! Lengths of the cell vectors A, B, and C+         ABC 10 10 10
       &END CELL       &END CELL
-      &COORD                          ! This section specify all the atoms and their coordinates 
-  H         2.5558925119        4.9201502245        3.9999999733 
-  H         2.5617214834        3.0599837703        4.0000000267 
-  C         3.3235178526        3.9916405319        4.0000000002 
-  C         4.6493228423        3.9951429630        3.9999999995 
-  H         5.4118318595        4.9261779106        4.0000000269 
-  H         5.4167134504        3.0669045998        3.9999999735 
-      &END COORD 
       &TOPOLOGY       &TOPOLOGY
 +        COORD_FILE_NAME BF3.xyz 
 +        COORD_FILE_FORMAT XYZ
           &CENTER_COORDINATES           &CENTER_COORDINATES
           &END           &END
       &END TOPOLOGY       &END TOPOLOGY
  
-      &KIND                                      ! potential and basis for H +      &KIND                                      ! potential and basis for  
-         &BASIS +         &BASIS    
-@INCLUDE './H_631Gdp.inc' +@INCLUDE './B_631GX.inc' 
-         &END+         &END                      
          POTENTIAL ALL          POTENTIAL ALL
          &POTENTIAL          &POTENTIAL
-                0 +        1    0 
-          0.20000000    0 +     0.43392956    0 
-         &END+         &END 
       &END KIND       &END KIND
-      &KIND                         ! potential and basis for C+      &KIND                         ! potential and basis for F
          &BASIS          &BASIS
-@INCLUDE './C_631Gdp.inc'+@INCLUDE './F_631GX.inc'
          &END          &END
          POTENTIAL ALL          POTENTIAL ALL
          &POTENTIAL          &POTENTIAL
-            4       0 +     4       0 
-            0.34883045    0+     0.21852465    0
          &END          &END
       &END KIND       &END KIND
Line 79: Line 82:
 &GLOBAL                             ! Section with general information regarding which kind of simulation to perform an parameters for the whole PROGRAM &GLOBAL                             ! Section with general information regarding which kind of simulation to perform an parameters for the whole PROGRAM
    PRINT_LEVEL LOW                  ! Global print level    PRINT_LEVEL LOW                  ! Global print level
-   PROJECT c2h4                     ! Name of the project. This word will appear as part of a name of all ouput files (except main ouput file, specified with -o option) +   PROJECT BF3                     ! Name of the project. This word will appear as part of a name of all ouput files (except main ouput file, specified with -o option) 
-   RUN_TYPE GEO_OPT                 ! Geometry optimization+   RUN_TYPE ENERGY                 ! Energy run
 &END GLOBAL &END GLOBAL
-                                                                                                       +                                                                                          
 </code> </code>
  
-The exercise is executed on the ''hypatia'' cluster. The instructions to connect are found [[exercises:2017_ethz_mmm:replica_2017|here]]. After creating a directory as usual, you can copy the files from the following location: +As usual, you can take the tar file of the exercise directory at the 
-<note tip>~psd/Exercise_8/</note>+[[https://polybox.ethz.ch/index.php/s/whsWaAlvLQFCpGk|following link]]. 
 +Copy it to the directory **$HOME/EXERCISES** and untar it: <code>tar xvf exercise_4.tar</code>
  
-Copy the files to the created directory in the ''/mnt/project/yourusername/'' path. 
-<note tip> 
-In the directory you will find the following files: 
-  * ''h2o.inp'' for the geometry optimization of water 
-  * ''ethanol.inp'' for the geometry optimization of ethanol 
-  * ''ethylene.inp'' for the geometry optimization of ethylene (ethene) 
-  * ''run'' to launch the jobs to the queue 
-  * several ''*.inc'' file describing the level of theory (exchange and/or correlation functional) and the basis sets. 
-</note> 
  
-The command to launch the job is 
-<note important>> qsub run -v INP=file </note> 
-where file.inp has to be replaced by the relevant prefix of the input file (example: ''h2o''). 
-In the ''*.xyz'' files you can look for the final energies by the following command: 
-<note important>> grep i c2h6o-pos-1.xyz  </note>. 
-This will list all the energies. Pick the last one for the optimized structure. You can also visualize it with vmd. 
  
-You will run the calculation by changing in **ALL THREE INPUT FILES** the ''@INCLUDE'' lines, in the following way: + 
-At the line concerning the exchange and correlation potential, you prescribe the level of theory: +Copy the files to the created directory in your exercise path. 
-<note important>   +<note tip> 
-  * hf.inc for Hartree-Fock +In the directory you will find the following files
-  * pbe.inc for DFT/PBEwith gradient corrected local density +  * ''BF3.0.inp'' for the calculation of the orbitals (this is only a template file) 
-  * b3lyp.inp for hybrid functional containing a percentage of exact exchange+  * ''compute_bf3_expand'' to transform the input file and the input geometryand then launch the job + drawing the orbitals  
 +  * several ''*.inc'' file describing the level of theory (exchange and correlation functional) and the basis sets.
 </note> </note>
  
-When you are done with the three levels of theory, then you can redo the exercise with the larger basis set, and change EVERYWHERE in the input file the instances of ''H_631Gdp.inc'' to ''H_6311++G2d2p.inc'' and the same for the O_* and C_* instances+The operations are performed by the following bash script: 
-Redo the calculations with the three levels ''pbe'', ''b3lyp'' and ''hf''.+<code bash> 
 +. /usr/bin/m_functions.bash 
 +a=$1 
 +  m_xyzrescale $a < BF3.opt.xyz > BF3.xyz 
 +  cp BF3.xyz BF3.$a.xyz 
 +  m_replace _SCALE_ $a < BF3.0.inp > BF3.$a.inp 
 +  cp2k.ssmp -i BF3.$a.inp  > BF3.$a.out 
 +   
 +  mkdir ORB_$a 
 +  for b in 12 13 14 15 16  
 +     do  
 +       c=$[16-$b] 
 +       vmd BF3-"$a"-WFN_000"$b"_1-1_0.cube -e orb.vmd 
 +       ST=HOMO-"$c" 
 +       convert out.tga -gravity South -background YellowGreen -splice 0x18 -annotate +0+2  $ST out1.tga 
 +       mv out1.tga ORB_$a/$ST.tga 
 +     done 
 +   
 +  for c in 17 18 19 20 
 +     do  
 +       d=$[$c-17] 
 +       vmd BF3-"$a"-WFN_000"$c"_1-1_0.cube -e orb.vmd >& vmd.log 
 +       ST=LUMO+"$d" 
 +       convert out.tga -gravity South -background YellowGreen -splice 0x18 -annotate +0+2  $ST out1.tga 
 +       mv out1.tga ORB_$a/$ST.tga 
 +     done 
 +   vmd BF3-"$a"-ELECTRON_DENSITY-1_0.cube -e dens.vmd >& vmd.log 
 +   convert dens.tga -gravity South -background YellowGreen -splice 0x18 -annotate +0+2  'ELECTRON DENSITYdens1.tga
    
-<note warning> +   mv dens1.tga ORB_$a/dens1.tga 
-Assignments: +   montage ORB_$a/*tga -geometry 800x600 ORB_$a/all_$a.jpg 
-  - Compute the reaction energy for the dehydration reaction of ethanol +   mv BF3-"$a"*.cube ORB_$a/ 
-  - Prepare table with rows and columns: on the rows the level of theory, on the columns the basis set (3x2 table) +   
-  - Compare the results with the published ones (note the conversion factors. You can use the tool at [[http://www.colby.edu/chemistry/PChem/Hartree.html|Energy converter]] +    
-  Comment on the dependence on the basis set and on the level of theory (hint: this also need the next theory lecture) + rm *bak* 
-  - Is this information enough to determine the rates of reaction? Why? +
-</note>+
  
 +</code>
  
-=== BONUS TRACK === 
  
-<note tip>We may be interested in the visualisation of the electronic density. Copy the ''ethanol.inp'' into ''ethanol_dens.inp''.</note>+The command to launch the job with an expansion factor of ALPHA (**replace it with the required factor**) 
 +<code> ./compute_bf3_expand ALPHA</code>
  
-Add the following sections: +<note important
-**under &DFT** +Assignments: 
-<code cp2k+  - Run the script with ALPHA=1.0 (meaning: no expansion of the molecule) 
-       &PRINT  +  - Look into the BF3.ALPHA.out file to verify the energies of the occupied and unoccupied orbitals: do you see degenerate orbitals (with the same energy) 
-          &E_DENSITY_CUBE +  - What is the homo-lumo gap (distance between highest occupied and lowest unoccupied orbital (rememberit is in Hartree --- write it in eV 
-          &END +  - The script produces a directory ORB_ALPHA with the orbitals and the densityCompare the orbitals what the illustration above. 
-       &END       +  Repeat the job with ALPHA=2.5 
-       &SCF +  - What do you observe in the plots? Which differences? Why? 
-          SCF_GUESS RESTART +</note>
-       &END +
-</code> +
-This tells to read the old wavefunction and to print the cubefile of the density. +
- +
-At the end of the input file+
-<code cp2k> +
-&EXT_RESTART +
-     RESTART_FILE_NAME ./c2h6o-1.restart +
-&END +
-</code>+
  
-Then, change ''RUN_TYPE GEO_OPT'' to ''RUN_TYPE ENERGY'' to only run a single point calculation. It will generate a cubefile with the density which you may visualize with VMD. 
  
exercises/2018_ethz_mmm/bf3.1521199036.txt.gz · Last modified: 2020/08/21 10:15 (external edit)