TorchScript-able neighbor lists implementations (linear and quadratic scaling) for molecular modeling
Project description
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.
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
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
torch_nl-0.2.tar.gz
(11.2 kB
view details)
File details
Details for the file torch_nl-0.2.tar.gz.
File metadata
- Download URL: torch_nl-0.2.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e10c3d7066a86e692edff0e1c19a1166bf917aa1f3bc20d94ff5e3eb04e3ccfc
|
|
| MD5 |
456620f9d4d31f2d03deb71652b807d7
|
|
| BLAKE2b-256 |
5c26a2064d5f937a6c5c0960a0632892719c424daa7baf7a4643be3f1d797e87
|