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 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.

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.4.0.tar.gz (35.9 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.4.0-py3-none-win_amd64.whl (686.2 kB view details)

Uploaded Python 3Windows x86-64

vesin_torch-0.4.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (766.1 kB view details)

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

vesin_torch-0.4.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (727.1 kB view details)

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

vesin_torch-0.4.0-py3-none-macosx_11_0_arm64.whl (721.3 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: vesin_torch-0.4.0.tar.gz
  • Upload date:
  • Size: 35.9 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.4.0.tar.gz
Algorithm Hash digest
SHA256 4b95bf655eab322dad3b6f38a8c90a02e2be92a1a4f067a4c9811dd8375daa2c
MD5 da43204ce470bdf2bc3431810427d32e
BLAKE2b-256 f5cce0cd33c0a4cef199cbb5cf7a92a795c403941d5efaf382936db8c3e0cc98

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesin_torch-0.4.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 686.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_torch-0.4.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e4bb14d9d82e7c16a0d8646ebbaddc7f407e3029d6f5617fe3879e57ef9aea90
MD5 59701699d029ef450c065b8342fd9c2f
BLAKE2b-256 c545d212b240fa07fc6a9aa6f1672cd94d90af36cb8c6b0e3267573332bb750b

See more details on using hashes here.

File details

Details for the file vesin_torch-0.4.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vesin_torch-0.4.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ae62de7bd78daca7848489f044128a213aee9a643f4e4079503c444f4ee8db6f
MD5 4cf4c25a20e6cf4651dece1619ae0bd6
BLAKE2b-256 b1ed2b32dcecf8c7c4785d475d4e2fd305967d7389a9b30bb07031da8db5b073

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.4.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 501659f580953334a6226aa00a116bc8dba5c76aa27779571c8cc2cc7f360a73
MD5 499ca140b971eb3fed6d7a8607636f0c
BLAKE2b-256 ecd5185dcc1eab6d6bc485cb2f3cf9f4e4e97725e3d962c95b9dbc258585b876

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.4.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 786e8ac00637fa5229343b0ca2ea5d177e4c1d2f8ef7c70cfae88a30ad551c0a
MD5 7496cad8c64a77650726ff2af3c4ae56
BLAKE2b-256 e0c0d8d2d10e6dad15ce74f0dda147aed47464c882752725e74209f87f15b5f0

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