howto:gw
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
howto:gw [2021/04/21 20:19] – jwilhelm | howto:gw [2023/10/18 18:00] – [5. GW for 2D materials: Example monolayer MoS2] jwilhelm | ||
---|---|---|---|
Line 150: | Line 150: | ||
An exemplary input for a parallel calculation can be found in the supporting information of [[doi> | An exemplary input for a parallel calculation can be found in the supporting information of [[doi> | ||
- | ===== 4. Self-consistent GW calculations ===== | + | ===== 4. Self-consistent GW calculations |
- | The G0W0@PBE HOMO value is not in good agreement with the experimental ionization potential | + | 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 |
+ | You can run GW0 calculations in CP2K by putting | ||
+ | < | ||
+ | &GW | ||
+ | SC_GW0_ITER | ||
+ | CORR_OCC | ||
+ | CORR_VIRT | ||
+ | RI_SIGMA_X | ||
+ | &END GW | ||
+ | </ | ||
+ | " | ||
- | ===== 5. Periodic | + | ===== 5. GW for 2D materials: Example monolayer MoS2 ===== |
- | For periodic GW calculations, | + | There is also a periodic GW implementation |
- | The basis can be found in {{exercises: | ||
- | < | + | For computing the G0W0@LDA quasiparticle energy levels of monolayer MoS2, please use the input file |
+ | < | ||
+ | & | ||
+ | PROJECT | ||
+ | RUN_TYPE ENERGY | ||
+ | &END GLOBAL | ||
& | & | ||
METHOD Quickstep | METHOD Quickstep | ||
&DFT | &DFT | ||
- | BASIS_SET_FILE_NAME | + | BASIS_SET_FILE_NAME |
- | POTENTIAL_FILE_NAME | + | POTENTIAL_FILE_NAME |
+ | SORT_BASIS EXP | ||
&MGRID | &MGRID | ||
- | CUTOFF | + | CUTOFF |
- | REL_CUTOFF | + | REL_CUTOFF |
&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 | + | |
+ | | ||
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 | ||
- | & | + | & |
&END XC_FUNCTIONAL | &END XC_FUNCTIONAL | ||
- | & | ||
- | METHOD | ||
- | &RI_RPA | ||
- | RPA_NUM_QUAD_POINTS | ||
- | GW | ||
- | & | ||
- | | ||
- | | ||
- | ! activate the periodic correction | ||
- | | ||
- | | ||
- | | ||
- | &END RI_G0W0 | ||
- | ! HF calculation for the exchange part of the self-energy | ||
- | ! Here, the truncation of the Coulomb operator works | ||
- | &HF | ||
- | & | ||
- | ! for other materials, a smaller EPS_SCHWARZ might be necessary | ||
- | EPS_SCHWARZ 1.0E-6 | ||
- | SCREEN_ON_INITIAL_P TRUE | ||
- | &END | ||
- | & | ||
- | POTENTIAL_TYPE TRUNCATED | ||
- | ! the truncation radius is half the cell size | ||
- | CUTOFF_RADIUS | ||
- | T_C_G_DATA t_c_g.dat | ||
- | &END | ||
- | &MEMORY | ||
- | MAX_MEMORY | ||
- | &END | ||
- | &END | ||
- | &END RI_RPA | ||
- | NUMBER_PROC | ||
- | &END | ||
&END XC | &END XC | ||
&END DFT | &END DFT | ||
+ | & | ||
+ | & | ||
+ | &DOS | ||
+ | ! k-point mesh for the self-energy | ||
+ | KPOINTS 2 2 1 | ||
+ | &END | ||
+ | &GW | ||
+ | ! for details on parameters, please consult | ||
+ | ! manual.cp2k.org/ | ||
+ | NUM_TIME_FREQ_POINTS | ||
+ | MEMORY_PER_PROC | ||
+ | EPS_FILTER | ||
+ | &END | ||
+ | &SOC | ||
+ | &END | ||
+ | &END | ||
+ | &END PROPERTIES | ||
&SUBSYS | &SUBSYS | ||
&CELL | &CELL | ||
- | ABC 4.084 4.084 4.084 | + | ABC 3.15 3.15 15.0 |
+ | ALPHA_BETA_GAMMA | ||
+ | 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 2.042 2.042 0 | + | & |
- | Li 2.042 0 2.042 | + | |
- | Li 0 2.042 2.042 | + | & |
- | H 0 2.042 0 | + | BASIS_SET |
- | H 0 0 2.042 | + | |
- | H 2.042 0 0 | + | POTENTIAL |
- | H 2.042 2.042 2.042 | + | |
- | & | + | |
- | & | + | |
- | BASIS_SET | + | |
- | | + | |
- | POTENTIAL GTH-PBE-q1 | + | |
&END KIND | &END KIND | ||
- | | + | |
- | BASIS_SET | + | |
- | | + | BASIS_SET |
- | POTENTIAL GTH-PBE-q3 | + | |
+ | POTENTIAL | ||
&END KIND | &END KIND | ||
- | &END SUBSYS | ||
- | &END FORCE_EVAL | ||
- | &GLOBAL | ||
- | PROJECT | ||
- | PRINT_LEVEL MEDIUM | ||
- | RUN_TYPE ENERGY | ||
- | &END GLOBAL | ||
- | </ | ||
+ | &KIND Mo | ||
+ | BASIS_SET ORB TZVP-MOLOPT-GTH_upscaled | ||
+ | BASIS_SET RI_AUX RI | ||
+ | POTENTIAL | ||
+ | &END KIND | ||
- | ===== 6. 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 RI_AUX RI | ||
+ | POTENTIAL | ||
+ | &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> | ||
- | & | ||
- | 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 | ||
- | & | ||
- | PERIODIC NONE | ||
- | PSOLVER MT | ||
- | &END | ||
- | &SCF | ||
- | EPS_SCF 1.0E-6 | ||
- | SCF_GUESS ATOMIC | ||
- | MAX_SCF 200 | ||
- | &END SCF | ||
- | &XC | ||
- | & | ||
- | &END XC_FUNCTIONAL | ||
- | & | ||
- | METHOD RI_RPA_GPW | ||
- | ERI_METHOD OS | ||
- | ! cubic-scaling GW only works with overlap metric RI | ||
- | RI OVERLAP | ||
- | & | ||
- | ! 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 | ||
- | &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/ | ||
- | ! (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 | ||
- | ! imaginary time flag enables cubic-scaling RPA or | ||
- | ! GW calculations | ||
- | IM_TIME | ||
- | & | ||
- | ! EPS_FILTER_IM_TIME should be tuned for the specific | ||
- | ! application: | ||
- | ! 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 | ||
- | GW | ||
- | &END IM_TIME | ||
- | & | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | &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 | + | Mo 0.00000 1.81865 3.07500 |
- | | + | |
- | | + | |
&END COORD | &END COORD | ||
- | & | ||
- | & | ||
- | &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 | ||
- | PROJECT | ||
- | PRINT_LEVEL | ||
- | &END GLOBAL | ||
</ | </ | ||
+ | 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:// | ||
+ | |||
+ | 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 | ||
+ | < | ||
+ | G0W0 indirect band gap (eV): 2.470 | ||
+ | </ | ||
+ | * For adjusting the keywords NUM_TIME_FREQ_POINTS, | ||
+ | |||
+ | * The computational parameters from the input file reach numerical convergence of the band gap within ~ 50 meV (TZVP basis set, 10 time/ | ||
+ | |||
+ | * The code also outputs SOC splittings of the levels based on the SOC parameters from Hartwigsen-Goedecker-Hutter pseudopotentials [[doi> | ||
+ | |||
+ | * 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