Inconsistent image flags after fix bond/create

Hello everyone,

I use LAMMPS (29 Aug 2024 - Update 3) on Ubuntu.

Problem Description
I want to create a cross-linked polymeric system with fix bond/create and I am facing a similar problem with others (Bond/create issue in Images of the system), namely, “inconsistent image flags”

As Axel mentions in that post, the bond creation is correct, and there is no issue in wrapped coordinates. However, if I unwrap the trajectory for some post-analysis I would get broken molecules, wrong msds etc.

Objective:
After gelation, I want a clean, cross-linked structure with no image-flag “discontinuities” between bonded atoms, so both wrapped and unwrapped trajectories are consistent.

Question:
Does anybody have an idea on how to fix this warning/issue?
Are there any native LAMMPS tools or commands to reset image flags based on bond topology?
Any method that will correct image flags immediately after the bonding stage?

Thank you,
Alex

https://docs.lammps.org/reset_atoms.html

Sorry, I should had mentioned that I already tried it, but it did not work.

Specifically I tried reset_atoms image all after the run that creates the bonds.

Then, you will likely have to program your own tool to resolve any inconsistent image flags for your specific system.