<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 Samira,</div><div><br></div><div>Thank you for the plots and for clarifying that you are using CP2K 2026.2.</div><div><br></div><div>From the profiles, I suspect that the structure at the box boundaries is an expected consequence of the MT 2D electrostatic kernel and its representation on a periodic FFT grid. The fact that the boundary features reproduce the slab's layer structure strongly supports this interpretation, although the input would be needed to confirm it.</div><div><br></div><div>The MT method removes interactions with periodic images in the non-periodic direction using a modified Coulomb kernel. The resulting potential is physically meaningful within the region where the method's spatial-separation conditions are satisfied. Near the outer box boundaries, the periodic continuation of this kernel can produce apparent copies of the slab structure. Increasing CUTOFF or REL_CUTOFF would therefore not be expected to remove these features.</div><div><br></div><div>The crucial condition is that the cell length in the non-periodic direction must be at least twice the spatial extent of the complete electronic density, including its tails. A sufficiently localized slab centered in the middle half of the cell satisfies this requirement. CP2K documents this condition here: https://manual.cp2k.org/trunk/methods/dft/electrostatics/index.html</div><div><br></div><div>If the occupied electronic density is negligible in the affected boundary regions and the MT condition is satisfied, these features should not, by themselves, imply errors in the slab's ground-state energy, density, or forces. However, states extending into the vacuum require additional care.</div><div><br></div><div>For a work function or vacuum-level alignment, use the converged flat vacuum plateau within the valid interior region, rather than the potential at the box faces. An asymmetric or polar slab can have different vacuum levels on its two sides.</div><div><br></div><div>To check this interpretation, could you please provide:</div><div><br></div><div>1. Your input file, particularly the CELL and POISSON sections, the total charge, and how the potential profile was generated. PERIODIC XY should be set consistently in CELL and POISSON.</div><div><br></div><div>2. The planar-averaged electron density plotted alongside the potential, so that the density tails and the onset of the boundary features can be compared.</div><div><br></div><div>3. A comparison at two cell heights, keeping the slab geometry and numerical settings fixed. The useful convergence checks are the energy, forces, and relevant electronic levels relative to the interior vacuum plateau.</div><div><br></div><div>These checks would establish whether the boundary structure is harmless in your calculation or whether the density extends beyond the region where MT provides the intended isolated-slab electrostatics.</div><div><br></div><div>Best regards,</div><div>Thomas</div><div><br><blockquote type="cite"><div>Am 06.09.2026 um 16:32 schrieb Samira <akbari2028@gmail.com>:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">Hello,</span><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">For clarification I performed these calculation using CP2K 2026.2.</div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Best,</div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Samira</div><div class="gmail_quote" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div dir="auto" class="gmail_attr">On Saturday, September 5, 2026 at 11:14:28 AM UTC+1 Samira wrote:<br></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">Hello,<div><br></div><div><p style="font-family: "Google Sans Text", sans-serif; line-height: 1.15; margin-top: 0px;">I am using the Martyna-Tuckerman (MT) 2D Poisson solver for a ZnO slab model. With a vacuum buffer of approximately 25 Å or larger, I observe a flat region in the 2D-averaged Hartree potential along the non-periodic<span class="Apple-converted-space"> </span><span style="line-height: 1.15; margin-top: 0px;">Z</span>-direction.</p><p style="font-family: "Google Sans Text", sans-serif; line-height: 1.15; margin-top: 0px;">However, right at the very edge of the simulation box, a non-flat artifact appears, which consistently matches the number of layers in the slab. I have tried varying the<span class="Apple-converted-space"> </span><span style="line-height: 1.15; margin-top: 0px;">CUTOFF</span>,<span class="Apple-converted-space"> </span><span style="line-height: 1.15; margin-top: 0px;">REL_CUTOFF</span>, box size, dipole correction, and<span class="Apple-converted-space"> </span><span style="line-height: 1.15; margin-top: 0px;">MT REL_CUTOFF</span>, but this behavior persists.</p><p style="font-family: "Google Sans Text", sans-serif; line-height: 1.15; margin-top: 0px;">Could you please advise if there is a way to fix this boundary artifact (still using MT P solver), and whether this artifact affects the calculated electronic properties of the slab? I have attached some of the graphs in this mail.</p><p style="font-family: "Google Sans Text", sans-serif; line-height: 1.15; margin-top: 0px;">Thank you for your guidance.</p><p style="font-family: "Google Sans Text", sans-serif; line-height: 1.15; margin-top: 0px;">Best regards,</p><p style="font-family: "Google Sans Text", sans-serif; line-height: 1.15; margin-top: 0px;">Samira<img alt="10layer.png" width="534px" height="270px" src="https://groups.google.com/group/cp2k/attach/3161c7e962efa/10layer.png?part=0.2&view=1"><img alt="5Layer.png" width="534px" height="409px" src="https://groups.google.com/group/cp2k/attach/3161c7e962efa/5Layer.png?part=0.1&view=1"></p></div></blockquote></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class="webkit-block-placeholder"></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">--<span class="Apple-converted-space"> </span></span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">You received this message because you are subscribed to the Google Groups "cp2k" group.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">To unsubscribe from this group and stop receiving emails from it, send an email to<span class="Apple-converted-space"> </span></span><a href="mailto:cp2k+unsubscribe@googlegroups.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">cp2k+unsubscribe@googlegroups.com</a><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">To view this discussion visit<span class="Apple-converted-space"> </span></span><a href="https://groups.google.com/d/msgid/cp2k/4bef1d93-8755-45c6-a753-d5c5a42feb09n%40googlegroups.com?utm_medium=email&utm_source=footer" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">https://groups.google.com/d/msgid/cp2k/4bef1d93-8755-45c6-a753-d5c5a42feb09n%40googlegroups.com</a><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">.</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/E9D12FAD-1E43-4C95-B1DA-8E854EE2B1B5%40gmail.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/E9D12FAD-1E43-4C95-B1DA-8E854EE2B1B5%40gmail.com</a>.<br />