Skip to main content

Computing neighbor lists for atomistic system

Project description

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 3955WX CPU and an NVIDIA 4070 Ti SUPER GPU. You can run this benchmark on your system with the script at benchmarks/benchmark.py. Missing points indicate that a specific code could not run the calculation (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},
}

Project details


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.5.0.tar.gz (81.8 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.5.0-py3-none-win_amd64.whl (109.0 kB view details)

Uploaded Python 3Windows x86-64

vesin-0.5.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (136.8 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

vesin-0.5.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (124.7 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

vesin-0.5.0-py3-none-macosx_11_0_arm64.whl (87.0 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

vesin-0.5.0-py3-none-macosx_10_13_x86_64.whl (92.7 kB view details)

Uploaded Python 3macOS 10.13+ x86-64

File details

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

File metadata

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

File hashes

Hashes for vesin-0.5.0.tar.gz
Algorithm Hash digest
SHA256 432322e51b214d6e13b056677424f54b250fb181bd726afb9b2d5b1b6fdbdb84
MD5 fcd095bde60af6ff74be952825f07caa
BLAKE2b-256 af2da8382020e19ab90c5e14f9eecb908310983f5efc2d94fceb89db6538674f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vesin-0.5.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 90e09c8813e8f2c4255e5856b4647a8ddb830883f49804dd0a199e0103450f14
MD5 c58ae27f808c2d8c5ad5ca215bac6af2
BLAKE2b-256 9777c037d628ee5da953d7ad4105baedd2d8adb6990bfa97128eeb3b9a1d1a53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 f36a4346645a751917b7040523afa6d5f25352ba78a10e10ac23e6919fccc6f5
MD5 3fefaa61afb55958897b8a3bcf0ae825
BLAKE2b-256 3ced187f737732eb069749998bd96ac53fc352727bce5e7bdb53565c575ac93b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 f5ab64ceda4636b5b88ecd40562941f9e47967dc79405bcdef6e14ad6ed53e0e
MD5 3156d5361404ee64c738aad325802390
BLAKE2b-256 d8d8754826de723c596338cf5e5465f8c68bcd234580a6d6bd65a653ac0b543e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vesin-0.5.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0a708c6cd4a20cd75e34b088258bb81a58d600129191c1f12eb064fbc5a2db9e
MD5 531f88fa1ec42cb0dd9008623c832e6e
BLAKE2b-256 4246ae2b316e8019ab9ef84ed764d0782f8b39d02868fd92f0725528a1f5b6f9

See more details on using hashes here.

File details

Details for the file vesin-0.5.0-py3-none-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for vesin-0.5.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7dc132f07bb1c6226a3cb73ffb8fe2e28e378bf301089dea6a751af3c35611a5
MD5 b94ced8138f68aa82ca44a230890dd1c
BLAKE2b-256 17feaa8dc8d6d577e2e87232ba606a1020e9d94aacb46e9071ee34c16dac61d4

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