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.8.tar.gz (27.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.3.8-py3-none-win_amd64.whl (1.6 MB view details)

Uploaded Python 3Windows x86-64

vesin_torch-0.3.8-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (749.6 kB view details)

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

vesin_torch-0.3.8-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (711.8 kB view details)

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

vesin_torch-0.3.8-py3-none-macosx_11_0_arm64.whl (709.0 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: vesin_torch-0.3.8.tar.gz
  • Upload date:
  • Size: 27.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.3.8.tar.gz
Algorithm Hash digest
SHA256 1ba7f39446774893797bda130eb9b88d37d6f044e422e7746c531aef2decac40
MD5 f463b9edd111be996440d5944766ab63
BLAKE2b-256 81f3e12ec0568d464a09e5d0569705df8feb8aa96a70c88492a82f1465e82462

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesin_torch-0.3.8-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.6 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.8-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 3e4bcc93f3e8f16ebb196f026f29f0a492e266f70fc4264ee09ed427fb6e010e
MD5 ccf438098a4a6a5a061e177aa8b1b966
BLAKE2b-256 e2193703751f62090be44e8de0078a0f2ecc6364a2a338f524f85dd5d227a832

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.3.8-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 96a68b63eda857f80c78c5311f2a16fcd3cf9c578646d582326329efcafe8220
MD5 94234e79fc2be2fcfd0f53c043926a8b
BLAKE2b-256 02226276830a70d0cd6f945dd6dd87dfceb22f5f15c8126701526e76e1208271

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.3.8-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7485cee08d1dc23f406967522661be0c6b61ebd5e9a25ce94fbe2a7b7c5ea365
MD5 8c6865675488a0d9f0eac4793b0dcdd1
BLAKE2b-256 df28aa973b40597a222fa7f25ca8ba147e680cae19d14bdffb3a4d2c91102a1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.3.8-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7ab277f97b501670399e61fc82e345fb26ba2aaf24af1b233b8af6766651e3bf
MD5 c5bf16ddbbb7bf53254c6c8dcc8009c1
BLAKE2b-256 874ff45e69f1d0f8f897017c13b13910f14fb845407003c21a52df441d0473c4

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