Hi Lammps,
I have another tersoff question. There's a block of code which I am not
sure I understand well:
for (jj = 0; jj < jnum; jj++) {
j = jlist[jj];
jtag = tag[j];
if (itag > jtag) {
if ((itag+jtag) 2 == 0\) continue;
\} else if \(itag < jtag\) \{
if \(\(itag\+jtag\) 2 == 1) continue;
} else {
if (x[j][2] < x[i][2]) continue;
if (x[j][2] == ztmp && x[j][1] < ytmp) continue;
if (x[j][2] == ztmp && x[j][1] == ytmp && x[j][0] < xtmp) continue;
}
What is going on with the comparison of coordinates (e.g. x[j][2] <
x[i][2])) at the end of this block?
The jlist array comes from the first nearest neighbor list of ilist[i].
The Erhart & Albe paper gives the tersoff energy in the form of a sum of
repulsive pair and attractive three body terms for index i > j. So why not
just use the condition of itag > jtag? I don't understand these loop
conditions. Any comments or explanation would be greatly appreciated.
Thanks,
John