Skip to content
This repository was archived by the owner on Sep 1, 2021. It is now read-only.

Commit aaa67d0

Browse files
committed
Ensure dipole moments go from positive to negative (chemistry)
Thanks to Steven Petrovic for the bug report.
1 parent 386374d commit aaa67d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libavogadro/src/molecule.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,8 @@ namespace Avogadro{
785785

786786
// convert from electrons * Angstrom to Debye
787787
// (1.602176487×10−19 C / electron) * (1.0e-10 m/Ang / 3.33564e-30 C/m)
788-
dipoleMoment *= 4.80321;
788+
// use the negative to go from positive to negative charge (Chemistry)
789+
dipoleMoment *= -4.80321;
789790

790791
if (estimate)
791792
*estimate = true;

0 commit comments

Comments
 (0)