Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 24, 2025
1 parent 11e10d3 commit 12da1fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apax/utils/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def atoms_to_labels(
for atoms in atoms_list[1:]:
common_keys &= set(atoms.calc.results.keys())
log.info(f"Labels found in the dataset: {common_keys}")

for atoms in atoms_list:
for key in common_keys:
val = atoms.calc.results[key]
Expand All @@ -175,7 +175,7 @@ def atoms_to_labels(
elif key == "stress":
factor = unit_dict[energy_unit] / (unit_dict[pos_unit] ** 3)
stress = atoms.get_stress(voigt=False) * factor
labels[key].append(stress * atoms.cell.volume)
labels[key].append(stress * atoms.cell.volume)
elif key in property_names:
labels[key].append(val)

Expand Down

0 comments on commit 12da1fe

Please sign in to comment.