Problems with converging PW cutoff

130 views
Skip to first unread message

Léon Luntadila Lufungula

unread,
Jun 2, 2023, 9:44:38 AM6/2/23
to cp2k

Dear all,

 

I am currently switching from Quantum ESPRESSO (QE) to CP2K as my main computational software package (currently using version 8.2) and I am struggling a bit with the convergence tests for the PW cutoffs (REL_CUTOFF and CUTOFF). My intended structures to investigate are moderate-sized organic molecules adsorbed onto a (101) surface of anatase (TiO2) and as such I am using an optimized structure from my QE calculations as a representative system to do my convergence tests on (see attached file 3mppa-md1.inp). I based my method on the method proposed by Prof. Hütter in a previous post, whereby I first set REL_CUTOFF=CUTOFF and increase the value until I reach convergence. The results I got are the following:

 

# Grid cutoff vs total energy

# Date: Fri Jun  2 14:09:32 CEST 2023

# PWD: /home/lluntadilal/cp2k/scf/dft/test/final/convergence/cutoff

# Cutoff (Ry) | Relative cutoff (Ry) | Total energy (a.u.) | Total charge (a.u.)

          300                    300      -3303.4693919783          0.0000049144

          400                    400      -3303.4678396250         -0.0000000118

          500                    500      -3303.4658109937         -0.0000000003

          600                    600      -3303.4675587607         -0.0000000003

          700                    700      -3303.4671967038         -0.0000000003

          800                    800      -3303.4663947747         -0.0000000003

          900                    900      -3303.4659684557         -0.0000000003

         1000                   1000      -3303.4657584430         -0.0000000002

         1100                   1100      -3303.4651289391         -0.0000000002

         1200                   1200      -3303.4650897922         -0.0000000003

         1300                   1300      -3303.4651986119         -0.0000000002

         1400                   1400      -3303.4651800964         -0.0000000002

         1500                   1500      -3303.4650037920         -0.0000000002

         1600                   1600      -3303.4650956961         -0.0000000002

         1700                   1700      -3303.4651701336         -0.0000000002

         1800                   1800      -3303.4651578599         -0.0000000002

         1900                   1900      -3303.4651999129         -0.0000000002

         2000                   2000      -3303.4651936486         -0.0000000002

 

I have several questions about this:

  1. I would like to be able to give the energies of my structures accurate up to 0.01 kJ/mol which is about 1.10^-6 a.u. Unfortunately, I only reach this level of accuracy at a cutoff of 2000 Ry… This seems quite a large cutoff as I see similar calculations with cutoffs between 400-1200 Ry and also because the charge is already converged at 500 Ry. Am I doing something wrong or is my criteria just too strict? Does this perhaps have anything to do with the fact that the relative position of the atoms to the grid points changes with the cutoff as mentioned by Prof. Hütter in his post?
  2. The faq and converging cutoff exercise state that the PW cutoff should be large enough to properly represent the Gaussian with the largest exponent, which in my system seems to be oxygen with an exponent around 10.4 for the DZVP-MOLOPT-SR-GTH basis set. So is it then correct to use such a complex structure (3-layer slab with adsorbate and 30Å vacuum width) with "complex" options (dipole and dispersion corrections) as input for my convergence tests or could I use a simpler structure (e.g. an oxygen molecule in a box) with more basic settings (no corrections) or would this be insufficient?
  3. I may be planning to use larger basis sets ("regular" DZVP, TZVP or TZV2P) of the MOLOPT family in the future and I have seen that the largest exponents for these sets is the same as that for the smaller DZVP-SR basis set (10.4 for oxygen). Is it correct then to assume that once I obtain optimized cutoffs for DZVP-SR, these can be kept when switching to any of the larger basis sets?
  4. Lastly, I would like to ask for some general feedback on the input for my slab calculation as this is my first calculation on CP2K and I'm still getting used to all the settings. Is it okay to use 3D periodicity with a large vacuum space and a dipole correction or is it better to use 2D periodicity with a corresponding Poisson solver (e.g. MT, analytic or wavelet)? Is it okay to use the WC functional with basis sets, pseudopotentials and D3 settings optimized for PBE?

 

