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.7.tar.gz (31.1 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.7-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3Windows x86-64

vesin_torch-0.3.7-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (577.6 kB view details)

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

vesin_torch-0.3.7-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.7-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.7.tar.gz.

File metadata

  • Download URL: vesin_torch-0.3.7.tar.gz
  • Upload date:
  • Size: 31.1 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.7.tar.gz
Algorithm Hash digest
SHA256 37504d17c9850ec696d1b2c1ce65d6735a35a3e1becdf3f94f1be7de1521512e
MD5 b718a081df105575ef0ba12c04c0a48d
BLAKE2b-256 2f44ac5ca74259c19bd0437a6bcfc808748e71d3b1dc6f0cf71162b0e4da6746

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesin_torch-0.3.7-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.7-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 14adaa954c8f5172d4da5fcbe723e5abd37658cbd3c2288faec4542d6612a9d6
MD5 084682d99d3adbdcdba1e01f74e5faf2
BLAKE2b-256 4534d072d80fe92a61ad90c9a0c6ecc8b91674e1f89ec0d68278f742bbc6e630

See more details on using hashes here.

File details

Details for the file vesin_torch-0.3.7-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for vesin_torch-0.3.7-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4cdb83dec60245e006326d4973f3b91ad3791690937577a4bc94b62d23e5198d
MD5 7d76b5afacef9cd22cc8ceb490c102ee
BLAKE2b-256 eb27a21deed831a23e6510e3fdb43784ed9cd00e4d4d0b0303d8e489bc0d004b

See more details on using hashes here.

File details

Details for the file vesin_torch-0.3.7-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.7-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a7f686984a24ed2d8fdcb9a3482e2b5594d74f687895e6f2af3552c9efa514a7
MD5 1e18907d212da3553f9404f6b9a01012
BLAKE2b-256 1e3ae24c96af7be0c59f067ee8e95820fbe39d89aecd70877db6b1b0bdc72702

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.3.7-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b8a361f86c272bacf8b0f7938155abe8a0b3c2335b6e43df9bf6bd466d7c1ee4
MD5 8df1a88c3832a00f08a8b477465240eb
BLAKE2b-256 3788df596da20abd557279feb08751f3c0bc53e4374b8698c3cd77134b594ee2

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