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.1.tar.gz (82.6 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.1-py3-none-win_amd64.whl (109.4 kB view details)

Uploaded Python 3Windows x86-64

vesin-0.5.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (137.6 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

vesin-0.5.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (125.5 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

vesin-0.5.1-py3-none-macosx_11_0_arm64.whl (87.6 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

vesin-0.5.1-py3-none-macosx_10_13_x86_64.whl (93.4 kB view details)

Uploaded Python 3macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: vesin-0.5.1.tar.gz
  • Upload date:
  • Size: 82.6 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.1.tar.gz
Algorithm Hash digest
SHA256 86afd7641319b21187155a8d9585bc134e79536897f28c62b69476627c1020ae
MD5 cbda2003048f50b506f3d8419c01d597
BLAKE2b-256 ebaccf489a0edbad4158ca4daa699077af7709ab793b9a5626114685dbae72a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesin-0.5.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 109.4 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.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 87b512b9d2ed39cc96fbf81edfeb0f580dac8f68afc9248904ae13f719ce3dad
MD5 3c5ed34116d0019bf8535d853d538674
BLAKE2b-256 032821bb2a4cd4caee918f0514de2b8704e38716533a2b89aa315a6d3b1655f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 d040f13cc16cfb72d631f4173e98a9c270db31a8250e4d98100ec5333af69a9f
MD5 2fbfb2a2af93b6a147afdd7996a0ba2e
BLAKE2b-256 384559ffee16288833ac356964632ab0054e642c2e249f319a91a2c2ecc8e345

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 2b09d4c6c4568b28461853d90d99696427acd245dd778b377e409eb9aa8686e2
MD5 c4cca331e8084d5f7f68b98a87399ce7
BLAKE2b-256 33aa167cd2c32bf12745d0ca8f2ae49d653404141fd09e82401b791f5670ed8d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesin-0.5.1-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 87.6 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.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3e7c798b1e12fbc73a2d3f6306cfe9a28dc2c3bba0a9008c569d437d6c15388
MD5 d90afe5e5b33fda78daea9daaa6e96ae
BLAKE2b-256 37ba48e57d104731cb7bc2045064c1a164c88cd7929066537100d66c6b159bec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.1-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 d44647d9a1a73ed64dfeb3161c36355f93d566f075eb48a56848173b8ed6036f
MD5 2acd7ae0dbd182f2b286ee772f3c1ecb
BLAKE2b-256 093442b3e8f542b6261cc10dcb0ef61ad414dee22f06fde75a2d943891949376

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