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.1.tar.gz (36.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.4.1-py3-none-win_amd64.whl (813.2 kB view details)

Uploaded Python 3Windows x86-64

vesin_torch-0.4.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (915.4 kB view details)

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

vesin_torch-0.4.1-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (867.6 kB view details)

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

vesin_torch-0.4.1-py3-none-macosx_11_0_arm64.whl (863.1 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: vesin_torch-0.4.1.tar.gz
  • Upload date:
  • Size: 36.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.4.1.tar.gz
Algorithm Hash digest
SHA256 70fd509fc42c62f74faf36bb03199eb7a3dd0e20c3a9977576d184e7ab4ed6f0
MD5 79a5e6a46c1c2f7ff034a0c17ca7f164
BLAKE2b-256 c22be7560f70ebbdb56319a1c717d5ddf357e2ec6cf7ecc0d8d08c10c69539e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesin_torch-0.4.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 813.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.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c3741d9d0a522830d0a0759205a0c959e12cf771215e4c88f3494c5c33bf7457
MD5 60567d66a55ba12a65f81b03bc03cf73
BLAKE2b-256 dfd40a30383af2b8b6d8a9340980d9478df4e1646d810252426b5105fdc9f4c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.4.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 42bd440bdbf7606cce93dbed86afa427a7207e6c470690a01430abca5afa4dcf
MD5 e2bd297bd958e877b689754b482c6577
BLAKE2b-256 cc31a60e6e7fc6897aff911154bba79cd3daa8059d0e4b11aa04d7c25e92202f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.4.1-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1c0ca85697d9f1dac6da264f8b31c22fadaceefc5c48f5224898c0105401f779
MD5 605f819ca1430a6e0b3f90d46fb63f5d
BLAKE2b-256 f485c7fe60024c960bb6d9776ab670433b2d0d7056308f622067157f14a48279

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.4.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9c2aa9b80bc8f53265b592e395a55b18e2c26c8fe25971f05af39d4adf05d6ae
MD5 fffb1e1bc1b1c1ea7a044987fcb22014
BLAKE2b-256 23bd71e619d846a4b8ac0839e0b675825daaa8944a0cd65f6cbde1c0a06cdda5

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