[CP2K-user] [CP2K:19453] Re: super slow total dipole calculation for Mg2+ compared to Zn2+
Krack Matthias
matthias.krack at psi.ch
Thu Nov 2 15:28:53 UTC 2023
Dear Emma
The electronic structure of Mg(2+) (2s2 2p6) and Zn(2+) (3d10) is anything than similar. The very great hardness of the Mg-q10 pseudopotential, as already noted by Marcella, has been discussed several times on this forum. It requires with GPW cutoff values of 1200 Ry or larger for converged forces.
HTH
Matthias
From: cp2k at googlegroups.com <cp2k at googlegroups.com> on behalf of Emma Rossi <emma.rossi.1 at studenti.unipd.it>
Date: Thursday, 2 November 2023 at 15:55
To: cp2k at googlegroups.com <cp2k at googlegroups.com>
Subject: Re: [CP2K:19451] Re: super slow total dipole calculation for Mg2+ compared to Zn2+
Dear Marcella,
I checked the Wannier centers of the system and they are properly localized.
I tried running the dynamics also with 800 Ry cutoff (vs. 600 Ry used previously), CG minimization algorithm for the wfn (vs. DIIS ) and CRAZY method (vs. JACOBI) for the calculation of the dipole moment. These settings do not improve the situation.
I cannot figure out the reason why the localization of the total dipole moment for Mg2+ requires many more iterations per step compared to Zn2+. These metals have very similar electronic structure, 10 and 12 valence electrons respectively, and using the same level of theory, the calculation for the two takes very different time scales.
I'm going to compute both the band gap and the Wannier centers also for the system with Zn2+, just to compare.
Thank you for your suggestions and any further discussions are highly appreciated.
Best regards,
Emma Rossi
Il giorno mar 24 ott 2023 alle ore 17:51 Marcella Iannuzzi <marci.akira at gmail.com<mailto:marci.akira at gmail.com>> ha scritto:
Dear Emma,
If the MOS are localised the Wannier centers are also available and the coordinates can be printed by activating the related print_key
· WANNIER_CENTERS<https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/LOCALIZE/PRINT/WANNIER_CENTERS.html>
Regards
Marcella
On Tuesday, October 24, 2023 at 5:34:27 PM UTC+2 Emma Rossi wrote:
Dear Marcella,
Thank you very much for your reply.
Actually, I’m using the Berry phase approach to compute the total dipole of the simulation box, thus I have not Wannier centres from my calculations at the moment.
I tried several keywords for the minimisation of the wavefunction on single point calculations in gas phase. Conjugate Gradient in combination with the FULL_ALL preconditioner seems to speed up the calculation compared to DIIS and FULL_KINETIC preconditioner. I’ll try to use these
settings for the MD in bulk.
Using larger cutoffs for the electron density makes the calculations even slower.
Concerning the band gap, I’ll check whether experimental data are available in the literature to assess the accuracy of my calculations.
Thank you again for your hints.
Best ragards,
Emma Rossi
Il giorno ven 20 ott 2023 alle 12:49 Marcella Iannuzzi <marci... at gmail.com> ha scritto:
Dear Emma,
Both Mg and Na have quite hard functions in the basis set, it might be that the cutoff of 600 Ry is not sufficient.
Have you checked whether the electronic structure is OK (e.g. energy gap) ?
Often the localisation algorithm shows convergence problems when there are intrinsically very delocalised states (see metals).
Maybe this is not the problem though. Are the Wannier centres after localisation at the expected positions ?
Regards
Marcella
On Friday, October 20, 2023 at 11:09:48 AM UTC+2 Emma Rossi wrote:
Dear developers and CP2K users,
I'm running AIMD simulations and computing the total dipole moment of a 15 A cubic box (Berry phase approach) containing water molecules, a phosphate chain (-4) and a divalent cation, either Zn2+ or Mg2+.
For Mg2+, the convergence of the MOs localization process at each step is tremendously slower (one/two order of magnitude) compared to the box with Zn2+. I cannot figure out the reason of such behaviour. I use the default setting for the LOCALIZE section, which employs the JACOBI method.
The -2 net charge of the system is counterbalanced by uniform background. 600 Ry cutoff for the auxiliary PW expansion of the electron density (500 or 400 Ry are used in the literature for Zn2+ and Mg2+ respectively) and BLYP XC are used. DZVP-MOLOPT-SR-GTH-q10 and DZVP-MOLOPT-SR-GTH-q12 are used for Mg2+ and Zn2+ respectively.
I observe a similar slowdown of the MOs localization speed when I use Na+ atoms to counterbalance the -2 charge of the system containing Zn2+.
Here a typical input file follows.
&GLOBAL
PRINT_LEVEL LOW
PROJECT_NAME MD
RUN_TYPE MD
&END GLOBAL
&MOTION
&MD
ENSEMBLE NVT
STEPS 100
TIMESTEP 0.5
TEMPERATURE 3.0000000000000000E+02
TEMP_TOL 5.0000000000000000E+01
&THERMOSTAT
TYPE CSVR
&CSVR
TIMECON 2.4999999999999996E+01
&END CSVR
&END THERMOSTAT
&END MD
&END MOTION
&FORCE_EVAL
METHOD QS
&DFT
BASIS_SET_FILE_NAME BASIS_MOLOPT
POTENTIAL_FILE_NAME GTH_POTENTIALS
CHARGE -2
&SCF
MAX_SCF 100
EPS_SCF 4.9999999999999998E-07
SCF_GUESS RESTART
&OT T
MINIMIZER DIIS
PRECONDITIONER FULL_KINETIC
&END OT
&END SCF
&MGRID
CUTOFF 6.0000000000000000E+02
&END MGRID
&XC
DENSITY_CUTOFF 1.0000000000000000E-10
GRADIENT_CUTOFF 1.0000000000000000E-10
TAU_CUTOFF 1.0000000000000000E-10
&XC_GRID
XC_SMOOTH_RHO NN10
XC_DERIV SPLINE2_SMOOTH
&END XC_GRID
&XC_FUNCTIONAL NO_SHORTCUT
&BECKE88 T
&END BECKE88
&LYP T
&END LYP
&END XC_FUNCTIONAL
&VDW_POTENTIAL
&PAIR_POTENTIAL
R_CUTOFF 8.0000000000000000E+00
TYPE DFTD3(BJ)
PARAMETER_FILE_NAME dftd3.dat
REFERENCE_FUNCTIONAL BLYP
EPS_CN 1.0000000000000000E-02
CALCULATE_C9_TERM T
REFERENCE_C9_TERM T
LONG_RANGE_CORRECTION T
&END PAIR_POTENTIAL
&END VDW_POTENTIAL
&END XC
&LOCALIZE T
&PRINT
&TOTAL_DIPOLE ON
FILENAME =totdipole
PERIODIC T
&EACH
MD 1
&END EACH
&END TOTAL_DIPOLE
&END PRINT
&END LOCALIZE
&END DFT
&SUBSYS
&CELL
A 1.5460000000000001E+01 0.0000000000000000E+00 0.0000000000000000E+00
B 0.0000000000000000E+00 1.5460000000000001E+01 0.0000000000000000E+00
C 0.0000000000000000E+00 0.0000000000000000E+00 1.5460000000000001E+01
MULTIPLE_UNIT_CELL 1 1 1
&END CELL
&KIND O
BASIS_SET DZVP-MOLOPT-GTH-q6
POTENTIAL GTH-BLYP-q6
&END KIND
&KIND H
BASIS_SET DZVP-MOLOPT-GTH-q1
POTENTIAL GTH-BLYP-q1
&END KIND
&KIND C
BASIS_SET DZVP-MOLOPT-GTH-q4
POTENTIAL GTH-BLYP-q4
&END KIND
&KIND P
BASIS_SET DZVP-MOLOPT-GTH-q5
POTENTIAL GTH-BLYP-q5
&END KIND
&KIND Na
BASIS_SET DZVP-MOLOPT-SR-GTH-q9
POTENTIAL GTH-BLYP-q9
&END KIND
&KIND Mg
BASIS_SET DZVP-MOLOPT-SR-GTH-q10
POTENTIAL GTH-BLYP-q10
&END KIND
&TOPOLOGY
NUMBER_OF_ATOMS 384
MULTIPLE_UNIT_CELL 1 1 1
&END TOPOLOGY
&END SUBSYS
&END FORCE_EVAL
Here a piece of the file.out concerning the localization is reported
ENSEMBLE TYPE = NVT
STEP NUMBER = 48740
TIME [fs] = 24370.000000
CONSERVED QUANTITY [hartree] = -0.234908827385E+04
INSTANTANEOUS AVERAGES
CPU TIME [s] = 220.24 29.11
ENERGY DRIFT PER ATOM [K] = -0.274167730955E+04 -0.106732023761E+04
POTENTIAL ENERGY[hartree] = -0.235022491736E+04 -0.234811418791E+04
KINETIC ENERGY [hartree] = 0.530388799833E+00 0.547854613121E+00
TEMPERATURE [K] = 291.529 301.129
***************************
Number of electrons: 1070
Number of occupied orbitals: 535
Number of molecular orbitals: 535
Number of orbital functions: 3012
Number of independent orbital functions: 3012
Extrapolation method: ASPC
SCF WAVEFUNCTION OPTIMIZATION
----------------------------------- OT ---------------------------------------
Minimizer : DIIS : direct inversion
in the iterative subspace
using 7 DIIS vectors
safer DIIS on
Preconditioner : FULL_KINETIC : inversion of T + eS
Precond_solver : DEFAULT
stepsize : 0.15000000 energy_gap : 0.20000000
eps_taylor : 0.10000E-15 max_taylor : 4
----------------------------------- OT ---------------------------------------
Step Update method Time Convergence Total energy Change
------------------------------------------------------------------------------
1 OT DIIS 0.15E+00 4.9 0.00001365 -2350.2265786077 -2.35E+03
2 OT DIIS 0.15E+00 7.0 0.00000785 -2350.2266129356 -3.43E-05
3 OT DIIS 0.15E+00 7.0 0.00000667 -2350.2266281036 -1.52E-05
4 OT DIIS 0.15E+00 7.0 0.00000316 -2350.2266318502 -3.75E-06
5 OT DIIS 0.15E+00 7.1 0.00000285 -2350.2266340790 -2.23E-06
6 OT DIIS 0.15E+00 7.0 0.00000168 -2350.2266355491 -1.47E-06
7 OT DIIS 0.15E+00 7.1 0.00000158 -2350.2266365271 -9.78E-07
8 OT DIIS 0.15E+00 7.0 0.00000079 -2350.2266370647 -5.38E-07
9 OT DIIS 0.15E+00 7.1 0.00000054 -2350.2266374235 -3.59E-07
10 OT DIIS 0.15E+00 7.0 0.00000041 -2350.2266374897 -6.63E-08
* SCF run converged in 10 steps *
Electronic density on regular grids: -1069.9999984366 0.0000015634
Core density on regular grids: 1067.9999999649 -0.0000000351
Total charge density on r-space grids: -1.9999984716
Total charge density g-space grids: -1.9999984716
Overlap energy of the core charge distribution: 0.00000352123302
Self energy of the core charge distribution: -6058.29367128599642
Core Hamiltonian energy: 1758.83041225385932
Hartree energy: 2514.80853697306702
Exchange-correlation energy: -565.57191895188691
Total energy: -2350.22663748972354
LOCALIZE| The spread relative to a set of orbitals is computed
LOCALIZE| Orbitals to be localized: All orbitals
LOCALIZE| If fractional occupation, fully occupied MOs are those
within occupation tolerance of 0.00000001
LOCALIZE| Spread defined by the Berry phase operator
LOCALIZE| Optimal unitary transformation generated by Jacobi algorithm
Eigenvalues of the occupied subspace spin 1
---------------------------------------------
-2.77340522 -1.55519360 -1.55401616 -1.55312686
-0.84401306 -0.81554322 -0.80702571 -0.80237237
-0.80085752 -0.79902548 -0.79112340 -0.79067760
-0.78889214 -0.78844561 -0.78745096 -0.78661985
-0.78594483 -0.78398619 -0.78359896 -0.78223867
-0.78202387 -0.78089859 -0.77900446 -0.77831838
-0.77761721 -0.77700210 -0.77677871 -0.77654095
-0.77610461 -0.77529141 -0.77482833 -0.77403370
[.......]
-0.09177880 -0.09168157 -0.09118981 -0.09045276
-0.09027640 -0.08911508 -0.08871380 -0.08817562
-0.08660485 -0.08624312 -0.08399649 -0.08220911
-0.07894380 -0.07429071 -0.06779908
Fermi Energy [eV] : -1.844907
LOCALIZATION| Computing localization properties for OCCUPIED ORBITALS. Spin: 1
Spread Functional sum_in -w_i ln(|z_in|^2) sum_in w_i(1-|z_in|^2)
Initial Spread (Berry) : 203183.2008851338 34522.9346453651<tel:(934)%20645-3651>
Localization by iterative distributed Jacobi rotation
Iteration Functional Tolerance Time
100 1035.1444747551 0.7611E-01 0.145
200 1035.1439265702 0.2374E-01 0.145
300 1035.1438285431 0.2086E-01 0.145
400 1035.1437772042 0.1457E-01 0.155
500 1035.1437553092 0.8452E-02 0.146
600 1035.1437479886 0.4565E-02 0.156
700 1035.1437457665 0.2413E-02 0.144
800 1035.1437451192 0.1268E-02 0.155
900 1035.1437449348 0.6661E-03 0.155
1000 1035.1437448830 0.3497E-03 0.156
1100 1035.1437448685 0.1836E-03 0.169
Localization for spin 1 converged in 1195 iterations
Spread Functional sum_in -w_i ln(|z_in|^2) sum_in w_i(1-|z_in|^2)
Total Spread (Berry) : 1051.8315283360<tel:(831)%20528-3360> 1035.1437448646
To check the role of the localization method in such problem, I ran two single point calculations, the first using the JACOBI method and the second using the CRAZY method to compute the total dipole. The latter makes the process even slower.
I would be very grateful if any of you could give me any insight.
Best regards,
Emma Rossi
--
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/a4de3df0-0d85-44ec-8b5f-138082684895n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/a4de3df0-0d85-44ec-8b5f-138082684895n%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/c33c6c90-df53-4994-9a5b-0370042a0a04n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/c33c6c90-df53-4994-9a5b-0370042a0a04n%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/CA%2BKefgWy%3DACsrtMuuvASsHAmz1%3DYYWLSYxNLsA4-95RTvXHEEQ%40mail.gmail.com<https://groups.google.com/d/msgid/cp2k/CA%2BKefgWy%3DACsrtMuuvASsHAmz1%3DYYWLSYxNLsA4-95RTvXHEEQ%40mail.gmail.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/ZRAP278MB0827CDFBF239657545F9C859F4A6A%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20231102/f515a34d/attachment-0001.htm>
More information about the CP2K-user
mailing list