ERROR: Lost atoms: original 449112 current 448546

Dear LAMMPS community,

I got an error when I run this code, it is a compression and shear test. When I use p s s as the boundary condition, I don’t receive any errors but the box in the compression direction was forced to separate with part of the atoms like in the attached figure. When I use p f s, I got error :lost atoms. And I am also wondering on what condition I can use ‘lost ignore’? How do I fix this? Many thanks.

3d metal simulation

units metal
dimension 3
boundary p f s
atom_style atomic

read_data Au_xyz.data
pair_style eam/fs
pair_coeff * * Mendelev_Cu2_2012.eam.fs Cu Cu Cu Cu

region lower block INF INF INF 10 INF INF
region upper block INF INF 446 INF INF INF
group lower region lower
group upper region upper
group boundary union lower upper
group mobile subtract all boundary

equilibrate

min_style cg
minimize 0.0 1.0e-8 5000 100000

reset_timestep 0
timestep 0.001
velocity all create 300 12345 mom yes rot no

fix 1 all npt temp 300 300 0.1 x 0 0 1 drag 1
fix 2 boundary setforce NULL 0.0 0.0
velocity boundary set NULL 0.0 0.0 units box

thermo 1000
thermo_style custom step lx ly lz press pxx pyy pzz pe temp
run 50000
unfix 1
unfix 2

shear and compressive

reset_timestep 0
timestep 0.001

fix 1 all nvt temp 300 300 0.1 drag 1
fix 2 boundary setforce NULL 0.0 0.0

variable srate equal 2.0e8
variable srate1 equal “-v_srate / 1.0e12”
fix 3 all deform 1 y erate ${srate1} units box remap x
velocity boundary set NULL 0.0 0.0 units box

dump 1 all custom 20000 dump.shear.*.txt id type x y z
dump_modify 1 sort id
thermo 1000
thermo_style custom step temp v_p2 v_p3 v_p4 ke pe press
#shear
label loopa
variable a loop 50
run 0
displace_atoms upper ramp z 0 0.20 y 0 456 units box
velocity boundary set NULL 0.0 0.0 units box

run 1000
next a
jump shear3 loopa

error.png

Dear LAMMPS community,

I got an error when I run this code, it is a compression and shear test. When I use p s s as the boundary condition, I don’t receive any errors but the box in the compression direction was forced to separate with part of the atoms like in the attached figure. When I use p f s, I got error :lost atoms. And I am also wondering on what condition I can use ‘lost ignore’? How do I fix this?

this is difficult to answer because for the most part it is your choice.
when switching from shrinkwrap (s) to fixed (f) boundary, it is up to you and your system setup to avoid pushing atoms outside of the box. the shrinkwrap boundaries were implemented to simplify this process. so you have to answer the question (for yourself): is there a particular reason you cannot use shrinkwrap boundaries?

ignoring lost atoms is rarely a good option unless you actually mean to remove those atoms from the system. this usually only applies to simulations where atoms are reflected off a surface or are kicked out of an object. your simulation doesn’t look like one of those cases, so ignoring lost atoms would avoid a crash but would result in a possibly bogus simulation.

axel.