normalize_inputs

torch_sim.neighbors.utils.normalize_inputs(cell, pbc, n_systems)[source]

Normalize cell and PBC tensors to standard batch format.

Handles multiple input formats: - cell: [3, 3], [n_systems, 3, 3], or [n_systems*3, 3] - pbc: [3], [n_systems, 3], or [n_systems*3]

Zero-length cell vectors on non-periodic axes are filled in with complete_cell().

Returns:

(cell, pbc) normalized to ([n_systems, 3, 3], [n_systems, 3]) Both tensors are guaranteed to be contiguous.

Parameters:
Return type:

tuple[Tensor, Tensor]