[lammps-users] Question about NVT and thermo output

I did an NVT simulation of 10000 timesteps (default
timestep of 1 fs) with these settings:

fix 1 all nvt 300.0 300.0 100

I naively set thermo_style to output "step temp press
etotal" and got this output:

Step Temp Press TotEng
     152 0 46402.944 -207716.19
     153 5.3252455e-06 46402.944 -207716.19
     154 2.1261871e-05 46402.944 -207716.19
     155 4.769303e-05 46402.943 -207716.19
     156 8.4425601e-05 46402.943 -207716.19
     157 0.00013119259 46402.943 -207716.19
     158 0.00018765647 46402.943 -207716.19
     159 0.00025341333 46402.943 -207716.19
     160 0.00032799795 46402.943 -207716.19
     161 0.00041088947 46402.943 -207716.19
     162 0.00050151783 46402.943 -207716.19
     163 0.00059927078 46402.943 -207716.19

...

The temperature appears absurdly low, but that seems
to have something to do with this in the docs for "fix
nvt":

"This fix computes a temperature each timestep. To do
this, the fix creates its own compute of style "temp",
as if this command had been issued:

compute fix-ID_temp group-ID temp

"See the compute temp command for details. Note that
the ID of the new compute is the fix-ID with
underscore + 'temp' appended and the group for the new
compute is the same as the fix group.

"Note that this is NOT the compute used by
thermodynamic output (see the thermo_style command)
with ID = thermo_temp. This means you can change the
attributes of this fix's temperature (e.g. its
degrees-of-freedom) via the compute_modify command or
print this temperature during thermodyanmic output via
the thermo_style custom command using the appropriate
compute-ID. It also means that changing attributes of
thermo_temp will have no effect on this fix.
Alternatively, you can directly assign a new compute
(for calculating temeperature) that you have defined
to this fix via the fix_modify command."

I'm not sure *quite* what's going on, though, and I'm
especially not sure if I've done anything wrong
besides using "temp" instead of "1_temp" (?).

James,

I think you forgot to initialize the velocities. Use something like

velocity all create 300.0 873586443 dist gaussian

which means you create velocities on all atoms, using T = 300, with a random seed of 873586443 and a gaussian distribution.

Pieter

--- "Pieter J. in 't Veld" <[email protected]...> wrote:

James,

I think you forgot to initialize the velocities.

I know I need to do that with NVE since there would be
no way to even introduce a temperature otherwise, but
I thought that would be redundant with NVT.

James,

You will need to initialize your velocities when they’re not part of your data file, no matter the choice of integrator. The data file can hold velocities, which are used for atom initialization. A restart file will always hold the velocities.

Pieter