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.2.tar.gz (82.9 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.2-py3-none-win_amd64.whl (109.5 kB view details)

Uploaded Python 3Windows x86-64

vesin-0.5.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (137.7 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

vesin-0.5.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (125.6 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

vesin-0.5.2-py3-none-macosx_11_0_arm64.whl (87.7 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

vesin-0.5.2-py3-none-macosx_10_13_x86_64.whl (93.5 kB view details)

Uploaded Python 3macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: vesin-0.5.2.tar.gz
  • Upload date:
  • Size: 82.9 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.2.tar.gz
Algorithm Hash digest
SHA256 d203c9e1fc749ee5375eb71f2521d2fa511a0f9587252766012695dce4be7c78
MD5 281ceb52b8461ebe514b58071767c431
BLAKE2b-256 a0d6ddeb7d510c04ba0e88d0dbde259810271c1a550aa893f2c2272a301eadc8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesin-0.5.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 109.5 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.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 20ae92e8816d1337925e363551d5dfaffb9b051b8e35bd3fd6c66395e7fb1e21
MD5 aafcffadadcac2ce7312c819fef6e3c0
BLAKE2b-256 d641040252275e7048bbe1676ede1e184c58b605d7d0056e0156cad6bf43587e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 1b9f38f831f70b28bc8b2a47c2d984ddc3ac6ffcec6f4ac5bf0c919442b8f2ce
MD5 2a53dc3cbda481df62cd1dbb57b01a4b
BLAKE2b-256 8fcc87cd5e2053ff8026c63f1682f98592f35b9b32faa39916cd8ca88e13f1be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 4fded60861583f472f6e51f46b47aeccafc1ef6a5566c7fb5fd9dad8cdb281c2
MD5 2577f762a80593885538385d5a6d7c88
BLAKE2b-256 6446bfdd844489a36cf060c0cbf5fa28e27182b6e86139a771a183dcf9264adc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesin-0.5.2-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 87.7 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.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9bb70c897580232d80ba7e833c41c2a464ec0a49101648d39a001c6524d2c1e1
MD5 a2eac258209000e3771c04c2dc1c08ad
BLAKE2b-256 7ef4a71146bf735c0cb31c2dc74bc7d3cb862e276f6b1f9068afbaf70db3046d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.2-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 a50e4c22578a0c4643d1ebdb54341b79fb1755887755d8cf9d4f028d6dad9bca
MD5 31465da2c5f1604f4f8ba6e288cf7326
BLAKE2b-256 a1cc12961f694aa94532867ebacefa99d362da7be357fb045ce1a0512d46c28e

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