Any help would be greatly appreciated!

 

Kind regards,

Léon

 

P.S. For those looking at my structure in a graphical environment and noticing that some atoms are outside the unit cell. This is due to the fact that my cell was monoclinic and I made the unit cell orthorhombic to save computational time and trouble (some codes have trouble dealing with cells that are not orthorhombic), but I did not yet wrap all my atoms into the unit cell. However, I don't think this should be a problem under PBC.

Léon Luntadila Lufungula

unread,
Jun 5, 2023, 12:59:35 AM6/5/23
to cp2k
Dear all,

Apparently I forgot to add my input file in my previous message, so I have included it as an attachment in this reply. I'm eagerly looking forward to your replies and thank you in advance.

Kind regards,
Léon

3mppa-md1.inp

Lobna Saeed

unread,
Jun 5, 2023, 3:19:01 AM6/5/23
to cp...@googlegroups.com
I had the same exact issues with the convergence !! exactly the same. I was also confused about the largest exponent as well. When I used this https://www.cp2k.org/faq:cutoff, I got a very high cutoff value which when I employed deviated very much from the experimental values. So may be you need to look at other values, other than the total energies. The total energies we get here are not by any mean realistic. When I compared the total energy values I got from VASP with the values we get from CP2K (for single elements), I got completely different results. So when I increased the basis sets I was able to get the same values for Al and Nb, other elements like Ti REALLY need optimization of the basis sets and pseudopotentials. Therefore you should try to look at other values other than the total energies (like the lattice parameters for example) to be able to deduce a final conclusion about the cutoff value.

--
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/ee55ab54-b914-49fb-bd8d-f185f91b09een%40googlegroups.com.

Léon Luntadila Lufungula

unread,
Jun 5, 2023, 5:27:03 AM6/5/23
to cp2k

Dear Lobna,

Thanks for the reply! 

I can see that the total energies may differ from those obtained with other QC software packages as the computational methods (implementation, basis set, etc.) might be different, but I would think that this does not influence the convergence of the total energy as a function of the cutoff. 

I could indeed compare the lattice parameters of a calculated anatase unit cell at different cutoffs with those found experimentally, but wouldn't it be computationally expensive to check as I would have to do CELL_OPT calculations for each cutoff as opposed to simple ENERGY calculations? Also, should thermal effects be taken into account in some way as CELL_OPT calculations are at 0K and the experimental CIF was recorded at RT?

You also mention that Ti requires an optimization of the basis set and pseudopotentials, but I don't know how I would go about doing this optimization, do you have any suggestions?

Kind regards,
Léon

Jürg Hutter

unread,
Jun 5, 2023, 5:50:56 AM6/5/23
to cp...@googlegroups.com
Hi
please only compare codes for quantities that can be transferred. For example, it is almost
impossible to compare total energies. Relative energies or other properties can be
compared for equivalent settings.
If you have identified a pseudopotential/basis set problem for CP2K, please provide us with the
necessary information and we will investigate.
Thank you
JH

________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Lobna Saeed <lobna...@gmail.com>
Sent: Monday, June 5, 2023 9:18 AM
To: cp...@googlegroups.com
Subject: Re: [CP2K:18885] Re: Problems with converging PW cutoff

I had the same exact issues with the convergence !! exactly the same. I was also confused about the largest exponent as well. When I used this https://www.cp2k.org/faq:cutoff, I got a very high cutoff value which when I employed deviated very much from the experimental values. So may be you need to look at other values, other than the total energies. The total energies we get here are not by any mean realistic. When I compared the total energy values I got from VASP with the values we get from CP2K (for single elements), I got completely different results. So when I increased the basis sets I was able to get the same values for Al and Nb, other elements like Ti REALLY need optimization of the basis sets and pseudopotentials. Therefore you should try to look at other values other than the total energies (like the lattice parameters for example) to be able to deduce a final conclusion about the cutoff value.

