[lammps-users] dynamic groups

Hi there,

I actually try to thermostat a part of a liquid in a simulation, which is at a certain distance from a particle.
As I understand one could do this with a fix command, but how do I specify a group of molecules, which
is at a certain distance from this particle and which changes dynamically during the simulation?

Thank you for any help!


See the compute temp/region command, which can be
hooked to various thermostats. See section 4.16 of the
manual for an overview.



I checked the documentation for the compute temp/region as well as the fix temp/rescale and I have included the following:

region 2 sphere x[32] y[32] 0.0 15 side out units box # this shall define a region around atom 32 which belongs to a solid particle, that app. does not work, it does not take the atom coordinates
group cold region 2 # this defines a group for the region 2
compute 1 liquid temp/region 2 # this calculates the temperature for this region
fix 4 cold temp/rescale 1 0.75 0.75 0.1 1.0 # this should rescale the temperature for this group

The group or even the region command are however not updated at every timestep and therefore, the particle is not "carrying" the sphere of cold atoms with its position.

Is there any way to do this.


If you want to compute the temp for atoms within
a sphere at every step centered on a moving particle,
you'll need to write a compute temp/sphere.atom that does this.

Regions in LAMMPS do not drift thru space, attached to


I should have added that if you write such a new compute temp/sphere/atom
and write it in the way other compute temp are written, such as compute
temp/region then you will be able to hook it to a thermostat and do
what you want.