cut_off convergence test

505 views
Skip to first unread message

Peng

unread,
Oct 9, 2021, 12:21:05 PM10/9/21
to cp2k

Dear All


I am testing the cut-off convergence of a small molecule containing C, O, and H.

I used DZVP-MOLOPT-SR-GTH and GTH-PBE Potential. The cell size is 12*12*12. However, the results do not seem to convergence with the increase of CUTOFF



REL_CUTOFF CUTOFF      E

30         300       -38.57491205267874

30         350       -38.57705683470805

30         400       -38.57963958797396

30         450       -38.58097835467991

30         500       -38.58123811731915

30         550       -38.58322670328298

30         600       -38.58323115463395

30         650       -38.58425675028782

30         700       -38.58422766929442

30         750       -38.58481036329336

30         800       -38.58583590844245

30         850       -38.58585482422554

30         900       -38.58632695910399


is there anything wrong in my calculation?


Thanks!


Best


Peng


Here is input 

&DFT

  BASIS_SET_FILE_NAME BASIS_MOLOPT

  POTENTIAL_FILE_NAME POTENTIAL

  CHARGE 0

  MULTIPLICITY 1

  &MGRID

    CUTOFF 400

    NGRIDS 5

    REL_CUTOFF 30

  &END MGRID

  &POISSON

    PERIODIC NONE

    POISSON_SOLVER WAVELET

    &MT

      ALPHA 7.0

      REL_CUTOFF 2

    &END MT

  &END POISSON

  &SCF

    SCF_GUESS ATOMIC

    EPS_SCF 5.0E-7

    CHOLESKY INVERSE_DBCSR

    MAX_SCF 1

  &END SCF

  &XC

    &XC_FUNCTIONAL PBE

    &END XC_FUNCTIONAL

    &XC_GRID

        XC_SMOOTH_RHO NN50

        XC_DERIV NN50_SMOOTH

    &END XC_GRID

    &VDW_POTENTIAL

       POTENTIAL_TYPE PAIR_POTENTIAL

       &PAIR_POTENTIAL

         TYPE DFTD3(BJ)

         CALCULATE_C9_TERM .TRUE.

         REFERENCE_C9_TERM .TRUE.

         LONG_RANGE_CORRECTION .TRUE.

         PARAMETER_FILE_NAME dftd3.dat

         REFERENCE_FUNCTIONAL PBE

       &END PAIR_POTENTIAL

    &END VDW_POTENTIAL

  &END XC

  &PRINT

    &MULLIKEN ON

    &END MULLIKEN

  &END PRINT

&END DFT

&SUBSYS

  &CELL

    PERIODIC NONE

    ABC 12. 12. 12.

  &END CELL

  &TOPOLOGY

    COORD_FILE_FORMAT XYZ

    &COORD

      C                 -0.29131987    1.11177168    0.00000000

      H                 -1.36131987    1.11177168    0.00000000

      O                  0.35709693    2.24001693    0.00000000

      O                  0.35709693   -0.01647356    0.00000000

      H                 -0.26781770   -0.74522709    0.00000000

    &END COORD

    &CENTER_COORDINATES T

    &END CENTER_COORDINATES

  &END TOPOLOGY

  &KIND H

    BASIS_SET SZV-MOLOPT-SR-GTH

    POTENTIAL GTH-PBE-q1

  &END KIND

  &KIND C

    BASIS_SET DZVP-MOLOPT-SR-GTH-q4

    POTENTIAL GTH-PBE-q4

  &END KIND

  &KIND O

    BASIS_SET DZVP-MOLOPT-SR-GTH-q6

    POTENTIAL GTH-PBE-q6

  &END KIND

&END SUBSYS


hut...@chem.uzh.ch

unread,
Oct 12, 2021, 8:31:54 AM10/12/21
to cp...@googlegroups.com
Hi

convergence tests for the PW cutoff have to be done with care.
There are several parameters and defaults that depend on how
you define your series.
To get convergence you should always use a converged REL_CUTOFF
and no multigrids (NGRIDS 1). There is also the problem for
nonsymmetric molecules that with the cutoff the relative position
of the atoms to the grid points changes.
Of course you also have to converge your wavefunction properly
(MAX_SCF 1 is a nogo!).

In this example (CH3OH in a small box, PBE functional) I have first
set REL_CUTOFF=CUTOFF and increased the value (This is equivalent
to set NGRIDS=1). Then to see the effect of the grid I moved the
molecule by 0.01 and 0.1 Angstrom.
Finally, I reduced the value of REL_CUTOFF (with fixed CUTOFF) to
reasonable values (40-80).

From these results I would use 400/60 for production runs. The
Charge is accurate and the total energy within 10^-3 eV, relative
energies probably much better. Translational energy fluctuation will
be about the same or better.

