[lammps-users] help regarding the command replicate

dear lammps users,

if you a trying to simulate a polymer network and you want to replicate the unit cell in the z direction using the ‘replicate’ command.how do we tell lammps that there should be a bond between the atom in one cell and an atom in an another cell??and in the manual its given tat we have to use the image flag to unwrap it out of the periodic box…my next qn is what is image flag and how do we know tat it is seperated by 1???

thanking you
vishnu.g

Dear Vishnu,

Image flags provide the solution to your problem. These are described briefly in the the read_data command:

http://lammps.sandia.gov/doc/read_data.html,

You can see how image flags are input in a LAMMPS data file by looking at the example in examples/peptide.
Perhaps the best way to understand image flags is to print them out using a dump command:

http://lammps.sandia.gov/doc/dump.html

In order for the replicate command to correctly replicate bonds that straddle cell boundaries, the two atoms should have image flags that differ by 1. So for example, if Atom A (near the left x-boundary) and atom B (near the right x-boundary) share a bond that straddles the x-boundaries, you could set (ix_A = 1, ix_B = 0) or (ix_A = 0, ix_B = -1).

If the image flags are set correctly, then these new bonds will be
generated automatically by a replicate. Image flags are
as Aidan explained.

Steve