Skip to content

Commit

Permalink
make relax_opt optional
Browse files Browse the repository at this point in the history
  • Loading branch information
lbluque committed Sep 21, 2024
1 parent 20a0319 commit 831e3b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fairchem/core/common/relaxation/ml_relaxation.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def ml_relax(
model: BaseTrainer,
steps: int,
fmax: float,
relax_opt: dict[str],
relax_opt: dict[str] | None = None,
relax_cell: bool = False,
relax_volume: bool = False,
save_full_traj: bool = True,
Expand All @@ -55,6 +55,7 @@ def ml_relax(
above threshold, ie. once masked always masked. Note if this is used make sure to check convergence with
the same fmax always
"""
relax_opt = relax_opt or {}
# if not pbc is set, ignore it when comparing batches
if not hasattr(batch, "pbc"):
OptimizableBatch.ignored_changes = {"pbc"}
Expand Down

0 comments on commit 831e3b4

Please sign in to comment.