Commit 1b3f6e25 authored by Markus Hoehnerbach's avatar Markus Hoehnerbach
Browse files

In PairAIREBO::bondorderLJ only compute torsion term once.

Since Etmp (representing sum_kijl omega_kijl * w_ik * w_jl) is not reset between the forward and reverse pass, the value used by later calculation will be twice the expected values.
One could instead reset Etmp between these passes, but there really is no reason to calculate it twice.
parent 2bdda8f6
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -2750,8 +2750,6 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag,
                  cwnom = r21mag*r34mag*r23mag*r23mag*sin321*sin234;
                  om1234 = cwnum/cwnom;
                  cw = om1234;
                  Etmp += ((1.0-square(om1234))*w21*w34) *
                    (1.0-tspjik)*(1.0-tspijl);

                  dt1dik = (rik2i)-(dctik*sink2i*cos321);
                  dt1djk = (-dctjk*sink2i*cos321);