CUTOFF REL_CUTOFF ENERGY CHARGE
200 200 -24.06620206 0.0000002385
300 300 -24.06599462 0.0000000036
400 400 -24.06596236 0.0000000000
500 500 -24.06599436 0.0000000000
600 600 -24.06599950 0.0000000000
700 700 -24.06598949 0.0000000000
800 800 -24.06596557 0.0000000000
900 900 -24.06596112 0.0000000000
1000 1000 -24.06596112 0.0000000000

Coordinate shift +0.01
1000 1000 -24.06595929 0.0000000000
Coordinate shift +0.1
1000 1000 -24.06596076 0.0000000000

1000 1000 -24.06596112 0.0000000000
1000 500 -24.06596112 0.0000000000
1000 100 -24.06596112 0.0000000000
1000 80 -24.06596112 0.0000000000
1000 60 -24.06596112 0.0000000000
1000 40 -24.06596109 0.0000000000
1000 30 -24.06595988 0.0000000000

Coordinate shift +0.01
1000 60 -24.06595929 0.0000000000
Coordinate shift +0.1
1000 60 -24.06596076 0.0000000000

--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491
Institut für Chemie E-mail: hut...@chem.uzh.ch
Universität Zürich
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp...@googlegroups.com wrote: -----
To: "cp2k" <cp...@googlegroups.com>
From: "Peng"
Sent by: cp...@googlegroups.com
Date: 10/09/2021 06:21PM
Subject: [CP2K:16023] cut_off convergence test
--
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/95c67940-8f34-4bf4-86b8-d03b0c39b369n%40googlegroups.com.

Peng

unread,
Oct 12, 2021, 12:36:35 PM10/12/21
to cp2k
Dear Prof. Hutter

Thank you so much for this detailed suggestions. I will do follow your instructions to try to reproduce your results. Meanwhile, should this procedure be used to study the convergence for general non-periodic calculations that involve either a small molecule or a cluster? For periodic calculations, one should still follow the convergence test tutorial  presented in the cp2k webpage. Thanks again!

Best

Peng

mdsimula...@gmail.com

unread,
Oct 12, 2021, 4:36:40 PM10/12/21
to cp2k
Prof. Hutter,

Are you able to give any comments on the convergence method discussed here: https://www.cp2k.org/howto:converging_cutoff

The method in the link is a bit different then the one you are proposing. 

Thank you for your input.

- Kenny

On Tuesday, October 12, 2021 at 8:31:54 AM UTC-4 jgh wrote:

hut...@chem.uzh.ch

unread,
Oct 13, 2021, 11:00:08 AM10/13/21
to cp...@googlegroups.com
Hi

the method described in the tutorial is working fine. The problem
is that one has to pick good values for the REL_CUTOFF and has to
be careful with the MAX_SCF 1 option. In addition, the test case is
very simple and leads to false expectations about the accuracy and
smoothness of convergence.
The 'easy' method I proposed will need much more CPU time but shows
a more predictable result for new users.
In any case, be aware that the cutoff needed for total energy
convergence to sub-micro Hartree (especially for GGA and meta
functionals and semicore pseudopotentials) can be very high.
This applies to GPW calculations. For GAPW the whole story is
different again!

regards

Juerg Hutter
--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491
Institut für Chemie E-mail: hut...@chem.uzh.ch
Universität Zürich
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp...@googlegroups.com wrote: -----
To: "cp2k" <cp...@googlegroups.com>
From: "mdsimula...@gmail.com"
Sent by: cp...@googlegroups.com
Date: 10/12/2021 10:36PM
Subject: Re: [CP2K:16032] cut_off convergence test
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/6bea6a08-ee7b-4dc1-8b53-b9dea81c85b9n%40googlegroups.com.

mdsimula...@gmail.com

unread,
Oct 14, 2021, 9:53:20 AM10/14/21
to cp2k
Thank you Prof Hutter!

Do you know of any literature or tutorials that discuss things that affect the cutoff convergences?  For example, if I have a cell with C,H,O,N and I've found a set of cutoff values for a molecule, can I use those convergence values for all systems that only contain C,H,O,N?

Peng

unread,
Oct 15, 2021, 2:27:57 PM10/15/21
to cp2k
Hi Prof. Hutter

I tried to reproduce the convergence test for CH3OH suggested in your earlier message, but I think I have problems even in the first step, by setting REL_CUTOFF=CUTOFF. I do not see the convergence trend even for CUTOFF=1000 Ry. In your case,  a convergence can be seen when  CUTOFF>500. I am using the v9.0 version of CP2K. Could you help to find where I did wrong.


 Here is my results for CUTOFF

 CUTOFF  REL_CUTOFF       Energy                charge


  200      200       -24.06405454506349      0.0000038989

  300      300       -24.06808627930941      0.0000000576

  400      400       -24.07019821097118      0.0000000086

  500      500       -24.07186269243992     -0.0000000002

  600      600       -24.07327835780276     -0.0000000001

  700      700       -24.07404346235946     -0.0000000001

  800      800       -24.07526696794345     -0.0000000001

  900      900       -24.07563158375670     -0.0000000001

 1000     1000     -24.07582813999740     -0.0000000001

Here is my input file

&GLOBAL

  PROJECT   energy_01

  RUN_TYPE  ENERGY

  IOLEVEL   MEDIUM

&END GLOBAL

&FORCE_EVAL

  METHOD QS

  &DFT

    BASIS_SET_FILE_NAME BASIS_MOLOPT

    POTENTIAL_FILE_NAME POTENTIAL

    LSD 0

    CHARGE 0

    MULTIPLICITY 1

    &QS

      EPS_DEFAULT 1.0E-11

    &END QS

    &SCF

      MAX_SCF    100

      EPS_SCF    1.0E-07

      SCF_GUESS  ATOMIC

      &MIXING

         METHOD BROYDEN_MIXING

         ALPHA 0.4

         NBROYDEN 8

      &END MIXING

      &DIAGONALIZATION

         ALGORITHM STANDARD

      &END DIAGONALIZATION

    &END SCF

    &POISSON

      PERIODIC NONE

      POISSON_SOLVER WAVELET

    &END POISSON

    &MGRID

      NGRIDS        4

      CUTOFF        200

      REL_CUTOFF    200

    &END

    &XC

      &XC_FUNCTIONAL PBE

      &END XC_FUNCTIONAL

      &XC_GRID

          XC_DERIV  SPLINE3_SMOOTH

          XC_SMOOTH_RHO NN50

      &END XC_GRID

    &END XC

    &PRINT

      &MULLIKEN ON

      &END MULLIKEN

    &END PRINT

  &END DFT

  &SUBSYS

    &CELL

      PERIODIC NONE

      ABC    20.0  20.0  20.0

    &END CELL

    &TOPOLOGY

      &CENTER_COORDINATES ON

      &END CENTER_COORDINATES

    &END TOPOLOGY

    &COORD

       C       0.41022594   -0.13674197    0.00000000

       H       0.76688037   -1.14555197    0.00000000

       H       0.76689878    0.36765622   -0.87365150

       H      -0.65977406   -0.13672879    0.00000000

       O       0.88690086    0.53736028    1.16759033

       H       0.56714217    1.44254214    1.16800646

    &END COORD

    &KIND H

      BASIS_SET DZVP-MOLOPT-GTH

      POTENTIAL GTH-PBE-q1

    &END KIND

    &KIND O

      BASIS_SET DZVP-MOLOPT-GTH

      POTENTIAL GTH-PBE-q6

    &END KIND

    &KIND C

      BASIS_SET DZVP-MOLOPT-GTH

      POTENTIAL GTH-PBE-q4

    &END KIND

    &PRINT

      &ATOMIC_COORDINATES

      &END

    &END PRINT

  &END SUBSYS

&END FORCE_EVAL


hut...@chem.uzh.ch

unread,
Oct 15, 2021, 5:48:37 PM10/15/21
to cp...@googlegroups.com
Hi

don't use smoothing of the derivatives (delete this section)
&XC_GRID
XC_DERIV SPLINE3_SMOOTH
XC_SMOOTH_RHO NN50
&END XC_GRID
This introduces a strong cutoff dependence in the calculation.

regards

Juerg Hutter
--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491
Institut für Chemie E-mail: hut...@chem.uzh.ch
Universität Zürich
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp...@googlegroups.com wrote: -----
To: "cp2k" <cp...@googlegroups.com>
From: "Peng"
Sent by: cp...@googlegroups.com
Date: 10/15/2021 08:28PM
Subject: Re: [CP2K:16049] cut_off convergence test
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/c1d065be-75ab-4761-a06a-d554efdfa57en%40googlegroups.com.

Peng

unread,
Oct 15, 2021, 6:49:24 PM10/15/21
to cp2k
Thanks Prof. Hutter!

After removing the smoothing part, it seems that I can achieve a convergence (see results below) when cutoff>500. 

