Re: [CP2K:14677] Calculating dipole moments for static dielectric constant calculation. Please help me decide whether and how to use Ewald summation.

357 views
Skip to first unread message
Message has been deleted

hut...@chem.uzh.ch

unread,
Feb 4, 2021, 7:28:45 AM2/4/21
to cp...@googlegroups.com
Hi

if you use Quickstep (DFT) then all calculations will use
the Ewald method unless PERIODIC NONE is specified.
The EWALD section will not be used.
This means you should use hte periodic dipole moment for your
calculation.

regards

Juerg Hutter
--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491
Institut für Chemie C FAX : ++41 44 635 6838
Universität Zürich E-mail: hut...@chem.uzh.ch
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp...@googlegroups.com wrote: -----
To: "cp2k" <cp...@googlegroups.com>
From: "Stns"
Sent by: cp...@googlegroups.com
Date: 02/03/2021 11:27PM
Subject: [CP2K:14677] Calculating dipole moments for static dielectric constant calculation. Please help me decide whether and how to use Ewald summation.

I would like to repeat calculations of the static dielectric constant that someone did years ago with a different code, for use in other calculations. My basic setup is below.

I'm not an expert and it's a challenge. One previous problem was that I did not realize I was not calculating "traditional" dipole moments that are compatible with the fluctuation formula used in exercises like the one at the link in red below. I now include "PERIODIC FALSE" (please see my setup at the bottom of this message) and the problem seems to have been fixed, but I mention it here in case it is not.
https://www.cp2k.org/exercises:2018_uzh_acpc2:mol_sol

The issue now is that I have realized I should be using Ewald summation in my periodic boundary conditions. I thought I was (that it was the default). In my setup below that I have been using, I have:

&POISSON
PERIODIC XYZ
&END

However, I came across an example input file in a CP2K exercise online and saw that he included explicit language related to Ewald summation, so it appears I have not been using it so far. The example uses:

&POISSON
&EWALD
EWALD_TYPE ewald
ALPHA .45
GMAX 19
&END EWALD
&END POISSON
Could someone please point me in the right direction? Should I replace my simple "PERIODIC XYZ" with the example directly above (in red)? How can I figure out reasonable values for ALPHA and GMAX if so? Any advice would be very helpful. Thank you.



My setup (below).
&GLOBAL
PROJECT X
RUN_TYPE MD
&END GLOBAL
&FORCE_EVAL
STRESS_TENSOR ANALYTICAL
METHOD Quickstep
&DFT
&PRINT
&MOMENTS
FILENAME = moments
ADD_LAST NUMERIC
PERIODIC FALSE
&EACH
MD 1
&END
&END MOMENTS
&END PRINT
BASIS_SET_FILE_NAME BASIS_MOLOPT
POTENTIAL_FILE_NAME POTENTIAL_SET
CHARGE 0
MULTIPLICITY 1
&MGRID
CUTOFF [Ry] 600
REL_CUTOFF [Ry] 60
&END
&QS
METHOD GPW
EPS_DEFAULT 1.0E-10
EXTRAPOLATION ASPC
EXTRAPOLATION_ORDER 4
&END QS
&POISSON
PERIODIC XYZ
&END
&SCF
SCF_GUESS ATOMIC
MAX_SCF 30
EPS_SCF 1.0E-6
&OT
PRECONDITIONER FULL_SINGLE_INVERSE
MINIMIZER DIIS
&END OT
&OUTER_SCF
MAX_SCF 10
EPS_SCF 1.0E-6
&END
&PRINT
&RESTART OFF
&END
&END
&END SCF
&XC
&XC_FUNCTIONAL
&PBE
&END
&END XC_FUNCTIONAL
&XC_GRID
XC_DERIV SPLINE2_SMOOTH
XC_SMOOTH_RHO NN50
&END XC_GRID
&VDW_POTENTIAL
POTENTIAL_TYPE PAIR_POTENTIAL
&PAIR_POTENTIAL
PARAMETER_FILE_NAME dftd3.dat
TYPE DFTD3
REFERENCE_FUNCTIONAL PBE
R_CUTOFF [angstrom] 16
&END
&END VDW_POTENTIAL
&END XC
&END DFT
&SUBSYS
&CELL
ABC X X X
&END CELL
&COORD
XXX
&END COORD
&TOPOLOGY
&END
&KIND X
BASIS_SET DZVP-MOLOPT-SR-GTH
POTENTIAL GTH-PBE-q9
&END KIND
&END SUBSYS
&END FORCE_EVAL
&MOTION
&MD
XXX
&END MD
&PRINT

