fix with a specified cutoff for neighbour list

Hello,

I am trying to write a fix with uses a full neighbour list with a specified cutoff ( different from the pair cutoff), which was defined in the input file.

Is there any way to built a full neighbour list with a specified cutoff in a fix without any modify neighbor.h and neighbor.cpp .

Best Regards
Zhou

Hello,

I am trying to write a fix with uses a full neighbour list with a specified
cutoff ( different from the pair cutoff), which was defined in the input
file.

Is there any way to built a full neighbour list with a specified cutoff in a
fix without any modify neighbor.h and neighbor.cpp .

it is not as simple as that, and those two files are not the files
that you would need to modify.

LAMMPS has multiple neighbor list variants implemented and the choice
of which is used is largely governed by some input commands and flags
that are set. in the simplest case, LAMMPS will build just one
neighbor list and pass it around. otherwise, it will try to build the
"largest" and "complete" neighbor list and then derive others from it.

the cutoff used for neighbor list generation, is then the largest pair
cutoff plus the neighbor skin distance.
you can then process the such created neighbor list and create a
custom sublist (several manybody potentials do this for processing
bonded interactions).

so typically, all you would have to do, is to make sure the largest
cutoff used in the simulation is large enough.

axel.

If you follow Axel’s advice and make sure the neigh list you want in your
fix uses a cutoff <= pair cutoff, then your fix can create/store its own
neigh list and update it whenever LAMMPS reneighbors. A couple of

pair styles do this b/c they want a “neighbor list” of shorter interactions,
e.g. pair_style airebo wants a list of atoms 2 Angs away. So you
can look in that pair style to see how it creates/stores its own neighbor
list, derived from the main LAMMPS neighbor list.

Steve