[lammps-users] why can't dumps request neighbor lists?

Hi all.

In the Neighbor::init function there are hooks to register callbacks for pair classes, fix classes, and compute classes who may have wanted to create their own neighbor list. Any reason why dump classes shouldn’t be allowed to request a new neighbor list?

Are the following changes safe? The dump classes wanting access to a neighbor list would initialize it as any compute, fix, or pair class would.


To answer my own question… seems that the changes are not safe.

It looks like the neighbor list which my dump requests via the callback mechanism (as in ComputeCentro::init()) turns up empty.

Are there other places in neighbor.cpp and neigh_request.h which might need some adjustment to allow dumps to request neighbor lists?


This is possible in principle, but the code is tricky in places in
neighbor.cpp where
neighbor list requests are processed as there are many special cases
to consider.


After making the changes to neighbor.cpp and neigh_request.cpp to treat dumps on the same footing as pairs, fixes, and computes, the MyDump::init_list() function is never getting called back by Neighbor::init()

neighbor->request((void *) this)
returns a value of zero if I only have one such my_dump defined in the input script, and returns 0 and 1 if there are two my_dumps defined, so it looks like that much is working.

Any ideas?