<div dir="ltr">You might want to output the electron density on a 3D grid<div><br></div><div>https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/PRINT/E_DENSITY_CUBE.html</div><div><br></div><div>Probably you want to do this for the ideal and defect system, and subtract the two densities (https://www.cp2k.org/tools:cubecruncher might be useful).</div><div><br></div><div>Hopefully this would give you a fairly localised density that you can then calculate the dipole / quadrupole moments of. If it isn't localised, then probably the correction schemes break down anyway ...</div><div><br></div><div>MattĀ <br><br>On Saturday, September 9, 2017 at 1:25:56 PM UTC+8, Peng wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><div>Hi all,</div><div><br></div><div><div>I'm wondering if it's currently possible with CP2K to apply a correction for</div><div>non-neutral periodic system as in Eq. 14 of G. Makov & M. C. Payne, Phys Rev B</div><div>51 4014 (1995), which involves determining the center of charge as well as an</div><div>integration: \int_cell dr^3 \rho(r) r^2. I assume the first part is just related</div><div>to the total system dipole calculated with respect to the origin of the</div><div>coordinate system (CP2K_INPUT / FORCE_EVAL / DFT / PRINT / MOMENTS / REFERENCE =</div><div>0), but how should I go about computing the integral? If it's not directly</div><div>supported, can someone please give some quick pointers on where and how to hook</div><div>into the each MD step to implement this? Any suggestions would be really</div><div>helpful. Thank you very much!</div></div><div><br></div><div>Best regards,</div><div><br></div><div>Peng</div></div></blockquote></div></div>