User Tools

Site Tools


howto:gw

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
Next revisionBoth sides next revision
howto:gw [2021/04/21 19:58] jwilhelmhowto:gw [2023/10/18 18:00] – [5. GW for 2D materials: Example monolayer MoS2] jwilhelm
Line 3: Line 3:
 The purpose of this section is to explain how to compute the energy of molecular orbitals/bands from GW for molecules/condensed phase systems with CP2K. In DFT, the energy of a molecular orbital corresponds to an eigenvalue of the Kohn-Sham matrix. In GW, the procedure for getting the level energies is to first perform a DFT calculation (commonly with the PBE or PBE0 functional) to get the molecular orbital wavefunctions and then compute a new GW energy for the molecular orbitals of interest. For an introduction into the concept of GW, please have a look at [[doi>10.3389/fchem.2019.00377]] or read Sec. II and the introduction to Sec. III in [[doi>10.1103/PhysRevB.87.235132]]. The purpose of this section is to explain how to compute the energy of molecular orbitals/bands from GW for molecules/condensed phase systems with CP2K. In DFT, the energy of a molecular orbital corresponds to an eigenvalue of the Kohn-Sham matrix. In GW, the procedure for getting the level energies is to first perform a DFT calculation (commonly with the PBE or PBE0 functional) to get the molecular orbital wavefunctions and then compute a new GW energy for the molecular orbitals of interest. For an introduction into the concept of GW, please have a look at [[doi>10.3389/fchem.2019.00377]] or read Sec. II and the introduction to Sec. III in [[doi>10.1103/PhysRevB.87.235132]].
  
-The GW implementation in CP2K is based on the developments described in [[doi>10.1021/acs.jctc.6b00380]]. The computational cost of GW is comparable to RPA and MP2 total energy calculations and therefore high. The computational cost of a canonical GW implementation grows as $N^4$ with the system size $N$, while the memory scales as $N^3$ with the system size. The basis set convergence of GW is slow and therefore has to be carefully examined.  +The GW implementation in CP2K is based on the developments described in [[doi>10.1021/acs.jctc.6b00380]]. The computational cost of GW is comparable to RPA and MP2 total energy calculations and therefore high. The computational cost of a canonical GW implementation grows as $N^4$ with the system size $N$, while the memory scales as $N^3$ with the system size. The basis set convergence of GW is slow and therefore has to be carefully examined.
- +
-In this tutorial, GW values from the GW100 benchmark set [[doi>10.1021/acs.jctc.5b00453]] are reproduced (Section 1), the basis set extrapolation is examined for the water molecule (Section 2), an input for large-scale, parallel calculations is given (Section 3), periodic GW calculations are presented [[doi>10.1103/PhysRevB.95.235123]] (Section 4), and cubic-scaling GW calculations are shown which can be more efficient for systems with hundrets of atoms (Section 5) [[doi>10.1021/acs.jpclett.7b02740]].+
  
 Since the calculations are rather small, please use a single MPI rank for the calculation: Since the calculations are rather small, please use a single MPI rank for the calculation:
Line 14: Line 12:
  
 ===== 1. Reproducing values from the GW100 set ===== ===== 1. Reproducing values from the GW100 set =====
-See below the input for a G0W0@PBE calculation of the water molecule in a def2-QZVP basis: A PBE calculation is used for computing the molecular orbitals which can be seen from the keyword "XC_FUNCTIONAL PBE". The input parameters for G0W0 are commented below. While the calculation is running, you can look up the G0W0@PBE value for the highest occupied molecular orbital (HOMO) and the lowest unoccupied molecular orbital (LUMO) in [[doi>10.1021/acs.jctc.5b00453]] [6] [Table 2 and 3 (column AIMS-P16/TM-no RI, molecule index 76) which should be -11.97 eV and 2.37 eV for HOMO and LUMO, respectively]. CP2K should be able to exactly reproduce these values. In the output of CP2K, the G0W0@PBE results are listed after the SCF after the headline //GW quasiparticle energies//.  +See below the input for a G0W0@PBE calculation of the water molecule in a def2-QZVP basis: A PBE calculation is used for computing the molecular orbitals which can be seen from the keyword "XC_FUNCTIONAL PBE". The input parameters for G0W0 are commented below. While the calculation is running, you can look up the G0W0@PBE value for the highest occupied molecular orbital (HOMO) and the lowest unoccupied molecular orbital (LUMO) in [[doi>10.1021/acs.jctc.5b00453]] [Table 2 and 3 (column AIMS-P16/TM-no RI, molecule index 76) which should be -11.97 eV and 2.37 eV for HOMO and LUMO, respectively]. CP2K should be able to exactly reproduce these values. In the output of CP2K, the G0W0@PBE results are listed after the SCF after the headline //GW quasiparticle energies//.  
  
-The G0W0@PBE HOMO value is not in good agreement with the experimental ionization potential of water (12.62 eV). A possible explanation is that PBE may not be a good starting point for G0W0 calculations for molecules in the gas phase, see e.g. [[doi>10.1021/ct300835h]] [8]. For checking the basis set convergence, we refer to a detailed analysis in [[doi>10.1021/acs.jctc.6b00380]] [2] in Fig. 2 for benzene. An extensive table of basis set extrapolated GW levels can be found in [[doi>10.1021/acs.jctc.5b00453]] [6] (column EXTRA).+For checking the basis set convergence, we refer to a detailed analysis in [[doi>10.1021/acs.jctc.6b00380]] in Fig. 2 for benzene. An extensive table of basis set extrapolated GW levels can be found in [[doi>10.1021/acs.jctc.5b00453]] (column EXTRA).
 <code - H2O_GW100.inp> <code - H2O_GW100.inp>
 &FORCE_EVAL &FORCE_EVAL
Line 45: Line 43:
       ! GW is part of the WF_CORRELATION section       ! GW is part of the WF_CORRELATION section
       &WF_CORRELATION       &WF_CORRELATION
-        ! RPA is used to compute the density response function 
-        METHOD RI_RPA_GPW 
-        ! Use Obara-Saika integrals instead of GPW integrals  
-        ! since OS is much faster 
-        ERI_METHOD OS 
         &RI_RPA         &RI_RPA
-          ! use 100 quadrature points to perform the  +          ! use 100 points to perform the frequency integration in GW 
-          ! frequency integration in GW +          QUADRATURE_POINTS 100 
-          RPA_NUM_QUAD_POINTS 100 +          ! SIZE_FREQ_INTEG_GROUP is a group size for parallelization and
-          ! SIZE_FREQ_INTEG_GROUP is a group size for parallelization and +
           ! should be increased for large calculations to prevent out of memory.           ! should be increased for large calculations to prevent out of memory.
           ! maximum for SIZE_FREQ_INTEG_GROUP is the number of MPI tasks           ! maximum for SIZE_FREQ_INTEG_GROUP is the number of MPI tasks
-          SIZE_FREQ_INTEG_GROUP 1 +          &GW 
-          GW +           ! compute the G0W0@PBE energy of HOMO-9, 
-          &RI_G0W0 +           ! HOMO-8, ... , HOMO-1, HOMO
-           ! compute the G0W0@PBE energy of HOMO-9,  +
-           ! HOMO-8, ... , HOMO-1, HOMO +
            CORR_OCC   10            CORR_OCC   10
-           ! compute the G0W0@PBE energy of LUMO, +           ! compute the G0W0@PBE energy of LUMO,
            ! LUMO+1, ... , LUMO+20            ! LUMO+1, ... , LUMO+20
            CORR_VIRT  20            CORR_VIRT  20
-           ! fit a Pade approximant to the correlation self-energy  
-           ! as function of imaginary frequency. this has been done  
-           ! in the GW100 benchmark set and turned out to be reliable 
-           ANALYTIC_CONTINUATION PADE 
-           ! for solving the quasiparticle equation, the Newton method 
-           ! is used as in the GW100 benchmark 
-           CROSSING_SEARCH NEWTON 
            ! use the RI approximation for the exchange part of the self-energy            ! use the RI approximation for the exchange part of the self-energy
            RI_SIGMA_X            RI_SIGMA_X
-          &END RI_G0W0+          &END GW
         &END RI_RPA         &END RI_RPA
-        ! NUMBER_PROC is a group size for parallelization and should  
-        ! be increased for large calculations 
-        NUMBER_PROC 1 
       &END       &END
     &END XC     &END XC
Line 99: Line 79:
     &KIND H     &KIND H
       ! def2-QZVP is the basis which has been used in the GW100 paper       ! def2-QZVP is the basis which has been used in the GW100 paper
