problem with averaged properties after NVT or Langevin

Hi,

I am using either Langevin thermostat (with fix NVE) or NVT to increase the temperature from an initial value (e.g. T=1 to T=5) within about 5ns,(timestep 0.005). The damping parameter for Langevin is 1.0 and for NVT is 0.5. After the first 5ns it seems the temperature is increased to the desired value, but when I start averaging the temperatures notice that with a short time (0.5 ns) the average temp in the system drop to T=1.0 and then again goes up very slowly in 10 ns. Should I “re-fix” the Langevin or NVT when I want to do averaging with T_initial=5, T_final=5, then start collecting the values?

.
.
.

fix NVE liquid nve
fix NVTnew2 solidlow nvt temp 1.0 5.0 0.5
fix NVTnew3 solidhigh nvt temp 1.0 1.0 0.5

restart 100000 restart.equil.nvt5-1solid
run 500000

variable FluidTemp atom c_myKE*2.0/3.0
fix averagetimeT all ave/spatial 10 1000 10000 z 0.0 0.01 v_FluidTemp units reduced ave running file avg_temp_liquid.profile
fix averagedensity all ave/spatial 10 1000 10000 z 0.0 0.01 density/number units reduced ave running file avg_density_liquid.profile

thermo_style custom step dt temp press vol
thermo_modify norm yes flush yes
thermo 1000

.
.
.
Thanks,
Padideh

I don't understand your question. The fix ave/time or ave/spatial
is just a diagnostic. It doesn't change the dyanmics. You
have the temperature behavior of the system from
the thermostatted run. You can process the temperature
vs time curve however you wish, either using fix ave/time
or some post-processing formula you choose.

Steve

Thanks for the replies, I didn’t expect that my temperatures drop after a thermostat increased it from T=1 to e.g. T=5, so I started to collect the Temp values in line 6,7, and 9 (see below). But the values were lower than it should be. So I had to “refix” them using NVT solidlow nvt temp 5.0 5.0 0.5, then the profiles are ok.

1-fix NVE liquid nve
2-fix NVTnew2 solidlow nvt temp 1.0 5.0 0.5
3-fix NVTnew3 solidhigh nvt temp 1.0 1.0 0.5

4-restart 100000 restart.equil.nvt5-1solid
5-run 500000

6-variable FluidTemp atom c_myKE*2.0/3.0
7-fix averagetimeT all ave/spatial 10 1000 10000 z 0.0 0.01 v_FluidTemp units reduced ave running file avg_temp_liquid.profile
8-fix averagedensity all ave/spatial 10 1000 10000 z 0.0 0.01 density/number units reduced ave running file avg_density_liquid.profile

9-thermo_style custom step dt temp press vol
10-thermo_modify norm yes flush yes
11-thermo 1000

Padideh

If you set fix nvt 1 5
and then do 2 runs,
the temp will be ramped from 1 to 5 in each run.

If you want the temp to stay at 5 in the 2nd run,
then you need to reset fix nvt 5 5
before the 2nd run. Make sure you use the same
fix-ID or you will have 2 thermostats which is bad.

LAMMPS is pretty good about doing what you
tell it to do. Not as good at doing what you want
it to do.

Steve