Project

General

Profile

Feature #2622

Reduce severity of Berendsen warning

Added by Justin Lemkul about 1 year ago. Updated 12 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
preprocessing (pdb2gmx,grompp)
Target version:
Difficulty:
simple
Close

Description

I have noticed in the latest version that any use of Berendsen coupling algorithms prompts a warning, causing grompp to fail. Users have to invoke -maxwarn 1 to overcome the problem. I think this behavior is undesirable for several reasons:

1. There are legitimate uses of the Berendsen algorithms, e.g. in equilibration
2. The warning message is quite verbose, so users should clearly understand that the thermostat/barostat algorithms should not be used for real data collection
3. Forcing the use of -maxwarn 1 for legitimate work (see point 1) trains users to engage in bad behavior - warnings should be taken seriously, and users should not get in the habit of just overriding them (which they may be encouraged to do when there is a legitimate case like this)

History

#1 Updated by Berk Hess about 1 year ago

I disagree on 1), since a Bussi thermostat has all the advantages of the Berendsen thermostat, but not the disadvantages.

#2 Updated by Justin Lemkul about 1 year ago

Berk Hess wrote:

I disagree on 1), since a Bussi thermostat has all the advantages of the Berendsen thermostat, but not the disadvantages.

While that is true, it raises the question: why do we even bother offering Berendsen? We tell users it's wrong, but we allow them to override it, which I still maintain will teach bad habits. Should we just remove the option? Or at minimum, make the grompp check smarter such that it is disabled if, e.g. "continuation = no" or "gen_vel = yes" (implying a startup/equilibration run)? Of course, the argument can be made that for the purposes of reproducing published work, the option should stay, in which case we need to acknowledge that there are times people want to use the Berendsen method.

#3 Updated by Berk Hess about 1 year ago

I left it in only for testing/reproduction purposes. But since many users might still choose it without knowing about its issues, a warning is warranted.

#4 Updated by Mark Abraham about 1 year ago

Justin Lemkul wrote:

I have noticed in the latest version that any use of Berendsen coupling algorithms prompts a warning, causing grompp to fail. Users have to invoke -maxwarn 1 to overcome the problem. I think this behavior is undesirable for several reasons:

1. There are legitimate uses of the Berendsen algorithms, e.g. in equilibration

There is a more legitimate case for the Berendsen pressure coupling during equilibration. There is not really a good way to tell the user's intention at the moment (gen-vel ought to be equilibration, but position restraints and continuation may or may not be). We could introduce an mdp option to record that intent, precisely because it facilitates implementing checks and warnings. There'd be nothing to stop someone using the equilibration mode (which would issue fewer warnings) in production, but the record of that would remain in the log file, along with any message we'd leave there about wrong distributions.

2. The warning message is quite verbose, so users should clearly understand that the thermostat/barostat algorithms should not be used for real data collection

I'm not sure whether you're suggesting it's too long or not long enough.

3. Forcing the use of -maxwarn 1 for legitimate work (see point 1) trains users to engage in bad behavior - warnings should be taken seriously, and users should not get in the habit of just overriding them (which they may be encouraged to do when there is a legitimate case like this)

The .mdp possibility overcomes this. The equilibration option can downgrade some such warnings to notes, which means that nobody is ever required to adopt a maxwarn workflow. IMO the simulation that prompted the discussion on gmx-users (with pressure coupling and position restraints) is intrinsically unphysical anyway, so I don't object to force them to use maxwarn.

We could also record the use of maxwarn and the number of suppressed warnings in the .tpr, to report it in the mdrun log file.

#5 Updated by Justin Lemkul 12 months ago

Mark Abraham wrote:

Justin Lemkul wrote:

I have noticed in the latest version that any use of Berendsen coupling algorithms prompts a warning, causing grompp to fail. Users have to invoke -maxwarn 1 to overcome the problem. I think this behavior is undesirable for several reasons:

1. There are legitimate uses of the Berendsen algorithms, e.g. in equilibration

There is a more legitimate case for the Berendsen pressure coupling during equilibration. There is not really a good way to tell the user's intention at the moment (gen-vel ought to be equilibration, but position restraints and continuation may or may not be). We could introduce an mdp option to record that intent, precisely because it facilitates implementing checks and warnings. There'd be nothing to stop someone using the equilibration mode (which would issue fewer warnings) in production, but the record of that would remain in the log file, along with any message we'd leave there about wrong distributions.

I like this idea.

2. The warning message is quite verbose, so users should clearly understand that the thermostat/barostat algorithms should not be used for real data collection

I'm not sure whether you're suggesting it's too long or not long enough.

I'm suggesting that given the verbosity of the screen output ("hey you probably shouldn't do this!") I think it is weird to make this setting trigger a warning that causes grompp to stop. We're giving the user a very plain caution that they might want to re-think what they're doing, but then we stop them from doing it. It seems heavy-handed to me, especially as you note above with regards to the barostat. It is VERY common to use the Berendsen barostat for initial NPT equilibration, particularly because we also warn users about equilibration + Parrinello-Rahman. It's a catch-22. We tell the users not to use Berendsen, but then we tell them that their choice to move over to Parrinello-Rahman is also potentially wrong.

#6 Updated by Mark Abraham 12 months ago

Justin Lemkul wrote:

I'm suggesting that given the verbosity of the screen output ("hey you probably shouldn't do this!") I think it is weird to make this setting trigger a warning that causes grompp to stop. We're giving the user a very plain caution that they might want to re-think what they're doing, but then we stop them from doing it. It seems heavy-handed to me, especially as you note above with regards to the barostat. It is VERY common to use the Berendsen barostat for initial NPT equilibration, particularly because we also warn users about equilibration + Parrinello-Rahman. It's a catch-22. We tell the users not to use Berendsen, but then we tell them that their choice to move over to Parrinello-Rahman is also potentially wrong.

Given the level of output that most users rightly ignore, if we want to be helpful about known violations of physics, we don't really have the option of dainty note-level output. :-(

Also available in: Atom PDF