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},
}

Release files for vesin 0.6.1

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.1
File Size Uploaded
vesin-0.6.1.tar.gz 115.3 kB Details

Built distributions (wheels)

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

Total release size: 848.4 kB

Release files / vesin-0.6.1.tar.gz

Download URL vesin-0.6.1.tar.gz
Size 115.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d76b8c7f21551a494c7bf7697a8c05986b8179bd2d3683f0d634537bc2fe48c0
BLAKE2b-256 checksum
How to use checksums
1a3e5b57c48223fea42e44714bda5b1c5c5de945b8eb69c2ee7d194efaa23602
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.1-py3-none-win_amd64.whl

Download URL vesin-0.6.1-py3-none-win_amd64.whl
Size 127.6 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
43f2073f7e16b00935f0245d5fff05609470f0618f2844e3f7daa1279eec4312
BLAKE2b-256 checksum
How to use checksums
15d1787f91f3d735e34c2e7a5a64e7b7fc6dbe8fd99869aa05bdfa2d42d0f09d
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.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL vesin-0.6.1-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
27c4d838bbe315837cf7ca62597b94581235c269dce4d1d3600749f64396e746
BLAKE2b-256 checksum
How to use checksums
b624ef992ce7a8491b8f1e223febce36ebe1221f24bf5f60f62aa3dba69ae43b
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.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL vesin-0.6.1-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
8448ca611df50ee8b6087eb67fd4b4ba2eed21e8a43dabea706ad27fdc77bc0b
BLAKE2b-256 checksum
How to use checksums
125b221a0ec1845c38100c72f410fe6aed905c56ded6007140bdffce608ae595
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.1-py3-none-macosx_11_0_x86_64.whl

Download URL vesin-0.6.1-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
06a9d64f23d2e1137a768f7ce0912ca5e974a147d4c4a53b28593e37c2a629e7
BLAKE2b-256 checksum
How to use checksums
e0d0d752d48a6bb1f230d3ecef37533a76fef5868faa5e6b1544f590df3c5e77
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.1-py3-none-macosx_11_0_arm64.whl

Download URL vesin-0.6.1-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
5992919826b8935ac6abca105bd3b5eba61e7a58e656940b261b20740b8e0fe6
BLAKE2b-256 checksum
How to use checksums
7f190f8bd7ed5fd54a9917f9385298d0696942cff92fae3bdd0295caab5a3c47
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.1 This release

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