Computing neighbor lists for atomistic system
Actively maintained. Last release 3 days ago, commits in 17 of the last 26 weeks. A safe choice.
pip install vesinVesin: fast neighbor lists for atomistic systems
| English 🇺🇸/🇬🇧 | Occitan | Arpitan | French 🇫🇷 | Gallo‑Italic | Catalan | Spanish 🇪🇸 | Italian 🇮🇹 |
|---|---|---|---|---|---|---|---|
| neighbo(u)r | vesin | vesin | voisin | visin | veí | vecino | vicino |
Vesin is a fast and easy to use library computing neighbor lists for atomistic system. We provide an interface for the following programing languages:
- C (also compatible with C++). The project can be installed and used as a library with your own build system, or included as a single file and built directly by your own build system;
- Python;
- TorchScript, with both a C++ and Python interface;
Installation
To use the code from Python, you can install it with pip:
pip install vesin
See the documentation for more information on how to install the code to use it from C or C++.
Usage instruction
You can either use the NeighborList calculator class:
import numpy as np
from vesin import NeighborList
# positions can be anything compatible with numpy's ndarray
positions = [
(0, 0, 0),
(0, 1.3, 1.3),
]
box = 3.2 * np.eye(3)
calculator = NeighborList(cutoff=4.2, full_list=True)
i, j, S, d = calculator.compute(
points=positions,
box=box,
periodic=True,
quantities="ijSd",
)
We also provide a function with drop-in compatibility to ASE's neighbor list:
