bug in avcsix calculation for dispersion correction
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.
#2 Updated by Berk Hess almost 14 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.