&END PRINT
&END MOTION
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/7d4f33a8-c26c-4373-93bf-78bb12190155n%40googlegroups.com.

Message has been deleted

hut...@chem.uzh.ch

unread,
Feb 4, 2021, 8:31:35 AM2/4/21
to cp...@googlegroups.com
Yes, don't use "PERIODIC FALSE" = non-periodic dipole in the
DIPOLE section when doing periodic calculations.

regards

Juerg Hutter
--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491
Institut für Chemie C FAX : ++41 44 635 6838
Universität Zürich E-mail: hut...@chem.uzh.ch
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp...@googlegroups.com wrote: -----
To: "cp2k" <cp...@googlegroups.com>
From: "Stns"
Sent by: cp...@googlegroups.com
Date: 02/04/2021 02:27PM
Subject: Re: [CP2K:14689] Calculating dipole moments for static dielectric constant calculation. Please help me decide whether and how to use Ewald summation.

Dear Juerg:

Thank you for your reply. May I please check that I understand you?

You said that I am already using the Ewald method. Are you also saying that I should NOT be using "PERIODIC FALSE" as in the snippet below? Or is my input file correct? Sorry to trouble you; I would like to make sure I understand.
&DFT
&PRINT
&MOMENTS
FILENAME = moments
ADD_LAST NUMERIC
PERIODIC FALSE
&EACH
MD 1
&END
&END MOMENTS
&END PRINT
...
Thank you.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/d18b9620-4360-4671-ae8b-2b58573d421fn%40googlegroups.com.

Message has been deleted

hut...@chem.uzh.ch

unread,
Feb 4, 2021, 10:04:49 AM2/4/21
to cp...@googlegroups.com
Hi

that is wrong advice. You have to use the Berry phase dipole
in periodic settings.
Probably you were using the polarization/volume, check the units!
You might have to multiply by the cell volume (again units!).

regards

Juerg Hutter
--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491
Institut für Chemie C FAX : ++41 44 635 6838
Universität Zürich E-mail: hut...@chem.uzh.ch
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp...@googlegroups.com wrote: -----
To: "cp2k" <cp...@googlegroups.com>
From: "Stns"
Sent by: cp...@googlegroups.com
Date: 02/04/2021 02:45PM
Subject: Re: [CP2K:14691] Calculating dipole moments for static dielectric constant calculation. Please help me decide whether and how to use Ewald summation.

Dear Juerg:

Thank you very much for confirming that.

Your reply makes sense, but I have been using "PERIODIC FALSE" because someone advised me that that's the only way to get "traditional" dipole moments that can be used with fluctuation formulas for calculating the dielectric constant. When I previously didn't use it, I was getting Berry Phase dipole moments that led to dielectric constant values that were many orders of magnitude off. If there are any comments you can make about this, I would be grateful.

It sounds like you are saying that I should use "PERIODIC TRUE." If you have time and see any other changes I should make to be able to use fluctuation-type formulas for calculating the dielectric constant and get reasonable values, I would welcome any tips. Many thanks.
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/8dfc787a-4480-4016-a0b5-6a88fe080280n%40googlegroups.com.

Message has been deleted
Message has been deleted

Nathalie Smith

unread,
May 2, 2023, 7:20:53 AM5/2/23
to cp2k
Dear CP2K users, 

I hope it's okay to insert my own question into this old conservation. Sorry in advance if it's not. I tried to make my own post about my issue, but didn't get any answers so far.

I am also trying to calculate static dielectric constants of 3D periodic systems using the fluctuation formula, but I also get values that are 1-2 orders of magnitude off when using PERIODIC TRUE and the Berry Phase dipole moments. 

Is there something fundamental about the output of the dipole moments that I don't understand? I thought that for every step, the components (x, y and z) of the total dipole moment of my unit cell are printed (in Debye and in a.u.). 

I gave my input file for the MD simulation and my python script for the calculation of the dielectric constant here: https://groups.google.com/g/cp2k/c/KU_JGMdWrro .
Please be aware that I now know that I need to omit the factor 4*pi, however I still get very wrong results.

I would be super thankful for any help with my problem! I am getting quite desperate with this problem...

Best wishes,

Nathalie Smith

Reply all
Reply to author
Forward
0 new messages