[lammps-users] shift a region of atoms with respect to another region

Dear LAMMPS users;

I’m a beginner to LAMMPS and intend to use it to study grain boundaries. I’m using LAMMPS 12-Sep10 version. I have created a simulation box which consists of two regions: upper half and lower half (upper and lower refers to vertical or y-axis). Both regions are cubic lattice but they have different orientation. The boundary separating the two regions serves as a mirror plane.

My intention is to shift the upper half with respect to lower half in x- and/or z-direction (in other words, each atoms in the upper half will be shifted by a vector t [tx,0,tz] from its initial position).

The value of the shift vector t [tx,0,tz] is intended to be varied for a certain number of timesteps.

What I have done is I shift the origin of the ‘lattice’ command for the upper region by the shift vector t. However, I intend to vary this shift vector by a finite increment for every certain number of timesteps (e.g. timestep = 100 => t = [0.5 0 0], then timestep = 200 => t = [1 0 0]).

I’m sure that my method (i.e. shifting the origin of the upper lattice) is not efficient, especially in script writing. Can anyone point me to a more efficient method or command to do the job that I describe in here?

Thank you for your help.

Sincerely,
Jannho Lau

You can use the lattice and create_atoms command multiple
times to generate multiple regions of atoms at different orientations
and offsets. You can also use the displace_atoms command to
shift a group of atoms to a new position. Efficiency doesn't matter.
These are all setup operations, outside of a run.

Steve