[CP2K-user] [CP2K:19022] Re: TiO2 slab not converging

Krack Matthias matthias.krack at psi.ch
Wed Jun 28 14:37:16 UTC 2023


Hi Léon

Try

&CELL
 A   10.2988004684         0.0000000000         0.0000000000
 B    0.0000000000        11.3549995422         0.0000000000
 C    0.0000000000         0.0000000000        49.3899002075
&END CELL

&COORD
O    9.300228691         0.000000000        19.999946640
 O    9.300228691         3.784962059        19.999946640
 O    9.300228691         7.570037822        19.999946640
. . . further 69 O atoms
36 Ti atoms
&END COORD

HTH

Matthias

From: cp2k at googlegroups.com <cp2k at googlegroups.com> on behalf of Léon Luntadila Lufungula <Leon.luntadilalufungula at uantwerpen.be>
Date: Wednesday, 28 June 2023 at 16:29
To: cp2k <cp2k at googlegroups.com>
Subject: Re: [CP2K:19022] Re: TiO2 slab not converging
Hi Matthias,

So I opened the CIF file in VESTA and did Export Data > VASP file > Save > Cartesian coordinates > Output current unit cell and this resulted in the file shown below, but I don't see how this will "easily" cut&paste into a CP2K input file as the atom labels are missing...

"O72 Ti36"
1.0
       10.2988004684         0.0000000000         0.0000000000
        0.0000000000        11.3549995422         0.0000000000
        0.0000000000         0.0000000000        49.3899002075
    O   Ti
   72   36
Cartesian
     9.300228691         0.000000000        19.999946640
     9.300228691         3.784962059        19.999946640
     9.300228691         7.570037822        19.999946640
     4.151034406         1.892992021        20.000439738
     4.151034406         5.677953911        20.000439738
     4.151034406         9.463029336        20.000439738
     7.074658142         1.892992021        20.879580124
     7.074658142         5.677953911        20.879580124
     7.074658142         9.463029336        20.879580124
     1.923610010         0.000000000        20.880567792
     1.923610010         3.784962059        20.880567792
     1.923610010         7.570037822        20.880567792
     5.583803656         0.000000000        21.468802556
     5.583803656         3.784962059        21.468802556
     5.583803656         7.570037822        21.468802556
     0.433682486         1.892992021        21.469295653
     0.433682486         5.677953911        21.469295653
     0.433682486         9.463029336        21.469295653
     3.357409004         1.892992021        22.348436040
     3.357409004         5.677953911        22.348436040
     3.357409004         9.463029336        22.348436040
     8.505058213         0.000000000        22.349423707
     8.505058213         3.784962059        22.349423707
     8.505058213         7.570037822        22.349423707
     0.392487277         0.000000000        23.519964286
     0.392487277         3.784962059        23.519964286
     0.392487277         7.570037822        23.519964286
     5.542093345         1.892992021        23.520458855
     5.542093345         5.677953911        23.520458855
     5.542093345         9.463029336        23.520458855
     8.465716774         1.892992021        24.399597769
     8.465716774         5.677953911        24.399597769
     8.465716774         9.463029336        24.399597769
     3.314668949         0.000000000        24.400586909
     3.314668949         3.784962059        24.400586909
     3.314668949         7.570037822        24.400586909
     6.974965416         0.000000000        24.988818729
     6.974965416         3.784962059        24.988818729
     6.974965416         7.570037822        24.988818729
     1.824741540         1.892992021        24.989807868
     1.824741540         5.677953911        24.989807868
     1.824741540         9.463029336        24.989807868
     4.748467944         1.892992021        25.868455157
     4.748467944         5.677953911        25.868455157
     4.748467944         9.463029336        25.868455157
     9.896220587         0.000000000        25.869935922
     9.896220587         3.784962059        25.869935922
     9.896220587         7.570037822        25.869935922
     1.783546255         0.000000000        27.040476500
     1.783546255         3.784962059        27.040476500
     1.783546255         7.570037822        27.040476500
     6.933152591         1.892992021        27.040476500
     6.933152591         5.677953911        27.040476500
     6.933152591         9.463029336        27.040476500
     9.856776020         1.892992021        27.919615415
     9.856776020         5.677953911        27.919615415
     9.856776020         9.463029336        27.919615415
     4.705727889         0.000000000        27.921099124
     4.705727889         3.784962059        27.921099124
     4.705727889         7.570037822        27.921099124
     8.366024662         0.000000000        28.508839318
     8.366024662         3.784962059        28.508839318
     8.366024662         7.570037822        28.508839318
     3.215800326         1.892992021        28.509825513
     3.215800326         5.677953911        28.509825513
     3.215800326         9.463029336        28.509825513
     6.139527190         1.892992021        29.388472802
     6.139527190         5.677953911        29.388472802
     6.139527190         9.463029336        29.388472802
     0.988478905         0.000000000        29.389953567
     0.988478905         3.784962059        29.389953567
     0.988478905         7.570037822        29.389953567
     7.442016174         0.000000000        20.734373862
     7.442016174         3.784962059        20.734373862
     7.442016174         7.570037822        20.734373862
     2.292821888         1.892992021        20.734868432
     2.292821888         5.677953911        20.734868432
     2.292821888         9.463029336        20.734868432
     5.215518701         1.892992021        21.614008818
     5.215518701         5.677953911        21.614008818
     5.215518701         9.463029336        21.614008818
     0.065397382         0.000000000        21.614996485
     0.065397382         3.784962059        21.614996485
     0.065397382         7.570037822        21.614996485
     8.833075420         0.000000000        24.254391507
     8.833075420         3.784962059        24.254391507
     8.833075420         7.570037822        24.254391507
     3.683880827         1.892992021        24.254886077
     3.683880827         5.677953911        24.254886077
     3.683880827         9.463029336        24.254886077
     6.606680461         1.892992021        25.134024991
     6.606680461         5.677953911        25.134024991
     6.606680461         9.463029336        25.134024991
     1.456456432         0.000000000        25.135014131
     1.456456432         3.784962059        25.135014131
     1.456456432         7.570037822        25.135014131
    10.224134052         0.000000000        27.774409152
    10.224134052         3.784962059        27.774409152
    10.224134052         7.570037822        27.774409152
     5.074939767         1.892992021        27.774903722
     5.074939767         5.677953911        27.774903722
     5.074939767         9.463029336        27.774903722
     7.997739707         1.892992021        28.654537206
     7.997739707         5.677953911        28.654537206
     7.997739707         9.463029336        28.654537206
     2.847515371         0.000000000        28.655031776
     2.847515371         3.784962059        28.655031776
     2.847515371         7.570037822        28.655031776

