build_linked_cell_neighborhood_batched¶
- torch_sim.transforms.build_linked_cell_neighborhood_batched(positions, cell, pbc, cutoff, n_atoms, self_interaction=False)[source]¶
Fully batched linked-cell neighbor list construction.
Drop-in replacement for build_linked_cell_neighborhood that processes all structures simultaneously using padded tensors, eliminating Python for-loops over structures. The algorithm mirrors the single-structure
linked_cellbut operates on all structures at once via padded 3D/4D tensors.- Parameters:
positions (Tensor) – Flat atomic positions (N_total, 3).
cell (Tensor) – Unit cell matrices, broadcastable to (n_structure, 3, 3).
pbc (Tensor) – PBC flags, broadcastable to (n_structure, 3).
cutoff (float) – Neighbor cutoff distance.
n_atoms (Tensor) – Number of atoms per structure (n_structure,).
self_interaction (bool) – Whether to include self-pairs.
- Returns:
(mapping, system_mapping, cell_shifts_idx) — same format as build_linked_cell_neighborhood.
- Return type: