From b8d734b9dc3c33acc0925fcee5377a0f58f6da0b Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Sun, 22 Oct 2023 20:07:32 -0700 Subject: [PATCH] use new pymatgen (Structure|Molecule).to_ase_atoms() convenience methods --- chgnet/model/dynamics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chgnet/model/dynamics.py b/chgnet/model/dynamics.py index 5cb618e4..fc0f4d9a 100644 --- a/chgnet/model/dynamics.py +++ b/chgnet/model/dynamics.py @@ -222,7 +222,7 @@ def relax( A dictionary with 'final_structure' and 'trajectory'. """ if isinstance(atoms, Structure): - atoms = AseAtomsAdaptor.get_atoms(atoms) + atoms = atoms.to_ase_atoms() atoms.calc = self.calculator # assign model used to predict forces @@ -432,7 +432,7 @@ def __init__( self.ensemble = ensemble self.thermostat = thermostat if isinstance(atoms, (Structure, Molecule)): - atoms = AseAtomsAdaptor.get_atoms(atoms) + atoms = atoms.to_ase_atoms() self.atoms = atoms if isinstance(model, CHGNetCalculator):