Skip to main content

torch_nl

Provide a pytorch implementation of a naive (compute_neighborlist_n2) and a linked cell (compute_neighborlist) neighbor list that are compatible with TorchScript.

Their correctness is tested against ASE's implementation.

Note that contrary to ASE, the atoms positions are assumed to be wrapped inside the unit cell.

How to

instal with pip

pip install torch-nl

use the neighborlist

from torch_nl import compute_neighborlist, ase2data
from ase.build import bulk, molecule

frames = [bulk("Si", "diamond", a=6, cubic=True), molecule("CH3CH2NH2")]
pos, cell, pbc, batch, n_atoms = ase2data(frames)

mapping, batch_mapping, shifts_idx = compute_neighborlist(
    cutoff, pos, cell, pbc, batch, self_interaction
)

Benchmarks

Periodic structure

Metadata

Release files for torch-nl 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for torch-nl 0.3
File Size Uploaded
torch_nl-0.3.tar.gz 11.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for torch-nl 0.3
File Interpreter ABI Platform
torch_nl-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 24.5 kB

Release files / torch_nl-0.3.tar.gz

Download URL torch_nl-0.3.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e89a836691e665a5841128fae439fab15ae60af73dd111740f3aaf74289898b5
BLAKE2b-256 checksum
How to use checksums
2876d3704afa7d5627c586da83b4a760001e0621988d1694895fdb29c4d777eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.7

Release files / torch_nl-0.3-py3-none-any.whl

Download URL torch_nl-0.3-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7588ae71c8889243f50d5c2a7826c9864007f2b285b5b67cc2096daf35ccc6f5
BLAKE2b-256 checksum
How to use checksums
0da42f31e2aeb5115951ced565760c7c341d0c8dfdb171e05b314f52d22fc089
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page