[CP2K-user] [CP2K:21385] Re: Setting up GAPW for heavy elements

Krack Matthias matthias.krack at psi.ch
Thu Apr 17 15:40:36 UTC 2025


Dear Léon

Most Gaussian basis sets are made for molecular (or cluster) calculations, i.e. for finite systems. These basis sets are not well suited for calculations of dense solid state systems with periodic boundary conditions. Therefore your basis set tests for small molecular systems are not helpful for finding an appropriate Ti basis set for anatase (condensed phase) simulations. I recommend you to take a look at the POB basis sets<https://github.com/cp2k/cp2k/blob/master/data/BASIS_pob>. DFT based condensed matter calculations do not benefit usually from large valence shell splittings. DZ and TZ basis sets are sufficient with one and two polarization functions like DZVP and TZV2P.

I have attached a TiCl4 input and output file just to show that it is possible to achieve also a very accurate electron count for heavier atoms with GAPW and CP2K. You have to include more (larger) exponents into the valence (soft) basis set which can be achieved by applying smaller values for EPS_FIT. Larger LEBEDEV_GRID and RADIAL_GRID values also help to increase the accuracy and the inclusion of larger exponents into the valence basis should be accompanied by an appropriate increase of the CUTOFF value if needed.

HTH

Matthias

From: cp2k at googlegroups.com <cp2k at googlegroups.com> on behalf of Léon Luntadila Lufungula <Leon.luntadilalufungula at uantwerpen.be>
Date: Tuesday, 15 April 2025 at 16:21
To: cp2k <cp2k at googlegroups.com>
Subject: [CP2K:21369] Re: Setting up GAPW for heavy elements
Dear all,

I really request some help with this as I have worked on this problem on and off for the last couple of months and still haven't been able to make any progress... I need all-electron calculations to proceed with my own research as well as for the research of my two students who are eagerly waiting for me to solve this, so I would greatly appreciate any help at all.

I started out with testing GAPW with the default settings for some small organic molecules (H2, CH4, NH3, H2O, Cl2, SiH4, PH3 and H2S) containing the elements of the adsorbates I intend to use during my research along with TiCl4 for titanium and comparing the GAPW energies, forces, bond lengths and angles to their counterparts calculated with Gaussian 09. To be able to make this comparison, I have used the def2-TZVPP basis set as this is available in both CP2K and G09. The only changes to the defaults I had made was the values of the HARD_EXP_RADIUS, which I took from the table in the supplementary information of the following paper co-authored by Jürg Hutter<https://pubs.acs.org/doi/10.1021/acs.jctc.4c00614?ref=pdf>. Nevertheless, the results were promising as the differences with the G09 results were small but the errors seemed to grow as I went down the periodic table (see below or attached image 'Small molecules GAPW.png) and the same trend was seen for  the electron counts ("Total charge density (r-space)" and "Total Rho_soft + Rho0_soft (g-space)"). I have attached the TiCl4 input and output files as an example.
[cid:3daae19c-a931-459b-9506-4260a2384a54]
Unfortunately, testing with small molecules containing Zr and Hf was a bit more complicated because the def2-tzvpp basis sets use ECP for Zr and Hf, which is not compatible with CP2K.

Now I wanted to try and use GAPW for my titania surface slab, but I have tried a lot of different combinations for the GAPW settings but none have allowed me to converge my 3x1x3 anatase (101) slab. The only calculation that has converged was of a 1x1x1 slab (see attached files a101-1x1x1-gapw-molopt-tzvpp-all1.inp|.out) where I used the settings Jürg Hutter proposed in an earlier post of mine<https://groups.google.com/g/cp2k/c/6qjk0K5oRqU/m/YL83SHAIBgAJ>, but even here the electron counts are around 3E-6 which seems quite large to me. Using the same parameters but using a 3x1x3 slab, the calculation starts with electron counts starting around 3E-5 for the first 2 inner SCF loops and seems to go towards convergence at the end of the 2nd loop, but then goes haywire in the 3rd SCF loop and never reaching convergence (see attached files a101-3x1x3-gapw-molopt-tzvpp-all1.inp|.out). I have tried a lot of different values for HARD_EXP_RADIUS for both O and Ti and found out that 1.30 and 1.80, respectively, resulted in the lowest electron counts for the 1x1x1 slab, but again when running the 3x1x3 slab the first 2 inner SCF loops look promising, but from the 3rd one onward it goes nowhere (see attached  files a101-3x1x3-gapw-molopt-tzvpp-all2.inp|.out).

I'm really at my wit's end here, I have tried a lot of different settings and none seem to work and I have no clue why it isn't working or how I should tackle this problem in a sytematic way. I also can't compare to G09 energies so I only have the electron counts to go on, but there isn't a clear trend about how to improve these with the GAPW settings available. I would love it if someone could point me in the right direction so I can finally get past this hurdle. The questions in my previous post in this topic still stand and would love to get some insight into them if possible.

Greetings,
Léon

On Tuesday, 18 February 2025 at 10:31:22 UTC+1 Léon Luntadila Lufungula wrote:
Dear all,

I have been trying my hand at performing GAPW calculations for the last couple of weeks and I have made due with the defaults for the first-, second- and thir-row elements I plan on using during my calculations. However, elements from the fourth row or higher (Ti, Zr and Hf in my case) are a bit harder to get right.

