Skip to content

Commit

Permalink
fix: /Users/runner/work/chgnet/chgnet/chgnet/model/dynamics.py:297: D…
Browse files Browse the repository at this point in the history
…eprecationWarning: Use FrechetCellFilter for better convergence w.r.t. cell variables.

    atoms = ase_filter(atoms)
  • Loading branch information
DanielYang59 committed Sep 11, 2024
1 parent 1f40088 commit b60f5e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chgnet/model/dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit b60f5e4

Please sign in to comment.