[lammps-users] about NPT

Hi joanne and others,

I have something new. Someone advised me to use these commands: “velocity all set 0 0 0; fix 1 all npt 300 300 0.1 xyz 0 0 0.1 drag 1.0”. The results were really perfect, the temperature increased from 1e-23 to 300 K and keeped this value without fluctuation, and the pressure decreased to zero rapidly, the magnitude of the final pressure value was 1e-6. But with the same fix, I used this “velocity all create 300 5812775 temp new3d”, the temperature fluctuated around 300K, and the magnitude of final pressure value was 1e+2.

So I want to know, with the same fix, why is there so much difference between these two cases with different velocity commands?
Another question is whether these two cases are both ok?

Best regards,
Damien
2008-11-26

Hi Damien,

You are right to be concerned when two different initial conditions don’t give you the same average results when the systems are equilibrated.

Have you visualized both systems? Personally, I’m a little suspicious of a system with no temperature fluctuations. Have you heard the term “frozen snowball”? It’s entirely possible to have a kinetic energy that corresponds to the temperature you want by setting one velocity component for every atom to exactly the proper value. Thus, the number you get out is the number you expect, but, instead of random collisions of atoms, the whole system is translating through space at constant velocity. It seems to me that this is a much more likely scenario with all atoms starting with zero velocity than it is for atoms that start with a random distribution of velocities that correspond to the temperature you want.

It’s possible that something else is going on, but the first thing I would check is whether the “perfect results” system actually has a velocity distribution to give the 300 K or whether it has done something unexpected.

Joanne

Hello Lammps Users/Developers,

I remember there was an option in fix langevin thermostat where you can
set which axes/axis are/is to be thermostatted. I believe it was the axes
option. I also remember that there was a discussion thread on how to apply
this in the New Lammps releases. Can anyone tell me how to do this now?
What is the replacement for the axes option?

Thanks in advance :slight_smile:

Jan-Michael

an example may be helpful.

fix 1 all langevin 1.0 1.1 100.0 48279 axes 0 1 1

You do this now by using a compute temp/partial and assigning it to fix langevin via the fix_modify command.

compute MyTem all temp/partial 0 1 1
fix 1 all langevin 1.0 1.1 100.0 48279
fix_modify 1 temp MyTem

2008/11/27 Jan-Michael Carrillo <[email protected]…19…>

The person who answered your Q was correct about using compute temp/partial
and assigning it to the fix langevin. See section 4-16 of the manual
for an overview.

Steve