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];

repulsive(¶ms[iparam_ij],rsq,fpair,eflag,evdwl)

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

etc..

and attraction...

delr1[0] = x[j][0] - xtmp;

delr1[1] = x[j][1] - ytmp;

delr1[2] = x[j][2] - ztmp;

force_zeta(¶ms[iparam_ij],rsq1,zeta_ij,fpair,prefactor,eflag,evdwl);

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

etc...

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,

John