remove atoms which cross periodic boundaries (keeping PBC)

Dear LAMMPS users,

I am running the following simulation (with periodic boundary conditions, PBC):

-I start from a fully connected polymer network (FENE bonds)

-I break a certain number of bonds randomly

-I let the network relax

During this procedure, a certain number of free polymer segments will be formed, which will diffuse freely. What I want to do is to get rid of these free segments.

What I thought of doing is letting the simulation run for a long enough time and delete all the atoms which cross the periodic boundaries.

In an older post, it was suggested to use fixed boundary conditions (FBC) and then allow for lost atoms, i.e.

thermo_modify lost ignore

However, this solution doesn’t work in my case because the bond topology takes into account the PBC (i.e. if I just change the BC from PBC to FBC this will result in some atoms being bonded to others which are on the other side of the box, and therefore in an error).

How can I obtain the desired result?

Best regards,

Valerio

PS: I am aware that an option would be to manipulate directly the output file, removing all the atoms with nx,ny or nz value different from 0 (see here for the notation). However, I would like to find a solution using LAMMPS.

Dear LAMMPS users,

I am running the following simulation (with periodic boundary conditions,
PBC):

-I start from a fully connected polymer network (FENE bonds)
-I break a certain number of bonds randomly
-I let the network relax

During this procedure, a certain number of free polymer segments will be
formed, which will diffuse freely. What I want to do is to get rid of these
free segments.

What I thought of doing is letting the simulation run for a long enough time
and delete all the atoms which cross the periodic boundaries.

In an older post, it was suggested to use fixed boundary conditions (FBC)
and then allow for lost atoms, i.e.

thermo_modify lost ignore

However, this solution doesn't work in my case because the bond topology
takes into account the PBC (i.e. if I just change the BC from PBC to FBC
this will result in some atoms being bonded to others which are on the other
side of the box, and therefore in an error).

How can I obtain the desired result?

please check out the compute fragment/atom command. this should allow
to identify the different fragments and then you can reference the
corresponding fragment ids in an atom style variable to have all
undesired atoms not matching the fragment id of the core polymer
(which would be the largest fragment) deleted.

axel.

You could also possibly use fix evaporate, perhaps in concert
with the fragment identification.

Steve