unwrap data file

Dear LAMMPS users,

I am using the vmd package to unwrap the coordinates of atoms in a simulation box when simulating with the LAMMPS package. To do this, I open the data file that I have created containing the bond, angle and dihedrals coefficients with readlammpsdata command using package TopoTools in VMD and unwrap the box using pbc join fragment and pbc unwrap -all then I write the unwrapped data file using writelammpsdata. But in the file I created, the numbering of bond types, angle and dihedral types is not the same in my initial data file.

Could you please tell me, whether it is possible to do the same unwrap operation as I did using VMD and save the data file in unwrapped form with the help of LAMMPS command, for instance, write_data with the same numbering of bond, angle and dihedral coefficients as in my initial LAMMPS data. I want to multiply my initial wrapped simulation data file in unwrapped form in one direction using replicate command without changing the numbering the bond, angle and dihedral types as compared to my initial files.

I found that to wrap coordinate of atoms in the simulation box I can use command set atom * image 0 0 0 however it is not entirely clear for me what should I do with this command to unwrap coordinates of the atoms as vmd do using commands pbc join fragment and pbc unwrap -all?

Best regards,
Victor

LAMMPS always stores coordinates internally as wrapped coordinates plus image flags. When you read a data file with coordinates outside the box, those positions will be converted to wrapped + image flag when you have periodic boundaries, or the atom will be dropped for non-periodic boundaries. So if you want to apply the replicate command, you can just use it right away.

Axel.

Dear Prof. Kohlmeyer,

Thank you for your help!

However when a try to multiply the wrapped LAMMPS data file without unwrapping by VMD using

replicate 2 1 1

with

set atom * image 0 0 0

I obtain such warnings:

WARNING: Inconsistent image flags (src/domain.cpp:785)
WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:906)

Can you please, help me. How should I set the image flags to eliminate such warnings?

Best regards,
Victor

сб, 15 авг. 2020 г. в 17:10, Axel Kohlmeyer <[email protected]>:

The problem is the setting of the image flags. Do not do this.
Axel.

Dear Prof. Kohlmeyer,

I removed the set atom * image 0 0 0 in my LAMMPS input file, but however these warnings did not disappear. I use LAMMPS version 15 Apr 2020. However, when I use unwrapped by VMD LAMMPS data file, there are no warnings using replicate.

Best regards,
Victor

сб, 15 авг. 2020 г. в 18:48, Axel Kohlmeyer <[email protected]>:

There has to be something else happening to cause this warning. To please provide some simple examples to try and reproduce this behavior.
Axel.