Computing neighbor lists for atomistic system, in TorchScript
Project description
Vesin: fast neighbor lists for atomistic systems
English 🇺🇸/🇬🇧 | Occitan | French 🇫🇷 | Arpitan | Gallo‑Italic | Catalan | Spanish 🇪🇸 | Italian 🇮🇹 |
---|---|---|---|---|---|---|---|
neighbo(u)r | vesin | voisin | vesin | visin | veí | vecino | vicino |
Vesin is a C library that computes neighbor lists for atomistic system, and tries to be fast and easy to use. We also provide a Python package to call the C library.
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).
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for vesin_torch-0.2.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f06d0fc85900a064aaa5bcd65d8c52d926d3dc3df8136fbef1d6a5d6d331beb |
|
MD5 | c46101fc0d02a071a4bd16980bc98753 |
|
BLAKE2b-256 | aab427d59292698ee18eaa9c4d727f9be34661c99e5d558e41a3fb9a902383c3 |
Hashes for vesin_torch-0.2.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5cfe77a86c7dd32fec962b7520408d4fe220bdf2a60733754e61a112e33887c |
|
MD5 | 233d0e39dd2d78158c128bec80ad17c4 |
|
BLAKE2b-256 | 73f78f4e30b881ff4831194df08f1c54e2ef848db2eb486b784a00e7b00b0949 |
Hashes for vesin_torch-0.2.0-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 658c8de9c41a3bed30ad7cd28b3f82eea35e4e2d7389c9b4a33fbc03473a4356 |
|
MD5 | 714abed01dff847de6215de744e9ece2 |
|
BLAKE2b-256 | db5bd965b42c6d7abc2fd64ae917ef9074e94ca197fb6bdd09a3928812c808b6 |