Project

General

Profile

Bug #1234

Free energy crash with sc-r-power 48

Added by Magnus Lundborg about 7 years ago. Updated over 6 years ago.

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

Description

My simulations crash when using sc-r-power 48 and couple_lambda0 = vdw-q, couple_lambda1 = vdw, even if I'm running with sc-coul = no.

If I'm running couple_lambda0 = vdw and couple_lambda1 = none it works.

The fe config that is causing a crash is:
init_lambda-state = 0
couple-intramol = no
couple_lambda0 = vdw-q
couple_lambda1 = vdw
sc-r-power = 48
sc-coul = no
vdw-lambdas = 0.0 0.0 0.0 0.0 0.2 0.4 0.6 0.8 1.0
coul-lambdas = 0.0 0.2 0.5 1.0 1.0 1.0 1.0 1.0 1.0
separate_dhdl_file = yes
sc_sigma = 0.3
sc_power = 1.0
couple_moltype = 2-ethoxyethanol
free_energy = yes
sc_alpha = 0.001

If I change it to:
couple_lambda0 = vdw
couple_lambda1 = none

it works without problem and also if I change it to:
couple_lambda0 = vdw-q
couple_lambda1 = vdw
sc-r-power = 6

Shouldn't sc-r-power be ignored when using sc-coul = no, couple_lambda0 = vdw-q and couple_lambda1 = vdw? Or have I misunderstood something?

setup.tgz (36.4 KB) setup.tgz System causing a crash Magnus Lundborg, 04/29/2013 03:52 PM

History

#1 Updated by Magnus Lundborg about 7 years ago

  • Affected version changed from 4.6.2 to 4.6.1

#2 Updated by Michael Shirts about 7 years ago

  • Assignee changed from Berk Hess to Michael Shirts

I'll look into this. Could you upload the files that are giving you errors to make it easier to reproduce the error?

Looking over the code quickly, it could be that setting sc_alpha > 0 is turning sc_coul on without issuing a warning that it is doing this. You can run gmxdump on the .tpr and check. If that is the case, then setting sc_alpha =0 (or omitting it entirely) should solve the problem.

Note that:

1) if it really is doing soft core on the coul and not the vdw, that might be numerically unstable; that use case was not envisioned.
2) sc-r-power=48 is perhaps only 30% more efficient than sc-r-power=6 (standard). If there's some issue, you are likely better off just using 6 (I say this as the PI whose group came up with the sc-r-power=48 pathway).
3) Under some situations (not entirely classified), single precision + sc-r-power=48 appears to be unstable for numerical precision reasons.

We're working on a better way to have very efficient, stable free energy paths in 5.0.

#3 Updated by Magnus Lundborg about 7 years ago

I'm attaching an archive containing a system causing the crash (n.b. you should extract it in an empty directory - it does not contain a subdirectory). I hope I didn't miss any required files.

In the example I'm going from vdwq to vdw, but that is just to illustrate the problem, i.e. that it seems to be using sc on coulomb even if sc-coul = no. I would of course like to be able to go from vdwq to none as well without it crashing and still having sc_alpha != 0 (but only applying sc_alpha to vdw, as I would have expected).

If you set sc-r-power = 6 it does not crash.

Please tell me if you need more info.

#4 Updated by Magnus Lundborg about 7 years ago

Another example of a setup causing this crash is the ethanol example on http://www.alchemistry.org/wiki/GROMACS_4.6_example:_Direct_ethanol_solvation_free_energy , which indicates that some bug/regression has been introduced since 4.6. The example crashes with the provided parameters, but works if changing to:

sc-alpha = 0.5
sc-r-power = 6
;--------
;sc-alpha = 0.001
sc-power = 1
;sc-r-power = 48

#5 Updated by Michael Shirts over 6 years ago

  • Status changed from New to Resolved

Basically, for some molecules, the 48 path fails in single precision.

Generally, the efficiency gain is nice, but not worth having to run in double precision!

We have a new formalism for free energy calcs (planned for 5.1) that will be approximately as efficient and will avoid these issues.

For now, the solution is to not us sc-r-power=48 in single precision.  The tutorials have been changed so that 48 is not the default.

Magnus Lundborg wrote:

Another example of a setup causing this crash is the ethanol example on http://www.alchemistry.org/wiki/GROMACS_4.6_example:_Direct_ethanol_solvation_free_energy , which indicates that some bug/regression has been introduced since 4.6. The example crashes with the provided parameters, but works if changing to:

sc-alpha = 0.5
sc-r-power = 6
;--------
;sc-alpha = 0.001
sc-power = 1
;sc-r-power = 48

#6 Updated by Rossen Apostolov over 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF