[gmx-developers] Dihedral angle numerical accuracy

Pavel Panchekha me at pavpanchekha.com
Sat Oct 28 07:17:26 CEST 2017


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...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20171028/d440600f/attachment.html>

More information about the gromacs.org_gmx-developers mailing list