pppm in 2d model

Hello lammpsusers

I want to simulate a 2d period system. So I used "kspace_style pppm
1e-4" and "kspace_modify slab 3.0". The log shows ERROR: Incorrect
boundaries with slab PPPM (../pppm.cpp:221)
Last command: minimize 1e-8 1e-10 100 10000.
I am sure the initial position of every atom is inside the box.
I would really appreciate if you can help me on this simulating

# ----------------- Init Section -----------------

units real
atom_style full
boundary p f p

bond_style class2
angle_style class2
dihedral_style class2
improper_style class2
# -------------------------------
pair_style lj/class2/coul/long 10.0

pair_modify mix sixthpower tail yes
special_bonds lj/coul 0.0 0.0 1.0 dihedral yes
neighbor 3.0 bin
neigh_modify delay 0 every 1 check yes
read_data "hntpu.data"
kspace_style pppm 1.0e-4
kspace_modify slab 10.0

fix xwalls all wall/reflect ylo -36 yhi 36

set atom 1 charge 1.575
set atom 2 charge 2.1
set atom 3 charge -1.05
set atom 4 charge 0.053
set atom 5 charge -0.45
set atom 6 charge -0.95
set atom 7 charge -0.127
set atom 8 charge -0.64
set atom 9 charge 0.127
set atom 10 charge 0.351
set atom 11 charge 0.106
set atom 12 charge -0.351
set atom 13 charge 0.45
set atom 14 charge -0.32
set atom 15 charge -1.05
set atom 16 charge 0.294

# ----------------- Minimize Section -----------------

min_style cg
min_modify dmax 0.3
minimize 1e-8 1e-10 100 10000
reset_timestep 0

# ----------------- Equlibration Section -----------------

timestep 0.025
variable t_step equal 0.25

fix 1 all nvt temp 300.0 300.0 $(100.0*v_t_step)
dump 1 all atom 500 pu_hnt_eq.lammpstrj
thermo 100
run 100

##---------------GROUP--------------------------------------
group PU id > 3304
group HNT id < 3304

set group HNT type 1
set group PU type 2

# ---------- Compute stress information for Atomeye
visualization--------------------
compute s all stress/atom NULL
compute s1 all reduce sum c_s[1]
compute s2 all reduce sum c_s[2]
compute s3 all reduce sum c_s[3]
compute p all reduce sum c_s[1] c_s[2] c_s[3]
##---------------VARIABLES--------------------------------------
variable press equal -(c_p[1]+c_p[2]+c_p[3])/(3*vol)
variable Dist_HNT_x equal xcm(HNT,x)
variable Dist_HNT_y equal xcm(HNT,y)
variable Dist_HNT_z equal xcm(HNT,z)
variable Velocity_HNT_x equal vcm(HNT,x)
variable Velocity_HNT_y equal vcm(HNT,y)
variable Velocity_HNT_z equal vcm(HNT,z)

# ------------MOVE FULERINE GROUP-------------------

fix 2 HNT move linear 0 0.015 0

# -------------------------------

dump d2 all image 5000 img-*.jpg type type zoom 1.2 adiam 1.4 size 1280 720
dump m1 all movie 10 movie.avi type type zoom 1.2 adiam 1.4 size 1280 720

#dump apf all custom 500 atom_position.dat id
type x y z ix iy iz
dump trjfile all custom 500 dump.lammpstrj id mol
type x y z ix iy iz

thermo_style custom step temp pxx pyy pzz lx ly lz epair ebond eangle
edihed press v_press c_s1 c_s2 c_s3 v_Dist_HNT_x v_Dist_HNT_z
v_Velocity_HNT_x v_Velocity_HNT_y v_Velocity_HNT_z
thermo 50
timestep 0.1
run 50000

As the error message says, your boundary setting is incorrect. The documentation for the kspace_modify slab command clearly states, that the non-periodic dimension must be z. in your input it is y. that will not work.

Axel