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.5.tar.gz (31.2 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.5-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3Windows x86-64

vesin_torch-0.3.5-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (577.6 kB view details)

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

vesin_torch-0.3.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (606.4 kB view details)

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

vesin_torch-0.3.5-py3-none-macosx_11_0_arm64.whl (574.4 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: vesin_torch-0.3.5.tar.gz
  • Upload date:
  • Size: 31.2 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.5.tar.gz
Algorithm Hash digest
SHA256 07beb0bcbd2dcc2f107ff3d97870ac5508e1d3c8a38a4850784c14b7ce83ff0a
MD5 a23e070562ca4f5bd6b84549efca87d5
BLAKE2b-256 b2a58b60f083ba8b6fc4a0e72dfdea69a90ac0a0a60979f755c729afa7f185b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesin_torch-0.3.5-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.1 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.5-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1296dc6004a4ccf9261e3669c30b998fa6ff26a53973d71100374d20ec102ddb
MD5 555ca9241859aac779b1a8c72898505f
BLAKE2b-256 e35a21731f4e39dc669e0c1d490f29bceb29c01cda390b74b4db273c6ea5ecb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.3.5-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a0547827619fe700718cede92c1e1fe5d7c8a45c0dac6536f3d45f9e4a53be5d
MD5 95fe129ccbd2b9cfbfe1f5ff779e96b8
BLAKE2b-256 1ed5ae000e9ef4908a6bc69f061fc199c9045fc79ec36c593b439a1859ef2b5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.3.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 06f6e4b3cb75c584b22db19359ba942fa75ab9c791dd5fb55145006d613a0935
MD5 217d61fe4174317f6f5f941b6d01b2b8
BLAKE2b-256 082a4351fe570663a2483ac97b803d4fab6e89b5849499c1cb899bed9e688ed4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vesin_torch-0.3.5-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c5b01bc46e31f5e8ae48dab69ca655d04baa7092ca91fc9439439378a81187dc
MD5 9186b146cec4eb4968f4d353a94f52bd
BLAKE2b-256 c3d6fee9fb9ac0ffd2855129e4d8684883bdeced5f2f70ed3b0625752394fcb8

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