Dear Lammps Users,
I have two different atoms (red and blue) with a defined potential between them. Trying to delete one of types (red in this case) when they get within a certain distance of approaching. I use the “delete atoms” command with overlap but unfortunately, the command does nothing. Copy of script below. Can someone please clue me in on what can be wrong with the script? Greatly appreciate it. Thanks.
------------------------ INITIALIZATION ----------------------
clear
units lj
dimension 3
boundary f f f
comm_modify vel yes
----------------------- PARTICLE DEFINITION ----------------------
atom_style sphere
region whole block 0.0 100.0 0.0 50.0 0.0 50.0
create_box 2 whole
create_atoms 1 single 40 25 25
create_atoms 1 single 40 10 10
create_atoms 2 single 50 25 25
create_atoms 2 single 50 10 10
set atom 1 diameter 1
set atom 1 mass 1
set atom 2 diameter 1
set atom 2 mass 1
group red type 1
group blue type 2
#velocity all set 10 0 0
velocity red set 10 0 0
velocity blue set -10 0 0
----------------------- DEFINE SETTINGS -----------------------
pair_style dpd 0.0 6.0 1234
pair_coeff 1 2 -50 10
pair_coeff 1 1 40 0
pair_coeff 2 2 40 0
dump 1 all custom 100 dump.comp.* id type x y z
----------------- DEFINE THERMO ---------------------------------
thermo 10
thermo_style custom step temp pe ke
----------------- SETUP RUN ---------------------------------
reset_timestep 0
timestep 0.0005
#delete_atoms group red
delete_atoms overlap 3.0 red blue
fix wall all wall/reflect xlo EDGE xhi EDGE ylo EDGE yhi EDGE zlo EDGE zhi EDGE
fix 1 all nve/sphere
variable natoms equal “count(all)”
variable natoms_red equal “count(red)”
variable natoms_blue equal “count(blue)”
----------------- PERFORM RUN ---------------------------------
run 5000
#reset_ids
#neigh_modify every 1 check yes
print “Number of atoms = {natoms}"
print "Number of red atoms = {natoms_red}”
print “Number of blue atoms = ${natoms_blue}”
print “All done”