Velocity scale bug?

I have tried on two different systems (ILs and pure water), but get a very similar error when attempting to scale the velocities after an NVT run before starting an NVE run.
The last temperature, and temp in the restart file, is:

2211600 308.6184
for a box of 512 SPC/E water molecules.

When adding the line "velocity all scale 300.0" after reading in that restart, my initial temperature is:
2211600 450.1466
When the velocity scale line is removed, this issue goes away.

Dumping a lot of energy into the simulation right before I begin running it in NVE is not a good thing. I have included both the NVT.in and NVE.in files, as well as the restart file so this can be tested.

My 'current' version is LAMMPS (18 Feb 2011).

NVT-equil.in (1.7 KB)

NVE-pro.in (1.1 KB)

B-nvt.restart (237 KB)

hi zack,

I have tried on two different systems (ILs and pure water), but get a very similar error when attempting to scale the velocities after an NVT run before starting an NVE run.
The last temperature, and temp in the restart file, is:

2211600 308.6184
for a box of 512 SPC/E water molecules.

When adding the line "velocity all scale 300.0" after reading in that restart, my initial temperature is:
2211600 450.1466
When the velocity scale line is removed, this issue goes away.

as it should. this is a "i didn't read the documentation twenty times"
kind of error. how the computed temperature maps to the kinetic energy
depends on the degrees of freedom. this number, however, changes
when you use fix shake. thus you must use the velocity keyword only
_after_ you define fix shake.check out the documentation of the velocity
keyword again, and you'll find it this time. :wink:

Dumping a lot of energy into the simulation right before I begin running it in NVE is not a good thing. I have included both the NVT.in and NVE.in files, as well as the restart file so this can be tested.

certainly. thanks for the complete inputs. that is always helpful to track
down problems. please note that restarts are not portable and thus mostly
useless for this purpose.

cheers,
     axel.