Skip to content

Commit 76afe07

Browse files
authored
remove useless system_idx check (#351)
1 parent 836ba32 commit 76afe07

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

torch_sim/state.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,7 @@ def n_atoms(self) -> int:
188188
@property
189189
def n_atoms_per_system(self) -> torch.Tensor:
190190
"""Number of atoms per system."""
191-
return (
192-
self.system_idx.bincount()
193-
if self.system_idx is not None
194-
else torch.tensor([self.n_atoms], device=self.device)
195-
)
191+
return self.system_idx.bincount()
196192

197193
@property
198194
def n_systems(self) -> int:

0 commit comments

Comments
 (0)