CP2K M06-2X water energy lower vs Other program

389 views
Skip to first unread message

mdsimula...@gmail.com

unread,
Sep 24, 2020, 9:59:54 AM9/24/20
to cp2k
Hello,

The water energy at the M06-2X/6-31G** level is quite different when compared to Gaussian and the CCCBDB.

Gaussian: -76.3831231205 Ha (#n M062X/6-31G** NoSymm SCF=(XQC, maxconventionalcycles=30) Int=UltraFine SP)
CP2K:        -76.401243254272231Ha

Anyone have any ideas on what settings need to be modified or can CP2K match that energy?

My CP2K input:
****************************************************************************
@SET COORD_FILENAME water.xyz

&GLOBAL
PROJECT H2O_Eng
RUN_TYPE ENERGY
PRINT_LEVEL LOW
&END GLOBAL

&FORCE_EVAL
METHOD Quickstep

&DFT
BASIS_SET_FILE_NAME EMSL_BASIS_SETS
POTENTIAL_FILE_NAME POTENTIAL

CHARGE 0
MULTIPLICITY 1

&QS
METHOD GAPW
EPS_DEFAULT 1.0E-9
EXTRAPOLATION ASPC
MAP_CONSISTENT
EPSFIT       1.E-4 ! precision to give the extension of a hard gaussian
EPSISO       1.0E-12
EPSRHO0      1.E-8
LMAXN0       4
LMAXN1       6
ALPHA0_H     10 ! Exponent for hard compensation charge
    &END QS

&MGRID
NGRIDS 5
CUTOFF 600
REL_CUTOFF 100
&END MGRID

&SCF
MAX_SCF 50
SCF_GUESS ATOMIC
EPS_SCF 1E-8
&END SCF

&POISSON
PERIODIC NONE
POISSON_SOLVER WAVELET
&END POISSON

&XC
&XC_GRID
XC_DERIV NN10_SMOOTH
XC_SMOOTH_RHO NN10
&END XC_GRID
&XC_FUNCTIONAL
&LIBXC
FUNCTIONAL MGGA_C_M06_2X
&END LIBXC
&LIBXC
FUNCTIONAL HYB_MGGA_X_M06_2X 
&END LIBXC
&END XC_FUNCTIONAL
&HF
FRACTION 0.54
&SCREENING
EPS_SCHWARZ 1.0E-10
&END SCREENING
&MEMORY
MAX_MEMORY 1000
EPS_STORAGE_SCALING 0.1
&END MEMORY
&INTERACTION_POTENTIAL
POTENTIAL_TYPE COULOMB
&END INTERACTION_POTENTIAL
&END HF
&END XC
&END DFT

&SUBSYS
&CELL
ABC 10.0 10.0 10.0
ALPHA_BETA_GAMMA 90.000 90.000 90.000
PERIODIC NONE
&END CELL
&TOPOLOGY
COORD_FILE_FORMAT XYZ
COORD_FILE_NAME ${COORD_FILENAME}
&CENTER_COORDINATES
&END CENTER_COORDINATES
&END TOPOLOGY

&KIND H
ELEMENT H
BASIS_SET 6-31Gxx
POTENTIAL ALL
LEBEDEV_GRID 80
RADIAL_GRID 200
&END KIND

&KIND O
ELEMENT O
BASIS_SET 6-31Gxx
POTENTIAL ALL
LEBEDEV_GRID 80
RADIAL_GRID 200
&END KIND
&END SUBSYS
&END FORCE_EVAL

hut...@chem.uzh.ch

unread,
Sep 24, 2020, 10:27:08 AM9/24/20
to cp...@googlegroups.com
Hi
check the number of basis functions. Part or hopefully all of the
energy difference is from the (6d) default in Gaussian.
CP2K uses spherical functions only.

regards

JH
--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491
Institut für Chemie C FAX : ++41 44 635 6838
Universität Zürich E-mail: hut...@chem.uzh.ch
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: 09/24/2020 04:00PM
Subject: [CP2K:13967] CP2K M06-2X water energy lower vs Other program
--
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/3d887e97-17e0-4340-835a-1e5db270f0e6n%40googlegroups.com.

mdsimula...@gmail.com

unread,
Sep 24, 2020, 11:17:32 AM9/24/20
to cp2k
Hi Prof Hutter,

Here's from CP2K
 Total number of            - Atomic kinds:                                   2
                             - Atoms:                                          3
                             - Shell sets:                                    10
                             - Shells:                                        12
                             - Primitive Cartesian functions:                 21
                             - Cartesian basis functions:                     25
                             - Spherical basis functions:                     24

This is from Gaussian
Standard basis: 6-31G(d,p) (6D, 7F)
    25 basis functions,    42 primitive gaussians,    25 cartesian basis functions

hut...@chem.uzh.ch

unread,
Sep 24, 2020, 11:54:36 AM9/24/20
to cp...@googlegroups.com
Hi

so as I said, the basis sets are different and that makes the
results different.

JH
--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491
Institut für Chemie C FAX : ++41 44 635 6838
Universität Zürich E-mail: hut...@chem.uzh.ch
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: 09/24/2020 05:17PM
Subject: Re: [CP2K:13969] CP2K M06-2X water energy lower vs Other program
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/30f65c0c-fe59-4345-bda0-7b142795e86dn%40googlegroups.com.

mdsimula...@gmail.com

unread,
Sep 24, 2020, 12:10:36 PM9/24/20
to cp2k
Thanks Prof Hutter! 

Krack Matthias (PSI)

unread,
Sep 24, 2020, 12:49:33 PM9/24/20
to cp...@googlegroups.com

Hi Jürg

 

Unfortunately, there seems to be more than the 5d/6d difference when using the M06-2X functional. A comparison of the H2O structures relaxed with 6-31G** using BLYP, HF, B3LYP, and M06-2X reveals indeed a much larger difference for M06-2X:

 

H2O/6-31G**

     CCCBDB

        CP2K

BLYP      

 -76.398885

  -76.396840

HF        

 -76.023615

  -76.023047

B3LYP     

 -76.419737

  -76.418114

M06-2X     

 -76.383939

  -76.378

 

Moreover, the GEO_OPT run with M06-2X shows difference in the OH bonds which indicates wrong forces and indeed a DEBUG run reveals that there exists a problem related to M06-2X using the XC section as suggested:

 

DEBUG| Atom  Coordinate   f(numerical)   f(analytical)   Difference   Error [%]

DEBUG|    1      x          0.00000768     -0.00011877  -0.00012645     -106.47

DEBUG|    1      y         -0.00006753      0.00169850   0.00176603     -103.98

DEBUG|    1      z         -0.00096067     -0.00096000   0.00000066        0.07

application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

 

*******************************************************************************

*   ___                                                                       *

*  /   \                                                                      *

* [ABORT]      A mismatch between analytical and numerical forces has been    *

*  \___/       detected. Check the implementation of the analytical force     *

*    |                                 calculation                            *

*  O/|                                                                        *

* /| |                                                                        *

* / \                                                        cp2k_debug.F:318 *

*******************************************************************************

 

A debug run with B3LYP works fine with errors of only 0.01%.

 

So there is either an input error (&XC section with M06-2X) or a bug in CP2K (or libxc).

 

Best regards

 

Matthias

 

-----Original Message-----
From: cp...@googlegroups.com <cp...@googlegroups.com> On Behalf Of hut...@chem.uzh.ch
Sent: Donnerstag, 24. September 2020 17:53
To: cp...@googlegroups.com
Subject: Re: [CP2K:13969] CP2K M06-2X water energy lower vs Other program

 

Hi

 

so as I said, the basis sets are different and that makes the results different.

 

JH

--------------------------------------------------------------

Juerg Hutter                         Phone : ++41 44 635 4491

Institut für Chemie C                FAX   : ++41 44 635 6838

Universität Zürich                   E-mail: hut...@chem.uzh.ch

Winterthurerstrasse 190

CH-8057 Zürich, Switzerland

---------------------------------------------------------------

 

hut...@chem.uzh.ch

unread,
Sep 24, 2020, 12:56:28 PM9/24/20
to cp...@googlegroups.com
Hi Matthias

thank you. Can I ask you to run the same debug run for M06L
and TPSS, two other meta functionals?

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

-----cp...@googlegroups.com wrote: -----
To: "'cp...@googlegroups.com'" <cp...@googlegroups.com>
From: "Krack Matthias (PSI)"
Sent by: cp...@googlegroups.com
Date: 09/24/2020 06:49PM
Subject: RE: [CP2K:13971] CP2K M06-2X water energy lower vs Other program
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/b66e4f318bca4a2abc719d351e506c5d%40psi.ch.

Krack Matthias (PSI)

unread,
Sep 24, 2020, 1:13:45 PM9/24/20
to cp...@googlegroups.com

Hi Jürg

 

The debug run fails also with

 

&XC_FUNCTIONAL TPSS

&END XC_FUNCTIONAL

 

DEBUG| Atom  Coordinate   f(numerical)   f(analytical)   Difference   Error [%]

DEBUG|    1      x         -0.00000225     -0.00062077  -0.00061852      -99.64

DEBUG|    1      y         -0.00000225     -0.00050477  -0.00050253      -99.55

DEBUG|    1      z          0.01173212      0.01219262   0.00046050       -3.78

 

Matthias

 

-----Original Message-----
From: cp...@googlegroups.com <cp...@googlegroups.com> On Behalf Of hut...@chem.uzh.ch
Sent: Donnerstag, 24. September 2020 18:55
To: cp...@googlegroups.com
Subject: RE: [CP2K:13972] CP2K M06-2X water energy lower vs Other program

 

Hi Matthias

 

thank you. Can I ask you to run the same debug run for M06L and TPSS, two other meta functionals?

 

Juerg

--------------------------------------------------------------

Juerg Hutter                         Phone : ++41 44 635 4491

Institut für Chemie C                FAX   : ++41 44 635 6838

Universität Zürich                   E-mail: hut...@chem.uzh.ch

Winterthurerstrasse 190

CH-8057 Zürich, Switzerland

---------------------------------------------------------------

 

Lucas Lodeiro

unread,
Sep 24, 2020, 1:16:55 PM9/24/20
to cp...@googlegroups.com
Hello Professor Hutter,

I am a little confused about the orbitals that uses CP2K. You and the CP2K paper mention that only spherical functions are used, but in the output (with the same input of the first message, justo with print_level medium) shows that 6 d functions are used for oxygen. CP2K internally transforms those 6 cartesian functions in the spherical ones? There is another "change" respect the ATOMIC KIND INFORMATION printed in the output?

Regards - Lucas Lodeiro

******************************************************************************************************************
 ATOMIC KIND INFORMATION

  1. Atomic kind: O                                     Number of atoms:       1

     Orbital Basis Set                                                   6-31Gxx

       Number of orbital shell sets:                                           4
       Number of orbital shells:                                               6
       Number of primitive Cartesian functions:                               11
       Number of Cartesian basis functions:                                   15
       Number of spherical basis functions:                                   14
       Norm type:                                                              2

       Normalised Cartesian orbitals:

                        Set   Shell   Orbital            Exponent    Coefficient

                          1       1    1s             5484.671700       0.831735
                                                       825.234950       1.530807
                                                       188.046960       2.477149
                                                        52.964500       3.256280
                                                        16.897570       2.792894
                                                         5.799635       0.954938

                          2       1    1s               15.539616      -0.617934
                                                         3.599934      -0.275721
                                                         1.013762       0.814208

                          2       2    2px              15.539616       3.116946
                                                         3.599934       2.401437
                                                         1.013762       1.054361
                          2       2    2py              15.539616       3.116946
                                                         3.599934       2.401437
                                                         1.013762       1.054361
                          2       2    2pz              15.539616       3.116946
                                                         3.599934       2.401437
                                                         1.013762       1.054361

                          3       1    1s                0.270006       0.266956

                          3       2    2px               0.270006       0.277432
                          3       2    2py               0.270006       0.277432
                          3       2    2pz               0.270006       0.277432

                          4       1    1dx2              0.800000       1.113825
                          4       1    1dxy              0.800000       1.929201
                          4       1    1dxz              0.800000       1.929201
                          4       1    1dy2              0.800000       1.113825
                          4       1    1dyz              0.800000       1.929201
                          4       1    1dz2              0.800000       1.113825

     The atoms of this atomic kind are PAW atoms (GAPW):
       Hard Gaussian function radius:                                      1.512
       Rho0 radius:                                                        1.512
       Maximum GTO radius used for PAW projector construction:            24.566

     GAPW Soft Basis Set                                            6-31Gxx_soft

       Number of orbital shell sets:                                           4
       Number of orbital shells:                                               6
       Number of primitive Cartesian functions:                                4
       Number of Cartesian basis functions:                                   15
       Number of spherical basis functions:                                   14
       Norm type:                                                              2

       Normalised Cartesian orbitals:

                        Set   Shell   Orbital            Exponent    Coefficient

                          1       1    1s        

                          2       1    1s                3.599934      -0.275721
                                                         1.013762       0.814208

                          2       2    2px               3.599934       2.401437
                                                         1.013762       1.054361
                          2       2    2py               3.599934       2.401437
                                                         1.013762       1.054361
                          2       2    2pz               3.599934       2.401437
                                                         1.013762       1.054361

                          3       1    1s                0.270006       0.266956

                          3       2    2px               0.270006       0.277432
                          3       2    2py               0.270006       0.277432
                          3       2    2pz               0.270006       0.277432

                          4       1    1dx2              0.800000       1.113825
                          4       1    1dxy              0.800000       1.929201
                          4       1    1dxz              0.800000       1.929201
                          4       1    1dy2              0.800000       1.113825
                          4       1    1dyz              0.800000       1.929201
                          4       1    1dz2              0.800000       1.113825

     AE Potential information for                                            ALL

       Description:                                       All-electron potential
                                          Krack, Parrinello, PCCP 2, 2105 (2000)

       Gaussian exponent of the core charge distribution:               8.154466
       Electronic configuration (s p d ...):                           4   4   0

  2. Atomic kind: H                                     Number of atoms:       2

     Orbital Basis Set                                                   6-31Gxx

       Number of orbital shell sets:                                           3
       Number of orbital shells:                                               3
       Number of primitive Cartesian functions:                                5
       Number of Cartesian basis functions:                                    5
       Number of spherical basis functions:                                    5
       Norm type:                                                              2

       Normalised Cartesian orbitals:

                        Set   Shell   Orbital            Exponent    Coefficient

                          1       1    1s               18.731137       0.214935
                                                         2.825394       0.364571
                                                         0.640122       0.415051

                          2       1    1s                0.161278       0.181381

                          3       1    1px               1.100000       1.605761
                          3       1    1py               1.100000       1.605761
                          3       1    1pz               1.100000       1.605761

     The atoms of this atomic kind are PAW atoms (GAPW):
       Hard Gaussian function radius:                                      1.200
       Rho0 radius:                                                        1.200
       Maximum GTO radius used for PAW projector construction:            24.566

     GAPW Soft Basis Set                                            6-31Gxx_soft

       Number of orbital shell sets:                                           3
       Number of orbital shells:                                               3
       Number of primitive Cartesian functions:                                4
       Number of Cartesian basis functions:                                    5
       Number of spherical basis functions:                                    5
       Norm type:                                                              2

       Normalised Cartesian orbitals:

                        Set   Shell   Orbital            Exponent    Coefficient

                          1       1    1s                2.825394       0.364571
                                                         0.640122       0.415051

                          2       1    1s                0.161278       0.181381

                          3       1    1px               1.100000       1.605761
                          3       1    1py               1.100000       1.605761
                          3       1    1pz               1.100000       1.605761

     AE Potential information for                                            ALL

       Description:                                       All-electron potential
                                          Krack, Parrinello, PCCP 2, 2105 (2000)

       Gaussian exponent of the core charge distribution:              12.500000
       Electronic configuration (s p d ...):                           1   0   0


 MOLECULE KIND INFORMATION


 All atoms are their own molecule, skipping detailed information


 TOTAL NUMBERS AND MAXIMUM NUMBERS


  Total number of            - Atomic kinds:                                   2
                             - Atoms:                                          3
                             - Shell sets:                                    10
                             - Shells:                                        12
                             - Primitive Cartesian functions:                 21
                             - Cartesian basis functions:                     25
                             - Spherical basis functions:                     24

  Maximum angular momentum of the orbital basis functions:                     2
******************************************************************************************************************

Krack Matthias (PSI)

unread,
Sep 24, 2020, 1:55:02 PM9/24/20
to cp...@googlegroups.com

Hi Lucas

 

Indeed, the integral calculation is performed using Cartesian Gaussian functions in CP2K as shown in the initial printout, since this representation allows for efficient recurrence relations, but the integral matrix blocks are then transformed to spherical Gaussian functions. They are also properly normalized in the same step. Thus all operator matrices like the Kohn-Sham matrix, the overlap matrix, and the wavefunctions (MOs) are represented using spherical Gaussian functions. This representation is also used by the wavefunction optimization (SCF) and determines the available degrees of freedom for the solver during the optimization which causes eventually the difference between a spherical and a Cartesian Gaussian basis set.

 

HTH

 

Matthias

 

From: cp...@googlegroups.com <cp...@googlegroups.com> On Behalf Of Lucas Lodeiro


Sent: Donnerstag, 24. September 2020 19:20
To: cp...@googlegroups.com

mdsimula...@gmail.com

unread,
Sep 25, 2020, 8:03:27 AM9/25/20
to cp2k
I'm guessing I probably shouldn't use the M06-2X functional for anything right now or at least until why the energy discrepancy is figured out in the meta functionals?

Krack Matthias (PSI)

unread,
Sep 25, 2020, 9:00:05 AM9/25/20
to cp2k

Hi

 

wrong numbers are obtained for mGGAs (like M06-2X) with GAPW, which is mandatory for all-electron calculations. The mGGA results, including M06-2X, using GPW are correct:

 

DEBUG|======================== BEGIN OF SUMMARY ===============================

DEBUG| Atom  Coordinate   f(numerical)   f(analytical)   Difference   Error [%]

DEBUG|    1      x         -0.00000000     -0.00000000  -0.00000000           -

DEBUG|    1      y         -0.00000000     -0.00000003  -0.00000003           -

DEBUG|    1      z         -0.01487972     -0.01487506   0.00000465        0.03

DEBUG|    2      x          0.00000000      0.00000000   0.00000000           -

DEBUG|    2      y         -0.00408127     -0.00408117   0.00000009        0.00

DEBUG|    2      z          0.00661315      0.00661293  -0.00000023        0.00

DEBUG|    3      x          0.00000000      0.00000000   0.00000000           -

DEBUG|    3      y          0.00408126      0.00408120  -0.00000006        0.00

DEBUG|    3      z          0.00661315      0.00661298  -0.00000017        0.00

DEBUG| Sum of differences:                               0.00000524

DEBUG|======================== END OF SUMMARY =================================

 

HTH

 

Matthias

mdsimula...@gmail.com

unread,
Sep 25, 2020, 9:27:23 AM9/25/20
to cp2k
Matthias,

What basis set and potential did you use for the M06-2X GPW calculations?

Thanks,
Stacey

Krack Matthias (PSI)

unread,
Sep 25, 2020, 10:28:17 AM9/25/20
to cp...@googlegroups.com

BASIS_SET DZVP-GTH

POTENTIAL GTH-PADE

 

The PP GTH-PADE is sufficient to test the code, but obviously not suited to work with the M06-2X functional in a production run.

 

Best

mdsimula...@gmail.com

unread,
Sep 25, 2020, 10:33:15 AM9/25/20
to cp2k
Thanks Matthias...I was considering using the PBE0 PP

Lucas Lodeiro

unread,
Sep 25, 2020, 7:46:56 PM9/25/20
to cp...@googlegroups.com
Hi Matthias, your answer is very clarifying.
Regards - Lucas Lodeiro

mdsimula...@gmail.com

unread,
Oct 1, 2020, 1:41:02 PM10/1/20
to cp2k
Hi,

Are there any ideas for the wrong numbers using GAPW?  I would like to use mGGAs for real time propagation with all electron.

Thanks!

Leopold Talirz

unread,
Apr 8, 2021, 3:10:11 PM4/8/21
to cp2k
Just to follow up on this thread, since I came across it as well:
There has both been a fix for mGGA forces with GAPW and all-electron [1] as well as a fix for the TPSS implementation with LDS [2] (by switching to libxc).

Both fixes are released in cp2k 8.1

Reply all
Reply to author
Forward
0 new messages