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_torch-0.6.0.tar.gz (104.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_torch-0.6.0-py3-none-win_amd64.whl (2.3 MB view details)

Uploaded Python 3Windows x86-64

vesin_torch-0.6.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (2.6 MB view details)

Uploaded Python 3manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

vesin_torch-0.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

vesin_torch-0.6.0-py3-none-macosx_11_0_arm64.whl (2.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file vesin_torch-0.6.0.tar.gz.

File metadata

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

File hashes

Hashes for vesin_torch-0.6.0.tar.gz
Algorithm Hash digest
SHA256 c4cf3135f8a0457d4ec862b22d450703f3a53fcff7a6f017c5e81dc1c24639f2
MD5 b42b139ade9887ca2777a74f28b3fdec
BLAKE2b-256 d3f1567a0621e91c1759d09e3976f9a51aa7502d2ac95398dbbe258da5a9564b

See more details on using hashes here.

File details

Details for the file vesin_torch-0.6.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: vesin_torch-0.6.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • 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_torch-0.6.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 8a65a709a49869d8e20160a4f02726f7554d4dd3b3c73ab6fe495f5bdab7700a
MD5 3608bd40eb70d00470f442afa09c42f8
BLAKE2b-256 16b18b73cba2df3889d9f5687e23abb7a5ec4a39f231a580e5943fa728c1a468

See more details on using hashes here.

File details

Details for the file vesin_torch-0.6.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for vesin_torch-0.6.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0e86d630b6e7714a232ce5464569f51c2a34262e96a9b42eeb2b12132e3b5a34
MD5 9bc33814427ddd5ad77f5701efb3f866
BLAKE2b-256 5f1ffe0c16a3168dfe789c01a18ff64a84f639982681329afcdd9b3a65ffbcd9

See more details on using hashes here.

File details

Details for the file vesin_torch-0.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vesin_torch-0.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 709c6ff6665880a74e76b2e3d2d2638c6fb61e43a034ebc5d200fda6cc00d050
MD5 dbfc666505480563c263411a770c8993
BLAKE2b-256 26c88c69982b64b4672b3264518abe3fd5dc18184a7eea2eed63289c0540b6ab

See more details on using hashes here.

File details

Details for the file vesin_torch-0.6.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vesin_torch-0.6.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 18fc864b6c5155131838774864c390f04fcf93c148d73d95111aa3a76da46f2d
MD5 f881d1977f4f4a758af9a3c22afe0270
BLAKE2b-256 869c5504980a1bb584a21b9d71683702b8de68f3d76233be4b46753e2a9bcb81

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.1

5 files

This release

0.6.0 This release

5 files

0.5.8

5 files

0.5.7

5 files

0.5.6

5 files

0.5.5

5 files

0.5.4

5 files

0.5.3

5 files

0.5.2

5 files

0.5.1

5 files

0.5.0

5 files

0.4.2

5 files

0.4.1

5 files

0.4.0

5 files

0.3.8

5 files

0.3.7

5 files

0.3.6

5 files

0.3.5

5 files

0.3.4

5 files

0.3.3

5 files

0.3.2

4 files

0.3.1

4 files

0.3.0

4 files

0.2.0

4 files

Supported by

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