What does j &= NEIGHMASK do?

Dear All

Does anyone know

what does the line of code

j &= NEIGHMASK;

in the double loop over the neighbor list do?

In some pair styles like pair_morse.cpp this like of code is used and in some styles like pair_adp.cpp it is not.

What is the difference? Why for some pair styles we need this line of code and for the others not?

Thank You!

Best Regards,

Anton

Dear All

Does anyone know
what does the line of code

j &= NEIGHMASK;

in the double loop over the neighbor list do?

it removes the bits that encode, whether a j atom of an i-j pair is a
"special" pair, i.e. part of a topological pair, angle or dihedral.

In some pair styles like pair_morse.cpp this like of code is used and in
some styles like pair_adp.cpp it is not.

because the adp style is not supposed to be used with explicit bonds.

What is the difference? Why for some pair styles we need this line of code
and for the others not?

see above. but to avoid crashes in hybrid models, it is probably a
good idea to filter out those bits anyway.

axel.

Added the NEIGHMASK strip to pair_adp.cpp as well.

Steve