Hi<div>I forgot to mention that the D4 library allows for OpenMP parallelism. You can probably get</div><div>some speedups by running with 4 or 8 OpenMP threads.</div><div>regards</div><div>JH<br /><br /></div><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Tuesday, August 13, 2024 at 9:41:23 AM UTC+2 jgh wrote:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi
<br>
<br>CP2K uses an external library for D4. Currently, this library is not running in parallel and the
<br>number of parameters that can be adjusted is minimal. You can change the cutoff radius (D4_CUTOFF)
<br>and the coordination cutoff  D4_CN_CUTOFF for possible speedups.
<br>In the CP2K internal implementation for D3, there are some additional features used to speed up
<br>the calculation (besides parallelization), e.g. constant C6 terms for the 3-body terms (REFERENCE_C9_TERM).
<br>
<br>regards
<br>JH
<br>
<br>________________________________________
<br>From: <a href data-email-masked rel="nofollow">cp...@googlegroups.com</a> <<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>> on behalf of <a href data-email-masked rel="nofollow">mayank...@gmail.com</a> <<a href data-email-masked rel="nofollow">mayank...@gmail.com</a>>
<br>Sent: Friday, August 9, 2024 6:17 PM
<br>To: cp2k
<br>Subject: [CP2K:20540] DFT-D4 issues
<br>
<br>Hi,
<br>
<br>I am using CP2K-2024.1 (git:96bff0e) installed via toolchain as
<br>
<br>./install_cp2k_toolchain.sh --with-gcc=install --with-openmpi=system --with-openblas=system --with-sirius=no --with-gsl=no --with-spfft=no --with-spla=no --with-spglib=no --with-spla=no --with-dftd4=install
<br>
<br>I was testing the dft-d4 module in CP2K for DFT NVT BOMD of 64 water molecules at 300K. The input file is a modified version of H2O-64.inp, which is attached below. For reference, when using the GGA revPBE-D3(BJ) functional, the simulation runs with no issues.
<br>
<br>598          299.000000         0.299941422       330.589518254     -1104.202651786     -1103.888925173         6.335769739
<br>599          299.500000         0.301541403       332.352985832     -1104.203091753     -1103.888929962         6.343083243
<br>600          300.000000         0.304829862       335.977460517     -1104.206316541     -1103.888980814         6.294001573
<br>601          300.500000         0.309924126       341.592257168     -1104.211543588     -1103.889060265         6.321073636
<br>602          301.000000         0.316551623       348.896953508     -1104.217560779     -1103.889142976         5.964969439
<br>603          301.500000         0.322822897       355.809028278     -1104.223085700     -1103.889206038         6.120740931
<br>604          302.000000         0.327538416       361.006380378     -1104.227137720     -1103.889238373         5.925923496
<br>
<br>The computation time per step here is ~6 sec on a 32-core Intel(R) Xeon(R) Silver 4210. The temperature increase of ~60K is expected due to DFT functional change. However if I switch to dft-d4, then
<br>
<br>77           38.500000         0.862684099       950.833395090     -1103.274695245     -1102.386378043        91.672277213
<br>78           39.000000         0.881930821       972.046751741     -1103.282855444     -1102.374307902        90.513970271
<br>79           39.500000         0.882748826       972.948340710     -1103.287092185     -1102.380456423        90.920328229
<br>80           40.000000         0.896756672       988.387512978     -1103.287828468     -1102.367459596        91.310964988
<br>81           40.500000         0.958453301      1056.388319792     -1103.284416570     -1102.302414268        90.900099128
<br>82           41.000000         1.038365692      1144.466180877     -1103.270000131     -1102.208050576        91.362470460
<br>83           41.500000         1.079534923      1189.842095377     -1103.244176025     -1102.140472954        91.729197830
<br>84           42.000000         1.097126299      1209.230962278     -1103.212461950     -1102.090361488        90.937799281
<br>85           42.500000         1.105902625      1218.904056354     -1103.178147196     -1102.046945536        90.644135027
<br>        86           43.000000         1.101998771      1214.601305186     -1103.141896114     -1102.013002638        90.902946438
<br>
<br>I can notice the energy divergence and the computation time is stable at around ~91 sec, which in my experience, is more than for the equivalent revPBE0-D3(BJ) ADMM simulation.
<br>
<br>The relevant section in the input files are :
<br>DFT-D3
<br>
<br>       &VDW_POTENTIAL
<br>         POTENTIAL_TYPE  PAIR_POTENTIAL
<br>         &PAIR_POTENTIAL
<br>           R_CUTOFF     1.0000000000000009E+01
<br>           TYPE  DFTD3(BJ)
<br>           PARAMETER_FILE_NAME ./dftd3.dat
<br>           REFERENCE_FUNCTIONAL revPBE
<br>           CALCULATE_C9_TERM  T
<br>           REFERENCE_C9_TERM  T
<br>           LONG_RANGE_CORRECTION  F
<br>         &END PAIR_POTENTIAL
<br>       &END VDW_POTENTIAL
<br>
<br>DFT-D4
<br>
<br>       &VDW_POTENTIAL
<br>         POTENTIAL_TYPE  PAIR_POTENTIAL
<br>         &PAIR_POTENTIAL
<br>           R_CUTOFF     1.0000000000000009E+01
<br>           !TYPE  DFTD3(BJ)
<br>           TYPE  DFTD4
<br>           !PARAMETER_FILE_NAME ./dftd3.dat
<br>           REFERENCE_FUNCTIONAL revPBE
<br>           !CALCULATE_C9_TERM  T
<br>           !REFERENCE_C9_TERM  T
<br>           LONG_RANGE_CORRECTION  F
<br>         &END PAIR_POTENTIAL
<br>       &END VDW_POTENTIAL
<br>
<br>I haven't used DFT-D4 before, so I am not sure if I need to enter any addtional parameters in the dispersion block. But the 15:1 computation time ratio between dft-d4 and dft-d3bj suggest there is some issue in the simulation setup. Can you suggest any relevant changes I need to make resolve this situation?
<br>
<br>Best Regards,
<br>Mayank
<br>
<br>
<br>--
<br>You received this message because you are subscribed to the Google Groups "cp2k" group.
<br>To unsubscribe from this group and stop receiving emails from it, send an email to <a href data-email-masked rel="nofollow">cp2k+uns...@googlegroups.com</a><mailto:<a href data-email-masked rel="nofollow">cp2k+uns...@googlegroups.com</a>>.
<br>To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/49eaaddb-c3f9-45ed-ac49-c91bdf6c73d7n%40googlegroups.com" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en-US&q=https://groups.google.com/d/msgid/cp2k/49eaaddb-c3f9-45ed-ac49-c91bdf6c73d7n%2540googlegroups.com&source=gmail&ust=1723622451634000&usg=AOvVaw2t6Q6jd6Ur-b7iqvkUPLQ4">https://groups.google.com/d/msgid/cp2k/49eaaddb-c3f9-45ed-ac49-c91bdf6c73d7n%40googlegroups.com</a><<a href="https://groups.google.com/d/msgid/cp2k/49eaaddb-c3f9-45ed-ac49-c91bdf6c73d7n%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en-US&q=https://groups.google.com/d/msgid/cp2k/49eaaddb-c3f9-45ed-ac49-c91bdf6c73d7n%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1723622451634000&usg=AOvVaw2Qo8e7Rhw9s5KoLXP4k1DE">https://groups.google.com/d/msgid/cp2k/49eaaddb-c3f9-45ed-ac49-c91bdf6c73d7n%40googlegroups.com?utm_medium=email&utm_source=footer</a>>.
<br></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "cp2k" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/0dffd532-8ab3-4add-99cf-a63b0db9d14fn%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/0dffd532-8ab3-4add-99cf-a63b0db9d14fn%40googlegroups.com</a>.<br />