<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div>Dear Wim,</div><div><br></div><div>I found an inconsistency in the traditional moment calculation and submitted a fix in PR #6274 (https://github.com/cp2k/cp2k/pull/6274). </div><div>Periodic image contributions included in the overlap matrix were missing from the dipole operator, which explains how the reported total </div><div>charge could be correct while the dipole depended on the reference point.</div><div><br></div><div>In my small partially periodic test, the corrected slab-normal dipole is independent of the reference point and consistent with density </div><div>integration within the grid accuracy. However, I cannot reproduce your exact numbers without the coordinates referenced by Au_NHC.xyz, </div><div>which were not included in the attachments.</div><div><br></div><div>For your XY-periodic slab, the z component is well-defined with MOMENTS PERIODIC F, including with smearing. The in-plane components </div><div>are not uniquely defined, so the reported “Total” magnitude should NOT be interpreted as the slab dipole!</div><div><br></div><div>Cheers,</div><div>Thomas</div><div><br><blockquote type="cite"><div>Am 13.10.2026 um 17:16 schrieb Wim Ruhwinkel <wruhwinkel@gmail.com>:</div><br class="Apple-interchange-newline"><div>Dear CP2K community,<br><div><br></div><div>I am trying to compute the surface-normal dipole moment of an NHC-type molecule adsorbed on an Ag(111) slab (258 atoms; hexagonal cell, a = b = 23.068 Å, γ = 120°, c = 50 or 80 Å). The system is periodic in XY (set in &CELL and &POISSON) and charge neutral. Settings: CP2K 9.1, GPW, optPBE-vdW, Fermi-Dirac smearing at 300 K, POISSON_SOLVER ANALYTIC. The input is attached.</div><div><br></div><div>Since the Berry-phase formula does not support smearing, I use &MOMENTS with PERIODIC .FALSE. The output reports Electronic = −2272, Core = 2272, Total = 0.000, but the z-dipole depends strongly on the reference point:</div><div><br></div><div>| REFERENCE | c = 50 Å | c = 80 Å |</div><div>|--------------|----------|----------|</div><div>| COM | 106.1 D | 105.1 D |</div><div>| COAC | 111.1 D | 110.1 D |</div><div>| USER_DEFINED | 775.0 D | 2100.6 D |</div><div>| ZERO | 2503.5 D | 4160.7 D |</div><br><div>For a neutral system the dipole should be independent of the reference point. The same input with a single H2O molecule in the same 2D cell gives the correct 1.806 D (non-periodic reference: 1.808 D), so the setup itself seems fine to me.</div><div><br></div><div>The physically expected value is about 10–13 D: integrating the plane-averaged TOT_DENSITY_CUBE along z gives 10.4–12.8 D. The value printed by SURFACE_DIPOLE_CORRECTION in fully periodic runs is −2.16 e·Å (10.4 D). With WAVELET (CP2K 2026.2) &MOMENTS gives 96 D. TOTAL_DIPOLE in &LOCALIZE also gives unphysical values.</div><br>My questions:<br>1. Is the traditional dipole operator in &MOMENTS (PERIODIC .FALSE.) applicable to a system that is periodic in x/y, at least for the non-periodic z component? If not, why does it depend on the reference point?<br>2. Is there a recommended way to obtain the slab dipole directly from CP2K without applying SURFACE_DIPOLE_CORRECTION?<br><br>Thank you very much for your time.<br><br>Best regards,<br>Wim Ruhwinkel
<div><br class="webkit-block-placeholder"></div>
-- <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 visit <a href="https://groups.google.com/d/msgid/cp2k/39ed0697-1da0-40f3-b13a-6176ce73056dn%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/39ed0697-1da0-40f3-b13a-6176ce73056dn%40googlegroups.com</a>.<br>
<span id="cid:43e636a3-1dfd-48cf-bd6d-8c19546d538b"><Ag_NHTe_energy.inp></span><span id="cid:6cf3310c-f559-482d-9940-160abe46be0f"><QS_optPBE-vdW.inc></span><span id="cid:bcf96c14-4067-4796-b48c-221f5fc73fbd"><basis_pseudo.inc></span></div></blockquote></div><br></body></html>
<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 visit <a href="https://groups.google.com/d/msgid/cp2k/7681E9A1-5111-40B2-863C-BDEEE82FB12B%40gmail.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/7681E9A1-5111-40B2-863C-BDEEE82FB12B%40gmail.com</a>.<br />