On Wednesday, 28 June 2023 at 16:15:00 UTC+2 Krack Matthias wrote:
Hi Léon

You can export cell and coordinates as a POSCAR file in VESTA and from that file you can easily cut&paste CP2K’s &CELL and &COORD section.

HTH

Matthias

From: cp... at googlegroups.com <cp... at googlegroups.com> on behalf of Léon Luntadila Lufungula <Leon.luntad... at uantwerpen.be>
Date: Wednesday, 28 June 2023 at 16:10
To: cp2k <cp... at googlegroups.com>
Subject: Re: [CP2K:19020] Re: TiO2 slab not converging
Hi Matthias,

Thanks a lot for the tip! The output when using the pre-compiled binary shows that some atoms are indeed too close together, which is probably the cause of the bad convergence. Is there an easy way to fix this?

I made the slabs with ASE so I'm quite surprised that it did not make the slabs correctly. Here is the script I used to make them with ASE, perhaps you can see where I made a mistake, resulting in the faulty CIF files...

from ase.io<http://ase.io> import read, write
from ase.visualize import view
from ase.build.surfaces_with_termination import surfaces_with_termination
from ase.build.tools import sort

ana = read('anatase_opt_tzvp.pdb')

for N in range(2,13):
    s = surfaces_with_termination(ana, (1,0,1), N, vacuum=20, termination='O')
    s = s[1]
    s = s.repeat((1,3,1))
    s = sort(s, tags=s.positions[:, 2])
    name = f'a101-{N}-layer'
    write(f'{name}.cif', s)

Léon
On Wednesday, 28 June 2023 at 15:58:25 UTC+2 Krack Matthias wrote:
Hi Léon

