please note, that you are creating those “inconsistent image flags”
yourself with the command “set atom * image 0 0 0”.
this is only safe to use for atomic systems, but yours is molecular.
this is how you create bonds reaching across the box. LAMMPS can still
run such simulations, but as soon as you will use the change_box
(which is implied when adding a second data file with a different box
size) or replicate command, you will have a broken/invalid topology.
merging of systems that were pre-equilibrated with periodic boundary
conditions from inside LAMMPS is complicated and can fail easily since
LAMMPS doesn’t have an option to wrap/translate all atoms inside the
same molecule in the same way. i’ve done this a few times in the past,
but i don’t remember all the details, but that i went back and forth
between LAMMPS and VMD to make sure the final data files used for
merging have consistent and suitable image flags through adjusting the
box in VMD, not LAMMPS, since VMD stores absolute coordinates
internally and can do per-molecule wrapping of atoms. that way there
are no image flag issues with adjusting the box for molecular systems
with PBC.
Thanks Axel for replying.
Unfortunately, I can’t think of anything else which is very useful to add to Axel’s reply. Perhaps just a few minor details…
-First data file (lowereq.data) was loaded in the simulation.
Although inconsistent image flags warning is received again, but the simulation proceed normally.
From your description, fundamentally, it sounds like the problem is in the (first) data file itself.
(The problem has little to do with combining the data files.)
You will have to repair this file, or (better yet) generate it again from scratch using the software you originally used.
If the bonds are being split by the periodic boundaries, then as Axel said, you will have to “unwrap” each of these molecules. Using “unwrapped” coordinates means that atoms in the same molecule will be placed nearby, even if this places them on opposite sides of a periodic boundary. Usually, the center-of-mass of each molecule will lie in the same periodic image (cell), However individual atoms may in different images (different cells), in order to minimize the lengths of the bonds connecting them to the other atoms in the molecule.
It’s always better to begin a LAMMPS simulation using unwrapped coordinates.
---- vmd ----
As Axel said, VMD has useful commands for fixing this problem. See the pbctools documentation.
I’m not sure this is helpful, but I’ve been using this command to “unwrap” the coordinates of atoms in molecules.
pbc wrap -compound res -all
(usage_example)
That commands works fine when you use it to view a trajectory file (a “dump” file containing molecule ID numbers) of a LAMMPS simulation which was begun using an undamaged DATA file. However I’m not sure if it will work when you load a previously damaged DATA file (with wrapped atom coordinates). If not, there are probably other commands in VMD which will work (study the pbctools documentation).
---- pizza.py -----
Alternatively if pbctools fails, you can try using pizza.py’s dump tool. I don’t know if this will work. To use it, I suppose you will have to create a DUMP file. To do that, load the DATA file in lammps, create a dump file (using the dump command with the following keywords: (dump 1 all custom 0 traj.lammpstrj id mol type x y z ix iy iz), run for 0 timesteps (run 0).
Then load the dump file (“traj.lammpstrj”) in pizza.py and use the “unwrap()” function. Again, I’ve never tried this, so I don’t know if it will work.
https://pizza.sandia.gov/doc/dump.html
Failing that, if you have to write your own script to unwrap the atom coordinates, it should not be that difficult.
Welcome to running MD simulations.
Good luck.
Andrew