I have found a bug in the KIM implementation for LAMMPS. When checking my model driver I noticed that there is some inconsistency when using CLUSTER mode in LAMMPS.
When using periodic boundary conditions then LAMMPS gives you wrong forces and energies. For testing I used a configuration
with 8 atoms in a large simulation box.
Looking into this, I found out that LAMMPS actually passes 64 atoms to my model and sets numberContributingParticles=8. This is actually not supported by CLUSTER mode and all 64 atoms will contribute.
If you use non-periodic boundary conditions then everything is working as expected.
I know that CLUSTER mode is not supposed to be used with PBC but I guess
this case should give at least a warning or even an error.