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.3.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.3-py3-none-win_amd64.whl (829.7 kB view details)

Uploaded Python 3Windows x86-64

vesin_torch-0.3.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (457.7 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

vesin_torch-0.3.3-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (439.4 kB view details)

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

vesin_torch-0.3.3-py3-none-macosx_11_0_arm64.whl (436.1 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for vesin_torch-0.3.3.tar.gz
Algorithm Hash digest
SHA256 f9b0a4ac1c224fb6d9bf366c4a95f20913ea076f4f959cccc6d6cf61e6a2f768
MD5 109830731321d31024c0bd59fd11c259
BLAKE2b-256 3e2f776e2efd8b601baca641bfa25322e2f9f032991fc2efc2f67784e4682561

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vesin_torch-0.3.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 ec16ad53132e595da2d6c035498a0b7f5408742866c71b4a71e473bc9c313751
MD5 763517329d848cda62512e1233efa9b7
BLAKE2b-256 bd97459a0c801be0b43d3441af47a95987fe92e676ffa3c45e29b266b008e2d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.3.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 44b976b09085891a348f93aaf24c12ccb7d5f334e6f208a095886b2f026b8d6d
MD5 e79021f33e1b5238c36c84e106d73c6c
BLAKE2b-256 6d0e41506d7aaea6e3ab55318f6efa2bc3abac9e985eea0c4557f0138dc51fa8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.3.3-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fe70a85b03ee03e162488e49a8249e5e4b35edf6d96121a8536360cdfb4867d6
MD5 3724384bd33de43536fcb5ae852a4e9a
BLAKE2b-256 4bc91449f86a91b501df398aaa4c8531bf6f2606cef5dfa0624c8aadbb2e929c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.3.3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6acd2ae34538a6cd612ca733509c9b1aa7b9af69863aabd16411b5cdd3682572
MD5 9abda7911d6b79a3e136e22b09f69535
BLAKE2b-256 1be59bf275dac4bf82b8544f7a9686491919e4f9b8aae2a2b4d5b483fcc0885c

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