Question regarding fix addforce with region keyword

Hello,

I have a question regarding using fix addforce with region keyword. Does LAMMPS calculate the number of atoms in the region dynamically or is it only determined when the fix was defined.

Say if an atom leaves the region and new atoms enter the region during the simulation, does the fix stop adding force to the atoms not in the region any more and instead add forces to the new atoms that entered in the region during the simulation?

Thanks for your help!

Regards,

Hi,

Hello,

I have a question regarding using fix addforce with region keyword. Does LAMMPS calculate the number of atoms in the region dynamically or is it only determined when the fix was defined.

So far I have understood, it dynamically finds the atoms inside the defined region to add force.

Say if an atom leaves the region and new atoms enter the region during the simulation, does the fix stop adding force to the atoms not in the region any more and instead add forces to the new atoms that entered in the region during the simulation?

The force will be added to the newly entered atom in the region along with other atoms in the region. It will stop adding force to the atom which has left the region.