xTB descrepancy between CP2K and DFTB+

393 views
Skip to first unread message

Xavier Bidault

unread,
Apr 5, 2022, 4:22:02 PM4/5/22
to cp2k
Hello,

I run a variable-cell optimization of a high-energy molecular crystal, beta-HMX, with CP2K 9.1 and DFTB+ 21.2, both using GFN1-xTB, which includes D3(BJ) correction. To compare apples to apples, I optimized the same supercell, using the Gamma point. The initial (experimental) volume for the supercell is 2069.80 A3. The resulting volume is:
1950.83 A3 with DFTB+
1759.92 A3 with CP2K

In order to check if I did something wrong in the configuration files, I used DFTB + D3(0) with the default DFTB parameter file from CP2K for both CP2K and DFTB+, and I find:
1467.79 A3 with DFTB+
1467.14 A3 with CP2K
So, DFTB + D3(0) is consistent between CP2K and DFTB+, but not GFN1-xTB.

IMO, the dispersion correction of xTB is wrong somewhere in CP2K. Looking at the difference between CP2K and DFTB+, could it be that D3(BJ) correction is counted twice in CP2K? Or with some wrong units we don't have access to?

I attached the CP2K input file for the GFN1-xTB calculation.

Please, let me know.

Thank you,
Xavier


2_vc-relax_test.in

Jürg Hutter

unread,
Apr 6, 2022, 4:50:43 AM4/6/22
to cp...@googlegroups.com
Hi

yes, this looks bad. I cannot see an obvious problem with your input. But as you have the
two codes side by side, why don't you start with comparing energies, forces and stress
at the initial geometry?
CP2K prints individual energy components and it should be possible to compare with
the DFTB+ output.

regards

Juerg Hutter

________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Xavier Bidault <jazz...@gmail.com>
Sent: Tuesday, April 5, 2022 10:22 PM
To: cp2k
Subject: [CP2K:16807] xTB descrepancy between CP2K and DFTB+
--
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/0c4adfcb-1508-4787-b077-d8eea0699662n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/0c4adfcb-1508-4787-b077-d8eea0699662n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Pierre-André Cazade

unread,
Apr 6, 2022, 6:11:01 AM4/6/22
to cp...@googlegroups.com
Dear Xavier and Jurg,

If I may join this discussion. I have recently started using TB methods, both DFTB and xTB. I am currently testing these methods with CP2K, DFTB+, and for xTB with xtb software. I am performing a MD simulation of a chemical reaction. Both CP2K and xtb show a similar reaction path using xTB but with DFTB+ the MD simulation explodes. However, if I use DFTB, the same input is stable. Therefore, I wonder if the problem does not come from DFTB+ rather than CP2K.

By the way, any plan to implement GFN2-xTB in CP2K?

Regards,
Pierre

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

Jürg Hutter

unread,
Apr 7, 2022, 4:46:03 AM4/7/22
to cp...@googlegroups.com
>>>> By the way, any plan to implement GFN2-xTB in CP2K?

Not in my group, but I'm sure somebody will do it.

regards

Juerg

________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Pierre-André Cazade <pierre.an...@gmail.com>
Sent: Wednesday, April 6, 2022 12:10 PM
To: cp...@googlegroups.com
Subject: Re: [CP2K:16811] xTB descrepancy between CP2K and DFTB+

Dear Xavier and Jurg,

If I may join this discussion. I have recently started using TB methods, both DFTB and xTB. I am currently testing these methods with CP2K, DFTB+, and for xTB with xtb software. I am performing a MD simulation of a chemical reaction. Both CP2K and xtb show a similar reaction path using xTB but with DFTB+ the MD simulation explodes. However, if I use DFTB, the same input is stable. Therefore, I wonder if the problem does not come from DFTB+ rather than CP2K.

By the way, any plan to implement GFN2-xTB in CP2K?

Regards,
Pierre

On Wed, Apr 6, 2022 at 9:50 AM Jürg Hutter <hut...@chem.uzh.ch<mailto:hut...@chem.uzh.ch>> wrote:
Hi

yes, this looks bad. I cannot see an obvious problem with your input. But as you have the
two codes side by side, why don't you start with comparing energies, forces and stress
at the initial geometry?
CP2K prints individual energy components and it should be possible to compare with
the DFTB+ output.

regards

Juerg Hutter

________________________________________
From: cp...@googlegroups.com<mailto:cp...@googlegroups.com> <cp...@googlegroups.com<mailto:cp...@googlegroups.com>> on behalf of Xavier Bidault <jazz...@gmail.com<mailto:jazz...@gmail.com>>
Sent: Tuesday, April 5, 2022 10:22 PM
To: cp2k
Subject: [CP2K:16807] xTB descrepancy between CP2K and DFTB+

Hello,

