tersoff code question

Hi Lammps users,

I have a question regarding the tersoff code implementation. I notice that
dx,dy, and dz are defined oppositely when calculating pair-wise repulsion
and attraction.

e.g. repulsion...
      delx = xtmp - x[j][0];
      dely = ytmp - x[j][1];
      delz = ztmp - x[j][2];

      f[i][0] += delx*fpair;

and attraction...
      delr1[0] = x[j][0] - xtmp;
      delr1[1] = x[j][1] - ytmp;
      delr1[2] = x[j][2] - ztmp;

      f[i][0] += delr1[0]*fpair;

Is there anything special going on here? The signs for energy and forces
in the functions look right. But I don't see why the repulsion term should
be defined such that delta= i - j instead of delta = j - i as it is done
elsewhere in the code.

Thanks for the help,

No particular reason. I think it was just simpler in
the 3-body part to flip the signs for use of the delta
vectors in some of the 3-body routines like zeta().