Project

General

Profile

Bug #80

bug in avcsix calculation for dispersion correction

Added by David van der Spoel over 13 years ago. Updated over 13 years ago.

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

Description

For very small systems there is a bug in the computation of the average C6
necessary for dispersion correction. <C6> may become inf, due to division by
zero in force.c at line 666.

dispcorr=enerpres.tpr (79 KB) dispcorr=enerpres.tpr tpr file to reproduce the problem David van der Spoel, 05/10/2006 08:54 PM

History

#1 Updated by David van der Spoel over 13 years ago

Created an attachment (id=40)
tpr file to reproduce the problem

#2 Updated by Berk Hess over 13 years ago

This is a pathological case.
Since there is only one molecule it is not clear what
one would like the despersion correction to do.

The problem is that there is only one atom
will all intra-molecular interactions excluded.
I have chosen to not account for periodic self-interactions
between atoms, as an often occuring case in one solute
in solvent, where one probably does not want to have
dispersion correction between the solute and its periodic images.
The distance between periodic images is so large
that it does not contribute significantly to
the dispersion correction, compared to other pairs
where the distance can vary freely.
Note that this is taken into account correctly
also in the total interaction count in calc_dispcorr.

Anyhow, I have added a check on the number of pairs
and set avcsix to zero when there are no pairs.

Berk.

Also available in: Atom PDF