stillinger-weber force

Hi,

While looking at the file pair_sw.cpp in the source directory, I noticed that in the two-body part of the Stillinger-Weber force, there is a term of order “q+1” (q is one of the parameters) which corresponds to the term of order “q” in the two-body part of the energy. In the case of q equals zero, (as for the silicon set of parameters), the derivative of the “q” order term should be zero, but instead of that, the resultant force includes a term proportional to (sigma/r) because the differentiation is done before setting q=0. Should I ajust the force calculation if I set q=0 to eliminate that term ? Thank you for your advise.

Paule

It is true that there is some wasted computation in the case q=0, but
the formulas are still correct in this case, because the extra term is
multiplied by q. What exactly is your concern?

Aidan

It is true that there is some wasted computation in the case q=0, but
the formulas are still correct in this case, because the extra term is
multiplied by q. What exactly is your concern?

Aidan