Electrodes splitting while doing NPT simulation

I am doing npt in only z direction but my electrodes on two sides are getting splitted

WhatsApp Image 2024-05-01 at 13.00.49_1012e149
using setforce 0 command
fix 5 ele setforce 0.0 0.0 0.0

Input data file :
embf15M300.dat (1.5 MB)
Input script:
IL.in (6.5 KB)

can someone help?

You need to understand that the aim of this forum is to discuss LAMMPS-related issues, which possibly are also interesting for its community of users.

You are instead dumping a complex simulation script and asking people to debug it for you, without providing any explanation on what is it that you are studying, what to expect, how you created it, etc. No one is going to do it for you, and even if someone did, how would you justify the results in a scientific paper or in a dissertation?

You should simplify the input script as much as possible to reproduce the behaviour you reported, and only then you can ask very specific questions if something doesn’t go as you expected.

As a side note, you are not doing an NPT simulation, but rather simulating a slab with fixed volume. From your settings:

units real 
atom_style full
dimension 3
boundary p p f
...
kspace_style         pppm 1.0e-6
kspace_modify        slab 3
fix zwalls all wall/reflect zlo EDGE zhi EDGE units box
...
group ele type 2 3
...
neighbor            2.0 bin 
neigh_modify        exclude group ele ele check no
...
fix 5 ele setforce 0.0 0.0 0.0
...
fix 3 all nvt temp 298.0 298.0 100.0
fix_modify 3 temp t_all
run 20000
unfix 3

The only modification I made was to remove the kspace_style pppm/electrode, and the electrodes (which I assume is amorphous carbon) remain fixed and the electrolyte moves into the cavities, and this is very much consistent with the other commands you have used.

1 Like

Submitted the wrong script,SORRY for that
Highlights of my NPT simulations scripts are:
boundary p p p
. . . . . .
kspace_style pppm/electrode 1.oe-6
. . . . . . .
fix 5 ele setforce 0.0 0.0 0.0
. . . . . . . .
fix rigid_electrodes ele rigid/nvt molecule temp 300.0 300.0 100.0
. . . . . . . . . .
fix all_npt all npt temp 300.0 300.0 100.0 z 1.0 1.0 10.0

You are missing the points on my previous post, and blissfully ignoring the forum rules on clear communication, code formatting, cross-posting, etc.

You are integrating all atoms in fix all_npt all npt and at the same time excluding the interactions between the atoms in the ele group while zeroing the forces acting on them. Do you understand the physics of this choice?