On Mon, Jun 5, 2023 at 6:59 AM Léon Luntadila Lufungula <Leon.luntad...@uantwerpen.be<mailto:Leon.luntad...@uantwerpen.be>> wrote:
Dear all,

Apparently I forgot to add my input file in my previous message, so I have included it as an attachment in this reply. I'm eagerly looking forward to your replies and thank you in advance.

Kind regards,
Léon

On Friday, 2 June 2023 at 15:44:38 UTC+2 Léon Luntadila Lufungula wrote:

Dear all,



I am currently switching from Quantum ESPRESSO (QE) to CP2K as my main computational software package (currently using version 8.2) and I am struggling a bit with the convergence tests for the PW cutoffs (REL_CUTOFF and CUTOFF). My intended structures to investigate are moderate-sized organic molecules adsorbed onto a (101) surface of anatase (TiO2) and as such I am using an optimized structure from my QE calculations as a representative system to do my convergence tests on (see attached file 3mppa-md1.inp). I based my method on the method proposed by Prof. Hütter in a previous post<https://groups.google.com/g/cp2k/c/ySUAYEgwmhc>, whereby I first set REL_CUTOFF=CUTOFF and increase the value until I reach convergence. The results I got are the following:



# Grid cutoff vs total energy

# Date: Fri Jun 2 14:09:32 CEST 2023

# PWD: /home/lluntadilal/cp2k/scf/dft/test/final/convergence/cutoff

# Cutoff (Ry) | Relative cutoff (Ry) | Total energy (a.u.) | Total charge (a.u.)

300 300 -3303.4693919783<tel:(469)%20391-9783> 0.0000049144

400 400 -3303.4678396250 -0.0000000118

500 500 -3303.4658109937 -0.0000000003

600 600 -3303.4675587607 -0.0000000003

700 700 -3303.4671967038 -0.0000000003

800 800 -3303.4663947747 -0.0000000003

900 900 -3303.4659684557 -0.0000000003

1000 1000 -3303.4657584430 -0.0000000002

1100 1100 -3303.4651289391 -0.0000000002

1200 1200 -3303.4650897922 -0.0000000003

1300 1300 -3303.4651986119 -0.0000000002

1400 1400 -3303.4651800964 -0.0000000002

1500 1500 -3303.4650037920 -0.0000000002

1600 1600 -3303.4650956961 -0.0000000002

1700 1700 -3303.4651701336 -0.0000000002

1800 1800 -3303.4651578599 -0.0000000002

1900 1900 -3303.4651999129 -0.0000000002

2000 2000 -3303.4651936486 -0.0000000002



I have several questions about this:

1. I would like to be able to give the energies of my structures accurate up to 0.01 kJ/mol which is about 1.10^-6 a.u. Unfortunately, I only reach this level of accuracy at a cutoff of 2000 Ry… This seems quite a large cutoff as I see similar calculations with cutoffs between 400-1200 Ry and also because the charge is already converged at 500 Ry. Am I doing something wrong or is my criteria just too strict? Does this perhaps have anything to do with the fact that the relative position of the atoms to the grid points changes with the cutoff as mentioned by Prof. Hütter in his post?
2. The faq<https://www.cp2k.org/faq:cutoff> and converging cutoff exercise<https://www.cp2k.org/events:2018_summer_school:converging_cutoff> state that the PW cutoff should be large enough to properly represent the Gaussian with the largest exponent, which in my system seems to be oxygen with an exponent around 10.4 for the DZVP-MOLOPT-SR-GTH basis set. So is it then correct to use such a complex structure (3-layer slab with adsorbate and 30Å vacuum width) with "complex" options (dipole and dispersion corrections) as input for my convergence tests or could I use a simpler structure (e.g. an oxygen molecule in a box) with more basic settings (no corrections) or would this be insufficient?
3. I may be planning to use larger basis sets ("regular" DZVP, TZVP or TZV2P) of the MOLOPT family in the future and I have seen that the largest exponents for these sets is the same as that for the smaller DZVP-SR basis set (10.4 for oxygen). Is it correct then to assume that once I obtain optimized cutoffs for DZVP-SR, these can be kept when switching to any of the larger basis sets?
4. Lastly, I would like to ask for some general feedback on the input for my slab calculation as this is my first calculation on CP2K and I'm still getting used to all the settings. Is it okay to use 3D periodicity with a large vacuum space and a dipole correction or is it better to use 2D periodicity with a corresponding Poisson solver (e.g. MT, analytic or wavelet)? Is it okay to use the WC functional with basis sets, pseudopotentials and D3 settings optimized for PBE?