One more question, when performing coordinate shift tests (+0.1 and + 0.01), should I shift the coordinates of all the atoms in all three X,Y,Z directions, or should I just shift the coordinate in one direction? say, for example, shift all the x coordinates. In addition, should I turn off the CENTER_COORDINATES? because it will move the molecule back to the center of the box. Thanks again!

 CUTOFF  REL_CUTOFF       Energy                charge


  200      200       -24.08040968      0.0000039551

  300      300       -24.08036892      0.0000000576

  400      400       -24.08045900      0.0000000086

  500      500       -24.08024686     -0.0000000002

  600      600       -24.08026542     -0.0000000001

  700      700       -24.08027280     -0.0000000001

  800      800       -24.08029619     -0.0000000001

  900      900       -24.08029420     -0.0000000001

 1000     1000       -24.08029223     -0.0000000001

hut...@chem.uzh.ch

unread,
Oct 18, 2021, 3:47:45 AM10/18/21
to cp...@googlegroups.com
Hi

these are only general guidelines. You need to change the
position within the grid. How you do that (shift vector)
depends on your system.
Yes, CENTER_COORDINATES does what it says. Any constant shift
is reversed.

regards

Juerg Hutter
--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491
Institut für Chemie E-mail: hut...@chem.uzh.ch
Universität Zürich
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp...@googlegroups.com wrote: -----
To: "cp2k" <cp...@googlegroups.com>
From: "Peng"
Sent by: cp...@googlegroups.com
Date: 10/16/2021 12:49AM
Subject: Re: [CP2K:16054] cut_off convergence test
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/50de8c48-a205-4344-ae45-eb18580fdee3n%40googlegroups.com.

Peng

unread,
Oct 18, 2021, 9:13:59 PM10/18/21
to cp2k
Thanks Prof. Hutter!

Now I have a better control of the cutoff convergence for a small molecule in a non-periodic box, however when I applied this strategy to a calculation of a CdSe cluster (~500 atoms), I have a very strange problem. The diameter of the cluster is about 3nm. I chose a 45*45*45 box. Following the earlier approach, when performing the cutoff test (setting REL_CUTOFF=CUTOFF), the SCF energy suddenly changed (see below) significantly when CUTOFF=650 Ry. All the SCF energies were converged except the one with CUTOFF=650. I tried to enlarge the box size, and I found that this SCF energy sudden change phenomenon occurs at a smaller CUTOFF value when using a larger box. Any suggestion for this issue? Thanks! (the wavelet option was used for Possion_SOLVER)


CUTOFF REL_CUT_OFF          Energy           Charge

450      450       -15736.33366518359071 0.0000000201

500      500       -15736.33371958214047 0.0000000125

550      550       -15736.33378290074324 0.0000000513

600      600       -15736.33375419164440 0.0000000242

650      650       -46486.2890295731                    (NOT converged)

hut...@chem.uzh.ch

unread,
Oct 19, 2021, 4:21:19 AM10/19/21
to cp...@googlegroups.com
Hi

you don't need to do cutoff tests for a system this large. Results
will be the same as for a system of 10 atoms.

What causes the problem you see cannot be determined from the little
information available.

regards

Juerg Hutter
--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491
Institut für Chemie E-mail: hut...@chem.uzh.ch
Universität Zürich
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp...@googlegroups.com wrote: -----
To: "cp2k" <cp...@googlegroups.com>
From: "Peng"
Sent by: cp...@googlegroups.com
Date: 10/19/2021 03:14AM
Subject: Re: [CP2K:16085] cut_off convergence test
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/229f69b1-3e15-4b7e-a3fa-4ff13c2e1c0an%40googlegroups.com.

Peng

unread,
Oct 19, 2021, 11:11:52 AM10/19/21
to cp2k
Hi Prof. Hutter, Thanks for the suggestion. I uploaded the related input file for the cluster calculation. Could you please take a look for the potential problem? Thanks again!

Best wishes

Peng
energy_08.inp
dft-common-params.inc
subsys.inc
geom.xyz

hut...@chem.uzh.ch

unread,
Oct 21, 2021, 3:03:40 AM10/21/21
to cp...@googlegroups.com
Hi

seems to be related to the Wavelet solver. Unfortunately, I don't
have time to look into this at the moment.

regards

Juerg Hutter
--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491
Institut für Chemie E-mail: hut...@chem.uzh.ch
Universität Zürich
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp...@googlegroups.com wrote: -----
To: "cp2k" <cp...@googlegroups.com>
From: "Peng"
Sent by: cp...@googlegroups.com
Date: 10/19/2021 05:12PM
Subject: Re: [CP2K:16093] cut_off convergence test
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/723d52c8-b9fa-4470-903f-fa427a3df1e5n%40googlegroups.com.


[attachment "energy_08.inp" removed by Jürg Hutter/at/UZH]
[attachment "dft-common-params.inc" removed by Jürg Hutter/at/UZH]
[attachment "subsys.inc" removed by Jürg Hutter/at/UZH]
[attachment "geom.xyz" removed by Jürg Hutter/at/UZH]
Reply all
Reply to author
Forward
0 new messages