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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vesin-0.6.1.tar.gz (115.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

vesin-0.6.1-py3-none-win_amd64.whl (127.6 kB view details)

Uploaded Python 3Windows x86-64

vesin-0.6.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (202.8 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

vesin-0.6.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (182.1 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

vesin-0.6.1-py3-none-macosx_11_0_x86_64.whl (113.6 kB view details)

Uploaded Python 3macOS 11.0+ x86-64

vesin-0.6.1-py3-none-macosx_11_0_arm64.whl (107.0 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file vesin-0.6.1.tar.gz.

File metadata

  • Download URL: vesin-0.6.1.tar.gz
  • Upload date:
  • Size: 115.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for vesin-0.6.1.tar.gz
Algorithm Hash digest
SHA256 d76b8c7f21551a494c7bf7697a8c05986b8179bd2d3683f0d634537bc2fe48c0
MD5 9dbb90ca8d56418061019de673fc8949
BLAKE2b-256 1a3e5b57c48223fea42e44714bda5b1c5c5de945b8eb69c2ee7d194efaa23602

See more details on using hashes here.

File details

Details for the file vesin-0.6.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: vesin-0.6.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 127.6 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for vesin-0.6.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 43f2073f7e16b00935f0245d5fff05609470f0618f2844e3f7daa1279eec4312
MD5 d62c508b95159af5384d9217b6c411e8
BLAKE2b-256 15d1787f91f3d735e34c2e7a5a64e7b7fc6dbe8fd99869aa05bdfa2d42d0f09d

See more details on using hashes here.

File details

Details for the file vesin-0.6.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for vesin-0.6.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 27c4d838bbe315837cf7ca62597b94581235c269dce4d1d3600749f64396e746
MD5 11735c8cb83ec82929ab92efc36cef60
BLAKE2b-256 b624ef992ce7a8491b8f1e223febce36ebe1221f24bf5f60f62aa3dba69ae43b

See more details on using hashes here.

File details

Details for the file vesin-0.6.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for vesin-0.6.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 8448ca611df50ee8b6087eb67fd4b4ba2eed21e8a43dabea706ad27fdc77bc0b
MD5 df11b5ae74531ac9f14c1cebbfcb6986
BLAKE2b-256 125b221a0ec1845c38100c72f410fe6aed905c56ded6007140bdffce608ae595

See more details on using hashes here.

File details

Details for the file vesin-0.6.1-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for vesin-0.6.1-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 06a9d64f23d2e1137a768f7ce0912ca5e974a147d4c4a53b28593e37c2a629e7
MD5 c10d2701e6a0e34357a8a1d46f51b418
BLAKE2b-256 e0d0d752d48a6bb1f230d3ecef37533a76fef5868faa5e6b1544f590df3c5e77

See more details on using hashes here.

File details

Details for the file vesin-0.6.1-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: vesin-0.6.1-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 107.0 kB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for vesin-0.6.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5992919826b8935ac6abca105bd3b5eba61e7a58e656940b261b20740b8e0fe6
MD5 4ef957e624a6a17f8cf15303ed9f0542
BLAKE2b-256 7f190f8bd7ed5fd54a9917f9385298d0696942cff92fae3bdd0295caab5a3c47

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page