Project

General

Profile

Bug #2040

Ewald 3DC and surface correction forces missing

Added by Alexander Schlaich over 3 years ago. Updated over 3 years ago.

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

Description

Hi,

playing around with the 3DC of Yeh and Berkowitz [1] we realised that the energy correction (eq. 10 in [1]) is correctly added whereas the forces are numerical identical compared to usual 3d PME.
Looking at the sources in ewald/long-range-correction.cpp (starting line 319) one realises that the force in line 459 is actually never added as start=end=0. This can easily be checked by running mdrun -debug (resulting in natoms=0) .

We prepared a simple test system of two opposite test charges (at 0,0,0 and 1,1,1 in a 2,2,2 nm box), where the dipole correction Vdipole = 109.12 kJ/mol is correct according to eq. 10 in [1] but the difference in the forces between 3d and 3dc is zero, whereas eq. 12 in [1] predicts F_z = 218.2 kJ/mol/nm.

We reproduced this behaviour in all releases since 4.6.

It would be great if you could have a look as I don't see how to call ewald_LRcorrection from forces.cpp with the right parameters such that end-start=natoms.

Thank you very much and best wishes!

[1] J. Chem. Phys., Vol. 111, No. 7, 1999

3d.mdp (1.26 KB) 3d.mdp run input for 3d Alexander Schlaich, 08/24/2016 11:00 AM
3dc.mdp (1.26 KB) 3dc.mdp run input for 3dc Alexander Schlaich, 08/24/2016 11:00 AM
conf.gro (138 Bytes) conf.gro simulation setup Alexander Schlaich, 08/24/2016 11:00 AM
topol.top (588 Bytes) topol.top topology Alexander Schlaich, 08/24/2016 11:00 AM

Associated revisions

Revision ab7f4869 (diff)
Added by Berk Hess over 3 years ago

Fix Ewald surface+3DC corrections

Ewald surface and 3DC correction forces were only applied up to,
but not including, the last atom with exclusions. With water at
the end of the system only the last H would not be corrected.
With ions at the end all ions would be missing.
In addition, with the Verlet scheme and domain decomposition
no force correction was applied at all.

Fixes #2040.

Change-Id: I064bf01fab561dca40451763b75283b6f59e0fbd

History

#1 Updated by Gerrit Code Review Bot over 3 years ago

Gerrit received a related patchset '1' for Issue #2040.
Uploader: Berk Hess ()
Change-Id: I064bf01fab561dca40451763b75283b6f59e0fbd
Gerrit URL: https://gerrit.gromacs.org/6134

#2 Updated by Berk Hess over 3 years ago

  • Subject changed from Ewald 3DC does not sum forces to Ewald 3DC and surface correction forces missing
  • Status changed from New to Fix uploaded
  • Assignee set to Berk Hess
  • Priority changed from Normal to High
  • Target version set to 5.1.4

I pushed a fix to release-5-1. This was a somewhat tricky technical issue. And also the surface dipole correction forces could be missing. From the commit messagge:

Ewald surface and 3DC correction forces were only applied up to,
but not including, the last atom with exclusions. With water at
the end of the system only the last H would not be corrected.
With ions at the end all ions would be missing.
In addition, with the Verlet scheme and domain decomposition
no force correction was applied at all.

#3 Updated by Berk Hess over 3 years ago

  • Status changed from Fix uploaded to Resolved

#4 Updated by Mark Abraham over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF