<div>Hi,</div><div><br></div><div>Thanks for the prompt fix! It made a significant difference but doesn't seem to resolve the discrepancy with DFTB+ (please see attached figure). Mulliken charges changed "in the right direction" but still differ very significantly compared to DFTB+.</div><div><br></div><div>Kind regards,</div><div>Magnus Rahm</div><div><br></div><div><br></div><br><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Tuesday, September 6, 2022 at 5:36:30 PM UTC+2 jgh wrote:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi
<br>
<br>the updates are now on Github (Trunk version).
<br>This should at least fix the strange behavior for changes of EPS_DEFAULT.
<br>
<br>regards
<br>
<br>JH
<br>
<br>________________________________________
<br>From: <a href data-email-masked rel="nofollow">cp...@googlegroups.com</a> <<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>> on behalf of Jürg Hutter <<a href data-email-masked rel="nofollow">hut...@chem.uzh.ch</a>>
<br>Sent: Tuesday, September 6, 2022 11:37 AM
<br>To: <a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>
<br>Subject: Re: [CP2K:17614] Re: Large discrepancy in xTB results from CP2K vs DFTB+
<br>
<br>Hi
<br>
<br>I think I found the problem. This is in fact a bug in CP2K and is related to the damping of
<br>the "short range" part of the Coulomb term. As mentioned before this short range part
<br>is not short range at all, even diverging in periodic systems. We use a damping function
<br>for this term and the radius is taken from the range of the basis function on each atom.
<br>The bug is now, that this range is not a constant but depends on EPS_DEFAULT.
<br>I will work on a solution, but at least the default settings will cause considerable changes
<br>in the energies of periodic systems.
<br>
<br>regards
<br>
<br>JH
<br>
<br>________________________________________
<br>From: <a href data-email-masked rel="nofollow">cp...@googlegroups.com</a> <<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>> on behalf of Magnus Rahm <<a href data-email-masked rel="nofollow">mag...@compulartech.com</a>>
<br>Sent: Monday, September 5, 2022 3:19 PM
<br>To: cp2k
<br>Subject: Re: [CP2K:17609] Re: Large discrepancy in xTB results from CP2K vs DFTB+
<br>
<br>Hi,
<br>
<br>Thank you for valuable input! Here's a breakdown of energies for a periodic LiO2 system (where CP2K and DFTB+ disagree).
<br>CP2K:
<br>
<br>  Core Hamiltonian energy:                                   -609.45757320827579
<br>  Repulsive potential energy:                                   2.86335541921533
<br>  Electronic energy:                                          -65.73940900376786
<br>  DFTB3 3rd order energy:                                       9.00274299587460
<br>  Dispersion energy:                                           -2.00065978643714
<br>  Correction for halogen bonding:                               0.00000000000000
<br>
<br>  Total energy:                                              -665.33154358339084
<br>
<br>  outer SCF iter =    1 RMS gradient =   0.49E-06 energy =       -665.<a href="tel:(331)%20543-5834" value="+13315435834" target="_blank" rel="nofollow">3315435834</a>
<br>  outer SCF loop converged in   1 iterations or   10 steps
<br>
<br>And the same system with DFTB+ (I don't know this is the best breakdown I can get from DFTB+? This info is from detailed.out.):
<br>
<br>Fermi level:                        -0.1574062769 H           -4.2832 eV
<br>Band energy:                      -254.9890864567 H        -6938.6061 eV
<br>TS:                                  0.0000000000 H            0.0000 eV
<br>Band free energy (E-TS):          -254.9890864567 H        -6938.6061 eV
<br>Extrapolated E(0K):               -254.9890864567 H        -6938.6061 eV
<br>Input / Output electrons (q):    864.0000000000    864.0000000000
<br>
<br>Energy H0:                        -610.3586854777 H       -16608.7049 eV
<br>Energy SCC:                         13.1915555608 H          358.9605 eV
<br>Total Electronic energy:          -597.1671299169 H       -16249.7444 eV
<br>Repulsive energy:                    0.0000000000 H            0.0000 eV
<br>Total energy:                     -597.1671299169 H       -16249.7444 eV
<br>Extrapolated to 0:                -597.1671299169 H       -16249.7444 eV
<br>Total Mermin free energy:         -597.1671299169 H       -16249.7444 eV
<br>Force related energy:             -597.1671299169 H       -16249.7444 eV
<br>
<br>----------------------------------------------------------------------------------------------------------------
<br>For reference, here are the equivalent breakdowns for the LiF molecule, where the total energies do match quite well.
<br>CP2K:
<br>
<br>  Core Hamiltonian energy:                                     -5.57594122418510
<br>  Repulsive potential energy:                                   0.00036401843654
<br>  Electronic energy:                                            0.08477836575096
<br>  DFTB3 3rd order energy:                                      -0.00385103760005
<br>  Dispersion energy:                                           -0.00008325087778
<br>  Correction for halogen bonding:                               0.00000000000000
<br>
<br>  Total energy:                                                -5.49473312847544
<br>
<br>  outer SCF iter =    1 RMS gradient =   0.12E-06 energy =         -5.4947331285
<br>  outer SCF loop converged in   1 iterations or   25 steps
<br>
<br>DFTB+
<br>Fermi level:                        -0.<a href="tel:(343)%20487-4008" value="+13434874008" target="_blank" rel="nofollow">3434874008</a> H           -9.3468 eV
<br>Band energy:                        -3.7493389034 H         -102.0247 eV
<br>TS:                                  0.0000000000 H            0.0000 eV
<br>Band free energy (E-TS):            -3.7493389034 H         -102.0247 eV
<br>Extrapolated E(0K):                 -3.7493389034 H         -102.0247 eV
<br>Input / Output electrons (q):      8.0000000444      8.0000000000
<br>
<br>Energy H0:                          -5.<a href="tel:(574)%20345-1431" value="+15743451431" target="_blank" rel="nofollow">5743451431</a> H         -151.6856 eV
<br>Energy SCC:                          0.0807122067 H            2.1963 eV
<br>Total Electronic energy:            -5.4936329365 H         -149.4894 eV
<br>Repulsive energy:                    0.0000000000 H            0.0000 eV
<br>Total energy:                       -5.4936329365 H         -149.4894 eV
<br>Extrapolated to 0:                  -5.4936329365 H         -149.4894 eV
<br>Total Mermin free energy:           -5.4936329365 H         -149.4894 eV
<br>Force related energy:               -5.4936329365 H         -149.4894 eV
<br>
<br>----------------------------------------------------------------------------------------------------------------
<br>
<br>> I recently run variable-cell optimization of various molecular crystals and I found xTB@CP2K ultra sensitive to EPS_DEFAULT. Tested from 1e-5 to 1e-24 (with EPS_SCF 1e-8), and no convergence happened.
<br>
<br>Thank you for sharing this info! I tried a series of calculations with LiO2 using varying values of EPS_DEFAULT (using default EPS_SCF) and found the same effect; no convergence with EPS_DEFAULT (or perhaps unreasonably slow convergence). I attach a figure showing these results, including the energy broken down into the different parts as specified in the CP2K output. Note the energy scale, the changes with EPS_DEFAULT are really quite substantial. In the LiF (non-PBC) case, the corresponding curves look completely flat on the same scale. I don't know what to make of this result, but perhaps someone else does?
<br>
<br>Magnus
<br>
<br>[X]
<br>On Monday, September 5, 2022 at 12:18:26 PM UTC+2 <a href data-email-masked rel="nofollow">jazz...@gmail.com</a> wrote:
<br>I recently run variable-cell optimization of various molecular crystals and I found xTB@CP2K ultra sensitive to EPS_DEFAULT. Tested from 1e-5 to 1e-24 (with EPS_SCF 1e-8), and no convergence happened. I just ended up with EPS_DEFAULT 1e-10 as a "gut" choice. Also, the behavior of xTB@CP2K is doutfull with MD even at ambiant conditions, where the converged volume is barely larget than at 0K. Depending on EPS_DEFAULT, it can even be smaller at ambient T. Weird. The behavior of DFTB2@CP2K is far better.
<br>
<br>I found that DFTB+ has other issues. xTB@DFTB+ has no convergence issue, but the recommended variable-cell optimization algorithm has flaws. The unit cell and a supercell does NOT always end up with related lattice parameters. The main issue is that some 90° angles are not preserved with DFTB+ whereas CP2K does (with no symmetry enforced, obviously). Some inconsistencies appears in DFTB+ with a lattice dimensions < 10 angstroms in the unit cell versus > 10 angstroms in the supercell. A proper tight mesh of k-points does not improve. So I'm afraid that xTB@DFTB+ (or DFTB+,  actually) cannot be a relevant choice for crystal structure predictions, for instance.
<br>
<br>xTB may be unreliable with CP2K and DFTB+, but for the different reasons above. You can check these weird behaviors with your own crystals of interest.
<br>
<br>Xavier
<br>
<br>
<br>
<br>Le lun. 5 sept. 2022, 3:59 AM, Jürg Hutter <<a href data-email-masked rel="nofollow">hut...@chem.uzh.ch</a>> a écrit :
<br>Hi
<br>
<br>thank you for testing. Could you send a break down of the energies for the LiF molecule for
<br>the two codes? That might help to recognize the source of the difference.
<br>
<br>regards
<br>
<br>JH
<br>
<br>________________________________________
<br>From: <a href data-email-masked rel="nofollow">cp...@googlegroups.com</a> <<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>> on behalf of Magnus Rahm <<a href data-email-masked rel="nofollow">mag...@compulartech.com</a>>
<br>Sent: Monday, September 5, 2022 8:40 AM
<br>To: cp2k
<br>Subject: [CP2K:17599] Re: Large discrepancy in xTB results from CP2K vs DFTB+
<br>
<br>For the record, the problem is the same in CP2K version 2022.1.
<br>
<br>On Thursday, September 1, 2022 at 12:48:35 PM UTC+2 Magnus Rahm wrote:
<br>Dear all,
<br>
<br>I want to use CP2K (version 8.2, trying to get a more recent version compiled) together with xTB for a crystal containing Li and O. I get strange results already for a simple LiO2 crystal:
<br>
<br>* There is a very large discrepancy compared to DFTB+ (version 22.1).
<br>* Mulliken charges tend to be large, meaning that CHECK_ATOMIC_CHARGES stops the SCF. If I turn it off, the system tends to converge systematically to values just outside the "chemical range". Mulliken charges obtained by DFTB+ are significantly smaller (and within "chemical range").
<br>* The energy-volume curve looks strange and very different from DFTB+.
<br>
<br>I have tried converging with respect to system size and the EWALD / ALPHA and GMAX parameters, but they have only a marginal impact. I have tried similar calculations for a number of periodic systems. Sometimes I get agreement, sometimes not. I also tried calculations for CO and NO molecules which agree perfectly between CP2K and DFTB+, whereas an artificial LiF molecule does not.
<br>
<br>A perhaps related issue was reported in <a href="https://groups.google.com/g/cp2k/c/oFwgGcQuySs" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/g/cp2k/c/oFwgGcQuySs&source=gmail&ust=1662582216595000&usg=AOvVaw1W_zlk8fr-SFs5_I0NDvm0">https://groups.google.com/g/cp2k/c/oFwgGcQuySs</a> but the solutions suggested there did not solve my problem.
<br>
<br>I attach input scripts for CP2K and DFTB+, as well as a figure showing the E-V curve for LiO2 obtained with CP2K and DFTB+. I'm new to CP2K, DFTB+ and xTB so I suspect I have made some simple mistake, and any advice is appreciated.
<br>
<br>Kind regards,
<br>Magnus Rahm
<br>
<br>
<br>
<br>
<br>
<br>
<br>--
<br>You received this message because you are subscribed to the Google Groups "cp2k" group.
<br>To unsubscribe from this group and stop receiving emails from it, send an email to <a href data-email-masked rel="nofollow">cp2k+uns...@googlegroups.com</a><mailto:<a href data-email-masked rel="nofollow">cp2k+uns...@googlegroups.com</a>>.
<br>To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/c51e70a2-7f7a-4887-8ada-971d840a1b13n%40googlegroups.com" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/d/msgid/cp2k/c51e70a2-7f7a-4887-8ada-971d840a1b13n%2540googlegroups.com&source=gmail&ust=1662582216595000&usg=AOvVaw02HPU2WpxQtQPXwT_TQJOt">https://groups.google.com/d/msgid/cp2k/c51e70a2-7f7a-4887-8ada-971d840a1b13n%40googlegroups.com</a><<a href="https://groups.google.com/d/msgid/cp2k/c51e70a2-7f7a-4887-8ada-971d840a1b13n%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/d/msgid/cp2k/c51e70a2-7f7a-4887-8ada-971d840a1b13n%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1662582216595000&usg=AOvVaw3wCySWW3uo2hcoUtOXnA13">https://groups.google.com/d/msgid/cp2k/c51e70a2-7f7a-4887-8ada-971d840a1b13n%40googlegroups.com?utm_medium=email&utm_source=footer</a>>.
<br>
<br>--
<br>You received this message because you are subscribed to the Google Groups "cp2k" group.
<br>To unsubscribe from this group and stop receiving emails from it, send an email to <a href data-email-masked rel="nofollow">cp2k+uns...@googlegroups.com</a>.
<br>To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/ZR0P278MB075983A13AA78F53FFB422559F7F9%40ZR0P278MB0759.CHEP278.PROD.OUTLOOK.COM" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/d/msgid/cp2k/ZR0P278MB075983A13AA78F53FFB422559F7F9%2540ZR0P278MB0759.CHEP278.PROD.OUTLOOK.COM&source=gmail&ust=1662582216595000&usg=AOvVaw0T174tfBE3Iu9BahZ594vj">https://groups.google.com/d/msgid/cp2k/ZR0P278MB075983A13AA78F53FFB422559F7F9%40ZR0P278MB0759.CHEP278.PROD.OUTLOOK.COM</a>.
<br>
<br>--
<br>You received this message because you are subscribed to the Google Groups "cp2k" group.
<br>To unsubscribe from this group and stop receiving emails from it, send an email to <a href data-email-masked rel="nofollow">cp2k+uns...@googlegroups.com</a><mailto:<a href data-email-masked rel="nofollow">cp2k+uns...@googlegroups.com</a>>.
<br>To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/7d455fce-a22e-44f1-ac48-18495f9553a5n%40googlegroups.com" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/d/msgid/cp2k/7d455fce-a22e-44f1-ac48-18495f9553a5n%2540googlegroups.com&source=gmail&ust=1662582216595000&usg=AOvVaw3NgeZ_vKYd2ge_cv69EB2k">https://groups.google.com/d/msgid/cp2k/7d455fce-a22e-44f1-ac48-18495f9553a5n%40googlegroups.com</a><<a href="https://groups.google.com/d/msgid/cp2k/7d455fce-a22e-44f1-ac48-18495f9553a5n%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/d/msgid/cp2k/7d455fce-a22e-44f1-ac48-18495f9553a5n%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1662582216595000&usg=AOvVaw2ANfgOh1j_3e7yUDwlmwGJ">https://groups.google.com/d/msgid/cp2k/7d455fce-a22e-44f1-ac48-18495f9553a5n%40googlegroups.com?utm_medium=email&utm_source=footer</a>>.
<br>
<br>--
<br>You received this message because you are subscribed to the Google Groups "cp2k" group.
<br>To unsubscribe from this group and stop receiving emails from it, send an email to <a href data-email-masked rel="nofollow">cp2k+uns...@googlegroups.com</a>.
<br>To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/ZR0P278MB0759EEC38142F9D207742F549F7E9%40ZR0P278MB0759.CHEP278.PROD.OUTLOOK.COM" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/d/msgid/cp2k/ZR0P278MB0759EEC38142F9D207742F549F7E9%2540ZR0P278MB0759.CHEP278.PROD.OUTLOOK.COM&source=gmail&ust=1662582216595000&usg=AOvVaw06aA9VjtYFslpJLyrHNByi">https://groups.google.com/d/msgid/cp2k/ZR0P278MB0759EEC38142F9D207742F549F7E9%40ZR0P278MB0759.CHEP278.PROD.OUTLOOK.COM</a>.
<br></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "cp2k" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/3542e78b-ca60-4753-bb72-b077a2517dbbn%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/3542e78b-ca60-4753-bb72-b077a2517dbbn%40googlegroups.com</a>.<br />