Description of the issue
The code in metatrain uses vesin.ase_neighbor_list, with a fallback to the ase NL for partial PBC:
|
if np.all(atoms.pbc) or np.all(~atoms.pbc): |
|
nl_i, nl_j, nl_S, nl_D = vesin.ase_neighbor_list( |
|
"ijSD", |
|
atoms, |
|
cutoff=options.cutoff, |
|
) |
|
else: |
|
# this is not implemented in vesin, so we use ASE |
|
nl_i, nl_j, nl_S, nl_D = ase.neighborlist.neighbor_list( |
|
"ijSD", |
|
atoms, |
|
cutoff=options.cutoff, |
|
) |
IMO it could be good to update to a more recent vesin which should bring a couple of improvements:
- partial PBC support
- compute the NL on GPU directly, which removes the need to transfer a large amount of data from CPU to GPU
I would also remove vesin.ase_neighbor_list in favor of an explicit vesin.NeighborList, since the sorting done by vesin.ase_neighbor_list can slow down the calculation quite a bit (Luthaf/vesin#147)
We could also consider using nvalchemi on CUDA, but this dependency has been a bit problematic so to be discussed.
Description of the issue
The code in metatrain uses
vesin.ase_neighbor_list, with a fallback to the ase NL for partial PBC:metatrain/src/metatrain/utils/neighbor_lists.py
Lines 130 to 142 in 08ec341
IMO it could be good to update to a more recent vesin which should bring a couple of improvements:
I would also remove
vesin.ase_neighbor_listin favor of an explicitvesin.NeighborList, since the sorting done byvesin.ase_neighbor_listcan slow down the calculation quite a bit (Luthaf/vesin#147)We could also consider using nvalchemi on CUDA, but this dependency has been a bit problematic so to be discussed.