<div dir="ltr">I think I missed the cancelling term in periodic calculations, the part of nuclear potential that cancels out the long-range part of pseudopotential. <br><br>On Tuesday, July 2, 2019 at 1:18:38 PM UTC-4, pavan kumar behara wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><div>Hello CP2K developers,</div><div><br></div><div>I am trying to separate the electronic and nuclear energy contributions in the GAPW scheme. I could do so successfully for a molecule with non-periodic calculation by passing nuclear-only density to the pw_poisson and hartree_1c energy calculation routines. By adding nuclear_pw, nuclear_1c with the self-energy term I get exact same value as analytical calculation (q1*q2 / r ). <br></div><div><br></div><div>I did this by passing rho0_s_gs, with only parts relevant to the core part and ignoring the hard and soft coefficients that pertain to electron density, to pw_poisson_solve() to get nuclear_pw. This includes ignoring the Qlm_h, Qlm_s under calculate_rho0_atom() routine. So, only Qlm_z goes into Qlm_tot, thus rho0 contains only the multipole of core charges.<br></div><div><br></div><div>And, by considering only the rhoz relevant terms in hartree_local_methods to get nuclear_1c. For this under hartree_local_methods, I considered only vrrad_z and vrrad_0 terms in Vh1_h, Vh1_s respectively. And, ecoul_1_z, ecoul_1_0 energy terms calculated using those potentials. </div><div><br></div><div>When it comes to periodic calculations doing the same results in negative nuclear energies for small cell sizes. If I do a very big box (of 100A) by placing the molecule at the center, I do see that this energy value is positive and it is converging towards the non-periodic value but still not so close. <br></div><div><br></div><div>My question is whether I am not accounting for the ewald summation effects correctly? Or my assumption or way of separating the nuclear and electronic densities is not correct? <br></div><div><br></div><div>I also saw a very old discussion about parameter tuning (<a href="https://groups.google.com/d/msg/cp2k/RUFQScjSDn0/lWdtYskTm9IJ" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/msg/cp2k/RUFQScjSDn0/lWdtYskTm9IJ';return true;" onclick="this.href='https://groups.google.com/d/msg/cp2k/RUFQScjSDn0/lWdtYskTm9IJ';return true;">link</a>) and there's a mention about periodic interactions not being correct for small cells and system type. I am testing the periodic case on a hematite supercell (3x3x2) structure (cell size of [14.7A, 14.7A, 26.5A]), with DZVP basis and GTH pseudopotential, and facing difficulties. I tried tuning the input parameters (alpha0_hard, max_local_rad, eps_fit) but still end up with negative nuclear energy. I am a bit lost on where to look, any pointers are highly appreciated. <br></div><div><br></div><div>I am sorry for such a long post. Thank you very much for your time.</div><div><br></div><div>Best regards,</div><div>Pavan.</div><div><br></div><div><b>Edits</b>: Made changes to the question, I went through Blochl's paper on PAW method and understood the electrostatic term contributions and compensation density well. Also, included more details about the parts I am modifying.<br></div></div></blockquote></div>