# How does thermostat work when there is an aggregate motion in one dirction?

Hi lammps-users
My system is modeled by l-j potential and there are no bonds and angles among atoms.First, I equilibrated my system at desire temperature with “fix nvt” command, then I added a constant velocity to thermal velocity in x direction to make it move by “velocity” command with the “sum yes” option. Also, I combined “velocity” command with “fix setforce” to erase component force in x direction, thus it can move in x direction with the added velocity, while other directions can work as regular MD.I still have to maintain the temperature with Nose-Hoover thermostat invoked by fix nvt command, but I am not sure about my understanding about how it works in this case.

My understanding is that all the velocities (thermo velocity in three directions plus added constant velocity in x direction) will be adjusted. I know I can combine “compute tem/partial” and fix_modify command to exclude velocity in x direction when thermostat works, but it seems those two commands would exclude both added velocity and thermo velocity in x direction because they can not be distinguished in my system, which means only thermo velocity at y and z direction will be adjusted when thermostat is applied.Is that right?

Is there a way to adjust three components of thermo velocity with Nose-Hoover thermostat when there is an aggregate motion in one direction in lammps?

Fan Li

Hi lammps-users
My system is modeled by l-j potential and there are no bonds and angles
among atoms.First, I equilibrated my system at desire temperature with "fix
nvt" command, then I added a constant velocity to thermal velocity in x
direction to make it move by "velocity" command with the "sum yes" option.
Also, I combined "velocity" command with "fix setforce" to erase component
force in x direction, thus it can move in x direction with the added
velocity, while other directions can work as regular MD.I still have to
maintain the temperature with Nose-Hoover thermostat invoked by fix nvt
command, but I am not sure about my understanding about how it works in this
case.

My understanding is that all the velocities (thermo velocity in three

no, that is not correct. with forces set to zero in x, there is

I know I can combine "compute tem/partial" and fix_modify command to exclude
velocity in x direction when thermostat works, but it seems those two
commands would exclude both added velocity and thermo velocity in x
direction because they can not be distinguished in my system, which means
only thermo velocity at y and z direction will be adjusted when thermostat
is applied.Is that right?

the first thing that you have to consider is: what "temperature" is it
that you want to control? ...and also do you want the contribution of
your enforced motion to be considered in the temperature or not?

without biasing, the constant motion will be included in the total
temperature (it is a global scalar!) and since thermostatting in x
direction will have no impact, the kinetic energy in y and z will be
adjusted to match the target temperature. in short, the faster the
motion in x, the colder y and z will become due to the thermostat.

with biasing to exclude contributions from the x-direction, the
system's kinetic energy in y and z will be independent of the motion
in x. the total temperature, as computed by default will now depend on
the motion in x.

Is there a way to adjust three components of thermo velocity with
Nose-Hoover thermostat when there is an aggregate motion in one direction in
lammps?

yes, there is, but it is not possible with your setup. you would have
to use fix addforce to impose a flow, but again, you will have to use
biasing (via compute temp/com), if you don't want the imposed velocity
to be included into the reference temperature. you also have to have a
way to dissipate the added energy from the addforce command (as with
periodic boundaries, the system will be accelerated again and again).

i strongly suggest you study simulation setups that other people have
described in publications and also study how nose-hoover thermostats
work.
starting complex simulations without understanding the fundamentals is
likely to have bad consequences: you may choose the wrong strategy or
misinterpret the results and thus waste your time.

please also keep in mind, that answers from a mailing list are no
replacement for a thorough study of the best practices of the field.

axel.

See Section 6.16 of the manual for options LAMMPS

gives you to “bias” a thermostat by removing aggregate

motion of the atoms.

Steve