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.7.tar.gz (95.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.5.7-py3-none-win_amd64.whl (108.0 kB view details)

Uploaded Python 3Windows x86-64

vesin-0.5.7-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (122.0 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

vesin-0.5.7-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (113.5 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

vesin-0.5.7-py3-none-macosx_11_0_x86_64.whl (92.0 kB view details)

Uploaded Python 3macOS 11.0+ x86-64

vesin-0.5.7-py3-none-macosx_11_0_arm64.whl (87.3 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: vesin-0.5.7.tar.gz
  • Upload date:
  • Size: 95.3 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.7.tar.gz
Algorithm Hash digest
SHA256 0a5c48a939892580de326e3789c1ddb9554c2359672df389f50f619c797c31ca
MD5 aa5eab7bee8ad16d8a08b4ad2cadde9d
BLAKE2b-256 1a4b6b7b1dd2e972be40a44ee2f3844f7d668d1a3b434991b49e23d9b39f8327

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesin-0.5.7-py3-none-win_amd64.whl
  • Upload date:
  • Size: 108.0 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.7-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e2b0b3ae7928c0423104006a8dd85d8cc6853110d74add87b98bc6851ae0461d
MD5 50684c0f8dc71d13dc3e610d81f286fe
BLAKE2b-256 a5c1b98e99d4c595fd04f80e6ec132ef00355152c118bc71eb3c050982f180d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.7-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 90bfaae3a26ca4cccd26861906037494789c29b002c9277f723de5cdec013afa
MD5 853ae54db690e5d09e929acb19e7dc29
BLAKE2b-256 bd780c4266481c434fffd0b921fb97a449c3437d85dfd2e1616fafec85feb86c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.7-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 ee02dfb087f88ae1ad32007e1497d1037bbf84891a6780188d64d24553e171a7
MD5 c06923fe32b28d62d87d5d3d9c6f3fd4
BLAKE2b-256 d346479431b3bf0eeaf1971ca33188e7dac10c00852e95ceb1d36a4d85af18de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.7-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 6152df7006aebfa9f2c1ac9dd836f7ebc698fcc9151495db4cabcd6ea0ba0570
MD5 fd681ef40cef58a473cf03e356be1c3d
BLAKE2b-256 9652cb8c2173eb6856b323775f294edd06ab17c30e2d8b4eaa02a9c41a45a732

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesin-0.5.7-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 87.3 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.7-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d5b5e0974c13600ba9a7781bf41250c1a9ac5b825258a725af60e0f1357993ae
MD5 899dfeb255b6219ff8e7b954c63e5240
BLAKE2b-256 a643cefa6de2705d6cd15d5058578dba5ed2ce7748fc74d5cde783138e8f2191

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