A library to computes neighbor lists for atomistic system
Project description
Vesin: fast neighbor lists for atomistic systems
US English 🇺🇸 | UK English 🇬🇧 | Occitan | French 🇫🇷 | Gallo‑Italic | Catalan | Spanish 🇪🇸 | Italian 🇮🇹 |
---|---|---|---|---|---|---|---|
neighbor | neighbour | vesin | voisin | 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 git+https://github.com/luthaf/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 for increasingly large diamond supercells,
on Apple M1 Max CPU. You can run this benchmark on your system with the script
at benchmarks/benchmark.py
.
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-0.1.0-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 222d421cb90f5f690af85bc73775c0bcccf70f6a4b9c310e713d825f89d1406c |
|
MD5 | 66f219ce0111afdd0220900b513cada0 |
|
BLAKE2b-256 | 86c60dc488d70d5ddc7ed3c72790e8a98cab7a013d803b03b0bae279510eefe3 |
Hashes for vesin-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92eb8b8f9d6a019e7a79eb52d7e017be5170efe8ab7234faa61e4ebdf2241181 |
|
MD5 | 4dbfc38fcd717de5260b8f5cad82b2e0 |
|
BLAKE2b-256 | 7a40ecd72aa095a3f149d5b10b61fe9fff4823e9980205d123598f941b3fbd8c |
Hashes for vesin-0.1.0-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1f9ba711a8f38f3004e511054730cfdc0bdae29dff13cc62f71e0496b672df3 |
|
MD5 | 1e83a910905153f637e58166b3530b7c |
|
BLAKE2b-256 | 99b204998f03f8f4e0a6d9f87b604899e523c7d7dcc2a4c72595a8a0a8da5e54 |
Hashes for vesin-0.1.0-py3-none-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 007b7cdb280d879c8117d98bab247de3b9f681bb47cc1fd59744ed1a95746623 |
|
MD5 | 6f248db3d36816c2897dc2d0eb5848b9 |
|
BLAKE2b-256 | 42df34fb47808836f8f3ebc048cbf443f42414379d68b38b45da17fd79467d1f |