exercises:2017_uzh_cp2k-tutorial:hybrid
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| exercises:2017_uzh_cp2k-tutorial:hybrid [2017/07/11 19:15] – gtocci | exercises:2017_uzh_cp2k-tutorial:hybrid [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| The purpose of this section is to explain how to perform hybrid functional calculations (or Hartree-Fock exchange, HFX) with CP2K in condensed phase systems. It is based on the developments described in [[doi> | The purpose of this section is to explain how to perform hybrid functional calculations (or Hartree-Fock exchange, HFX) with CP2K in condensed phase systems. It is based on the developments described in [[doi> | ||
| - | < | + | Hartree-Fock exchange in CP2K is based on four center electron repulsion integrals (ERI), these are computed with an external library ([[http://sourceforge.net/projects/libint/|libint]]). |
| - | Tutorial re-adapted from [[https://www.cp2k.org/exercises: | + | |
| - | For more info see also [[also https://www.cecam.org/ | + | |
| - | </ | + | |
| - | Hartree-Fock exchange in CP2K is based on four center electron repulsion integrals (ERI), these are computed with an external library ([[http:// | + | This approach has a computational cost that depends strongly on the nature of the basis. Unless |
| - | + | ||
| - | This approach has a computational cost that depends strongly on the nature of the basis, unless | + | |
| This tutorial is also based on the '' | This tutorial is also based on the '' | ||
| + | |||
| + | < | ||
| + | Tutorial re-adapted from the [[https:// | ||
| + | For more info see also the slides from Joost VandeVondele [[pdf> | ||
| + | Matt Watkins [[https:// | ||
| + | </ | ||
| ===== Truncated Coulomb operator ===== | ===== Truncated Coulomb operator ===== | ||
| - | To enable HFX in the condensed phase (described at the Gamma point only), | + | To enable HFX in the condensed phase 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 30: | Line 31: | ||
| ! various runtypes (energy, geo_opt, etc.) available. | ! various runtypes (energy, geo_opt, etc.) available. | ||
| | | ||
| - | | + | ! amount of information printed to output |
| - | | + | |
| - | ! reduce the amount of IO | + | |
| | | ||
| &END GLOBAL | &END GLOBAL | ||
| Line 73: | Line 72: | ||
| & | & | ||
| & | & | ||
| - | ! compute eigenvalues and homo-lumo gap each 10nd MD step | + | ! compute eigenvalues and homo-lumo gap |
| & | & | ||
| NLUMO 4 | NLUMO 4 | ||
| Line 87: | Line 86: | ||
| | | ||
| | | ||
| - | | + | |
| & | & | ||
| ! an accurate preconditioner suitable also for larger systems | ! an accurate preconditioner suitable also for larger systems | ||
| Line 152: | Line 151: | ||
| & | & | ||
| &END FORCE_EVAL | &END FORCE_EVAL | ||
| - | |||
| - | |||
| </ | </ | ||
| Run the input and rename the generated wfn file ('' | Run the input and rename the generated wfn file ('' | ||
| - | Also make a note of the '' | + | Also make a note of the '' |
| ==== 2nd task: PBE0-D3 water ==== | ==== 2nd task: PBE0-D3 water ==== | ||
| Line 168: | Line 165: | ||
| * '' | * '' | ||
| - | And replace the previous | + | And replace the ''& |
| < | < | ||
| Line 185: | Line 182: | ||
| ! 25 % HFX exchange | ! 25 % HFX exchange | ||
| FRACTION 0.25 | FRACTION 0.25 | ||
| - | & | + | |
| - | ! important parameter to get stable HFX calcs | + | |
| + | ! important parameter to get stable HFX calcs (contributions to hfx smaller than EPS_SCHWARZ are not considered) | ||
| EPS_SCHWARZ 1.0E-6 | EPS_SCHWARZ 1.0E-6 | ||
| ! needs a good (GGA) initial guess | ! needs a good (GGA) initial guess | ||
| + | ! screening on the product between maximum of density matrix elements and ERI | ||
| SCREEN_ON_INITIAL_P TRUE | SCREEN_ON_INITIAL_P TRUE | ||
| &END | &END | ||
| Line 194: | Line 193: | ||
| ! for condensed phase systems | ! for condensed phase systems | ||
| POTENTIAL_TYPE TRUNCATED | POTENTIAL_TYPE TRUNCATED | ||
| - | ! should be less than halve the cell | + | ! should be less than half the cell |
| - | CUTOFF_RADIUS 6.0 | + | CUTOFF_RADIUS |
| ! data file needed with the truncated operator | ! data file needed with the truncated operator | ||
| T_C_G_DATA ./t_c_g.dat | T_C_G_DATA ./t_c_g.dat | ||
| Line 219: | Line 218: | ||
| Topics: | Topics: | ||
| - | * '' | + | |
| + | | ||
| + | * '' | ||
| + | * '' | ||
| * Fraction of exchange ('' | * Fraction of exchange ('' | ||
| - | Run this input u | ||
| Have a look at the output, in the section where CP2K is performing the SCF loop, using the OT method. | Have a look at the output, in the section where CP2K is performing the SCF loop, using the OT method. | ||
| The first iteration should look something like this: | The first iteration should look something like this: | ||
| Line 267: | Line 268: | ||
| You can see from the output the appearance of a '' | You can see from the output the appearance of a '' | ||
| tags '' | tags '' | ||
| - | the output and if it is OK to discard it, or not. This particular warning is related to the stability of the SCF cycle. For more information see [[https:// | + | the output and if it is OK to discard it or not. This particular warning is related to the stability of the SCF cycle. For more information see [[https:// |
| + | **Questions: | ||
| * Look at the output where the HOMO-LUMO gap has been printed out. How does this compare to the GGA result? | * Look at the output where the HOMO-LUMO gap has been printed out. How does this compare to the GGA result? | ||
| - | * Most of the time in the SCF cycle is spent in the first step. Why do you think is that? | ||
| * Adjust the fraction of exchange (modify the input in two places!) to 20% and/or 30%, how does this influence the gap ? | * Adjust the fraction of exchange (modify the input in two places!) to 20% and/or 30%, how does this influence the gap ? | ||
| - | * Optional task n. 1. You can check if the SCF cycle is stable by changing | + | * The most expensive part of the whole SCF cycle is represented by the first step, while the other steps are much faster. Why is that? |
| - | * Optional task n. 2. The most expensive part in hybrid calculations is the calculation of the electron repulsion integrals (ERI). To run efficiently | + | * __Optional__ |
| + | * __Optional__ | ||
| + | |||
| + | < | ||
| + | It is recommended to run HFX calculations in-core, either by setting larger '' | ||
| + | </ | ||
| ===== 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, | + | In HSE and other screened hybrid functionals, the 1/r exchange interaction potential |
| ==== 3rd task ==== | ==== 3rd task ==== | ||
| Line 294: | Line 300: | ||
| Rerun the single point energy calculation and note the band gap. | 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 such a short range sufficient to have a sizable effect on the band gap ? | ||
| - | * is '' | + | * is '' |
| ===== Auxiliary Density Matrix Methods (ADMM) ===== | ===== Auxiliary Density Matrix Methods (ADMM) ===== | ||
| Line 303: | Line 308: | ||
| ==== 4rd task : introduce ADMM ==== | ==== 4rd task : introduce ADMM ==== | ||
| - | Make the following changes: | + | Make the following changes |
| - | * insert | + | * insert |
| * insert for each ''& | * insert for each ''& | ||
| * insert a secion ''& | * insert a secion ''& | ||
| Line 321: | Line 326: | ||
| < | < | ||
| - | |||
| - | < | ||
| Run the input, what's the '' | Run the input, what's the '' | ||
| Line 336: | Line 339: | ||
| adapt the admm input for water to reflect the ionized state: | adapt the admm input for water to reflect the ionized state: | ||
| < | < | ||
| - | ! Charge | + | ! Spin polarization, |
| LSD | LSD | ||
| CHARGE 1 | CHARGE 1 | ||
| Line 360: | Line 363: | ||
| RUN_TYPE ENERGY | RUN_TYPE ENERGY | ||
| ! limit the runs to 30min | ! limit the runs to 30min | ||
| - | WALLTIME 1800 | + | WALLTIME 1800 |
| ! reduce the amount of IO | ! reduce the amount of IO | ||
| IOLEVEL | IOLEVEL | ||
| Line 376: | Line 379: | ||
| ! Charge and multiplicity | ! Charge and multiplicity | ||
| - | CHARGE | + | CHARGE |
| - | MULTIPLICITY | + | MULTIPLICITY |
| &MGRID | &MGRID | ||
exercises/2017_uzh_cp2k-tutorial/hybrid.1499800539.txt.gz · Last modified: (external edit)
