Closed CheukHinHoJerry closed 4 months ago
The neighbor list is closely tied to the Python C-API, which makes disentangling it for use with pure C/C++ difficult.
We have a pure C++ implementation (that we use mainly for teaching) here: https://pastewka.github.io/MolecularDynamics/_project/milestone06.html - Note that this implementation does not support periodic boundaries, which in our teaching code are implemented by copying a ghost region of atoms (which is identical to how, e.g. LAMMPS does it).
The individual files are:
The code is MIT-licensed. Feel free to use and reuse.
PS: We have full C++ MD code, but that is not public (because of teaching). I'd be happy to share the full repository with you if interesting.
Thank you very much for pointing out the references! I think I have happy with what I have access to right now. I will close the issue.
Thank you for the nice package. Is there an example (or is it possible) on how to call the neighborlist (as in Python) in C++? Would be more very nice since I need a fast neighborlist in certain C++ code.