Remove or delet particles outside one region

Submitted by yyu on Mon, 07/01/2013 - 12:44

Hi everyone,

In the simulation, I want to delet the particles which run out of the region. How can I do that? which command Should I use and where I should put the command after creating the particles in the in. file or the end of the file?
thanks in adance.


gukargl | Mon, 07/01/2013 - 15:28

#---- define region of interest to delete particles outside
region del_region cylinder z 0.0 0.0 ${del_region_rad} ${del_region_z_off} ${del_region_height} units box side out
#---- remove atoms in region outside
delete_atoms region del_region

That should work also for any other region i.e. non cylindrical as well.