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)
| File | Size | Uploaded | |
|---|---|---|---|
| torch_nl-0.3.tar.gz | 11.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|