Skip to content

Commit

Permalink
Merge pull request #428 from ACEsuit/develop
Browse files Browse the repository at this point in the history
fix bug test set stress key
  • Loading branch information
ilyes319 authored May 17, 2024
2 parents 1efd488 + c9768ed commit dee204f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mace/data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def load_from_xyz(
atoms.info["REF_energy"] = None
if forces_key == "forces":
logging.info(
"Since ASE version 3.23.0b1, using energy_key 'forces' is no longer safe when communicating between MACE and ASE. We recommend using a different key, rewriting energies to 'REF_forces'. You need to use --forces_key='REF_forces', to tell the key name chosen."
"Since ASE version 3.23.0b1, using forces_key 'forces' is no longer safe when communicating between MACE and ASE. We recommend using a different key, rewriting energies to 'REF_forces'. You need to use --forces_key='REF_forces', to tell the key name chosen."
)
forces_key = "REF_forces"
for atoms in atoms_list:
Expand All @@ -226,7 +226,7 @@ def load_from_xyz(
atoms.arrays["REF_forces"] = None
if stress_key == "stress":
logging.info(
"Since ASE version 3.23.0b1, using energy_key 'stress' is no longer safe when communicating between MACE and ASE. We recommend using a different key, rewriting energies to 'REF_stress'. You need to use --stress_key='REF_stress', to tell the key name chosen."
"Since ASE version 3.23.0b1, using stress_key 'stress' is no longer safe when communicating between MACE and ASE. We recommend using a different key, rewriting energies to 'REF_stress'. You need to use --stress_key='REF_stress', to tell the key name chosen."
)
stress_key = "REF_stress"
for atoms in atoms_list:
Expand Down
2 changes: 2 additions & 0 deletions mace/tools/scripts_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def get_dataset_from_xyz(
energy_key=energy_key,
forces_key=forces_key,
dipole_key=dipole_key,
stress_key=stress_key,
virials_key=virials_key,
charges_key=charges_key,
extract_atomic_energies=False,
)
Expand Down

0 comments on commit dee204f

Please sign in to comment.