-      BASIS_SET def2-QZVP +      BASIS_SET        def2-QZVP 
-      ! just use a very large RI basis to ensure excellent +      ! just use a very large RI basis to ensure excellent
       ! convergence with respect to the RI basis       ! convergence with respect to the RI basis
-      RI_AUX_BASIS RI-5Z+      BASIS_SET RI_AUX RI-5Z
       POTENTIAL ALL       POTENTIAL ALL
     &END KIND     &END KIND
     &KIND O     &KIND O
-      BASIS_SET def2-QZVP +      BASIS_SET        def2-QZVP 
-      RI_AUX_BASIS RI-5Z+      BASIS_SET RI_AUX RI-5Z
       POTENTIAL ALL       POTENTIAL ALL
     &END KIND     &END KIND
Line 117: Line 97:
   PRINT_LEVEL  MEDIUM   PRINT_LEVEL  MEDIUM
 &END GLOBAL &END GLOBAL
 +
 </code> </code>
  
Line 130: Line 111:
 <code> <code>
 &KIND H &KIND H
-  BASIS_SET cc-DZVP-all +  BASIS_SET        cc-DZVP-all 
-  RI_AUX_BASIS RI-5Z+  BASIS_SET RI_AUX RI-5Z
   POTENTIAL ALL   POTENTIAL ALL
 &END KIND &END KIND
 &KIND O &KIND O
-  BASIS_SET cc-DZVP-all +  BASIS_SET        cc-DZVP-all 
-  RI_AUX_BASIS RI-5Z+  BASIS_SET RI_AUX RI-5Z
   POTENTIAL ALL   POTENTIAL ALL
 &END KIND &END KIND
Line 159: Line 140:
 </code> </code>
  
-For the extrapolation, two schemes have been used as described in the GW100 paper and its supporting information [[doi>10.1021/acs.jctc.5b00453]] [6]. +For the extrapolation, two schemes have been used as described in the GW100 paper and its supporting information [[doi>10.1021/acs.jctc.5b00453]]. 
 The first scheme employs a linear fit on the HOMO or LUMO values when they are plotted against the inverse cardinal number $N_\text{card}$ of the basis set while the second scheme extrapolates versus the inverse number of basis functions $N_\text{basis}$ which can be computed as sum of the number of occupied orbitals and the number of virtual orbitals as printed in RI_INFO in the output.  The first scheme employs a linear fit on the HOMO or LUMO values when they are plotted against the inverse cardinal number $N_\text{card}$ of the basis set while the second scheme extrapolates versus the inverse number of basis functions $N_\text{basis}$ which can be computed as sum of the number of occupied orbitals and the number of virtual orbitals as printed in RI_INFO in the output. 
 You can check the extrapolation from the table above with your tool of choice. You can check the extrapolation from the table above with your tool of choice.
  
-The basis set extrapolated values from the table above deviate from the values reported in the GW100 paper [[doi>10.1021/acs.jctc.5b00453]] [6], probably because only two basis sets (def2-TZVP, def2-QZVP) have been used in [[doi>10.1021/acs.jctc.5b00453]] [6] for the extrapolation. The extrapolation for the LUMO is not working well because one would need much more diffuse functions to represent unbound electronic levels (with positive energy). +The basis set extrapolated values from the table above deviate from the values reported in the GW100 paper [[doi>10.1021/acs.jctc.5b00453]], probably because only two basis sets (def2-TZVP, def2-QZVP) have been used in [[doi>10.1021/acs.jctc.5b00453]] for the extrapolation. The extrapolation for the LUMO is not working well because one would need much more diffuse functions to represent unbound electronic levels (with positive energy). 
  
