Warning: Inconsistent image flags

Hi,

I’m new to LAMMPS. I’m trying to simulate bonded atoms as rigid bodies using “fix/rigid” command. When I run NVE or NVT simulations I see that I get “Inconsistent image flags” warnings. Upon checking about this further - I realized its probably due to bonds crossing the periodic boundaries of the box for few atoms in initial structure. So can you someone please clarify me with the following

  1. I’m currently simulating for a box of size 4x4x4 and periodic in all directions. So is there a way to solve this warning for such a system with finite size and periodic.
  2. I eventually plan to study thermal conductivity using Green Kubo (GK) at equilibrium. Will this warning affect the GK calculations then?

LAMMPS errors documentation mentions that this warning can cause problems for fix rigid commands, but I don’t see a detailed explanation of what exactly is going wrong. Would be great if someone can guide me! Thanks in advance

Erick

That depends on the details of your system.

Impossible to say. LAMMPS will always pick the closest periodic image of a bonded atom. That may or may not be the desired atom.

Thanks for the quick response Axel!

I’m not sure what you are referring as “desired atom” here. Can you please elaborate a bit. How can LAMMPS change the bonded atoms when unique molecule IDs are used as identifiers for each bonded pairs.

Molecule IDs are only decorative in LAMMPS. Besides, with periodic boundary conditions nothing is unique in that way. Each atom (or molecule) has 6 identical copies with just plusminus a box diameter away in each direction. If you have a inconsistent initial geometry where a bond is “wrapped around” then LAMMPS will compute the force between the one atom that “owns” the bond and the closest periodic copy of its bond partner. Otherwise you would get enormous forces or errors about missing bond atoms.

This scenario is not labeled as an error, since there is a valid use case: consider a linear polymer chain that continues infinitely through periodic boundaries. There it is impossible to not have one bond wrapped around.

Thanks Axel, for the detailed explanations!

But now if we hypothetically consider a use case: like a librating system, where image flags of fully in-box (i.e. no wrapping around) bonded pairs do not change during simulation, this warning shouldn’t affect then right? - because as there are no box cross overs with minimal movements, boundary atoms (owning bond) always pick the same periodic copy of its bond partner. Please correct me, if my understanding is wrong somewhere.

If you want to be certain, you have to construct and run test where you check for this.
It would be simpler though to correct the input geometry to be consistent.

Sure, I’ll test run a structure and get back.

For correcting the input geometry - can we bring the bonding atom to other side of box, where its periodic image connects with its bond partner, so that the bond now lies within the box?
I think, if we keep periodic in all directions, this change shouldn’t affect the results even if the symmetry of the crystal is lost. Can you please let me know what are your thoughts?

Please see the read_data documentation for details of what happens when LAMMPS reads geometries and topologies.