You are using CP2K version 8.2. Newer CP2K versions perform a distance check for CP2K/Quickstep by default (see also this input keyword<https://manual.cp2k.org/cp2k-2023_1-branch/CP2K_INPUT/FORCE_EVAL/SUBSYS/PRINT/INTERATOMIC_DISTANCES.html#CHECK_INTERATOMIC_DISTANCES>) when the system is smaller than 2000 atoms and prints a warning if a small distance is found.
You can download a pre-compiled binary of CP2K 2023.1 here<https://github.com/cp2k/cp2k/releases/download/v2023.1/cp2k-2023.1-Linux-gnu-x86_64.ssmp>, which is sufficient for that initial check.

HTH

Matthias

From: cp... at googlegroups.com <cp... at googlegroups.com> on behalf of Léon Luntadila Lufungula <Leon.luntad... at uantwerpen.be>
Date: Wednesday, 28 June 2023 at 15:46
To: cp2k <cp... at googlegroups.com>
Subject: Re: [CP2K:19017] Re: TiO2 slab not converging

Hi Matthias,



Thanks for you reply!



I looked at my CIF file in various visualization software and it looked okay there. Is there a way to check this via CP2K to be sure?

I also have some preliminary results of some ongoing calculations with DIIS/FULL_ALL and DIIS/FULL_SINGLE_INVERSE and these seem to be a bit faster than CG but reaching convergence is still a big issue (see attachments).

Best,
Léon

On Wednesday, 28 June 2023 at 15:35:32 UTC+2 Krack Matthias wrote:
Hi Léon

Did you check the set of atomic coordinates read from the cif file for close contacts possibly caused by the periodic boundary conditions?

Best

Matthias

From: cp... at googlegroups.com <cp... at googlegroups.com> on behalf of Léon Luntadila Lufungula <Leon.luntad... at uantwerpen.be>
Date: Wednesday, 28 June 2023 at 14:16
To: cp2k <cp... at googlegroups.com>
Subject: [CP2K:19014] Re: TiO2 slab not converging
I forgot to add the cif file which is read with the input, so here it is if someone needs it.
On Wednesday, 28 June 2023 at 13:54:37 UTC+2 Léon Luntadila Lufungula wrote:
Update:

I tried to optimize a 3-layer slab with altered SCF cycle settings (inner loop: 15 steps, outer loop: 45 steps) and still it does not converge. The convergence goes towards 2E-7 after 22 outer SCF cycles, but then doesn't seem to get lower (see attachment a101-3-layer-jobID_188.out). I tried to restart the calculation with altered EPS_SCF (= 1E-6) and then the restarted SCF cycle converges as the convergence was already below 1E-6. Unfortunately, after that the SCF again seems to only very slowly converge, after 27 outer SCF steps it's still only at 8E-5 convergence (see attachment a101-3-layer-jobID_189.out). Can anybody please help me out? I feel like the calculation is not converging properly, as after nearly 2 hours it still hasn't converged one SCF cycle but I don't know what might be wrong orhow to fix it... Requiring 300+ steps to reach SCF convergence seems quite high to me and makes me start to think there is something fundamentally wrong with my input. If anyone could look at my inputs and tell me what's wrong with them, I would be forever thankful!

Kind regards,
Léon

P.S. Could the TZVP basis set pose a problem? I often see people use DZVP-SR for similar calculations, but my promotor and co-promotor both told me that TZVP is required for proper energetics and should be used in production runs.
On Wednesday, 28 June 2023 at 10:04:07 UTC+2 Léon Luntadila Lufungula wrote:
Dear all,

I am trying to determine the ideal slab thickness for an anatase (101) slab but my SCF cycles are not converging. I optimized the cutoffs for the anatase bulk and did a CELL_OPT calculation on the unit cell to get the converged structure. From this optimized unit cell, I then used ASE to build the (101) slabs  with a 20 Å vacuum width and thicknesses varying from 2 to 12 layers. During the GEO_OPT calculation I keep the bottom layer frozen to act as the bulk. I started the 2-layer calculation yesterday but when I looked at the output today, I see that the SCF cycle fails at every step of the geometry optimization (see output in attachment). Is there something wrong with my setup (too tight convergence criteria, wrong SCF setup, ...), or is it because a 2-layer structure is perhaps too small? The changes in energy go to 1E-5 - 1E-6 but never reach the convergence criteria of 1E-7 even after 300 steps (inner cycle: 10 steps, outer cycle 30 steps). I would guess that it could converge if I would increase the maximum number of steps, but 300 steps already seems quite a lot to me, although I could be wrong...

If anyone could share their thoughts on the situation so I can continue my work, I would greatly appreciate the help! Thanks in advance!

Best regards,
Léon
--
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... at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/12b3aec6-38d8-404f-b68f-aa681ccd6266n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/12b3aec6-38d8-404f-b68f-aa681ccd6266n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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... at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/94c9ad9e-58b3-4af1-844e-34b82c2fbed6n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/94c9ad9e-58b3-4af1-844e-34b82c2fbed6n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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... at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/2fb6de53-e6de-44ce-84d4-34ebbe1fb14bn%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/2fb6de53-e6de-44ce-84d4-34ebbe1fb14bn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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+unsubscribe at googlegroups.com<mailto:cp2k+unsubscribe at googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/85703e25-7ad2-4fc4-9a82-43261d13ab81n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/85703e25-7ad2-4fc4-9a82-43261d13ab81n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/ZRAP278MB0827E50D2086119BB5AFFF3FF424A%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20230628/c4a672c7/attachment-0001.htm>


More information about the CP2K-user mailing list