Project

General

Profile

Bug #1391

Setting C6 parameter zero within combination rules 2 and 3

Added by Suman Chakrabarty almost 4 years ago. Updated over 3 years ago.

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

Description

According to the page 117 of the manual, "when sigma and epsilon need to be supplied (rule 2 and 3), it would seem it is impossible to have a non-zero C12 combined with zero C6 parameter. However, providing a negative sigma will do exactly that, such that C6 is set to zero and C12 is calculated normally. This situation represents a special case in reading the value of sigma".

However, this special option of setting negative sigma is not working as intended. Gromacs is reading sigma value with sign, so effectively sigma_ij = (sigma_i + sigma_j)/2 (for comb rule 2) is being translated as sigma_ij = (sigma_i - sigma_j)/2, if sigma_j was provided with a negative sign.

In case of combination rule 3, the same procedure leads to "segmentation fault" and mdrun crashes at the 0th step with all energy terms being "nan". This might originate from the fact that we are attempting square root of a negative number, if the sigma is being read with a negative sign.

So basically the special case of reading a negative sigma value needs to be checked for a possible bug.

ME_hard_comb2.tpr (294 KB) ME_hard_comb2.tpr United atom methane in SPCE water, with combination rule 2, and negative sigma value for methane. This run leads to almost zero sigma_ij between methane and water, as observed from RDF of water O with respect to methane. Suman Chakrabarty, 12/03/2013 09:08 AM
ME_hard_comb3.tpr (294 KB) ME_hard_comb3.tpr United atom methane in SPCE water, with combination rule 3, and negative sigma value for methane. This run leads to segmentation fault. Suman Chakrabarty, 12/03/2013 09:08 AM

Associated revisions

Revision 000c6b9e (diff)
Added by Erik Lindahl over 3 years ago

Process negative sigma correctly with combrule 2 or 3

The initial combination rule code (for sigma/epsilon)
did not take negative sigma rules into account, which
caused segfaults instead of the values reaching the code
in convparm.c that handles sigma<0 during conversion
to c6/c12 (where it is used to signal c6=0).

Fixes #1391.

Change-Id: I437f06d67c5ecfb58d236590288ad122bcdf2df0

History

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

Gerrit received a related patchset '1' for Issue #1391.
Uploader: Erik Lindahl ()
Change-Id: I437f06d67c5ecfb58d236590288ad122bcdf2df0
Gerrit URL: https://gerrit.gromacs.org/3561

#2 Updated by Erik Lindahl over 3 years ago

  • Status changed from New to Fix uploaded
  • Priority changed from High to Normal

#3 Updated by Erik Lindahl over 3 years ago

  • Status changed from Fix uploaded to Resolved
  • % Done changed from 0 to 100

#4 Updated by Erik Lindahl over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF