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.5.tar.gz (91.0 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.5-py3-none-win_amd64.whl (105.5 kB view details)

Uploaded Python 3Windows x86-64

vesin-0.5.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (117.8 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

vesin-0.5.5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (110.7 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

vesin-0.5.5-py3-none-macosx_11_0_x86_64.whl (88.1 kB view details)

Uploaded Python 3macOS 11.0+ x86-64

vesin-0.5.5-py3-none-macosx_11_0_arm64.whl (84.0 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for vesin-0.5.5.tar.gz
Algorithm Hash digest
SHA256 a08ce3e6e96e91b91bd6bd9ca9e1e372aafc79a406ca572c0833958037575b15
MD5 7b2a222e8ee77bd3ef477c49477cb967
BLAKE2b-256 fa5ca55f83b32f4ce28d4c6e193c9cbbea144e9ebc7d651099e7f24cdeaf0b0b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vesin-0.5.5-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 60e10b5f3f3e6300a74d6f593d324211f6a0059c9766a7416fa83cb5d573c171
MD5 70b9352af9967ed20864fb2065791df7
BLAKE2b-256 b58546afeb9be76dc81dd02da8c775f265d45474c5091cdf036dfdb28c064865

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a4692af9eda9c98eb6ea6ea52d522935d1c9c1214c00bc3fe2ba82dc6cf43753
MD5 cecd3ccccff36e3ceaee1fcd16484311
BLAKE2b-256 1e8a6dd2643e5ffc2b0ac8276f9e1b8e79f14731257638eae46362a7f53718f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 4624ecffc16f66c1e1e1841d844a05a2535891c872b94f253a3e1577dcf9d76f
MD5 76fe0c873d2b16ac42d74af5275fadb5
BLAKE2b-256 7b5d8c3d2fe4455ccd80348475446ef064ab23bd569b766c7539906c647f191b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.5-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 5a54fdb717e0477b3420c23aaae419250139de453558f9d0834ce2d4307b4959
MD5 994bfde8f51601f721c6ecdc35dc25f4
BLAKE2b-256 8e9b14cee17d591791271116e05e1fc72873342715eb1b079b9e09400df881b1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vesin-0.5.5-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3fc57c19ac0b95e1fffd33469e876d606c2e5e47113bef373ad5f98b54a92f8
MD5 dbf6560ea3f7d43bd9c4bbbaf30c196a
BLAKE2b-256 5bc54057dec61dc5e2828e913a797032d04fb90417df0053317abf3841411b6f

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