Hi Ryan!
Keeping this on-list for the moment as it may be interesting for others,
too. I am already focusing on NEIGH_PURE_F with Neigh_LocaAccess because
I followed the KIM v2 discussion some time ago.
Great!
Neigh_IterAccess is going away, yes?
Correct!
I ran into some trouble, namely that I need to know if atom i's neighbor
atom j is a ghost atom. In KIM's half neighbor list modes, there is
numberContributingParticles. Now, the Tersoff potential is impossible to
implement completely using half lists and therefore I do not support
this mode. But even if I want to implement part of the algorithm as a
half list, I need something like numberContributingParticles.
If locator mode is used for get_neigh, I can use that to see if j has
zero neighbors.
Right. This is really the only way within kim-api-v1.Y.Z.
This is the current implementation, but it is not so
nice and I'm not sure about the performance. I did not achieve more
performance with the correct half list for the pair part so far.
Maybe it is worth creating a list of zero-neighbor particles at the beginning of the compute routine. Not sure if this will help, but it seems like the best option.
Also, LAMMPS currently prefers Neigh_IterAccess if it is available. What do you think?
Yes, I believe that is true. My understanding is that this is preferred because it allows the use of "Hybrid" potential behavior. We have decided that it is preferable to forgo direct compatibility with that feature in favor of the simplicity of having a single mode of neighbor list access. (If it became important, it would probably be possible to update the lammps/kim interface so as to work around this and still allow the use of KIM models with the Hybrid features. Howwever, we have no plans to implement such a feature at this time.)
numberContributingParticles is not currently availabe with NEIGH_PURE_F,
correct?
Correct. You need to get the list for a particle and see if it is of length zero or not.
Will it (or sth similar) be available in the v2 API?
v2 will introduce a new integer array containing 1/0 for each particle to indicate if the particle is contributing or not. The neighbor lists will nolonger provide this sort of information. Instead the neighbor lists will be required to be consistent with what the model would generate all on its own. (That is, if a particle is within the neighbor list cutoff range, it must be listed in the neighbor list. This is true for contributing and non-contributing particles.)
Cheers,
Ryan