Any help would be greatly appreciated!



Kind regards,

Léon



P.S. For those looking at my structure in a graphical environment and noticing that some atoms are outside the unit cell. This is due to the fact that my cell was monoclinic and I made the unit cell orthorhombic to save computational time and trouble (some codes have trouble dealing with cells that are not orthorhombic), but I did not yet wrap all my atoms into the unit cell. However, I don't think this should be a problem under PBC.

--
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<mailto:cp2k+uns...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/ee55ab54-b914-49fb-bd8d-f185f91b09een%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/ee55ab54-b914-49fb-bd8d-f185f91b09een%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+uns...@googlegroups.com<mailto:cp2k+uns...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/CAFNXbSySOcPZ7aPDwgKHVsJNm6a5zLgQhS8Cdd0TNXwk0Uz9Jw%40mail.gmail.com<https://groups.google.com/d/msgid/cp2k/CAFNXbSySOcPZ7aPDwgKHVsJNm6a5zLgQhS8Cdd0TNXwk0Uz9Jw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Lobna Saeed

unread,
Jun 5, 2023, 5:52:24 AM6/5/23
to cp...@googlegroups.com
Dear Leon, 

I really like the first question but I don't have an answer for it. I am quite puzzled as much as you! But what I know is that the total energy for Ti will always be the same. even if you change the basis sets and so on. If those codes and algorithms are implemented correctly!! 

ohh I didn't notice that. You are correct, it would be too much to test each cutoff value for cell optimizations. But what I did was just taking 350, 450, 750Ry for the cell opt for small system. Those are the values that were of interest.

Yes I didn't do that. But I believe there are some tutorials on cp2k website :) 

good luck and have a nice day, 
Lobna. 

Lobna Saeed

unread,
Jun 5, 2023, 5:53:54 AM6/5/23
to cp...@googlegroups.com
I didnt identify anything wrong with cp2k pseudopotentials or basis sets. But we also all know that with some elements we need to do optimization for basis sets, at least ! 

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/ZR0P278MB0759414027400CDE6DA512D89F4DA%40ZR0P278MB0759.CHEP278.PROD.OUTLOOK.COM.

Léon Luntadila Lufungula

unread,
Jun 5, 2023, 6:15:40 AM6/5/23
to cp2k
Dear Prof. Hütter,

Thanks for the clarification on Lobna's point about the total energies as compared to those calculated in other codes. Do you perhaps have any tips or remarks regarding my initial questions? I am quite stuck in my progress until I find a way to properly converge my cutoffs and I think you're expertise might help me get past this problem. 

Thanks in advance!

Kind regards,
Léon

Léon Luntadila Lufungula

unread,
Jun 6, 2023, 5:53:08 AM6/6/23
to cp2k
Dear all,

I have just read in another post that I should include the PBE correlation functional in the XC section when using the WC functional, i.e.,

&XC_FUNCTIONAL
    &GGA_X_WC
    &END
    &GGA_C_PBE
    &END      
&END XC_FUNCTIONAL

Can someone confirm that this is how you should use the WC functional and could this influence the results of my convergence tests?

Kind regards,
Léon
Reply all
Reply to author
Forward
0 new messages