Project

General

Profile

Bug #1569

Unreasonable energy with "coulombtype=Switch"

Added by Igor Leontyev about 6 years ago. Updated about 6 years ago.

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

Description

Testing with gmx-5.0 different schemes of Long-Range electrostatics for
NMA liquid I noticed unreasonable behavior with "coulombtype=Switch".
Electrostatic energies calculated for the same configuration (i.e. at 0
MD step) with PME and Cut-off coulombtype reasonably agree between each
other. But once I use coulombtype=Switch, the electrostatic energy jumps
by the order of magnitude. All input and output files are attached. See the results for 0-step in corresponding log-files.

<coulombtype=PME, rcoulomb=1.3>
Coulomb-14 LJ (SR) Disper. corr. Coulomb(SR)+Recipr. Potential
-1.29147e+04 -3.28852e+03 -1.28735e+02 -3.54258e+03 -7.86555e+03

<coulombtype=Cut-off, rcoulomb=1.3>
Coulomb-14 LJ (SR) Disper. corr. Coulomb (SR) Potential
-1.29147e+04 -3.28852e+03 -1.28735e+02 -3.53416e+03 -7.85714e+03

<coulombtype=Switch, rcoulomb=1.3, rcoulomb-switch=1.2>
Coulomb-14 LJ (SR) Disper. corr. Coulomb (SR) Potential
-1.29147e+04 -3.28852e+03 -1.28735e+02 -5.25858e+04 -5.69088e+04

Cut-off.log (21.9 KB) Cut-off.log Output with Cut-off Igor Leontyev, 07/24/2014 12:31 AM
Methylacetamide.mdp (1.65 KB) Methylacetamide.mdp mdp-file Igor Leontyev, 07/24/2014 12:31 AM
Methylacetamide.gro (160 KB) Methylacetamide.gro initial structure Igor Leontyev, 07/24/2014 12:31 AM
Methylacetamide.top (3.59 KB) Methylacetamide.top Topology Igor Leontyev, 07/24/2014 12:31 AM
PME.log (23.8 KB) PME.log Output with PME Igor Leontyev, 07/24/2014 12:31 AM
oplsaaff.itp (287 KB) oplsaaff.itp FF Igor Leontyev, 07/24/2014 12:31 AM
Switch.log (22.1 KB) Switch.log Output with Switch Igor Leontyev, 07/24/2014 12:31 AM

History

#1 Updated by Erik Lindahl about 6 years ago

  • Status changed from New to Accepted
  • Assignee set to Erik Lindahl

#2 Updated by Erik Lindahl about 6 years ago

  • Status changed from Accepted to Rejected

I don't see any bug in the switched coulomb interaction, and in particular I have checked that switched PME produces fine results.

Instead, this result is a consequence of using gigantic energy groups consisting of the entire molecule in combination with switched plain coulomb. Since your molecules are neutral this will effectively give you a dipole-dipole (or almost quadropole-quadropole interaction, since the dipole in the molecule is small) since the cutoff is based on the charge group - either all atoms in two molecules interact, or none of them. As a check, you can try to disable the large charge group, which will give you a big change in the energy even without enabling any switch.

By definition, that will give you a total energy quite similar to PME, where we include all interactions. In principle you are only missing quadropole interactions outside of 1.3nm, which will be a very small component of the energy.

In contrast, when you apply a switch to the coulomb interactions the switch factor is computed based on the atom-atom distance, NOT the group distance. This will violate the effective dipole-dipole interactions you had by using the charge groups, and is pretty much the reason why both switched plain coulomb and large charge groups are bad ideas.

Grompp does emit a note that the plain cut-off can produce artifacts, and recommends PME instead; we might want to turn that into a more stern warning in the future.

Also available in: Atom PDF