We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 262c002 commit dca50c9Copy full SHA for dca50c9
expui/BiorthBasis.cc
@@ -902,9 +902,11 @@ namespace BasisClasses
902
pott *= (-potlfac);
903
potp *= (-potlfac);
904
905
- double tpotx = (potr - pott*costh/(r*r))*x/r - potp*y/R;
906
- double tpoty = (potr - pott*costh/(r*r))*y/r + potp*z/R;
907
- double tpotz = potr*z/r + pott*sinth/(r*r);
+ // Transform to Cartesian components
+ //
+ double tpotx = (potr - pott*costh/r)*x/r - potp*y/R2;
908
+ double tpoty = (potr - pott*costh/r)*y/r + potp*x/R2;
909
+ double tpotz = potr*costh + pott*sinth*sinth/r;
910
911
// Return force not potential gradient
912
//
0 commit comments