Skip to content

Commit

Permalink
remove info_fields, there is already a way to do this using r_data_keys
Browse files Browse the repository at this point in the history
  • Loading branch information
misko committed Dec 19, 2024
1 parent fcad55c commit 4fadbf5
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/fairchem/core/datasets/ase_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ def __init__(
self.ids = self._load_dataset_get_ids(config)
self.num_samples = len(self.ids)

self.info_fields = config.get("info_fields", [])

if len(self.ids) == 0:
raise ValueError(
rf"No valid ase data found! \n"
Expand Down Expand Up @@ -133,10 +131,6 @@ def __getitem__(self, idx):
data_object.fid = fid
data_object.natoms = len(atoms)

# load additional info from dataset
for info_field in self.info_fields:
setattr(data_object, info_field, atoms.info.get(info_field))

# apply linear reference
if self.a2g.r_energy is True and self.lin_ref is not None:
data_object.energy -= sum(self.lin_ref[data_object.atomic_numbers.long()])
Expand Down

0 comments on commit 4fadbf5

Please sign in to comment.