Compute RDF with neighbor multi

Dear LAMMPS developers and users,

I was running some simulations of a binary WCA liquid and used neighbor multi. When I calculated the RDF with compute rdf for one of the species and comparably long distances, the curve decayed to zero (see the image below). This unphysical result only occurs with neighbor multi, but not with neighbor bin. I attached a simplified input script.

If I understand it correctly, compute rdf requests its own neighbor list with increased cutoff if necessary. That’s why I thought the compute should work with both neighbor styles.

Note that if I calculate the RDF in post-processing, it’s fine in both cases. The problem is solved if I increase the LJ cutoff.

I would be very grateful for any advice regarding this issue.

Victor

in.spheres (1.4 KB)

1 Like

please post this as a bug report issue on github at: Issues · lammps/lammps · GitHub

1 Like

After some examining of the relevant code, the conclusion is that there is more to getting a complete neighbor list, than just specifying the desired cutoff. Before the neighbor list is created atoms are sorted into boxes and candidates for the neighbor list selected with a stencil. This is different for the two cases of multi and “uniform” neighbor list and one part why neighbors are missing. The second issue is that also the ghost atom communication is changed which reduces the number of atoms that become eligible as neighbors.

The conclusion is, that we will have to disallow the use of a custom cutoff with “multi” neighbor lists. This is for compute rdf, but a few other computes as well, e.g. compute adf.

Thank you very much for the changes and the explanations here and on github!