Dear all
According to /src/pair_tersoff.cpp , LAMMPS derives every atoms’ stress via differentiating potential energy, which seems natural for that subject. However, it’s v_tally3 function in pair.cpp ,which is internally called during the stress calculation, that puzzles me.
Specifically, at first, I cannot understand why i,j,k-indexed atoms (the 3 atoms involved in calculation) shares equal stress. I think the stress of atom i (at the center of these 3) should be bigger than two others, since the force of it is sum of the others.
Secondly, I cannot figure out why THIRD term appears here. I think this term is to avoid double-summation(or excessive summation), likewise on ev_tally function, but I think it should be just 1/2, because only j and k can be switched during permutation.
These might be silly questions, but is anyone have suggestions in dealing these problems?
(I looked up papers regarding this matter such as from ‘Izumi et al’ on thin solid film journals on 2004, but it didn’t help.)
Thanks in advance
v_tally3 funtions are below::
v[0] = THIRD * (drik[0]*fi[0] + drjk[0]*fj[0]);
v[1] = THIRD * (drik[1]*fi[1] + drjk[1]*fj[1]);
v[2] = THIRD * (drik[2]*fi[2] + drjk[2]*fj[2]);
v[3] = THIRD * (drik[0]*fi[1] + drjk[0]*fj[1]);
v[4] = THIRD * (drik[0]*fi[2] + drjk[0]*fj[2]);
v[5] = THIRD * (drik[1]*fi[2] + drjk[1]*fj[2]);
vatom[i][0] += v[0]; vatom[i][1] += v[1]; vatom[i][2] += v[2];
vatom[i][3] += v[3]; vatom[i][4] += v[4]; vatom[i][5] += v[5];
vatom[j][0] += v[0]; vatom[j][1] += v[1]; vatom[j][2] += v[2];
vatom[j][3] += v[3]; vatom[j][4] += v[4]; vatom[j][5] += v[5];
vatom[k][0] += v[0]; vatom[k][1] += v[1]; vatom[k][2] += v[2];
vatom[k][3] += v[3]; vatom[k][4] += v[4]; vatom[k][5] += v[5];
}