code: missing "cut[j][i] = cut[i][j];" line?

Usually the the "init_one()" member function of every pair style swaps
Lennard-Jones coefficients and cutoffs (to insure that the
interactions between a pair atoms of type i and j, is the same as
between j and i).

There are a couple pair styles that don't seem to do this

pair_lj96_cut.cpp (near line 568)
pair_lj_class2.cpp (near line 272)

Do we need a line like this in these files?
cut[j][i] = cut[i][j];

(They do define their own atom-type specific distance cutoffs.)

Cheers

Andrew

P.S.

I'll post a follow-up message if I find this issue anywhere else.

Note: Not all pair styles omit i <--> j swaps for cutoffs.
(See lines 245-246 of "pair_lj_cubic.cpp")

Usually the the "init_one()" member function of every pair style swaps
Lennard-Jones coefficients and cutoffs (to insure that the
interactions between a pair atoms of type i and j, is the same as
between j and i).

There are a couple pair styles that don't seem to do this

pair_lj96_cut.cpp (near line 568)
pair_lj_class2.cpp (near line 272)

Do we need a line like this in these files?
cut[j][i] = cut[i][j];

it should be included for consistency.
it usually doesn't produce much of a
problem, since cutoffs are pretty much
always compared against cutsq[i][j]

which is generated symmetrically.

axel.

Do we need a line like this in these files?
cut[j][i] = cut[i][j];

it should be included for consistency.

Sure. (For people writing new pair styles who copy and modify old
ones like me.)

it usually doesn't produce much of a
problem, since cutoffs are pretty much
always compared against cutsq[i][j]
which is generated symmetrically.

I did not notice that, but that's good.

Thanks!

Andrew

Do we need a line like this in these files?
cut[j][i] = cut[i][j];

no, only if the pair style compute uses cut.
Most do not. Pair lj/cut does not for example.
Otherwise only the user sets cut in the
input script and there i <= j is required.

Steve