[lammps-users] about ''compute temp/partial" and "fix npt"

Dear all,

In my simulation, I am trying to use ‘compute temp/partial’ command under ‘npt’ to avoid the enforced

rigid velocity in z-direction.
the command i use for this purpose is like this:

compute new all temp/partial 1 1 0
fix 1 all npt 0.1 0.1 0.01 aniso 0.0 0.0 0.0 0.0 NULL NULL 10 drag 200
fix_modify 1 temp new

Then I found the temperature is keep increasing, rather than stay at my desired value and after a while,

‘lost atoms’ happens.

Is there something wrong with my setting temperature like this?
Thanks a lot for any suggestion!

Best
Ian

That's the right way to set it up - there could be lots
of reasons why you can't control the temp if you
are forcing the system in z. Try different time constants
on the temp of fix npt, try turning off the forcing, try forcing
at a smaller rate, etc.

You should also print out the temp that corresponds to that
compute, not the system temp which will include vz.

Steve

Yeah, I tried to print out the computed temp, which looked fine.
Thanks, Steve, I will follow your suggestion!

Best
Ian