Skip to main content

Vesin: fast neighbor lists for atomistic systems

Documentation Tests

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:

import ase
from vesin import ase_neighbor_list

atoms = ase.Atoms(...)

i, j, S, d = ase_neighbor_list("ijSd", atoms, cutoff=4.2)

See the documentation for more information on how to use the code from C or C++.

Benchmarks

You can find below benchmark result computing neighbor lists for increasingly large diamond supercells, using an AMD EPYC 9334 CPU and an NVIDIA H100 GPU. You can run this benchmark on your system with the script at benchmarks/benchmark.py. Cross on points indicate that a specific code could not run the calculation after or before the cross (for example, NNPOps requires the cell to be twice the cutoff in size, and can't run with large cutoffs and small cells).

Benchmarks

License

Vesin is is distributed under the 3 clauses BSD license. By contributing to this code, you agree to distribute your contributions under the same license.

Citation

If you found vesin useful, you can cite the pre-print where it was presented (https://doi.org/10.48550/arXiv.2508.15704) as

@misc{metatensor-and-metatomic,
    title = {Metatensor and Metatomic: Foundational Libraries for Interoperable Atomistic
    Machine Learning},
    shorttitle = {Metatensor and Metatomic},
    author = {Bigi, Filippo and Abbott, Joseph W. and Loche, Philip and Mazitov, Arslan
    and Tisi, Davide and Langer, Marcel F. and Goscinski, Alexander and Pegolo, Paolo
    and Chong, Sanggyu and Goswami, Rohit and Chorna, Sofiia and Kellner, Matthias and
    Ceriotti, Michele and Fraux, Guillaume},
    year = {2025},
    month = aug,
    publisher = {arXiv},
    doi = {10.48550/arXiv.2508.15704},
}

Metadata

Release files for vesin 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vesin 0.6.2
File Size Uploaded
vesin-0.6.2.tar.gz 115.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for vesin 0.6.2
File
vesin-0.6.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
vesin-0.6.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
vesin-0.6.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
vesin-0.6.2-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details
vesin-0.6.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 848.5 kB

Release files / vesin-0.6.2.tar.gz

Download URL vesin-0.6.2.tar.gz
Size 115.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8fc5000d74a13131fa21cd81d5e22e50f4195b7105574b35959ebe1720a02ea1
BLAKE2b-256 checksum
How to use checksums
0543720bfa0188826e2e00b348fbe8ee9547abc02a45401df575b8cbc02fb07e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / vesin-0.6.2-py3-none-win_amd64.whl

Download URL vesin-0.6.2-py3-none-win_amd64.whl
Size 127.6 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
f0d43ac47429d2414381b98c3ff621e9d04055f7447ab7bbb60145f47e9d5103
BLAKE2b-256 checksum
How to use checksums
b7cc06e4b1ce6d6d549a0b333c757e474492088958fe0191c7d8fb6d2d54dcca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / vesin-0.6.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL vesin-0.6.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 202.8 kB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
14ba0c65e602ffb59c63199761b70f6b96a1847913de56d9b60c186931b16f4f
BLAKE2b-256 checksum
How to use checksums
1a43a7ce7d43d8a77caa7083eb14eaec65eb97af4d044024b01c93075c28b735
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / vesin-0.6.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL vesin-0.6.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 182.1 kB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
21e6c7f6ff03a8ae63bfea828357dd7a7f7506b9d5f7f57907e48257ad197094
BLAKE2b-256 checksum
How to use checksums
963b99373e2f58c2153585265b71986bf43e61c1088ba2c5b6c66644f22f7a24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / vesin-0.6.2-py3-none-macosx_11_0_x86_64.whl

Download URL vesin-0.6.2-py3-none-macosx_11_0_x86_64.whl
Size 113.6 kB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
e88e30a398a0cbc73ad6db724f9a1edcb3fff247f069a6686b5b08ae3a54c4fe
BLAKE2b-256 checksum
How to use checksums
5152248ac68c0aaa0d655dde8c2578d0cc6cdc31a82710e57eeb8ccf067187b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / vesin-0.6.2-py3-none-macosx_11_0_arm64.whl

Download URL vesin-0.6.2-py3-none-macosx_11_0_arm64.whl
Size 107.0 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8ff993885575d9f6ef1c6a6c311ae3d189fd4a12cc4a153da40429b31ae6daf2
BLAKE2b-256 checksum
How to use checksums
539fe007f763e32d25e04448b569654fdccf2456716e1d8cced39674a99787e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.6.2 This release

6 release files

0.6.1

6 release files

0.6.0

6 release files

0.5.8

6 release files

0.5.7

6 release files

0.5.6

6 release files

0.5.5

6 release files

0.5.4

6 release files

0.5.3

6 release files

0.5.2

6 release files

0.5.1

6 release files

0.5.0

6 release files

0.4.2

6 release files

0.4.1

6 release files

0.4.0

6 release files

0.3.8

6 release files

0.3.7

6 release files

0.3.4

6 release files

0.3.3

6 release files

0.3.2

6 release files

0.3.1

6 release files

0.3.0

6 release files

0.2.0

6 release files

0.1.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page