[CP2K:1753] Re: Total dipole via LOCALIZATION - bug?

Teodoro Laino teodor... at gmail.com
Tue Feb 3 11:07:32 UTC 2009

Dear Victoria,

the bug fix that Juerg was mentioning was affecting ONLY the calculation 
of the dipole via the MOMENTS section.
There were no substantial changes to the calculation of dipole via 
So if you want some help, please, post a small, fast to debug input file 
which does not produce what you would
expect to be produced. The simplest and the fastest is better.
If you can also tell us the date of the version that you are using (and 
which looks like it is working) this would
speed up enormously the debugging.

CP2K is a quite large project and these kind of problems, though we have 
a tight regtest control, are unfortunately unavoidable.
Hope in your collaboration!

viki wrote:
> Please, this code was written originally by Fawzi (so I think) for an
> article which we wrote jointly on IR spectra - the explicit purpose of
> that PBC code was to avoid jumps in total dipole derivative due to
> periodicity. I have an old version of QS with Fawzi's programming in
> which this problem did not exist - but it does not include dispersion
> which I now need. I would rather not install the code again unless
> this particular problem was addressed - is there any way to ask the
> person who fixed the bug, if he addressed this particular problem?
> Thanks much! Victoria
> On Jan 31, 7:09 pm, Juerg Hutter <hut... at pci.uzh.ch> wrote:
>> Hi
>> there was a bug fix regarding the PBC dipole recently:
>> Fri Jan 9 18:32:09 2009 UTC (3 weeks ago) by vondele
>> Are you running an updated version?
>> The Berry phase dipole is only defined within modulo L/2Pi.
>> Jumps of multiples of this value are expected to appear.
>> You can also calculate the total dipole moments without
>> localization with
>> There you can set
>> this will minimize the number of jumps by setting the
>> reference point to the center of atomic charges, i.e.
>> the contribution to the dipole from the nuclear charges is
>> zero. The same applies to the localization based method.
>> regards
>> Juerg Hutter
>> ----------------------------------------------------------
>> Juerg Hutter                   Phone : ++41 44 635 4491
>> Physical Chemistry Institute   FAX   : ++41 44 635 6838
>> University of Zurich           E-mail: hut... at pci.uzh.ch
>> Winterthurerstrasse 190
>> CH-8057 Zurich, Switzerland
>> ----------------------------------------------------------
>> On Sat, 31 Jan 2009, v.... at fh.huji.ac.il wrote:
>>> Hello,
>>> I am running
>>>          &TOTAL_DIPOLE
>>>            &EACH 1
>>>                &END
>>>          &END TOTAL_DIPOLE
>>> with the objective to calculate system dipole derivative as a function
>>> of time (I need the IR spectrum). The system is periodic (one unit
>>> cell of clathrate hydrate, which includes water, H2S and ethylene
>>> oxide), DZVP-BLYP with Grimme van der Waals correction.
>>> So here is a problem - now and then the dipole derivative jumps to
>>> some preposterously huge value (positive or negative). These are
>>> isolated points. To me it seems as if Berry phase formula which is
>>> supposed to correct for periodicity does not work, although it is
>>> supposed to be a default. Any advice? Thanks, Victoria Buch
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
> >

More information about the CP2K-user mailing list