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-torch 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-torch 0.6.2
File Size Uploaded
vesin_torch-0.6.2.tar.gz 105.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for vesin-torch 0.6.2
File
vesin_torch-0.6.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
vesin_torch-0.6.2-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
vesin_torch-0.6.2-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.24+ ARM64, Linux glibc 2.28+ ARM64 Details
vesin_torch-0.6.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 11.3 MB

Release files / vesin_torch-0.6.2.tar.gz

Download URL vesin_torch-0.6.2.tar.gz
Size 105.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cbb1d9c81ec3787a067d3563a708ec347abad0bc11e5fe450e6d4e15143fed15
BLAKE2b-256 checksum
How to use checksums
a6254bd5fa7601dcbedec55981b113286b1c2643c3e3fb3d3edcb9fbb1c483bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

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

Download URL vesin_torch-0.6.2-py3-none-win_amd64.whl
Size 2.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
a8a5f3f74d8d0ee3c40a8f66f53902fc2f5954ac65d461cb57b31b2a1b97ec21
BLAKE2b-256 checksum
How to use checksums
88bcecdf099ee7b00ea0c1270b6e36161929080f76c53adcf479bbfe338f6c6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / vesin_torch-0.6.2-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL vesin_torch-0.6.2-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3187d93cf3519d3f91d38d7d977486999d15c49490276d3f1aef9bd574ad393f
BLAKE2b-256 checksum
How to use checksums
c28941584e99a4966cb7c214a990d3341e90a149afb3449bfca2467c4523fd1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / vesin_torch-0.6.2-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl

Download URL vesin_torch-0.6.2-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Size 2.9 MB
Tags Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
f56507cdb0e1eb2d9c7fdc8a232bc095d90348c671fc8d66e617e4262aea8912
BLAKE2b-256 checksum
How to use checksums
4ad346036d24795c8e019e58cba7b2a896f030727a685127d5d20607fa93d0a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

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

Download URL vesin_torch-0.6.2-py3-none-macosx_11_0_arm64.whl
Size 2.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ce8c0e8a9452963e623b12582162eef49c64a9613e10fee17174c036e2abc895
BLAKE2b-256 checksum
How to use checksums
821c182f200967204a3a22fd283993f6c89248e443168c9e339ad9f29205b8bb
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

5 release files

0.6.1

5 release files

0.6.0

5 release files

0.5.8

5 release files

0.5.7

5 release files

0.5.6

5 release files

0.5.5

5 release files

0.5.4

5 release files

0.5.3

5 release files

0.5.2

5 release files

0.5.1

5 release files

0.5.0

5 release files

0.4.2

5 release files

0.4.1

5 release files

0.4.0

5 release files

0.3.8

5 release files

0.3.7

5 release files

0.3.4

5 release files

0.3.3

5 release files

0.3.2

4 release files

0.3.1

4 release files

0.3.0

4 release files

0.2.0

4 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