exercises:2015_pitt:hfx
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
exercises:2015_pitt:hfx [2015/03/04 10:19] – vondele | exercises:2015_pitt:hfx [2015/03/04 12:45] – [Truncated Coulomb operator with long range correction] vondele | ||
---|---|---|---|
Line 9: | Line 9: | ||
===== Truncated Coulomb operator ===== | ===== Truncated Coulomb operator ===== | ||
- | To enable HFX in the condensed phase (described at the Gamma point only), CP2K employs a truncated Coulomb operator for the exchange part. The physical picture is that we do not want to have ' | + | To enable HFX in the condensed phase (described at the Gamma point only), CP2K employs a truncated Coulomb operator for the exchange part. The physical picture is that we do not want to have ' |
==== 1st task : GGA restart wfn ==== | ==== 1st task : GGA restart wfn ==== | ||
Line 82: | Line 82: | ||
</ | </ | ||
+ | Topics: | ||
+ | * '' | ||
+ | * Fraction of exchange ('' | ||
+ | Run this input, it should lead to an output like: | ||
+ | |||
+ | < | ||
+ | HFX_MEM_INFO| Number of cart. primitive ERI's calculated: | ||
+ | HFX_MEM_INFO| Number of sph. ERI's calculated: | ||
+ | HFX_MEM_INFO| Number of sph. ERI's stored in-core: | ||
+ | HFX_MEM_INFO| Number of sph. ERI's stored on disk: 0 | ||
+ | HFX_MEM_INFO| Number of sph. ERI's calculated on the fly: 0 | ||
+ | HFX_MEM_INFO| Total memory consumption ERI's RAM [MB' | ||
+ | HFX_MEM_INFO| Whereof max-vals [MB' | ||
+ | HFX_MEM_INFO| Total compression factor ERI's RAM: 8.03 | ||
+ | HFX_MEM_INFO| Total memory consumption ERI's disk [MB' | ||
+ | HFX_MEM_INFO| Total compression factor ERI's disk: 0.00 | ||
+ | HFX_MEM_INFO| Size of density/ | ||
+ | HFX_MEM_INFO| Size of buffers [MB' | ||
+ | HFX_MEM_INFO| Number of periodic image cells considered: | ||
+ | HFX_MEM_INFO| Est. max. program size after HFX [MB' | ||
+ | |||
+ | 1 OT DIIS | ||
+ | |||
+ | Trace(PS): | ||
+ | Electronic density on regular grids: | ||
+ | Core density on regular grids: | ||
+ | Total charge density on r-space grids: | ||
+ | Total charge density g-space grids: | ||
+ | |||
+ | 2 OT DIIS | ||
+ | </ | ||
+ | |||
+ | Topics: | ||
+ | * in-core operation. | ||
+ | * How to detect instabilities due to too aggressive screening. | ||
+ | |||
+ | Question: What is the HOMO-LUMO gap for this configuration ? How does this compare to the GGA result ? Adjust the fraction of exchange (modify the input in two places!) to 20% and/or 30%, how does this influence the gap ? | ||
===== Truncated Coulomb operator with long range correction ===== | ===== Truncated Coulomb operator with long range correction ===== | ||
+ | Like in the HSE functional, the difference between the operator used for exchange and 1/r, can be accounted for by a special GGA exchange functional. Also for the truncated coulomb operator this is possible, and allows for xc functionals that embed very short range exchange operators only. This can be used to speedup the calculation, | ||
+ | |||
+ | ==== 3rd task ==== | ||
+ | |||
+ | Add to the & | ||
+ | |||
+ | < | ||
+ | & | ||
+ | | ||
+ | | ||
+ | & | ||
+ | </ | ||
+ | |||
+ | and employ the same '' | ||
+ | |||
+ | Rerun the single point energy calculation and note the band gap. | ||
+ | * Is such a short range sufficient to have a sizable effect on the band gap ? | ||
+ | * is '' | ||
Line 92: | Line 147: | ||
===== Required files ===== | ===== Required files ===== | ||
- | <code - water_hfx_cheating.inp> | + | No new files are required for this exercise. If you're stuck, you can use the following worked out examples. |
+ | |||
+ | <code - water_pbe0_cheating.inp> | ||
+ | & | ||
+ | ! the project name is made part of most output files... useful to keep order | ||
+ | PROJECT WATER | ||
+ | ! various runtypes (energy, geo_opt, etc.) available. | ||
+ | RUN_TYPE ENERGY | ||
+ | ! limit the runs to 30min | ||
+ | WALLTIME 1800 | ||
+ | ! reduce the amount of IO | ||
+ | IOLEVEL | ||
+ | &END GLOBAL | ||
+ | |||
+ | & | ||
+ | ! the electronic structure part of CP2K is named Quickstep | ||
+ | METHOD Quickstep | ||
+ | &DFT | ||
+ | ! basis sets and pseudopotential files can be found in cp2k/data | ||
+ | BASIS_SET_FILE_NAME HFX_BASIS | ||
+ | POTENTIAL_FILE_NAME GTH_POTENTIALS | ||
+ | ! GGA restart to provide a good initial density matrix | ||
+ | WFN_RESTART_FILE_NAME WATER-RESTART-GGA.wfn | ||
+ | |||
+ | ! Charge and multiplicity | ||
+ | CHARGE 0 | ||
+ | MULTIPLICITY 1 | ||
+ | |||
+ | & | ||
+ | ! PW cutoff ... depends on the element (basis) too small cutoffs lead to the eggbox effect. | ||
+ | ! certain calculations (e.g. geometry optimization, | ||
+ | ! NPT and cell optimizations, | ||
+ | | ||
+ | &END | ||
+ | |||
+ | &QS | ||
+ | ! use the GPW method (i.e. pseudopotential based calculations with the Gaussian and Plane Waves scheme). | ||
+ | | ||
+ | ! default threshold for numerics ~ roughly numerical accuracy of the total energy per electron, | ||
+ | ! sets reasonable values for all other thresholds. | ||
+ | | ||
+ | ! used for MD, the method used to generate the initial guess. | ||
+ | | ||
+ | &END | ||
+ | |||
+ | & | ||
+ | | ||
+ | &END | ||
+ | |||
+ | & | ||
+ | ! at the end of the SCF procedure generate cube files of the density | ||
+ | & | ||
+ | & | ||
+ | ! compute eigenvalues and homo-lumo gap each 10nd MD step | ||
+ | & | ||
+ | NLUMO 4 | ||
+ | NHOMO 4 | ||
+ | WRITE_CUBE .FALSE. | ||
+ | &EACH | ||
+ | MD 10 | ||
+ | &END | ||
+ | & | ||
+ | &END | ||
+ | |||
+ | ! use the OT METHOD for robust and efficient SCF, suitable for all non-metallic systems. | ||
+ | & | ||
+ | SCF_GUESS RESTART ! can be used to RESTART an interrupted calculation | ||
+ | MAX_SCF 30 | ||
+ | EPS_SCF 1.0E-6 ! accuracy of the SCF procedure typically 1.0E-6 - 1.0E-7 | ||
+ | &OT | ||
+ | ! an accurate preconditioner suitable also for larger systems | ||
+ | PRECONDITIONER FULL_SINGLE_INVERSE | ||
+ | ! the most robust choice (DIIS might sometimes be faster, but not as stable). | ||
+ | MINIMIZER DIIS | ||
+ | &END OT | ||
+ | & | ||
+ | MAX_SCF 10 | ||
+ | EPS_SCF 1.0E-6 ! must match the above | ||
+ | &END | ||
+ | ! do not store the wfn during MD | ||
+ | & | ||
+ | & | ||
+ | &END | ||
+ | &END | ||
+ | &END SCF | ||
+ | |||
+ | ! specify the exchange and correlation treatment | ||
+ | &XC | ||
+ | ! use a PBE0 functional | ||
+ | & | ||
+ | & | ||
+ | ! 75% GGA exchange | ||
+ | | ||
+ | ! 100% GGA correlation | ||
+ | | ||
+ | & | ||
+ | &END XC_FUNCTIONAL | ||
+ | &HF | ||
+ | ! 25 % HFX exchange | ||
+ | FRACTION 0.25 | ||
+ | & | ||
+ | ! important parameter to get stable HFX calcs | ||
+ | EPS_SCHWARZ 1.0E-6 | ||
+ | ! needs a good (GGA) initial guess | ||
+ | SCREEN_ON_INITIAL_P TRUE | ||
+ | &END | ||
+ | & | ||
+ | ! for condensed phase systems | ||
+ | POTENTIAL_TYPE TRUNCATED | ||
+ | ! should be less than halve the cell | ||
+ | CUTOFF_RADIUS 6.0 | ||
+ | ! data file needed with the truncated operator | ||
+ | T_C_G_DATA ./ | ||
+ | &END | ||
+ | & | ||
+ | ! In MB per MPI rank.. use as much as need to get in-core operation | ||
+ | MAX_MEMORY 4000 | ||
+ | ! additional accuracy for storing compressed results | ||
+ | EPS_STORAGE_SCALING 0.1 | ||
+ | &END | ||
+ | &END | ||
+ | ! adding Grimme' | ||
+ | & | ||
+ | | ||
+ | & | ||
+ | PARAMETER_FILE_NAME dftd3.dat | ||
+ | TYPE DFTD3 | ||
+ | REFERENCE_FUNCTIONAL PBE0 | ||
+ | R_CUTOFF [angstrom] 16 | ||
+ | & | ||
+ | &END VDW_POTENTIAL | ||
+ | &END XC | ||
+ | &END DFT | ||
+ | |||
+ | ! description of the system | ||
+ | & | ||
+ | &CELL | ||
+ | ! unit cells that are orthorhombic are more efficient with CP2K | ||
+ | ABC [angstrom] 12.42 12.42 12.42 | ||
+ | &END CELL | ||
+ | |||
+ | ! atom coordinates can be in the &COORD section, | ||
+ | ! or provided as an external file. | ||
+ | & | ||
+ | COORD_FILE_NAME water.xyz | ||
+ | COORD_FILE_FORMAT XYZ | ||
+ | &END | ||
+ | |||
+ | ! MOLOPT basis sets are fairly costly, | ||
+ | ! but in the ' | ||
+ | ! their contracted nature makes them suitable | ||
+ | ! for condensed and gas phase systems alike. | ||
+ | &KIND H | ||
+ | BASIS_SET DZVP-GTH | ||
+ | POTENTIAL GTH-PBE-q1 | ||
+ | &END KIND | ||
+ | &KIND O | ||
+ | BASIS_SET DZVP-GTH | ||
+ | POTENTIAL GTH-PBE-q6 | ||
+ | &END KIND | ||
+ | &END SUBSYS | ||
+ | &END FORCE_EVAL | ||
+ | |||
+ | ! how to propagate the system, selection via RUN_TYPE in the &GLOBAL section | ||
+ | & | ||
+ | & | ||
+ | | ||
+ | | ||
+ | | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | | ||
+ | | ||
+ | | ||
+ | STEPS 1000 | ||
+ | # GLE thermostat as generated at http:// | ||
+ | # GLE provides an effective NVT sampling. | ||
+ | & | ||
+ | | ||
+ | TYPE GLE | ||
+ | & | ||
+ | NDIM 5 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | MD 1 | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | MD 500 | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | | ||
+ | & | ||
+ | MD 1 | ||
+ | & | ||
+ | & | ||
+ | &END PRINT | ||
+ | &END | ||
</ | </ | ||
exercises/2015_pitt/hfx.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1