Project

General

Profile

Bug #1129

md-vv integrator + Nose-Hoover produce wrong temperature

Added by Andrey Frolov almost 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
High
Category:
mdrun
Target version:
Affected version - extra info:
4.6
Affected version:
Difficulty:
uncategorized
Close

Description

Probably there is a bug in the "md-vv" integrator and the "Nose-hoover" thermostat. The ref-t is set to 410 K, while the average temperature in the output is 532 K. Temperature jumps to the wrong value at the very beginning of the simulation and then fluctuates around it.

"
Statistics over 200001 steps [ 100.0000 through 500.0000 ps ], 1 data sets
All statistics are over 2201 points

Energy Average Err.Est. RMSD Tot-Drift
-------------------------------------------------------------------------------
Temperature 532.889 0.1 11.8189 0.12753 (K)
"

Discussion from gmx-users mail list:

- Nose-Hoover with 1 or 10 chain(s) + velocity Verlet ("md-vv") integrator
does NOT give desired average T ?

Unfortunately, md-vv has not been very well tested in a range of
integration contexts (e.g. in 4.5.5 and earlier it is broken with v-rescale
thermostat). If you have a .tpr that shows problems with 4.5.5 or 4.6, then
we want to have a look at it urgently. Please file an issue here
http://redmine.gromacs.org/ and attach a .tpr for us (preferably with a
sound electrostatics setup, but if you only get the problem with the
unsound setup, that may illustrate a real problem for us).

Mark

In the attached files i used "coulombtype = PME", rather than "Cut-off", which was used initially for the system described in gmx-users mail list.

Andrey
----
Andrey I. Frolov, PhD
Postdoctoral fellow
Institute of Solution Chemistry
Russian Academy of Sciences

run1.mdp (3.38 KB) run1.mdp Andrey Frolov, 01/23/2013 12:30 PM
rep0_dist7.tpr (63.4 KB) rep0_dist7.tpr Andrey Frolov, 01/23/2013 12:30 PM
rep0_dist7.edr (225 KB) rep0_dist7.edr Andrey Frolov, 01/23/2013 12:30 PM
rep0_dist7.gro (28.2 KB) rep0_dist7.gro Andrey Frolov, 01/23/2013 04:22 PM
system.top (1.32 KB) system.top Andrey Frolov, 01/23/2013 04:22 PM
ffbonded.itp (216 KB) ffbonded.itp Andrey Frolov, 01/23/2013 04:22 PM
ffnonbonded.itp (61.6 KB) ffnonbonded.itp Andrey Frolov, 01/23/2013 04:22 PM
CO2_AT_OPLSAA.itp (283 Bytes) CO2_AT_OPLSAA.itp Andrey Frolov, 01/23/2013 04:22 PM
CO2_OPLSAA.itp (344 Bytes) CO2_OPLSAA.itp Andrey Frolov, 01/23/2013 04:22 PM
paracetamol2_AT_OPLSAA.itp (1.12 KB) paracetamol2_AT_OPLSAA.itp Andrey Frolov, 01/23/2013 04:22 PM
paracetamol2_OPLSAA.itp (12.3 KB) paracetamol2_OPLSAA.itp Andrey Frolov, 01/23/2013 04:22 PM
paracetamol_AT_OPLSAA.itp (1.11 KB) paracetamol_AT_OPLSAA.itp Andrey Frolov, 01/23/2013 04:22 PM
paracetamol_OPLSAA.itp (12.3 KB) paracetamol_OPLSAA.itp Andrey Frolov, 01/23/2013 04:22 PM

Associated revisions

Revision f993c6b7 (diff)
Added by Michael Shirts almost 5 years ago

bugfix for md-vv + nose-hoover + (nstcalcenergy > nsttcouple)

Need global communication the step befre nsttcouple
in order to get the kinetic energy right, because
of the offsets velocity verlet from leapfrog.

Fixes redmine #1129

Change-Id: Ia6157db8304cc4fb8cccbda0ac3b949e800efeb5

Revision b77fa706 (diff)
Added by Michael Shirts over 4 years ago

Some changes for md-vv extracted from 4.6

a. Fixes for the pressure in MTTK with constraints + dispersion + rerun
  • Dispersion is correctly added in rerun
  • COM motion is removed only on the second half of the timestep.
  • Now can do md-vv + rerun with multiple threads.
  • Now gives exact kinetic energy reruns for everything except MTTK, where the iterative algorithm
    makes exact kinetic energy impossible when nstpcouple == 1.

b. md-vv works with v-rescale and berendsen

