<div dir="ltr"><span class="gmail-im" style="color:rgb(80,0,80)"><div>>> Could you remind me how to update CP2K 2022.1 to include this bug fix?</div><div><br></div></span><div>> I think the easiest approach is to use Docker (following these instructions: <a href="https://github.com/cp2k/cp2k/tree/master/tools/docker" target="_blank">https://github.com/cp2k/cp2k/tree/master/tools/docker</a>), unless you want to clone the CP2K repo from github and compile from scratch.</div><div><br></div><div>I tried yesterday with git clone and started from scratch. The downloaded version (git:d56aa67) should have the xTB bug fix mentioned above (?), but when I run variable-cell optimizations of beta-HMX with various EPS_DEFAULT I find the exact same results as with CP2K 7.1. What's the right git version for this bug fix? Should I copy the git folder instead of using git clone? I mean, how to get the Trunk version you're talking about?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 7, 2022 at 7:20 AM Magnus Rahm <<a href="mailto:magnus@compulartech.com">magnus@compulartech.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Btw, I can confirm that the energy now converges with EPS_DEFAULT also for the LiO2 system, although the convergence is perhaps a bit slower (=very small EPS_DEFAULT values needed) than what one might have expected (see LiO2-EPS_DEFAULT.pdf). The figure I attached in my previous post was made with EPS_DEFAULT at the default value, if I use 1e-24 I get a bit closer to DFTB+ but still there is a weird slope in the E-V curve (EV-LiO2.pdf).</div><div><br></div><div>Furthermore, I had a look at the energy broken down into its different contributions as a function of volume (LiO2-energies-split.pdf), and FWIW it indicates that the electronic energy is responsible for the unexpected slope in the E-V curve  (perhaps that was already obvious?).</div><div><br></div><div>> Could you remind me how to update CP2K 2022.1 to include this bug fix?</div><div><br></div><div>I think the easiest approach is to use Docker (following these instructions: <a href="https://github.com/cp2k/cp2k/tree/master/tools/docker" target="_blank">https://github.com/cp2k/cp2k/tree/master/tools/docker</a>), unless you want to clone the CP2K repo from github and compile from scratch.<br></div><div><br></div><div>Kind regards,</div><div>Magnus Rahm</div><div><br></div><div><br></div><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Wednesday, September 7, 2022 at 2:16:23 AM UTC+2 <a href="mailto:jazz...@gmail.com" target="_blank">jazz...@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thank you. Could you remind me how to update CP2K 2022.1 to include this bug fix?</div><br><div class="gmail_quote"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 6, 2022 at 10:36 AM Jürg Hutter <<a rel="nofollow">hut...@chem.uzh.ch</a>> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 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 rel="nofollow">cp...@googlegroups.com</a> <<a rel="nofollow">cp...@googlegroups.com</a>> on behalf of Jürg Hutter <<a rel="nofollow">hut...@chem.uzh.ch</a>><br>
Sent: Tuesday, September 6, 2022 11:37 AM<br>
To: <a 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 rel="nofollow">cp...@googlegroups.com</a> <<a rel="nofollow">cp...@googlegroups.com</a>> on behalf of Magnus Rahm <<a 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" rel="nofollow" target="_blank">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" rel="nofollow" target="_blank">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" rel="nofollow" target="_blank">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 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 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 rel="nofollow">cp...@googlegroups.com</a> <<a rel="nofollow">cp...@googlegroups.com</a>> on behalf of Magnus Rahm <<a 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" rel="noreferrer nofollow" target="_blank">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 rel="nofollow">cp2k+uns...@googlegroups.com</a><mailto:<a 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" rel="noreferrer nofollow" target="_blank">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" rel="noreferrer nofollow" target="_blank">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 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" rel="noreferrer nofollow" target="_blank">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 rel="nofollow">cp2k+uns...@googlegroups.com</a><mailto:<a 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" rel="noreferrer nofollow" target="_blank">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" rel="noreferrer nofollow" target="_blank">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 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" rel="noreferrer nofollow" target="_blank">https://groups.google.com/d/msgid/cp2k/ZR0P278MB0759EEC38142F9D207742F549F7E9%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 rel="nofollow">cp2k+uns...@googlegroups.com</a>.<br></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/ZR0P278MB0759A3BAE12A4F8C0298072A9F7E9%40ZR0P278MB0759.CHEP278.PROD.OUTLOOK.COM" rel="noreferrer nofollow" target="_blank">https://groups.google.com/d/msgid/cp2k/ZR0P278MB0759A3BAE12A4F8C0298072A9F7E9%40ZR0P278MB0759.CHEP278.PROD.OUTLOOK.COM</a>.<br>
</blockquote></div>
</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" target="_blank">cp2k+unsubscribe@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/1234148a-7a9a-4c6b-a0c9-13caabfe8811n%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank">https://groups.google.com/d/msgid/cp2k/1234148a-7a9a-4c6b-a0c9-13caabfe8811n%40googlegroups.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/CAD0N%2BNXV6joiLFYWjW7FHxsS6OQLg8a3-FkLXdH%2BON2OFoBCjQ%40mail.gmail.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/CAD0N%2BNXV6joiLFYWjW7FHxsS6OQLg8a3-FkLXdH%2BON2OFoBCjQ%40mail.gmail.com</a>.<br />