I run a variable-cell optimization of a high-energy molecular crystal, beta-HMX, with CP2K 9.1 and DFTB+ 21.2, both using GFN1-xTB, which includes D3(BJ) correction. To compare apples to apples, I optimized the same supercell, using the Gamma point. The initial (experimental) volume for the supercell is 2069.80 A3. The resulting volume is:
1950.83 A3 with DFTB+
1759.92 A3 with CP2K

In order to check if I did something wrong in the configuration files, I used DFTB + D3(0) with the default DFTB parameter file from CP2K for both CP2K and DFTB+, and I find:
1467.79 A3 with DFTB+
1467.14 A3 with CP2K
So, DFTB + D3(0) is consistent between CP2K and DFTB+, but not GFN1-xTB.

IMO, the dispersion correction of xTB is wrong somewhere in CP2K. Looking at the difference between CP2K and DFTB+, could it be that D3(BJ) correction is counted twice in CP2K? Or with some wrong units we don't have access to?

I attached the CP2K input file for the GFN1-xTB calculation.

Please, let me know.

Thank you,
Xavier



--
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%2Bunsu...@googlegroups.com><mailto:cp2k+uns...@googlegroups.com<mailto:cp2k%2Bunsu...@googlegroups.com>>.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com<mailto:cp2k%2Bunsu...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/ZR0P278MB0759906A32913BB9526CE2E59FE79%40ZR0P278MB0759.CHEP278.PROD.OUTLOOK.COM.

--
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/CAFnf9gokuFDcVLcqh6rO9DomTZ2Z4CU%3DuZH35UFwgFGUqos8DQ%40mail.gmail.com<https://groups.google.com/d/msgid/cp2k/CAFnf9gokuFDcVLcqh6rO9DomTZ2Z4CU%3DuZH35UFwgFGUqos8DQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Xavier Bidault

unread,
Apr 7, 2022, 6:05:34 PM4/7/22
to cp2k
Hello,

I just posted also on DFTB+ issues (https://github.com/dftbplus/dftbplus/issues/1001), including the input script for DFTB+

Xavier

Xavier Bidault

unread,
Apr 10, 2022, 10:34:41 PM4/10/22
to cp2k

I used the driver/optimizer couple GO/rational for DFTB+ and explored a few SCC epsilon parameters (expressed below as 1e-n). For CP2K with BFGS optimizer, I similarly explored various values for SCF epsilon. Epsilons for geometry of 1e-5 or 1e-6 yields very similar results.

CP2K (all other epsilons are default):
n   Volume(A3)
5   1870.51
6   1863.46
7   1873.30
8   1759.92
9   1834.73
10 1944.21
11 1761.18
12 1846.56
13 1860.54
14 1826.25
15 1852.36

The differences are large, and non-monotonic. There is, imo, no obvious choice. I also quickly checked that without constraining the monoclinic geometry, it was actually preserved.

DFTB+:
5   1901.99
6   1859.22
7   1904.44
8   1902.72
9   1900.05
10 1900.89
11 1901.01
12 1900.90
13 1900.35

Note that the only one preserving the monoclinic geometry is 1e-6. For all the other epsilons, Alpha and Gamma are around 90.2° and 90.7°, respectively, instead of 90°. But all those other volumes are very similar. Would it mean we have to avoid 1e-6 for DFTB+? Or the contrary?

Any remarks that could help?

Jürg Hutter

unread,
Apr 12, 2022, 4:58:40 AM4/12/22
to cp...@googlegroups.com
Hi

I did some calculations for your system with CP2K and I get a converged volume
of 1845. For this I did:

EPS_DEFAULT 1.0E-12
EPS_SCF 1.0E-7

&MOTION
&CELL_OPT
TYPE GEO_OPT
OPTIMIZER BFGS
MAX_DR 1.0E-04
MAX_FORCE 1.0E-05
RMS_DR 1.0E-04
RMS_FORCE 1.0E-05
MAX_ITER 100
&END
&GEO_OPT
OPTIMIZER BFGS
MAX_DR 1.0E-04
MAX_FORCE 1.0E-05
RMS_DR 1.0E-04
RMS_FORCE 1.0E-05
MAX_ITER 50
&END
&END

I did some additional checks on parameters, but there was no change compared
to the defaults.

This points to a difference of ca. 55 A3 wrt to the DFTB+ results (1900). This is a difference
of 2.5% in volume or ca. 1 % in cell length.

As said in the last post, if you want to investigate further you have to look into the
results of both codes at identical structures.
Compare energies (total, and partial), forces and stress.

regards

Juerg Hutter

________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Xavier Bidault <jazz...@gmail.com>
Sent: Monday, April 11, 2022 4:34 AM
To: cp2k
Subject: [CP2K:16831] Re: xTB descrepancy between CP2K and DFTB+
--
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/96beee3f-c95d-4bf5-a2da-2dbe9a3a210cn%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/96beee3f-c95d-4bf5-a2da-2dbe9a3a210cn%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages