[lammps-users] I can not fix the temperature in LAMMPS with version of Jun 2010.

Hi, everyone,
I do some simulations about interactions between different kinds of polymers.
When i use fix command as follows,
fix 4 all nvt 298.2 298.2 100.0
I found the results in log file as

1003522 298.20989 -5226.0021 -5253.4845 -4673.1497 0.076456055 85184000 -4578.1668 0.072944095 0.080778757 0.075645312 0.044806988 0.047827185 0.045700919
1010000 464.96759 -5168.3831 -5190.8118 -4530.5191 0.087789909 85184000 -4421.4558 -0.047301646 0.016891513 0.29377986 -0.12206356 0.012323224 -0.019902698
1020000 470.54472 -5164.0107 -5178.2365 -4519.4601 -0.0099084743 85184000 -4531.7696 0.010424335 0.0034285163 -0.043578275 -0.040982466 0.16543178 0.090861284
1030000 454.31103 -5187.2622 -5225.6192 -4534.9633 0.17613234 85184000 -4316.1504 0.2129151 0.058974776 0.25650715 0.071522576 0.12810146 -0.050832659
1040000 441.66465 -5158.9958 -5164.8608 -4537.5016 -0.019330258 85184000 -4561.516 0.014377876 -0.094096291 0.021727642 -0.2629712 -0.10653068 0.13179824
1050000 472.55426 -5182.1148 -5196.9385 -4543.7691 -0.16048972 85184000 -4743.1488 -0.26763556 -0.1852118 -0.028621804 0.12726516 -0.050036383 0.072874168
1060000 454.20916 -5213.6068 -5276.3816 -4551.1608 -0.023333769 85184000 -4580.1489 0.24972986 -0.34172141 0.021990237 -0.11498523 -0.181331 -0.17518127
1070000 464.23236 -5212.825 -5238.8972 -4555.2323 -0.31149402 85184000 -4942.2079 -0.48772929 -0.22564763 -0.22110514 -0.15159407 0.13321489 -0.058160299

It seems that the temperature is not around 298.2 K. Attached is my in.chain file, is there any wrong?
What can i do with this in.chain file? Thanks.

BTW, when i use the version of Jan2009, the temperature is around 298.2.

Thanks & Best wishes

Houyang

in.chain3 (980 Bytes)

Hi, everyone,
I do some simulations about interactions between different kinds of
polymers.
When i use fix command as follows,
     fix 4 all nvt 298.2 298.2 100.0
I found the results in log file as

like many other programs, LAMMPS adheres to the GIGO
principle (GIGO=garbage in, garbage out). there are
several parts of your input that don't make much sense.

you use fix temp/berendsen _and_ fix nvt at the same time.
why? please read the documentation.

you use a 220 angstrom cutoff for coulomb _and_ pppm.
why? ...and then you have a LJ cutoff of 7 angstrom.
that looks like a very odd model to me.

there is too little information to say anything
beyond that.

axel.

Hello, axel,
thanks so much for your reply.
I try to do a coarse grain simulation by using units of real.

i use fix temp/berendse (run about 1000000) to avoid the possibility of local minimization.
Later, i use fix nvt to get the results (run about 10000000).

I set a polymer with 20 segments, and each segments with sigma as 6.6A.
Then, the cutoff is about 1.12*cutoff.

The length of box is about 206.62, and the cutoff for coulomb is about
half of length of box.

Thanks.

Houyang

Fix temp/berend does not do time integration. So your first
run will not move the atoms. You need a fix nve. The
doc page for temp/berend explains this.

Then for you 2nd run with fix nvt, you must turn off (via unfix)
both the fix nve and the fix temp/berend. Else you will
be thermostatting twice, which could give the unusual
behavior you see with uncontrolled temp.

There is no way this worked in an earlier version of LAMMPS either.

Steve

Hello, axel,
thanks so much for your reply.
I try to do a coarse grain simulation by using units of real.

i use fix temp/berendse (run about 1000000) to avoid the possibility
of local minimization.

what do you mean by that???

there is no fix nve to go with it, so the first "run" will
have no propagation of coordinates at all.

Later, i use fix nvt to get the results (run about 10000000).

yes, but you don't _unfix_ the berendsen fix. RTFM!

I set a polymer with 20 segments, and each segments with sigma as
6.6A.
Then, the cutoff is about 1.12*cutoff.

ok, i get it. you want that to be repulsive only.

The length of box is about 20*6.6*2, and the cutoff for coulomb is
about half of length of box.

yes. but with long-range electrostatics, you don't have to do that.
it will be far more efficient to stick with a cutoff of around 12-15
angstrom and let PPPM take care of the longer part. if you use a large
cutoff, your scaling is O(N^2) and your memory usage goes way up.
or you should scrap the coul/long and use coul/cut instead. in fact,
you would be better off with lj/cut/coul/cut in the first place.

cheers,
   axel.

Hello, steve,
Thanks so much for you reply.
I also test fix nve (and turn off fix nvt), however, the temperature was from 500 to 298.2.
And not around 298.2.

If i like to run the job with two stages, the first one, temperature from 500 to 298 for about 1000000 steps,
and then, for the second stage, to keep the temperature around 298.2 K for about 2000000step.

How can i write the input file?

If i write as follows,

Hi,

It should be

fix 3 all temp/berendsen 500.0 298.2 100.0
fix 4 all nve
run 1000000

unfix 3
unfix 4

fix 5 all lanvegin 298.2 298.2 100.0
fix 6 all nve
run 2000000

Thanks,
Navdeep