-Often, the HOMO-LUMO gap is of interest. In this case, augmented basis sets (e.g. from the EMSL database) can offer an alternative for very fast basis set convergence, see also Fig. 2b in [[doi>10.1021/acs.jctc.6b00380]] [2].+Often, the HOMO-LUMO gap is of interest. In this case, augmented basis sets (e.g. from the EMSL database) can offer an alternative for very fast basis set convergence, see also Fig. 2b in [[doi>10.1021/acs.jctc.6b00380]].
 ===== 3. Input for large-scale calculations ===== ===== 3. Input for large-scale calculations =====
 An exemplary input for a parallel calculation can be found in the supporting information of [[doi>10.1021/acs.jctc.6b00380]] [2]. The emphasis is on the parameters SIZE_FREQ_INTEG_GROUP and NUMBER_PROC which should be increased for larger calculations. In case of a too small number, the code will crash due to out of memory while a too large number results in slow speed. Typically, one starts for large-scale calculations from a small molecule. When increasing the system size, the parameters SIZE_FREQ_INTEG_GROUP and NUMBER_PROC should be both increased to avoid a crash due to out of memory. The maximum number for both parameters is the number of MPI tasks. Also, the number of nodes should be increased with $N^3_\text{atoms}$ to account for the scaling of the memory of GW.  An exemplary input for a parallel calculation can be found in the supporting information of [[doi>10.1021/acs.jctc.6b00380]] [2]. The emphasis is on the parameters SIZE_FREQ_INTEG_GROUP and NUMBER_PROC which should be increased for larger calculations. In case of a too small number, the code will crash due to out of memory while a too large number results in slow speed. Typically, one starts for large-scale calculations from a small molecule. When increasing the system size, the parameters SIZE_FREQ_INTEG_GROUP and NUMBER_PROC should be both increased to avoid a crash due to out of memory. The maximum number for both parameters is the number of MPI tasks. Also, the number of nodes should be increased with $N^3_\text{atoms}$ to account for the scaling of the memory of GW. 
  
-===== 4. Periodic GW calculations ===== +===== 4. Self-consistent GW calculations and DFT starting point =====
-For periodic GW calculations, a special correction scheme is necessary. A similar problem is appearing in Hartree-Fock calculations. In HF, an easy way out is given by the truncation of the Coulomb operator which works due to the convenient form of the HF equations. GW does not exhibit this convenient form and therefore, this truncation does not work for GW calculations. The theory why a correction is necessary and the correction scheme is described in [[doi>10.1103/PhysRevB.95.235123]] [7].+
  
-The basis can be found in {{exercises:2017_uzh_cp2k-tutorial:LiH_BASIS_RI.tar ?direct&400 |}}. Then run the calculation as listed belowThe computed gap of LiH with the input from below should be 6.05 eV which is still significantly off from the converged result of 4.7 eV from [[doi>10.1103/PhysRevB.95.235123]] [7]. Here, a basis set extrapolation (as shown above) and a larger supercell are necessary to get closer to the result of 4.7 eV. Please redo the calculation without the flag PERIODIC in the GW section and see that the resulting gap of 11.25 eV is much more off than the gap with correction+The G0W0@PBE HOMO value of the H2O molecule (~ -12.0 eV) is not in good agreement with the experimental ionization potential (12.62 eV). Benchmarks on molecules and solids indicate that self-consistency of eigenvalues in the Green's function G improves the agreement between the GW calculation and experimentThis scheme is called GW0@PBE and is our favorite GW flavor so far (experience based on nano-sized aromatic molecules)You can also check [[https://www.youtube.com/watch?v=1vUuethWhbs&t=5563s|this video]] or [[doi>10.3389/fchem.2019.00377]] on which DFT starting functional and which self-consistency scheme could be good for your system.
  
-<code - LiH_periodic.inp>+You can run GW0 calculations in CP2K by putting 
 +<code
 +&GW 
 +  SC_GW0_ITER  10 
 +  CORR_OCC     10 
 +  CORR_VIRT    20 
 +  RI_SIGMA_X 
 +&END GW 
 +</code> 
 +"SC_GW0_ITER 10" means that at most ten iterations in the eigenvalues of G are performedIn case convergence is found, the code terminates earlier. "SC_GW0_ITER 1" corresponds to G0W0. 
 + 
 +===== 5. GW for 2D materials: Example monolayer MoS2 ===== 
 +There is also a periodic GW implementation [[doi>10.48550/arXiv.2306.16066]] in CP2K that targets large cells of 2D materials, for example defects or moiré structures. 
 + 
 + 
 +For computing the G0W0@LDA quasiparticle energy levels of monolayer MoS2, please use the input file 
 +<code> 
 +&GLOBAL 
 +  PROJECT  MoS2 
 +  RUN_TYPE ENERGY 
 +&END GLOBAL
 &FORCE_EVAL &FORCE_EVAL
   METHOD Quickstep   METHOD Quickstep
   &DFT   &DFT
-    BASIS_SET_FILE_NAME ./LiH_BASIS_RI +    BASIS_SET_FILE_NAME  BASIS_PERIODIC_GW 
-    POTENTIAL_FILE_NAME POTENTIAL+    POTENTIAL_FILE_NAME  GTH_SOC_POTENTIALS 
 +    SORT_BASIS EXP
     &MGRID     &MGRID
