Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug test set stress key #428

Merged
merged 2 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading