[lammps-users] force in region in LAMMPS


noforce | force | noforce |


I want to assign a force to atoms in fixed region. Force is assigned to atoms which enter into this region with time advancing. If an atom goes out of this region, the force on the atom will disappear, that is to say, atoms with the given force are changeable.

I use fix addforce, group and region command, but It seems impossible because manual says" The region style puts all atoms in the region volume into the group. Note that this is a static one‚ąítime assignment. The atoms remain assigned (or not assigned) to the group even in they later move out of the region volume"

How can I do if I impose force on atoms within the fixed region. Thanks in advance.

A few fixes have "region" options that apply the fix
dynamically to atoms in a region. See fix langevin
or fix temp/rescale. Fix addforce does not, so you'd
have to add it to the code.