Project

General

Profile

Bug #2754

Simulated Tempering seems to be broken

Added by Fotis Baltoumas 11 months ago. Updated 9 months ago.

Status:
New
Priority:
Normal
Category:
preprocessing (pdb2gmx,grompp)
Target version:
-
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

Hello all,

When using an *.mdp file with enabled simulated tempering (and relevant subsequent options set), grompp crashes with a segmentation fault. No other information (e.g. errors, warnings) are reported. No output (either a tpr file or "mdout.mdp") is produced.

This was observed in all versions installed in our machines (4.6, 5.1.4, 2016.3 and 2018.1).

The added simulated tempering lines are the following:

simulated-tempering = yes
sim-temp-low = 310
sim-temp-high = 350
simulated-tempering-scaling = linear
temperature-lambdas = 0. 0.25 0.5 0.75 1

Associated revisions

Revision eeee7d58 (diff)
Added by Paul Bauer 8 months ago

Move simulated tempering default setting

Setting the default value for the simulated tempering when nstexpanded
was not specified in the mdp file was done before the values for the
temperature coupling are known. Moved this to a new location where the
value is known instead.

Added message to user in this case.

Refs #2754

Change-Id: I194829d5a817019da6d63a075e0dd7f4af8a4735

History

#1 Updated by Berk Hess 11 months ago

  • Assignee set to Michael Shirts

#2 Updated by Michael Shirts 11 months ago

Thanks - will take a look when back from a seminar trip Tues/Thurs, will let you know if I cannot reproduce with just these lines.

#3 Updated by Erik Lindahl 11 months ago

Michael: What was the result of your testing last week?

#4 Updated by Michael Shirts 11 months ago

OK, the basic problem seems to be that if nstexpanded is not set, then it defaults to setting the frequency to 2*ir->opts.tau_t[0]/ir->ir->delta_t. The problem is, this logic occurs in set_fep_params, which is in get_ir, but the opts->tau_t[0] is not set until get_index is run, which is AFTER get_ir is run.

It's not clear there is generally a smart way to access that value at that point in the code; you would have to repeat the string parsing. It could be that when this line was written earlier, when the code was organized differently, with ir->opts.tau_t set already, and nobody has run simulated tempering without setting the nstexpanded variables in a while.

It would be good to know what the other MDP parameters are being run with the file above, but it appears likely the expanded ensemble settings aren't being set. If they are set, then the simulations runs and doesn't crash (haven't checked correctness yet!)

Proposed solution would make it clearer in the documentation that simulated tempering is a version of expanded ensemble, and you need to set the expanded ensemble variables to use it. Right now it says "Simulated tempering is implemented as expanded ensemble sampling with different temperatures instead of different Hamiltonians." but that can be modified to "Simulated tempering is implemented as expanded ensemble sampling with different temperatures instead of different Hamiltonians. You must set the expanded ensemble options to use simulated tempering". And then add checks that fail with warnings if they are not set.

#5 Updated by Fotis Baltoumas 11 months ago

Ok, now I feel like an idiot.

As soon as I added nstexpanded, grompp worked as it was expected to (obviously my mdp had other errors, but this time I could actually see what they were and fix them).

My problem was that I approached this using the logic of adaptive tempering (a variation of the method) in NAMD, in which you would simply set the tempering options.

Perhaps it would be useful to amend the user guide or add an error message for grompp that notifies users to set expanded ensemble options.

In any case, sorry for wasting your time like that Michael.

#6 Updated by Mark Abraham 11 months ago

Fotis Baltoumas wrote:

Perhaps it would be useful to amend the user guide or add an error message for grompp that notifies users to set expanded ensemble options.

Current feature development work tries very hard to add such checks, but the expanded ensemble implementation dates from another era.

In any case, sorry for wasting your time like that Michael.

Not at all a waste of time! That's valuable feedback, thanks.

#7 Updated by Michael Shirts 11 months ago

Certainly not a waste of time. The program should be telling you this - I shouldn't have to!

Please, let me know if you notice any other issues with simulated tempering, especially if results seem incorrect in some way - I've mostly been playing with the Hamiltonian tempering version, and there could be issues that occur with the simulated tempering variant.

#8 Updated by Gerrit Code Review Bot 9 months ago

Gerrit received a related patchset '1' for Issue #2754.
Uploader: Paul Bauer ()
Change-Id: gromacs~release-2019~I194829d5a817019da6d63a075e0dd7f4af8a4735
Gerrit URL: https://gerrit.gromacs.org/9088

Also available in: Atom PDF