From a6b990debbeeb7088cf99571a52ac404ef24cd97 Mon Sep 17 00:00:00 2001 From: Curtis Chong Date: Sat, 22 Nov 2025 19:31:31 -0800 Subject: [PATCH] rm useless system_idx check --- torch_sim/state.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/torch_sim/state.py b/torch_sim/state.py index ccaffb27..cf49a310 100644 --- a/torch_sim/state.py +++ b/torch_sim/state.py @@ -172,11 +172,7 @@ def n_atoms(self) -> int: @property def n_atoms_per_system(self) -> torch.Tensor: """Number of atoms per system.""" - return ( - self.system_idx.bincount() - if self.system_idx is not None - else torch.tensor([self.n_atoms], device=self.device) - ) + return self.system_idx.bincount() @property def n_systems(self) -> int: