openkim / kliff

KIM-based Learning-Integrated Fitting Framework for interatomic potentials.
https://kliff.readthedocs.io
GNU Lesser General Public License v2.1
34 stars 20 forks source link

Bug in Neighbors #37

Closed wilsonnater closed 2 years ago

wilsonnater commented 2 years ago

In kliff.neighbor NeighborList, it appears there is some bug when isolated atoms are aligned an axis, such as the atoms being at 3,3,3 and 4,3,3. It cannot find neighbors then and it will crash with Segmentation fault (core dumped) if the atoms where at 3,3,3 and 4,4,3. I have attached a script that reproduces this issue.

KliffBugTest.txt

mjwen commented 2 years ago

Hi @wilsonnater thanks for the bug report and the example script!

I confirm that I can reproduce what you've described in the script. We'll look into it and get back to you soon.

mjwen commented 2 years ago

Hi @wilsonnater I've fixed the bug and please see #38 for more.

It's in the master branch now if you want to try it out. I'll release a new version to PyPI and conda-forge soon.

wilsonnater commented 2 years ago

That fixed it on my side too.