Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion torch_sim/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def convergence_fn(
"""
force_conv = ts.system_wise_max_force(state) < force_tol

if include_cell_forces:
if include_cell_forces and hasattr(state, "cell_forces"):
if (cell_forces := getattr(state, "cell_forces", None)) is None:
raise ValueError("cell_forces not found in state")
cell_forces_norm, _ = cell_forces.norm(dim=2).max(dim=1)
Expand Down
Loading