Skip to content

Commit

Permalink
Update dynamics.py (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongpc authored Dec 25, 2023
1 parent fe1297a commit e2a2b82
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chgnet/model/dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ def relax(
f"Invalid {ase_filter=}, must be one of {valid_filter_names}. "
) from exc
if isinstance(atoms, Structure):
atoms = atoms.to_ase_atoms()
atoms = AseAtomsAdaptor().get_atoms(atoms)
# atoms = atoms.to_ase_atoms()

atoms.calc = self.calculator # assign model used to predict forces

Expand Down Expand Up @@ -490,7 +491,8 @@ def __init__(
self.ensemble = ensemble
self.thermostat = thermostat
if isinstance(atoms, (Structure, Molecule)):
atoms = atoms.to_ase_atoms()
atoms = AseAtomsAdaptor().get_atoms(atoms)
# atoms = atoms.to_ase_atoms()

if starting_temperature is not None:
MaxwellBoltzmannDistribution(
Expand Down

0 comments on commit e2a2b82

Please sign in to comment.