Skip to content

Commit

Permalink
add head_key=head_name to info dict of atoms regardless of isolated_a…
Browse files Browse the repository at this point in the history
…tom_config_value
  • Loading branch information
Thomas Warford committed Nov 9, 2024
1 parent c1184eb commit 0e5d72b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mace/data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ def load_from_xyz(
atoms_without_iso_atoms = []

for idx, atoms in enumerate(atoms_list):
atoms.info[head_key] = head_name
isolated_atom_config = (
len(atoms) == 1 and atoms.info.get("config_type") == "IsolatedAtom"
)
Expand All @@ -288,6 +287,9 @@ def load_from_xyz(
if not keep_isolated_atoms:
atoms_list = atoms_without_iso_atoms

for atoms in atoms_list:
atoms.info[head_key] = head_name

configs = config_from_atoms_list(
atoms_list,
config_type_weights=config_type_weights,
Expand Down

0 comments on commit 0e5d72b

Please sign in to comment.