[CP2K-user] [CP2K:22424] Martyna-Tuckerman 2D Poisson solver: Non-flat Hartree potential artifact at box boundaries

Thomas Kühne tkuehne at gmail.com
Sun Sep 6 18:31:37 UTC 2026


Dear Samira,

Thank you for the plots and for clarifying that you are using CP2K 2026.2.

>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.

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.

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

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.

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.

To check this interpretation, could you please provide:

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.

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.

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.

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.

Best regards,
Thomas

> Am 06.09.2026 um 16:32 schrieb Samira <akbari2028 at gmail.com>:
> 
> 
> Hello,
> 
> For clarification I performed these calculation using CP2K 2026.2.
> 
> Best,
> Samira
> On Saturday, September 5, 2026 at 11:14:28 AM UTC+1 Samira wrote:
>> Hello,
>> 
>> 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 Z-direction.
>> 
>> 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 CUTOFF, REL_CUTOFF, box size, dipole correction, and MT REL_CUTOFF, but this behavior persists.
>> 
>> 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.
>> 
>> Thank you for your guidance.
>> 
>> Best regards,
>> 
>> Samira
>> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com <mailto:cp2k+unsubscribe at googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/cp2k/4bef1d93-8755-45c6-a753-d5c5a42feb09n%40googlegroups.com <https://groups.google.com/d/msgid/cp2k/4bef1d93-8755-45c6-a753-d5c5a42feb09n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/E9D12FAD-1E43-4C95-B1DA-8E854EE2B1B5%40gmail.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20260906/bb818b52/attachment-0001.htm>


More information about the CP2K-user mailing list