Skip to main content

Computing neighbor lists for atomistic system, in TorchScript

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_torch-0.3.4.tar.gz (31.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

vesin_torch-0.3.4-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3Windows x86-64

vesin_torch-0.3.4-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (606.4 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

vesin_torch-0.3.4-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (577.6 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

vesin_torch-0.3.4-py3-none-macosx_11_0_arm64.whl (574.4 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file vesin_torch-0.3.4.tar.gz.

File metadata

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

File hashes

Hashes for vesin_torch-0.3.4.tar.gz
Algorithm Hash digest
SHA256 5d84b5532b7866f418b2f30f5a1eab1c8b22c4d26106ad38261b764dc9b429a6
MD5 6b496a000b136c7dfee8732c2b8028f9
BLAKE2b-256 0bf07d74b7ff53ed381e16a668e0a4e2be07584cb6ae4b6f8e8463df0e11aa1a

See more details on using hashes here.

File details

Details for the file vesin_torch-0.3.4-py3-none-win_amd64.whl.

File metadata

  • Download URL: vesin_torch-0.3.4-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • 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_torch-0.3.4-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2b07f7d509661658180fab92470dd7c67a68537255a0cbed5e1288b3c710a08a
MD5 edfed5cd328feb4e25f57197b576051f
BLAKE2b-256 8ca325d6c02fe888fd38b80fa3be519815e3ba3af3febac4698ace15ac890b17

See more details on using hashes here.

File details

Details for the file vesin_torch-0.3.4-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vesin_torch-0.3.4-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 add09de91d6df7e83363287575333e8644b7825fe8dbcb36eb878b50cc5a7156
MD5 dfde183d59da6b6a10e713a7a08e7772
BLAKE2b-256 ad669a9cae97ce2c49756bcda7f8e7c80b4983e5c76d895e15dceae9beb61471

See more details on using hashes here.

File details

Details for the file vesin_torch-0.3.4-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for vesin_torch-0.3.4-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bd4251a1d8ce3335c136b262ac291f06d728846e36ffc114b99ab9f47807bc13
MD5 ab5fd1d59069b6fe9bb7a486038d8c89
BLAKE2b-256 c62b04c0a26a1fc38165ccf51fea7b79b45b6148dfc13e2f4eead54010516e05

See more details on using hashes here.

File details

Details for the file vesin_torch-0.3.4-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vesin_torch-0.3.4-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f3c8f017fb5174df35824e37b9c770ef799899a26251cb072642ba1060db388
MD5 a8b491b3a3953ee5b6fba17cd48fb9da
BLAKE2b-256 1e4fffaf0cec3c4eead156f84e8dcf4790d3827bf250f996b7e386d944902e70

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