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 EPYC 9334 CPU and an NVIDIA H100 GPU. You can run this benchmark on your system with the script at benchmarks/benchmark.py. Cross on points indicate that a specific code could not run the calculation after or before the cross (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.6.0.tar.gz (113.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.6.0-py3-none-win_amd64.whl (127.6 kB view details)

Uploaded Python 3Windows x86-64

vesin-0.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (201.7 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

vesin-0.6.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (181.4 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

vesin-0.6.0-py3-none-macosx_11_0_x86_64.whl (112.6 kB view details)

Uploaded Python 3macOS 11.0+ x86-64

vesin-0.6.0-py3-none-macosx_11_0_arm64.whl (106.2 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for vesin-0.6.0.tar.gz
Algorithm Hash digest
SHA256 127f11694478f61a47be1c253b5ce0f24247648774494dd15de8ff16ef9881c7
MD5 fff3adcc31761c51c7ac1f333e29739e
BLAKE2b-256 0e7052ef4b30afe7d27fb2c0c9ef8d8e7e28ffd6b21603d308413690be8867ca

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vesin-0.6.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 84c19d030a38ea6c752e31d7281403e5ece0373ab86cacbe85c3a7c15d701a33
MD5 08bfeeb79067dd50f4a13d36a16179b0
BLAKE2b-256 4961ebff303f97e3c17c9eda155464aa37d5eec4ce27d31e01cda7e76b5bb7e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 166b6bb2ecb8178387d412b4ac6120d0ac5f6c7e2fc055be0e0456010d9e5dbb
MD5 67a437bc5f63dc533ec4d17681be97ee
BLAKE2b-256 75d12ca1ec1cbd728e29a0754b2fee177eb10f1b9840f5f62940a3c4085b6672

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.6.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 239b900497c1fde11bb7c77df81058861147269ed923b7f106723c3e23a2d5ca
MD5 5aef340343107d815a4740bad0574014
BLAKE2b-256 71166b9674b3483afced915d2b1bf627e10e6c0b31769270c47d6daf5c869a4f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.6.0-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 af679df30d9c63eb5b8fd6ee646b0e4c5a4b319d14c0944c80d026108aafe176
MD5 33aa22ef1842864ba25981782e14c16b
BLAKE2b-256 814d329afb15fd694a3d3d6b44a76556b43a55084b4c843eda5c4f42497f20df

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vesin-0.6.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6fdb37490bd4fc8a00cfc12595861684855ef9ec30981d6086ce78569ed24b80
MD5 fa6bc5509697c5fdec52ded99fed611e
BLAKE2b-256 a7522d91ab075569763e2839446bcf610dc5e6f5f1e7be4c0c1c9c476ad857e6

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