Skip to content

Commit 7ba046b

Browse files
committed
skip processing system_idx as recommended by coderabbit
1 parent 81f830b commit 7ba046b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

torch_sim/state.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,12 +885,13 @@ def concatenate_states(
885885

886886
# Collect per-atom properties
887887
for prop, val in get_attrs_for_scope(state, "per-atom"):
888-
# if hasattr(state, prop):
888+
if prop == "system_idx":
889+
# skip system_idx, it will be handled below
890+
continue
889891
per_atom_tensors[prop].append(val)
890892

891893
# Collect per-system properties
892894
for prop, val in get_attrs_for_scope(state, "per-system"):
893-
# if hasattr(state, prop):
894895
per_system_tensors[prop].append(val)
895896

896897
# Update system indices

0 commit comments

Comments
 (0)