From b60f5e48dcf154d2c9e0d128e7594074d039d60b Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Wed, 11 Sep 2024 23:57:01 +0800 Subject: [PATCH] fix: /Users/runner/work/chgnet/chgnet/chgnet/model/dynamics.py:297: DeprecationWarning: Use FrechetCellFilter for better convergence w.r.t. cell variables. atoms = ase_filter(atoms) --- chgnet/model/dynamics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chgnet/model/dynamics.py b/chgnet/model/dynamics.py index 37c24316..dee289d9 100644 --- a/chgnet/model/dynamics.py +++ b/chgnet/model/dynamics.py @@ -10,6 +10,7 @@ import numpy as np from ase import Atoms, units from ase.calculators.calculator import Calculator, all_changes, all_properties +from ase.filters import FrechetCellFilter from ase.md.npt import NPT from ase.md.nptberendsen import Inhomogeneous_NPTBerendsen, NPTBerendsen from ase.md.nvtberendsen import NVTBerendsen @@ -294,7 +295,7 @@ def relax( cry_obs = CrystalFeasObserver(atoms) if relax_cell: - atoms = ase_filter(atoms) + atoms = FrechetCellFilter(atoms) optimizer: Optimizer = self.optimizer_class(atoms, **kwargs) optimizer.attach(obs, interval=loginterval)