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=points,
    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.2.tar.gz (30.5 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.2-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.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (439.7 kB view details)

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

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

File metadata

  • Download URL: vesin_torch-0.3.2.tar.gz
  • Upload date:
  • Size: 30.5 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.2.tar.gz
Algorithm Hash digest
SHA256 fcf99e0a2e85b3bd71c774fc25c74660664cf75179a12c37020a32ec94bdd199
MD5 0f61b15c1e10741097666db6151bd983
BLAKE2b-256 41d2d1a77a347afcb999b40d36fcffefd77a0e46d7be38adf338c4f6db8a7d38

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.3.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 97e50ce307024b92bef6cafe6c438d252a424819a470285f46a13d6305cfe1fd
MD5 0909dc0aba3e49da4fef54661ae109e1
BLAKE2b-256 50ce34d635de576dcc75df53934cd440c061c8ee2d434d0df005206dd4815570

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.3.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 942f174db42466b1bb433ced25c421d09d512e08afcfd98189da181f3abdccb2
MD5 79ec61c87c66b8dc66e7074a3817aac1
BLAKE2b-256 1a4867398735b7fcfd970afab1d5e47ae891f2c073ecc935f242008c564f01c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.3.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 08abbcee1fb744627193371148bce969938946c21223fd308cb2cd4059d4b2b9
MD5 fec999e91c01e063df61390d8802e938
BLAKE2b-256 a3080aa303352f35ee5b19f513f294176ec3a44762733de5adf60156b135840e

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