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.8.tar.gz (95.8 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.8-py3-none-win_amd64.whl (108.5 kB view details)

Uploaded Python 3Windows x86-64

vesin-0.5.8-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (122.7 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

vesin-0.5.8-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (114.1 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

vesin-0.5.8-py3-none-macosx_11_0_x86_64.whl (92.7 kB view details)

Uploaded Python 3macOS 11.0+ x86-64

vesin-0.5.8-py3-none-macosx_11_0_arm64.whl (88.0 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: vesin-0.5.8.tar.gz
  • Upload date:
  • Size: 95.8 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.8.tar.gz
Algorithm Hash digest
SHA256 0aa89482c098064b107e694ac2e755385fc4d6e2da250b1dfc31b40271a39580
MD5 57892b2719a363ad9094e2738462f4e9
BLAKE2b-256 d99c8e12834767f58754ff61bb565fbf7a2ac04bda2ceab690c4224ac6af2be1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesin-0.5.8-py3-none-win_amd64.whl
  • Upload date:
  • Size: 108.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.8-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 ad10f4e6b94b08d41fec3abe076fe02bb45e3acc07eea7ae0f63680a6853206a
MD5 871e108b659450cf950056ee30c0d588
BLAKE2b-256 cd492198d59a066ba14c7eed9a9a283396a37fa9f4d82d7fd99219d550e79c65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.8-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 2517146bf50f59c3964343aa18a6cc5b023f7e07637ec6a6f90a42a843456c84
MD5 eb808898904a71b8220d2ff300cf4ccd
BLAKE2b-256 1f52ed91d87042bd726a23671e54a2d27891e3cbd343b48ea6f0717b1659220d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.8-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 1fc3c537f8aa5f667e803860a461ea89a550da783361d319c1b42e84a1c70e8d
MD5 93dc59fc4476bb40f476974645fb184e
BLAKE2b-256 764890aea8fa5e49944a386de77c9880a328678fe6e359012d3b9344d86ec0a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.5.8-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 8ad90b8a86659860978d231ba13d94e59c905a3a96065be7a8da830016ab7cec
MD5 f65a33036ba5a273d540b09a9ff8908e
BLAKE2b-256 14087e7c586963e94dc2ac88673b941f8ef27531558feece77b46dc93bfa480d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesin-0.5.8-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 88.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.8-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cf61b1a9dd6954ebe215f9027ee906fb0512b848139f184eeba98e9721af9ccb
MD5 0a9b3f4b4a807dfa06aee14f0f6997ea
BLAKE2b-256 f727af504ccbf2c092b37fc2802ebf9052a8215616e12e69b4d7819210608e5d

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