complete_cell¶
- torch_sim.neighbors.utils.complete_cell(cell, pbc)[source]¶
Fill zero-length lattice vectors on non-periodic axes, like ASE’s complete_cell.
Slabs, wires and molecules built by ASE (e.g.
graphene(),nanotube(),molecule()) leave the vectors of their non-periodic axes at zero. These are replaced by unit vectors orthogonal to the others, keeping the cell right-handed. Image shifts along non-periodic axes are always zero, so the filled vectors never enter interatomic displacements.