groups with dynamic number of atoms

I have a simulation of water molecules inside a reservoir that can penetrate into a tube which is connected to the reservoir from one side, with atom-style full and nvt thermostatting.

In the following, I need to divide my system into two parts: waters in the reservoir and the waters in the tube, and assign or calculate the temperature of them separately. Because of changing the number of molecules in these two parts with time, I can’t use the region style of the group command, though, this is a static one-time assignment. For considering added or removed atoms in each region, I should use variable style of the group command which is needed to atom-style variable. The compute temp region command cannot be used with Nose/Hoover style fixes (fix nvt).

Have you any suggestion for this problem?

I have a simulation of water molecules inside a reservoir that can
penetrate into a tube which is connected to the reservoir from one side,
with *atom-style full* and *nvt* thermostatting.

In the following, I need to divide my system into two parts: waters in
the reservoir and the waters in the tube, and assign or calculate the
temperature of them separately. Because of changing the number of molecules
in these two parts with time, I can’t use the region style of the group
command, though, this is a static one-time assignment. For considering
added or removed atoms in each region, I should use variable style of the
group command which is needed to atom-style variable
<LAMMPS Molecular Dynamics Simulator. The compute temp region
command cannot be used with Nose/Hoover style fixes (fix nvt
<LAMMPS Molecular Dynamics Simulator).

Have you any suggestion for this problem?

​you can affect which atoms are thermostatted by applying a temperature
bias. how this works is explained in the documentation.

only the reservoirs should be thermostatted; for atoms outside there is no
physical justification. a thermostat couples a (bulk) system to a larger
reservoir; atoms that - for example - pass through a "nano channel" or
"nano pore" are not really representing any kind of "bulk region" and thus
only coupling to the atoms that are physically present. for the same
reason, you should not thermostat the tube, but at best its embedding
material, if that does actually exist.

​axel.​