I've scoured the mailing list and have done a lot of test calculations, but I'm still unsure how to optimize all of the parameters in a systematic way. Let me quickly sum up what I know about the different parameters and then ask what is still unclear.

QS/EPSFIT and KIND/HARD_EXP_RADIUS:
Both of these parameters shift the border between the soft and hard part of the basis set and have an inverse relationship with the "cutoff" exponent. Larger values of either parameter lowers the cutoff exponent and will thus result in a soft basis set that is softer (i.e., lower exponents). I'm quessing HARD_EXP_RADIUS cannot be too large so as to keep the hard density confined. Matthias Krack suggested to lower EPSFIT to 1.0E-6 in another post<https://groups.google.com/g/cp2k/c/FUvjXq9RvWY/m/2xSxfzuVAgAJ> and Jürg Hutter stated here<https://groups.google.com/g/cp2k/c/JX8bDi_w478/m/tjLIF_UUAQAJ> that the max exponent of the soft basis should generally be in the range of 5-8. My questions here are:
1.  When using the defaults, I generally get max exponents between 1-5 for the soft basis. Should I make sure that the max exponents are in the range 5-8?
2.  Should you start with lowering EPSFIT (global parameter) with the default HARD_EXP_RADIUS values and then optimize the HARD_EXP_RADIUS (kind-specific parameter) for each element in the system?
3.  Since EPSFIT and HARD_EXP_RADIUS are both connected to the basis set, should you do this optimization for each basis set individually or can you do it for one and then apply it to other basis sets?
EPSISO and EPSRHO0:
Jürg Hutter stated here<https://groups.google.com/g/cp2k/c/n70_s_Tbt1A/m/LFlsSmA4BgAJ> that EPSISO is useful for heavy elements, but did not state whether to lower or increase it to get better results. Matthias Krack also wrote here<https://groups.google.com/g/cp2k/c/FUvjXq9RvWY/m/8VwHvHGUAgAJ> that reducing EPSRHO0 will lead to better accuracy. My questions here are:
1.  I only found these two suggestions of altering these parameters. Is it worth playing around with them or should I keep them at the default?
2.  If I want to alter them, do I do this after EPSFIT and HARD_EXP_RADIUS and do I just use the electron counts (i.e.,  "Total charge density (r-space)" and "Total Rho_soft + Rho0_soft (g-space)") to check which values give the best results?
LEBEDEV_GRID and RADIAL_GRID
It has been said many times over in the mailing list to increase these values for heavier elements as Matthias Krack<https://groups.google.com/g/cp2k/c/FUvjXq9RvWY/m/8VwHvHGUAgAJ> said as well in an earlier post. My question here are:
1.  Marcella Iannuzi stated in 2014<https://groups.google.com/g/cp2k/c/IH5k1SdMu5k/m/kZz4QxbupK8J> that LEBEDEV_GRID is usually in the range 50-80 and RADIAL_GRID in the range 100-200. Is this still accurate? I've seen Jürg Hutter use a 100/100 combination for titanium in a previous post of mine<https://groups.google.com/g/cp2k/c/6qjk0K5oRqU/m/YL83SHAIBgAJ>.
2.  How do I know if these values are too small? Do I start with them at 80/200 and then optimize EPSFIT/HARD_EXP_RADIUS and then reduce the LEBEDEV_GRID/RADIAL_GRID values until I see an increase in the electron counts?
LMAXN0, LMAXN1 and ALPHA0_HARD:
I feel like I shouldn't mess around with these parameters but I have seen Jürg Hutter define a larger LMAXN0 for Ti in an earlier post of mine<https://groups.google.com/g/cp2k/c/6qjk0K5oRqU/m/YL83SHAIBgAJ> and seen ALPHA0_HARD set to 10 in several occasions, for example in the GAPW class<https://www.youtube.com/watch?v=L0hKLjvjIFU&t=1754s> on youtube from 2019.
1.  Should I leave these at the defaults or try and increase LMAXN0 and set ALPHA0_HARD to 10?
My apologies for the long post with a lot of questions, but I feel like some of these details are still missing from the documentation and mailing list and I know that a proper answer would be immensely helpful for people like me who want to use GAPW for non-standard (heavy) elements and run into trouble with the defaults.

Kind regards,
Léon
--
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+unsubscribe at googlegroups.com<mailto:cp2k+unsubscribe at googlegroups.com>.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/2aa40374-bf62-45f6-919e-56415ee3a8acn%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/2aa40374-bf62-45f6-919e-56415ee3a8acn%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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+unsubscribe at googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/ZRAP278MB082770E212C1B50A15C77E77F4BC2%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20250417/8e1c2031/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Small molecules GAPW.png
Type: image/png
Size: 115288 bytes
Desc: Small molecules GAPW.png
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20250417/8e1c2031/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TiCl4.inp
Type: application/octet-stream
Size: 1649 bytes
Desc: TiCl4.inp
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20250417/8e1c2031/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TiCl4.out
Type: application/octet-stream
Size: 81741 bytes
Desc: TiCl4.out
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20250417/8e1c2031/attachment-0003.obj>


More information about the CP2K-user mailing list