-      CUTOFF 600 +      CUTOFF  500 
-      REL_CUTOFF 60+      REL_CUTOFF  100
     &END MGRID     &END MGRID
     &QS     &QS
       METHOD GPW       METHOD GPW
-      EPS_DEFAULT 1.0E-15 +      EPS_DEFAULT 1.0E-12 
-      EPS_PGF_ORB 1.0E-20 +      EPS_PGF_ORB 1.0E-12
-      EPS_FILTER_MATRIX 0.0e0+
     &END QS     &END QS
     &SCF     &SCF
-      EPS_SCF 1.0E-6+      SCF_GUESS RESTART 
 +      EPS_SCF 1.0E-9
       MAX_SCF 100       MAX_SCF 100
 +      &MIXING
 +          METHOD BROYDEN_MIXING
 +          ALPHA 0.1
 +          BETA 1.5
 +          NBROYDEN 8
 +      &END
     &END SCF     &END SCF
     &XC     &XC
-      &XC_FUNCTIONAL PBE+      &XC_FUNCTIONAL LDA
       &END XC_FUNCTIONAL       &END XC_FUNCTIONAL
-      &WF_CORRELATION 
-        METHOD  RI_RPA_GPW 
-        &RI_RPA 
-          RPA_NUM_QUAD_POINTS  100 
-          GW 
-          &RI_G0W0 
-           CORR_OCC  5 
-           CORR_VIRT 5 
-           ! activate the periodic correction 
-           PERIODIC 
-           ANALYTIC_CONTINUATION PADE 
-           CROSSING_SEARCH NEWTON 
-          &END RI_G0W0 
-          ! HF calculation for the exchange part of the self-energy 
-          ! Here, the truncation of the Coulomb operator works  
-          &HF 
-            &SCREENING 
-              ! for other materials, a smaller EPS_SCHWARZ might be necessary 
-              EPS_SCHWARZ 1.0E-6 
-              SCREEN_ON_INITIAL_P TRUE 
-            &END 
-            &INTERACTION_POTENTIAL 
-              POTENTIAL_TYPE TRUNCATED 
-              ! the truncation radius is half the cell size 
-              CUTOFF_RADIUS  2.00  
-              T_C_G_DATA t_c_g.dat 
-            &END 
-            &MEMORY 
-              MAX_MEMORY  0 
-            &END 
-          &END 
-        &END RI_RPA 
-        NUMBER_PROC  1 
-      &END 
     &END XC     &END XC
   &END DFT   &END DFT
 +  &PROPERTIES
 +    &BANDSTRUCTURE
 +      &DOS
 +        ! k-point mesh for the self-energy
 +        KPOINTS 2 2 1
 +      &END
 +      &GW
 +        ! for details on parameters, please consult 
 +        ! manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES/BANDSTRUCTURE/GW.html
 +        NUM_TIME_FREQ_POINTS         10
 +        MEMORY_PER_PROC               8
 +        EPS_FILTER               1.0E-6
 +      &END
 +      &SOC
 +      &END
 +    &END
 +  &END PROPERTIES
   &SUBSYS   &SUBSYS
     &CELL     &CELL
-      ABC  4.084 4.084 4.084+      ABC                 3.15 3.15 15.
 +      ALPHA_BETA_GAMMA    90 90 120 
 +        PERIODIC XY 
 +        ! the calculation is on a 9x9 supercell with 243 atoms 
 +        MULTIPLE_UNIT_CELL 9 9 1
     &END CELL     &END CELL
-    &COORD +    &TOPOLOGY 
-      Li 0 0 0 +      MULTIPLE_UNIT_CELL 9 9 1 
-      Li 2.042 2.042 0 +    &END TOPOLOGY 
-      Li 2.042 0 2.042 + 
-      Li 0 2.042 2.042 +    &KIND S 
-      H 0 2.042 0 +      BASIS_SET ORB    TZVP-MOLOPT-GTH_upscaled 
-      H 0 0 2.042 +      BASIS_SET RI_AUX RI 
-      H 2.042 0 0 +      POTENTIAL        GTH-PADE-q6
-      H 2.042 2.042 2.042 +
-    &END COORD +
-    &KIND H +
-      BASIS_SET cc-DZVP-GTH +
-      RI_AUX_BASIS_SET  RI_DZ_opt_basis +
-      POTENTIAL GTH-PBE-q1+
     &END KIND     &END KIND
-    &KIND Li + 
-      BASIS_SET cc-DZVP-GTH +    &KIND Se 
-      RI_AUX_BASIS_SET  RI_DZ_opt_basis +      BASIS_SET ORB    TZVP-MOLOPT-GTH_upscaled 
-      POTENTIAL GTH-PBE-q3+      BASIS_SET RI_AUX RI 
 +      POTENTIAL        GTH-PADE-q6
     &END KIND     &END KIND
-  &END SUBSYS 
-&END FORCE_EVAL 
-&GLOBAL 
-  PROJECT     LiH_bulk_2x2x2_DZVP 
-  PRINT_LEVEL MEDIUM 
-  RUN_TYPE ENERGY 
-&END GLOBAL 
-</code> 
  
 +    &KIND Mo
 +      BASIS_SET ORB    TZVP-MOLOPT-GTH_upscaled
 +      BASIS_SET RI_AUX RI
 +      POTENTIAL        GTH-PADE-q14
 +    &END KIND
  
-===== 5. Cubic-scaling GW calculations ===== +    &KIND W 
-Cubic-scaling GW calculations could be a more efficient alternative for large systems. See below an exemplary input for one water molecule. Compare the results to the ones from Sec. 1. In general, small deviations (< 0.05 eV) for GW levels can be expected from cubic-scaling GW calculations compared to canonical GW calculations due to additional approximations in cubic-scaling GW. +      BASIS_SET ORB    TZVP-MOLOPT-GTH_upscaled 
 +      BASIS_SET RI_AUX RI 
 +      POTENTIAL        GTH-PADE-q14 
 +    &END KIND
  
-Please observe that the input below is much slower than the input for canonical GW. Therefore, it can be beneficial to run it with more MPI tasks. The beneficial scaling of cubic-scaling GW only pays off for large systems where it is more efficient as canonical GW calculations (rule of thumb: cubic-scaling GW can be more efficient for systems with more than 100 atoms if the filter parameters are well set).  
- 
-<code - H2O_GW100_cubic_scaling.inp> 
-&FORCE_EVAL 
-  METHOD Quickstep 
-  &DFT 
-    ! retrieve basis set from the CP2K trunk version 
-    BASIS_SET_FILE_NAME BASIS_def2_QZVP_RI_ALL 
-    POTENTIAL_FILE_NAME POTENTIAL 
-    &MGRID 
-      CUTOFF 400 
-      REL_CUTOFF 50 
-    &END MGRID 
-    &QS 
-      ! all electron calculation since GW100 is all-electron test 
-      METHOD GAPW 
-    &END QS 
-    &POISSON 
-      PERIODIC NONE 
-      PSOLVER MT 
-    &END 
-    &SCF 
-      EPS_SCF 1.0E-6 
-      SCF_GUESS ATOMIC 
-      MAX_SCF 200 
-    &END SCF 
-    &XC 
-      &XC_FUNCTIONAL PBE 
-      &END XC_FUNCTIONAL 
-      &WF_CORRELATION 
-        METHOD RI_RPA_GPW 
-        ERI_METHOD OS 
-        ! cubic-scaling GW only works with overlap metric RI 
-        RI OVERLAP 
-        &WFC_GPW 
-          ! EPS_FILTER should be tuned for the specific application: 
-          ! the computational cost strongly depends on EPS_FILTER 
-          EPS_FILTER 1.0E-12 
-          ! EPS_GRID may be tuned since memory is weakly  
-          ! dependent on it 
-          EPS_GRID   1.0E-12 
-        &END WFC_GPW 
-        &RI_RPA 
-          ! cubic-scaling GW only works with the minimax grid  
-          ! in imag. time and frequency 
-          MINIMAX 
-          ! If the HOMO-LUMO gap of the system is small, 20  
-          ! points for the time/frequency grid should be used 
-          ! (flag RPA_NUM_QUAD_POINTS). The time and frequency grid  
-          ! are equally large. The maximum grid size is 20.  
-          ! For large-gap systems (as the water molecule), 12 points 
-          ! should be sufficient 
-          RPA_NUM_QUAD_POINTS  12 
-          ! imaginary time flag enables cubic-scaling RPA or  
-          ! GW calculations 
-          IM_TIME 
-          &IM_TIME 
-            ! EPS_FILTER_IM_TIME should be tuned for the specific  
-            ! application: the computational cost strongly  
-            ! depends on EPS_FILTER 
-            EPS_FILTER_IM_TIME 1.0E-12 
-            ! for large systems, increase GROUP_SIZE_3C   
-            ! to prevent out of memory (OOM) 
-            GROUP_SIZE_3C 1 
-            ! for extremely large systems, increase GROUP_SIZE_P  
-            ! to prevent OOM 
-            ! for very large systems, it is also recommended  
-            ! to use OMP threads to prevent OOM 
-            GROUP_SIZE_P 1 
-            ! for larger systems, MEMORY_CUT must be increased 
-            ! to prevent out of memory (OOM) 
-            MEMORY_CUT  1 
-            GW 
-          &END IM_TIME 
-          &RI_G0W0 
-           CORR_OCC   20 
-           CORR_VIRT  20 
-           ANALYTIC_CONTINUATION PADE 
-           NPARAM_PADE 16 
-           CROSSING_SEARCH NEWTON 
-           RI_SIGMA_X 
-          &END RI_G0W0 
-        &END RI_RPA 
-      &END 
-    &END XC 
-  &END DFT 
-  &SUBSYS 
-    &CELL 
-      ABC 10.0 10.0 10.0 
-      PERIODIC NONE 
-    &END CELL 
     &COORD     &COORD
-      O  0.0000 0.0000 0.0000 +        Mo     0.00000    1.81865    3.07500 
-      H  0.7571 0.0000 0.5861 +             0.00000    3.63731    1.48830 
-      H -0.7571 0.0000 0.5861+             0.00000    3.63731    4.66170
     &END COORD     &END COORD
-    &TOPOLOGY 
-      &CENTER_COORDINATES 
-      &END 
-    &END TOPOLOGY 
-    &KIND H 
-      BASIS_SET def2-QZVP 
-      RI_AUX_BASIS RI-5Z 
-      POTENTIAL ALL 
-    &END KIND 
-    &KIND O 
-      BASIS_SET def2-QZVP 
-      RI_AUX_BASIS RI-5Z 
-      POTENTIAL ALL 
-    &END KIND 
   &END SUBSYS   &END SUBSYS
 &END FORCE_EVAL &END FORCE_EVAL
-&GLOBAL 
-  RUN_TYPE     ENERGY 
-  PROJECT      ALL_ELEC 
-  PRINT_LEVEL  MEDIUM 
-&END GLOBAL 
 </code> </code>
 +Running the input file requires access to a large computer (the calculation took 2.5 hours on 32 nodes on Noctua2 cluster in Paderborn). You find the input and output files here: 
 +
 +https://github.com/JWilhelm/GW_input_MoS2_9x9_cell
 +
 +The quasiparticle levels are printed to the files SCF_and_G0W0_band_structure_for_kpoint_xyz. 
 +
 +Some remarks: 
 +
 +  * You can find the G0W0 bandgap in the cp2k output file in the line
 +<code>
 + G0W0 indirect band gap (eV):                                              2.470
 +</code>
 +  * For adjusting the keywords NUM_TIME_FREQ_POINTS, MEMORY_PER_PROC, EPS_FILTER, please consult the [[https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES/BANDSTRUCTURE/GW.html|GW manual]].
 +
 +  * The computational parameters from the input file reach numerical convergence of the band gap within ~ 50 meV (TZVP basis set, 10 time/frequency points). Detailed convergence test is available in the SI, Table S1 of [[doi>10.48550/arXiv.2306.16066]] (SI is an ancillary file that can be downloaded via [[arxiv.org/format/2306.16066]] "Download source"). We recommend the numerical parameters from the input file for large-scale GW calculations. 
 +
 +  * The code also outputs SOC splittings of the levels based on the SOC parameters from Hartwigsen-Goedecker-Hutter pseudopotentials [[doi>10.1103/PhysRevB.58.3641]]. DFT eigenvalues with SOC are printed to the files SCF+SOC_band_structure_for_kpoint_xyz. 
 +
 +  * The code prints restart files with ending .matrix that can be used to restart a crashed calculation.
 + 
 +In case anything does not work, please feel free to contact jan.wilhelm (at) ur.de.
howto/gw.txt · Last modified: 2024/01/14 12:15 by oschuett