I want to ask a question about the write_data command.
Imagine, there is a box with p p p boundary condition. One molecular with four atoms (bonds 1-2-3-4, bond length A) is near the top of the box. After some time steps, atom 1 leaves the top of the box. Because of the periodic boundary conditions, a new atom 1 will appear at the bottom of the box. And the distance between new atom 1 and atom 2 is B. And then i use the command “write_data data.4atoms”
At last, I used command “read_data data.4atoms”.But now, for the molecular, the bond length between atom 1 and atom 2 is still length A or, it has changed to length B.
签名由 网易邮箱大师 定制
LAMMPS will write out coordinates within the simulation box, but it will also update and write out “image flags” that keep a tally of how many times a particle has passed through the box and be replaced by a periodic image.
The bond length will be the correct one (case A). In most cases that will be the case even if you omit the image flags, but then LAMMPS will complain when reading the data file that you have “inconsistent image flags”. There are even cases where this warning must appear: e.g. when you have an infinite chain of atoms that is connected through periodic boundaries. LAMMPS will still compute the bond with the closest periodic image of the atom in question (provided the communication cutoff is sufficient).