From aaa67d012828b35314049a9463b77f70415c29c3 Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Wed, 8 Jun 2016 10:19:45 -0400 Subject: [PATCH] Ensure dipole moments go from positive to negative (chemistry) Thanks to Steven Petrovic for the bug report. --- libavogadro/src/molecule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavogadro/src/molecule.cpp b/libavogadro/src/molecule.cpp index 90242cb12..5dea72345 100644 --- a/libavogadro/src/molecule.cpp +++ b/libavogadro/src/molecule.cpp @@ -785,7 +785,8 @@ namespace Avogadro{ // convert from electrons * Angstrom to Debye // (1.602176487×10−19 C / electron) * (1.0e-10 m/Ang / 3.33564e-30 C/m) - dipoleMoment *= 4.80321; + // use the negative to go from positive to negative charge (Chemistry) + dipoleMoment *= -4.80321; if (estimate) *estimate = true;