c. Fixes a bug when pressure control in md-vv when nstcalcenergy is not a
multiple of nstpcouple or nsttcouple. This bug results in boxes slowly
expanding to unphysical sizes because the virial is
neglected in the second half of the md-vv calculation.

Also discovered that as part of the bug, global energies were being communicated
where they did not need to be when nstpcouple and nsttcouple are > 1 in the case
of md-vv, so redid some of the iteration counting and global communication to fix
this all together. In the process, this simplified some of the iteration counting.

Should fix bugs #1116, #1012, #1000, #1129 in redmine.

Change-Id: I1b628d03ab588c29fef2b8789e61254da49c2b6f

Revision 50085d88 (diff)
Added by Michael Shirts over 4 years ago

bugfix for md-vv + nose-hoover + (nstcalcenergy > nsttcouple)

Need global communication the step befre nsttcouple
in order to get the kinetic energy right, because
of the offsets velocity verlet from leapfrog.

Fixes redmine #1129

Change-Id: Ia6157db8304cc4fb8cccbda0ac3b949e800efeb5

History

#1 Updated by Berk Hess almost 5 years ago

  • Description updated (diff)
  • Assignee changed from Berk Hess to Michael Shirts
  • Priority changed from Normal to 6

#2 Updated by Michael Shirts almost 5 years ago

Andrei-

Can you:

1) Also upload a .gro and .top files so that it can be debugged more easily -- sometimes there are system dependent details that cause weird wrrors

2) verify if this is a 4.6 or 4.5.6 problem?

#3 Updated by Michael Shirts almost 5 years ago

Looks like this is a parallelization issue. Temperature seems to be correct with one thread, but starts rising when run on multiple threads. I will keep investigating.

In the meantime, if you set nsttcouple = 1 and nstcalcenergy =1, this problem should go away - if it doesn't, repost here.
For a system your size, that should cause essentially zero slowdown.

Please also post the .gro and .top, just in case.

#4 Updated by Michael Shirts almost 5 years ago

Wait -- why is lincs on with md-vv? That should not be supported (it at least was never tested) Try shake instead of lincs. That might be causing the problem.

I can't test directly on your system because of no .gro and .top . . .

Michael Shirts wrote:

Looks like this is a parallelization issue. Temperature seems to be correct with one thread, but starts rising when run on multiple threads. I will keep investigating.

In the meantime, if you set nsttcouple = 1 and nstcalcenergy =1, this problem should go away - if it doesn't, repost here.
For a system your size, that should cause essentially zero slowdown.

Please also post the .gro and .top, just in case.

#5 Updated by Michael Shirts almost 5 years ago

OK, I looked at another system. The bug is with

md-vv
with Nose-Hoover
without pressure control (NH+ MTTK is OK)
with parallelization
when nstcalcenergy is not equal or less than nsttcouple

So the short term solution (until bug fix is in) is to change any of these - easiest are to reduce nstcalcenergy to be equal to nsttcouple, or run v-rescale instead of Nose-Hoover

#6 Updated by Andrey Frolov almost 5 years ago

Sorry, i was out of my office for a while.

Here, i upload the gro file and top file, as well as many itp files. In the top file i removed the pathes to the itp files, so grompp should work if to put the itp files in the same folder with the top file. The "ffbonded.itp" and "ffnonbonded.itp" are just OPLSAA files distributed with gromacs-4.6. Hope this helps.

#7 Updated by Andrey Frolov almost 5 years ago

Just in case if this is still of interest:

1) gromacs versions "4.5.6" and "4.6" both do not give correct T with this setup.
2) setting "nsttcouple = 1" and "nstcalcenergy = 1" results in correct T.

#8 Updated by Michael Shirts almost 5 years ago

1) gromacs versions "4.5.6" and "4.6" both do not give correct T with this setup.

Thanks for the information.

2) setting "nsttcouple = 1" and "nstcalcenergy = 1" results in correct T.

OK, this matches what I think the issue is. So you have a way to run correct simulations in the near term, and we'll get a bug fix in 4.6.1. Thanks for your help!

#9 Updated by Michael Shirts almost 5 years ago

  • Target version set to 4.6.1
  • % Done changed from 0 to 100

I believe it have it fixed. Patch going up into gerrit in the next few min.

#10 Updated by Mark Abraham over 4 years ago

  • Status changed from New to Accepted
  • Affected version set to 4.6

#11 Updated by Mark Abraham over 4 years ago

  • Status changed from Accepted to In Progress

#12 Updated by Mark Abraham over 4 years ago

  • Status changed from In Progress to Resolved

#13 Updated by Rossen Apostolov almost 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF