skillfed

vesin-torch

Computing neighbor lists for atomistic system, in TorchScript

vesin-torch v0.6.1 263.6K downloads/30d#8,353 on PyPI85
Permissive license BSD-3-Clause Active released

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-torch

uv

uv add vesin-torch

poetry

poetry add vesin-torch

Installing 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

Development Status :: 4 - BetaIntended Audience :: Science/ResearchOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Bio-InformaticsTopic :: Scientific/Engineering :: ChemistryTopic :: Scientific/Engineering :: PhysicsTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

neighbor list computationatomistic systemsmolecular dynamics neighbor searchperiodic boundary conditionsgpu accelerationcutoff-based neighbor findingchemistry simulation tools
molecular-dynamicsgpu-acceleratedchemistry

More Libraries packages