From 831e3b44d900067e7fdf21507d028b8e42f0e306 Mon Sep 17 00:00:00 2001 From: lbluque Date: Fri, 20 Sep 2024 17:46:45 -0700 Subject: [PATCH] make relax_opt optional --- src/fairchem/core/common/relaxation/ml_relaxation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fairchem/core/common/relaxation/ml_relaxation.py b/src/fairchem/core/common/relaxation/ml_relaxation.py index 7845d462a..dd5fb3d84 100644 --- a/src/fairchem/core/common/relaxation/ml_relaxation.py +++ b/src/fairchem/core/common/relaxation/ml_relaxation.py @@ -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, @@ -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"}