vesin-torch
Computing neighbor lists for atomistic system, in TorchScript
What it is and what it does
Vesin-torch is a library for computing neighbor lists in atomistic simulations—a fundamental operation in molecular dynamics and materials science where you need to identify which atoms are within a cutoff distance of each other. It wraps the Vesin C library and exposes it through PyTorch, enabling both CPU and GPU execution. The package provides a straightforward Python API via the NeighborList class, which takes atomic positions and a cutoff distance, then returns pairs of neighbor indices and their separation vectors, optionally accounting for periodic boundary conditions.
The library is designed for performance on large systems. It also offers drop-in compatibility with existing workflows. The single runtime dependency is torch, and the package is actively maintained with recent releases and no known security vulnerabilities.
Use it for:
- Accelerating molecular dynamics simulations by computing neighbor lists on GPU with torch.
- Building machine learning models for atomistic systems that need efficient neighbor pair enumeration.
- Computing pairwise distances and indices for large crystal supercells with periodic boundaries.
- Prototyping interatomic potential models that require fast neighbor list updates.
- Integrating into existing chemistry workflows that need neighbor list performance improvements.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Computes neighbor lists for atomistic systems efficiently, with support for periodic boundary conditions and GPU execution via PyTorch.
Yes, if you work with atomistic simulations or machine learning on molecular systems and use torch. The package is actively maintained, has no security vulnerabilities, carries a permissive license, and solves a real performance bottleneck. Medium install friction is acceptable given the platform-specific wheels and single torch dependency. Not necessary if you already have adequate neighbor list performance or don't use torch.
Install
vesin-torch on PyPI
pip
pip install vesin-torchuv
uv add vesin-torchpoetry
poetry add vesin-torchInstalling vesin-torch
Before you install
Medium install friction due to platform-specific wheels and a single runtime dependency on torch. Actively maintained with recent releases; last commit 2026-08-07 and version 0.6.1 released 2026-07-29.
License in practice
Distributed under BSD-3-Clause (permissive), allowing commercial and private use with attribution and liability disclaimers. No restrictive copyleft obligations.
Quickstart
pip install vesin-torch
from vesin import NeighborList
positions = [(0, 0, 0), (0, 1.3, 1.3)]
calculator = NeighborList(cutoff=4.2, full_list=True)
i, j, S, d = calculator.compute(points=positions, periodic=True, quantities="ijSd")
Requires Python >=3.10 and torch as a runtime dependency.
Verify before relying
- Whether numpy is required as a transitive dependency or only for the usage example.
- GPU performance characteristics and hardware requirements beyond torch support.
- Compatibility with specific torch versions or CUDA/ROCm backends.
- Whether TorchScript interface is accessible from the Python package or requires separate build.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — torch |
| Maintenance | actively maintained — 16 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 263,606/month — #8,353 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: vesin_torch-0.6.1-py3-none-macosx_11_0_arm64.whl; vesin_torch-0.6.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; vesin_torch-0.6.1-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; vesin_torch-0.6.1-py3-none-win_amd64.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
vesinVesin computes neighbor lists for atomistic…
permissive · top 15,000 on PyPI
matscipyMatscipy provides domain-specific computational…
copyleft · top 15,000 on PyPI
chgnetCHGNet is a pretrained graph neural network…
permissive · top 15,000 on PyPI
cudensitymat-cu13cuDensityMat provides GPU-accelerated density…
unclear · top 15,000 on PyPI
aseASE provides Python tools for setting up,…
copyleft · top 5,000 on PyPI
fairchem-coreProvides pretrained machine learning models for…
permissive · top 15,000 on PyPI
cuvs-cu12Provides GPU-accelerated approximate nearest…
permissive · top 15,000 on PyPI
libcuvs-cu12GPU-accelerated vector search and clustering…
permissive · top 15,000 on PyPI
dscribeDScribe transforms atomic structures into…
permissive · top 15,000 on PyPI
mace-torchMACE trains and evaluates machine learning…
permissive · top 15,000 on PyPI