Slow force calculation step timing using hybrid functionals

121 views
Skip to first unread message

Бранислав Миловановић

unread,
Apr 26, 2022, 10:10:34 AM4/26/22
to cp2k
Dear CP2K users,

I'm experiencing problems when using hybrid functionals such as B3LYP or M062X and while optimizing simple test system (hydrogen bonded acetic acid dimer).

SCF convergence appears to be fast and normal but the Force calculation step is extremely slow. Maybe I made some mistake in the input file?

I attached my input files and output file (B3LYP).
Also, I don't really understand the timings at the end output file.

Thanks in advance!
Branislav
input
coord.xyz
output

Frederick Stein

unread,
Apr 26, 2022, 3:52:21 PM4/26/22
to cp2k
Dear Branislav,

If you use the section &XC_SECTION <FUNCTIONAL_NAME>, CP2K will use the standard parameters of the HF section. The employed thresholds in the SCREENING provide accurate results but can be too tight. It might help, to set the respective parameters of HF section explicitly:
&XC
# Add your other subsections here
&HF
&SCREENING
#Choose smaller values for higher accuracy
EPS_SCHWARZ 1.0E-6
EPS_SCHWARZ_FORCES 1.0E-5
&END SCREENING
&END HF
&END XC

Another parameter to tune is EPS_DEFAULT in the QS section.

Consult also the CP2K manual (https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/XC/HF.html) for further reference.

HTH

Frederick

Augustin Bussy

unread,
Apr 27, 2022, 9:02:40 AM4/27/22
to cp...@googlegroups.com

Hi Branislav,

your input file is in principle correct. The main issue is that the DZVP-MOLOPT-GTH basis set is really not optimized for HFX type calculations. Therefore, a lot of time is spent calculating 4-center integrals, and even more time is spent on 4-center derivatives.

I see 3 ways that you can improve your timings:

1) Use a basis set that is better suited. For example, Pople style all-electron basis sets such as 6-31G* (requires a switch to GAPW)

2) Use a RI approximation for the HFX: add  &RI &END to the &HF section (this requires CP2K 9.1 or more recent)

3) Use the ADMM method (https://manual.cp2k.org/cp2k-9_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/AUXILIARY_DENSITY_MATRIX_METHOD.html)

I think solution 1) is the easiest.  I also suggest that you use the FULL_ALL preconditioner for OT. It performs better than FULL_S_INVERSE for smaller system (in that case, you also need to remove the ENERGY_GAP keyword).

Hope that helps. Best,

Augustin

--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/e568c56a-bfea-411c-9274-119d735cc83cn%40googlegroups.com.
-- 
Augustin Bussy
Postdoctoral researcher
Hutter Group
University of Zurich

Бранислав Миловановић

unread,
Apr 27, 2022, 1:45:06 PM4/27/22
to cp2k
Dear Frederick, Augustin,

Thank you for your answers. Both answers improved performance of the calculation, especially Augustin's solutions.
Solution 1) is straightforward and easy to implement.
I also tried 2) and 3) and which are helpful as well.

Thanks once again!

Best
Branislav

Reply all
Reply to author
Forward
0 new messages