Skip to main content

Computing neighbor lists for atomistic system

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 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).

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-0.2.0.tar.gz (25.9 kB view hashes)

Uploaded Source

Built Distributions

vesin-0.2.0-py3-none-win_amd64.whl (46.9 kB view hashes)

Uploaded Python 3 Windows x86-64

vesin-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (49.2 kB view hashes)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

vesin-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (48.1 kB view hashes)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

vesin-0.2.0-py3-none-macosx_11_0_arm64.whl (18.2 kB view hashes)

Uploaded Python 3 macOS 11.0+ ARM64

vesin-0.2.0-py3-none-macosx_10_13_x86_64.whl (18.3 kB view hashes)

Uploaded Python 3 macOS 10.13+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page