Skip to main content

Computing neighbor lists for atomistic system

Project description

Vesin: fast neighbor lists for atomistic systems

Documentation Tests

English 🇺🇸⁠/⁠🇬🇧 Occitan French 🇫🇷 Arpitan Gallo‑Italic Catalan Spanish 🇪🇸 Italian 🇮🇹
neighbo(u)r vesin voisin vesin 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.

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.3.7.tar.gz (31.5 kB view details)

Uploaded Source

Built Distributions

vesin-0.3.7-py3-none-win_amd64.whl (58.2 kB view details)

Uploaded Python 3Windows x86-64

vesin-0.3.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (56.0 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

vesin-0.3.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (54.6 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

vesin-0.3.7-py3-none-macosx_11_0_arm64.whl (26.0 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

vesin-0.3.7-py3-none-macosx_10_13_x86_64.whl (25.9 kB view details)

Uploaded Python 3macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: vesin-0.3.7.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for vesin-0.3.7.tar.gz
Algorithm Hash digest
SHA256 52c11ac0ba775c228f06779877cf8641854edab7ea59036093ef5e8447379de0
MD5 af8d48ec4283a00e311d8a00a977dff9
BLAKE2b-256 732439c98cd0911a170fb94f1077f26a043d4f47df48eecb3eccd1cb11c9e991

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vesin-0.3.7-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 69e55daff9f8ffc516708bee233c258c9fabdd2a8d6683c5044479b2d38ba577
MD5 2d795b90b317443e2627640b74568764
BLAKE2b-256 e674ff7810aa15d7c2d0562472be7dda16188e05a1bdc392ae17dbe37c5bc0b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.3.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e41dc2eb5598bb9dc759f6eb88df5e3076698a30465cf496e0ab35dc230820dc
MD5 599f584ac6c303809af43cea4125f67f
BLAKE2b-256 6aa4aa108860fc8b563668046df37347c6ed36854981505ac36d78ea2845b33f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.3.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7c85dde76427eb7e03a5bde915b8bdca2cfb64a0a82f0334231174a21ced4ab9
MD5 53f5472a03892fa3b14b3f8d6fefee8a
BLAKE2b-256 7e428a8db8d202403306a51045e85eb28e7d2a1fb4d9f3ca2cde5a139b5e007f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vesin-0.3.7-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1678347adb71070dca7130fe45c28b5f0cc3daa7a5461bd87ee1d93d62c9a57a
MD5 763e790fd3ce4a229cb15e7e45e9f192
BLAKE2b-256 0e69f37c3922a0040fd5baa22516d1c82b455ea94c9f4c18c71f4a669904a434

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin-0.3.7-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 d9ad3fe9c040764d9329925cb560e40770c7b7167ac72096c5a1f6981ecea44f
MD5 566811eb3929605d0393c96583a64737
BLAKE2b-256 8dcfa8be6255d45a1434b6027ea5675ffdea55da1851a4b0f7607be12d38b336

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page