[gmx-developers] Dihedral angle numerical accuracy
hess at kth.se
Sat Oct 28 10:06:59 CEST 2017
In molecular dynamics it's rather likely that you hit corner cases, so
we pay a lot of attention to numerical issues when writing and reviewing
code. Therefore it is unlikely that there are cases that can be
improved, but you are welcome to look.
It is good that you mention the sign in dihedral angle. The return value
is actually never used. The sign is only used to set the sign of the
angle, which switches at angle=0, so there is no stability issue.
On 10/28/2017 07:16 AM, Pavel Panchekha wrote:
> I'm a student at the University of Washington working on numerical
> accuracy, and I've been looking into GROMACS as an example of a
> beloved and important large numerical program. Browsing through the
> code base, I was struck by the computation of the dihedral angle in
> _bonded.c_, at line 1569 (in GROMACS 5.1.4).
> I wonder if it is possible for the _sign_ variable to get the wrong
> value, if the input points are close to one another or have some other
> reason to experience cancellation when doing the cross product. I
> think this is fixable using an adaptive algorithm. Could changing the
> sign of the angle computed by _dih_angle_ affect GROMACS's results?
> More broadly, has anyone ever had numerical accuracy issues with
> GROMACS? Would there be interest in reviewing a patch that improved
> the accuracy (for edge case inputs) for the dihedral angle computation?
> —Pavel Panchekha
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gromacs.org_gmx-developers