Potential Boundary Issues

Hello Wonderful Users of LAMMPS,

The following is my code for a simple simulation I am trying to run:

# Simulation 1

dimension 2
units si
boundary p p p

atom_style charge
neighbor .3 bin
neigh_modify delay 5

# Create Geometry

lattice hex .7
region box block 0 10 0 2 -0.25 0.25
create_box 1 box
create_atoms 1 box

mass 1 1

# LJ potentials

pair_style lj/cut .75#1.12246
pair_coeff * * 1 1
pair_coeff 1 1 1 1 .75#1.12246

# Define groups

region 1 block -10 10 -2 2 -1 1 #INF = large -/+ # for entire sim area
group 1 region 1

fix 1 all nve

# Run

timestep .005
thermo_modify lost ignore

dump 1 all atom 1 dump.simulation1

run 100

The issue I am currently having is that after the first 10 time steps
the atoms all disappear from the simulation box and never return. It
is my understanding that with periodic conditions the atoms are to
return to the simulation box once a boundary has been breached. I have
spent an unreal amount of time trying to crack this situation. What
are my options?? Once again, thank you for all your help!

A Frustrated LAMMPS User,

Jonathan Figueroa

jonathan,

Hello Wonderful Users of LAMMPS,

The following is my code for a simple simulation I am trying to run:

[...]

The issue I am currently having is that after the first 10 time steps
the atoms all disappear from the simulation box and never return. It
is my understanding that with periodic conditions the atoms are to
return to the simulation box once a boundary has been breached. I have

your understanding of periodic boundary conditions needs a little
adjustment. the actual atoms do move on it is a "periodic copy"
of the atom that returns. what you are looking at is now more of
a visualization issue than an MD/LAMMPS issue. what you are
seeing is a so-called "unwrapped" trajectory that follows the original
atoms. if you would wrap them back into the original cell, then
you would see them filling up the cell as you expect it to be.
upon calculation of the forces the simulation certainly is still
doing the right thing, as the atoms are wrapped back as needed
automatically.

spent an unreal amount of time trying to crack this situation. What
are my options?? Once again, thank you for all your help!

a) output only the wrapped coordinates (the default atom style
dump writes out the wrapped coordinates plus information about
what periodic copy the atom is currently in)

b) use a visualization software that allows you to wrap coordinates
back in to the principal unit cell. in VMD for example, this is done
for your (simple) case with: pbc wrap -all

axel.